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

From Reallusion Wiki!
Jump to: navigation, search
m
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{TOC}}
 +
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 +
{{last_modified}}
 +
 +
==  Description ==
 +
 +
This class has file load and save capabilities.  Currently, you can load iClone related files, objects, Alembic files, and output FBX files.
 +
 +
Alembic is an interchangeable computer graphics file format developed by Sony Pictures Imageworks and Industrial Light & Magic. Its primary focus is the interchange of geometry (models) between different groups working on the same shots or same assets. In layman's terms, Alembic is an open-source 3D model exchange format that can save animations baked into the geometry.
 +
 +
=== Supported Files Types ===
 +
 +
iClone can load the following file formats using [[#LoadFile ( self, strFilePath )|LoadFile]] (highlights in yellow also support [[#LoadObject ( self, strFilePath )|LoadObject]]):
 +
 
{|class="wikitable"
 
{|class="wikitable"
!scope="row"|Avatar
+
!scope="row" rowspan="2"|Avatar
|iavatar||iacc||ihair||iupper||ilower||ishoe||iglove||iskin||icloth||iteeth||aml || || || ||
+
|style="background-color:yellow;"|iavatar
 +
|style="background-color:yellow;"|iacc||ihair||iupper||ilower||ishoe||iglove||iskin
 +
|-
 +
|icloth||iteeth||aml || || || || ||
 
|-
 
|-
 
!scope="row"|Head
 
!scope="row"|Head
|iface||ieye||ioral||rlhead|| || || || || || || || || || ||
+
|iface||ieye||ioral||rlhead|| || || ||
 
|-
 
|-
 
!scope="row"|Props
 
!scope="row"|Props
|iprop||itree||igrass||iparticle||ipkfx||iTerrain||iwater||isky|| || || || || || ||
+
|style="background-color:yellow;"|iprop||itree||igrass|
 +
|style="background-color:yellow;"|iparticle
 +
|style="background-color:yellow;"|ipkfx||iTerrain||iwater||isky
 
|-
 
|-
 
!scope="row"|Animation
 
!scope="row"|Animation
|imotion||imotionplus||rlmotion||ihand||italk||rltalk||ipath|| || || || || || || ||
+
|imotion||imotionplus||rlmotion||ihand||italk||rltalk||ipath||
 +
|-
 +
!scope="row" rowspan="2"|Scene
 +
|style="background-color:yellow;"|iimglayer||iscene||iatm||ifog
 +
|style="background-color:yellow;"|icam
 +
|style="background-color:yellow;"|ilight||ieffect||imtl
 +
|-
 +
|imtlplus||isubstance||sbsar||itol||iscript||lua||cclightroom||
 +
|-
 +
!scope="row" rowspan="2"|Image
 +
|jpg||jpeg||bmp||gif||png||hdr||exr||tga
 
|-
 
|-
!scope="row"|Scene
+
|Audio||mp3||wma||m4a||aac||wav || ||
|iimglayer||iscene||iatm||ifog||icam||ilight||ieffect||imtl||imtlplus||sbsar||itol||iscript||lua||cclightroom||isubstance
+
 
|-
 
|-
!scope="row"|Image
+
!scope="row" rowspan="2"|Video
|jpg||jpeg||bmp||gif||png||hdr||exr||tga||Audio||mp3||wma||m4a||aac||wav ||
+
|avi||mv||mpeg||mpg||mpe||mp4||mkv||rm
 
|-
 
|-
!scope="row"|Video
+
|rmvb||asf||asx||wm||mov||flv || ||
|avi||mv||mpeg||mpg||mpe||mp4||mkv||rm||rmvb||asf||asx||wm||mov||flv ||
+
 
|-
 
|-
 
!scope="row"|iSprite
 
!scope="row"|iSprite
|popvideo||iwidget || || || || || || || || || || || || ||
+
|popvideo||iwidget || || || || || ||
 
|-
 
|-
 
!scope="row"|Physics Constraint
 
!scope="row"|Physics Constraint
|iconstraint || || || || || || || || || || || || || ||
+
|iconstraint || || || || || || ||
 
|-
 
|-
!scope="row"|Advertise thumbnail
+
!scope="row"|Advertise Thumbnail
|rladv || || || || || || || || || || || || || ||
+
|style="width:80px"|rladv ||style="width:80px"| ||style="width:80px"| ||style="width:80px"|  
 +
|style="width:80px"| ||style="width:80px"| ||style="width:80px"| ||style="width:80px"|
 
|-
 
|-
 
!scope="row"|Model
 
!scope="row"|Model
|abc||obj||fbx || || || || || || || || || || || ||
+
|abc||obj||fbx || || || || ||
 
|}
 
|}
 +
 +
== Member Functions ==
 +
 +
=== LoadAlembic( self, spObject, strFilePath, eUpAxis ) ===
 +
 +
Load related Alembic file to the selected object in the current scene.  If loaded successfully return '''RStatus.Success''', else '''RStatus.Failure'''.
 +
 +
==== Parameters ====
 +
:'''spObject''' [IN] target object - [[IC_Python_API:RLPy_RIObject|RIObject]]
 +
:'''strFilePath''' [IN] file path - string
 +
:'''eUpAxis''' [IN] up axis - RLPy.ECoordinateAxis
 +
:*RLPy.ECoordinateAxis_X
 +
:*RLPy.ECoordinateAxis_NegativeX
 +
:*RLPy.ECoordinateAxis_Y
 +
:*RLPy.ECoordinateAxis_NegativeY
 +
:*RLPy.ECoordinateAxis_Z
 +
:*RLPy.ECoordinateAxis_NegativeZ
 +
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 +
<syntaxhighlight lang="python" line='line'>
 +
#load AlembicFile
 +
file_path = "C:/test.abc"
 +
selection_list = RLPy.RScene.GetSelectedObjects()
 +
result = RLPy.RFileIO.LoadAlembicFile(selection_list[0], file_path, RLPy.ECoordinateAxis_Y)
 +
</syntaxhighlight>
 +
 +
=== LoadFile ( self, strFilePath ) ===
 +
 +
Load a file from a specified path into the current scene.  If the file loaded successfully then return '''RStatus.Success''', else '''RStatus.Failure'''.  Supports every iClone file format.
 +
 +
See Also: [[#Supported Files Types|Supported Files Types]]
 +
 +
==== Parameters ====
 +
:'''strFilePath''' [IN] file path - string
 +
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 +
<syntaxhighlight lang="python" line='line'>
 +
# load project file
 +
file_path = "c:/myProject.iProject"
 +
result = RLPy.RFileIO.LoadFile(file_path)
 +
</syntaxhighlight>
 +
 +
=== LoadObject ( self, strFilePath ) ===
 +
 +
Load an object from a specified path into the current scene. If the file loaded successfully then return '''RStatus.Success''', else '''RStatus.Failure'''.  This function only supports objects that inherit from [[IC_Python_API:RLPy_RIObject|RIObject]]: [[IC_Python_API:RLPy_RIAvatar|RIAvatar]], [[IC_Python_API:RLPy_RICamera|RICamera]], [[IC_Python_API:RLPy_RILight|RILight]], [[IC_Python_API:RLPy_RIParticle|RIParticle]], [[IC_Python_API:RLPy_RIProp|RIProp]].
 +
 +
==== Parameters ====
 +
:'''strFilePath''' [IN] file path - string
 +
 +
==== Returns ====
 +
:The loaded object - [[IC_Python_API:RLPy_RIObject|RIObject]]
 +
 +
<syntaxhighlight lang="python" line='line'>
 +
# 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>
 +
 +
=== ExportFbxFile ( self, spObject, strFilePath, eOptions, eOptions2, eOptions3, eTextureSize, eFormat, strIncludeMotionPath ) ===
 +
 +
Export an object in the scene to a FBX file;  Allows for different export settings.  If you would like to include animation data with the FBX file, then you can set a path to the animation file.
 +
 +
==== Parameters ====
 +
:'''spObject''' [IN] target object - [[IC_Python_API:RLPy_RIObject|RIObject]]
 +
:'''strFilePath''' [IN] file path - string
 +
:'''eOptions''' [IN] Export options (Enum Flags) - RLPy.EExportFbxOptions
 +
:*RLPy.EExportFbxOptions__None
 +
:*RLPy.EExportFbxOptions_FbxKey
 +
:*RLPy.EExportFbxOptions_LightWaveYUp
 +
:*RLPy.EExportFbxOptions_LightWaveReferenceBone
 +
:*RLPy.EExportFbxOptions_AutoSkinRigidMesh
 +
:*RLPy.EExportFbxOptions_AutoSkinRigidMeshWithDifferentBoneName
 +
:*RLPy.EExportFbxOptions_SaveHideMeshStateInOneSelectionSet
 +
:*RLPy.EExportFbxOptions_ForceTrangleExport
 +
:*RLPy.EExportFbxOptions_ExportMotion30SecOnly
 +
:*RLPy.EExportFbxOptions_TPoseOnMotionFirstFrame
 +
:*RLPy.EExportFbxOptions_FirstMotionNotOffset
 +
:*RLPy.EExportFbxOptions_ExportRootMotion
 +
:*RLPy.EExportFbxOptions_ZeroMotionRoot
 +
:*RLPy.EExportFbxOptions_RemoveAllUnused
 +
:*RLPy.EExportFbxOptions_RemoveBoneRoot
 +
:*RLPy.EExportFbxOptions_RemoveHiddenMesh
 +
:*RLPy.EExportFbxOptions_RemoveUnusedMorph
 +
:*RLPy.EExportFbxOptions_RemoveEyelash
 +
:*RLPy.EExportFbxOptions_RemoveAllMesh
 +
:*RLPy.EExportFbxOptions_RemoveAllMeshKeepMorph
 +
:*RLPy.EExportFbxOptions_EmbedTexture
 +
:*RLPy.EExportFbxOptions_ExportPbrTextureAsImageInDiffuseLayer
 +
:*RLPy.EExportFbxOptions_ExportPbrTextureAsImageInOneDirectory
 +
:*RLPy.EExportFbxOptions_ExportPbrTextureAsImageInFormatDirectory
 +
:*RLPy.EExportFbxOptions_ExportPbrTextureAsSbsar
 +
:*RLPy.EExportFbxOptions_ExportMetallicAlpha
 +
:*RLPy.EExportFbxOptions_InverseNormalY
 +
:*RLPy.EExportFbxOptions_InverseOpacity
 +
:*RLPy.EExportFbxOptions_MergeDiffuseOpacityMap
 +
:*RLPy.EExportFbxOptions_MayaAdjustMaterial
 +
:*RLPy.EExportFbxOptions_ConvertTifToPNG
 +
:'''eOptions2''' [IN] Export options (Enum Flags) - RLPy.EExportFbxOptions2
 +
:*RLPy.EExportFbxOptions2__None
 +
:*RLPy.EExportFbxOptions2_XUp
 +
:*RLPy.EExportFbxOptions2_YUp
 +
:*RLPy.EExportFbxOptions2_UnrealEngine4BoneAxis
 +
:*RLPy.EExportFbxOptions2_SourceUpAxisSameAsTarget
 +
:*RLPy.EExportFbxOptions2_RenameDuplicateBoneName
 +
:*RLPy.EExportFbxOptions2_RenameDuplicateMaterialName
 +
:*RLPy.EExportFbxOptions2_RenameDuplicateMorphName
 +
:*RLPy.EExportFbxOptions2_RenameTransparencyWithPostFix
 +
:*RLPy.EExportFbxOptions2_RenameBoneRootToGameType
 +
:*RLPy.EExportFbxOptions2_RenameBoneToLowerCase
 +
:*RLPy.EExportFbxOptions2_RenameBoneOnStd
 +
:*RLPy.EExportFbxOptions2_IsNotRenamePivot
 +
:*RLPy.EExportFbxOptions2_RenameGameBodyMesh
 +
:*RLPy.EExportFbxOptions2_RenameMorphInvalidCharacter
 +
:*RLPy.EExportFbxOptions2_ResetBoneScale
 +
:*RLPy.EExportFbxOptions2_ResetSkinPose
 +
:*RLPy.EExportFbxOptions2_ResetSelfillumination
 +
:*RLPy.EExportFbxOptions2_AsciiFormat
 +
:*RLPy.EExportFbxOptions2_PrefixAndPostfix
 +
:*RLPy.EExportFbxOptions2_IsNotCloneObject
 +
:*RLPy.EExportFbxOptions2_BoneNubAttribute
 +
:*RLPy.EExportFbxOptions2_ExtraWordForUnityAndUnreal
 +
:*RLPy.EExportFbxOptions2_BakeMouthOpenMotionToMesh
 +
:*RLPy.EExportFbxOptions2_AvoidTextureIntoIndexedMode
 +
:*RLPy.EExportFbxOptions2_UnrealIkBone
 +
:*RLPy.EExportFbxOptions2_UnityPreset
 +
:*RLPy.EExportFbxOptions2_UnrealPreset
 +
:*RLPy.EExportFbxOptions2_InstaLodPreset
 +
:'''eOptions3''' [IN] Export options (Enum Flags) - RLPy.EExportFbxOptions3
 +
:*RLPy.EExportFbxOptions3__None
 +
:*RLPy.EExportFbxOptions3_ExportJson
 +
:'''eTextureSize''' [IN] The exported texture resolution size; Default is '''Original''' - RLPy.EExportTextureSize
 +
:*RLPy.EExportTextureSize_Original
 +
:*RLPy.EExportTextureSize_Size_256
 +
:*RLPy.EExportTextureSize_Size_512
 +
:*RLPy.EExportTextureSize_Size_1024
 +
:*RLPy.EExportTextureSize_Size_2048
 +
:*RLPy.EExportTextureSize_Size_4096
 +
:'''eFormat''' [IN] The exported texture file type; Its '''Default''' setting is the original texture file format - RLPy.EExportTextureFormat
 +
:*RLPy.EExportTextureFormat_Default
 +
:*RLPy.EExportTextureFormat_Bmp
 +
:*RLPy.EExportTextureFormat_Jpeg
 +
:*RLPy.EExportTextureFormat_Tga
 +
:*RLPy.EExportTextureFormat_Png
 +
:*RLPy.EExportTextureFormat_Tif
 +
:'''strIncludeMotionPath''' [IN] animation file path - string
 +
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 +
<syntaxhighlight lang="python" line='line'>
 +
# export fbx for Unreal
 +
export_option = RLPy.EExportFbxOptions__None
 +
export_option2 = RLPy.EExportFbxOptions2__None
 +
export_option3 = RLPy.EExportFbxOptions3__None
 +
export_option = export_option | RLPy.EExportFbxOptions_AutoSkinRigidMesh
 +
export_option = export_option | RLPy.EExportFbxOptions_ExportRootMotion
 +
export_option = export_option | RLPy.EExportFbxOptions_ZeroMotionRoot
 +
export_option = export_option | RLPy.EExportFbxOptions_ExportPbrTextureAsImageInFormatDirectory
 +
export_option = export_option | RLPy.EExportFbxOptions_InverseNormalY
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_UnrealEngine4BoneAxis
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameDuplicateBoneName
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameDuplicateMaterialName
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameTransparencyWithPostFix
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameBoneRootToGameType
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameBoneToLowerCase
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_ResetBoneScale
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_ResetSelfillumination
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_ExtraWordForUnityAndUnreal
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_BakeMouthOpenMotionToMesh
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_UnrealIkBone
 +
export_option2 = export_option2 | RLPy.EExportFbxOptions2_UnrealPreset
 +
 +
original_size = RLPy.EExportTextureSize_Original
 +
default_format = RLPy.EExportTextureFormat_Default
 +
include_motion_path = "C://Tpose.rlmotion"
 +
result = RLPy.RFileIO.ExportFbxFile( avatar, "C://FBX//avatar.fbx", export_option, export_option2, export_option3, original_size, default_format, include_motion_path )
 +
</syntaxhighlight>

Latest revision as of 23:23, 13 April 2020

Main article: Modules.
Last modified: 04/13/2020

Description

This class has file load and save capabilities. Currently, you can load iClone related files, objects, Alembic files, and output FBX files.

Alembic is an interchangeable computer graphics file format developed by Sony Pictures Imageworks and Industrial Light & Magic. Its primary focus is the interchange of geometry (models) between different groups working on the same shots or same assets. In layman's terms, Alembic is an open-source 3D model exchange format that can save animations baked into the geometry. 

Supported Files Types

iClone can load the following file formats using LoadFile (highlights in yellow also support LoadObject):

Avatar iavatar iacc ihair iupper ilower ishoe iglove iskin
icloth iteeth aml
Head iface ieye ioral rlhead
Props iprop itree iparticle ipkfx iTerrain iwater isky
Animation imotion imotionplus rlmotion ihand italk rltalk ipath
Scene iimglayer iscene iatm ifog icam ilight ieffect imtl
imtlplus isubstance sbsar itol iscript lua cclightroom
Image jpg jpeg bmp gif png hdr exr tga
Audio mp3 wma m4a aac wav
Video avi mv mpeg mpg mpe mp4 mkv rm
rmvb asf asx wm mov flv
iSprite popvideo iwidget
Physics Constraint iconstraint
Advertise Thumbnail rladv
Model abc obj fbx

Member Functions

LoadAlembic( self, spObject, strFilePath, eUpAxis )

Load related Alembic file to the selected object in the current scene. If loaded successfully return RStatus.Success, else RStatus.Failure.

Parameters

spObject [IN] target object - RIObject
strFilePath [IN] file path - string
eUpAxis [IN] up axis - RLPy.ECoordinateAxis
  • RLPy.ECoordinateAxis_X
  • RLPy.ECoordinateAxis_NegativeX
  • RLPy.ECoordinateAxis_Y
  • RLPy.ECoordinateAxis_NegativeY
  • RLPy.ECoordinateAxis_Z
  • RLPy.ECoordinateAxis_NegativeZ

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
1 #load AlembicFile
2 file_path = "C:/test.abc"
3 selection_list = RLPy.RScene.GetSelectedObjects()
4 result = RLPy.RFileIO.LoadAlembicFile(selection_list[0], file_path, RLPy.ECoordinateAxis_Y)

LoadFile ( self, strFilePath )

Load a file from a specified path into the current scene. If the file loaded successfully then return RStatus.Success, else RStatus.Failure. Supports every iClone file format.

See Also: Supported Files Types

Parameters

strFilePath [IN] file path - string

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
1 # load project file
2 file_path = "c:/myProject.iProject"
3 result = RLPy.RFileIO.LoadFile(file_path)

LoadObject ( self, strFilePath )

Load an object from a specified path into the current scene. If the file loaded successfully then return RStatus.Success, else RStatus.Failure. This function only supports objects that inherit from RIObject: RIAvatar, RICamera, RILight, RIParticle, RIProp.

Parameters

strFilePath [IN] file path - string

Returns

The loaded object - RIObject
1 # load object
2 object = RLPy.RFileIO.LoadObject("C:/CC_Standard_Neutral.iavatar")
3 print(type(object)) #RLPy.RIAvatar
4 
5 object = RLPy.RFileIO.LoadObject("C:/Arc_001.iProp")
6 print(type(object)) #RLPy.RIProp

ExportFbxFile ( self, spObject, strFilePath, eOptions, eOptions2, eOptions3, eTextureSize, eFormat, strIncludeMotionPath )

Export an object in the scene to a FBX file; Allows for different export settings. If you would like to include animation data with the FBX file, then you can set a path to the animation file.

Parameters

spObject [IN] target object - RIObject
strFilePath [IN] file path - string
eOptions [IN] Export options (Enum Flags) - RLPy.EExportFbxOptions
  • RLPy.EExportFbxOptions__None
  • RLPy.EExportFbxOptions_FbxKey
  • RLPy.EExportFbxOptions_LightWaveYUp
  • RLPy.EExportFbxOptions_LightWaveReferenceBone
  • RLPy.EExportFbxOptions_AutoSkinRigidMesh
  • RLPy.EExportFbxOptions_AutoSkinRigidMeshWithDifferentBoneName
  • RLPy.EExportFbxOptions_SaveHideMeshStateInOneSelectionSet
  • RLPy.EExportFbxOptions_ForceTrangleExport
  • RLPy.EExportFbxOptions_ExportMotion30SecOnly
  • RLPy.EExportFbxOptions_TPoseOnMotionFirstFrame
  • RLPy.EExportFbxOptions_FirstMotionNotOffset
  • RLPy.EExportFbxOptions_ExportRootMotion
  • RLPy.EExportFbxOptions_ZeroMotionRoot
  • RLPy.EExportFbxOptions_RemoveAllUnused
  • RLPy.EExportFbxOptions_RemoveBoneRoot
  • RLPy.EExportFbxOptions_RemoveHiddenMesh
  • RLPy.EExportFbxOptions_RemoveUnusedMorph
  • RLPy.EExportFbxOptions_RemoveEyelash
  • RLPy.EExportFbxOptions_RemoveAllMesh
  • RLPy.EExportFbxOptions_RemoveAllMeshKeepMorph
  • RLPy.EExportFbxOptions_EmbedTexture
  • RLPy.EExportFbxOptions_ExportPbrTextureAsImageInDiffuseLayer
  • RLPy.EExportFbxOptions_ExportPbrTextureAsImageInOneDirectory
  • RLPy.EExportFbxOptions_ExportPbrTextureAsImageInFormatDirectory
  • RLPy.EExportFbxOptions_ExportPbrTextureAsSbsar
  • RLPy.EExportFbxOptions_ExportMetallicAlpha
  • RLPy.EExportFbxOptions_InverseNormalY
  • RLPy.EExportFbxOptions_InverseOpacity
  • RLPy.EExportFbxOptions_MergeDiffuseOpacityMap
  • RLPy.EExportFbxOptions_MayaAdjustMaterial
  • RLPy.EExportFbxOptions_ConvertTifToPNG
eOptions2 [IN] Export options (Enum Flags) - RLPy.EExportFbxOptions2
  • RLPy.EExportFbxOptions2__None
  • RLPy.EExportFbxOptions2_XUp
  • RLPy.EExportFbxOptions2_YUp
  • RLPy.EExportFbxOptions2_UnrealEngine4BoneAxis
  • RLPy.EExportFbxOptions2_SourceUpAxisSameAsTarget
  • RLPy.EExportFbxOptions2_RenameDuplicateBoneName
  • RLPy.EExportFbxOptions2_RenameDuplicateMaterialName
  • RLPy.EExportFbxOptions2_RenameDuplicateMorphName
  • RLPy.EExportFbxOptions2_RenameTransparencyWithPostFix
  • RLPy.EExportFbxOptions2_RenameBoneRootToGameType
  • RLPy.EExportFbxOptions2_RenameBoneToLowerCase
  • RLPy.EExportFbxOptions2_RenameBoneOnStd
  • RLPy.EExportFbxOptions2_IsNotRenamePivot
  • RLPy.EExportFbxOptions2_RenameGameBodyMesh
  • RLPy.EExportFbxOptions2_RenameMorphInvalidCharacter
  • RLPy.EExportFbxOptions2_ResetBoneScale
  • RLPy.EExportFbxOptions2_ResetSkinPose
  • RLPy.EExportFbxOptions2_ResetSelfillumination
  • RLPy.EExportFbxOptions2_AsciiFormat
  • RLPy.EExportFbxOptions2_PrefixAndPostfix
  • RLPy.EExportFbxOptions2_IsNotCloneObject
  • RLPy.EExportFbxOptions2_BoneNubAttribute
  • RLPy.EExportFbxOptions2_ExtraWordForUnityAndUnreal
  • RLPy.EExportFbxOptions2_BakeMouthOpenMotionToMesh
  • RLPy.EExportFbxOptions2_AvoidTextureIntoIndexedMode
  • RLPy.EExportFbxOptions2_UnrealIkBone
  • RLPy.EExportFbxOptions2_UnityPreset
  • RLPy.EExportFbxOptions2_UnrealPreset
  • RLPy.EExportFbxOptions2_InstaLodPreset
eOptions3 [IN] Export options (Enum Flags) - RLPy.EExportFbxOptions3
  • RLPy.EExportFbxOptions3__None
  • RLPy.EExportFbxOptions3_ExportJson
eTextureSize [IN] The exported texture resolution size; Default is Original - RLPy.EExportTextureSize
  • RLPy.EExportTextureSize_Original
  • RLPy.EExportTextureSize_Size_256
  • RLPy.EExportTextureSize_Size_512
  • RLPy.EExportTextureSize_Size_1024
  • RLPy.EExportTextureSize_Size_2048
  • RLPy.EExportTextureSize_Size_4096
eFormat [IN] The exported texture file type; Its Default setting is the original texture file format - RLPy.EExportTextureFormat
  • RLPy.EExportTextureFormat_Default
  • RLPy.EExportTextureFormat_Bmp
  • RLPy.EExportTextureFormat_Jpeg
  • RLPy.EExportTextureFormat_Tga
  • RLPy.EExportTextureFormat_Png
  • RLPy.EExportTextureFormat_Tif
strIncludeMotionPath [IN] animation file path - string

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # export fbx for Unreal
 2 export_option = RLPy.EExportFbxOptions__None
 3 export_option2 = RLPy.EExportFbxOptions2__None
 4 export_option3 = RLPy.EExportFbxOptions3__None
 5 export_option = export_option | RLPy.EExportFbxOptions_AutoSkinRigidMesh
 6 export_option = export_option | RLPy.EExportFbxOptions_ExportRootMotion
 7 export_option = export_option | RLPy.EExportFbxOptions_ZeroMotionRoot
 8 export_option = export_option | RLPy.EExportFbxOptions_ExportPbrTextureAsImageInFormatDirectory
 9 export_option = export_option | RLPy.EExportFbxOptions_InverseNormalY
10 export_option2 = export_option2 | RLPy.EExportFbxOptions2_UnrealEngine4BoneAxis
11 export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameDuplicateBoneName
12 export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameDuplicateMaterialName
13 export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameTransparencyWithPostFix
14 export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameBoneRootToGameType
15 export_option2 = export_option2 | RLPy.EExportFbxOptions2_RenameBoneToLowerCase
16 export_option2 = export_option2 | RLPy.EExportFbxOptions2_ResetBoneScale
17 export_option2 = export_option2 | RLPy.EExportFbxOptions2_ResetSelfillumination
18 export_option2 = export_option2 | RLPy.EExportFbxOptions2_ExtraWordForUnityAndUnreal
19 export_option2 = export_option2 | RLPy.EExportFbxOptions2_BakeMouthOpenMotionToMesh
20 export_option2 = export_option2 | RLPy.EExportFbxOptions2_UnrealIkBone
21 export_option2 = export_option2 | RLPy.EExportFbxOptions2_UnrealPreset
22 
23 original_size = RLPy.EExportTextureSize_Original
24 default_format = RLPy.EExportTextureFormat_Default 
25 include_motion_path = "C://Tpose.rlmotion"
26 result = RLPy.RFileIO.ExportFbxFile( avatar, "C://FBX//avatar.fbx", export_option, export_option2, export_option3, original_size, default_format, include_motion_path )