Hello,
Does anyone know how to Python select the branches of a FBModelSkeleton?
The same for all FBModels
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(child)
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.
Thanks Idunham1!
1 Like