just_bob_2nd Posted April 7, 2020 Share Posted April 7, 2020 Hi, I'm losing my mind over how to link subnet parameters with the ones inside of it. I've got it to read the number of parameters and make that many, but can't make it read and populate the values accordingly. Super simple example hip down below. Basically the values on the subnet controls should correspond to the values on the wrangle inside. Thanks multiparmblocklist.hip Quote Link to comment Share on other sites More sharing options...
DonRomano Posted April 7, 2020 Share Posted April 7, 2020 (edited) Hey, you can setup a python callback script which dynamically reference the parameters from your hda to the wrangle. Here's a quick example : listparm_hda = kwargs["node"].parm("list") list_hda = listparm_hda.multiParmInstances() children = kwargs["node"].children() for child in children: if "wrangle" in children: wrangle = children else: continue listparm_wrangle = wrangle.parm("list") list_wrangle = listparm_hda.multiParmInstances() i = 0 for parm in list_hda: p1 = parm p2 = list_wrangle[i] p2.set(p1) p2.expression() i += 1 Cheers, Edited April 7, 2020 by DonRomano 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.