pelos Posted October 12, 2016 Share Posted October 12, 2016 when I link some parameters some of the main node get crazy wire messing up the node. example Node A has some parameters link between them. example nodeA.parm("bla") and nodeA.parm("ble") is set as reference link to nodeA.parm("bla") nothing crazy one parameter looking at another one in the same node. now I want to create a new node and link all the parameters to this new node I want nodeB parameters to look at nodeA, after running the code witch is a regular stuff just setting parameters, some of the paramters in nodeA that were just a integer now have an expression poiting to another parameter =( should I create something like if its an expression use "setExpression" if is not an expression use the regular set? def linkParmsTo(source_node, target_node): """ Link the parms of the source node to those of the target node if a parameter with the same name exists. # Produced by: # Graham Thompson # captainhammy@gmail.com # www.captainhammy.com """ for parm_to_link in source_node.parms(): # Skip folder parms. if isinstance(parm_to_link.parmTemplate(), hou.FolderSetParmTemplate): continue parm_to_link_to = target_node.parm(parm_to_link.name()) # If the target parm exists if parm_to_link_to is not None: parm_to_link.set(parm_to_link_to) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.