This is a suggestions and I could be plain wrong or maybe there is another alternative:
I'm reading
https://wiki.reallusion.com/IC_Python_API:RLPy_RFileIO#Supported_Files_Typeswhere I can load a file , mostly all *.iXXX file (iCloth,iAcc,iShoe,iGlove, etc.)
But what about objects from CC3?.
CC3 has a lot of files like ccCloth,ccAcc,ccShoes,ccGloves.
What I found is renaming CC3 file using iClone extension (that is .ccCloth to iCloth) and assigning to an avatar I am able to load the asset into iClone.
But I cannot load it directly . It seems loadFile decides what kind the object based on extension (my guess).
For example:
shoe= r"pathtotheshoehere....\shoes_001.iShoe"
my_avatar = RLPy.RScene.FindObject(RLPy.EObjectType_Avatar, "MyAvatar")
RLPy.RScene.SelectObject(my_avatar)
result = RLPy.RFileIO.LoadFile(shoe)
if (result ==RLPy.RStatus.Success):
print ("Loaded")
if (result ==RLPy.RStatus.Failure):
print ("Failed")
An suggestion would be to extend the LoadFile method into something like this
result = RLPy.RFileIO.LoadFile(shoe, RLPy.EObjectType_KindOfObject) to cast to a KindOfObject (whatever it would be).
In this way we could load the file and set the object type. That would allow load objects without renaming files or ignoring extensions.
Maybe is there another/better way?
Thank you.