View Full Version : Python Scripting

04 April 2007, 04:44 PM
Hey all,

Not sure how many people out there are scripting in Python for MotionBuilder but I have a scripting question.

I am trying to rename the Character constraint name to be the same name as the FBX file.

For example: The FBX filename would be "Plasticman.fbx" so I want my Character constraint (with the characterization) to be renamed to "Plasticman".

I am batching this and have a working batch file processor but would like to have this functionality added.

Would be nice if anyone knew how to strip all the media (textures, video, etc...) through Python, as well.

Not asking much, am I ? ;)

-Lone Canuck-

04 April 2007, 09:45 PM
this script that came in the sample dir for motoinbuilder should get you close..
you just need to add the code for the chracter node instead of the takes.

its attachedk, just change the.txt to .py

not sure about removing the textrues...etc.. might be easier to just save selected form the file and not bring over any of that stuff...

04 April 2007, 09:50 AM
Hi Brad,

Yeah, thanks for that. I have something working now. Just took the iterative code from the Batch Render script and embedded the functionality we needed.

The texture stripping was a modified version of the RemoveUnusedMedia script. Just changed the "==" to a "!=" and it rips out all the media in a scene.


Just need a way to pre-check existing groups in a scene before creating new ones...


CGTalk Moderation
04 April 2007, 09:50 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.