In python it is pretty trivial to get a class’s parent class.
import unreal
class A:
def __init__(self):
pass
class B(A):
def __init__(self):
pass
class C(B):
def __init__(self):
pass
print('c parent :: {}'.format(C.mro()))
print('c parent :: {}'.format(C.__bases__))
sm = unreal.StaticMesh()
print('sm parent :: {}'.format(sm.mro()))
print('sm parent :: {}'.format(sm.__bases__))
output log:
Cmd: py "../../../../../../_p4/Tools/ContentCreators/UnrealTFW/scr/tools/blueprinttools/scratch.py"
LogPython: c parent :: [<class '__main__.C'>, <class '__main__.B'>, <class '__main__.A'>, <class 'object'>]
LogPython: c parent :: (<class '__main__.B'>,)
LogPython: Error: Traceback (most recent call last):
LogPython: Error: File "C:/_p4/Tools/ContentCreators/UnrealTFW/scr/tools/blueprinttools/scratch.py", line 19, in <module>
LogPython: Error: print('sm parent :: {}'.format(sm.mro()))
LogPython: Error: ^^^^^^
LogPython: Error: AttributeError: 'StaticMesh' object has no attribute 'mro'
The python classes return expected output however unreal classes fail the same queries.
Any ideas why?
Thanks
-jonathan