If you are having trouble finding global transformations of an object this could be useful. In the example below I use a function to find the requested object and return global transformations. here is a link to the types of transformation vector/matrices possible that can be used with "FBModelTransformationType": http://docs.autodesk.com/MOBPRO/2016/ENU/MotionBuilder-Developer-Help/index.html#!/url=./py_ref/class_f_b_model_transformation_type.html From my understanding you have to have an empty Vector3d for the information to be stored but you can use any vector2d/3d/4d but for this we use 3d, also True is GlobalInfo and False is Local ( its set to True by default ) I hope someone finds this useful. :) The purpose of this script is to check if current character has a controlrig, If it doesn't create one. a simple script that could be created in to a function, its always good to run this before plotting to a control rig. at Line 16 "currentCharacter.CreateControlRig(True), True will create FK/IK and False will create IK only. Code Editor
A useful tip for getting objects which are characterized to a character. Once the Objects are found through the link within the Characterization, you can get information for Translation, Rotation, Scale, Key frame data etc. For this example below I will be selecting the hips. I have recently been looking into getting all animation keys that are selected within the FCurve View-port and thought this might be useful for anyone looking into different ways of getting keys from an object. Currently this is only for the translation property but you could also add rotation and scale. |