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

From Reallusion Wiki!
Jump to: navigation, search
m
m
 
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
== Detailed Description ==
+
{{last_modified}}
This class providing application related API.
+
<span style="background:#ffcccc">( Experimental Class )</span> <syntaxhighlight lang="Python">
+
# Get product name
+
product_name = RLPy.RApplication.GetProductName()
+
print(product_name)
+
  
# Get product version
+
== Description ==
product_version = RLPy.RApplication.GetProductVersion()
+
print(product_version)
+
  
if product_version < (8,0,0):
+
This class mainly provides information about the application, such as application version number, API version number, or related application paths.
  print("iClone 8 is still in development.")
+
  
# Get product major version
+
== Member Functions ==
product_major_version = RLPy.RApplication.GetProductMajorVersion()
+
print(product_major_version)
+
  
# Get product minor version
+
=== GetApiVersion ( self ) ===
product_minor_version = RLPy.RApplication.GetProductMinorVersion()
+
print(product_minor_version)
+
  
 +
Get API version.
 +
 +
==== Returns ====
 +
:API version(major, minor, subversion) - int tuple
 +
 +
<syntaxhighlight lang="Python">
 
# Get api version
 
# Get api version
 
api_version = RLPy.RApplication.GetApiVersion()
 
api_version = RLPy.RApplication.GetApiVersion()
 
print(api_version)
 
print(api_version)
 
 
if api_version < (2,0,0):
 
if api_version < (2,0,0):
print("API 2.0 is still in development.")
+
  print("API 2.0 is still in development.")
 +
</syntaxhighlight>
  
 +
=== GetApiMajorVersion ( self ) ===
 +
 +
Get API major version.
 +
 +
==== Returns ====
 +
:API major version - int
 +
 +
<syntaxhighlight lang="Python">
 
# Get api major version
 
# Get api major version
 
api_major_version = RLPy.RApplication.GetApiMajorVersion()
 
api_major_version = RLPy.RApplication.GetApiMajorVersion()
 
print(api_major_version)
 
print(api_major_version)
 +
</syntaxhighlight>
  
 +
=== GetApiMinorVersion ( self ) ===
 +
 +
Get API minor version.
 +
 +
==== Returns ====
 +
:API minor version - int
 +
 +
<syntaxhighlight lang="Python">
 
# Get api minor version
 
# Get api minor version
 
api_minor_version = RLPy.RApplication.GetApiMinorVersion()
 
api_minor_version = RLPy.RApplication.GetApiMinorVersion()
 
print(api_minor_version)
 
print(api_minor_version)
 +
</syntaxhighlight>
  
# Get program path
+
=== GetCustomDataPath ( self ) ===
program_path = RLPy.RApplication.GetProgramPath()
+
print(program_path)
+
  
# Get default project path
+
Get custom data folder path.
default_project_path = RLPy.RApplication.GetDefaultProjectPath()
+
print(default_project_path)
+
  
# Get template data path
+
==== Returns ====
template_data_path = RLPy.RApplication.GetTemplateDataPath()
+
:Custom data path - string
print(template_data_path)
+
  
 +
<syntaxhighlight lang="Python">
 
# Get custom data path
 
# Get custom data path
 
custom_data_path = RLPy.RApplication.GetCustomDataPath()
 
custom_data_path = RLPy.RApplication.GetCustomDataPath()
 
print(custom_data_path)
 
print(custom_data_path)
 +
</syntaxhighlight>
  
# Get shared template data path
+
=== GetDefaultProjectPath ( self ) ===
shared_template_data_path = RLPy.RApplication.GetSharedTemplateDataPath()
+
print(shared_template_data_path)
+
  
# Get shared custom data path
 
shared_custom_data_path = RLPy.RApplication.GetSharedCustomDataPath()
 
print(shared_custom_data_path)
 
</syntaxhighlight>
 
==Member Functions==
 
===GetApiMajorVersion===
 
<syntaxhighlight lang="Python">
 
RLPy.RApplication.GetApiMajorVersion ( )
 
</syntaxhighlight>
 
Get API major version.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Returns====
 
<div style="margin-left: 2em;">API major version - int
 
</div>
 
-----
 
===GetApiMinorVersion===
 
<syntaxhighlight lang="Python">
 
RLPy.RApplication.GetApiMinorVersion ( )
 
</syntaxhighlight>
 
Get API minor version.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Returns====
 
<div style="margin-left: 2em;">API minor version - int
 
</div>
 
-----
 
===GetApiVersion===
 
<syntaxhighlight lang="Python">
 
RLPy.RApplication.GetApiVersion ( )
 
</syntaxhighlight>
 
Get API version.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Returns====
 
<div style="margin-left: 2em;">API version(major, minor, subversion) - int
 
</div>
 
-----
 
===GetCustomDataPath===
 
<syntaxhighlight lang="Python">
 
RLPy.RApplication.GetCustomDataPath ( )
 
</syntaxhighlight>
 
Get custom data path.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Returns====
 
<div style="margin-left: 2em;">Custom data path - string
 
</div>
 
-----
 
===GetDefaultProjectPath===
 
<syntaxhighlight lang="Python">
 
RLPy.RApplication.GetDefaultProjectPath ( )
 
</syntaxhighlight>
 
 
Get default project path.
 
Get default project path.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Default project path - string
+
:Default project path - string
</div>
+
 
-----
+
===GetProductMajorVersion===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetProductMajorVersion ( )
+
# Get default project path
 +
default_project_path = RLPy.RApplication.GetDefaultProjectPath()
 +
print(default_project_path)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetProductMajorVersion ( self ) ===
 +
 
Get product major version.
 
Get product major version.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Product major version - int
+
:Product major version - int
</div>
+
 
-----
+
===GetProductMinorVersion===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetProductMinorVersion ( )
+
# Get product major version
 +
product_major_version = RLPy.RApplication.GetProductMajorVersion()
 +
print(product_major_version)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetProductMinorVersion ( self ) ===
 +
 
Get product minor version.
 
Get product minor version.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Product minor version - int
+
:Product minor version - int
</div>
+
 
-----
+
===GetProductName===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetProductName ( )
+
# Get product minor version
 +
product_minor_version = RLPy.RApplication.GetProductMinorVersion()
 +
print(product_minor_version)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetProductName ( self ) ===
 +
 
Get product name.
 
Get product name.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Product name - string
+
:Product name - string
</div>
+
 
-----
+
===GetProductVersion===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetProductVersion ( )
+
# Get product name
 +
product_name = RLPy.RApplication.GetProductName()
 +
print(product_name)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetProductVersion ( self ) ===
 +
 
Get product version.
 
Get product version.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Product version(major, minor, subversion) - int
+
:Product version (major, minor, subversion) - int tuple
</div>
+
 
-----
+
===GetProgramPath===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetProgramPath ( )
+
# Get product version
 +
product_version = RLPy.RApplication.GetProductVersion()
 +
print(product_version)
 +
if product_version < (8,0,0):
 +
  print("iClone 8 is still in development.")
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetProgramPath ( self ) ===
 +
 
Get program path.
 
Get program path.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Program path - string
+
:Program path - string
</div>
+
 
-----
+
===GetSharedCustomDataPath===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetSharedCustomDataPath ( )
+
# Get program path
 +
program_path = RLPy.RApplication.GetProgramPath()
 +
print(program_path)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetSharedCustomDataPath ( self ) ===
 +
 
Get shared custom data path.
 
Get shared custom data path.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Shared custom data path - string
+
:Shared custom data path - string
</div>
+
 
-----
+
===GetSharedTemplateDataPath===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetSharedTemplateDataPath ( )
+
# Get shared custom data path
 +
shared_custom_data_path = RLPy.RApplication.GetSharedCustomDataPath()
 +
print(shared_custom_data_path)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetSharedTemplateDataPath ( self ) ===
 +
 
Get shared template data path.
 
Get shared template data path.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Shared template data path - string
+
:Shared template data path - string
</div>
+
 
-----
+
===GetTemplateDataPath===
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
RLPy.RApplication.GetTemplateDataPath ( )
+
# Get shared template data path
 +
shared_template_data_path = RLPy.RApplication.GetSharedTemplateDataPath()
 +
print(shared_template_data_path)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== GetTemplateDataPath ( self ) ===
 +
 
Get template data path.
 
Get template data path.
<span style="background:#ffcccc">( Experimental API )</span>
+
 
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Template data path - string
+
:Template data path - string
</div>
+
 
 +
<syntaxhighlight lang="Python">
 +
# Get template data path
 +
template_data_path = RLPy.RApplication.GetTemplateDataPath()
 +
print(template_data_path)
 +
</syntaxhighlight>

Latest revision as of 21:36, 26 March 2020

Main article: Modules. Last modified: 03/26/2020

Description

This class mainly provides information about the application, such as application version number, API version number, or related application paths.

Member Functions

GetApiVersion ( self )

Get API version.

Returns

API version(major, minor, subversion) - int tuple
# Get api version
api_version = RLPy.RApplication.GetApiVersion()
print(api_version)
if api_version < (2,0,0):
   print("API 2.0 is still in development.")

GetApiMajorVersion ( self )

Get API major version.

Returns

API major version - int
# Get api major version
api_major_version = RLPy.RApplication.GetApiMajorVersion()
print(api_major_version)

GetApiMinorVersion ( self )

Get API minor version.

Returns

API minor version - int
# Get api minor version
api_minor_version = RLPy.RApplication.GetApiMinorVersion()
print(api_minor_version)

GetCustomDataPath ( self )

Get custom data folder path.

Returns

Custom data path - string
# Get custom data path
custom_data_path = RLPy.RApplication.GetCustomDataPath()
print(custom_data_path)

GetDefaultProjectPath ( self )

Get default project path.

Returns

Default project path - string
# Get default project path
default_project_path = RLPy.RApplication.GetDefaultProjectPath()
print(default_project_path)

GetProductMajorVersion ( self )

Get product major version.

Returns

Product major version - int
# Get product major version
product_major_version = RLPy.RApplication.GetProductMajorVersion()
print(product_major_version)

GetProductMinorVersion ( self )

Get product minor version.

Returns

Product minor version - int
# Get product minor version
product_minor_version = RLPy.RApplication.GetProductMinorVersion()
print(product_minor_version)

GetProductName ( self )

Get product name.

Returns

Product name - string
# Get product name
product_name = RLPy.RApplication.GetProductName()
print(product_name)

GetProductVersion ( self )

Get product version.

Returns

Product version (major, minor, subversion) - int tuple
# Get product version
product_version = RLPy.RApplication.GetProductVersion()
print(product_version)
if product_version < (8,0,0):
   print("iClone 8 is still in development.")

GetProgramPath ( self )

Get program path.

Returns

Program path - string
# Get program path
program_path = RLPy.RApplication.GetProgramPath()
print(program_path)

GetSharedCustomDataPath ( self )

Get shared custom data path.

Returns

Shared custom data path - string
# Get shared custom data path
shared_custom_data_path = RLPy.RApplication.GetSharedCustomDataPath()
print(shared_custom_data_path)

GetSharedTemplateDataPath ( self )

Get shared template data path.

Returns

Shared template data path - string
# Get shared template data path
shared_template_data_path = RLPy.RApplication.GetSharedTemplateDataPath()
print(shared_template_data_path)

GetTemplateDataPath ( self )

Get template data path.

Returns

Template data path - string
# Get template data path
template_data_path = RLPy.RApplication.GetTemplateDataPath()
print(template_data_path)