Skip to content

Instantly share code, notes, and snippets.

@tpoveda
Created June 19, 2018 09:04
Show Gist options
  • Save tpoveda/5f2f3cb9a46767dabf6130451c3c3205 to your computer and use it in GitHub Desktop.
Save tpoveda/5f2f3cb9a46767dabf6130451c3c3205 to your computer and use it in GitHub Desktop.
Returns all skin influences of the given Skin Modifier
import MaxPlus
def find_skin_influences(skin_modifier):
"""
Return influence nodes of a given skin modifier
:param skin_modifier: MaxPlus.Modifier (Skin)
:return: generator<INode>
"""
for ref in skin_modifier.Refs:
if not ref:
continue
if ref.GetClassID() == MaxPlus.ClassIds.NodeObject:
node_inf = MaxPlus.INode._CastFrom(ref)
yield node_inf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment