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

From Reallusion Wiki!
Jump to: navigation, search
m
m (Undo revision 4396 by Chuck (RL) (talk))
Line 1: Line 1:
{|class="wikitable"
+
{{TOC}}
!scope="row"|Avatar
+
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
|iavatar||iacc||ihair||iupper||ilower||ishoe||iglove||iskin||icloth||iteeth||aml || || || ||
+
== Detailed Description ==
|-
+
This class provides I/O operations on the scene files.
!scope="row"|Head
+
<syntaxhighlight lang="Python">
|iface||ieye||ioral||rlhead|| || || || || || || || || || ||
+
# load project file
|-
+
file_path = "c:/myProject.iProject"
!scope="row"|Props
+
RLPy.RFileIO.LoadFile(file_path)
|iprop||itree||igrass||iparticle||ipkfx||iTerrain||iwater||isky|| || || || || || ||
+
 
|-
+
# load object
!scope="row"|Animation
+
object = RLPy.RFileIO.LoadObject("C:/CC_Standard_Neutral.iavatar")
|imotion||imotionplus||rlmotion||ihand||italk||rltalk||ipath|| || || || || || || ||
+
print(type(object)) #RLPy.RIAvatar
|-
+
 
!scope="row"|Scene
+
object = RLPy.RFileIO.LoadObject("C:/Arc_001.iProp")
|iimglayer||iscene||iatm||ifog||icam||ilight||ieffect||imtl||imtlplus||sbsar||itol||iscript||lua||cclightroom||isubstance
+
print(type(object)) #RLPy.RIProp
|-
+
</syntaxhighlight>
!scope="row"|Image
+
==Member Functions==
|jpg||jpeg||bmp||gif||png||hdr||exr||tga||Audio||mp3||wma||m4a||aac||wav ||
+
===LoadAlembicFile===
|-
+
<syntaxhighlight lang="Python">
!scope="row"|Video
+
RLPy.RFileIO.LoadAlembicFile ( spObject, strFilePath, eUpAxis )
|avi||mv||mpeg||mpg||mpe||mp4||mkv||rm||rmvb||asf||asx||wm||mov||flv ||
+
</syntaxhighlight>
|-
+
Import the alembic file from the given file into the current scene.
!scope="row"|iSprite
+
====Parameters====
|popvideo||iwidget || || || || || || || || || || || || ||
+
<div style="margin-left: 2em;">
|-
+
 
!scope="row"|Physics Constraint
+
'''spObject''' [IN] target object - RLPy.RIObject
|iconstraint || || || || || || || || || || || || || ||
+
 
|-
+
'''strFilePath''' [IN] file path - string
!scope="row"|Advertise thumbnail
+
 
|rladv || || || || || || || || || || || || || ||
+
'''eUpAxis''' [IN] coordinate axis - RLPy.ECoordinateAxis
|-
+
*'''RLPy.ECoordinateAxis_X'''
!scope="row"|Model
+
*'''RLPy.ECoordinateAxis_NegativeX'''
|abc||obj||fbx || || || || || || || || || || || ||
+
*'''RLPy.ECoordinateAxis_Y'''
|}
+
*'''RLPy.ECoordinateAxis_NegativeY'''
 +
*'''RLPy.ECoordinateAxis_Z'''
 +
*'''RLPy.ECoordinateAxis_NegativeZ'''
 +
</div>
 +
====Return Values====
 +
<div style="margin-left: 2em;">
 +
 
 +
'''RLPy.RStatus.Success''' Success
 +
 
 +
'''RLPy.RStatus.Failure''' Fail
 +
</div>
 +
-----
 +
===LoadFile===
 +
<syntaxhighlight lang="Python">
 +
RLPy.RFileIO.LoadFile ( strFilePath )
 +
</syntaxhighlight>
 +
Import the scene elements from the given file into the current scene.
 +
Current supported file types: All iClone supported file format.
 +
====Parameters====
 +
<div style="margin-left: 2em;">
 +
 
 +
'''strFilePath''' [IN] file path - string
 +
</div>
 +
====Return Values====
 +
<div style="margin-left: 2em;">
 +
 
 +
'''RLPy.RStatus.Success''' Success
 +
 
 +
'''RLPy.RStatus.Failure''' Fail
 +
</div>
 +
-----
 +
===LoadObject===
 +
<syntaxhighlight lang="Python">
 +
RLPy.RFileIO.LoadObject ( strFilePath )
 +
</syntaxhighlight>
 +
Import the scene elements from the given file into the current scene.
 +
Current supported file types: Only the file type of the object. <span style="background:#ffcccc">( Experimental API )</span>
 +
====Parameters====
 +
<div style="margin-left: 2em;">
 +
 
 +
'''strFilePath''' [IN] file path - string
 +
</div>
 +
====Return Values====
 +
<div style="margin-left: 2em;">
 +
 
 +
'''RIObjectPtr''' The requested object returned as a Type.
 +
</div>

Revision as of 02:39, 23 March 2020

Main article: Modules.

Detailed Description

This class provides I/O operations on the scene files.

# load project file
file_path = "c:/myProject.iProject"
RLPy.RFileIO.LoadFile(file_path)

# load object
object = RLPy.RFileIO.LoadObject("C:/CC_Standard_Neutral.iavatar")
print(type(object)) #RLPy.RIAvatar

object = RLPy.RFileIO.LoadObject("C:/Arc_001.iProp")
print(type(object)) #RLPy.RIProp

Member Functions

LoadAlembicFile

RLPy.RFileIO.LoadAlembicFile ( spObject, strFilePath, eUpAxis )

Import the alembic file from the given file into the current scene.

Parameters

spObject [IN] target object - RLPy.RIObject

strFilePath [IN] file path - string

eUpAxis [IN] coordinate axis - RLPy.ECoordinateAxis

  • RLPy.ECoordinateAxis_X
  • RLPy.ECoordinateAxis_NegativeX
  • RLPy.ECoordinateAxis_Y
  • RLPy.ECoordinateAxis_NegativeY
  • RLPy.ECoordinateAxis_Z
  • RLPy.ECoordinateAxis_NegativeZ

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail


LoadFile

RLPy.RFileIO.LoadFile ( strFilePath )

Import the scene elements from the given file into the current scene. Current supported file types: All iClone supported file format.

Parameters

strFilePath [IN] file path - string

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail


LoadObject

RLPy.RFileIO.LoadObject ( strFilePath )

Import the scene elements from the given file into the current scene. Current supported file types: Only the file type of the object. ( Experimental API )

Parameters

strFilePath [IN] file path - string

Return Values

RIObjectPtr The requested object returned as a Type.