Last active
October 11, 2015 20:37
-
-
Save csaez/3915734 to your computer and use it in GitHub Desktop.
Softimage: A fast way to get the weight parameter (on mixer) of a given shape property
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
from xml.dom.minidom import parseString | |
from sipyutils import si, siut | |
siget = lambda sFullName: si().Dictionary.GetObject(sFullName) | |
def GetWeight(p_oShape): | |
lData = list() | |
sConn = siut().DataRepository.GetConnectionStackInfo(p_oShape) | |
for i in parseString(sConn).getElementsByTagName("object"): | |
if "Mixer" in i.toxml(): | |
lData.append(i.toxml()) | |
if not len(lData): | |
return None | |
sData = lData[0][8:-9].replace(".actionclip", "") | |
if siget(sData): | |
return siget("%s.actionclip.weight" % sData) | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment