def stopEdit(self):
   if ObjectEggBase.isEditmodeEnabled(self):
     ObjectEggBase.stopEdit(self)
     texturePainter.stopEditor()
     texturePainter.disableEditor()
   else:
     print "W: ObjectEggTexture.stopEdit: editmode not enabled"
 def stopEdit(self):
   if TreeNode.isEditmodeStarted(self):
     taskMgr.remove('geoMipUpdateTask')
     
     # stop the shader and regenerate the terrain
     if self.renderMode == 0:
       pass
     elif self.renderMode == 1:
       pass
     
     if self.paintImage: # if the editing mode failed to start, this is undefined
       # restore the real terrain
       self.geoMipTerrainCopy.removeNode()
       # stop painting
       texturePainter.stopEditor()
       texturePainter.disableEditor()
     
     # restore bruteforce state
     self.geoMipTerrain.terrain.setBruteforce(self.bruteforceState)
     self.geoMipTerrain.terrain.getRoot().clearShader()
     # must use generate, update is not recognizing the chagnes
     self.geoMipTerrain.terrain.generate()
     self.geoMipTerrain.terrain.getRoot().show()
     
     TreeNode.stopEdit(self)
     
     # enable the 3d window object selection
     messenger.send(EVENT_SCENEPICKER_MODELSELECTION_ENABLE)
Esempio n. 3
0
 def stopEdit(self):
     if ObjectEggBase.isEditmodeEnabled(self):
         ObjectEggBase.stopEdit(self)
         texturePainter.stopEditor()
         texturePainter.disableEditor()
     else:
         print "W: ObjectEggTexture.stopEdit: editmode not enabled"
Esempio n. 4
0
    def stopEdit(self):
        if TreeNode.isEditmodeStarted(self):
            taskMgr.remove('geoMipUpdateTask')

            # stop the shader and regenerate the terrain
            if self.renderMode == 0:
                pass
            elif self.renderMode == 1:
                pass

            if self.paintImage:  # if the editing mode failed to start, this is undefined
                # restore the real terrain
                self.geoMipTerrainCopy.removeNode()
                # stop painting
                texturePainter.stopEditor()
                texturePainter.disableEditor()

            # restore bruteforce state
            self.geoMipTerrain.terrain.setBruteforce(self.bruteforceState)
            self.geoMipTerrain.terrain.getRoot().clearShader()
            # must use generate, update is not recognizing the chagnes
            self.geoMipTerrain.terrain.generate()
            self.geoMipTerrain.terrain.getRoot().show()

            TreeNode.stopEdit(self)

            # enable the 3d window object selection
            messenger.send(EVENT_SCENEPICKER_MODELSELECTION_ENABLE)
Esempio n. 5
0
 def stopPaint(self):
     #    if self.paintActive:
     print "I: ShaderWrapper.stopPaint"
     texturePainter.stopEditor()
     texturePainter.disableEditor()
Esempio n. 6
0
 def stopPaint(self):
     #    if self.paintActive:
     print "I: ShaderWrapper.stopPaint"
     texturePainter.stopEditor()
     texturePainter.disableEditor()