mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Added selectObjectCB function to be called from selectObject function
This commit is contained in:
parent
0b04414091
commit
b00c459d5b
@ -233,7 +233,9 @@ class ObjectMgrBase:
|
|||||||
obj = self.findObjectByNodePath(nodePath)
|
obj = self.findObjectByNodePath(nodePath)
|
||||||
if obj is None:
|
if obj is None:
|
||||||
return
|
return
|
||||||
|
self.selectObjectCB(obj, fLEPane)
|
||||||
|
|
||||||
|
def selectObjectCB(self, obj, fLEPane):
|
||||||
self.currNodePath = obj[OG.OBJ_NP]
|
self.currNodePath = obj[OG.OBJ_NP]
|
||||||
self.objectsLastXform[obj[OG.OBJ_UID]] = Mat4(self.currNodePath.getMat())
|
self.objectsLastXform[obj[OG.OBJ_UID]] = Mat4(self.currNodePath.getMat())
|
||||||
# [gjeon] to connect transform UI with nodepath's transform
|
# [gjeon] to connect transform UI with nodepath's transform
|
||||||
@ -383,6 +385,7 @@ class ObjectMgrBase:
|
|||||||
# load new model
|
# load new model
|
||||||
newobjModel = loader.loadModel(model, okMissing=True)
|
newobjModel = loader.loadModel(model, okMissing=True)
|
||||||
if newobjModel is None:
|
if newobjModel is None:
|
||||||
|
print "Can't load model %s"%model
|
||||||
return
|
return
|
||||||
newobj = PythonNodePath(newobjModel)
|
newobj = PythonNodePath(newobjModel)
|
||||||
newobj.setTag('OBJRoot','1')
|
newobj.setTag('OBJRoot','1')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user