Jump to content

How to get a callback event on cook?


Gaussian_Guaicai

Recommended Posts

I been coding the callback event in a HDA with Python, the goal is to call every time the node is cooked(after the cook); But it seem not such event type in hou.nodeEventType and hou.hdaEventType.

I was write the hou.Node.addEventCallback() in OnCreate event handler section to setup different event type callback.

Is there any way to write a callback in HDA for something like "OnCook" event?

Edited by Gaussian_Guaicai
Link to comment
Share on other sites

That will be a lot coding just using Python.... So its no way to add a special "OnCook" event type to callback for it?

I was able to achieved similar callback by using hou.Node.addParmCallback() to test parameter change with the expression "nprim()" or "npoint()" inside the HDA output node, it actually working great even the number of the primitives from input not change as long as the upstream is cooked.

Edited by Gaussian_Guaicai
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...