Area :: Header
New tools, templates and workflows
Announcing Extension 2 for 3ds Max 2015 and 3ds Max Design 2015
Discussion Groups


Valued Contributor
52 Posts
0 Kudos
Registered: ‎01-09-2007

import custom-format data into scene

23 Views, 0 Replies
02-03-2011 06:15 PM
I have a scene with a skinned mesh. No actor, no animation data on the mesh.

I want to load a custom data file and have the character move about.

The format is similar to BVH - one part to describe the hierarchy, one part of data.

What's the most efficient way? I imagine I may end up having to use the SDK for speed's sake, but I wanted to give python a shot, first.

Assume that the data from the file is loaded in memory and is accessed in a sensible way, e.g.

Data.LeftArm.RotateX = lcl RotateX value at frame 0
Data.LeftArm.RotateY = lcl RotateX value at frame 1
Data.RightAnkle.Translate = lcl Translate value at frame 0

So I'm thinking I'd have to loop thru each frame, then for each bone, find its Translate/Rotate/Scale's AnimationNode's XYZ AnimationNode's FCurve, do a KeyAdd and set the value from Data.LeftArm.RotateX?

Sounds rather easy, but a bit cumbersome and slow. I guess I can't set the FCurve to some array of data?