Panda3D

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

## Public Member Functions
| __init__ (self, parent=None, **kw)
| addNodePath (self, nodePath)
| addNodePathToDict (self, nodePath, names, menu, dict)
| addRefNodePath (self, nodePath)
| appInit (self)
| USER METHODS ### To be overridden.
| createInterface (self)
| onDestroy (self, event)
| printNodePathInfo (self)
| pushRedo (self)
| pushRedoHook (self)
| pushUndo (self, fResetRedo=1)
| pushUndoHook (self)
| redoHook (self, nodePathList=[])
| redoListEmptyHook (self)
| resetAll (self)
| resetHpr (self)
| resetPos (self)
| resetScale (self)
| selectNodePathNamed (self, name)
| selectRefNodePathNamed (self, name)
| setActiveNodePath (self, nodePath)
| setMovementMode (self, movementMode)
| WIDGET OPERATIONS ###.
| setReferenceNodePath (self, nodePath)
| setScalingMode (self)
| undoHook (self, nodePathList=[])
| undoListEmptyHook (self)
| unitScale (self)
| updateAuxiliaryCoordinateSystems (self)
| updateHprWidgets (self, hpr)
| updatePlacer (self)
| updatePosWidgets (self, pos)
| updateResetValues (self, nodePath)
| updateScaleWidgets (self, scale)
| xform (self, value, axis)
| NODE PATH TRANSFORMATION OPERATIONS ###.
| xformOrbit (self, value, axis)
| xformRelative (self, value, axis)
| xformScale (self, value, axis)
| xformStart (self, data)
| xformStop (self, data)
| zeroAll (self)
| zeroHpr (self)
| zeroPos (self)
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
| deltaHpr = Vec3(0)
| hprH
| hprP
| hprR
| initHpr = Vec3(0)
| initPos = Vec3(0)
| initScale = Vec3(1)
str | movementMode = 'Relative To:'
dict | nodePathDict = {}
| nodePathMenu
tuple | nodePathMenuBG
tuple | nodePathMenuEntry
list | nodePathNames = ['camera', 'widget', 'selected']
| orbitFromCS
| orbitToCS = base.direct.group.attachNewNode('placerOrbitToCS')
| posOffset = Vec3(0)
| posX
| posY
| posZ
| redoButton
| refCS = self.tempCS
dict | refNodePathDict = {}
| refNodePathMenu
tuple | refNodePathMenuEntry
list | refNodePathNames
| scaleMenubutton = scaleGroup.component('tag')
| scaleX
| scaleY
| scaleZ
| scalingMode = StringVar()
| tempCS = base.direct.group.attachNewNode('placerTempCS')
| undoButton
list | undoEvents
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

## ◆ addNodePath()

addNodePath | ( |  | self,
|  |  | nodePath )

## ◆ addNodePathToDict()

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

## ◆ addRefNodePath()

addRefNodePath | ( |  | self,
|  |  | nodePath )

## ◆ appInit()

appInit | ( |  | self | ) |

USER METHODS ### To be overridden.

Reimplemented from AppShell.

## ◆ createInterface()

createInterface | ( |  | self | ) |

Reimplemented from AppShell.

## ◆ onDestroy()

onDestroy | ( |  | self,
|  |  | event )

Reimplemented from AppShell.

## ◆ printNodePathInfo()

printNodePathInfo | ( |  | self | ) |

## ◆ pushRedo()

pushRedo | ( |  | self | ) |

## ◆ pushRedoHook()

pushRedoHook | ( |  | self | ) |

## ◆ pushUndo()

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

## ◆ pushUndoHook()

pushUndoHook | ( |  | self | ) |

## ◆ redoHook()

redoHook | ( |  | self,
|  |  | nodePathList = [] )

## ◆ redoListEmptyHook()

redoListEmptyHook | ( |  | self | ) |

## ◆ resetAll()

resetAll | ( |  | self | ) |

## ◆ resetHpr()

resetHpr | ( |  | self | ) |

## ◆ resetPos()

resetPos | ( |  | self | ) |

## ◆ resetScale()

resetScale | ( |  | self | ) |

## ◆ selectNodePathNamed()

selectNodePathNamed | ( |  | self,
|  |  | name )

## ◆ selectRefNodePathNamed()

selectRefNodePathNamed | ( |  | self,
|  |  | name )

## ◆ setActiveNodePath()

setActiveNodePath | ( |  | self,
|  |  | nodePath )

## ◆ setMovementMode()

setMovementMode | ( |  | self,
|  |  | movementMode )

WIDGET OPERATIONS ###.

## ◆ setReferenceNodePath()

setReferenceNodePath | ( |  | self,
|  |  | nodePath )

## ◆ setScalingMode()

setScalingMode | ( |  | self | ) |

## ◆ undoHook()

undoHook | ( |  | self,
|  |  | nodePathList = [] )

## ◆ undoListEmptyHook()

undoListEmptyHook | ( |  | self | ) |

## ◆ unitScale()

unitScale | ( |  | self | ) |

## ◆ updateAuxiliaryCoordinateSystems()

updateAuxiliaryCoordinateSystems | ( |  | self | ) |

## ◆ updateHprWidgets()

updateHprWidgets | ( |  | self,
|  |  | hpr )

## ◆ updatePlacer()

updatePlacer | ( |  | self | ) |

## ◆ updatePosWidgets()

updatePosWidgets | ( |  | self,
|  |  | pos )

## ◆ updateResetValues()

updateResetValues | ( |  | self,
|  |  | nodePath )

## ◆ updateScaleWidgets()

updateScaleWidgets | ( |  | self,
|  |  | scale )

## ◆ xform()

xform | ( |  | self,
|  |  | value,
|  |  | axis )

NODE PATH TRANSFORMATION OPERATIONS ###.

## ◆ xformOrbit()

xformOrbit | ( |  | self,
|  |  | value,
|  |  | axis )

## ◆ xformRelative()

xformRelative | ( |  | self,
|  |  | value,
|  |  | axis )

## ◆ xformScale()

xformScale | ( |  | self,
|  |  | value,
|  |  | axis )

## ◆ xformStart()

xformStart | ( |  | self,
|  |  | data )

## ◆ xformStop()

xformStop | ( |  | self,
|  |  | data )

## ◆ zeroAll()

zeroAll | ( |  | self | ) |

## ◆ zeroHpr()

zeroHpr | ( |  | self | ) |

## ◆ zeroPos()

zeroPos | ( |  | self | ) |

## Member Data Documentation

## ◆ deltaHpr

deltaHpr = Vec3(0)

## ◆ hprH

hprH

Initial value:
= self.createcomponent('hprH', (), None,
Dial.AngleDial, (hprInterior,),
style = 'mini',
text = 'H', value = 0.0,
relief = FLAT,
label_foreground = 'blue')

## ◆ hprP

hprP

Initial value:
= self.createcomponent('hprP', (), None,
Dial.AngleDial, (hprInterior,),
style = 'mini',
text = 'P', value = 0.0,
relief = FLAT,
label_foreground = 'red')

## ◆ hprR

hprR

Initial value:
= self.createcomponent('hprR', (), None,
Dial.AngleDial, (hprInterior,),
style = 'mini',
text = 'R', value = 0.0,
relief = FLAT,
label_foreground = '#00A000')

## ◆ initHpr

initHpr = Vec3(0)

## ◆ initPos

initPos = Vec3(0)

## ◆ initScale

initScale = Vec3(1)

## ◆ movementMode

str movementMode = 'Relative To:'

## ◆ nodePathDict

nodePathDict = {}

## ◆ nodePathMenu

nodePathMenu

Initial value:
= Pmw.ComboBox(
menuFrame, labelpos = W, label_text = 'Node Path:',
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 = ['camera', 'widget', 'selected']

## ◆ orbitFromCS

orbitFromCS

Initial value:
= base.direct.group.attachNewNode(
'placerOrbitFromCS')

## ◆ orbitToCS

orbitToCS = base.direct.group.attachNewNode('placerOrbitToCS')

## ◆ posOffset

posOffset = Vec3(0)

## ◆ posX

posX

Initial value:
= self.createcomponent('posX', (), None,
Floater.Floater, (posInterior,),
text = 'X', relief = FLAT,
value = 0.0,
label_foreground = 'Red')

## ◆ posY

posY

Initial value:
= self.createcomponent('posY', (), None,
Floater.Floater, (posInterior,),
text = 'Y', relief = FLAT,
value = 0.0,
label_foreground = '#00A000')

## ◆ posZ

posZ

Initial value:
= self.createcomponent('posZ', (), None,
Floater.Floater, (posInterior,),
text = 'Z', relief = FLAT,
value = 0.0,
label_foreground = 'Blue')

## ◆ redoButton

redoButton

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

## ◆ refCS

refCS = self.tempCS

## ◆ refNodePathDict

refNodePathDict = {}

## ◆ refNodePathMenu

refNodePathMenu

Initial value:
= Pmw.ComboBox(
menuFrame, entry_width = 16,
selectioncommand = self.selectRefNodePathNamed,
scrolledlist_items = self.refNodePathNames)

## ◆ refNodePathMenuEntry

tuple refNodePathMenuEntry

Initial value:
= (
self.refNodePathMenu.component('entryfield_entry'))

## ◆ refNodePathNames

refNodePathNames

Initial value:
= ['parent', 'self', 'render',
'camera', 'widget', 'selected']

## ◆ scaleMenubutton

scaleMenubutton = scaleGroup.component('tag')

## ◆ scaleX

scaleX

Initial value:
= self.createcomponent('scaleX', (), None,
Floater.Floater, (scaleInterior,),
text = 'X Scale',
relief = FLAT,
min = 0.0001, value = 1.0,
resetValue = 1.0,
label_foreground = 'Red')

## ◆ scaleY

scaleY

Initial value:
= self.createcomponent('scaleY', (), None,
Floater.Floater, (scaleInterior,),
text = 'Y Scale',
relief = FLAT,
min = 0.0001, value = 1.0,
resetValue = 1.0,
label_foreground = '#00A000')

## ◆ scaleZ

scaleZ

Initial value:
= self.createcomponent('scaleZ', (), None,
Floater.Floater, (scaleInterior,),
text = 'Z Scale',
relief = FLAT,
min = 0.0001, value = 1.0,
resetValue = 1.0,
label_foreground = 'Blue')

## ◆ scalingMode

scalingMode = StringVar()

## ◆ tempCS

tempCS = base.direct.group.attachNewNode('placerTempCS')

## ◆ undoButton

undoButton

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

## ◆ undoEvents

list undoEvents

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)]