Hi guys
I have a python SOP with a few things on it,
all those things are different functions that I want to
trigger with buttons, so how do I do it?
I know that in a regular HDA I use hou.phm().hello() for example
but for the Python SOP that doesn't work cause the code is NOT in the
same place.
see the image as an example
clicking the button will run hello() function
THanks
Run Function from PYTHON SOP
9454 6 2-
- varomix
- Member
- 460 posts
- Joined: July 2005
- Offline
-
- graham
- Member
- 1925 posts
- Joined: Nov. 2006
- Offline
-
- varomix
- Member
- 460 posts
- Joined: July 2005
- Offline
-
- jason_iversen
- Member
- 12799 posts
- Joined: July 2005
- Online
If you have a parameter-less node like this, then your Cook button can simple force a cook of the node (eg. opcook -F .) and it'll execute the entire Python code section. I assume you are making a no-input “generator” type SOP. Any parameters you create on the node will also trigger a cook of the node.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
-
- varomix
- Member
- 460 posts
- Joined: July 2005
- Offline
-
- edward
- Member
- 7969 posts
- Joined: July 2005
- Online
-
- kuba
- Member
- 345 posts
- Joined:
- Offline
I have nothing to add, just second all above. Code section is not going to work with the buttons since it is cooked every time. I'm not exactly sure what you heading for but perhaps what you want to do is to split Code section into several separate python sops embedded inside parent HDA with all the ‘trigger’ functions…
-
- Quick Links