Python inside locked HDA that create chop nodes doesn't work

   1392   2   2
User Avatar
Member
38 posts
Joined: June 2019
Offline
Hello,

I've created a whole setup, mainly in python, that implies creating on the fly some chop nodes, when user adds camera into a multiparm HDA.
The problem is when I lock the HDA, this python scripts doesn't work because.. well, the HDA is locked...
Is there a way to lock the HDA, and allow my python inside the HDA modifying its content (adding node, essentially)? Or is it totally contradictory with the locking itself ?
User Avatar
Member
53 posts
Joined: Feb. 2017
Offline
I have come across this problem before and have so far not found a solution to being able to actually create or remove nodes inside of a locked HDA (as this basically required Houdini to see inside the asset, which is something we prevent when we lock it). Additionally, all paths have to be relative to the internal nodes that you are calling from, so no absolute paths allowed neither are lookups from the encapsulating HDA node.

To get around this issue you basically have to create a few different setups and use for example a switch to pick the desired one. Additionally you can of course set the parameters of those nodes programmatically. Hope this works out for your case
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
Hello, You could create a subnet inside Your hda and set this node to be editable in the hda settings. even if the asst is locked,the user can jump into this node and can create nodes or edit. A python script also can modify this network
  • Quick Links