Difference between revisions of "IC Python API:RLPy RApplication"
From Reallusion Wiki!
Chuck (RL) (Talk | contribs) (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...") |
Chuck (RL) (Talk | contribs) 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}} | ||
− | + | {{last_modified}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | == 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 | ||
+ | <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> | ||
− | + | === GetCustomDataPath ( self ) === | |
− | + | ||
− | + | ||
− | + | Get custom data folder path. | |
− | + | ||
− | + | ||
− | + | ==== Returns ==== | |
− | + | :Custom data path - string | |
− | + | ||
+ | <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> | ||
− | + | === GetDefaultProjectPath ( self ) === | |
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Get default project path. | Get default project path. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Default project path - string | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get default project path | |
− | <syntaxhighlight lang=" | + | default_project_path = RLPy.RApplication.GetDefaultProjectPath() |
− | RLPy.RApplication. | + | print(default_project_path) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetProductMajorVersion ( self ) === | ||
+ | |||
Get product major version. | Get product major version. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Product major version - int | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get product major version | |
− | <syntaxhighlight lang=" | + | product_major_version = RLPy.RApplication.GetProductMajorVersion() |
− | RLPy.RApplication. | + | print(product_major_version) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetProductMinorVersion ( self ) === | ||
+ | |||
Get product minor version. | Get product minor version. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Product minor version - int | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get product minor version | |
− | <syntaxhighlight lang=" | + | product_minor_version = RLPy.RApplication.GetProductMinorVersion() |
− | RLPy.RApplication. | + | print(product_minor_version) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetProductName ( self ) === | ||
+ | |||
Get product name. | Get product name. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Product name - string | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get product name | |
− | <syntaxhighlight lang=" | + | product_name = RLPy.RApplication.GetProductName() |
− | RLPy.RApplication. | + | print(product_name) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetProductVersion ( self ) === | ||
+ | |||
Get product version. | Get product version. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Product version (major, minor, subversion) - int tuple | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get product version | |
− | <syntaxhighlight lang=" | + | product_version = RLPy.RApplication.GetProductVersion() |
− | RLPy.RApplication. | + | 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. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Program path - string | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get program path | |
− | <syntaxhighlight lang=" | + | program_path = RLPy.RApplication.GetProgramPath() |
− | RLPy.RApplication. | + | print(program_path) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetSharedCustomDataPath ( self ) === | ||
+ | |||
Get shared custom data path. | Get shared custom data path. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Shared custom data path - string | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get shared custom data path | |
− | <syntaxhighlight lang=" | + | shared_custom_data_path = RLPy.RApplication.GetSharedCustomDataPath() |
− | RLPy.RApplication. | + | print(shared_custom_data_path) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetSharedTemplateDataPath ( self ) === | ||
+ | |||
Get shared template data path. | Get shared template data path. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | + | :Shared template data path - string | |
− | + | ||
− | + | <syntaxhighlight lang="python" line='line'> | |
− | + | # Get shared template data path | |
− | <syntaxhighlight lang=" | + | shared_template_data_path = RLPy.RApplication.GetSharedTemplateDataPath() |
− | RLPy.RApplication. | + | print(shared_template_data_path) |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === GetTemplateDataPath ( self ) === | ||
+ | |||
Get template data path. | Get template data path. | ||
− | + | ||
− | ====Returns==== | + | ==== Returns ==== |
− | < | + | :Template data path - string |
− | </ | + | |
+ | <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
Contents
- 1 Description
- 2 Member Functions
- 2.1 GetApiVersion ( self )
- 2.2 GetApiMajorVersion ( self )
- 2.3 GetApiMinorVersion ( self )
- 2.4 GetCustomDataPath ( self )
- 2.5 GetDefaultProjectPath ( self )
- 2.6 GetProductMajorVersion ( self )
- 2.7 GetProductMinorVersion ( self )
- 2.8 GetProductName ( self )
- 2.9 GetProductVersion ( self )
- 2.10 GetProgramPath ( self )
- 2.11 GetSharedCustomDataPath ( self )
- 2.12 GetSharedTemplateDataPath ( self )
- 2.13 GetTemplateDataPath ( self )
- 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)
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)
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)