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

From Reallusion Wiki!
Jump to: navigation, search
m (Member Functions)
m (Member Functions)
Line 18: Line 18:
 
!Examples
 
!Examples
 
|-
 
|-
|GetWindow
+
|GetProjectLength
 
|<syntaxhighlight lang="Python">
 
|<syntaxhighlight lang="Python">
def RLPy.RTime.GetWindow(self)
+
def RLPy.RGlobal.GetProjectLength()
 
</syntaxhighlight>
 
</syntaxhighlight>
 
|Get the address of the dialog window.
 
|Get the address of the dialog window.
Line 34: Line 34:
 
# Return the current frame time in milliseconds.
 
# Return the current frame time in milliseconds.
 
print(time.GetValue())
 
print(time.GetValue())
</syntaxhighlight>
 
</div>
 
</div>
 
|-
 
|GetTitle(self)
 
|<syntaxhighlight lang="Python">
 
def RLPy.RTime.GetTitle(self)
 
</syntaxhighlight>
 
|Retrieve the name of the dialog window.
 
|<div class="toccolours mw-collapsible mw-collapsed">
 
Create a dialog window and set its title:
 
<div class="mw-collapsible-content">
 
<syntaxhighlight lang="Python">
 
import RLPy
 
 
rl_dialog = RLPy.RUi.CreateRDialog()
 
print(rl_dialog.GetWindowTitle())
 
rl_dialog.SetWindowTitle("main_dialog")
 
print(rl_dialog.GetWindowTitle())     
 
 
# DefaultWidget
 
# main_dialog
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</div>
 
</div>
 
</div>
 
</div>
 
|}
 
|}

Revision as of 01:47, 19 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
GetProjectLength
def RLPy.RGlobal.GetProjectLength()
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())