Browse Source

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

Gyedo Jeon 15 years ago
parent
commit
ecfa584a26
1 changed files with 4 additions and 0 deletions
  1. 4 0
      direct/src/leveleditor/ObjectMgrBase.py

+ 4 - 0
direct/src/leveleditor/ObjectMgrBase.py

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