Gaussian_Guaicai Posted April 11, 2021 Share Posted April 11, 2021 (edited) 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 April 12, 2021 by Gaussian_Guaicai Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted April 12, 2021 Share Posted April 12, 2021 You might want to use Object/Python Script or Sop/Python SOP nodes for this. Or create a new "Python based" operator via File -> New Asset > Python type and you'll be able to put your cooking code into the Code section of the operator Quote Link to comment Share on other sites More sharing options...
Gaussian_Guaicai Posted April 13, 2021 Author Share Posted April 13, 2021 (edited) 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 April 13, 2021 by Gaussian_Guaicai Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.