Python Handle - init vs onActivate concepts
609 3 0-
- coccarolla
- Member
- 175 posts
- Joined: 8月 2013
- オンライン
-
- mabelzile
- スタッフ
- 454 posts
- Joined: 2月 2018
- オフライン
__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
- 175 posts
- Joined: 8月 2013
- オンライン
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?
-
- mabelzile
- スタッフ
- 454 posts
- Joined: 2月 2018
- オフライン
-
- Quick Links

