no "On Incoming Geometry Changed" event handler for HDAs?

   1155   5   2
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
In my custom HDAs, I often need to execute some functions every time the incoming geometry changes.
So far I'm using a Python Sop inside the HDA at the beginning of the network, but that's not ideal for different reasons.
In the list of event handlers I expected to find something like "On Incoming Geometry Changed" but there's none.

What's your setup in this scenario?

Attachments:
event_handlers.JPG (38.7 KB)

User Avatar
Member
209 posts
Joined: March 2018
Offline
My approach to this solution is to bring a python sop and then call the proper HDA-defined function.
You can call it via:
hou.parent().hdaModule().yourfunctionname()
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
that's very similar to what I'm doing as well.

cheers
User Avatar
Member
8555 posts
Joined: July 2007
Offline
To optimize your calls consider using Cache If SOP which can detect the geometry changes and trigger cook only when relevant
Edited by tamte - Oct. 17, 2022 12:06:48
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
interesting node I wasn't aware of, thanks
User Avatar
Member
209 posts
Joined: March 2018
Offline
tamte
To optimize your calls consider using Cache If SOP which can detect the geometry changes and trigger cook only when relevant

Dear Tomas,
Can Cache If SOP detect if an animated parameter doesn't change on each frame even though it may contain expressions like floor($F * 0.1)for instance?
Based on what I experienced so far seems it can't understand it and recooking happens every frame instead of every 10 frames!
Is there any trick involved?
  • Quick Links