Jump to content
Sign in to follow this  

Set values of a multiparm folder

Recommended Posts

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!


Share this post

Link to post
Share on other sites

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()

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.


Or something similar.




  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this