Link up multparm from HDA-level to inside level w/o python?

   1358   2   0
User Avatar
Member
7 posts
Joined: June 2016
Offline
I have a top HDA-level multiparm setup, where a user can click on the plus sign to add additional fields. And lets say it adds an empty string field (name#), and a float value slider (value#).
Inside the HDA, I have a simple attribute wrangle, and I have setup a similar thing with the multiparm, and also the same string field and float value param.
It's easy enough to link up the multiparm itself via 'paste relative references' since it's a single field that's always present. However, I'm wondering how to have the # fields dynamically link up. I've linked this up before via python when dealing with python interactive viewer states, where a mouse event will run code to 'link' up the values. But is there a non-python way to do this?
Or do I need to setup a python callback script in the parameter definition?... I've personally not used callback scripts much in the parameter description field. How would I set this up?
thanks!
User Avatar
Member
8785 posts
Joined: July 2007
Offline
if those multiparm structures match It's much easier to just delete your Multiparm on HDA in Type properties and then promote the one from your wrangle (Drag&Drop or from From Nodes section)
that will automatially create link

if you want to do it manually you can use opmultiparm command in the Textport or call it from Python
https://www.sidefx.com/docs/houdini/commands/opmultiparm.html [www.sidefx.com]

once the link is established all multiparm instances will be automatically linked so no need to call anything when number of instances changes
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
10 posts
Joined: April 2020
Offline
tamte
if those multiparm structures match It's much easier to just delete your Multiparm on HDA in Type properties and then promote the one from your wrangle (Drag&Drop or from From Nodes section)
that will automatially create link

if you want to do it manually you can use opmultiparm command in the Textport or call it from Python
https://www.sidefx.com/docs/houdini/commands/opmultiparm.html [www.sidefx.com]

once the link is established all multiparm instances will be automatically linked so no need to call anything when number of instances changes
I tried this method. However, it just link parameter by index. For example, I have four points in an add node, and I link ..//enable# to usept# parameter of add node. When I remove one instance of point for example I remove point2, the process of two node is different. For add node, the instance 2 in the list parameter is removed. For the other node, it remove the last instance.

param list of add node
usept0 true pos0 0,0,0
usept1 false pos1 1,1,1
usept2 true pos2 2,2,2
usept3 true pos3 3,3,3
param list of another node
enable0 true attached_param1 5 ...
enable1 false attached_param1 6 ...
enable2 true attached_param1 7 ...
enable3 true attached_param1 8 ...

after I remove the second instance of list:
param list of add node
usept0 true pos0 0,0,0
usept1 true pos1 2,2,2
usept2 true pos2 3,3,3
param list of another node
enable0 true attached_param1 5 ...
enable1 true attached_param1 6(this is supposed to be 7) ...
enable2 true attached_param1 7(this is supposed to be 8) ...

I want to sync the remove action. However I can't get the element I remove in the callback
  • Quick Links