Przeglądaj źródła

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
Kae..pl 11 lat temu
rodzic
commit
240f5471dd

+ 3 - 1
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));
                             }