lodr
17-01-2011 10:40:05
Hello everybody.
First say hello: Hello!
I need some explanation about a weird behaviour I found using Python Ogre for the first time.
I'm working with manual objects and I have extended ManualObject with Environment. So, the process to attach my Environment instance to the SceneManager is as follows:
Ok, this works with any problem. But now, I was trying to reduce the number of members of my classes in order to use names of the meshes and nodes instead. I'm not asking if it is a better way, I was just trying. So I replace the former code by this:
Note how 'env' is a local variable (not a member) now. In this case, my manual object does not reder.
I suposed it could be related with the garbage collector so I disable it at the beginning of the module but it continues to not rendering.
Can someone explain me what happend? It is not urgent, I can continue with my application but I cannot explain myself what happend.
Thanks a lot.
First say hello: Hello!
I need some explanation about a weird behaviour I found using Python Ogre for the first time.
I'm working with manual objects and I have extended ManualObject with Environment. So, the process to attach my Environment instance to the SceneManager is as follows:
node = sceneManager.getRootSceneNode().createChildSceneNode("DataNode")
self.env = Environment("my_environment", buffers)
node.attachObject(self.env)
Ok, this works with any problem. But now, I was trying to reduce the number of members of my classes in order to use names of the meshes and nodes instead. I'm not asking if it is a better way, I was just trying. So I replace the former code by this:
node = sceneManager.getRootSceneNode().createChildSceneNode("DataNode")
env = Environment("my_environment", buffers)
node.attachObject(env)
Note how 'env' is a local variable (not a member) now. In this case, my manual object does not reder.
I suposed it could be related with the garbage collector so I disable it at the beginning of the module but it continues to not rendering.
Can someone explain me what happend? It is not urgent, I can continue with my application but I cannot explain myself what happend.
Thanks a lot.