Explorar el Código

- make GeometryBatchFactory.optimize() replace the optimized spatial

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7212 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 hace 14 años
padre
commit
345986fb70
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java

+ 6 - 0
engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java

@@ -259,6 +259,12 @@ public class GeometryBatchFactory {
             node.attachChild(geom);
         }
 
+        Node parent = scene.getParent();
+        if(parent != null){
+            scene.removeFromParent();
+            parent.attachChild(node);
+        }
+
         return node;
     }