Jump to content

Is there a way to dynamically insert any node within an HDA?


magneto

Recommended Posts

Hi,

 

If I have an HDA whose subnet looks like this for example:

 

skV3wRp.png

 

Is there a way to allow a user to insert any node in there? You could have a special placeholder node that has inputs and you would connect the inputs you want to this node so that when the user uses your HDA, he could connect "any" node to non-primary input that will be inserted into that location in the subnet:

 

0YyXkdQ.png

 

If I am not wrong the new POP DOPs do this kind of thing?

 

 

Thanks.

Link to comment
Share on other sites

Create a subnet. In your subnet just create 2 nulls IN and OUT (just gonna be easier to deal with).
In the Basic tab of Operator Type Properties make your subnet an editable node.

Then you can have a button to call a script in the python module to create and insert whatever node you want.

You just need createInputNode() and setInput().

Or in your case, using a connected node you could fire the python module script  using On Input Change. get the operator type, then create it, input it.

should work.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...