The Area http://area.autodesk.com/forum/ The Area en Copyright 2012 2012-02-08T10:36:31+01:00 How to set / get Scene Metadata (from menu File>Properties) http://area.autodesk.com/forum/autodesk-motionbuilder/python/how-to-set--get-scene-metadata-from-menu-fileproperties/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/how-to-set--get-scene-metadata-from-menu-fileproperties/page-last/#When:02:09:38Z Hello mobu-community. You can in the menu File>Properties add some metadata of your scene. It is stored as a GlobalInfo into the fbx file: [code] Creator: "FBX SDK/FBX Plugins version 2012.0" SceneInfo: "SceneInfo::GlobalInfo", "UserData" { Type: "UserData" Version: 100 MetaData: { Version: 123 Title: "myTitle" Subject: "mySubject" Author: "Me" Keywords: "tags" Revision: "456" Comment: "This is a comment" }[/code] My question is, how to get/set these informations in pyfbsdk ? I cannot find a way to do it sadly. There is a GlobalInfo component in the Scene instance, but without any Component or Property T.T [code]for currentComp in pyfbsdk.FBSystem().Scene.Components: if currentComp.Name == 'GlobalInfo': print len(currentComp.PropertyList) print len(currentComp.Components) 0 0 >>> [/code] A little help will be very appreciated^^. 2012-02-08T02:09:38+01:00 2012 crashes when when using SetCharacterizationOn( True ) http://area.autodesk.com/forum/autodesk-motionbuilder/python/2012-crashes-when-when-using-setcharacterizationon-true-/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/2012-crashes-when-when-using-setcharacterizationon-true-/page-last/#When:16:50:58Z Hi, I'm experiencing a crash when I characterize using the myCharacter.SetCharacterizationOn( True). All seems to be working correctly until I execute this line. When I do so, the charaterize check box turns on and Motionbuilder freezes. Any suggestions on how to remedy this? Thanks! #-------------------- from pyfbsdk import * myCharacter = FBCharacter ("Test_Char") myCharacter.InputType = FBCharacterInputType.kFBCharacterInputStance myCharacter.ActiveInput = True #---------- This custom function adds a joint to the passed body part def addJointToCharacter ( characterObject, slot, jointName ): myJoint = FBFindModelByName(jointName) property = characterObject.PropertyList.Find(slot + "Link") property.append (myJoint) #----------this will assign the joint 'Hips' into the character's 'Hips' slot, rinse wash repeat. addJointToCharacter (myCharacter, 'Reference', 'Reference') addJointToCharacter (myCharacter, 'Hips', 'Hips') addJointToCharacter (myCharacter, 'LeftUpLeg', 'LeftUpLeg') addJointToCharacter (myCharacter, 'LeftLeg', 'LeftLeg') addJointToCharacter (myCharacter, 'LeftFoot', 'LeftFoot') addJointToCharacter (myCharacter, 'RightUpLeg', 'RightUpLeg') addJointToCharacter (myCharacter, 'RightLeg', 'RightLeg') addJointToCharacter (myCharacter, 'RightFoot', 'RightFoot') addJointToCharacter (myCharacter, 'Spine', 'Spine') addJointToCharacter (myCharacter, 'LeftArm', 'LeftArm') addJointToCharacter (myCharacter, 'LeftForeArm', 'LeftForeArm') addJointToCharacter (myCharacter, 'LeftHand', 'LeftHand') addJointToCharacter (myCharacter, 'RightArm', 'RightArm') addJointToCharacter (myCharacter, 'RightForeArm', 'RightForeArm') addJointToCharacter (myCharacter, 'RightHand', 'RightHand') addJointToCharacter (myCharacter, 'Head', 'Head') #---------Turn Characterization on = Crashes MoBu! myCharacter.SetCharacterizeOn( True ) 2012-02-03T16:50:58+01:00 Starting MotionBuilder from the command line with flags http://area.autodesk.com/forum/autodesk-motionbuilder/python/starting-motionbuilder-from-the-command-line-with-flags/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/starting-motionbuilder-from-the-command-line-with-flags/page-last/#When:01:36:27Z Hello, Just wanted to post some start-up flags that aren't documented, yet. If your curious why I posted it here and not in the main MB thread, I just feel a lot of the flags are helpful for the coders. The attachement has more details and examples. -console This opens an output window used by FBTrace in the OR SDK, where the appropriate stdout/err stream goes. If you choose to use this console output window for Python output you would need to also specify the –verbosePython flag. -F [filename] This flag is not necessary to specify a filename, however if you choose to not use it you will always have to have the filename you want to open at startup last in the parameter list. -g [width] [heigh] Sets the window size of MotionBuilder to the values you have specified. Default value will be as large as the screen size. -S Starts MotionBuilder in Full Screen Mode, this is the same as choosing Display > Full Screen inside the Viewer. To exit out of Full Screen Mode, hit Alt+Enter. -setAsFrontMostApp For Macintosh only. When launching MotionBuilder from a terminal, MotionBuilder looses focus to the terminal. This can cause problems when you are trying to automate with scripts. This flag keeps the focus on MotionBuilder and set it as the front most application. -suspendMessages Disables all the warnings and dialogs that pop-up. This flag is useful for automation purposes when you do not want the script to be interrupted by dialog boxes. By default all warnings and dialogs boxes are shown. -T[UI Name] Finds a tool with the matching name among the tools that MotionBuilder has registered, and if it is found it activates it. This flag parameter is case sensitive. Also note there is not space between the flag name and the UI Name parameter unlike the other flags. -verbosePython Outputs all python messages to the appropriate stdout/err stream. This puts the Python print messages to the window that you activate using the console flag as well as to the Python Editor, this is the same location that FBTrace outputs to when using the OR SDK. By default we do not output python output to stdout/err only to the Python Editor. Enjoy!, Kristine 2012-02-01T01:36:27+01:00 how to find key value and key time on kFBPT_double custom property? http://area.autodesk.com/forum/autodesk-motionbuilder/python/how-to-find-key-value-and-key-time-on-kfbptdouble-custom-property/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/how-to-find-key-value-and-key-time-on-kfbptdouble-custom-property/page-last/#When:06:45:26Z I'm new to python and I would like to know how i can find and read all key value and key time of each fcurve of all kFBPT_double custom properties from a marker. I try to dig into the doc but it's kind of difficult to understand for me. If any one can help me, it would be great. 2012-01-27T06:45:26+01:00 MB2010: FBTake.PlotTakeOnSelectedProperties http://area.autodesk.com/forum/autodesk-motionbuilder/python/mb2010-fbtakeplottakeonselectedproperties/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/mb2010-fbtakeplottakeonselectedproperties/page-last/#When:00:38:46Z So I only want to plot certain properties (T, R, or S) on various joints. For example, a head joint might get only R while the shoulder joint could get T and R. It looks like FBTake.PlotTakeOnSelectedProperties in MB2010 will do the trick. If I select the shoulder joint and click on Translate and Rotate in the FCurves Editor (highlighting all 6 channels) then click Plot Selected Properties in the Key Controls window I get exactly what I want. Yes, I realize I could select TR, but this was just a test. So, it looks like PlotTakeOnSelectedProperties will do the trick, but I'm not sure how to select the T or R or S properties in the FCurves window? Or am I going about it incorrectly? TIA - steve 2012-01-27T00:38:46+01:00 Properties for FBModelSkeleton http://area.autodesk.com/forum/autodesk-motionbuilder/python/properties-for-fbmodelskeleton/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/properties-for-fbmodelskeleton/page-last/#When:14:56:12Z Where are the public attributes on an FBModelSkeleton which allow me to change Pivot Size, Show Rotation Axis, and Pivot Visibility? 2012-01-26T14:56:12+01:00 Add Device via Python http://area.autodesk.com/forum/autodesk-motionbuilder/python/add-device-via-python/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/add-device-via-python/page-last/#When:07:36:30Z Hey all, I have a question regarding Device addition to a scene via Python. I can't seem to find anything anywhere. I would like to add a device and then be able to toggle it online or offline if needed. I saw a post on here from 2008 that stated it was NOT possible without using the FileMerge() command and loading in a saved scene with the device. This will not work for my case. Just wondering if there is such a command in MoBu 2012. Thanks! -Brian 2012-01-25T07:36:30+01:00 Installer for PyQt for Mobu 2011 Windows 7 64-bit ? http://area.autodesk.com/forum/autodesk-motionbuilder/python/installer-for-pyqt-for-mobu-2011-windows-7-64-bit-/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/installer-for-pyqt-for-mobu-2011-windows-7-64-bit-/page-last/#When:09:42:36Z Does anyone have a link to PyQt4 installer that works with Mobu 2011 on Windows 7 64-bit? (Mobu 2011 SDK doc "MotionBuilder uses Qt 4.5 LGPL built with MS Visual C++ 2008 (version 9) with Service Pack 1.") I'm also wondering if anyone has experience/advice for installing multiple versions of PyQt to work with multiple versions of Maya and Mobu. Worse case scenario is both Maya and Mobu 2011 and 2012. I have installed PyQt that works with Maya/Mobu 2012. I cannot rely on server installation. Users in my department work from laptops in the field, so everything has to be installed locally on each laptop. For Maya/Mobu 2012, I used this: PyQt-Py2.6-gpl-4.6-snapshot-20090810-1.exe The installer completely wiped out my PATH environment variable! and replaced it with single dir path to Qt dlls. The installer squawed about my multiple PyQt installs although I continued anyways. But yea, PyQt scripts work in both Maya/Mobu 2012 as far as I tested. Any feedback appreciated. Thanks ! 2012-01-24T09:42:36+01:00 Change Camera Attributes via Python http://area.autodesk.com/forum/autodesk-motionbuilder/python/change-camera-attributes-via-python/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/change-camera-attributes-via-python/page-last/#When:09:05:44Z I am relatively new to python in mobu and am trying to change attributes of a certain camera via python. Specifically the Focal Length and toggling items such as Title Safe and the grid. What i can't figure out is how to select a camera based on its name and then proceed to change its attributes. Any suggestions? Thanks! 2012-01-24T09:05:44+01:00 How do I get the drop-selected object when executing a script? http://area.autodesk.com/forum/autodesk-motionbuilder/python/how-do-i-get-the-drop-selected-object-when-executing-a-script/page-last/ http://area.autodesk.com/forum/autodesk-motionbuilder/python/how-do-i-get-the-drop-selected-object-when-executing-a-script/page-last/#When:13:37:23Z When I drag a script onto the scene, and hold it over an object, the object gets highlighted as if it is selected, but it does not appear in the FBGetSelectedModels list. How do I get this drop-selected model? 2012-01-23T13:37:23+01:00