浏览代码

ZAC: replaced faulty cleanup code with removeChildren call. Should be cleaner

Greg Wiatroski 19 年之前
父节点
当前提交
531a22f22b
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      direct/src/actor/Actor.py

+ 3 - 4
direct/src/actor/Actor.py

@@ -468,10 +468,9 @@ class Actor(DirectObject, NodePath):
             self.__LODNode = None
 
         # remove geom node and all its children
-        for i in xrange (0, self.__geomNode.getNumChildren()):
-            child = self.__geomNode.getChild(i)
-            child.removeNode()
-
+        self.__geomNode.removeChildren()
+        self.__geomNode.removeNode()
+        
         self.__hasLOD = 0
 
     # accessing