Using RLPy module, can I load an .obj cloth mesh as an accessory

I have created few cloth meshes in blender and saved them in .obj format. I am able to upload the object using CC5 UI Create–>Accessory and later transfer weights. I would like to know if there is a possibility of uploading the objects via RLPy module (python script).

Hi mdshameeralibaig_265896,

Here is sample code for loading an accessory and transferring weights in CC5.
Please take a look, and feel free to reach out if you have any questions!

import RLPy

rl_plugin_info = {"ap": "iClone", "ap_version": "8.0"}

def run_script():
    avatar_list = RLPy.RScene.GetAvatars()
    if len(avatar_list) == 0:
        print ("please load a character first.")
        return

    avatar = avatar_list[0]
    input_file_path = "C:\\Temp\\TestTransferSkinWeightClothe.obj"
    type_of_input_clothe = "Default"    #"Default", "Dress", "Gloves", "Shoes", "Cloak", "Other"
    result = avatar.LoadAccessoryWithTransferSkinWeight( input_file_path, type_of_input_clothe )
1 Like

Thanks @Johnny_RL, it works as expected. I am very new to this, so had a hard time in figuring out.

1 Like