Profile Picture

material_component.LoadImageToTexture api does not seem to work

Posted By delebash 3 Years Ago
You don't have permission to rate!

material_component.LoadImageToTexture api does not seem to work

Author
Message
delebash
delebash
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)Distinguished Member (1.2K reputation)

Group: Forum Members
Last Active: Last Month
Posts: 41, Visits: 448
System: Windows 10
iClone: 7.83https://forum.reallusion.com/uploads/images/70de5fca-9294-4b0a-901a-5d40.png

Please look at https://wiki.reallusion.com/IC_Python_API:RLPy_RIMaterialComponent#LoadImageToTexture_.28_self.2C_strMeshName.2C_strMaterialName.2C_eChannel.2C_strImagePath_.29

I am trying to change the Diffuse or Base image in iClone via python script but RLPy.RStatus.Success is always 0 and the file is not uploaded.

The character I am using is the default one in CC3 I just used the transfer to iClone button.

Attached is the image I am uploading and the script I am using.
Any help is appreciated. Thanks

My script

import RLPy

avatar_list = RLPy.RScene.GetAvatars()
avatar = avatar_list[0]
material_component = avatar.GetMaterialComponent()

result = material_component.LoadImageToTexture("CC_Base_Body", "Std_Skin_Head", 6, "D://test.png")
print(result.Success)




Reading This Topic