"onLoaded" event handler in nested HDA

   1583   1   0
User Avatar
Member
1 posts
Joined: May 2022
Offline
Hi there,

I have a question regarding "onLoaded" event handler.

According to this doc https://www.sidefx.com/docs/houdini/hom/locations.html [www.sidefx.com] ,

(.. regarding OnLoaded ..)
This does not run when loading the node as part of the contents of another asset.

But when I open a scene which has unlocked hda that includes another hda in it, it looks like the inner hda's onLoaded script runs. I can confirm this as I get error from the onLoad event handler, something like

Error running event handler:
Traceback (most recent call last):
File "inner_hda?OnLoaded, node /hda/path", line 4, in <module>
...

On the other hand, when I lock the hda, then the error doesn't show up.

So from my observation I'm guessing the onLoaded script actually runs when the hda is nested in unlocked hda.

I've been looking up online to confirm this and get some information what different things happen when a hda is locked/unlocked, But I can't get much. So wondering if this is something that I can get help on here?

Or If anyone knows doc I can refer to regarding this, please let me know. Thanks
User Avatar
Member
9423 posts
Joined: July 2007
Offline
samsamgoo
But when I open a scene which has unlocked hda that includes another hda in it, it looks like the inner hda's onLoaded script runs. I can confirm this as I get error from the onLoad event handler, something like
unlocked HDA's content may completely differ from the definition, so any node in there is stored in hip file and created on load or when you paste it so I'm not surprised that onLoaded is called on internal nodes of unlocked assets since they are literally free floating nodes as if they were in a regular subnet
Edited by tamte - May 9, 2022 16:39:10
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links