Browse Source

passing in camera name to makeCamera

Dave Schuyler 21 years ago
parent
commit
c456d9b515
1 changed files with 2 additions and 3 deletions
  1. 2 3
      direct/src/showbase/ShowBase.py

+ 2 - 3
direct/src/showbase/ShowBase.py

@@ -728,7 +728,7 @@ class ShowBase(DirectObject.DirectObject):
 
 
     def makeCamera(self, win, chan = None, layer = None, layerSort = 0,
     def makeCamera(self, win, chan = None, layer = None, layerSort = 0,
                    scene = None,
                    scene = None,
-                   displayRegion = (0, 1, 0, 1), aspectRatio = None):
+                   displayRegion = (0, 1, 0, 1), aspectRatio = None, camName = 'cam'):
         """
         """
         Makes a new 3-d camera associated with the indicated window,
         Makes a new 3-d camera associated with the indicated window,
         and creates a display region in the indicated subrectangle.
         and creates a display region in the indicated subrectangle.
@@ -754,7 +754,7 @@ class ShowBase(DirectObject.DirectObject):
             aspectRatio = self.getAspectRatio()
             aspectRatio = self.getAspectRatio()
 
 
         # Now make a new Camera node.
         # Now make a new Camera node.
-        camNode = Camera('cam')
+        camNode = Camera(camName)
         lens = PerspectiveLens()
         lens = PerspectiveLens()
         lens.setAspectRatio(aspectRatio)
         lens.setAspectRatio(aspectRatio)
             
             
@@ -1029,7 +1029,6 @@ class ShowBase(DirectObject.DirectObject):
         return self.physicsMgrEnabled
         return self.physicsMgrEnabled
 
 
     def updateManagers(self, state):
     def updateManagers(self, state):
-        """updateManagers(self)"""
         dt = globalClock.getDt()
         dt = globalClock.getDt()
         if (self.particleMgrEnabled == 1):
         if (self.particleMgrEnabled == 1):
             self.particleMgr.doParticles(dt)
             self.particleMgr.doParticles(dt)