Difference between revisions of "IC Python API:RLPy RGlobal"

From Reallusion Wiki!
Jump to: navigation, search
m (Description)
m (Member Functions)
Line 24: Line 24:
 
|Get the address of the dialog window.
 
|Get the address of the dialog window.
 
|<div class="toccolours mw-collapsible mw-collapsed">
 
|<div class="toccolours mw-collapsible mw-collapsed">
The following example fetches the current frame time in milliseconds:
+
Fetch the current frame time in milliseconds:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
Line 44: Line 44:
 
|Retrieve the name of the dialog window.
 
|Retrieve the name of the dialog window.
 
|<div class="toccolours mw-collapsible mw-collapsed">
 
|<div class="toccolours mw-collapsible mw-collapsed">
The following example creates a dialog window and sets its title:
+
Create a dialog window and set its title:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">

Revision as of 20:27, 17 January 2019

Main article: System Module.

Class in RLPy / Inherits from: _object

Description

This class provides many of the common API global functions.

Member Functions

Function Syntax Description Examples
GetWindow
def RLPy.RTime.GetWindow(self)
Get the address of the dialog window.

Fetch the current frame time in milliseconds:

import RLPy

# Put the current frame time into a variable.
time = RLPy.RGlobal.GetTime()

# Return the current frame time in milliseconds.
print(time.GetValue())
GetTitle(self)
def RLPy.RTime.GetTitle(self)
Retrieve the name of the dialog window.

Create a dialog window and set its title:

import RLPy

rl_dialog = RLPy.RUi.CreateRDialog()
print(rl_dialog.GetWindowTitle())
rl_dialog.SetWindowTitle("main_dialog")
print(rl_dialog.GetWindowTitle())       

# DefaultWidget
# main_dialog