ant1fact Posted June 18, 2019 Share Posted June 18, 2019 (edited) Hello, I hope somebody can help me out as I have run into a problem when linking ramps via script that I have been unable to solve for more than a week now. What I would like to achieve is exactly the same effect that using "Copy Parameter" / "Paste Relative References" does when doing this from the user interface. I tried both python and hscript. The problem is that once the ramps are linked, when I add new control points to the parent, the child gets the control points but doesn't get the positions (ramp#pos) and values (ramp#value). In python I simply tried to set one float ramp parm to the other like this: hou.parm("/obj/node_B/ramp_B").set(hou.parm("/obj/node_A/ramp_A")) This seemed like the most simple and straightforward way of doing this but it failed so I reported it to the SideFX guys and they confirmed that python is not feature-complete for linking ramps with the .set() command - first they logged it as Bug #97192 then it was reconsidered to be an RFE with the same ID. After this SideFX suggested to use hscript opmultiparm which I proceeded to do but the ramp linking failed this time too. I am fairly confident using python but not so much with hscript so I am hoping it's my inability to use hscript properly this time rather than another bug - this is what I did: opmultiparm /obj/node_B/ 'ramp_B#pos' '/obj/node_A/ramp_A#pos' 'ramp_B#value' '/obj/node_A/ramp_A#value' 'ramp_B#interp' '/obj/node_A/ramp_A#interp' What I noticed in the "Edit Parameters" interface is if I manually type in the path to link the ramps then it does work the same as "Copy Parameter" / "Paste Relative References" - see below. I wonder if this field is exposed to python or hscript somewhere and maybe I should try to set this? Other than the above I also used both opscript and .asCode() after setting up the ramps links manually to see if it gives me the proper code and even if I run the code I get back from these the ramp linking still fails. Has anybody ever found a reliable solution for linking ramps in script? Anybody got any ideas where to go from here?:) EDIT: I found the solution on the SideFX forum by user jsmack in this post: https://www.sidefx.com/forum/topic/59899 Edited June 18, 2019 by ant1fact 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.