Beispiel #1
0
    def __init__(self, worldColor,lightEnable,ParticleEnable, basedriveEnable,collision,
                 backface, texture, wireframe, grid, widgetVis, enableAutoCamera, parent = None, nodePath = render, **kw):
        self.worldColor = worldColor
        self.lightEnable = lightEnable
        self.ParticleEnable = ParticleEnable
        self.basedriveEnable = basedriveEnable
        self.collision = collision
        self.backface = backface
        self.texture = texture
        self.wireframe = wireframe
        self.grid = grid
        self.enableAutoCamera = enableAutoCamera
        self.widgetVis = widgetVis

        # Define the megawidget options.
        optiondefs = (
            ('title',       self.appname,       None),
            )
        self.defineoptions(kw, optiondefs)

        if parent == None:
            self.parent = Toplevel()
        else:
            self.parent = parent

        AppShell.__init__(self, self.parent)
        self.parent.geometry('%dx%d+%d+%d' % (self.frameWidth, self.frameHeight,self.frameIniPosX,self.frameIniPosY))

        self.parent.resizable(False,False) ## Disable the ability to resize for this Window.
    def __init__(self, listOfObj, controlType , dataList, parent = None, **kw):
        if controlType == 'Keyboard':
            self.nodePath = dataList[0] # Default setting -> mainly used for Keyboard control now.
            self.nameOfNode = self.nodePath.getName()
            self.controllType = 'Keyboard'
            self.keyboardMapDict.clear()
            self.keyboardMapDict = dataList[1]
            self.keyboardSpeedDict.clear()
            self.keyboardSpeedDict = dataList[2]

        self.listOfObj = listOfObj
        self.keepControl = False

        INITOPT = Pmw.INITOPT
        optiondefs = (
            ('title',               self.appname,       None),
            )
        self.defineoptions(kw, optiondefs)

        # Initialize the superclass
        AppShell.__init__(self)

        # Execute option callbacks
        self.initialiseoptions(controllerWindow)

        self.parent.resizable(False,False) ## Disable the ability to resize for this Window.
Beispiel #3
0
    def __init__(self, parent = None, **kw):
        INITOPT = Pmw.INITOPT
        optiondefs = (
            ('title',       self.appname,       None),
            ('nodePath',    SEditor.camera,      None),
            )
        self.defineoptions(kw, optiondefs)

        # Call superclass initialization function
        AppShell.__init__(self)

        self.initialiseoptions(Placer)

        # Accept the message from sceneEditor to update the information about the target nodePath
        self.accept('placerUpdate', self.updatePlacer)
Beispiel #4
0
    def __init__(self, parent=None, **kw):
        INITOPT = Pmw.INITOPT
        optiondefs = (
            ('title', self.appname, None),
            ('nodePath', SEditor.camera, None),
        )
        self.defineoptions(kw, optiondefs)

        # Call superclass initialization function
        AppShell.__init__(self)

        self.initialiseoptions(Placer)

        # Accept the message from sceneEditor to update the information about the target nodePath
        self.accept('placerUpdate', self.updatePlacer)
Beispiel #5
0
    def __init__(self, lightList, parent=None, **kw):
        self.lightList = lightList
        self.lightColor = [0.3 * 255, 0.3 * 255, 0.3 * 255]
        self.type = ''
        INITOPT = Pmw.INITOPT
        optiondefs = (('title', self.appname, None), )
        self.defineoptions(kw, optiondefs)

        # Initialize the superclass
        AppShell.__init__(self)

        # Execute option callbacks
        self.initialiseoptions(lightingPanel)

        self.parent.resizable(
            False, False)  ## Disable the ability to resize for this Window.
Beispiel #6
0
    def __init__(self, lightList, parent = None, **kw):
        self.lightList = lightList
        self.lightColor = [0.3*255,0.3*255,0.3*255]
        self.type = ''
        INITOPT = Pmw.INITOPT
        optiondefs = (
            ('title',               self.appname,       None),
            )
        self.defineoptions(kw, optiondefs)

        # Initialize the superclass
        AppShell.__init__(self)

        # Execute option callbacks
        self.initialiseoptions(lightingPanel)

        self.parent.resizable(False,False) ## Disable the ability to resize for this Window.
Beispiel #7
0
    def __init__(self,
                 worldColor,
                 lightEnable,
                 ParticleEnable,
                 basedriveEnable,
                 collision,
                 backface,
                 texture,
                 wireframe,
                 grid,
                 widgetVis,
                 enableAutoCamera,
                 parent=None,
                 nodePath=render,
                 **kw):
        self.worldColor = worldColor
        self.lightEnable = lightEnable
        self.ParticleEnable = ParticleEnable
        self.basedriveEnable = basedriveEnable
        self.collision = collision
        self.backface = backface
        self.texture = texture
        self.wireframe = wireframe
        self.grid = grid
        self.enableAutoCamera = enableAutoCamera
        self.widgetVis = widgetVis

        # Define the megawidget options.
        optiondefs = (('title', self.appname, None), )
        self.defineoptions(kw, optiondefs)

        if parent == None:
            self.parent = Toplevel()
        else:
            self.parent = parent

        AppShell.__init__(self, self.parent)
        self.parent.geometry('%dx%d+%d+%d' %
                             (self.frameWidth, self.frameHeight,
                              self.frameIniPosX, self.frameIniPosY))

        self.parent.resizable(
            False, False)  ## Disable the ability to resize for this Window.
Beispiel #8
0
 def __init__(self):
     self._log = logging.getLogger('BaseApp')
     self._num_surfaces = 1
     AppShell.__init__(self)
     self.initialiseoptions(BaseApp)
     self.createScene()