IC8 Python API:RLPy RIAvatar

From Reallusion Wiki!
Jump to: navigation, search

Contents

Main article: iC8 Modules.
Last modified: 10/21/2026

Description

This class is the interface to avatars in the scene. It provides methods to access various parts of an avatar such as its name, bones, etc. All methods of this class are implemented by the system.

Class Methods

RLPy.RIAvatar.AutoAdjustFootHeight(self)

Auto adjust foot height.

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 result = avatar.AutoAdjustFootHeight()

RLPy.RIAvatar.ConvertTo(self, args)

Convert to actor build.

Experimental API

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
 1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
 2 
 3 # Convert to actor build
 4 '''
 5 EConvertCharacterLevel_ActorBuild
 6 EConvertCharacterLevel_LOD1
 7 EConvertCharacterLevel_LOD2
 8 '''
 9 convert_type = RLPy.EConvertCharacterLevel_ActorBuild
10 bakeExpression = False
11 bakeTexture = False
12 '''
13 RLPy.EReduceBonePose__None
14 RLPy.EReduceBonePose_TPose
15 RLPy.EReduceBonePose_Default
16 RLPy.EReduceBonePose_Current
17 RLPy.EReduceBonePose_Custom
18 '''
19 pose = RLPy.EReduceBonePose_Default
20 result = avatar.ConvertTo(convert_type, bakeExpression, bakeTexture, pose)

RLPy.RIAvatar.GetAccessories(self, bAll = True)

Get all accessory of the object.

Experimental API

Returns

List of pointer of RIAccessory - list

1 # No example

RLPy.RIAvatar.GetAvatarParts(self, args)

Get all parts of the avatar.

Experimental API

Parameters

eType[IN] specify the type of avatar part, if eType is EAvatarPartType::None, will return all avatar parts of the avatar - RLPy.EAvatarPartType::None

Returns

List of pointer of RIAvatarPart - list

1 # No example

RLPy.RIAvatar.GetAvatarShapingComponent(self)

Get avatar shaping component of the object.

Experimental API

Returns

Pointer of the RIAvatarShapingComponent object - RLPy.RIAvatarShapingComponent

1 # No example

RLPy.RIAvatar.GetAvatarType(self)

Get the current avatar type.

Experimental API

Returns

Avatar Type - RLPy.EAvatarType

  • RLPy.EAvatarType_None
  • RLPy.EAvatarType_Standard
  • RLPy.EAvatarType_NonStandard
  • RLPy.EAvatarType_NonHuman
  • RLPy.EAvatarType_StandardSeries
  • RLPy.EAvatarType_All
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 avatr_type = avatar.GetAvatarType()
3 print(avatar_generation == RLPy.EAvatarType_StandardSeries)

RLPy.RIAvatar.GetClothes(self)

Get all cloth of the object.

Experimental API

Returns

List of pointer of RICloth - list

1 # No example

RLPy.RIAvatar.GetFaceComponent(self)

Get face component of the object.

Experimental API

Returns

Pointer of the RIFaceComponent object - RLPy.RIFaceComponent

1 # No example

RLPy.RIAvatar.GetFacialProfileComponent(self)

Get face component of the object.

Experimental API

Returns

Pointer of the RIFaceComponent object - RLPy.RIFacialProfileComponent

1 # No example

RLPy.RIAvatar.GetFloorContactValue(self, eType)

Get the value of the floor contact.

Experimental API

Parameters

eType[IN] specify the type of floor contect - RLPy.EFloorContactType
  • RLPy.EFloorContactType_HandBottom
  • RLPy.EFloorContactType_HandBack
  • RLPy.EFloorContactType_HandMiddle
  • RLPy.EFloorContactType_HandFront
  • RLPy.EFloorContactType_HandIn
  • RLPy.EFloorContactType_HandOut
  • RLPy.EFloorContactType_FootBottom
  • RLPy.EFloorContactType_FootBack
  • RLPy.EFloorContactType_FootMiddle
  • RLPy.EFloorContactType_FootFront
  • RLPy.EFloorContactType_FootIn
  • RLPy.EFloorContactType_FootOut
  • RLPy.EFloorContactType_All

Returns

The value of the floor contact - float

1 # No example

RLPy.RIAvatar.GetGeneration(self)

Get CharacterCreator avatar generation.

Experimental API

Returns

CharacterCreator Avatar generation - RLPy.EAvatarGeneration

  • RLPy.EAvatarGeneration_None
  • RLPy.EAvatarGeneration_CC_G1_Avatar
  • RLPy.EAvatarGeneration_CC_G3_Avatar
  • RLPy.EAvatarGeneration_CC_G3_Plus_Avatar
  • RLPy.EAvatarGeneration_CC_Game_Base_One
  • RLPy.EAvatarGeneration_CC_Game_Base_Multi
  • RLPy.EAvatarGeneration_ActorBuild
  • RLPy.EAvatarGeneration_ActorScan
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 avatar_generation = avatar.GetGeneration()
3 print(avatar_generation)

RLPy.RIAvatar.GetHairs(self)

Get all hair of the object.

Experimental API

Returns

List of pointer of RIHair - list

1 # No example

RLPy.RIAvatar.GetHikEffectorComponent(self)

Get human IK effector component of the object.

Returns

Pointer of the RIHikEffectorComponent object - RLPy.RIHikEffectorComponent

1 # No example

RLPy.RIAvatar.GetMaterialComponent(self)

Get material component of the object.

Returns

Pointer of the RIMaterialComponent object - RLPy.RIMaterialComponent

1 # No example

RLPy.RIAvatar.GetMorphComponent(self)

Get morph component of the object.

Returns

Pointer of the RIMorphComponent object - RLPy.RIMorphComponent

1 # No example

RLPy.RIAvatar.GetPhysicsComponent(self)

Get physics component of the object.

Returns

Pointer of the RIPhysicsComponentPtr object - RLPy.RIPhysicsComponent

1 # No example

RLPy.RIAvatar.GetSkeletonComponent(self)

Get bone component of the object.

Returns

Pointer of the RISkeletonComponent object - RLPy.RISkeletonComponent

1 # No example

RLPy.RIAvatar.GetVisemeComponent(self)

Get viseme component of the object.

Returns

Pointer of the RIVisemeComponent object - RLPy.RIVisemeComponent

1 # No example

RLPy.RIAvatar.IsVisible(self, kTime)

Check if avatar is visible.

Experimental API

Parameters

kTime[IN] Specifies the time to check if avatar is visible - RLPy.RLTime

Returns

Boolvalue true if avatar is visible; otherwise false.

1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 isVisible = avatar.IsVisible(RLPy.RTime(600))
3 print(isVisible)

RLPy.RIAvatar.LoadAccessoryWithTransferSkinWeight(self, kFilePath, kTemplateType)

Load accessory and transfer skin weight automatically.

Experimental API

Parameters

kFilePath[IN] File path of accessory - string
kTemplateType[IN] Template type of transfer skin weight - string

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 
3 # Load Accessory With Transfer Skin Weight
4 input_file_path = r"C:\test\T-shirt_TPose.obj"
5 type_of_input_clothe = "Default"
6 result = avatar.LoadAccessoryWithTransferSkinWeight( input_file_path, type_of_input_clothe )
7 if result == RLPy.RStatus.Success :
8     print("Success")

RLPy.RIAvatar.LoadHikProfile(self, strPath, bApplyTpose, bApplyBoneMapping, bSendUpdateEvent)

Load humanoid ik profile from path, may cause character turn to nonstandard.

Experimental API

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 save_hik_path = "./test_hik_profile.3dxProfile"
3 result = avatar.LoadHikProfile(save_hik_path)

RLPy.RIAvatar.SaveHikProfile(self, strPath)

Save humanoid ik profile to path.

Experimental API

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 # Save humanoid ik profile
3 save_hik_path = "./test_hik_profile.3dxProfile"
4 result = avatar.SaveHikProfile(save_hik_path)

RLPy.RIAvatar.SetFloorContactValue(self, eType, fValue)

Set the value of the floor contact.

Experimental API

Parameters

eType[IN] specify the type of floor contect - RLPy.EFloorContactType
  • RLPy.EFloorContactType_HandBottom
  • RLPy.EFloorContactType_HandBack
  • RLPy.EFloorContactType_HandMiddle
  • RLPy.EFloorContactType_HandFront
  • RLPy.EFloorContactType_HandIn
  • RLPy.EFloorContactType_HandOut
  • RLPy.EFloorContactType_FootBottom
  • RLPy.EFloorContactType_FootBack
  • RLPy.EFloorContactType_FootMiddle
  • RLPy.EFloorContactType_FootFront
  • RLPy.EFloorContactType_FootIn
  • RLPy.EFloorContactType_FootOut
  • RLPy.EFloorContactType_All
fValue[IN] the value of floor contect - float

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 # No example

RLPy.RIAvatar.SetVisible(self, kTime, bVisible)

Experimental Function)Set visible status

Parameters

kTime[IN] Specifies the time to set visible - RLPy.RLTime
bVisible[IN] Visible status - bool

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "Jade")
2 # set visible key
3 avatar.SetVisible(RLPy.RTime(600), False)

Description

This class provides methods to access all components of a character, for example: RISkeletonComponent, RIVisemeComponent, RIFaceComponent, etc. Retrieved component operations are thus available for usage.

Constructor & Destructor

__init__ (self, *args, **kwargs)

Initializes a new avatar instance.

Parameters

  • args
  • kwargs

Member Functions

AutoAdjustFootHeight (self)

Auto adjust foot height.

ChangeConstraintSet (self)

Change Facial Constraint Set (CC4 Extend to CCExtend+).

ConvertTo (self, *args)

Converts to actor build.

Parameters

  • args

DoCharacterization (self, strPath, bApplyTpose, bApplyBoneMapping, bSendUpdateEvent)

Runs characterization for this avatar.

Parameters

  • strPath
  • bApplyTpose
  • bApplyBoneMapping
  • bSendUpdateEvent

GetAccessories (self, bAll=True)

Returns the accessories.

Parameters

  • bAll (default: True)

GetAvatarParts (self, *args)

Gets all parts of the avatar.

Parameters

  • args

GetAvatarShapingComponent (self)

Gets avatar shaping component of the object.

GetAvatarType (self)

Get the character's avatar type.

GetClothes (self)

Returns the clothes.

GetFaceComponent (self)

Get the Face Component for the character. Face Component is used to control the facial and head settings for the character. See Also: RIFaceComponent

GetFacialProfileComponent (self)

Gets face component of the object.

GetFloorContactValue (self, eType)

Gets the value of the floor contact.

Parameters

  • eType

GetGeneration (self)

Get the CC avatar standard generation for the character.

GetHairs (self)

Returns the hairs.

GetHikEffectorComponent (self)

Get the character's HIK Effector Component, used for controlling and managing the IK skeleton. See Also: RIHikEffectorComponent

GetMaterialComponent (self)

Get the character's Material Component, used for setting material related parameter values. See Also: RIMaterialComponent

GetMaxSubdivMeshLevel (self)

Gets maximum value of the subdiv level.

GetMorphComponent (self)

Get the character's Morph Component, used to edit Morph Animation Keys or retrieve the current morph weighting. See Also: RIMorphComponent

GetMorpherConstraintsEnabled (self)

Checks if morpher constraint enabled, doesn't mean it has data.

GetPhysicsComponent (self)

Gets physics component of the object.

GetRenderSubdivMeshLevel (self)

Gets subdiv level used by render mesh.

GetSkeletonComponent (self)

Get the character's Skeleton Component, used for retrieving the entire skeleton. See Also: RISkeletonComponent

GetSubdivMeshLevel (self)

Gets subdiv level of avatar mesh.

GetVisemeComponent (self)

Get the character's Viseme Component, which provides operations related to lip-syncing. See Also: RIVisemeComponent

HasMorpherConstraintsSet (self)

Checks if avatar has morpher constraint data.

IsVisible (self, kTime)

Checks if avatar is visible.

Parameters

  • kTime

LoadAccessoryWithTransferSkinWeight (self, kFilePath, kTemplateType)

Loads accessory and transfer skin weight automatically.

Parameters

  • kFilePath
  • kTemplateType

ReplaceMesh (self, strMeshName, strObjFilePath, bSplitObjects=False, bAutoRig=False)

Replaces mesh by loading obj file.

Parameters

  • strMeshName
  • strObjFilePath
  • bSplitObjects (default: False)
  • bAutoRig (default: False)

SaveHikProfile (self, strPath)

Saves humanoid ik profile to path.

Parameters

  • strPath

SetFloorContactValue (self, eType, fValue)

Sets the value of the floor contact.

Parameters

  • eType
  • fValue

SetMorpherConstraintsEnabled (self, bEnabled)

Enable or disable morpher constraint, currently only for facial morphers, when enabled, the morph value will be clamped by the constraint profile, which is set in Character Creator, and the constraint profile will be automatically applied to the avatar when importing to iClone, user can also manually change the constraint profile in iClone if needed, when disabled, there is no constraint on morph value. This function is for user to preview the effect of morpher constraint in Character Creator.

Parameters

  • bEnabled

SetRenderSubdivMeshLevel (self, nLevel)

Sets subdiv level used by render mesh.

Parameters

  • nLevel

SetVisible (self, kTime, bVisible)

Set a visibility key by a given time.

Parameters

  • kTime
  • bVisible

SwitchSubdivMeshLevel (self, nLevel)

Switch subdiv level of avatar mesh.

Parameters

  • nLevel

UpdateWrinkle (self)

Refresh Wrinkle Textures.

Properties

thisown

Indicates whether this SWIG proxy owns the underlying C++ object.