Python Handle - init vs onActivate concepts
308 2 0-
- coccarolla
- Member
- 153 posts
- Joined: Aug. 2013
- Offline
-
- mabelzile
- Staff
- 452 posts
- Joined: Feb. 2018
- Offline
__init__() is the Python handle constructor and is called when the state is entered and the handle is created.
onActivate() is called by Houdini to initialize an existing handle, either when the state is first entered or when it is resumed.
When the state exits, onDeactivate() is called and the handle is deleted. The next time the state is entered, a new handle is created and onActivate() is called again.
Interrupting a state does not delete the handle, but still triggers onDeactivate().
onActivate() is called by Houdini to initialize an existing handle, either when the state is first entered or when it is resumed.
When the state exits, onDeactivate() is called and the handle is deleted. The next time the state is entered, a new handle is created and onActivate() is called again.
Interrupting a state does not delete the handle, but still triggers onDeactivate().
-
- coccarolla
- Member
- 153 posts
- Joined: Aug. 2013
- Offline
mabelzile
__init__() is the Python handle constructor and is called when the state is entered and the handle is created.
onActivate() is called by Houdini to initialize an existing handle, either when the state is first entered or when it is resumed.
When the state exits, onDeactivate() is called and the handle is deleted. The next time the state is entered, a new handle is created and onActivate() is called again.
Interrupting a state does not delete the handle, but still triggers onDeactivate().
Great, things are starting to make sense.
Can you share a bit of insight on how to use onDeactivate specifically? Do you need to call something to delete the handle or is that handled by Houdini on exiting the viewer state? I know about registering, is that the same?
-
- Quick Links

