Referencing Multiparm List

   7008   7   3
User Avatar
Member
52 posts
Joined: June 2009
Offline
Hi everyone,

Say I have a digital asset which has got a “Folder” Parameter of type “Multiparm List”. I have to reference it to a node inside the asset. The problem is everytime the number of elements in the list is not the same. Can someone tell me how to reference the multiparm list.?

Cheers.
User Avatar
Member
52 posts
Joined: June 2009
Offline
Hi guys,

Found a solution. If anybody is interested, let me know. I will post the scene file.

Cheers.
User Avatar
Member
789 posts
Joined: April 2020
Offline
I usually use python for this. In the parm name you can see it is set to parm# so the first instance is parm1 etc.

In python I then do


i=1
while p = hou.parm(base + str(i)):
p.eval()
i += 1


There must be cleaner solution though. I would be interested in your solution.

Cheers,
Koen
User Avatar
Member
52 posts
Joined: June 2009
Offline
Hi Koen,

Sorry for the late reply. Initially I was also using python. But you can also do it via edit parameter interface. Create a “multiparm list” for a node. Create another node and select “edit parameter interface” option. In that dialog box, Choose “From nodes” option and select the node which has the “multiparm list” and copy the folder onto your node. Now the node you created first will be refernced by the new node.

Try this out and this works for me.

once again sorry for the late reply and thanks a lot for your interest.

Cheers.
User Avatar
Member
401 posts
Joined:
Offline
koen
There must be cleaner solution though. I would be interested in your solution.

not sure if this is cleaner, but that's what I usually do:

The number of avail multiparms is accessible via the folder name:

numparm = node.evalParm('mymutiparmfoldername')
for n in range(0, numparm):
print node.evalParm('parnname_%s' % n)
this is not a science fair.
User Avatar
Member
789 posts
Joined: April 2020
Offline
Yep, I consider that cleaner, did not know that.

Thanks!
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
Raavenish
Hi Koen,

Sorry for the late reply. Initially I was also using python. But you can also do it via edit parameter interface. Create a “multiparm list” for a node. Create another node and select “edit parameter interface” option. In that dialog box, Choose “From nodes” option and select the node which has the “multiparm list” and copy the folder onto your node. Now the node you created first will be refernced by the new node.

Try this out and this works for me.

once again sorry for the late reply and thanks a lot for your interest.

Cheers.

Hi, I can't make it work as you suggested. I got warning that Node is outside subnet: /obj/geo1/null1/folder0.

Can you kindly post an example for your solution?

Thanks!
User Avatar
Member
617 posts
Joined: Aug. 2008
Offline
same thing here, python to read and set the parms.
  • Quick Links