Difference between revisions of "IC Python API:Dialog Callbacks"

From Reallusion Wiki!
Jump to: navigation, search
m
m
Line 37: Line 37:
 
|}
 
|}
  
Notice that '''Hide''' always executes after a '''Close'''.  Therefore, you should always put your script variable clean-up procedure under the '''Hide''' event.  Under the condition that '''Hide''' event is never used, then your clean-up procedures can be housed under the '''Close''' event.
+
Notice that '''Hide''' always executes after a '''Close'''.  Therefore, you should always put your script variable clean-up procedures under the '''Hide''' event.  Under the condition that '''Hide''' event is never used, then your clean-up procedures can be housed under the '''Close''' event.
  
 
== Testing Dialog Callbacks ==
 
== Testing Dialog Callbacks ==

Revision as of 00:53, 25 September 2019

Main article: RL Python Samples.

This article will help you deeply understand the RDialogCallback class. Even though this class only supports three event types, their interactions and initiation can be complex. The following chart goes into more detail.

Action Calls Notes
Docking Hide -> Show
Undocking (Drag) Hide -> Show Show() command is ignored if the window is visible.
Undocking (Release) Hide -> Show
Closing Close -> Hide
Hide() command Hide Hide() command is ignored if the window is not shown.
Show() command Show
Close() command Close -> Hide Close() command can be executed even when the window is not show.

Notice that Hide always executes after a Close. Therefore, you should always put your script variable clean-up procedures under the Hide event. Under the condition that Hide event is never used, then your clean-up procedures can be housed under the Close event.

Testing Dialog Callbacks

You can use the following script to test and trigger the Dialog Callback events.