Motionbuilder Python Select Branches

Does anyone know how to Python select the branches of a FBModelSkeleton? :slight_smile:

The same for all FBModels :slight_smile:

import pyfbsdk as fb

def recursiveSelect(node, types=None):
     if (not types or isinstance(node, types)) and not node.Selected:
        node.Selected = True
    for child in node.Children:

recursiveSelect(root)  # Select all children in hierarchy
recursiveSelect(root, types=fb.FBModelSkeleton)  # Select all bones in hierarchy

Edit: Untested

1 Like

Just what I wanted! recursive function, nice. :slight_smile:

Thanks Idunham1!

1 Like