I’m having trouble making my class inherit from NodePath and reparenting it to render.
class Planet(NodePath):
def __init__(self):
NodePath.__init__(self)
self.Terrain = loader.loadModel("Models/testplanet.egg")
self.Terrain.reparentTo(self)
self.reparentTo(render)
This is a simplified version however when I create a Planet class I get the following error.
Commandline: ppython C:\Chaneciya\sphereicalworldtest.py
Workingdirectory:
Timeout: 0 ms
Known pipe types:
wglGraphicsPipe
(3 aux display modules not yet loaded.)
:display:gsg:glgsg(warning): BlendEquation advertised as supported by OpenGL runtime, but could not get pointers to extension function.
:display:gsg:glgsg(warning): BlendColor advertised as supported by OpenGL runtime, but could not get pointers to extension function.
:util(warning): Adjusting global clock's real time by 0.277725 seconds.
Assertion failed: !is_empty() at line 335 of panda/src/pgraph/nodePath.cxx
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Traceback (most recent call last):
File "C:\Chaneciya\sphereicalworldtest.py", line 107, in ?
G = Game()
File "C:\Chaneciya\sphereicalworldtest.py", line 94, in __init__
self.TestPlanet = Planet()
File "C:\Chaneciya\sphereicalworldtest.py", line 14, in __init__
self.reparentTo(render)
AssertionError: !is_empty() at line 335 of panda/src/pgraph/nodePath.cxx
Process "Panda Python" terminated, ExitCode: 00000001
I’ve tried searching the forums however I had no luck. Can anyone point me in the right direction?