direct.leveleditor.ObjectMgrBase

from direct.leveleditor.ObjectMgrBase import ObjectMgrBase, PythonNodePath

Defines ObjectMgrBase

Inheritance diagram

Inheritance diagram of direct.leveleditor.ObjectMgrBase

class ObjectMgrBase(editor)[source]

Bases: object

ObjectMgr will create, manage, update objects in the scene

__init__(self, editor)[source]
addNewCurve(self, curveInfo, degree, uid=None, parent=None, fSelectObject=True, nodePath=None)[source]

function to add new curve to the scene

addNewCurveFromFile(self, curveInfo, degree, uid=None, parent=None, fSelectObject=True, nodePath=None)[source]

function to add new curve to the scene from file

addNewObject(self, typeName, uid=None, model=None, parent=None, anim=None, fSelectObject=True, nodePath=None, nameStr=None)[source]

function to add new obj to the scene

deselectAll(self)[source]
duplicateChild(self, nodePath, parent)[source]
duplicateObject(self, nodePath, parent=None)[source]
duplicateSelected(self)[source]
findActors(self, parent)[source]
findNodes(self, parent)[source]
findObjectById(self, uid)[source]
findObjectByNodePath(self, nodePath)[source]
findObjectByNodePathBelow(self, nodePath)[source]
findObjectsByTypeName(self, typeName)[source]
flatten(self, newobjModel, model, objDef, uid)[source]
genUniqueId(self)[source]
getPostSaveData(self)[source]

if there are additional data to be saved after main data you can override this function to populate data

getPreSaveData(self)[source]

if there are additional data to be saved before main data you can override this function to populate data

getSaveData(self)[source]
makeSelectedLive(self)[source]
onEnterObjectPropUI(self, event)[source]
onLeaveObjectPropUI(self, event)[source]
removeObjectById(self, uid)[source]
removeObjectByNodePath(self, nodePath)[source]
replaceObjectWithTypeName(self, obj, typeName)[source]
reset(self)[source]
selectObject(self, nodePath, fLEPane=0)[source]
selectObjectCB(self, obj, fLEPane)[source]
setObjectTransform(self, uid, xformMat)[source]
spawnUpdateObjectUITask(self)[source]
traverse(self, parent, parentId=None)[source]

Trasverse scene graph to gather data for saving

updateCurve(self, val, obj)[source]
updateObjectAnim(self, anim, obj, fSelectObject=True)[source]

replace object’s anim

updateObjectAnimFromUI(self, event, obj)[source]

replace object’s anim with one selected from UI

updateObjectColor(self, r, g, b, a, np=None)[source]
updateObjectModel(self, model, obj, fSelectObject=True)[source]

replace object’s model

updateObjectModelFromUI(self, event, obj)[source]

replace object’s model with one selected from UI

updateObjectPropValue(self, obj, propName, val, fSelectObject=False, fUndo=True)[source]

Update object property value and call update function if defined.

updateObjectProperties(self, nodePath, propValues)[source]

When a saved level is loaded, update an object’s properties And call update function if defined.

updateObjectProperty(self, event, obj, propName)[source]

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(self, obj)[source]
updateObjectTransform(self, event)[source]
updateObjectUITask(self, state)[source]
class PythonNodePath(node)[source]

Bases: panda3d.core.NodePath

__init__(self, node)[source]