Hi,
I want to ask RL to focus of these 2 lines of codes, taken from the example here:
http://wiki.reallusion.com/IC_Python_API:Controlling_A_Simple_Prop#-- Load Box_001.iProp --#
RLPy.RFileIO.LoadFile(ic_template_path + "//iClone Template//Props//3D Blocks//Box_001.iProp")
#-- Get Prop --#
prop = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box_001")
There is a problem: if the Scene already contains a "Box_001" prop or if simply the Box_001 is loaded two times, there is no way to get the correct object handler because the name of the loaded prop changes.
Perhaps it is possible to grab the object handler via RLPy.REventCallback.OnAfterFileLoaded event callback, but this, like most of the other APIs, is left undocumented...
IMO, the simple and most effective solution is : RLPy.RFileIO.LoadFile shall return the object handler or None if not successful.
So, pls, RL change this otherwise loading via API multiple instances of the same prop or also loading a prop which already is in the scene is not feasible
Thanks
Roberto
My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390 RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB / SSD: 2x512GB Samsung 860 EVO + 1x2TB Samsung
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the MOTU M4 I/F) / DirectX: 12
Edited
5 Years Ago by
RobertoColombo