Panda3D
Loading...
Searching...
No Matches
DirectSessionPanel Class Reference
Inheritance diagram for DirectSessionPanel:
AppShell DirectObject

Public Member Functions

 __init__ (self, parent=None, **kw)
 
 addAmbient (self)
 
 addDirectional (self)
 
 addJBNodePath (self, nodePath)
 
 addLight (self, light)
 
 addNodePath (self, nodePath)
 
 addNodePathToDict (self, nodePath, names, menu, dict)
 
 addPoint (self)
 
 addSpot (self)
 
 appInit (self)
 USER METHODS ### To be overridden.
 
 createDevicePage (self, devicePage)
 
 createEnvPage (self, envPage)
 
 createGridPage (self, gridPage)
 
 createInterface (self)
 
 createLightsPage (self, lightsPage)
 
 createMemPage (self, memPage)
 
 createTasksPage (self, tasksPage)
 
 onDestroy (self, event)
 
 pushRedo (self)
 
 pushRedoHook (self)
 
 pushUndo (self, fResetRedo=1)
 
 pushUndoHook (self)
 
 redoHook (self, nodePathList=[])
 
 redoListEmptyHook (self)
 
 resetFov (self)
 
 selectDisplayRegionNamed (self, name)
 
 selectedNodePathHook (self, nodePath)
 
 selectJBModeNamed (self, name)
 
 selectJBNodePathNamed (self, name)
 
 selectLightNamed (self, name)
 
 selectNodePathNamed (self, name)
 
 setBackgroundColor (self, r, g, b)
 ENVIRONMENT CONTROLS ## Background #.
 
 setBackgroundColorVec (self, color)
 
 setConstantAttenuation (self, value)
 
 setExponent (self, value)
 
 setFar (self, far)
 
 setHFov (self, hFov)
 
 setLightColor (self, color)
 
 setLinearAttenuation (self, value)
 
 setNear (self, near)
 
 setQuadraticAttenuation (self, value)
 
 setSpecularColor (self, color)
 
 setVFov (self, vFov)
 
 toggleActiveLight (self)
 
 toggleDirect (self)
 
 toggleDirectGrid (self)
 
 toggleGrid (self)
 GRID CONTROLS ##.
 
 toggleHprSnap (self)
 
 toggleJoybox (self)
 DEVICE CONTROLS.
 
 toggleLights (self)
 
 toggleWidgetOnTop (self)
 
 toggleXyzSnap (self)
 
 undoHook (self, nodePathList=[])
 
 undoListEmptyHook (self)
 
 updateDisplayRegionInfo (self)
 
 updateEnvironmentInfo (self)
 
 updateGridInfo (self)
 
 updateInfo (self, page='Environment')
 UPDATE INFO ##.
 
 updateLightInfo (self, page=None)
 
- Public Member Functions inherited from AppShell
 __init__ (self, parent=None, **kw)
 
 addVariable (self, category, text, variable)
 
 addWidget (self, category, text, widget)
 WIDGET UTILITY FUNCTIONS ##.
 
 alignbuttons (self)
 
 balloon (self)
 
 bind (self, child, balloonHelpMsg, statusHelpMsg=None)
 
 buttonAdd (self, buttonName, helpMessage=None, statusMessage=None, **kw)
 
 buttonBox (self)
 
 createMenuBar (self)
 
 createWidget (self, parent, category, text, widgetClass, help, command, side, fill, expand, kw)
 
 getVariable (self, category, text)
 
 getWidget (self, category, text)
 
 interior (self)
 
 messageBar (self)
 
 newCreateButton (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateCheckbutton (self, parent, category, text, help='', command=None, initialState=0, anchor=W, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateColorEntry (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateComboBox (self, parent, category, text, help='', command=None, items=[], state=DISABLED, history=0, labelpos=W, label_anchor=W, label_width=16, entry_width=16, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateDial (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateEntryScale (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateFloater (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateLabeledEntry (self, parent, category, text, help='', command=None, value='', width=12, relief=SUNKEN, side=LEFT, fill=X, expand=0)
 
 newCreateOptionMenu (self, parent, category, text, help='', command=None, items=[], labelpos=W, label_anchor=W, label_width=16, menu_tearoff=1, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateRadiobutton (self, parent, category, text, variable, value, command=None, help='', anchor=W, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateSider (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateVector2Entry (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 newCreateVector3Entry (self, parent, category, text, help='', command=None, side=LEFT, fill=X, expand=0, **kw)
 
 quit (self)
 
 showAbout (self)
 
 toggleBalloon (self)
 
 transformRGB (self, rgb, max=1.0)
 
 updateProgress (self, newValue=0, newMax=0)
 
- 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

list actionEvents
 
 activeDisplayRegion = base.direct.drList[drIndex]
 
 activeLight = None
 
 backgroundColor
 
 directEnabled = BooleanVar()
 
 directGridEnabled = BooleanVar()
 
 directWidgetOnTop = BooleanVar()
 
 drMenu
 
 dSpecularColor
 
 enableGrid = BooleanVar()
 
 enableGridButton
 
 enableJoybox = BooleanVar()
 
 enableJoyboxButton
 
 enableLights = BooleanVar()
 
 enableLightsButton
 
 farPlane
 
 gridSize
 
 gridSnapAngle
 
 gridSpacing
 
 hFov
 
 hprSnap = BooleanVar()
 
 hprSnapButton
 
 jbHprSF
 
 jbModeMenu
 
dict jbNodePathDict = {}
 
 jbNodePathMenu
 
tuple jbNodePathMenuBG
 
tuple jbNodePathMenuEntry
 
list jbNodePathNames = ['camera', 'selected', 'none']
 
 jbXyzSF
 
 lightActive = BooleanVar()
 
 lightActiveButton
 
 lightColor
 
 lightMenu
 
 lightNotebook
 
 lightsButton
 
 lockedFov = BooleanVar()
 
 lockedFovButton
 
 MemExp
 
 nearPlane
 
dict nodePathDict = {}
 
 nodePathMenu
 
tuple nodePathMenuBG
 
tuple nodePathMenuEntry
 
list nodePathNames = ['widget']
 
 pConstantAttenuation
 
 pLinearAttenuation
 
 pQuadraticAttenuation
 
 pSpecularColor
 
 redoButton
 
 resetFovButton
 
 sConstantAttenuation
 
 sExponent
 
 SGE
 
 sLinearAttenuation
 
 sQuadraticAttenuation
 
 sSpecularColor
 
 taskMgrPanel = TaskManagerWidget(tasksPage, taskMgr)
 
 toggleBackfaceButton
 
 toggleLightsButton
 
 toggleTextureButton
 
 toggleWireframeButton
 
 undoButton
 
 vFov
 
 xyzSnap = BooleanVar()
 
 xyzSnapButton
 
- Public Attributes inherited from AppShell
 about
 
 dataArea
 
str id = self.appname + '-' + repr(AppShell.panelCount)
 
 menuBar
 
 menuFrame = Frame(self._hull)
 
 parent = Toplevel()
 
 toggleBalloonVar = IntVar()
 
dict variableDict = {}
 
dict widgetDict = {}
 

Additional Inherited Members

- Static Public Attributes inherited from AppShell
str appname = 'Generic Application Frame'
 
str appversion = '1.0'
 
str balloonState = 'none'
 
str contactemail = 'Mark.Mine@disney.com'
 
str contactname = 'Mark R. Mine'
 
str contactphone = '(818) 544-2921'
 
tuple copyright
 
int frameHeight = 320
 
int frameWidth = 450
 
int padx = 5
 
int pady = 5
 
int panelCount = 0
 
int usecommandarea = 0
 
int usestatusarea = 0
 
- 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 inherited from DirectObject
 _addTask (self, task)
 
 _clearTask (self, task)
 
- Protected Attributes inherited from AppShell
 _hull = self.component('hull')
 
- Protected Attributes inherited from DirectObject
dict _taskList = {}
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
parent = None,
** kw )

Member Function Documentation

◆ addAmbient()

addAmbient ( self)

◆ addDirectional()

addDirectional ( self)

◆ addJBNodePath()

addJBNodePath ( self,
nodePath )

◆ addLight()

addLight ( self,
light )

◆ addNodePath()

addNodePath ( self,
nodePath )

◆ addNodePathToDict()

addNodePathToDict ( self,
nodePath,
names,
menu,
dict )

◆ addPoint()

addPoint ( self)

◆ addSpot()

addSpot ( self)

◆ appInit()

appInit ( self)

USER METHODS ### To be overridden.

Reimplemented from AppShell.

◆ createDevicePage()

createDevicePage ( self,
devicePage )

◆ createEnvPage()

createEnvPage ( self,
envPage )

◆ createGridPage()

createGridPage ( self,
gridPage )

◆ createInterface()

createInterface ( self)

Reimplemented from AppShell.

◆ createLightsPage()

createLightsPage ( self,
lightsPage )

◆ createMemPage()

createMemPage ( self,
memPage )

◆ createTasksPage()

createTasksPage ( self,
tasksPage )

◆ onDestroy()

onDestroy ( self,
event )

Reimplemented from AppShell.

◆ pushRedo()

pushRedo ( self)

◆ pushRedoHook()

pushRedoHook ( self)

◆ pushUndo()

pushUndo ( self,
fResetRedo = 1 )

◆ pushUndoHook()

pushUndoHook ( self)

◆ redoHook()

redoHook ( self,
nodePathList = [] )

◆ redoListEmptyHook()

redoListEmptyHook ( self)

◆ resetFov()

resetFov ( self)

◆ selectDisplayRegionNamed()

selectDisplayRegionNamed ( self,
name )

◆ selectedNodePathHook()

selectedNodePathHook ( self,
nodePath )

◆ selectJBModeNamed()

selectJBModeNamed ( self,
name )

◆ selectJBNodePathNamed()

selectJBNodePathNamed ( self,
name )

◆ selectLightNamed()

selectLightNamed ( self,
name )

◆ selectNodePathNamed()

selectNodePathNamed ( self,
name )

◆ setBackgroundColor()

setBackgroundColor ( self,
r,
g,
b )

ENVIRONMENT CONTROLS ## Background #.

◆ setBackgroundColorVec()

setBackgroundColorVec ( self,
color )

◆ setConstantAttenuation()

setConstantAttenuation ( self,
value )

◆ setExponent()

setExponent ( self,
value )

◆ setFar()

setFar ( self,
far )

◆ setHFov()

setHFov ( self,
hFov )

◆ setLightColor()

setLightColor ( self,
color )

◆ setLinearAttenuation()

setLinearAttenuation ( self,
value )

◆ setNear()

setNear ( self,
near )

◆ setQuadraticAttenuation()

setQuadraticAttenuation ( self,
value )

◆ setSpecularColor()

setSpecularColor ( self,
color )

◆ setVFov()

setVFov ( self,
vFov )

◆ toggleActiveLight()

toggleActiveLight ( self)

◆ toggleDirect()

toggleDirect ( self)

◆ toggleDirectGrid()

toggleDirectGrid ( self)

◆ toggleGrid()

toggleGrid ( self)

GRID CONTROLS ##.

◆ toggleHprSnap()

toggleHprSnap ( self)

◆ toggleJoybox()

toggleJoybox ( self)

DEVICE CONTROLS.

◆ toggleLights()

toggleLights ( self)

◆ toggleWidgetOnTop()

toggleWidgetOnTop ( self)

◆ toggleXyzSnap()

toggleXyzSnap ( self)

◆ undoHook()

undoHook ( self,
nodePathList = [] )

◆ undoListEmptyHook()

undoListEmptyHook ( self)

◆ updateDisplayRegionInfo()

updateDisplayRegionInfo ( self)

◆ updateEnvironmentInfo()

updateEnvironmentInfo ( self)

◆ updateGridInfo()

updateGridInfo ( self)

◆ updateInfo()

updateInfo ( self,
page = 'Environment' )

UPDATE INFO ##.

◆ updateLightInfo()

updateLightInfo ( self,
page = None )

Member Data Documentation

◆ actionEvents

list actionEvents
Initial value:
= [
('DIRECT_undo', self.undoHook),
('DIRECT_pushUndo', self.pushUndoHook),
('DIRECT_undoListEmpty', self.undoListEmptyHook),
('DIRECT_redo', self.redoHook),
('DIRECT_pushRedo', self.pushRedoHook),
('DIRECT_redoListEmpty', self.redoListEmptyHook),
('DIRECT_selectedNodePath', self.selectedNodePathHook),
('DIRECT_addLight', self.addLight),
]

◆ activeDisplayRegion

activeDisplayRegion = base.direct.drList[drIndex]

◆ activeLight

activeLight = None

◆ backgroundColor

backgroundColor
Initial value:
= VectorWidgets.ColorEntry(
bkgrdFrame, text = 'Background Color')

◆ directEnabled

directEnabled = BooleanVar()

◆ directGridEnabled

directGridEnabled = BooleanVar()

◆ directWidgetOnTop

directWidgetOnTop = BooleanVar()

◆ drMenu

drMenu
Initial value:
= Pmw.ComboBox(
drFrame, labelpos = W, label_text = 'Display Region:',
entry_width = 20,
selectioncommand = self.selectDisplayRegionNamed,
scrolledlist_items = nameList)

◆ dSpecularColor

dSpecularColor
Initial value:
= VectorWidgets.ColorEntry(
directionalPage, text = 'Specular Color')

◆ enableGrid

enableGrid = BooleanVar()

◆ enableGridButton

enableGridButton
Initial value:
= Checkbutton(
gridPage,
text = 'Enabled/Disabled',
anchor = 'w', justify = LEFT,
variable = self.enableGrid,
command = self.toggleGrid)

◆ enableJoybox

enableJoybox = BooleanVar()

◆ enableJoyboxButton

enableJoyboxButton
Initial value:
= Checkbutton(
joyboxFrame,
text = 'Enabled/Disabled',
anchor = 'w', justify = LEFT,
variable = self.enableJoybox,
command = self.toggleJoybox)

◆ enableLights

enableLights = BooleanVar()

◆ enableLightsButton

enableLightsButton
Initial value:
= Checkbutton(
mainSwitchFrame,
text = 'Enabled/Disabled',
variable = self.enableLights,
command = self.toggleLights)

◆ farPlane

farPlane
Initial value:
= Floater.Floater(
drFrame,
text = 'Far Plane',
min = 0.01)

◆ gridSize

gridSize
Initial value:
= Floater.Floater(
gridPage,
text = 'Grid Size',
min = 1.0,
value = base.direct.grid.getGridSize())

◆ gridSnapAngle

gridSnapAngle
Initial value:
= Dial.AngleDial(
gridPage,
text = 'Snap Angle',
style = 'mini',
value = base.direct.grid.getSnapAngle())

◆ gridSpacing

gridSpacing
Initial value:
= Floater.Floater(
gridPage,
text = 'Grid Spacing',
min = 0.1,
value = base.direct.grid.getGridSpacing())

◆ hFov

hFov
Initial value:
= Slider.Slider(
fovFloaterFrame,
text = 'Horizontal FOV',
min = 0.01, max = 170.0)

◆ hprSnap

hprSnap = BooleanVar()

◆ hprSnapButton

hprSnapButton
Initial value:
= Checkbutton(
gridPage,
text = 'HPR Snap',
anchor = 'w', justify = LEFT,
variable = self.hprSnap,
command = self.toggleHprSnap)

◆ jbHprSF

jbHprSF
Initial value:
= Slider.Slider(
joyboxFrame,
text = 'HPR Scale Factor',
value = 1.0,
hull_relief = RIDGE, hull_borderwidth = 2,
min = 1.0, max = 100.0)

◆ jbModeMenu

jbModeMenu
Initial value:
= Pmw.ComboBox(
joyboxFrame, labelpos = W, label_text = 'Joybox Mode:',
label_width = 16, entry_width = 20,
selectioncommand = self.selectJBModeNamed,
scrolledlist_items = ['Joe Mode', 'Drive Mode', 'Orbit Mode',
'Look At Mode', 'Look Around Mode',
'Walkthru Mode', 'Demo Mode',
'HPRXYZ Mode'])

◆ jbNodePathDict

jbNodePathDict = {}

◆ jbNodePathMenu

jbNodePathMenu
Initial value:
= Pmw.ComboBox(
joyboxFrame, labelpos = W, label_text = 'Joybox Node Path:',
label_width = 16, entry_width = 20,
selectioncommand = self.selectJBNodePathNamed,
scrolledlist_items = self.jbNodePathNames)

◆ jbNodePathMenuBG

tuple jbNodePathMenuBG
Initial value:
= (
self.jbNodePathMenuEntry.configure('background')[3])

◆ jbNodePathMenuEntry

tuple jbNodePathMenuEntry
Initial value:
= (
self.jbNodePathMenu.component('entryfield_entry'))

◆ jbNodePathNames

jbNodePathNames = ['camera', 'selected', 'none']

◆ jbXyzSF

jbXyzSF
Initial value:
= Slider.Slider(
joyboxFrame,
text = 'XYZ Scale Factor',
value = 1.0,
hull_relief = RIDGE, hull_borderwidth = 2,
min = 1.0, max = 100.0)

◆ lightActive

lightActive = BooleanVar()

◆ lightActiveButton

lightActiveButton
Initial value:
= Checkbutton(
lightMenuFrame,
text = 'On/Off',
variable = self.lightActive,
command = self.toggleActiveLight)

◆ lightColor

lightColor
Initial value:
= VectorWidgets.ColorEntry(
lightFrame, text = 'Light Color')

◆ lightMenu

lightMenu
Initial value:
= Pmw.ComboBox(
lightMenuFrame, labelpos = W, label_text = 'Light:',
entry_width = 20,
selectioncommand = self.selectLightNamed,
scrolledlist_items = nameList)

◆ lightNotebook

lightNotebook
Initial value:
= Pmw.NoteBook(lightFrame, tabpos = None,
borderwidth = 0)

◆ lightsButton

lightsButton
Initial value:
= Menubutton(lightFrame, text = 'Lights',
font=('MSSansSerif', 14, 'bold'),
activebackground = '#909090')

◆ lockedFov

lockedFov = BooleanVar()

◆ lockedFovButton

lockedFovButton
Initial value:
= Checkbutton(
frame,
text = 'Locked',
anchor = 'w', justify = LEFT,
variable = self.lockedFov)

◆ MemExp

MemExp
Initial value:
= MemoryExplorer.MemoryExplorer(
memPage, nodePath = render,
scrolledCanvas_hull_width = 250,
scrolledCanvas_hull_height = 250)

◆ nearPlane

nearPlane
Initial value:
= Floater.Floater(
drFrame,
text = 'Near Plane',
min = 0.01)

◆ nodePathDict

nodePathDict = {}

◆ nodePathMenu

nodePathMenu
Initial value:
= Pmw.ComboBox(
menuFrame, labelpos = W, label_text = 'DIRECT Select:',
entry_width = 20,
selectioncommand = self.selectNodePathNamed,
scrolledlist_items = self.nodePathNames)

◆ nodePathMenuBG

tuple nodePathMenuBG
Initial value:
= (
self.nodePathMenuEntry.configure('background')[3])

◆ nodePathMenuEntry

tuple nodePathMenuEntry
Initial value:
= (
self.nodePathMenu.component('entryfield_entry'))

◆ nodePathNames

nodePathNames = ['widget']

◆ pConstantAttenuation

pConstantAttenuation
Initial value:
= Slider.Slider(
pointPage,
text = 'Constant Attenuation',
min = 0.0, max = 1.0, value = 1.0)

◆ pLinearAttenuation

pLinearAttenuation
Initial value:
= Slider.Slider(
pointPage,
text = 'Linear Attenuation',
min = 0.0, max = 1.0, value = 0.0)

◆ pQuadraticAttenuation

pQuadraticAttenuation
Initial value:
= Slider.Slider(
pointPage,
text = 'Quadratic Attenuation',
min = 0.0, max = 1.0, value = 0.0)

◆ pSpecularColor

pSpecularColor
Initial value:
= VectorWidgets.ColorEntry(
pointPage, text = 'Specular Color')

◆ redoButton

redoButton
Initial value:
= Button(menuFrame, text = 'Redo',
command = base.direct.redo)

◆ resetFovButton

resetFovButton
Initial value:
= Button(
frame,
text = 'Reset',
command = self.resetFov)

◆ sConstantAttenuation

sConstantAttenuation
Initial value:
= Slider.Slider(
spotPage,
text = 'Constant Attenuation',
min = 0.0, max = 1.0, value = 1.0)

◆ sExponent

sExponent
Initial value:
= Slider.Slider(
spotPage,
text = 'Exponent',
min = 0.0, max = 1.0, value = 0.0)

◆ SGE

SGE
Initial value:
= SceneGraphExplorer.SceneGraphExplorer(
sgeFrame, nodePath = render,
scrolledCanvas_hull_width = 250,
scrolledCanvas_hull_height = 300)

◆ sLinearAttenuation

sLinearAttenuation
Initial value:
= Slider.Slider(
spotPage,
text = 'Linear Attenuation',
min = 0.0, max = 1.0, value = 0.0)

◆ sQuadraticAttenuation

sQuadraticAttenuation
Initial value:
= Slider.Slider(
spotPage,
text = 'Quadratic Attenuation',
min = 0.0, max = 1.0, value = 0.0)

◆ sSpecularColor

sSpecularColor
Initial value:
= VectorWidgets.ColorEntry(
spotPage, text = 'Specular Color')

◆ taskMgrPanel

taskMgrPanel = TaskManagerWidget(tasksPage, taskMgr)

◆ toggleBackfaceButton

toggleBackfaceButton
Initial value:
= Button(
toggleFrame,
text = 'Backface',
command = base.toggleBackface)

◆ toggleLightsButton

toggleLightsButton
Initial value:
= Button(
toggleFrame,
text = 'Lights',
command = base.direct.lights.toggle)

◆ toggleTextureButton

toggleTextureButton
Initial value:
= Button(
toggleFrame,
text = 'Texture',
command = base.toggleTexture)

◆ toggleWireframeButton

toggleWireframeButton
Initial value:
= Button(
toggleFrame,
text = 'Wireframe',
command = base.toggleWireframe)

◆ undoButton

undoButton
Initial value:
= Button(menuFrame, text = 'Undo',
command = base.direct.undo)

◆ vFov

vFov
Initial value:
= Slider.Slider(
fovFloaterFrame,
text = 'Vertical FOV',
min = 0.01, max = 170.0)

◆ xyzSnap

xyzSnap = BooleanVar()

◆ xyzSnapButton

xyzSnapButton
Initial value:
= Checkbutton(
gridPage,
text = 'XYZ Snap',
anchor = 'w', justify = LEFT,
variable = self.xyzSnap,
command = self.toggleXyzSnap)