[Python-ogre-commit] SF.net SVN: python-ogre: [524] trunk/python-ogre/demos/ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2007-12-30 23:35:23
|
Revision: 524 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=524&view=rev Author: andy_miller Date: 2007-12-30 15:35:28 -0800 (Sun, 30 Dec 2007) Log Message: ----------- Bug fixes in a couple of demos Modified Paths: -------------- trunk/python-ogre/demos/ogre/Demo_Bezier.py trunk/python-ogre/demos/ogreode/SimpleScenes_Chain.py Modified: trunk/python-ogre/demos/ogre/Demo_Bezier.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Bezier.py 2007-12-30 10:58:24 UTC (rev 523) +++ trunk/python-ogre/demos/ogre/Demo_Bezier.py 2007-12-30 23:35:28 UTC (rev 524) @@ -91,14 +91,7 @@ # register our listener self.currentLog.addListener ( self.myLog ) - def __del__(self): - global pVert - if (self.patchCtlPoints): - del self.patchCtlPoints - del pVert - sf.Application.__del__(self) - - + def _createScene(self): global patchPass, patch, pVert sceneManager = self.sceneManager @@ -237,7 +230,9 @@ ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME) pMat.getTechnique(0).getPass(0).createTextureUnitState( "BumpyMetal.jpg" ) patchEntity.setMaterialName("TextMat") - + patchPass = pMat.getTechnique(0).getPass(0) + + ## Attach the entity to the root of the scene sceneManager.getRootSceneNode().attachObject(patchEntity) Modified: trunk/python-ogre/demos/ogreode/SimpleScenes_Chain.py =================================================================== --- trunk/python-ogre/demos/ogreode/SimpleScenes_Chain.py 2007-12-30 10:58:24 UTC (rev 523) +++ trunk/python-ogre/demos/ogreode/SimpleScenes_Chain.py 2007-12-30 23:35:28 UTC (rev 524) @@ -21,7 +21,7 @@ self._first_body = None self._box_body = None self._force = 0 - self._force_to_apply = 0 + self._force_to_apply = ogre.Vector3.ZERO ## Set up the sizes of stuff link_size = 0.4 @@ -91,7 +91,7 @@ ## Forward/back elif (input.isKeyDown(OIS.KC_K)): self._force_to_apply += forward * self._force elif (input.isKeyDown(OIS.KC_I)): self._force_to_apply -= forward * self._force - else: self._force_to_apply = 0 + else: self._force_to_apply = ogre.Vector3.ZERO self._mgr.getCamera("PlayerCam") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |