瀏覽代碼

Merge pull request #2631 from MackeyK24/master

Master
David Catuhe 8 年之前
父節點
當前提交
3d08781a6b
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Exporters/3ds Max/BabylonExport.Entities/BabylonScene.cs

+ 3 - 3
Exporters/3ds Max/BabylonExport.Entities/BabylonScene.cs

@@ -171,10 +171,10 @@ namespace BabylonExport.Entities
                 LightsList.Add(light);
             }
 
-            cameras = CamerasList.ToArray();
-            lights = LightsList.ToArray();
+            cameras = (CamerasList.Count > 0) ? CamerasList.ToArray() : null;
+            lights = (LightsList.Count > 0) ? LightsList.ToArray() : null;
 
-            if (activeCameraID == null)
+            if (activeCameraID == null && CamerasList.Count > 0)
             {
                 activeCameraID = CamerasList[0].id;
             }