andehpandeh Posted June 4, 2020 Share Posted June 4, 2020 (edited) 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 June 4, 2020 by andehpandeh Quote Link to comment Share on other sites More sharing options...
bunker Posted June 5, 2020 Share Posted June 5, 2020 just use parm() instead of evalParm() ball.setParms({'tx':boxy.parm('tx'), 'ty':0.55}) 1 Quote Link to comment Share on other sites More sharing options...
andehpandeh Posted June 5, 2020 Author Share Posted June 5, 2020 You sir are a gentleman and a treasure, thank you 1 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.