Johan Posted June 18, 2020 Share Posted June 18, 2020 Hi all, I have a hard time understanding how to programmatically add values to a multiparm folder. I want to add new items to a multiparm I added on my HDA. I can see all sorts of code for multiparm template groups and how to construct and add them to a node, but hardly any code that actually adds data to the multiparm. Any pointers are greatly appreciated! Thanks, -Johan Quote Link to comment Share on other sites More sharing options...
Johan Posted June 18, 2020 Author Share Posted June 18, 2020 Found it, the magic bullet was multiParmInstances and insertMultiParmInstance p = obj.parm('folders') instances = p.multiParmInstances() for i in range(9): num_instances = p.evalAsInt() p.insertMultiParmInstance(num_instances) Adds 9 new entries to multiparm block. If you use the naming scheme on the parms like value_# each parm name will increment and you can set values on them like normal. obj.parm('value_'+str(i)).set(yourval) Or something similar. Cheers, -Johan 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.