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

From Reallusion Wiki!
Jump to: navigation, search
m (Member Functions)
m (Member Functions)
Line 12: Line 12:
 
== Member Functions ==
 
== Member Functions ==
  
{|class = "wikitable"
+
{|class = "wikitable"|style = "width:100%"
 
!Function
 
!Function
 
!Syntax
 
!Syntax
Line 61: Line 61:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
|Get iClone related path locations.
 
|Get iClone related path locations.
Path locations is an enumeration:
 
 
<div class="toccolours mw-collapsible mw-collapsed">
 
<div class="toccolours mw-collapsible mw-collapsed">
Path type enumeration
+
Path locations is an enumeration:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
     RLPy.EPathType_Temp Temporary folder.
 
     RLPy.EPathType_Temp Temporary folder.

Revision as of 00:10, 25 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 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.

Path locations is an enumeration:

   RLPy.EPathType_Temp Temporary folder.
   RLPy.EPathType_TemplateContent Template content folder.
   RLPy.EPathType_CustomContent Custom content folder.
   RLPy.EPathType_ProgramDefault Program default folder.
   RLPy.EPathType_Morph Morph data folder.
   RLPy.EPathType_CreateFace CreateFace data folder.
   RLPy.EPathType_Puppet Puppet data folder.
   RLPy.EPathType_FacialLayer Facial layer data folder.
   RLPy.EPathType_ShareTemplateContent Shared template content folder.
   RLPy.EPathType_Thumb Thumbnail folder.
   RLPy.EPathType_Image Image folder.
   RLPy.EPathType_CreatorAssets Creator assets folder.
   RLPy.EPathType_Resource Resource folder.
   RLPy.EPathType_FacialSystem Facial system folder.
   RLPy.EPathType_CustomWidget Custom widget folder.
   RLPy.EPathType_iCloneAssets iClone assets folder.

Print out a few path locations.

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\