Hello,
If I have a checkbox with a python callback script on it, how do I get that callback script to execute when toggling that checkbox via python?!
So I'm toggling the checkbox just with myParm.set(1) for example, but it refuses to execute the python callback attached to the parm ‘myParm’ (callback executes fine when manually toggling the checkbox).
Thanks!
Dean.
Callback script not executing when parm toggled with code
6912 8 3-
- Dean_19
- Member
- 322 posts
- Joined:
- Offline
-
- Enivob
- Member
- 2658 posts
- Joined: June 2008
- Offline
I just ran into this problem the other day. You can't set parameters on yourself.
Add a new python node and put the set code in that node and you will be able to trigger the other node's parameter.
It is probably to avoid some cyclic issue…?
Add a new python node and put the set code in that node and you will be able to trigger the other node's parameter.
It is probably to avoid some cyclic issue…?
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
-
- Dean_19
- Member
- 322 posts
- Joined:
- Offline
The parameter triggers fine, I can turn the checkbox on and off via code but the callback associated with it won't execute.
I don't think its a cyclic thing as checking the checkbox from the python shell also has the same result, the checkbox gets checked, but the callback attached to the checkbox is not executed.
I don't think its a cyclic thing as checking the checkbox from the python shell also has the same result, the checkbox gets checked, but the callback attached to the checkbox is not executed.
-
- graham
- Member
- 1926 posts
- Joined: Nov. 2006
- Online
-
- Dean_19
- Member
- 322 posts
- Joined:
- Offline
-
- papsphilip
- Member
- 388 posts
- Joined: July 2018
- Offline
-
- Andr
- Member
- 899 posts
- Joined: Feb. 2016
- Offline
-
- papsphilip
- Member
- 388 posts
- Joined: July 2018
- Offline
-
- papsphilip
- Member
- 388 posts
- Joined: July 2018
- Offline
so after cooking i realised this method is actually not working.
After the python script in my original scene file i attach a rop geometry output and the python script runs for every workitem before that, so when the geometry output saves out my mesh the callback script is not being evaluated.
In order for the callback script to be called every time a workitem is saved to disk i had to write the same python script inside the Rop geometry output-->Scripts-->Pre-Render Script set to python.
This is working for now.
If anyone has a better idea please let me know
After the python script in my original scene file i attach a rop geometry output and the python script runs for every workitem before that, so when the geometry output saves out my mesh the callback script is not being evaluated.
In order for the callback script to be called every time a workitem is saved to disk i had to write the same python script inside the Rop geometry output-->Scripts-->Pre-Render Script set to python.
This is working for now.
If anyone has a better idea please let me know
Edited by papsphilip - Oct. 22, 2021 13:11:10
-
- Quick Links


