Jump to content

connecting parameters in python


andehpandeh

Recommended Posts

Hello,

I've been having trouble trying to replicate the "copy parameter/paste relative references" process of referencing parameters from one node to another in python. I understand you can write an expression in the parameter like: evalParm('../box1/tx') but I'd like to be able to do this in the python source editor. 

This chunk of code copies the translate x from box1 and pastes the value into sphere1's tx, however it doesn't connect the two like the expression above does.

boxy = hou.node('/obj/testGeo/box1')
ball = hou.node('/obj/testGeo/sphere1')
ball.setParms({'tx':boxy.evalParm('tx'), 'ty':0.55})

Essentially I want the parameters to be linked so that if I change box1 tx, sphere1 tx is also changed. Any ideas on what I'm missing to make that connection permanent? 

Edited by andehpandeh
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...