Hi!
I have 2 threads (panda3d threads-> from direct.stdpy import threading) that are reading data from file and destroying and recreating model in loop, something like this:
while
..
self.DestroyModel()
self.CreateModel()
..
time.sleep(some time)
where DestroyModel:
def DestroyModel( self ):
self.robotPath.removeNode()
self.robotPath=NodePath('robot')
and create:
.....
.....
model.setPos(self.points[3])
model.lookAt(self.points[4])
model.reparentTo(self.robotPath)
model=loader.loadModel("Models/model1.egg")
model.setPos(self.points[4])
model.lookAt(self.points[5])
model.setColorScale(1.0, 1.0, 1.0, 1.0)
model.reparentTo(self.robotPath)
This code works, but in rather random recreation i get:
IOError: Could not load model file(s): ['modelX']
Where X is 1,2,3,4…(model number).
I have no idea why I’m getting this error
Please help!