From 240f5471dda4e02b2c1f8972790f4206cc2309cd Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Mon, 3 Feb 2014 14:10:15 +0000 Subject: [PATCH] Bugfix: properly adding AmbientLight to the result set node. (as a LightNode as every other light and not as Light). git-svn-id: https://jmonkeyengine.googlecode.com/svn/branches/gradle-restructure@11008 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../java/com/jme3/scene/plugins/blender/BlenderLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java index fa5566560..59af8ce9e 100644 --- a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java +++ b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java @@ -43,6 +43,7 @@ import com.jme3.asset.BlenderKey; import com.jme3.asset.BlenderKey.FeaturesToLoad; import com.jme3.asset.BlenderKey.LoadingResults; import com.jme3.asset.ModelKey; +import com.jme3.light.Light; import com.jme3.scene.CameraNode; import com.jme3.scene.LightNode; import com.jme3.scene.Node; @@ -124,7 +125,8 @@ public class BlenderLoader implements AssetLoader { String worldName = worldStructure.getName(); if (blenderKey.getUsedWorld() == null || blenderKey.getUsedWorld().equals(worldName)) { LandscapeHelper landscapeHelper = blenderContext.getHelper(LandscapeHelper.class); - loadingResults.addLight(landscapeHelper.toAmbientLight(worldStructure)); + Light ambientLight = landscapeHelper.toAmbientLight(worldStructure); + loadingResults.addLight(new LightNode(null, ambientLight)); loadingResults.setSky(landscapeHelper.toSky(worldStructure)); loadingResults.setBackgroundColor(landscapeHelper.toBackgroundColor(worldStructure)); }