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

From Reallusion Wiki!
Jump to: navigation, search
m
m
Line 14: Line 14:
 
|Undocking (Drag)
 
|Undocking (Drag)
 
|Hide -> Show
 
|Hide -> Show
|
+
|Show() command is ignored if the window is visible.
 
|-
 
|-
 
|Undocking (Release)
 
|Undocking (Release)

Revision as of 23:48, 24 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 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.

Testing Dialog Callbacks

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