How to channel reference a multiparm on an HDA node?

   1609   4   1
User Avatar
Member
109 posts
Joined: Aug. 2017
Online
I'll be specific: I'm trying to create an entirely referenced copy of Labs File Cache TOP (referenced to another copy of this node placed elsewhere). I'm trying to make this link relative in a `chs("../../"+opinput(".", 0)` type of way.

Generally, it was going well until I got to the multiparm block. (which serves for adding wedge attributes in this node)

I noticed that when we Ctrl+Alt+Shift+Drag that node, it will properly link the multiparm items, but this relation will now be fixed to this specific location, it won't work if we move the node. I couldn't find where it was actually getting that location from.

How can I link two multiparm blocks with expressions if I can't change their channel default value in the parameter interface?
User Avatar
Member
9376 posts
Joined: July 2007
Offline
One way is to use opmultiparm [www.sidefx.com] hscript command
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
247 posts
Joined: May 2017
Offline
Not HScript but you can try the python solution if you like, hip below.

Note:
I saved the Labs File Cache TOP as a copy and modify it, added some parameters and code in the python module. This approach uses an absolute node reference. You can move the copy to any location as long as the reference stays in the same place. You can update the reference with sync button or revert.
Image Not Found

Attachments:
sync_node.hiplc (484.0 KB)

User Avatar
Member
109 posts
Joined: Aug. 2017
Online
I'm super grateful to both of you. I ended up using the opmultiparm in a tricky way because it doesn't allow for any complex expressions in the parameters it replaces.

I created a Null with a multiparm copy. This way we can edit the default channel values of the multiparm. There I set my opinput trickery as default values, so it updates to whatever is connected to my tool.

Then, I used opmultiparm to hook my Labs File Cache to this Null which will always be right beside it. And that's it.

Thank you very much. Viklc, your code taught me a few things so it definitely didn't go in vain.
User Avatar
Member
247 posts
Joined: May 2017
Offline
alexmajewski
Thank you very much. Viklc, your code taught me a few things so it definitely didn't go in vain.

Glad to hear - Currently working a lot with ParmTemplates/Node Definition, so it is also a good exercise for me .
Edited by vikus - July 30, 2024 08:04:02
  • Quick Links