Browse Source

Fix to attaching objects to the scene's node.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8268 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl 14 years ago
parent
commit
0dd85b8fe1

+ 1 - 1
engine/src/blender/com/jme3/scene/plugins/blender/AbstractBlenderLoader.java

@@ -82,7 +82,7 @@ import com.jme3.scene.plugins.blender.objects.ObjectHelper;
 				if(pObject.isNotNull()) {
 					Structure objectStructure = pObject.fetchData(blenderContext.getInputStream()).get(0);
 					Object object = this.toObject(objectStructure);
-					if(object instanceof Spatial) {
+					if(object instanceof Spatial && ((Spatial) object).getParent()==null) {
 						result.attachChild((Spatial) object);
 					} else if(object instanceof Light) {
 						result.addLight((Light)object);