MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Saving Only Bones of a Take

1 REPLY 1
Reply
Message 1 of 2
spark
250 Views, 1 Reply

Saving Only Bones of a Take

Using MB 2010 on Windows 7x64.

I can't seem to save just the selected bones of a take using python (I used to do this in 2009 but that code isn't working now).

I constrained some markers to a mesh with bones. As I scrub the scene the markers move about, which in turn, drive the bones and mesh. I am not using the Actor | Character tool.

I manually plot TR keys on the bones.

The FCurve editor shows data on the bones. All's well.

I manually select the hierarchy of bones only (no mesh, no cameras, no optical root, etc.) and do a Save Selection (not Save or Save As). I give it a filename and hit OK. If I load that file back into MB, I ONLY see keyed bones moving around - no geo, no cameras, no markers, etc.

I need to replicate that functionality using python, but, I can't seem to get it to work.

This used to work for me, I think, but I don't know if something changed:


LM = FBFbxManager()
LM.UseASCIIFormat = False
LM.Selected = True # should only save selected models
LM.SaveBegin( fbxfile ) # fbxfile defined elsewhere
LM.Save()
LM.SaveEnd()



This generates an FBX file as expected, but it also contains markers, the geo, cameras, and everything else in the scene. I've played around with the other options to no avail:


LM.Cameras = FBElementAction.kFBElementActionDiscard
LM.BaseCameras = True # also tried False


All I want to do is save the selected bones and nothing else ... what am I missing?
1 REPLY 1
Message 2 of 2
spark
in reply to: spark

Ah, quick update (I always seem to figure it out a minute after posting).

You must set your options BEFORE calling SaveBegin().

There is, however, a different weird side effect now. I save the file and see just keyed bones in the new scene, but none of the hierarchy of the bones is maintained:


root
big_bone
little_bone


becomes


root
big_bone
little_bone


Maybe I'll figure this out a minute after I hit the "Submit" button.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report