Browse Source

- make GeometryBatchFactory.optimize() replace the optimized spatial

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7212 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 years ago
parent
commit
345986fb70
1 changed files with 6 additions and 0 deletions
  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.attachChild(geom);
         }
         }
 
 
+        Node parent = scene.getParent();
+        if(parent != null){
+            scene.removeFromParent();
+            parent.attachChild(node);
+        }
+
         return node;
         return node;
     }
     }