[MotionBuilder] Remove Animation From Objects

from pyfbsdk import *
 
def remove_anim(obj):
    """
    remove translation, rotation and scale keys from obj
    """
    if obj:
        for i in range(2):
            anim_node = obj.AnimationNode.Nodes[i]
            try:
                for node in anim_node.Nodes:
                    node.FCurve.EditClear()
            except:
                pass
 
obj = FBFindModelByLabelName("obj_name")
remove_anim(obj)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>