Hi,
I can create a sub-class (inherited) from RScene class but I can't do the same for RlProp and RlObject classes.
Code is as simple as the following:
import PySide2, RLPy
from PySide2 import *
def run_script():
scene_obj = SceneClassChild()
scene_obj.Print()
props = scene_obj.GetProps()
print(props)
prop_obj = PropClassChild()
prop_obj.Print()
class SceneClassChild(RLPy.RScene):
def Print(self):
print("I am a RScene class child")
class PropClassChild(RLPy.RlProp):
def Print(self):
print("I am a RlProp class child")
Error message is:
<class 'AttributeError'>, File: E:/WorkingArea/iClone/PythonAPI/Test_iClone_Inheritance.py, Line: A
<class 'NameError'>, File: E:/WorkingArea/iClone/PythonAPI/Test_iClone_Inheritance.py, Line: B
Line A is: class PropClassChild(RLPy.RlProp):
Line B is: prop_obj = PropClassChild()
Note that "props = scene_obj.GetProps()" works fine, which means the Scene child class is ok.
Any hints about how to sub-class RlObject and RlProp ?
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