Skip to content

Instantly share code, notes, and snippets.

@mattcox
Created August 15, 2013 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattcox/6242418 to your computer and use it in GitHub Desktop.
Save mattcox/6242418 to your computer and use it in GitHub Desktop.
Return a list of influences connected to the an effector.
import lx
import lxu.select
def GetInfluences (effector):
'''
Takes an effector input and returns a list of all
connected influence items.
'''
influences = []
scene = lxu.select.SceneSelection().current()
effector = lx.object.Item(effector)
graph = lx.object.ItemGraph(scene.GraphLookup(lx.symbol.sGRAPH_DEFORMERS))
fwdCount = graph.FwdCount(locator)
for i in range(fwdCount):
influence = graph.FwdByIndex(locator, i)
influences.append(influence)
return influences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment