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

From Reallusion Wiki!
Jump to: navigation, search
(Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} == Detailed Description == This class providing application related API. <span style="background:#ffcccc">( Experime...")
 
m
 
(5 intermediate revisions by 2 users not shown)
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, sub-version) - int tuple
  
 +
<syntaxhighlight lang="python" line='line'>
 
# 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" line='line'>
 
# 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" line='line'>
 
# 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" line='line'>
 
# 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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetProductMajorVersion===
+
# Get default project path
<syntaxhighlight lang="Python">
+
default_project_path = RLPy.RApplication.GetDefaultProjectPath()
RLPy.RApplication.GetProductMajorVersion ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetProductMinorVersion===
+
# Get product major version
<syntaxhighlight lang="Python">
+
product_major_version = RLPy.RApplication.GetProductMajorVersion()
RLPy.RApplication.GetProductMinorVersion ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetProductName===
+
# Get product minor version
<syntaxhighlight lang="Python">
+
product_minor_version = RLPy.RApplication.GetProductMinorVersion()
RLPy.RApplication.GetProductName ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetProductVersion===
+
# Get product name
<syntaxhighlight lang="Python">
+
product_name = RLPy.RApplication.GetProductName()
RLPy.RApplication.GetProductVersion ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetProgramPath===
+
# Get product version
<syntaxhighlight lang="Python">
+
product_version = RLPy.RApplication.GetProductVersion()
RLPy.RApplication.GetProgramPath ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetSharedCustomDataPath===
+
# Get program path
<syntaxhighlight lang="Python">
+
program_path = RLPy.RApplication.GetProgramPath()
RLPy.RApplication.GetSharedCustomDataPath ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetSharedTemplateDataPath===
+
# Get shared custom data path
<syntaxhighlight lang="Python">
+
shared_custom_data_path = RLPy.RApplication.GetSharedCustomDataPath()
RLPy.RApplication.GetSharedTemplateDataPath ( )
+
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>
+
 
-----
+
<syntaxhighlight lang="python" line='line'>
===GetTemplateDataPath===
+
# Get shared template data path
<syntaxhighlight lang="Python">
+
shared_template_data_path = RLPy.RApplication.GetSharedTemplateDataPath()
RLPy.RApplication.GetTemplateDataPath ( )
+
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" line='line'>
 +
# Get template data path
 +
template_data_path = RLPy.RApplication.GetTemplateDataPath()
 +
print(template_data_path)
 +
</syntaxhighlight>

Latest revision as of 23:21, 13 April 2020

Main article: Modules.
Last modified: 04/13/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, sub-version) - int tuple
1 # Get api version
2 api_version = RLPy.RApplication.GetApiVersion()
3 print(api_version)
4 if api_version < (2,0,0):
5    print("API 2.0 is still in development.")

GetApiMajorVersion ( self )

Get API major version.

Returns

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

GetApiMinorVersion ( self )

Get API minor version.

Returns

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

GetCustomDataPath ( self )

Get custom data folder path.

Returns

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

GetDefaultProjectPath ( self )

Get default project path.

Returns

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

GetProductMajorVersion ( self )

Get product major version.

Returns

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

GetProductMinorVersion ( self )

Get product minor version.

Returns

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

GetProductName ( self )

Get product name.

Returns

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

GetProductVersion ( self )

Get product version.

Returns

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

GetProgramPath ( self )

Get program path.

Returns

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

GetSharedCustomDataPath ( self )

Get shared custom data path.

Returns

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

GetSharedTemplateDataPath ( self )

Get shared template data path.

Returns

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

GetTemplateDataPath ( self )

Get template data path.

Returns

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