I created this script to deal with changing interfaces between different versions/builds of Houdini. It just so happens that new parameters were added to the Mantra ROP and I didn't want to go through the trouble of copying and pasting parameters just to take advantage of the great new features… I'm that lazy!
Code provided as-is.
Cheers
def transferParms(fromNode = “”, toNode=“”):
myFromNode = hou.node(fromNode)
myToNode = hou.node(toNode)
# checks if nodes are the same type before going through parms
if myFromNode.type() == myToNode.type():
with hou.undos.group(“Transfer Parameters”):
for parm in myFromNode.parms():
if parm.isLocked() == False:
try:
tempParm = myToNode.parm(parm.name())
tempParm.deleteAllKeyframes()
if len(parm.keyframes()) == 0:
if parm.isTimeDependent():
tempParm.set(parm.unexpandedString())
else:
tempParm.set(parm.eval())
elif len(parm.keyframes()) > 0:
tempParm.setKeyframes(parm.keyframes())
elif len(parm.keyframes()) == 0:
tempParm.set(parm.eval())
except:
continue;
else:
print “nodes are not of the same type!”
Transfer parameters between nodes
2044 1 2- rafaels
- Member
- 696 posts
- Joined: March 2009
- Offline
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
- goldleaf
- Staff
- 4162 posts
- Joined: Sept. 2007
- Offline
-
- Quick Links