s s

saitxmy

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Engine

Availability

Not Specified

Recent Forum Posts

Creating an HDA that Instantiates Multiple Nodes at Once 2024年5月14日2:13

mapoga
I believe you need to create a custom shelf script that instantiate the 2 nodes. This is separate from creating the HDA itself.

Here is the content of the shelf tool labeled Karma from this file: $HFS/houdini/toolbar/ExtraLopTools.shelf
import loptoolutils
node = loptoolutils.genericTool(kwargs, 'karmarenderproperties', 'karmarendersettings')
node.setCurrent(True)
nodename = node.name()
kwargs['inputnodename'] = nodename
kwargs['inputs'] = [(nodename, 0)]
kwargs['nodepositionx'] = str(node.position().x())
kwargs['nodepositiony'] = str(node.position().y() - 0.5)
rop = loptoolutils.genericTool(kwargs, 'usdrender_rop')
rop.parm("rendersettings").setExpression('chs("../%s/primpath")' % nodename)
rop.parm("husk_instantshutter").setExpression('1 - ch("../%s/enablemblur")' % nodename)
node.setCurrent(True)
node.setSelected(True)

Thank you very much for your help!! it has solved my problem.
I have a small question, though. The tool is being automatically sorted into the "More" category in the tab menu. How can I reassign it to a different category?

Creating an HDA that Instantiates Multiple Nodes at Once 2024年5月14日0:42

JordanWalsh
you can do this in the onCreate script of the initial HDA too..
I've used the onCreate script successfully — thanks for that!

Creating an HDA that Instantiates Multiple Nodes at Once 2024年5月8日22:49

Hello everyone,

I'm currently facing a challenge with HDAs. I want to create an HDA such that when I instantiate it in Houdini, it automatically creates two or more nodes at once.


Does anyone have experience with creating multi-node HDAs, or could you point me to any resources or tutorials that might help with this? Your guidance and expertise would be greatly appreciated.

Thanks in advance for your help!