Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
ShowBase Class Reference
Inheritance diagram for ShowBase:

## Public Member Functions
| __init__ (self, fStartDirect=True, windowType=None)
| addAngularIntegrator (self)
| addSfxManager (self, extraSfxManager)
| adjustWindowAspectRatio (self, aspectRatio)
| attachInputDevice (self, device, prefix=None, watch=False)
| backfaceCullingOff (self)
| backfaceCullingOn (self)
| changeMouseInterface (self, changeTo)
| closeWindow (self, win, keepCamera=False, removeWindow=True)
| createBaseAudioManagers (self)
| createStats (self, hostname=None, port=None)
| destroy (self)
| detachInputDevice (self, device)
| disableAllAudio (self)
| disableMouse (self)
| disableParticles (self)
| enableAllAudio (self)
| enableMouse (self)
| enableMusic (self, bEnableMusic)
| enableParticles (self)
| enableSoftwareMousePointer (self)
| enableSoundEffects (self, bEnableSoundEffects)
| finalizeExit (self)
| getAlt (self)
| getAspectRatio (self, win=None)
| getAxes (self)
| getBackgroundColor (self, win=None)
| getControl (self)
| getExitErrorCode (self)
| getMeta (self)
| getRepository (self)
| getShift (self)
| getSize (self, win=None)
| initShadowTrav (self)
| isParticleMgrEnabled (self)
| isPhysicsMgrEnabled (self)
| loadMusic (self, name)
| loadSfx (self, name)
| makeAllPipes (self)
| makeCamera (self, win, sort=0, scene=None, displayRegion=(0, 1, 0, 1), stereo=None, aspectRatio=None, clearDepth=0, clearColor=None, lens=None, camName='cam', mask=None, useCamera=None)
| makeCamera2d (self, win, sort=10, displayRegion=(0, 1, 0, 1), coords=(-1, 1, -1, 1), lens=None, cameraName=None)
| makeCamera2dp (self, win, sort=20, displayRegion=(0, 1, 0, 1), coords=(-1, 1, -1, 1), lens=None, cameraName=None)
| makeDefaultPipe (self, printPipeTypes=None)
| makeModulePipe (self, moduleName)
| movie (self, namePrefix='movie', duration=1.0, fps=30, format='png', sd=4, source=None)
| oobe (self, cam=None)
| oobeCull (self, cam=None)
| openDefaultWindow (self, *args, **kw)
| openMainWindow (self, *args, **kw)
| openWindow (self, props=None, fbprops=None, pipe=None, gsg=None, host=None, type=None, name=None, size=None, aspectRatio=None, makeCamera=True, keepCamera=False, scene=None, stereo=None, unexposedDraw=None, callbackWindowDict=None, requireWindow=None)
| playMusic (self, music, looping=0, interrupt=1, volume=None, time=0.0)
| playSfx (self, sfx, looping=0, interrupt=1, volume=None, time=0.0, node=None, listener=None, cutoff=None)
| popCTrav (self)
| printEnvDebugInfo (self)
| pushCTrav (self, cTrav)
| removeCameraFrustum (self)
| restart (self, clusterSync=False, cluster=None)
| reviveInput (self)
| run (self)
| saveCubeMap (self, namePrefix='cube_map_#.png', defaultFilename=0, source=None, camera=None, size=128, cameraMask=PandaNode.getAllCameraMask(), sourceLens=None)
| saveSphereMap (self, namePrefix='spheremap.png', defaultFilename=0, source=None, camera=None, size=256, cameraMask=PandaNode.getAllCameraMask(), numVertices=1000, sourceLens=None)
| screenshot (self, namePrefix='screenshot', defaultFilename=1, source=None, imageComment="")
| SetAllSfxEnables (self, bEnabled)
| setAspectRatio (self, aspectRatio)
| setBackgroundColor (self, r=None, g=None, b=None, a=0.0, win=None)
| setFrameRateMeter (self, flag)
| setMouseOnNode (self, newNode)
| setSceneGraphAnalyzerMeter (self, flag)
| setSleep (self, amount)
| setupDataGraph (self)
| setupMouse (self, win, fMultiWin=False)
| setupMouseCB (self, win)
| setupRender (self)
| setupRender2d (self)
| setupRender2dp (self)
| setupWindowControls (self, winCtrl=None)
| showCameraFrustum (self)
| shutdown (self)
| silenceInput (self)
| spawnTkLoop (self)
| spawnWxLoop (self)
| startDirect (self, fWantDirect=1, fWantTk=1, fWantWx=0)
| startTk (self, fWantTk=True)
| startWx (self, fWantWx=True)
| textureOff (self)
| textureOn (self)
| tkRun (self)
| toggleBackface (self)
| toggleParticles (self)
| toggleShowVertices (self)
| toggleTexMem (self)
| toggleTexture (self)
| toggleWireframe (self)
| updateManagers (self, state)
| useDrive (self)
| userExit (self)
| useTrackball (self)
| windowEvent (self, win)
| wireframeOff (self)
| wireframeOn (self)
| wxRun (self)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Public Attributes
| a2dBackground = self.aspect2d.attachNewNode("a2dBackground")
float | a2dBottom = -1.0
| The Z position of the bottom border of the aspect2d screen.
| a2dBottomCenter = self.aspect2d.attachNewNode("a2dBottomCenter")
| a2dBottomCenterNs = self.aspect2d.attachNewNode("a2dBottomCenterNS")
| a2dBottomLeft = self.aspect2d.attachNewNode("a2dBottomLeft")
| a2dBottomLeftNs = self.aspect2d.attachNewNode("a2dBottomLeftNS")
| a2dBottomRight = self.aspect2d.attachNewNode("a2dBottomRight")
| a2dBottomRightNs = self.aspect2d.attachNewNode("a2dBottomRightNS")
int | a2dLeft = -aspectRatio
| The X position of the left border of the aspect2d screen.
| a2dLeftCenter = self.aspect2d.attachNewNode("a2dLeftCenter")
| a2dLeftCenterNs = self.aspect2d.attachNewNode("a2dLeftCenterNS")
float | a2dpBottom = -1.0
| The Z position of the bottom border of the aspect2dp screen.
| a2dpBottomCenter = self.aspect2dp.attachNewNode("a2dpBottomCenter")
| a2dpBottomLeft = self.aspect2dp.attachNewNode("a2dpBottomLeft")
| a2dpBottomRight = self.aspect2dp.attachNewNode("a2dpBottomRight")
int | a2dpLeft = -aspectRatio
| The X position of the left border of the aspect2dp screen.
| a2dpLeftCenter = self.aspect2dp.attachNewNode("a2dpLeftCenter")
float | a2dpRight = aspectRatio
| The X position of the right border of the aspect2dp screen.
| a2dpRightCenter = self.aspect2dp.attachNewNode("a2dpRightCenter")
float | a2dpTop = 1.0
| The Z position of the top border of the aspect2dp screen.
| a2dpTopCenter = self.aspect2dp.attachNewNode("a2dpTopCenter")
| a2dpTopLeft = self.aspect2dp.attachNewNode("a2dpTopLeft")
| a2dpTopRight = self.aspect2dp.attachNewNode("a2dpTopRight")
float | a2dRight = aspectRatio
| The X position of the right border of the aspect2d screen.
| a2dRightCenter = self.aspect2d.attachNewNode("a2dRightCenter")
| a2dRightCenterNs = self.aspect2d.attachNewNode("a2dRightCenterNS")
float | a2dTop = 1.0
| The Z position of the top border of the aspect2d screen.
| a2dTopCenter = self.aspect2d.attachNewNode("a2dTopCenter")
| a2dTopCenterNs = self.aspect2d.attachNewNode("a2dTopCenterNS")
| a2dTopLeft = self.aspect2d.attachNewNode("a2dTopLeft")
| a2dTopLeftNs = self.aspect2d.attachNewNode("a2dTopLeftNS")
| a2dTopRight = self.aspect2d.attachNewNode("a2dTopRight")
| a2dTopRightNs = self.aspect2d.attachNewNode("a2dTopRightNS")
| app_runner = self.appRunner
int | AppHasAudioFocus = 1
| appRunner = AppRunnerGlobal.appRunner
| This contains the global appRunner instance, as imported from `.AppRunnerGlobal`.
int | appTrav = 0
| aspect2d = ShowBaseGlobal.aspect2d
| This is the root of the 2-D scene graph.
| aspect2dp = self.render2dp.attachNewNode(PGTop("aspect2dp"))
| The normal 2-d DisplayRegion has an aspect ratio that matches the window, but its coordinate system is square.
int | backfaceCullingEnabled = 1
| bboard = bulletinBoard
| The global bulletin board, as imported from `.BulletinBoardGlobal`.
| bufferViewer = BufferViewer(self.win, self.render2dp if self.wantRender2dp else self.render2d)
| Utility for viewing offscreen buffers, see :mod:`.BufferViewer`.
| buttonThrowers = None
| cam = None
| This is a :class:`~panda3d.core.NodePath` pointing to the :class:`~panda3d.core.Camera` object set up for the 3D scene.
| cam2d = None
| Same as `cam`, but for the 2D scene graph.
| cam2dp = None
| Same as `cam2d`, but for the 2D overlay scene graph.
| camera = None
| This is the :class:`~panda3d.core.NodePath` that should be used to manipulate the camera.
| camera2d = None
| Same as `camera`, but for the 2D scene graph.
| camera2dp = None
| Same as `camera2d`, but for the 2D overlay scene graph.
| camFrustumVis = None
| camLens = None
| Convenience accessor for base.camNode.get_lens(), containing a :class:`~panda3d.core.Lens` object.
list | camList = []
| A list of all cameras created with `makeCamera()`, including `cam`.
| camNode = None
| Convenience accessor for base.cam.node(), containing a :class:`~panda3d.core.Camera` object.
float | clientSleep = 0.0
| clock = clock
| This is the global :class:`~panda3d.core.ClockObject`.
| cluster = cluster
| clusterSyncFlag = clusterSyncFlag
int | cTrav = 0
| A placeholder for a :class:`~panda3d.core.CollisionTraverser`.
| cTravStack = Stack()
| dataRoot = NodePath('dataRoot')
| dataRootNode = self.dataRoot.node()
int | debugRunningMultiplier = 4
list | deviceButtonThrowers = []
| devices = InputDeviceManager.getGlobalPtr()
| This is the global :class:`~panda3d.core.InputDeviceManager`, which keeps track of connected input devices.
| dgTrav = DataGraphTraverser()
| direct = None
| drive = None
| eventMgr = eventMgr
| The global event manager, as imported from `.EventManagerGlobal`.
| exitFunc = None
| Fill this in with a function to invoke when the user "exits" the program by closing the main window.
list | finalExitCallbacks = []
| Add final-exit callbacks to this list.
| frameRateMeter = None
| graphics_engine = self.graphicsEngine
| graphicsEngine = GraphicsEngine.getGlobalPtr()
| The global :class:`~panda3d.core.GraphicsEngine`, as returned by GraphicsEngine.getGlobalPtr()
| hidden = ShowBaseGlobal.hidden
| jobMgr = jobMgr
| The global job manager, as imported from `.JobManagerGlobal`.
| loader = Loader.Loader(self)
| `.Loader.Loader` object.
| main_dir = self.mainDir
| mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR")
| The directory containing the main Python file of this application.
int | mainWinForeground = 0
int | mainWinMinimized = 0
| messenger = messenger
| The global messenger, as imported from `.MessengerGlobal`.
| mouse2cam = None
| mouseInterface = None
| mouseInterfaceNode = self.mouseInterface.node()
| mouseWatcher = None
| mouseWatcherNode = None
| The :class:`~panda3d.core.MouseWatcher` object, created by `setupMouse()`.
int | multiClientSleep = 1
| musicActive = self.config.GetBool('audio-music-active', 1)
| musicManager = None
| musicManagerIsValid = None
int | nextWindowIndex = 1
| onScreenDebug = OnScreenDebug.OnScreenDebug()
| oobe2cam = self.oobeTrackball.attachNewNode(Transform2SG('oobe2cam'))
| oobeCamera = self.hidden.attachNewNode('oobeCamera')
| oobeCameraTrackball = self.oobeCamera.attachNewNode('oobeCameraTrackball')
| oobeCullFrustum = None
| oobeLens = PerspectiveLens()
int | oobeMode = 0
| oobeTrackball = NodePath(Trackball('oobeTrackball'))
| oobeVis = loader.loadModel('models/misc/camera', okMissing = True)
| particleMgr = None
| If `enableParticles()` has been called, this is the particle manager as imported from :mod:`direct.particles.ParticleManagerGlobal`.
int | particleMgrEnabled = 0
| physicsMgr = None
| If `enableParticles()` has been called, this is the physics manager as imported from :mod:`direct.showbase.PhysicsManagerGlobal`.
int | physicsMgrAngular = 0
int | physicsMgrEnabled = 0
list | pipe = None
| Contains the :class:`~panda3d.core.GraphicsPipe` object created by `makeDefaultPipe()`.
list | pipeList = []
| The full list of :class:`~panda3d.core.GraphicsPipe` objects, including any auxiliary pipes.
| pixel2d = self.render2d.attachNewNode(PGTop("pixel2d"))
| This special root, pixel2d, uses units in pixels that are relative to the window.
| pixel2dp = self.render2dp.attachNewNode(PGTop("pixel2dp"))
| This special root, pixel2dp, uses units in pixels that are relative to the window.
| pointerWatcherNodes = None
| recorder = None
| render = NodePath('render')
| This is the root of the 3-D scene graph.
| render2d
| This is the root of the 2-D scene graph.
| render2dp = NodePath('render2dp')
| requireWindow = self.config.GetBool('require-window', 1)
| run = self.wxRun
| sceneGraphAnalyzerMeter = None
| screenshotExtension = self.config.GetString('screenshot-extension', 'jpg')
| sfxActive = self.config.GetBool('audio-sfx-active', 1)
list | sfxManagerIsValidList = []
list | sfxManagerList = []
| sfxPlayer = SfxPlayer.SfxPlayer()
int | shadowTrav = 0
| showVertices = None
| task_mgr = taskMgr
| taskMgr = taskMgr
| The global task manager, as imported from `.TaskManagerGlobal`.
| texmem = None
int | textureEnabled = 1
| timeButtonThrower = mw.attachNewNode(ButtonThrower('timeButtons'))
| A special ButtonThrower to generate keyboard events and include the time from the OS.
| tkDelay = int(1000.0 / tkFrameRate.getValue())
| tkRoot = None
bool | tkRootCreated = False
| trackball = None
| transitions = Transitions.Transitions(self.loader)
| `.Transitions.Transitions` object.
| updateManagers = 1
bool | wantDirect = False
| wantFog = self.config.GetBool('want-fog', 1)
| wantRender2dp = self.config.GetBool('want-render2dp', 1)
| wantStats = self.config.GetBool('want-pstats', 0)
bool | wantTk = False
bool | wantWx = False
| win = None
| This is the main, or only window; see `winList` for a list of all windows.
list | winControls = []
| windowEvent
| windowType = windowType
| This is set to the value of the window-type config variable, but may optionally be overridden in the Showbase constructor.
list | winList = []
| A list of all windows opened via `openWindow()`.
int | wireframeEnabled = 0
| wxApp = None
| This is used to store the wx.Application object used when want-wx is set or `startWx()` is called.
bool | wxAppCreated = False
| wxTimer = wx.Timer(self.wxApp)

## Static Public Attributes
| add_angular_integrator = addAngularIntegrator
| add_sfx_manager = addSfxManager
| attach_input_device = attachInputDevice
| backface_culling_off = backfaceCullingOff
| backface_culling_on = backfaceCullingOn
| change_mouse_interface = changeMouseInterface
| close_window = closeWindow
| config = DConfig
| The deprecated `.DConfig` interface for accessing config variables.
| create_stats = createStats
| detach_input_device = detachInputDevice
| disable_all_audio = disableAllAudio
| disable_mouse = disableMouse
| disable_particles = disableParticles
| enable_all_audio = enableAllAudio
| enable_mouse = enableMouse
| enable_music = enableMusic
| enable_particles = enableParticles
| enable_software_mouse_pointer = enableSoftwareMousePointer
| enable_sound_effects = enableSoundEffects
| get_aspect_ratio = getAspectRatio
| get_background_color = getBackgroundColor
| get_size = getSize
| init_shadow_trav = initShadowTrav
| make_all_pipes = makeAllPipes
| make_camera = makeCamera
| make_camera2d = makeCamera2d
| make_camera2dp = makeCamera2dp
| make_default_pipe = makeDefaultPipe
| make_module_pipe = makeModulePipe
| notify = directNotify.newCategory("ShowBase")
| oobe_cull = oobeCull
| open_default_window = openDefaultWindow
| open_main_window = openMainWindow
| open_window = openWindow
| remove_camera_frustum = removeCameraFrustum
| revive_input = reviveInput
| save_cube_map = saveCubeMap
| save_sphere_map = saveSphereMap
| set_aspect_ratio = setAspectRatio
| set_background_color = setBackgroundColor
| set_frame_rate_meter = setFrameRateMeter
| set_mouse_on_node = setMouseOnNode
| set_scene_graph_analyzer_meter = setSceneGraphAnalyzerMeter
| set_sleep = setSleep
| setup_data_graph = setupDataGraph
| setup_mouse = setupMouse
| setup_mouse_cb = setupMouseCB
| setup_render = setupRender
| setup_render2d = setupRender2d
| setup_render2dp = setupRender2dp
| setup_window_controls = setupWindowControls
| show_camera_frustum = showCameraFrustum
| silence_input = silenceInput
| start_direct = startDirect
| start_tk = startTk
| start_wx = startWx
| texture_off = textureOff
| texture_on = textureOn
| toggle_backface = toggleBackface
| toggle_particles = toggleParticles
| toggle_show_vertices = toggleShowVertices
| toggle_tex_mem = toggleTexMem
| toggle_texture = toggleTexture
| toggle_wireframe = toggleWireframe
| use_drive = useDrive
| use_trackball = useTrackball
| user_exit = userExit
| wireframe_off = wireframeOff
| wireframe_on = wireframeOn
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Protected Member Functions
| _doOpenWindow (self, props=None, fbprops=None, pipe=None, gsg=None, host=None, type=None, name=None, size=None, aspectRatio=None, makeCamera=True, keepCamera=False, scene=None, stereo=None, unexposedDraw=None, callbackWindowDict=None)
| _movieTask (self, state)
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)

## Additional Inherited Members
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | fStartDirect = True,
|  |  | windowType = None )

    Opens a window, sets up a 3-D and several 2-D scene graphs, and
    everything else needed to render the scene graph to the window.

    To prevent a window from being opened, set windowType to the string
    'none' (or 'offscreen' to create an offscreen buffer).  If this is not
    specified, the default value is taken from the 'window-type'
    configuration variable.

    This constructor will add various things to the Python builtins scope,
    including this instance itself (under the name ``base``).

## Member Function Documentation

## ◆ _doOpenWindow()

_doOpenWindow | ( |  | self,
|  |  | props = None,
|  |  | fbprops = None,
|  |  | pipe = None,
|  |  | gsg = None,
|  |  | host = None,
|  |  | type = None,
|  |  | name = None,
|  |  | size = None,
|  |  | aspectRatio = None,
|  |  | makeCamera = True,
|  |  | keepCamera = False,
|  |  | scene = None,
|  |  | stereo = None,
|  |  | unexposedDraw = None,
|  |  | callbackWindowDict = None )
| protected

## ◆ _movieTask()

_movieTask | ( |  | self,
|  |  | state )
| protected

## ◆ addAngularIntegrator()

addAngularIntegrator | ( |  | self | ) |

    Adds a :class:`~panda3d.physics.AngularEulerIntegrator` to the default
    physics manager.  By default, only a
    :class:`~panda3d.physics.LinearEulerIntegrator` is attached.

## ◆ addSfxManager()

addSfxManager | ( |  | self,
|  |  | extraSfxManager )

    Adds an additional SFX audio manager to `sfxManagerList`, the list of
    managers managed by ShowBase.

## ◆ adjustWindowAspectRatio()

adjustWindowAspectRatio | ( |  | self,
|  |  | aspectRatio )

     This function is normally called internally by
    `windowEvent()`, but it may also be called to explicitly adjust
    the aspect ratio of the render/render2d DisplayRegion, by a
    class that has redefined these.

## ◆ attachInputDevice()

attachInputDevice | ( |  | self,
|  |  | device,
|  |  | prefix = None,
|  |  | watch = False )

    This function attaches an input device to the data graph, which will
    cause the device to be polled and generate events.  If a prefix is
    given and not None, it is used to prefix events generated by this
    device, separated by a hyphen.

    The watch argument can be set to True (as of Panda3D 1.10.3) to set up
    the default MouseWatcher to receive inputs from this device, allowing
    it to be polled via mouseWatcherNode and control user interfaces.
    Setting this to True will also make it generate unprefixed events,
    regardless of the specified prefix.

    If you call this, you should consider calling detachInputDevice when
    you are done with the device or when it is disconnected.

## ◆ backfaceCullingOff()

backfaceCullingOff | ( |  | self | ) |

    Enables two-sided rendering on the entire 3D scene graph.

## ◆ backfaceCullingOn()

backfaceCullingOn | ( |  | self | ) |

    Disables two-sided rendering on the entire 3D scene graph.

## ◆ changeMouseInterface()

changeMouseInterface | ( |  | self,
|  |  | changeTo )

    Change the mouse interface used to control the camera.

## ◆ closeWindow()

closeWindow | ( |  | self,
|  |  | win,
|  |  | keepCamera = False,
|  |  | removeWindow = True )

    Closes the indicated window and removes it from the list of
    windows.  If it is the main window, clears the main window
    pointer to None.

## ◆ createBaseAudioManagers()

createBaseAudioManagers | ( |  | self | ) |

    Creates the default SFX and music manager.  Called automatically from
    the ShowBase constructor.

## ◆ createStats()

createStats | ( |  | self,
|  |  | hostname = None,
|  |  | port = None )

    If want-pstats is set in Config.prc, or the `wantStats` member is
    otherwise set to True, connects to the PStats server.
    This is normally called automatically from the ShowBase constructor.

## ◆ destroy()

destroy | ( |  | self | ) |

     Call this function to destroy the ShowBase and stop all
    its tasks, freeing all of the Panda resources.  Normally, you
    should not need to call it explicitly, as it is bound to the
    exitfunc and will be called at application exit time
    automatically.

    This function is designed to be safe to call multiple times.

## ◆ detachInputDevice()

detachInputDevice | ( |  | self,
|  |  | device )

    This should be called after attaching an input device using
    attachInputDevice and the device is disconnected or you no longer wish
    to keep polling this device for events.

    You do not strictly need to call this if you expect the device to be
    reconnected (but be careful that you don't reattach it).

## ◆ disableAllAudio()

disableAllAudio | ( |  | self | ) |

    Disables all SFX and music managers, meant to be called when the app
    loses audio focus.

## ◆ disableMouse()

disableMouse | ( |  | self | ) |

    Temporarily disable the mouse control of the camera, either
    via the drive interface or the trackball, whichever is
    currently in use.

## ◆ disableParticles()

disableParticles | ( |  | self | ) |

    The opposite of `enableParticles()`.

## ◆ enableAllAudio()

enableAllAudio | ( |  | self | ) |

    Reenables the SFX and music managers that were active at the time
    `disableAllAudio()` was called.  Meant to be called when the app regains
    audio focus.

## ◆ enableMouse()

enableMouse | ( |  | self | ) |

    Reverse the effect of a previous call to `disableMouse()`.
    `useDrive()` also implicitly enables the mouse.

## ◆ enableMusic()

enableMusic | ( |  | self,
|  |  | bEnableMusic )

    Enables or disables the music manager.

## ◆ enableParticles()

enableParticles | ( |  | self | ) |

    Enables the particle and physics managers, which are stored in
    `particleMgr` and `physicsMgr` members, respectively.  Also starts a
    task to periodically update these managers.

    By default, only a :class:`~panda3d.physics.LinearEulerIntegrator` is
    attached to the physics manager.  To attach an angular integrator,
    follow this up with a call to `addAngularIntegrator()`.

## ◆ enableSoftwareMousePointer()

enableSoftwareMousePointer | ( |  | self | ) |

    Creates some geometry and parents it to render2d to show
    the currently-known mouse position.  Useful if the mouse
    pointer is invisible for some reason.

## ◆ enableSoundEffects()

enableSoundEffects | ( |  | self,
|  |  | bEnableSoundEffects )

    Enables or disables SFX managers.

## ◆ finalizeExit()

finalizeExit | ( |  | self | ) |

    Called by `userExit()` to quit the application.  The default
    implementation just calls `sys.exit()`.

## ◆ getAlt()

getAlt | ( |  | self | ) |

    Returns True if the alt key is currently held down.

## ◆ getAspectRatio()

getAspectRatio | ( |  | self,
|  |  | win = None )

## ◆ getAxes()

getAxes | ( |  | self | ) |

    Loads and returns the ``models/misc/xyzAxis.bam`` model.

    :rtype: panda3d.core.NodePath

## ◆ getBackgroundColor()

getBackgroundColor | ( |  | self,
|  |  | win = None )

    Returns the current window background color.  This assumes
    the window is set up to clear the color each frame (this is
    the normal setting).

    :rtype: panda3d.core.VBase4

## ◆ getControl()

getControl | ( |  | self | ) |

    Returns True if the control key is currently held down.

## ◆ getExitErrorCode()

getExitErrorCode | ( |  | self | ) |

## ◆ getMeta()

getMeta | ( |  | self | ) |

    Returns True if the meta key is currently held down.

## ◆ getRepository()

getRepository | ( |  | self | ) |

## ◆ getShift()

getShift | ( |  | self | ) |

    Returns True if the shift key is currently held down.

## ◆ getSize()

getSize | ( |  | self,
|  |  | win = None )

    Returns the actual size of the indicated (or main window), or the
    default size if there is not yet a main window.

## ◆ initShadowTrav()

initShadowTrav | ( |  | self | ) |

## ◆ isParticleMgrEnabled()

isParticleMgrEnabled | ( |  | self | ) |

    Returns True if `enableParticles()` has been called.

## ◆ isPhysicsMgrEnabled()

isPhysicsMgrEnabled | ( |  | self | ) |

    Returns True if `enableParticles()` has been called.

## ◆ loadMusic()

loadMusic | ( |  | self,
|  |  | name )

    :deprecated: Use `.Loader.Loader.loadMusic()` instead.

## ◆ loadSfx()

loadSfx | ( |  | self,
|  |  | name )

    :deprecated: Use `.Loader.Loader.loadSfx()` instead.

## ◆ makeAllPipes()

makeAllPipes | ( |  | self | ) |

    Creates all GraphicsPipes that the system knows about and fill up
    `pipeList` with them.

## ◆ makeCamera()

makeCamera | ( |  | self,
|  |  | win,
|  |  | sort = 0,
|  |  | scene = None,
|  |  | displayRegion = (0, 1, 0, 1),
|  |  | stereo = None,
|  |  | aspectRatio = None,
|  |  | clearDepth = 0,
|  |  | clearColor = None,
|  |  | lens = None,
|  |  | camName = 'cam',
|  |  | mask = None,
|  |  | useCamera = None )

    Makes a new 3-d camera associated with the indicated window,
    and creates a display region in the indicated subrectangle.

    If stereo is True, then a stereo camera is created, with a
    pair of DisplayRegions.  If stereo is False, then a standard
    camera is created.  If stereo is None or omitted, a stereo
    camera is created if the window says it can render in stereo.

    If useCamera is not None, it is a NodePath to be used as the
    camera to apply to the window, rather than creating a new
    camera.

    :rtype: panda3d.core.NodePath

Reimplemented in ThreeUpShow.

## ◆ makeCamera2d()

makeCamera2d | ( |  | self,
|  |  | win,
|  |  | sort = 10,
|  |  | displayRegion = (0, 1, 0, 1),
|  |  | coords = (-1, 1, -1, 1),
|  |  | lens = None,
|  |  | cameraName = None )

    Makes a new camera2d associated with the indicated window, and
    assigns it to render the indicated subrectangle of render2d.

    :rtype: panda3d.core.NodePath

## ◆ makeCamera2dp()

makeCamera2dp | ( |  | self,
|  |  | win,
|  |  | sort = 20,
|  |  | displayRegion = (0, 1, 0, 1),
|  |  | coords = (-1, 1, -1, 1),
|  |  | lens = None,
|  |  | cameraName = None )

    Makes a new camera2dp associated with the indicated window, and
    assigns it to render the indicated subrectangle of render2dp.

    :rtype: panda3d.core.NodePath

## ◆ makeDefaultPipe()

makeDefaultPipe | ( |  | self,
|  |  | printPipeTypes = None )

    Creates the default GraphicsPipe, which will be used to make
    windows unless otherwise specified.

## ◆ makeModulePipe()

makeModulePipe | ( |  | self,
|  |  | moduleName )

    Returns a GraphicsPipe from the indicated module,
    e.g. 'pandagl' or 'pandadx9'.  Does not affect base.pipe or
    base.pipeList.

    :rtype: panda3d.core.GraphicsPipe

## ◆ movie()

movie | ( |  | self,
|  |  | namePrefix = 'movie',
|  |  | duration = 1.0,
|  |  | fps = 30,
|  |  | format = 'png',
|  |  | sd = 4,
|  |  | source = None )

    Spawn a task to capture a movie using the screenshot function.

    Args:
        namePrefix (str): used to form output file names (can
            include path information (e.g. '/i/beta/frames/myMovie')
        duration (float): the length of the movie in seconds
        fps (float): the frame rate of the resulting movie
        format (str): specifies output file format (e.g. png, bmp)
        sd (int): specifies number of significant digits for frame
            count in the output file name (e.g. if sd = 4, the name
            will be something like movie_0001.png)
        source: the Window, Buffer, DisplayRegion, or Texture from
            which to save the resulting images.  The default is the
            main window.

    Returns:
        A `~direct.task.Task` that can be awaited.

## ◆ oobe()

oobe | ( |  | self,
|  |  | cam = None )

    Enable a special "out-of-body experience" mouse-interface
    mode.  This can be used when a "god" camera is needed; it
    moves the camera node out from under its normal node and sets
    the world up in trackball state.  Button events are still sent
    to the normal mouse action node (e.g. the DriveInterface), and
    mouse events, if needed, may be sent to the normal node by
    holding down the Control key.

    This is different than `useTrackball()`, which simply changes
    the existing mouse action to a trackball interface.  In fact,
    OOBE mode doesn't care whether `useDrive()` or `useTrackball()` is
    in effect; it just temporarily layers a new trackball
    interface on top of whatever the basic interface is.  You can
    even switch between `useDrive()` and `useTrackball()` while OOBE
    mode is in effect.

    This is a toggle; the second time this function is called, it
    disables the mode.

## ◆ oobeCull()

oobeCull | ( |  | self,
|  |  | cam = None )

    While in OOBE mode (see above), cull the viewing frustum as if
    it were still attached to our original camera.  This allows us
    to visualize the effectiveness of our bounding volumes.

## ◆ openDefaultWindow()

openDefaultWindow | ( |  | self,
|  | * | args,
|  | ** | kw )

    Creates the main window for the first time, without being too
    particular about the kind of graphics API that is chosen.
    The suggested window type from the load-display config variable is
    tried first; if that fails, the first window type that can be
    successfully opened at all is accepted.

    This is intended to be called only once, at application startup.
    It is normally called automatically unless window-type is configured
    to 'none'.

    :returns: True on success, False on failure.

## ◆ openMainWindow()

openMainWindow | ( |  | self,
|  | * | args,
|  | ** | kw )

    Creates the initial, main window for the application, and sets
    up the mouse and render2d structures appropriately for it.  If
    this method is called a second time, it will close the
    previous main window and open a new one, preserving the lens
    properties in base.camLens.

    :returns: True on success, or False on failure (in which case base.win
              may be either None, or the previous, closed window).

## ◆ openWindow()

openWindow | ( |  | self,
|  |  | props = None,
|  |  | fbprops = None,
|  |  | pipe = None,
|  |  | gsg = None,
|  |  | host = None,
|  |  | type = None,
|  |  | name = None,
|  |  | size = None,
|  |  | aspectRatio = None,
|  |  | makeCamera = True,
|  |  | keepCamera = False,
|  |  | scene = None,
|  |  | stereo = None,
|  |  | unexposedDraw = None,
|  |  | callbackWindowDict = None,
|  |  | requireWindow = None )

    Creates a window and adds it to the list of windows that are
    to be updated every frame.

    :param props: the :class:`~panda3d.core.WindowProperties` that
                  describes the window.

    :param fbprops: the :class:`~panda3d.core.FrameBufferProperties`
                    indicating the requested framebuffer properties.

    :param type: Either 'onscreen', 'offscreen', or 'none'.

    :param keepCamera: If True, the existing base.cam is set up to
                       render into the new window.

    :param makeCamera: If True (and keepCamera is False), a new camera is
                       set up to render into the new window.

    :param unexposedDraw: If not None, it specifies the initial value
                          of :meth:`~panda3d.core.GraphicsWindow.setUnexposedDraw()`.

    :param callbackWindowDict: If not None, a
                               :class:`~panda3d.core.CallbackGraphicsWindow`
                               is created instead, which allows the caller
                               to create the actual window with its own
                               OpenGL context, and direct Panda's rendering
                               into that window.

    :param requireWindow: If True, the function should raise an exception
                          if the window fails to open correctly.

    :rtype: panda3d.core.GraphicsWindow

## ◆ playMusic()

playMusic | ( |  | self,
|  |  | music,
|  |  | looping = 0,
|  |  | interrupt = 1,
|  |  | volume = None,
|  |  | time = 0.0 )

## ◆ playSfx()

playSfx | ( |  | self,
|  |  | sfx,
|  |  | looping = 0,
|  |  | interrupt = 1,
|  |  | volume = None,
|  |  | time = 0.0,
|  |  | node = None,
|  |  | listener = None,
|  |  | cutoff = None )

## ◆ popCTrav()

popCTrav | ( |  | self | ) |

## ◆ printEnvDebugInfo()

printEnvDebugInfo | ( |  | self | ) |

    Print some information about the environment that we are running
    in.  Stuff like the model paths and other paths.  Feel free to
    add stuff to this.

## ◆ pushCTrav()

pushCTrav | ( |  | self,
|  |  | cTrav )

## ◆ removeCameraFrustum()

removeCameraFrustum | ( |  | self | ) |

## ◆ restart()

restart | ( |  | self,
|  |  | clusterSync = False,
|  |  | cluster = None )

## ◆ reviveInput()

reviveInput | ( |  | self | ) |

    Restores inputs after a previous call to `silenceInput()`.

## ◆ run()

run | ( |  | self | ) |

    This method runs the :class:`~direct.task.Task.TaskManager`
    when ``self.appRunner is None``, which is to say, when we are
    not running from within a p3d file.  When we *are* within a p3d
    file, the Panda3D runtime has to be responsible for running the
    main loop, so we can't allow the application to do it.

## ◆ saveCubeMap()

saveCubeMap | ( |  | self,
|  |  | namePrefix = 'cube_map_#.png',
|  |  | defaultFilename = 0,
|  |  | source = None,
|  |  | camera = None,
|  |  | size = 128,
|  |  | cameraMask = PandaNode.getAllCameraMask(),
|  |  | sourceLens = None )

    Similar to :meth:`screenshot()`, this sets up a temporary cube
    map Texture which it uses to take a series of six snapshots of
    the current scene, one in each of the six cube map directions.
    This requires rendering a new frame.

    Unlike `screenshot()`, source may only be a GraphicsWindow,
    GraphicsBuffer, or DisplayRegion; it may not be a Texture.

    camera should be the node to which the cubemap cameras will be
    parented.  The default is the camera associated with source,
    if source is a DisplayRegion, or base.camera otherwise.

    :returns: The filename if successful, or None if there is a problem.

## ◆ saveSphereMap()

saveSphereMap | ( |  | self,
|  |  | namePrefix = 'spheremap.png',
|  |  | defaultFilename = 0,
|  |  | source = None,
|  |  | camera = None,
|  |  | size = 256,
|  |  | cameraMask = PandaNode.getAllCameraMask(),
|  |  | numVertices = 1000,
|  |  | sourceLens = None )

    This works much like :meth:`saveCubeMap()`, and uses the
    graphics API's hardware cube-mapping ability to get a 360-degree
    view of the world.  But then it converts the six cube map faces
    into a single fisheye texture, suitable for applying as a static
    environment map (sphere map).

    For eye-relative static environment maps, sphere maps are often
    preferable to cube maps because they require only a single
    texture and because they are supported on a broader range of
    hardware.

    :returns: The filename if successful, or None if there is a problem.

## ◆ screenshot()

screenshot | ( |  | self,
|  |  | namePrefix = 'screenshot',
|  |  | defaultFilename = 1,
|  |  | source = None,
|  |  | imageComment = "" )

     Captures a screenshot from the main window or from the
    specified window or Texture and writes it to a filename in the
    current directory (or to a specified directory).

    If defaultFilename is True, the filename is synthesized by
    appending namePrefix to a default filename suffix (including
    the filename extension) specified in the Config variable
    screenshot-filename.  Otherwise, if defaultFilename is False,
    the entire namePrefix is taken to be the filename to write,
    and this string should include a suitable filename extension
    that will be used to determine the type of image file to
    write.

    Normally, the source is a GraphicsWindow, GraphicsBuffer or
    DisplayRegion.  If a Texture is supplied instead, it must have
    a ram image (that is, if it was generated by
    makeTextureBuffer() or makeCubeMap(), the parameter toRam
    should have been set true).  If it is a cube map texture as
    generated by makeCubeMap(), namePrefix should contain the hash
    mark ('#') character.

    :returns: The filename if successful, or None if there is a problem.

## ◆ SetAllSfxEnables()

SetAllSfxEnables | ( |  | self,
|  |  | bEnabled )

    Calls ``setActive(bEnabled)`` on all valid SFX managers.

## ◆ setAspectRatio()

setAspectRatio | ( |  | self,
|  |  | aspectRatio )

     Sets the global aspect ratio of the main window.  Set it
    to None to restore automatic scaling.

## ◆ setBackgroundColor()

setBackgroundColor | ( |  | self,
|  |  | r = None,
|  |  | g = None,
|  |  | b = None,
|  |  | a = 0.0,
|  |  | win = None )

    Sets the window background color to the indicated value.
    This assumes the window is set up to clear the color each
    frame (this is the normal setting).

    The color may be either a VBase3 or a VBase4, or a 3-component
    tuple, or the individual r, g, b parameters.

## ◆ setFrameRateMeter()

setFrameRateMeter | ( |  | self,
|  |  | flag )

    Turns on or off (according to flag) a standard frame rate
    meter in the upper-right corner of the main window.

## ◆ setMouseOnNode()

setMouseOnNode | ( |  | self,
|  |  | newNode )

## ◆ setSceneGraphAnalyzerMeter()

setSceneGraphAnalyzerMeter | ( |  | self,
|  |  | flag )

    Turns on or off (according to flag) a standard frame rate
    meter in the upper-right corner of the main window.

## ◆ setSleep()

setSleep | ( |  | self,
|  |  | amount )

    Sets up a task that calls python 'sleep' every frame.  This is a simple
    way to reduce the CPU usage (and frame rate) of a panda program.

## ◆ setupDataGraph()

setupDataGraph | ( |  | self | ) |

    Creates the data graph and populates it with the basic input
    devices.

## ◆ setupMouse()

setupMouse | ( |  | self,
|  |  | win,
|  |  | fMultiWin = False )

    Creates the structures necessary to monitor the mouse input,
    using the indicated window.  If the mouse has already been set
    up for a different window, those structures are deleted first.

    :param fMultiWin: If True, then the previous mouse structures are not
                      deleted; instead, multiple windows are allowed to
                      monitor the mouse input.  However, in this case, the
                      trackball controls are not set up, and must be set up
                      by hand if desired.

    :returns: The ButtonThrower NodePath created for this window.

## ◆ setupMouseCB()

setupMouseCB | ( |  | self,
|  |  | win )

## ◆ setupRender()

setupRender | ( |  | self | ) |

    Creates the render scene graph, the primary scene graph for
    rendering 3-d geometry.

## ◆ setupRender2d()

setupRender2d | ( |  | self | ) |

    Creates the render2d scene graph, the primary scene graph for
    2-d objects and gui elements that are superimposed over the
    3-d geometry in the window.

## ◆ setupRender2dp()

setupRender2dp | ( |  | self | ) |

    Creates a render2d scene graph, the secondary scene graph for
    2-d objects and gui elements that are superimposed over the
    2-d and 3-d geometry in the window.

## ◆ setupWindowControls()

setupWindowControls | ( |  | self,
|  |  | winCtrl = None )

## ◆ showCameraFrustum()

showCameraFrustum | ( |  | self | ) |

## ◆ shutdown()

shutdown | ( |  | self | ) |

## ◆ silenceInput()

silenceInput | ( |  | self | ) |

    This is a heavy-handed way of temporarily turning off
    all inputs.  Bring them back with `reviveInput()`.

## ◆ spawnTkLoop()

spawnTkLoop | ( |  | self | ) |

     Call this method to hand the main loop over to Tkinter.
    This sets up a timer callback so that Panda still gets
    updated, but Tkinter owns the main loop (which seems to make
    it happier than the other way around).

## ◆ spawnWxLoop()

spawnWxLoop | ( |  | self | ) |

     Call this method to hand the main loop over to wxPython.
    This sets up a wxTimer callback so that Panda still gets
    updated, but wxPython owns the main loop (which seems to make
    it happier than the other way around).

## ◆ startDirect()

startDirect | ( |  | self,
|  |  | fWantDirect = 1,
|  |  | fWantTk = 1,
|  |  | fWantWx = 0 )

## ◆ startTk()

startTk | ( |  | self,
|  |  | fWantTk = True )

## ◆ startWx()

startWx | ( |  | self,
|  |  | fWantWx = True )

## ◆ textureOff()

textureOff | ( |  | self | ) |

    Disables texturing on the entire 3D scene graph.

## ◆ textureOn()

textureOn | ( |  | self | ) |

    Undoes the effects of a previous call to `textureOff()`.

## ◆ tkRun()

tkRun | ( |  | self | ) |

     This method replaces `run()` after we have called `spawnTkLoop()`.
    Since at this point Tkinter now owns the main loop, this method is a
    call to tkRoot.mainloop().

## ◆ toggleBackface()

toggleBackface | ( |  | self | ) |

    Toggles between `backfaceCullingOn()` and `backfaceCullingOff()`.

## ◆ toggleParticles()

toggleParticles | ( |  | self | ) |

    Calls `enableParticles()` or `disableParticles()` depending on the
    current state.

## ◆ toggleShowVertices()

toggleShowVertices | ( |  | self | ) |

     Toggles a mode that visualizes vertex density per screen
    area.

## ◆ toggleTexMem()

toggleTexMem | ( |  | self | ) |

    Toggles a handy texture memory watcher utility.
    See :mod:`direct.showutil.TexMemWatcher` for more information.

## ◆ toggleTexture()

toggleTexture | ( |  | self | ) |

    Toggles between `textureOn()` and `textureOff()`.

## ◆ toggleWireframe()

toggleWireframe | ( |  | self | ) |

    Toggles between `wireframeOn()` and `wireframeOff()`.

## ◆ updateManagers()

updateManagers | ( |  | self,
|  |  | state )

## ◆ useDrive()

useDrive | ( |  | self | ) |

    Changes the mouse interface used for camera control to drive mode.

## ◆ userExit()

userExit | ( |  | self | ) |

## ◆ useTrackball()

useTrackball | ( |  | self | ) |

    Changes the mouse interface used for camera control to trackball mode.

## ◆ windowEvent()

windowEvent | ( |  | self,
|  |  | win )

## ◆ wireframeOff()

wireframeOff | ( |  | self | ) |

    Undoes the effects of a previous call to `wireframeOn()`.

## ◆ wireframeOn()

wireframeOn | ( |  | self | ) |

    Enables wireframe rendering on the entire 3D scene graph.

## ◆ wxRun()

wxRun | ( |  | self | ) |

     This method replaces `run()` after we have called `spawnWxLoop()`.
    Since at this point wxPython now owns the main loop, this method is a
    call to wxApp.MainLoop().

## Member Data Documentation

## ◆ a2dBackground

a2dBackground = self.aspect2d.attachNewNode("a2dBackground")

## ◆ a2dBottom

a2dBottom = -1.0

The Z position of the bottom border of the aspect2d screen.

## ◆ a2dBottomCenter

a2dBottomCenter = self.aspect2d.attachNewNode("a2dBottomCenter")

## ◆ a2dBottomCenterNs

a2dBottomCenterNs = self.aspect2d.attachNewNode("a2dBottomCenterNS")

## ◆ a2dBottomLeft

a2dBottomLeft = self.aspect2d.attachNewNode("a2dBottomLeft")

## ◆ a2dBottomLeftNs

a2dBottomLeftNs = self.aspect2d.attachNewNode("a2dBottomLeftNS")

## ◆ a2dBottomRight

a2dBottomRight = self.aspect2d.attachNewNode("a2dBottomRight")

## ◆ a2dBottomRightNs

a2dBottomRightNs = self.aspect2d.attachNewNode("a2dBottomRightNS")

## ◆ a2dLeft

a2dLeft = -aspectRatio

The X position of the left border of the aspect2d screen.

## ◆ a2dLeftCenter

a2dLeftCenter = self.aspect2d.attachNewNode("a2dLeftCenter")

## ◆ a2dLeftCenterNs

a2dLeftCenterNs = self.aspect2d.attachNewNode("a2dLeftCenterNS")

## ◆ a2dpBottom

a2dpBottom = -1.0

The Z position of the bottom border of the aspect2dp screen.

## ◆ a2dpBottomCenter

a2dpBottomCenter = self.aspect2dp.attachNewNode("a2dpBottomCenter")

## ◆ a2dpBottomLeft

a2dpBottomLeft = self.aspect2dp.attachNewNode("a2dpBottomLeft")

## ◆ a2dpBottomRight

a2dpBottomRight = self.aspect2dp.attachNewNode("a2dpBottomRight")

## ◆ a2dpLeft

a2dpLeft = -aspectRatio

The X position of the left border of the aspect2dp screen.

## ◆ a2dpLeftCenter

a2dpLeftCenter = self.aspect2dp.attachNewNode("a2dpLeftCenter")

## ◆ a2dpRight

a2dpRight = aspectRatio

The X position of the right border of the aspect2dp screen.

## ◆ a2dpRightCenter

a2dpRightCenter = self.aspect2dp.attachNewNode("a2dpRightCenter")

## ◆ a2dpTop

a2dpTop = 1.0

The Z position of the top border of the aspect2dp screen.

## ◆ a2dpTopCenter

a2dpTopCenter = self.aspect2dp.attachNewNode("a2dpTopCenter")

## ◆ a2dpTopLeft

a2dpTopLeft = self.aspect2dp.attachNewNode("a2dpTopLeft")

## ◆ a2dpTopRight

a2dpTopRight = self.aspect2dp.attachNewNode("a2dpTopRight")

## ◆ a2dRight

a2dRight = aspectRatio

The X position of the right border of the aspect2d screen.

## ◆ a2dRightCenter

a2dRightCenter = self.aspect2d.attachNewNode("a2dRightCenter")

## ◆ a2dRightCenterNs

a2dRightCenterNs = self.aspect2d.attachNewNode("a2dRightCenterNS")

## ◆ a2dTop

a2dTop = 1.0

The Z position of the top border of the aspect2d screen.

## ◆ a2dTopCenter

a2dTopCenter = self.aspect2d.attachNewNode("a2dTopCenter")

## ◆ a2dTopCenterNs

a2dTopCenterNs = self.aspect2d.attachNewNode("a2dTopCenterNS")

## ◆ a2dTopLeft

a2dTopLeft = self.aspect2d.attachNewNode("a2dTopLeft")

## ◆ a2dTopLeftNs

a2dTopLeftNs = self.aspect2d.attachNewNode("a2dTopLeftNS")

## ◆ a2dTopRight

a2dTopRight = self.aspect2d.attachNewNode("a2dTopRight")

## ◆ a2dTopRightNs

a2dTopRightNs = self.aspect2d.attachNewNode("a2dTopRightNS")

## ◆ add_angular_integrator

add_angular_integrator = addAngularIntegrator
| static

## ◆ add_sfx_manager

add_sfx_manager = addSfxManager
| static

## ◆ app_runner

app_runner = self.appRunner

## ◆ AppHasAudioFocus

int AppHasAudioFocus = 1

## ◆ appRunner

appRunner = AppRunnerGlobal.appRunner

This contains the global appRunner instance, as imported from `.AppRunnerGlobal`.

This will be None if we are not running in the runtime environment (ie. from a .p3d file). Deprecated.

## ◆ appTrav

int appTrav = 0

## ◆ aspect2d

aspect2d = ShowBaseGlobal.aspect2d

This is the root of the 2-D scene graph.

The normal 2-d DisplayRegion has an aspect ratio that matches the window, but its coordinate system is square. This means anything we parent to render2d gets stretched. For things where that makes a difference, we set up aspect2d, which scales things back to the right aspect ratio along the X axis (Z is still from -1 to 1)

## ◆ aspect2dp

aspect2dp = self.render2dp.attachNewNode(PGTop("aspect2dp"))

The normal 2-d DisplayRegion has an aspect ratio that matches the window, but its coordinate system is square.

This means anything we parent to render2dp gets stretched. For things where that makes a difference, we set up aspect2dp, which scales things back to the right aspect ratio along the X axis (Z is still from -1 to 1)

## ◆ attach_input_device

attach_input_device = attachInputDevice
| static

## ◆ backface_culling_off

backface_culling_off = backfaceCullingOff
| static

## ◆ backface_culling_on

backface_culling_on = backfaceCullingOn
| static

## ◆ backfaceCullingEnabled

backfaceCullingEnabled = 1

## ◆ bboard

bboard = bulletinBoard

The global bulletin board, as imported from `.BulletinBoardGlobal`.

## ◆ bufferViewer

bufferViewer = BufferViewer(self.win, self.render2dp if self.wantRender2dp else self.render2d)

Utility for viewing offscreen buffers, see :mod:`.BufferViewer`.

## ◆ buttonThrowers

buttonThrowers = None

## ◆ cam

cam = None

This is a :class:`~panda3d.core.NodePath` pointing to the :class:`~panda3d.core.Camera` object set up for the 3D scene.

Usually a child of `camera`.

## ◆ cam2d

cam2d = None

Same as `cam`, but for the 2D scene graph.

## ◆ cam2dp

cam2dp = None

Same as `cam2d`, but for the 2D overlay scene graph.

## ◆ camera

camera = None

This is the :class:`~panda3d.core.NodePath` that should be used to manipulate the camera.

It points at the node to which the default camera (`cam`, `camNode`) is attached.

## ◆ camera2d

camera2d = None

Same as `camera`, but for the 2D scene graph.

Parent of `cam2d`.

## ◆ camera2dp

camera2dp = None

Same as `camera2d`, but for the 2D overlay scene graph.

Parent of `cam2dp`.

## ◆ camFrustumVis

camFrustumVis = None

## ◆ camLens

camLens = None

Convenience accessor for base.camNode.get_lens(), containing a :class:`~panda3d.core.Lens` object.

## ◆ camList

list camList = []

A list of all cameras created with `makeCamera()`, including `cam`.

## ◆ camNode

camNode = None

Convenience accessor for base.cam.node(), containing a :class:`~panda3d.core.Camera` object.

## ◆ change_mouse_interface

change_mouse_interface = changeMouseInterface
| static

## ◆ clientSleep

clientSleep = 0.0

## ◆ clock

clock = clock

This is the global :class:`~panda3d.core.ClockObject`.

## ◆ close_window

close_window = closeWindow
| static

## ◆ cluster

cluster = cluster

## ◆ clusterSyncFlag

clusterSyncFlag = clusterSyncFlag

## ◆ config

config = DConfig
| static

The deprecated `.DConfig` interface for accessing config variables.

## ◆ create_stats

create_stats = createStats
| static

## ◆ cTrav

cTrav = 0

A placeholder for a :class:`~panda3d.core.CollisionTraverser`.

If someone stores a CollisionTraverser pointer here, ShowBase will traverse it automatically in the collisionLoop task, so you won't need to call :meth:`~panda3d.core.CollisionTraverser.traverse()` yourself every frame.

## ◆ cTravStack

cTravStack = Stack()

## ◆ dataRoot

dataRoot = NodePath('dataRoot')

## ◆ dataRootNode

dataRootNode = self.dataRoot.node()

## ◆ debugRunningMultiplier

int debugRunningMultiplier = 4

## ◆ detach_input_device

detach_input_device = detachInputDevice
| static

## ◆ deviceButtonThrowers

list deviceButtonThrowers = []

## ◆ devices

devices = InputDeviceManager.getGlobalPtr()

This is the global :class:`~panda3d.core.InputDeviceManager`, which keeps track of connected input devices.

## ◆ dgTrav

dgTrav = DataGraphTraverser()

## ◆ direct

direct = None

## ◆ disable_all_audio

disable_all_audio = disableAllAudio
| static

## ◆ disable_mouse

disable_mouse = disableMouse
| static

## ◆ disable_particles

disable_particles = disableParticles
| static

## ◆ drive

drive = None

## ◆ enable_all_audio

enable_all_audio = enableAllAudio
| static

## ◆ enable_mouse

enable_mouse = enableMouse
| static

## ◆ enable_music

enable_music = enableMusic
| static

## ◆ enable_particles

enable_particles = enableParticles
| static

## ◆ enable_software_mouse_pointer

enable_software_mouse_pointer = enableSoftwareMousePointer
| static

## ◆ enable_sound_effects

enable_sound_effects = enableSoundEffects
| static

## ◆ eventMgr

eventMgr = eventMgr

The global event manager, as imported from `.EventManagerGlobal`.

## ◆ exitFunc

exitFunc = None

Fill this in with a function to invoke when the user "exits" the program by closing the main window.

## ◆ finalExitCallbacks

list finalExitCallbacks = []

Add final-exit callbacks to this list.

These will be called when sys.exit() is called, after Panda has unloaded, and just before Python is about to shut down.

## ◆ frameRateMeter

frameRateMeter = None

## ◆ get_aspect_ratio

get_aspect_ratio = getAspectRatio
| static

## ◆ get_background_color

get_background_color = getBackgroundColor
| static

## ◆ get_size

get_size = getSize
| static

## ◆ graphics_engine

graphics_engine = self.graphicsEngine

## ◆ graphicsEngine

graphicsEngine = GraphicsEngine.getGlobalPtr()

The global :class:`~panda3d.core.GraphicsEngine`, as returned by GraphicsEngine.getGlobalPtr()

## ◆ hidden

hidden = ShowBaseGlobal.hidden

## ◆ init_shadow_trav

init_shadow_trav = initShadowTrav
| static

## ◆ jobMgr

jobMgr = jobMgr

The global job manager, as imported from `.JobManagerGlobal`.

## ◆ loader

loader = Loader.Loader(self)

`.Loader.Loader` object.

## ◆ main_dir

main_dir = self.mainDir

## ◆ mainDir

mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR")

The directory containing the main Python file of this application.

## ◆ mainWinForeground

int mainWinForeground = 0

## ◆ mainWinMinimized

int mainWinMinimized = 0

## ◆ make_all_pipes

make_all_pipes = makeAllPipes
| static

## ◆ make_camera

make_camera = makeCamera
| static

## ◆ make_camera2d

make_camera2d = makeCamera2d
| static

## ◆ make_camera2dp

make_camera2dp = makeCamera2dp
| static

## ◆ make_default_pipe

make_default_pipe = makeDefaultPipe
| static

## ◆ make_module_pipe

make_module_pipe = makeModulePipe
| static

## ◆ messenger

messenger = messenger

The global messenger, as imported from `.MessengerGlobal`.

## ◆ mouse2cam

mouse2cam = None

## ◆ mouseInterface

mouseInterface = None

## ◆ mouseInterfaceNode

mouseInterfaceNode = self.mouseInterface.node()

## ◆ mouseWatcher

mouseWatcher = None

## ◆ mouseWatcherNode

mouseWatcherNode = None

The :class:`~panda3d.core.MouseWatcher` object, created by `setupMouse()`.

## ◆ multiClientSleep

int multiClientSleep = 1

## ◆ musicActive

musicActive = self.config.GetBool('audio-music-active', 1)

## ◆ musicManager

musicManager = None

## ◆ musicManagerIsValid

musicManagerIsValid = None

## ◆ nextWindowIndex

int nextWindowIndex = 1

## ◆ notify

notify = directNotify.newCategory("ShowBase")
| static

## ◆ onScreenDebug

onScreenDebug = OnScreenDebug.OnScreenDebug()

## ◆ oobe2cam

oobe2cam = self.oobeTrackball.attachNewNode(Transform2SG('oobe2cam'))

## ◆ oobe_cull

oobe_cull = oobeCull
| static

## ◆ oobeCamera

oobeCamera = self.hidden.attachNewNode('oobeCamera')

## ◆ oobeCameraTrackball

oobeCameraTrackball = self.oobeCamera.attachNewNode('oobeCameraTrackball')

## ◆ oobeCullFrustum

oobeCullFrustum = None

## ◆ oobeLens

oobeLens = PerspectiveLens()

## ◆ oobeMode

int oobeMode = 0

## ◆ oobeTrackball

oobeTrackball = NodePath(Trackball('oobeTrackball'))

## ◆ oobeVis

oobeVis = loader.loadModel('models/misc/camera', okMissing = True)

## ◆ open_default_window

open_default_window = openDefaultWindow
| static

## ◆ open_main_window

open_main_window = openMainWindow
| static

## ◆ open_window

open_window = openWindow
| static

## ◆ particleMgr

particleMgr = None

If `enableParticles()` has been called, this is the particle manager as imported from :mod:`direct.particles.ParticleManagerGlobal`.

## ◆ particleMgrEnabled

int particleMgrEnabled = 0

## ◆ physicsMgr

physicsMgr = None

If `enableParticles()` has been called, this is the physics manager as imported from :mod:`direct.showbase.PhysicsManagerGlobal`.

## ◆ physicsMgrAngular

int physicsMgrAngular = 0

## ◆ physicsMgrEnabled

int physicsMgrEnabled = 0

## ◆ pipe

pipe = None

Contains the :class:`~panda3d.core.GraphicsPipe` object created by `makeDefaultPipe()`.

## ◆ pipeList

list pipeList = []

The full list of :class:`~panda3d.core.GraphicsPipe` objects, including any auxiliary pipes.

Filled by `makeAllPipes()`.

## ◆ pixel2d

pixel2d = self.render2d.attachNewNode(PGTop("pixel2d"))

This special root, pixel2d, uses units in pixels that are relative to the window.

The upperleft corner of the window is (0, 0), the lowerleft corner is (xsize, -ysize), in this coordinate system.

## ◆ pixel2dp

pixel2dp = self.render2dp.attachNewNode(PGTop("pixel2dp"))

This special root, pixel2dp, uses units in pixels that are relative to the window.

The upperleft corner of the window is (0, 0), the lowerleft corner is (xsize, -ysize), in this coordinate system.

## ◆ pointerWatcherNodes

pointerWatcherNodes = None

## ◆ recorder

recorder = None

## ◆ remove_camera_frustum

remove_camera_frustum = removeCameraFrustum
| static

## ◆ render

render = NodePath('render')

This is the root of the 3-D scene graph.

## ◆ render2d

render2d

This is the root of the 2-D scene graph.

## ◆ render2dp

render2dp = NodePath('render2dp')

## ◆ requireWindow

requireWindow = self.config.GetBool('require-window', 1)

## ◆ revive_input

revive_input = reviveInput
| static

## ◆ run

run = self.wxRun

## ◆ save_cube_map

save_cube_map = saveCubeMap
| static

## ◆ save_sphere_map

save_sphere_map = saveSphereMap
| static

## ◆ sceneGraphAnalyzerMeter

sceneGraphAnalyzerMeter = None

## ◆ screenshotExtension

screenshotExtension = self.config.GetString('screenshot-extension', 'jpg')

## ◆ set_aspect_ratio

set_aspect_ratio = setAspectRatio
| static

## ◆ set_background_color

set_background_color = setBackgroundColor
| static

## ◆ set_frame_rate_meter

set_frame_rate_meter = setFrameRateMeter
| static

## ◆ set_mouse_on_node

set_mouse_on_node = setMouseOnNode
| static

## ◆ set_scene_graph_analyzer_meter

set_scene_graph_analyzer_meter = setSceneGraphAnalyzerMeter
| static

## ◆ set_sleep

set_sleep = setSleep
| static

## ◆ setup_data_graph

setup_data_graph = setupDataGraph
| static

## ◆ setup_mouse

setup_mouse = setupMouse
| static

## ◆ setup_mouse_cb

setup_mouse_cb = setupMouseCB
| static

## ◆ setup_render

setup_render = setupRender
| static

## ◆ setup_render2d

setup_render2d = setupRender2d
| static

## ◆ setup_render2dp

setup_render2dp = setupRender2dp
| static

## ◆ setup_window_controls

setup_window_controls = setupWindowControls
| static

## ◆ sfxActive

sfxActive = self.config.GetBool('audio-sfx-active', 1)

## ◆ sfxManagerIsValidList

list sfxManagerIsValidList = []

## ◆ sfxManagerList

sfxManagerList = []

## ◆ sfxPlayer

sfxPlayer = SfxPlayer.SfxPlayer()

## ◆ shadowTrav

int shadowTrav = 0

## ◆ show_camera_frustum

show_camera_frustum = showCameraFrustum
| static

## ◆ showVertices

showVertices = None

## ◆ silence_input

silence_input = silenceInput
| static

## ◆ start_direct

start_direct = startDirect
| static

## ◆ start_tk

start_tk = startTk
| static

## ◆ start_wx

start_wx = startWx
| static

## ◆ task_mgr

task_mgr = taskMgr

## ◆ taskMgr

taskMgr = taskMgr

The global task manager, as imported from `.TaskManagerGlobal`.

## ◆ texmem

texmem = None

## ◆ texture_off

texture_off = textureOff
| static

## ◆ texture_on

texture_on = textureOn
| static

## ◆ textureEnabled

int textureEnabled = 1

## ◆ timeButtonThrower

timeButtonThrower = mw.attachNewNode(ButtonThrower('timeButtons'))

A special ButtonThrower to generate keyboard events and include the time from the OS.

This is separate only to support legacy code that did not expect a time parameter; it will eventually be folded into the normal ButtonThrower, above.

## ◆ tkDelay

tkDelay = int(1000.0 / tkFrameRate.getValue())

## ◆ tkRoot

tkRoot = None

## ◆ tkRootCreated

bool tkRootCreated = False

## ◆ toggle_backface

toggle_backface = toggleBackface
| static

## ◆ toggle_particles

toggle_particles = toggleParticles
| static

## ◆ toggle_show_vertices

toggle_show_vertices = toggleShowVertices
| static

## ◆ toggle_tex_mem

toggle_tex_mem = toggleTexMem
| static

## ◆ toggle_texture

toggle_texture = toggleTexture
| static

## ◆ toggle_wireframe

toggle_wireframe = toggleWireframe
| static

## ◆ trackball

trackball = None

## ◆ transitions

transitions = Transitions.Transitions(self.loader)

`.Transitions.Transitions` object.

## ◆ updateManagers

updateManagers = 1

## ◆ use_drive

use_drive = useDrive
| static

## ◆ use_trackball

use_trackball = useTrackball
| static

## ◆ user_exit

user_exit = userExit
| static

## ◆ wantDirect

bool wantDirect = False

## ◆ wantFog

wantFog = self.config.GetBool('want-fog', 1)

## ◆ wantRender2dp

wantRender2dp = self.config.GetBool('want-render2dp', 1)

## ◆ wantStats

wantStats = self.config.GetBool('want-pstats', 0)

## ◆ wantTk

bool wantTk = False

## ◆ wantWx

bool wantWx = False

## ◆ win

win = None

This is the main, or only window; see `winList` for a list of all windows.

## ◆ winControls

list winControls = []

## ◆ windowEvent

windowEvent

## ◆ windowType

windowType = windowType

This is set to the value of the window-type config variable, but may optionally be overridden in the Showbase constructor.

Should either be 'onscreen' (the default), 'offscreen' or 'none'.

## ◆ winList

list winList = []

A list of all windows opened via `openWindow()`.

## ◆ wireframe_off

wireframe_off = wireframeOff
| static

## ◆ wireframe_on

wireframe_on = wireframeOn
| static

## ◆ wireframeEnabled

int wireframeEnabled = 0

## ◆ wxApp

wxApp = None

This is used to store the wx.Application object used when want-wx is set or `startWx()` is called.

## ◆ wxAppCreated

bool wxAppCreated = False

## ◆ wxTimer

wxTimer = wx.Timer(self.wxApp)