Difference between revisions of "IC Python API:RLPy RFileIO"
Chuck (RL) (Talk | contribs) m |
Chuck (RL) (Talk | contribs) m (Undo revision 4396 by Chuck (RL) (talk)) |
||
Line 1: | Line 1: | ||
− | {|class=" | + | {{TOC}} |
− | + | {{Parent|IC_Python_API:RL_Python_Modules|Modules}} | |
− | + | == Detailed Description == | |
− | + | This class provides I/O operations on the scene files. | |
− | + | <syntaxhighlight lang="Python"> | |
− | + | # 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 | |
− | + | </syntaxhighlight> | |
− | + | ==Member Functions== | |
− | + | ===LoadAlembicFile=== | |
− | + | <syntaxhighlight lang="Python"> | |
− | + | RLPy.RFileIO.LoadAlembicFile ( spObject, strFilePath, eUpAxis ) | |
− | + | </syntaxhighlight> | |
− | + | Import the alembic file from the given file into the current scene. | |
− | + | ====Parameters==== | |
− | + | <div style="margin-left: 2em;"> | |
− | + | ||
− | + | '''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''' | ||
+ | </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 01: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.