Difference between revisions of "IC Python API:RLPy RGlobal"
From Reallusion Wiki!
Chuck (RL) (Talk | contribs) m (→Member Functions) |
Chuck (RL) (Talk | contribs) m (→Member Functions) |
||
Line 18: | Line 18: | ||
!Examples | !Examples | ||
|- | |- | ||
− | + | !GetProjectLength | |
|<syntaxhighlight lang="Python"> | |<syntaxhighlight lang="Python"> | ||
def RLPy.RGlobal.GetProjectLength() | def RLPy.RGlobal.GetProjectLength() | ||
Line 38: | Line 38: | ||
</div> | </div> | ||
|- | |- | ||
− | + | !GetFps | |
|<syntaxhighlight lang="Python"> | |<syntaxhighlight lang="Python"> | ||
def RLPy.RGlobal.GetFps() | def RLPy.RGlobal.GetFps() | ||
Line 56: | Line 56: | ||
</div> | </div> | ||
|- | |- | ||
− | + | !GetPath | |
|<syntaxhighlight lang="Python"> | |<syntaxhighlight lang="Python"> | ||
def RLPy.RGlobal.GetPath(ePath, strPath) | def RLPy.RGlobal.GetPath(ePath, strPath) |
Revision as of 00:27, 25 January 2019
Contents
- 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 length of the project in milliseconds. | 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())
|
GetFps | def RLPy.RGlobal.GetFps()
|
Get frames per second. | Get the project frames per second. import RLPy
# Get frames per second
print(RLPy.RGlobal.GetFps())
#60
|
GetPath | def RLPy.RGlobal.GetPath(ePath, strPath)
|
Get iClone related path locations using the following enumeration (ePath):
|
Print out a few path locations (Individual path locations may vary). import RLPy
temp = ""
ret_list = RLPy.RGlobal.GetPath(RLPy.EPathType_Temp, temp)
print("Temp folder: "+ret_list[1])
# Temp folder: C:\Users\User_Name\AppData\Local\Temp\iClone7Temp\iClone7Temp\
ret_list = RLPy.RGlobal.GetPath(RLPy.EPathType_TemplateContent, temp)
print("Template content folder: "+ret_list[1])
# Template content folder: C:\Users\Public\Documents\Reallusion\Template\iClone 7 Template
ret_list = RLPy.RGlobal.GetPath(RLPy.EPathType_CustomContent, temp)
print("Custom content folder: "+ret_list[1])
# Custom content folder: C:\Users\Public\Documents\Reallusion\Custom\iClone 7 Custom
ret_list = RLPy.RGlobal.GetPath(RLPy.EPathType_ProgramDefault, temp)
print("Program default folder: "+ret_list[1])
# Program default folder: C:\Program Files\Reallusion\iClone 7\Program\Default\
|