EZ TD MotionBuilder Setup via Python
This python script for MotionBuilder does 3 important things to help setup your animation pipeline and ensure all animators have the proper tools & project path settings needed to do what they love doing the best (hint: and it’s not file browsing).
Plus you get the satisfaction knowing that the pipeline is maintained and consistent, you save yourself the time & trouble accumulated from manually setting up each machine, or you save the animator the frustration & fear of actually having to use the wiki. That is, unless you’ve been good and diligent about keeping those pages updated, then you can just send them the link anyway that’ll tell them where the script is located.
This also came in handy when/if experiencing a bug in MotionBuilder2012 that would reset itself to it’s default settings and configurations. This doesn’t back up and save any individual personal preferences made to MotionBuilder, but it will restore the standard necessities set forth for your teams pipeline and MotionBuilder workflow.
To back up your personalized MotionBuilder configurations (layouts, hotkeys, etc.), I recommend making a copy of the two following directories that should look something like;
- C:\Program Files\Autodesk\MotionBuilder [VERSION]\bin\config
OK, so what Three configuration settings are we talking about?
Just enter the paths into the newFavPaths list, as seen below
Change the string value of pyStartupDir to your new python startup folder directory
Enter your plugin directories into the list, pluginDirs
Can this be used to change other settings in MoBu’s config files?
Certainly! I’d be interested in hearing about it if you do. Or if you have another solution, please share.
Why not just use python rather than going through MoBu?
We could very well and easily achieve the same results without going through Motionbuilder (pyfbsdk), but we wouldn’t be learning Motionbuilder’s SDK, would we?
Also, more importantly, if we did decide to use python without the help of Motionbuilder, we would need to make sure that Motionbuilder wasn’t open before running the python program to alter the config files.
Why? (great question, btw)
Because Motionbuilder will rewrite those configs files upon exit. In other words, the altered config files would be reverted. And Motionbuilder needs to be restarted anyway for the changes to take effect.
Motionbuilder doesn’t necessarily have to be running either for this script to still work. We can start Motionbuilder from the command line or a .bat file and tell it to execute this script.
That .bat file might look something like this
"C:\Program Files\Autodesk\MotionBuilder [VERSION]\bin\x64\motionbuilder.exe" -console -verbosePython "ezTD_mobuSetup.py"
Leaving less room for human error
(unless you’re causing the errors
…but at least they’re consistent )