Panda3D

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

## Public Member Functions
| __init__ (self)
| addPassThroughKey (self, key)
| addUnpickable (self, item)
| beginOOBE (self)
| deselect (self, nodePath)
| deselectAll (self)
| deselectAllCB (self)
| destroy (self)
| disable (self)
| disableActionEvents (self)
| disableKeyEvents (self)
| disableModifierEvents (self)
| disableMouseEvents (self)
| doReparent (self)
| doSelect (self)
| doSetActiveParent (self)
| downAncestry (self)
| doWrtReparent (self)
| enable (self)
| enableActionEvents (self)
| enableKeyEvents (self)
| enableLight (self)
| enableModifierEvents (self)
| enableMouseEvents (self)
| endOOBE (self)
| fitOnNodePath (self, nodePath='None Given')
| flash (self, nodePath='None Given')
| flashDone (self, state)
| flashDummy (self, state)
| followSelectedNodePathTask (self, state)
| getAndSetName (self, nodePath)
| getModifiers (self, input, base)
| gotAlt (self, modifiers)
| gotControl (self, modifiers)
| gotShift (self, modifiers)
| hideActiveParentReadout (self)
| hideDirectMessage (self, state)
| hideDirectMessageLater (self)
| hideSelectedNPReadout (self)
| inputHandler (self, input)
| isEnabled (self)
| isNotCycle (self, nodePath, parent)
| isolate (self, nodePath='None Given')
| message (self, text)
| minimumConfiguration (self)
| oobe (self)
| popRedoGroup (self)
| popUndoGroup (self)
| pushRedo (self, nodePathList)
| pushUndo (self, nodePathList, fResetRedo=1)
| redo (self)
| removeAllSelected (self)
| removeNodePath (self, nodePath='None Given')
| removeUnpickable (self, item)
| reparent (self, nodePath=None, fWrt=0)
| reset (self)
| select (self, nodePath, fMultiSelect=0, fSelectTag=1, fResetAncestry=1, fLEPane=0, fUndo=1)
| selectCB (self, nodePath, fMultiSelect=0, fSelectTag=1, fResetAncestry=1, fLEPane=0, fUndo=1)
| setActiveParent (self, nodePath=None)
| setCOAMode (self, mode)
| setFScaleWidgetByCam (self, flag)
| showAllDescendants (self, nodePath=None)
| toggleDirect (self)
| toggleVis (self, nodePath='None Given')
| toggleWidgetVis (self)
| undo (self)
| upAncestry (self)
| useObjectHandles (self)
| widgetResizeTask (self, state)
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
| activeParent = None
| activeParentReadout
list | ancestry = []
int | ancestryIndex = 0
| cam = base.cam
| camera = base.camera
| cameraControl = DirectCameraControl()
| camNode = base.camNode
| cluster = createClusterClient()
str | clusterMode = clusterMode
| coaMode = COA_ORIGIN
| deviceManager = None
| directMessageReadout
dict | directOnlyKeyMap
| dr = self.drList[0]
| drList = DisplayRegionList()
int | fAlt = 0
list | fastrak = []
int | fControl = 0
int | fEnabled = 0
int | fEnabledLight = 0
int | fIgnoreDirectOnlyKeyMap = 0
| flashDone
int | fMouse1 = 0
int | fMouse2 = 0
int | fMouse3 = 0
| font = TextNode.getDefaultFont()
int | fScaleWidgetByCam = 0
int | fShift = 0
| grid = DirectGrid()
| group = render.attachNewNode('DIRECT')
| hideDirectMessage
| hitPt = Point3(0.0)
dict | hotKeyMap
| hpr = VBase3()
| inputHandler
| iRay = self.dr.iRay
list | iRayList = [x.iRay for x in self.drList]
| joybox = None
| keyEvents = keyList[:]
| lights = DirectLights(base.direct.group)
| manipulationControl = DirectManipulationControl()
list | modifierEvents
list | mouseEvents
| oobeCamera = hidden.attachNewNode('oobeCamera')
int | oobeMode = 0
| oobeVis = loader.loadModel('models/misc/camera')
| panel = DirectSessionPanel.DirectSessionPanel(parent = tkroot)
list | passThroughKeys = ['v','b','l','p', 'r', 'shift-r', 's', 't','shift-a', 'w']
| pos = VBase3()
| radamec = None
list | redoList = []
| scale = VBase3()
| selected = SelectedNodePaths()
| selectedNPReadout
list | specialKeys = ['escape', 'delete', 'page_up', 'page_down', 'enter']
dict | speicalKeyMap
| trueCamera = self.camera
list | undoList = []
| widget = self.manipulationControl.objectHandles
| widgetResizeTask = flag
| win = base.win

## Static Public Attributes
str | DIRECTdisablePost = 'disableDIRECT'
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

## Additional Inherited Members
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self | ) |

## Member Function Documentation

## ◆ addPassThroughKey()

addPassThroughKey | ( |  | self,
|  |  | key )

## ◆ addUnpickable()

addUnpickable | ( |  | self,
|  |  | item )

## ◆ beginOOBE()

beginOOBE | ( |  | self | ) |

## ◆ deselect()

deselect | ( |  | self,
|  |  | nodePath )

## ◆ deselectAll()

deselectAll | ( |  | self | ) |

## ◆ deselectAllCB()

deselectAllCB | ( |  | self | ) |

## ◆ destroy()

destroy | ( |  | self | ) |

## ◆ disable()

disable | ( |  | self | ) |

## ◆ disableActionEvents()

disableActionEvents | ( |  | self | ) |

## ◆ disableKeyEvents()

disableKeyEvents | ( |  | self | ) |

## ◆ disableModifierEvents()

disableModifierEvents | ( |  | self | ) |

## ◆ disableMouseEvents()

disableMouseEvents | ( |  | self | ) |

## ◆ doReparent()

doReparent | ( |  | self | ) |

## ◆ doSelect()

doSelect | ( |  | self | ) |

## ◆ doSetActiveParent()

doSetActiveParent | ( |  | self | ) |

## ◆ downAncestry()

downAncestry | ( |  | self | ) |

## ◆ doWrtReparent()

doWrtReparent | ( |  | self | ) |

## ◆ enable()

enable | ( |  | self | ) |

## ◆ enableActionEvents()

enableActionEvents | ( |  | self | ) |

## ◆ enableKeyEvents()

enableKeyEvents | ( |  | self | ) |

## ◆ enableLight()

enableLight | ( |  | self | ) |

## ◆ enableModifierEvents()

enableModifierEvents | ( |  | self | ) |

## ◆ enableMouseEvents()

enableMouseEvents | ( |  | self | ) |

## ◆ endOOBE()

endOOBE | ( |  | self | ) |

## ◆ fitOnNodePath()

fitOnNodePath | ( |  | self,
|  |  | nodePath = 'None Given' )

## ◆ flash()

flash | ( |  | self,
|  |  | nodePath = 'None Given' )

     Highlight an object by setting it red for a few seconds

## ◆ flashDone()

flashDone | ( |  | self,
|  |  | state )

## ◆ flashDummy()

flashDummy | ( |  | self,
|  |  | state )

## ◆ followSelectedNodePathTask()

followSelectedNodePathTask | ( |  | self,
|  |  | state )

## ◆ getAndSetName()

getAndSetName | ( |  | self,
|  |  | nodePath )

     Prompt user for new node path name

## ◆ getModifiers()

getModifiers | ( |  | self,
|  |  | input,
|  |  | base )

## ◆ gotAlt()

gotAlt | ( |  | self,
|  |  | modifiers )

## ◆ gotControl()

gotControl | ( |  | self,
|  |  | modifiers )

## ◆ gotShift()

gotShift | ( |  | self,
|  |  | modifiers )

## ◆ hideActiveParentReadout()

hideActiveParentReadout | ( |  | self | ) |

## ◆ hideDirectMessage()

hideDirectMessage | ( |  | self,
|  |  | state )

## ◆ hideDirectMessageLater()

hideDirectMessageLater | ( |  | self | ) |

## ◆ hideSelectedNPReadout()

hideSelectedNPReadout | ( |  | self | ) |

## ◆ inputHandler()

inputHandler | ( |  | self,
|  |  | input )

## ◆ isEnabled()

isEnabled | ( |  | self | ) |

## ◆ isNotCycle()

isNotCycle | ( |  | self,
|  |  | nodePath,
|  |  | parent )

## ◆ isolate()

isolate | ( |  | self,
|  |  | nodePath = 'None Given' )

     Show a node path and hide its siblings

## ◆ message()

message | ( |  | self,
|  |  | text )

## ◆ minimumConfiguration()

minimumConfiguration | ( |  | self | ) |

## ◆ oobe()

oobe | ( |  | self | ) |

## ◆ popRedoGroup()

popRedoGroup | ( |  | self | ) |

## ◆ popUndoGroup()

popUndoGroup | ( |  | self | ) |

## ◆ pushRedo()

pushRedo | ( |  | self,
|  |  | nodePathList )

## ◆ pushUndo()

pushUndo | ( |  | self,
|  |  | nodePathList,
|  |  | fResetRedo = 1 )

## ◆ redo()

redo | ( |  | self | ) |

## ◆ removeAllSelected()

removeAllSelected | ( |  | self | ) |

## ◆ removeNodePath()

removeNodePath | ( |  | self,
|  |  | nodePath = 'None Given' )

## ◆ removeUnpickable()

removeUnpickable | ( |  | self,
|  |  | item )

## ◆ reparent()

reparent | ( |  | self,
|  |  | nodePath = None,
|  |  | fWrt = 0 )

## ◆ reset()

reset | ( |  | self | ) |

## ◆ select()

select | ( |  | self,
|  |  | nodePath,
|  |  | fMultiSelect = 0,
|  |  | fSelectTag = 1,
|  |  | fResetAncestry = 1,
|  |  | fLEPane = 0,
|  |  | fUndo = 1 )

## ◆ selectCB()

selectCB | ( |  | self,
|  |  | nodePath,
|  |  | fMultiSelect = 0,
|  |  | fSelectTag = 1,
|  |  | fResetAncestry = 1,
|  |  | fLEPane = 0,
|  |  | fUndo = 1 )

## ◆ setActiveParent()

setActiveParent | ( |  | self,
|  |  | nodePath = None )

## ◆ setCOAMode()

setCOAMode | ( |  | self,
|  |  | mode )

## ◆ setFScaleWidgetByCam()

setFScaleWidgetByCam | ( |  | self,
|  |  | flag )

## ◆ showAllDescendants()

showAllDescendants | ( |  | self,
|  |  | nodePath = None )

     Show the level and its descendants

## ◆ toggleDirect()

toggleDirect | ( |  | self | ) |

## ◆ toggleVis()

toggleVis | ( |  | self,
|  |  | nodePath = 'None Given' )

     Toggle visibility of node path

## ◆ toggleWidgetVis()

toggleWidgetVis | ( |  | self | ) |

## ◆ undo()

undo | ( |  | self | ) |

## ◆ upAncestry()

upAncestry | ( |  | self | ) |

## ◆ useObjectHandles()

useObjectHandles | ( |  | self | ) |

## ◆ widgetResizeTask()

widgetResizeTask | ( |  | self,
|  |  | state )

## Member Data Documentation

## ◆ actionEvents

list actionEvents

## ◆ activeParent

activeParent = None

## ◆ activeParentReadout

activeParentReadout

Initial value:
= OnscreenText.OnscreenText(
pos = (-1.0, -0.975), bg=Vec4(1, 1, 1, 1),
scale = 0.05, align = TextNode.ALeft,
mayChange = 1, font = self.font)

## ◆ ancestry

list ancestry = []

## ◆ ancestryIndex

int ancestryIndex = 0

## ◆ cam

cam = base.cam

## ◆ camera

camera = base.camera

## ◆ cameraControl

cameraControl = DirectCameraControl()

## ◆ camNode

camNode = base.camNode

## ◆ cluster

cluster = createClusterClient()

## ◆ clusterMode

str clusterMode = clusterMode

## ◆ coaMode

coaMode = COA_ORIGIN

## ◆ deviceManager

deviceManager = None

## ◆ DIRECTdisablePost

str DIRECTdisablePost = 'disableDIRECT'
| static

## ◆ directMessageReadout

directMessageReadout

Initial value:
= OnscreenText.OnscreenText(
pos = (-1.0, 0.9), bg=Vec4(1, 1, 1, 1),
scale = 0.05, align = TextNode.ALeft,
mayChange = 1, font = self.font)

## ◆ directOnlyKeyMap

dict directOnlyKeyMap

Initial value:
= {
'u': ('Orbit Upright Camera', 'DIRECT-orbitUprightCam'),
'shift-u': ('Upright Camera', 'DIRECT-uprightCam'),
'1': ('Move Camera to View 1', 'DIRECT-spwanMoveToView-1'),
'2': ('Move Camera to View 2', 'DIRECT-spwanMoveToView-2'),
'3': ('Move Camera to View 3', 'DIRECT-spwanMoveToView-3'),
'4': ('Move Camera to View 4', 'DIRECT-spwanMoveToView-4'),
'5': ('Move Camera to View 5', 'DIRECT-spwanMoveToView-5'),
'6': ('Move Camera to View 6', 'DIRECT-spwanMoveToView-6'),
'7': ('Move Camera to View 7', 'DIRECT-spwanMoveToView-7'),
'8': ('Move Camera to View 8', 'DIRECT-spwanMoveToView-8'),
'9': ('Rotate Camera About widget 90 degrees Counterclockwise', 'DIRECT-swingCamAboutWidget-0'),
'0': ('Rotate Camera About widget 90 degrees Clockwise', 'DIRECT-swingCamAboutWidget-1'),
'`': ('Remove ManipulateCameraTask', 'DIRECT-removeManipulateCameraTask'),
'=': ('Zoom In', 'DIRECT-zoomInCam'),
'shift-=': ('Zoom In', 'DIRECT-zoomInCam'),
'shift-_': ('Zoom Out', 'DIRECT-zoomOutCam'),
'-': ('Zoom Out', 'DIRECT-zoomOutCam'),
'o': ('Toggle OOBE', 'DIRECT-OOBE'),
'[': ('DIRECT-Undo', 'DIRECT-Undo'),
'shift-[': ('DIRECT-Undo', 'DIRECT-Undo'),
']': ('DIRECT-Redo', 'DIRECT-Redo'),
'shift-]': ('DIRECT-Redo', 'DIRECT-Redo'),
}

## ◆ dr

dr = self.drList[0]

## ◆ drList

drList = DisplayRegionList()

## ◆ fAlt

int fAlt = 0

## ◆ fastrak

list fastrak = []

## ◆ fControl

int fControl = 0

## ◆ fEnabled

int fEnabled = 0

## ◆ fEnabledLight

int fEnabledLight = 0

## ◆ fIgnoreDirectOnlyKeyMap

int fIgnoreDirectOnlyKeyMap = 0

## ◆ flashDone

flashDone

## ◆ fMouse1

int fMouse1 = 0

## ◆ fMouse2

int fMouse2 = 0

## ◆ fMouse3

fMouse3 = 0

## ◆ font

font = TextNode.getDefaultFont()

## ◆ fScaleWidgetByCam

int fScaleWidgetByCam = 0

## ◆ fShift

int fShift = 0

## ◆ grid

grid = DirectGrid()

## ◆ group

group = render.attachNewNode('DIRECT')

## ◆ hideDirectMessage

hideDirectMessage

## ◆ hitPt

hitPt = Point3(0.0)

## ◆ hotKeyMap

dict hotKeyMap

## ◆ hpr

hpr = VBase3()

## ◆ inputHandler

inputHandler

## ◆ iRay

iRay = self.dr.iRay

## ◆ iRayList

list iRayList = [x.iRay for x in self.drList]

## ◆ joybox

joybox = None

## ◆ keyEvents

keyEvents = keyList[:]

## ◆ lights

lights = DirectLights(base.direct.group)

## ◆ manipulationControl

manipulationControl = DirectManipulationControl()

## ◆ modifierEvents

list modifierEvents

Initial value:
= ['control', 'control-up', 'control-repeat',
'shift', 'shift-up', 'shift-repeat',
'alt', 'alt-up', 'alt-repeat',
]

## ◆ mouseEvents

mouseEvents

Initial value:
= ['mouse1', 'mouse1-up',
'shift-mouse1', 'shift-mouse1-up',
'control-mouse1', 'control-mouse1-up',
'alt-mouse1', 'alt-mouse1-up',
'mouse2', 'mouse2-up',
'shift-mouse2', 'shift-mouse2-up',
'control-mouse2', 'control-mouse2-up',
'alt-mouse2', 'alt-mouse2-up',
'mouse3', 'mouse3-up',
'shift-mouse3', 'shift-mouse3-up',
'control-mouse3', 'control-mouse3-up',
'alt-mouse3', 'alt-mouse3-up',
]

## ◆ oobeCamera

oobeCamera = hidden.attachNewNode('oobeCamera')

## ◆ oobeMode

int oobeMode = 0

## ◆ oobeVis

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

## ◆ panel

panel = DirectSessionPanel.DirectSessionPanel(parent = tkroot)

## ◆ passThroughKeys

list passThroughKeys = ['v','b','l','p', 'r', 'shift-r', 's', 't','shift-a', 'w']

## ◆ pos

pos = VBase3()

## ◆ radamec

radamec = None

## ◆ redoList

list redoList = []

## ◆ scale

scale = VBase3()

## ◆ selected

selected = SelectedNodePaths()

## ◆ selectedNPReadout

selectedNPReadout

Initial value:
= OnscreenText.OnscreenText(
pos = (-1.0, -0.9), bg=Vec4(1, 1, 1, 1),
scale = 0.05, align = TextNode.ALeft,
mayChange = 1, font = self.font)

## ◆ specialKeys

specialKeys = ['escape', 'delete', 'page_up', 'page_down', 'enter']

## ◆ speicalKeyMap

dict speicalKeyMap

Initial value:
= {
'enter': 'DIRECT-enter',
}

## ◆ trueCamera

trueCamera = self.camera

## ◆ undoList

list undoList = []

## ◆ widget

widget = self.manipulationControl.objectHandles

## ◆ widgetResizeTask

widgetResizeTask = flag

## ◆ win

win = base.win