Made additional geometry for visual aid doesn't inherit object color and sceneGraph label updated after changing model

This commit is contained in:
Gyedo Jeon 2010-04-29 01:29:58 +00:00
parent 9462d332dc
commit ecfa584a26

View File

@ -373,6 +373,7 @@ class ObjectMgrBase:
obj[OG.OBJ_RGBA] = (r,g,b,a)
for child in np.getChildren():
if not child.hasTag('OBJRoot') and\
not child.hasTag('_le_sys') and\
child.getName() != 'bboxLines':
child.setTransparency(1)
child.setColorScale(r, g, b, a)
@ -423,6 +424,9 @@ class ObjectMgrBase:
obj[OG.OBJ_MODEL] = model
self.npIndex[NodePath(newobj)] = obj[OG.OBJ_UID]
# update scene graph label
self.editor.ui.sceneGraphUI.changeLabel(obj[OG.OBJ_UID], newobj.getName())
self.editor.fNeedToSave = True
# update anim if necessary
animList = obj[OG.OBJ_DEF].animDict.get(model)