Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import MaxPlus
- def get_scene_nodes():
- """
- Return all nodes in current scene
- :return: generator<INode>
- """
- stack = [MaxPlus.Core.GetRootNode()]
- while stack:
- node = stack.pop()
- if node != MaxPlus.Core.GetRootNode():
- yield node
- if len(list(node.Children)) > 0:
- for child in node.Children:
- stack.append(child)
- def find_modifier_dependants(modifier):
- """
- Return dependants nodes of a given modifier
- :param modifier: MaxPlus.Modifier
- :return: generator<INode>
- """
- objs = list()
- mod_handle = modifier.GetAnimHandle()
- scene_node = node.get_scene_nodes()
- for n in scene_node:
- for m in n.Modifiers:
- if m.GetAnimHandle() == mod_handle:
- yield n
Add Comment
Please, Sign In to add comment