Panda3D
Public Member Functions | Public Attributes | List of all members
ObjectMgrBase Class Reference
Inheritance diagram for ObjectMgrBase:
ObjectMgr

Public Member Functions

def __init__ (self, editor)
 
def addNewCurve (self, curveInfo, degree, uid=None, parent=None, fSelectObject=True, nodePath=None)
 
def addNewCurveFromFile (self, curveInfo, degree, uid=None, parent=None, fSelectObject=True, nodePath=None)
 
def addNewObject (self, typeName, uid=None, model=None, parent=None, anim=None, fSelectObject=True, nodePath=None, nameStr=None)
 
def deselectAll (self)
 
def duplicateChild (self, nodePath, parent)
 
def duplicateObject (self, nodePath, parent=None)
 
def duplicateSelected (self)
 
def findActors (self, parent)
 
def findNodes (self, parent)
 
def findObjectById (self, uid)
 
def findObjectByNodePath (self, nodePath)
 
def findObjectByNodePathBelow (self, nodePath)
 
def findObjectsByTypeName (self, typeName)
 
def flatten (self, newobjModel, model, objDef, uid)
 
def genUniqueId (self)
 
def getPostSaveData (self)
 
def getPreSaveData (self)
 
def getSaveData (self)
 
def makeSelectedLive (self)
 
def onEnterObjectPropUI (self, event)
 
def onLeaveObjectPropUI (self, event)
 
def removeObjectById (self, uid)
 
def removeObjectByNodePath (self, nodePath)
 
def replaceObjectWithTypeName (self, obj, typeName)
 
def reset (self)
 
def selectObject (self, nodePath, fLEPane=0)
 
def selectObjectCB (self, obj, fLEPane)
 
def setObjectTransform (self, uid, xformMat)
 
def spawnUpdateObjectUITask (self)
 
def traverse (self, parent, parentId=None)
 
def updateCurve (self, val, obj)
 
def updateObjectAnim (self, anim, obj, fSelectObject=True)
 
def updateObjectAnimFromUI (self, event, obj)
 
def updateObjectColor (self, r, g, b, a, np=None)
 
def updateObjectModel (self, model, obj, fSelectObject=True)
 
def updateObjectModelFromUI (self, event, obj)
 
def updateObjectProperties (self, nodePath, propValues)
 
def updateObjectProperty (self, event, obj, propName)
 
def updateObjectPropertyUI (self, obj)
 
def updateObjectPropValue (self, obj, propName, val, fSelectObject=False, fUndo=True)
 
def updateObjectTransform (self, event)
 
def updateObjectUITask (self, state)
 

Public Attributes

 Actor
 
 currLiveNP
 
 currNodePath
 
 editor
 
 lastUid
 
 lastUidMod
 
 lastUidMode
 
 Nodes
 
 npIndex
 
 objDegree
 
 objects
 
 objectsLastXform
 
 saveData
 

Detailed Description

ObjectMgr will create, manage, update objects in the scene 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  editor 
)

Reimplemented in ObjectMgr.

Member Function Documentation

◆ addNewCurve()

def addNewCurve (   self,
  curveInfo,
  degree,
  uid = None,
  parent = None,
  fSelectObject = True,
  nodePath = None 
)
function to add new curve to the scene

◆ addNewCurveFromFile()

def addNewCurveFromFile (   self,
  curveInfo,
  degree,
  uid = None,
  parent = None,
  fSelectObject = True,
  nodePath = None 
)
function to add new curve to the scene from file

◆ addNewObject()

def addNewObject (   self,
  typeName,
  uid = None,
  model = None,
  parent = None,
  anim = None,
  fSelectObject = True,
  nodePath = None,
  nameStr = None 
)
function to add new obj to the scene 

◆ deselectAll()

def deselectAll (   self)

◆ duplicateChild()

def duplicateChild (   self,
  nodePath,
  parent 
)

◆ duplicateObject()

def duplicateObject (   self,
  nodePath,
  parent = None 
)

◆ duplicateSelected()

def duplicateSelected (   self)

◆ findActors()

def findActors (   self,
  parent 
)

◆ findNodes()

def findNodes (   self,
  parent 
)

◆ findObjectById()

def findObjectById (   self,
  uid 
)

◆ findObjectByNodePath()

def findObjectByNodePath (   self,
  nodePath 
)

◆ findObjectByNodePathBelow()

def findObjectByNodePathBelow (   self,
  nodePath 
)

◆ findObjectsByTypeName()

def findObjectsByTypeName (   self,
  typeName 
)

◆ flatten()

def flatten (   self,
  newobjModel,
  model,
  objDef,
  uid 
)

◆ genUniqueId()

def genUniqueId (   self)

◆ getPostSaveData()

def getPostSaveData (   self)
if there are additional data to be saved after main data
you can override this function to populate data

◆ getPreSaveData()

def getPreSaveData (   self)
if there are additional data to be saved before main data
you can override this function to populate data

◆ getSaveData()

def getSaveData (   self)

◆ makeSelectedLive()

def makeSelectedLive (   self)

◆ onEnterObjectPropUI()

def onEnterObjectPropUI (   self,
  event 
)

◆ onLeaveObjectPropUI()

def onLeaveObjectPropUI (   self,
  event 
)

◆ removeObjectById()

def removeObjectById (   self,
  uid 
)

◆ removeObjectByNodePath()

def removeObjectByNodePath (   self,
  nodePath 
)

◆ replaceObjectWithTypeName()

def replaceObjectWithTypeName (   self,
  obj,
  typeName 
)

◆ reset()

def reset (   self)

◆ selectObject()

def selectObject (   self,
  nodePath,
  fLEPane = 0 
)

◆ selectObjectCB()

def selectObjectCB (   self,
  obj,
  fLEPane 
)

◆ setObjectTransform()

def setObjectTransform (   self,
  uid,
  xformMat 
)

◆ spawnUpdateObjectUITask()

def spawnUpdateObjectUITask (   self)

◆ traverse()

def traverse (   self,
  parent,
  parentId = None 
)
Trasverse scene graph to gather data for saving

◆ updateCurve()

def updateCurve (   self,
  val,
  obj 
)

◆ updateObjectAnim()

def updateObjectAnim (   self,
  anim,
  obj,
  fSelectObject = True 
)
replace object's anim 

◆ updateObjectAnimFromUI()

def updateObjectAnimFromUI (   self,
  event,
  obj 
)
replace object's anim with one selected from UI 

◆ updateObjectColor()

def updateObjectColor (   self,
  r,
  g,
  b,
  a,
  np = None 
)

◆ updateObjectModel()

def updateObjectModel (   self,
  model,
  obj,
  fSelectObject = True 
)
replace object's model 

◆ updateObjectModelFromUI()

def updateObjectModelFromUI (   self,
  event,
  obj 
)
replace object's model with one selected from UI 

◆ updateObjectProperties()

def updateObjectProperties (   self,
  nodePath,
  propValues 
)
When a saved level is loaded,
update an object's properties
And call update function if defined.

◆ updateObjectProperty()

def updateObjectProperty (   self,
  event,
  obj,
  propName 
)
When an obj's property is updated in UI,
this will update it's value in data structure.
And call update function if defined.

◆ updateObjectPropertyUI()

def updateObjectPropertyUI (   self,
  obj 
)

◆ updateObjectPropValue()

def updateObjectPropValue (   self,
  obj,
  propName,
  val,
  fSelectObject = False,
  fUndo = True 
)
Update object property value and
call update function if defined.

◆ updateObjectTransform()

def updateObjectTransform (   self,
  event 
)

◆ updateObjectUITask()

def updateObjectUITask (   self,
  state 
)

Member Data Documentation

◆ Actor

◆ currLiveNP

currLiveNP

◆ currNodePath

currNodePath

◆ editor

editor

◆ lastUid

lastUid

◆ lastUidMod

lastUidMod

◆ lastUidMode

lastUidMode

◆ Nodes

Nodes

◆ npIndex

npIndex

◆ objDegree

objDegree

◆ objects

objects

◆ objectsLastXform

objectsLastXform

◆ saveData

saveData