Hi all!
I have a python node, and it executes some code every time something changes on the network before it. But it only fires if either it is selected, or if any node after it is selected. That is, if I place it at the end of the network and make changes before it, it will not work until I select it.
The Python code simply presses a button of my choice to, for example, automatically save an image to disk from the COP context whenever I change something in the SOP context.
Is there a way to update a python node to run code without highlighting it, without highlighting anything after it, and without using a Template Flag on it? Let's say I just want to put it at the end of the network with the second branch, and forget about it.
How to update node, with any change in the network?
2907 2 1-
- Kripakov
- Member
- 2 posts
- Joined: May 2016
- Offline
-
- tamte
- Member
- 9417 posts
- Joined: July 2007
- Offline
Most of the Houdini dependencies are pull based
So the node cooks when it's requested to cook by something that depends on it not other way around
You can probably set up some callbacks in your scene that will cook your Python node in some time intervals or something (which should cook only if it's dirty unless you force the cook)
I don't personally like such callbacks but it may be a hacky option
So the node cooks when it's requested to cook by something that depends on it not other way around
You can probably set up some callbacks in your scene that will cook your Python node in some time intervals or something (which should cook only if it's dirty unless you force the cook)
I don't personally like such callbacks but it may be a hacky option
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Kripakov
- Member
- 2 posts
- Joined: May 2016
- Offline
Thank you! I'll try to solve it with callbacks!
While the working solution is to auto-enable the flag template on the asset with python, and inside the node delete everything that comes in. The template flag forces the node to update, and there is nothing extra in the viewport. Sounds bad, but it works
While the working solution is to auto-enable the flag template on the asset with python, and inside the node delete everything that comes in. The template flag forces the node to update, and there is nothing extra in the viewport. Sounds bad, but it works
-
- Quick Links

