Created
August 15, 2013 16:48
-
-
Save mattcox/6242418 to your computer and use it in GitHub Desktop.
Return a list of influences connected to the an effector.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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