Jelajahi Sumber

Added 3dsmax exportation for range, color animation and blur

David Catuhe 10 tahun lalu
induk
melakukan
5fb32c2dcc
61 mengubah file dengan 8381 tambahan dan 8328 penghapusan
  1. 48 48
      Exporters/3ds Max/BabylonExport.Entities/BabylonAbstractMesh.cs
  2. 39 39
      Exporters/3ds Max/BabylonExport.Entities/BabylonActions.cs
  3. 42 41
      Exporters/3ds Max/BabylonExport.Entities/BabylonAnimation.cs
  4. 14 14
      Exporters/3ds Max/BabylonExport.Entities/BabylonAnimationKey.cs
  5. 28 28
      Exporters/3ds Max/BabylonExport.Entities/BabylonBone.cs
  6. 84 84
      Exporters/3ds Max/BabylonExport.Entities/BabylonCamera.cs
  7. 27 27
      Exporters/3ds Max/BabylonExport.Entities/BabylonFresnelParameters.cs
  8. 19 19
      Exporters/3ds Max/BabylonExport.Entities/BabylonIAnimatable.cs
  9. 20 20
      Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlare.cs
  10. 17 17
      Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlareSystem.cs
  11. 76 76
      Exporters/3ds Max/BabylonExport.Entities/BabylonLight.cs
  12. 85 80
      Exporters/3ds Max/BabylonExport.Entities/BabylonMaterial.cs
  13. 122 122
      Exporters/3ds Max/BabylonExport.Entities/BabylonMesh.cs
  14. 17 17
      Exporters/3ds Max/BabylonExport.Entities/BabylonMultiMaterial.cs
  15. 86 86
      Exporters/3ds Max/BabylonExport.Entities/BabylonParticleSystem.cs
  16. 185 185
      Exporters/3ds Max/BabylonExport.Entities/BabylonScene.cs
  17. 39 36
      Exporters/3ds Max/BabylonExport.Entities/BabylonShadowGenerator.cs
  18. 17 17
      Exporters/3ds Max/BabylonExport.Entities/BabylonSkeleton.cs
  19. 86 86
      Exporters/3ds Max/BabylonExport.Entities/BabylonSound.cs
  20. 24 24
      Exporters/3ds Max/BabylonExport.Entities/BabylonSubMesh.cs
  21. 87 87
      Exporters/3ds Max/BabylonExport.Entities/BabylonTexture.cs
  22. 36 36
      Exporters/3ds Max/BabylonExport.Entities/BabylonVector3.cs
  23. TEMPAT SAMPAH
      Exporters/3ds Max/Max2Babylon-0.24.zip
  24. 8 8
      Exporters/3ds Max/Max2Babylon/BabylonActionCallback.cs
  25. 71 71
      Exporters/3ds Max/Max2Babylon/BabylonExportActionItem.cs
  26. 91 91
      Exporters/3ds Max/Max2Babylon/BabylonPropertiesActionItem.cs
  27. 52 52
      Exporters/3ds Max/Max2Babylon/Descriptor.cs
  28. 315 309
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Animation.cs
  29. 127 127
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Camera.cs
  30. 223 218
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Light.cs
  31. 149 149
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Material.cs
  32. 726 726
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Mesh.cs
  33. 66 65
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.ShadowGenerator.cs
  34. 134 134
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Skeleton.cs
  35. 244 244
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs
  36. 322 322
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.cs
  37. 69 69
      Exporters/3ds Max/Max2Babylon/Exporter/GlobalVertex.cs
  38. 98 98
      Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.Designer.cs
  39. 170 170
      Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.cs
  40. 119 119
      Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.resx
  41. 415 415
      Exporters/3ds Max/Max2Babylon/Forms/CameraPropertiesForm.Designer.cs
  42. 71 71
      Exporters/3ds Max/Max2Babylon/Forms/CameraPropertiesForm.cs
  43. 119 119
      Exporters/3ds Max/Max2Babylon/Forms/CameraPropertiesForm.resx
  44. 319 319
      Exporters/3ds Max/Max2Babylon/Forms/ExporterForm.Designer.cs
  45. 229 229
      Exporters/3ds Max/Max2Babylon/Forms/ExporterForm.cs
  46. 320 320
      Exporters/3ds Max/Max2Babylon/Forms/ExporterForm.resx
  47. 419 405
      Exporters/3ds Max/Max2Babylon/Forms/LightPropertiesForm.Designer.cs
  48. 67 65
      Exporters/3ds Max/Max2Babylon/Forms/LightPropertiesForm.cs
  49. 119 119
      Exporters/3ds Max/Max2Babylon/Forms/LightPropertiesForm.resx
  50. 943 943
      Exporters/3ds Max/Max2Babylon/Forms/ObjectPropertiesForm.Designer.cs
  51. 122 122
      Exporters/3ds Max/Max2Babylon/Forms/ObjectPropertiesForm.cs
  52. 122 122
      Exporters/3ds Max/Max2Babylon/Forms/ObjectPropertiesForm.resx
  53. 286 272
      Exporters/3ds Max/Max2Babylon/Forms/ScenePropertiesForm.Designer.cs
  54. 49 47
      Exporters/3ds Max/Max2Babylon/Forms/ScenePropertiesForm.cs
  55. 122 122
      Exporters/3ds Max/Max2Babylon/Forms/ScenePropertiesForm.resx
  56. 152 152
      Exporters/3ds Max/Max2Babylon/Forms/Vector3Control.Designer.cs
  57. 30 30
      Exporters/3ds Max/Max2Babylon/Forms/Vector3Control.cs
  58. 119 119
      Exporters/3ds Max/Max2Babylon/Forms/Vector3Control.resx
  59. 128 128
      Exporters/3ds Max/Max2Babylon/GlobalUtility.cs
  60. 19 19
      Exporters/3ds Max/Max2Babylon/JsonTextWriterOptimized.cs
  61. 29 29
      Exporters/3ds Max/Max2Babylon/Loader.cs

+ 48 - 48
Exporters/3ds Max/BabylonExport.Entities/BabylonAbstractMesh.cs

@@ -1,48 +1,48 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonAbstractMesh: BabylonIAnimatable
-    {
-        [DataMember]
-        public string name { get; set; }
-        
-        [DataMember]
-        public float[] position { get; set; }
-
-        [DataMember]
-        public float[] rotation { get; set; }
-
-        [DataMember]
-        public float[] scaling { get; set; }
-
-        [DataMember]
-        public float[] rotationQuaternion { get; set; }
-
-        [DataMember]
-        public BabylonActions actions { get; set; }
-
-        [DataMember]
-        public BabylonAnimation[] animations { get; set; }
-
-        [DataMember]
-        public bool autoAnimate { get; set; }
-
-        [DataMember]
-        public int autoAnimateFrom { get; set; }
-
-        [DataMember]
-        public int autoAnimateTo { get; set; }
-
-        [DataMember]
-        public bool autoAnimateLoop { get; set; }
-
-        public BabylonAbstractMesh()
-        {
-            position = new[] { 0f, 0f, 0f };
-            rotation = new[] { 0f, 0f, 0f };
-            scaling = new[] { 1f, 1f, 1f };
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonAbstractMesh: BabylonIAnimatable
+    {
+        [DataMember]
+        public string name { get; set; }
+        
+        [DataMember]
+        public float[] position { get; set; }
+
+        [DataMember]
+        public float[] rotation { get; set; }
+
+        [DataMember]
+        public float[] scaling { get; set; }
+
+        [DataMember]
+        public float[] rotationQuaternion { get; set; }
+
+        [DataMember]
+        public BabylonActions actions { get; set; }
+
+        [DataMember]
+        public BabylonAnimation[] animations { get; set; }
+
+        [DataMember]
+        public bool autoAnimate { get; set; }
+
+        [DataMember]
+        public int autoAnimateFrom { get; set; }
+
+        [DataMember]
+        public int autoAnimateTo { get; set; }
+
+        [DataMember]
+        public bool autoAnimateLoop { get; set; }
+
+        public BabylonAbstractMesh()
+        {
+            position = new[] { 0f, 0f, 0f };
+            rotation = new[] { 0f, 0f, 0f };
+            scaling = new[] { 1f, 1f, 1f };
+        }
+    }
+}

+ 39 - 39
Exporters/3ds Max/BabylonExport.Entities/BabylonActions.cs

@@ -1,39 +1,39 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonActionsProperties
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public string value { get; set; }
-
-        [DataMember]
-        public string targetType { get; set; }
-    }
-
-    [DataContract]
-    public class BabylonActions
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public int type { get; set; }
-
-        [DataMember]
-        public bool detached { get; set; }
-
-        [DataMember]
-        public BabylonActions[] children { get; set; }
-
-        [DataMember]
-        public BabylonActions[] combine { get; set; }
-
-        [DataMember]
-        public BabylonActionsProperties[] properties { get; set; }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonActionsProperties
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public string value { get; set; }
+
+        [DataMember]
+        public string targetType { get; set; }
+    }
+
+    [DataContract]
+    public class BabylonActions
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public int type { get; set; }
+
+        [DataMember]
+        public bool detached { get; set; }
+
+        [DataMember]
+        public BabylonActions[] children { get; set; }
+
+        [DataMember]
+        public BabylonActions[] combine { get; set; }
+
+        [DataMember]
+        public BabylonActionsProperties[] properties { get; set; }
+    }
+}

+ 42 - 41
Exporters/3ds Max/BabylonExport.Entities/BabylonAnimation.cs

@@ -1,41 +1,42 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonAnimation
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public string property { get; set; }
-
-        [DataMember]
-        public int dataType { get; set; }
-
-        [DataMember]
-        public int loopBehavior { get; set; }
-
-        [DataMember]
-        public int framePerSecond { get; set; }
-
-        [DataMember]
-        public BabylonAnimationKey[] keys { get; set; }
-
-        public enum DataType
-        {
-            Float = 0,
-            Vector3 = 1,
-            Quaternion = 2,
-            Matrix = 3
-        }
-
-        public enum LoopBehavior
-        {
-            Relative = 0,
-            Cycle = 1,
-            Constant = 2
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonAnimation
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public string property { get; set; }
+
+        [DataMember]
+        public int dataType { get; set; }
+
+        [DataMember]
+        public int loopBehavior { get; set; }
+
+        [DataMember]
+        public int framePerSecond { get; set; }
+
+        [DataMember]
+        public BabylonAnimationKey[] keys { get; set; }
+
+        public enum DataType
+        {
+            Float = 0,
+            Vector3 = 1,
+            Quaternion = 2,
+            Matrix = 3,
+            Color3 = 4,
+        }
+
+        public enum LoopBehavior
+        {
+            Relative = 0,
+            Cycle = 1,
+            Constant = 2
+        }
+    }
+}

+ 14 - 14
Exporters/3ds Max/BabylonExport.Entities/BabylonAnimationKey.cs

@@ -1,14 +1,14 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonAnimationKey
-    {
-        [DataMember]
-        public int frame { get; set; }
-
-        [DataMember]
-        public float[] values { get; set; }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonAnimationKey
+    {
+        [DataMember]
+        public int frame { get; set; }
+
+        [DataMember]
+        public float[] values { get; set; }
+    }
+}

+ 28 - 28
Exporters/3ds Max/BabylonExport.Entities/BabylonBone.cs

@@ -1,28 +1,28 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonBone
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public int index { get; set; }
-
-        [DataMember]
-        public int parentBoneIndex { get; set; }
-
-        [DataMember]
-        public float[] matrix { get; set; }
-
-        [DataMember]
-        public BabylonAnimation animation { get; set; }
-
-        public BabylonBone()
-        {
-            parentBoneIndex = -1;
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonBone
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public int index { get; set; }
+
+        [DataMember]
+        public int parentBoneIndex { get; set; }
+
+        [DataMember]
+        public float[] matrix { get; set; }
+
+        [DataMember]
+        public BabylonAnimation animation { get; set; }
+
+        public BabylonBone()
+        {
+            parentBoneIndex = -1;
+        }
+    }
+}

+ 84 - 84
Exporters/3ds Max/BabylonExport.Entities/BabylonCamera.cs

@@ -1,84 +1,84 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonCamera : BabylonIAnimatable
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public string id { get; set; }
-
-        [DataMember]
-        public string parentId { get; set; }
-
-        [DataMember]
-        public string lockedTargetId { get; set; }
-
-        [DataMember]
-        public string type { get; set; }
-
-        [DataMember]
-        public float[] position { get; set; }
-
-        [DataMember]
-        public float[] rotation { get; set; }
-
-        [DataMember]
-        public float[] target { get; set; }
-
-        [DataMember]
-        public float fov { get; set; }
-
-        [DataMember]
-        public float minZ { get; set; }
-
-        [DataMember]
-        public float maxZ { get; set; }
-
-        [DataMember]
-        public float speed { get; set; }
-
-        [DataMember]
-        public float inertia { get; set; }
-
-        [DataMember]
-        public bool checkCollisions { get; set; }
-
-        [DataMember]
-        public bool applyGravity { get; set; }
-
-        [DataMember]
-        public float[] ellipsoid { get; set; }
-
-        [DataMember]
-        public bool autoAnimate { get; set; }
-
-        [DataMember]
-        public int autoAnimateFrom { get; set; }
-
-        [DataMember]
-        public int autoAnimateTo { get; set; }
-
-        [DataMember]
-        public bool autoAnimateLoop { get; set; }
-
-        [DataMember]
-        public BabylonAnimation[] animations { get; set; }
-
-        public BabylonCamera()
-        {
-            position = new[] { 0f, 0f, 0f };
-            rotation = new[] { 0f, 0f, 0f };
-
-            // Default values
-            fov = 0.8f;
-            minZ = 0.1f;
-            maxZ = 5000.0f;
-            speed = 1.0f;
-            inertia = 0.9f;
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonCamera : BabylonIAnimatable
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public string id { get; set; }
+
+        [DataMember]
+        public string parentId { get; set; }
+
+        [DataMember]
+        public string lockedTargetId { get; set; }
+
+        [DataMember]
+        public string type { get; set; }
+
+        [DataMember]
+        public float[] position { get; set; }
+
+        [DataMember]
+        public float[] rotation { get; set; }
+
+        [DataMember]
+        public float[] target { get; set; }
+
+        [DataMember]
+        public float fov { get; set; }
+
+        [DataMember]
+        public float minZ { get; set; }
+
+        [DataMember]
+        public float maxZ { get; set; }
+
+        [DataMember]
+        public float speed { get; set; }
+
+        [DataMember]
+        public float inertia { get; set; }
+
+        [DataMember]
+        public bool checkCollisions { get; set; }
+
+        [DataMember]
+        public bool applyGravity { get; set; }
+
+        [DataMember]
+        public float[] ellipsoid { get; set; }
+
+        [DataMember]
+        public bool autoAnimate { get; set; }
+
+        [DataMember]
+        public int autoAnimateFrom { get; set; }
+
+        [DataMember]
+        public int autoAnimateTo { get; set; }
+
+        [DataMember]
+        public bool autoAnimateLoop { get; set; }
+
+        [DataMember]
+        public BabylonAnimation[] animations { get; set; }
+
+        public BabylonCamera()
+        {
+            position = new[] { 0f, 0f, 0f };
+            rotation = new[] { 0f, 0f, 0f };
+
+            // Default values
+            fov = 0.8f;
+            minZ = 0.1f;
+            maxZ = 5000.0f;
+            speed = 1.0f;
+            inertia = 0.9f;
+        }
+    }
+}

+ 27 - 27
Exporters/3ds Max/BabylonExport.Entities/BabylonFresnelParameters.cs

@@ -1,27 +1,27 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonFresnelParameters
-    {
-        [DataMember]
-        public float[] leftColor { get; set; }
-
-        [DataMember]
-        public float[] rightColor { get; set; }
-
-        [DataMember]
-        public bool isEnabled { get; set; }
-
-        [DataMember]
-        public float bias { get; set; }
-
-        [DataMember]
-        public float power { get; set; }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonFresnelParameters
+    {
+        [DataMember]
+        public float[] leftColor { get; set; }
+
+        [DataMember]
+        public float[] rightColor { get; set; }
+
+        [DataMember]
+        public bool isEnabled { get; set; }
+
+        [DataMember]
+        public float bias { get; set; }
+
+        [DataMember]
+        public float power { get; set; }
+    }
+}

+ 19 - 19
Exporters/3ds Max/BabylonExport.Entities/BabylonIAnimatable.cs

@@ -1,19 +1,19 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace BabylonExport.Entities
-{
-    public interface BabylonIAnimatable
-    {
-        BabylonAnimation[] animations { get; set; }
-        bool autoAnimate { get; set; }
-
-        int autoAnimateFrom { get; set; }
-
-        int autoAnimateTo { get; set; }
-
-        bool autoAnimateLoop { get; set; }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BabylonExport.Entities
+{
+    public interface BabylonIAnimatable
+    {
+        BabylonAnimation[] animations { get; set; }
+        bool autoAnimate { get; set; }
+
+        int autoAnimateFrom { get; set; }
+
+        int autoAnimateTo { get; set; }
+
+        bool autoAnimateLoop { get; set; }
+    }
+}

+ 20 - 20
Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlare.cs

@@ -1,20 +1,20 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonLensFlare
-    {
-        [DataMember]
-        public float position { get; set; }
-
-        [DataMember]
-        public float size { get; set; }
-
-        [DataMember]
-        public float[] color { get; set; }
-
-        [DataMember]
-        public string textureName { get; set; }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonLensFlare
+    {
+        [DataMember]
+        public float position { get; set; }
+
+        [DataMember]
+        public float size { get; set; }
+
+        [DataMember]
+        public float[] color { get; set; }
+
+        [DataMember]
+        public string textureName { get; set; }
+    }
+}

+ 17 - 17
Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlareSystem.cs

@@ -1,17 +1,17 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonLensFlareSystem
-    {
-        [DataMember]
-        public string emitterId { get; set; }
-
-        [DataMember]
-        public int borderLimit { get; set; }
-
-        [DataMember]
-        public BabylonLensFlare[] flares { get; set; }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonLensFlareSystem
+    {
+        [DataMember]
+        public string emitterId { get; set; }
+
+        [DataMember]
+        public int borderLimit { get; set; }
+
+        [DataMember]
+        public BabylonLensFlare[] flares { get; set; }
+    }
+}

+ 76 - 76
Exporters/3ds Max/BabylonExport.Entities/BabylonLight.cs

@@ -1,76 +1,76 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonLight : BabylonIAnimatable
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public string id { get; set; }
-
-        [DataMember]
-        public string parentId { get; set; }
-
-        [DataMember]
-        public float[] position { get; set; }
-
-        [DataMember]
-        public float[] direction { get; set; }
-
-        [DataMember]
-        public int type { get; set; }
-
-        [DataMember]
-        public float[] diffuse { get; set; }
-
-        [DataMember]
-        public float[] specular { get; set; }
-
-        [DataMember]
-        public float intensity { get; set; }
-
-        [DataMember]
-        public float range { get; set; }
-
-        [DataMember]
-        public float exponent { get; set; }
-
-        [DataMember]
-        public float angle { get; set; }
-
-        [DataMember]
-        public float[] groundColor { get; set; }
-
-        [DataMember]
-        public string[] excludedMeshesIds { get; set; }
-
-        [DataMember]
-        public string[] includedOnlyMeshesIds { get; set; }
-
-        [DataMember]
-        public bool autoAnimate { get; set; }
-
-        [DataMember]
-        public int autoAnimateFrom { get; set; }
-
-        [DataMember]
-        public int autoAnimateTo { get; set; }
-
-        [DataMember]
-        public bool autoAnimateLoop { get; set; }
-
-        [DataMember]
-        public BabylonAnimation[] animations { get; set; }
-
-        public BabylonLight()
-        {
-            diffuse = new[] {1.0f, 1.0f, 1.0f};
-            specular = new[] { 1.0f, 1.0f, 1.0f };
-            intensity = 1.0f;
-            range = float.MaxValue;
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonLight : BabylonIAnimatable
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public string id { get; set; }
+
+        [DataMember]
+        public string parentId { get; set; }
+
+        [DataMember]
+        public float[] position { get; set; }
+
+        [DataMember]
+        public float[] direction { get; set; }
+
+        [DataMember]
+        public int type { get; set; }
+
+        [DataMember]
+        public float[] diffuse { get; set; }
+
+        [DataMember]
+        public float[] specular { get; set; }
+
+        [DataMember]
+        public float intensity { get; set; }
+
+        [DataMember]
+        public float range { get; set; }
+
+        [DataMember]
+        public float exponent { get; set; }
+
+        [DataMember]
+        public float angle { get; set; }
+
+        [DataMember]
+        public float[] groundColor { get; set; }
+
+        [DataMember]
+        public string[] excludedMeshesIds { get; set; }
+
+        [DataMember]
+        public string[] includedOnlyMeshesIds { get; set; }
+
+        [DataMember]
+        public bool autoAnimate { get; set; }
+
+        [DataMember]
+        public int autoAnimateFrom { get; set; }
+
+        [DataMember]
+        public int autoAnimateTo { get; set; }
+
+        [DataMember]
+        public bool autoAnimateLoop { get; set; }
+
+        [DataMember]
+        public BabylonAnimation[] animations { get; set; }
+
+        public BabylonLight()
+        {
+            diffuse = new[] {1.0f, 1.0f, 1.0f};
+            specular = new[] { 1.0f, 1.0f, 1.0f };
+            intensity = 1.0f;
+            range = float.MaxValue;
+        }
+    }
+}

+ 85 - 80
Exporters/3ds Max/BabylonExport.Entities/BabylonMaterial.cs

@@ -1,80 +1,85 @@
-using System.Runtime.Serialization;
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonMaterial
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public string id { get; set; }
-
-        [DataMember]
-        public bool backFaceCulling { get; set; }
-
-        [DataMember]
-        public bool wireframe { get; set; }
-
-        [DataMember]
-        public float[] ambient { get; set; }
-
-        [DataMember]
-        public float[] diffuse { get; set; }
-
-        [DataMember]
-        public float[] specular { get; set; }
-
-        [DataMember]
-        public float[] emissive { get; set; }
-
-        [DataMember]
-        public float specularPower { get; set; }
-
-        [DataMember]
-        public float alpha { get; set; }
-
-        [DataMember]
-        public BabylonTexture diffuseTexture { get; set; }
-
-        [DataMember]
-        public BabylonFresnelParameters diffuseFresnelParameters { get; set; }
-
-        [DataMember]
-        public BabylonTexture ambientTexture { get; set; }
-
-        [DataMember]
-        public BabylonTexture opacityTexture { get; set; }
-
-        [DataMember]
-        public BabylonFresnelParameters opacityFresnelParameters { get; set; }
-
-        [DataMember]
-        public BabylonTexture reflectionTexture { get; set; }
-
-        [DataMember]
-        public BabylonFresnelParameters reflectionFresnelParameters { get; set; }
-
-        [DataMember]
-        public BabylonTexture emissiveTexture { get; set; }
-        [DataMember]
-        public BabylonFresnelParameters emissiveFresnelParameters { get; set; }
-
-        [DataMember]
-        public BabylonTexture specularTexture { get; set; }
-
-        [DataMember]
-        public BabylonTexture bumpTexture { get; set; }
-
-        public BabylonMaterial()
-        {
-            backFaceCulling = true;
-            ambient = new[] {1.0f, 1.0f, 1.0f};
-            diffuse = new[] { 1.0f, 1.0f, 1.0f };
-            specular = new[] { 1.0f, 1.0f, 1.0f };
-            emissive = new[] { 0f, 0f, 0f };
-            specularPower = 64;
-            alpha = 1.0f;
-        }
-    }
-}
+using System.Runtime.Serialization;
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonMaterial
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public string id { get; set; }
+
+        [DataMember]
+        public bool backFaceCulling { get; set; }
+
+        [DataMember]
+        public bool wireframe { get; set; }
+
+        [DataMember]
+        public float[] ambient { get; set; }
+
+        [DataMember]
+        public float[] diffuse { get; set; }
+
+        [DataMember]
+        public float[] specular { get; set; }
+
+        [DataMember]
+        public float[] emissive { get; set; }
+
+        [DataMember]
+        public float specularPower { get; set; }
+
+        [DataMember]
+        public float alpha { get; set; }
+
+        [DataMember]
+        public BabylonTexture diffuseTexture { get; set; }
+
+        [DataMember]
+        public BabylonFresnelParameters diffuseFresnelParameters { get; set; }
+
+        [DataMember]
+        public BabylonTexture ambientTexture { get; set; }
+
+        [DataMember]
+        public BabylonTexture opacityTexture { get; set; }
+
+        [DataMember]
+        public BabylonFresnelParameters opacityFresnelParameters { get; set; }
+
+        [DataMember]
+        public BabylonTexture reflectionTexture { get; set; }
+
+        [DataMember]
+        public BabylonFresnelParameters reflectionFresnelParameters { get; set; }
+
+        [DataMember]
+        public BabylonTexture emissiveTexture { get; set; }
+        [DataMember]
+        public BabylonTexture lightmapTexture { get; set; }
+        [DataMember]
+        public bool useLightmapAsShadowmap { get; set; }
+
+        [DataMember]
+        public BabylonFresnelParameters emissiveFresnelParameters { get; set; }
+
+        [DataMember]
+        public BabylonTexture specularTexture { get; set; }
+
+        [DataMember]
+        public BabylonTexture bumpTexture { get; set; }
+
+        public BabylonMaterial()
+        {
+            backFaceCulling = true;
+            ambient = new[] {1.0f, 1.0f, 1.0f};
+            diffuse = new[] { 1.0f, 1.0f, 1.0f };
+            specular = new[] { 1.0f, 1.0f, 1.0f };
+            emissive = new[] { 0f, 0f, 0f };
+            specularPower = 64;
+            alpha = 1.0f;
+        }
+    }
+}

+ 122 - 122
Exporters/3ds Max/BabylonExport.Entities/BabylonMesh.cs

@@ -1,122 +1,122 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonMesh : BabylonAbstractMesh
-    {
-        [DataMember]
-        public string id { get; set; }
-
-        [DataMember]
-        public string parentId { get; set; }
-
-        [DataMember]
-        public string materialId { get; set; }
-
-        [DataMember]
-        public bool isEnabled { get; set; }
-
-        [DataMember]
-        public bool isVisible { get; set; }
-
-        [DataMember]
-        public bool pickable { get; set; }
-
-        [DataMember]
-        public float[] pivotMatrix { get; set; }
-
-        [DataMember]
-        public float[] positions { get; set; }
-
-        [DataMember]
-        public float[] normals { get; set; }
-
-        [DataMember]
-        public float[] uvs { get; set; }
-
-        [DataMember]
-        public float[] uvs2 { get; set; }
-
-        [DataMember]
-        public float[] colors { get; set; }
-
-        [DataMember]
-        public bool hasVertexAlpha { get; set; }
-
-        [DataMember]
-        public int[] matricesIndices { get; set; }
-
-        [DataMember]
-        public float[] matricesWeights { get; set; }
-
-        [DataMember]
-        public int[] indices { get; set; }
-
-        [DataMember]
-        public bool checkCollisions { get; set; }
-
-        [DataMember]
-        public bool receiveShadows { get; set; }    
-    
-        [DataMember]
-        public bool infiniteDistance { get; set; }
-        
-        [DataMember]
-        public int billboardMode { get; set; }
-
-        [DataMember]
-        public float visibility { get; set; }
-
-        [DataMember]
-        public BabylonSubMesh[] subMeshes { get; set; }
-
-        [DataMember]
-        public BabylonAbstractMesh[] instances { get; set; }
-
-        [DataMember]
-        public int skeletonId { get; set; }
-
-        [DataMember]
-        public bool showBoundingBox { get; set; }
-
-        [DataMember]
-        public bool showSubMeshesBoundingBox { get; set; }
-
-        [DataMember]
-        public bool applyFog { get; set; }
-
-        [DataMember]
-        public int alphaIndex { get; set; }
-
-        [DataMember]
-        public int physicsImpostor { get; set; }
-
-        [DataMember]
-        public float physicsMass { get; set; }
-
-        [DataMember]
-        public float physicsFriction { get; set; }
-
-        [DataMember]
-        public float physicsRestitution { get; set; }
-
-        public BabylonMesh()
-        {
-            isEnabled = true;
-            isVisible = true;
-
-            position = new[] { 0f, 0f, 0f };
-            rotation = new[] { 0f, 0f, 0f };
-            scaling = new[] { 1f, 1f, 1f };
-
-            billboardMode = 0;
-
-            visibility = 1.0f;
-
-            skeletonId = -1;
-
-            pickable = true;
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonMesh : BabylonAbstractMesh
+    {
+        [DataMember]
+        public string id { get; set; }
+
+        [DataMember]
+        public string parentId { get; set; }
+
+        [DataMember]
+        public string materialId { get; set; }
+
+        [DataMember]
+        public bool isEnabled { get; set; }
+
+        [DataMember]
+        public bool isVisible { get; set; }
+
+        [DataMember]
+        public bool pickable { get; set; }
+
+        [DataMember]
+        public float[] pivotMatrix { get; set; }
+
+        [DataMember]
+        public float[] positions { get; set; }
+
+        [DataMember]
+        public float[] normals { get; set; }
+
+        [DataMember]
+        public float[] uvs { get; set; }
+
+        [DataMember]
+        public float[] uvs2 { get; set; }
+
+        [DataMember]
+        public float[] colors { get; set; }
+
+        [DataMember]
+        public bool hasVertexAlpha { get; set; }
+
+        [DataMember]
+        public int[] matricesIndices { get; set; }
+
+        [DataMember]
+        public float[] matricesWeights { get; set; }
+
+        [DataMember]
+        public int[] indices { get; set; }
+
+        [DataMember]
+        public bool checkCollisions { get; set; }
+
+        [DataMember]
+        public bool receiveShadows { get; set; }    
+    
+        [DataMember]
+        public bool infiniteDistance { get; set; }
+        
+        [DataMember]
+        public int billboardMode { get; set; }
+
+        [DataMember]
+        public float visibility { get; set; }
+
+        [DataMember]
+        public BabylonSubMesh[] subMeshes { get; set; }
+
+        [DataMember]
+        public BabylonAbstractMesh[] instances { get; set; }
+
+        [DataMember]
+        public int skeletonId { get; set; }
+
+        [DataMember]
+        public bool showBoundingBox { get; set; }
+
+        [DataMember]
+        public bool showSubMeshesBoundingBox { get; set; }
+
+        [DataMember]
+        public bool applyFog { get; set; }
+
+        [DataMember]
+        public int alphaIndex { get; set; }
+
+        [DataMember]
+        public int physicsImpostor { get; set; }
+
+        [DataMember]
+        public float physicsMass { get; set; }
+
+        [DataMember]
+        public float physicsFriction { get; set; }
+
+        [DataMember]
+        public float physicsRestitution { get; set; }
+
+        public BabylonMesh()
+        {
+            isEnabled = true;
+            isVisible = true;
+
+            position = new[] { 0f, 0f, 0f };
+            rotation = new[] { 0f, 0f, 0f };
+            scaling = new[] { 1f, 1f, 1f };
+
+            billboardMode = 0;
+
+            visibility = 1.0f;
+
+            skeletonId = -1;
+
+            pickable = true;
+        }
+    }
+}

+ 17 - 17
Exporters/3ds Max/BabylonExport.Entities/BabylonMultiMaterial.cs

@@ -1,17 +1,17 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonMultiMaterial
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public string id { get; set; }
-
-        [DataMember]
-        public string[] materials { get; set; }        
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonMultiMaterial
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public string id { get; set; }
+
+        [DataMember]
+        public string[] materials { get; set; }        
+    }
+}

+ 86 - 86
Exporters/3ds Max/BabylonExport.Entities/BabylonParticleSystem.cs

@@ -1,86 +1,86 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonParticleSystem
-    {
-        [DataMember]
-        public string emitterId { get; set; }
-
-        [DataMember]
-        public float[] gravity { get; set; }
-
-        [DataMember]
-        public float[] direction1 { get; set; }
-
-        [DataMember]
-        public float[] direction2 { get; set; }
-
-        [DataMember]
-        public float[] minEmitBox { get; set; }
-
-        [DataMember]
-        public float[] maxEmitBox { get; set; }
-
-        [DataMember]
-        public float[] color1 { get; set; }
-
-        [DataMember]
-        public float[] color2 { get; set; }
-
-        [DataMember]
-        public float[] colorDead { get; set; }
-
-        [DataMember]
-        public float deadAlpha { get; set; }
-
-        [DataMember]
-        public float emitRate { get; set; }
-
-        [DataMember]
-        public float updateSpeed { get; set; }
-
-        [DataMember]
-        public int targetStopFrame { get; set; }
-
-        [DataMember]
-        public float minEmitPower { get; set; }
-
-        [DataMember]
-        public float maxEmitPower { get; set; }
-
-        [DataMember]
-        public float minLifeTime { get; set; }
-
-        [DataMember]
-        public float maxLifeTime { get; set; }
-
-        [DataMember]
-        public float minSize { get; set; }
-
-        [DataMember]
-        public float maxSize { get; set; }
-
-        [DataMember]
-        public float minAngularSpeed { get; set; }
-
-        [DataMember]
-        public float maxAngularSpeed { get; set; }
-
-        [DataMember]
-        public string textureName { get; set; }
-
-        [DataMember]
-        public int blendMode { get; set; }
-
-        [DataMember]
-        public int capacity { get; set; }
-
-        [DataMember]
-        public float[] textureMask { get; set; }
-
-        [DataMember]
-        public bool linkToEmitter { get; set; }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonParticleSystem
+    {
+        [DataMember]
+        public string emitterId { get; set; }
+
+        [DataMember]
+        public float[] gravity { get; set; }
+
+        [DataMember]
+        public float[] direction1 { get; set; }
+
+        [DataMember]
+        public float[] direction2 { get; set; }
+
+        [DataMember]
+        public float[] minEmitBox { get; set; }
+
+        [DataMember]
+        public float[] maxEmitBox { get; set; }
+
+        [DataMember]
+        public float[] color1 { get; set; }
+
+        [DataMember]
+        public float[] color2 { get; set; }
+
+        [DataMember]
+        public float[] colorDead { get; set; }
+
+        [DataMember]
+        public float deadAlpha { get; set; }
+
+        [DataMember]
+        public float emitRate { get; set; }
+
+        [DataMember]
+        public float updateSpeed { get; set; }
+
+        [DataMember]
+        public int targetStopFrame { get; set; }
+
+        [DataMember]
+        public float minEmitPower { get; set; }
+
+        [DataMember]
+        public float maxEmitPower { get; set; }
+
+        [DataMember]
+        public float minLifeTime { get; set; }
+
+        [DataMember]
+        public float maxLifeTime { get; set; }
+
+        [DataMember]
+        public float minSize { get; set; }
+
+        [DataMember]
+        public float maxSize { get; set; }
+
+        [DataMember]
+        public float minAngularSpeed { get; set; }
+
+        [DataMember]
+        public float maxAngularSpeed { get; set; }
+
+        [DataMember]
+        public string textureName { get; set; }
+
+        [DataMember]
+        public int blendMode { get; set; }
+
+        [DataMember]
+        public int capacity { get; set; }
+
+        [DataMember]
+        public float[] textureMask { get; set; }
+
+        [DataMember]
+        public bool linkToEmitter { get; set; }
+    }
+}

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

@@ -1,185 +1,185 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonScene
-    {
-        [DataMember]
-        public bool autoClear { get; set; }
-
-        [DataMember]
-        public float[] clearColor { get; set; }
-
-        [DataMember]
-        public float[] ambientColor { get; set; }
-
-        [DataMember]
-        public int fogMode { get; set; }
-
-        [DataMember]
-        public float[] fogColor { get; set; }
-
-        [DataMember]
-        public float fogStart { get; set; }
-
-        [DataMember]
-        public float fogEnd { get; set; }
-
-        [DataMember]
-        public float fogDensity { get; set; }
-
-        [DataMember]
-        public float[] gravity { get; set; }
-
-        [DataMember]
-        public BabylonCamera[] cameras { get; set; }
-
-        [DataMember]
-        public string activeCameraID { get; set; }
-
-        [DataMember]
-        public BabylonLight[] lights { get; set; }
-
-        [DataMember]
-        public BabylonMesh[] meshes { get; set; }
-
-        [DataMember]
-        public BabylonSound[] sounds { get; set; }
-
-        [DataMember]
-        public BabylonMaterial[] materials { get; set; }
-
-        [DataMember]
-        public BabylonMultiMaterial[] multiMaterials { get; set; }
-
-        [DataMember]
-        public BabylonParticleSystem[] particleSystems { get; set; }
-
-        [DataMember]
-        public BabylonLensFlareSystem[] lensFlareSystems { get; set; }
-
-        [DataMember]
-        public BabylonShadowGenerator[] shadowGenerators { get; set; }
-
-        [DataMember]
-        public BabylonSkeleton[] skeletons { get; set; }
-
-        [DataMember]
-        public BabylonActions actions { get; set; }
-
-        public BabylonVector3 MaxVector { get; set; }
-        public BabylonVector3 MinVector { get; set; }
-
-        public string OutputPath { get; private set; }
-
-        public List<BabylonMesh> MeshesList { get; private set; }
-        public List<BabylonSound> SoundsList { get; private set; }
-        public List<BabylonCamera> CamerasList { get; private set; }
-        public List<BabylonLight> LightsList { get; private set; }
-        public List<BabylonMaterial> MaterialsList { get; private set; }
-        public List<BabylonMultiMaterial> MultiMaterialsList { get; private set; }
-        public List<BabylonShadowGenerator> ShadowGeneratorsList { get; private set; }
-        public List<BabylonSkeleton> SkeletonsList { get; private set; }
-
-        readonly List<string> exportedTextures = new List<string>();
-
-        public BabylonScene(string outputPath)
-        {
-            OutputPath = outputPath;
-
-            MeshesList = new List<BabylonMesh>();
-            MaterialsList = new List<BabylonMaterial>();
-            CamerasList = new List<BabylonCamera>();
-            LightsList = new List<BabylonLight>();
-            MultiMaterialsList = new List<BabylonMultiMaterial>();
-            ShadowGeneratorsList = new List<BabylonShadowGenerator>();
-            SkeletonsList = new List<BabylonSkeleton>();
-            SoundsList = new List<BabylonSound>();
-
-            // Default values
-            autoClear = true;
-            clearColor = new[] { 0.2f, 0.2f, 0.3f };
-            ambientColor = new[] { 0f, 0f, 0f };
-            gravity = new[] { 0f, 0f, -0.9f };
-
-            MaxVector = new BabylonVector3 { X = float.MinValue, Y = float.MinValue, Z = float.MinValue };
-            MinVector = new BabylonVector3 { X = float.MaxValue, Y = float.MaxValue, Z = float.MaxValue };
-        }
-
-        public void Prepare(bool generateDefaultLight = true)
-        {
-            meshes = MeshesList.ToArray();
-            sounds = SoundsList.ToArray();
-
-            materials = MaterialsList.ToArray();
-            multiMaterials = MultiMaterialsList.ToArray();
-            shadowGenerators = ShadowGeneratorsList.ToArray();
-            skeletons = SkeletonsList.ToArray();
-
-            if (CamerasList.Count == 0)
-            {
-                var camera = new BabylonCamera { name = "Default camera", id = Guid.NewGuid().ToString() };
-
-                var distanceVector = MaxVector - MinVector;
-                var midPoint = MinVector + distanceVector / 2;
-                camera.target = midPoint.ToArray();
-                camera.position = (midPoint + distanceVector).ToArray();
-
-                var distance = distanceVector.Length();
-                camera.speed = distance / 50.0f;
-                camera.maxZ = distance * 4f;
-
-                camera.minZ = distance < 100.0f ? 0.1f : 1.0f;
-
-                CamerasList.Add(camera);
-            }
-
-            if (LightsList.Count == 0 && generateDefaultLight)
-            {
-                var light = new BabylonLight
-                {
-                    name = "Default light",
-                    id = Guid.NewGuid().ToString(),
-                    type = 3,
-                    groundColor = new float[] {0, 0, 0},
-                    direction = new[] {0, 1.0f, 0},
-                    intensity = 1
-                };
-
-                LightsList.Add(light);
-            }
-
-            cameras = CamerasList.ToArray();
-            lights = LightsList.ToArray();
-
-            if (activeCameraID == null)
-            {
-                activeCameraID = CamerasList[0].id;
-            }
-        }
-
-        public void AddTexture(string texture)
-        {
-            if (exportedTextures.Contains(texture))
-                return;
-
-            exportedTextures.Add(texture);
-
-            File.Copy(texture, Path.Combine(OutputPath, Path.GetFileName(texture)), true);
-        }
-
-        public bool AddTextureCube(string textureName)
-        {
-            if (exportedTextures.Contains(textureName))
-                return false;
-
-            exportedTextures.Add(textureName);
-
-            return true;
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonScene
+    {
+        [DataMember]
+        public bool autoClear { get; set; }
+
+        [DataMember]
+        public float[] clearColor { get; set; }
+
+        [DataMember]
+        public float[] ambientColor { get; set; }
+
+        [DataMember]
+        public int fogMode { get; set; }
+
+        [DataMember]
+        public float[] fogColor { get; set; }
+
+        [DataMember]
+        public float fogStart { get; set; }
+
+        [DataMember]
+        public float fogEnd { get; set; }
+
+        [DataMember]
+        public float fogDensity { get; set; }
+
+        [DataMember]
+        public float[] gravity { get; set; }
+
+        [DataMember]
+        public BabylonCamera[] cameras { get; set; }
+
+        [DataMember]
+        public string activeCameraID { get; set; }
+
+        [DataMember]
+        public BabylonLight[] lights { get; set; }
+
+        [DataMember]
+        public BabylonMesh[] meshes { get; set; }
+
+        [DataMember]
+        public BabylonSound[] sounds { get; set; }
+
+        [DataMember]
+        public BabylonMaterial[] materials { get; set; }
+
+        [DataMember]
+        public BabylonMultiMaterial[] multiMaterials { get; set; }
+
+        [DataMember]
+        public BabylonParticleSystem[] particleSystems { get; set; }
+
+        [DataMember]
+        public BabylonLensFlareSystem[] lensFlareSystems { get; set; }
+
+        [DataMember]
+        public BabylonShadowGenerator[] shadowGenerators { get; set; }
+
+        [DataMember]
+        public BabylonSkeleton[] skeletons { get; set; }
+
+        [DataMember]
+        public BabylonActions actions { get; set; }
+
+        public BabylonVector3 MaxVector { get; set; }
+        public BabylonVector3 MinVector { get; set; }
+
+        public string OutputPath { get; private set; }
+
+        public List<BabylonMesh> MeshesList { get; private set; }
+        public List<BabylonSound> SoundsList { get; private set; }
+        public List<BabylonCamera> CamerasList { get; private set; }
+        public List<BabylonLight> LightsList { get; private set; }
+        public List<BabylonMaterial> MaterialsList { get; private set; }
+        public List<BabylonMultiMaterial> MultiMaterialsList { get; private set; }
+        public List<BabylonShadowGenerator> ShadowGeneratorsList { get; private set; }
+        public List<BabylonSkeleton> SkeletonsList { get; private set; }
+
+        readonly List<string> exportedTextures = new List<string>();
+
+        public BabylonScene(string outputPath)
+        {
+            OutputPath = outputPath;
+
+            MeshesList = new List<BabylonMesh>();
+            MaterialsList = new List<BabylonMaterial>();
+            CamerasList = new List<BabylonCamera>();
+            LightsList = new List<BabylonLight>();
+            MultiMaterialsList = new List<BabylonMultiMaterial>();
+            ShadowGeneratorsList = new List<BabylonShadowGenerator>();
+            SkeletonsList = new List<BabylonSkeleton>();
+            SoundsList = new List<BabylonSound>();
+
+            // Default values
+            autoClear = true;
+            clearColor = new[] { 0.2f, 0.2f, 0.3f };
+            ambientColor = new[] { 0f, 0f, 0f };
+            gravity = new[] { 0f, 0f, -0.9f };
+
+            MaxVector = new BabylonVector3 { X = float.MinValue, Y = float.MinValue, Z = float.MinValue };
+            MinVector = new BabylonVector3 { X = float.MaxValue, Y = float.MaxValue, Z = float.MaxValue };
+        }
+
+        public void Prepare(bool generateDefaultLight = true)
+        {
+            meshes = MeshesList.ToArray();
+            sounds = SoundsList.ToArray();
+
+            materials = MaterialsList.ToArray();
+            multiMaterials = MultiMaterialsList.ToArray();
+            shadowGenerators = ShadowGeneratorsList.ToArray();
+            skeletons = SkeletonsList.ToArray();
+
+            if (CamerasList.Count == 0)
+            {
+                var camera = new BabylonCamera { name = "Default camera", id = Guid.NewGuid().ToString() };
+
+                var distanceVector = MaxVector - MinVector;
+                var midPoint = MinVector + distanceVector / 2;
+                camera.target = midPoint.ToArray();
+                camera.position = (midPoint + distanceVector).ToArray();
+
+                var distance = distanceVector.Length();
+                camera.speed = distance / 50.0f;
+                camera.maxZ = distance * 4f;
+
+                camera.minZ = distance < 100.0f ? 0.1f : 1.0f;
+
+                CamerasList.Add(camera);
+            }
+
+            if (LightsList.Count == 0 && generateDefaultLight)
+            {
+                var light = new BabylonLight
+                {
+                    name = "Default light",
+                    id = Guid.NewGuid().ToString(),
+                    type = 3,
+                    groundColor = new float[] {0, 0, 0},
+                    direction = new[] {0, 1.0f, 0},
+                    intensity = 1
+                };
+
+                LightsList.Add(light);
+            }
+
+            cameras = CamerasList.ToArray();
+            lights = LightsList.ToArray();
+
+            if (activeCameraID == null)
+            {
+                activeCameraID = CamerasList[0].id;
+            }
+        }
+
+        public void AddTexture(string texture)
+        {
+            if (exportedTextures.Contains(texture))
+                return;
+
+            exportedTextures.Add(texture);
+
+            File.Copy(texture, Path.Combine(OutputPath, Path.GetFileName(texture)), true);
+        }
+
+        public bool AddTextureCube(string textureName)
+        {
+            if (exportedTextures.Contains(textureName))
+                return false;
+
+            exportedTextures.Add(textureName);
+
+            return true;
+        }
+    }
+}

+ 39 - 36
Exporters/3ds Max/BabylonExport.Entities/BabylonShadowGenerator.cs

@@ -1,36 +1,39 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonShadowGenerator
-    {
-        [DataMember]
-        public int mapSize { get; set; }
-
-        [DataMember]
-        public float bias { get; set; }
-
-        [DataMember]
-        public string lightId { get; set; }
-
-        [DataMember]
-        public bool useVarianceShadowMap { get; set; }
-
-        [DataMember]
-        public bool usePoissonSampling { get; set; }
-
-        [DataMember]
-        public bool useBlurVarianceShadowMap { get; set; }
-
-        [DataMember]
-        public float blurScale { get; set; }
-
-        [DataMember]
-        public float blurBoxOffset { get; set; }
-
-        [DataMember]
-        public string[] renderList { get; set; }
-
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonShadowGenerator
+    {
+        [DataMember]
+        public int mapSize { get; set; }
+
+        [DataMember]
+        public float bias { get; set; }
+
+        [DataMember]
+        public string lightId { get; set; }
+
+        [DataMember]
+        public bool useVarianceShadowMap { get; set; }
+
+        [DataMember]
+        public bool usePoissonSampling { get; set; }
+
+        [DataMember]
+        public bool useBlurVarianceShadowMap { get; set; }
+
+        [DataMember]
+        public float blurScale { get; set; }
+
+        [DataMember]
+        public float blurBoxOffset { get; set; }
+
+        [DataMember]
+        public string[] renderList { get; set; }
+
+        [DataMember]
+        public bool forceBackFacesOnly { get; set; }
+
+    }
+}

+ 17 - 17
Exporters/3ds Max/BabylonExport.Entities/BabylonSkeleton.cs

@@ -1,17 +1,17 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonSkeleton
-    {
-        [DataMember]
-        public int id { get; set; }
-        
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public BabylonBone[] bones { get; set; }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonSkeleton
+    {
+        [DataMember]
+        public int id { get; set; }
+        
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public BabylonBone[] bones { get; set; }
+    }
+}

+ 86 - 86
Exporters/3ds Max/BabylonExport.Entities/BabylonSound.cs

@@ -1,86 +1,86 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonSound
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public float volume { get; set; }
-
-        [DataMember]
-        public float playbackRate { get; set; }
-
-        [DataMember]
-        public bool autoplay { get; set; }
-
-        [DataMember]
-        public bool loop { get; set; }
-
-        [DataMember]
-        public int soundTrackId { get; set; }
-
-        [DataMember]
-        public bool spatialSound { get; set; }
-
-        [DataMember]
-        public float[] position { get; set; }
-
-        [DataMember]
-        public float refDistance { get; set; }
-
-        [DataMember]
-        public float rolloffFactor { get; set; }
-
-        [DataMember]
-        public float maxDistance { get; set; }
-
-        [DataMember]
-        public string distanceModel { get; set; }
-
-        [DataMember]
-        public string panningModel { get; set; }
-
-        [DataMember]
-        public bool isDirectional { get; set; }
-
-        [DataMember]
-        public float coneInnerAngle { get; set; }
-
-        [DataMember]
-        public float coneOuterAngle { get; set; }
-
-        [DataMember]
-        public float coneOuterGain { get; set; }
-
-        [DataMember]
-        public string connectedMeshId { get; set; }
-
-        [DataMember]
-        public float[] localDirectionToMesh { get; set; }
-
-        public BabylonSound()
-        {
-            volume = 1;
-            playbackRate = 1;
-            autoplay = false;
-            loop = false;
-            soundTrackId = -1;
-            spatialSound = false;
-            position = new[] { 0f, 0f, 0f };
-            refDistance = 1;
-            rolloffFactor = 1;
-            maxDistance = 100;
-            distanceModel = "linear";
-            panningModel = "equalpower";
-            isDirectional = false;
-            coneInnerAngle = 360;
-            coneOuterAngle = 360;
-            coneOuterGain = 0;
-            localDirectionToMesh = new[] { 1f, 0f, 0f };
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonSound
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public float volume { get; set; }
+
+        [DataMember]
+        public float playbackRate { get; set; }
+
+        [DataMember]
+        public bool autoplay { get; set; }
+
+        [DataMember]
+        public bool loop { get; set; }
+
+        [DataMember]
+        public int soundTrackId { get; set; }
+
+        [DataMember]
+        public bool spatialSound { get; set; }
+
+        [DataMember]
+        public float[] position { get; set; }
+
+        [DataMember]
+        public float refDistance { get; set; }
+
+        [DataMember]
+        public float rolloffFactor { get; set; }
+
+        [DataMember]
+        public float maxDistance { get; set; }
+
+        [DataMember]
+        public string distanceModel { get; set; }
+
+        [DataMember]
+        public string panningModel { get; set; }
+
+        [DataMember]
+        public bool isDirectional { get; set; }
+
+        [DataMember]
+        public float coneInnerAngle { get; set; }
+
+        [DataMember]
+        public float coneOuterAngle { get; set; }
+
+        [DataMember]
+        public float coneOuterGain { get; set; }
+
+        [DataMember]
+        public string connectedMeshId { get; set; }
+
+        [DataMember]
+        public float[] localDirectionToMesh { get; set; }
+
+        public BabylonSound()
+        {
+            volume = 1;
+            playbackRate = 1;
+            autoplay = false;
+            loop = false;
+            soundTrackId = -1;
+            spatialSound = false;
+            position = new[] { 0f, 0f, 0f };
+            refDistance = 1;
+            rolloffFactor = 1;
+            maxDistance = 100;
+            distanceModel = "linear";
+            panningModel = "equalpower";
+            isDirectional = false;
+            coneInnerAngle = 360;
+            coneOuterAngle = 360;
+            coneOuterGain = 0;
+            localDirectionToMesh = new[] { 1f, 0f, 0f };
+        }
+    }
+}

+ 24 - 24
Exporters/3ds Max/BabylonExport.Entities/BabylonSubMesh.cs

@@ -1,24 +1,24 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonSubMesh
-    {
-        [DataMember]
-        public int materialIndex { get; set; }
-
-        [DataMember]
-        public int verticesStart { get; set; }
-
-        [DataMember]
-        public int verticesCount { get; set; }
-
-        [DataMember]
-        public int indexStart { get; set; }
-
-        [DataMember]
-        public int indexCount { get; set; }
-
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonSubMesh
+    {
+        [DataMember]
+        public int materialIndex { get; set; }
+
+        [DataMember]
+        public int verticesStart { get; set; }
+
+        [DataMember]
+        public int verticesCount { get; set; }
+
+        [DataMember]
+        public int indexStart { get; set; }
+
+        [DataMember]
+        public int indexCount { get; set; }
+
+    }
+}

+ 87 - 87
Exporters/3ds Max/BabylonExport.Entities/BabylonTexture.cs

@@ -1,87 +1,87 @@
-using System.Runtime.Serialization;
-
-namespace BabylonExport.Entities
-{
-    [DataContract]
-    public class BabylonTexture
-    {
-        [DataMember]
-        public string name { get; set; }
-
-        [DataMember]
-        public float level { get; set; }
-
-        [DataMember]
-        public bool hasAlpha { get; set; }
-
-        [DataMember]
-        public bool getAlphaFromRGB { get; set; }
-
-        [DataMember]
-        public int coordinatesMode { get; set; }
-        
-        [DataMember]
-        public bool isCube { get; set; }
-
-        [DataMember]
-        public float uOffset { get; set; }
-
-        [DataMember]
-        public float vOffset { get; set; }
-
-        [DataMember]
-        public float uScale { get; set; }
-
-        [DataMember]
-        public float vScale { get; set; }
-
-        [DataMember]
-        public float uAng { get; set; }
-
-        [DataMember]
-        public float vAng { get; set; }
-
-        [DataMember]
-        public float wAng { get; set; }
-
-        [DataMember]
-        public int wrapU { get; set; }
-
-        [DataMember]
-        public int wrapV { get; set; }
-
-        [DataMember]
-        public int coordinatesIndex { get; set; }
-
-        [DataMember]
-        public bool isRenderTarget { get; set; }
-
-        [DataMember]
-        public int renderTargetSize { get; set; }
-
-        [DataMember]
-        public float[] mirrorPlane { get; set; }
-
-        [DataMember]
-        public string[] renderList { get; set; }
-
-        [DataMember]
-        public BabylonAnimation[] animations { get; set; }
-        
-        public BabylonTexture()
-        {
-            level = 1.0f;
-            uOffset = 0;
-            vOffset = 0;
-            uScale = 1.0f;
-            vScale = 1.0f;
-            uAng = 0;
-            vAng = 0;
-            wAng = 0;
-            wrapU = 1;
-            wrapV = 1;
-            hasAlpha = false;
-            coordinatesIndex = 0;
-        }
-    }
-}
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonTexture
+    {
+        [DataMember]
+        public string name { get; set; }
+
+        [DataMember]
+        public float level { get; set; }
+
+        [DataMember]
+        public bool hasAlpha { get; set; }
+
+        [DataMember]
+        public bool getAlphaFromRGB { get; set; }
+
+        [DataMember]
+        public int coordinatesMode { get; set; }
+        
+        [DataMember]
+        public bool isCube { get; set; }
+
+        [DataMember]
+        public float uOffset { get; set; }
+
+        [DataMember]
+        public float vOffset { get; set; }
+
+        [DataMember]
+        public float uScale { get; set; }
+
+        [DataMember]
+        public float vScale { get; set; }
+
+        [DataMember]
+        public float uAng { get; set; }
+
+        [DataMember]
+        public float vAng { get; set; }
+
+        [DataMember]
+        public float wAng { get; set; }
+
+        [DataMember]
+        public int wrapU { get; set; }
+
+        [DataMember]
+        public int wrapV { get; set; }
+
+        [DataMember]
+        public int coordinatesIndex { get; set; }
+
+        [DataMember]
+        public bool isRenderTarget { get; set; }
+
+        [DataMember]
+        public int renderTargetSize { get; set; }
+
+        [DataMember]
+        public float[] mirrorPlane { get; set; }
+
+        [DataMember]
+        public string[] renderList { get; set; }
+
+        [DataMember]
+        public BabylonAnimation[] animations { get; set; }
+        
+        public BabylonTexture()
+        {
+            level = 1.0f;
+            uOffset = 0;
+            vOffset = 0;
+            uScale = 1.0f;
+            vScale = 1.0f;
+            uAng = 0;
+            vAng = 0;
+            wAng = 0;
+            wrapU = 1;
+            wrapV = 1;
+            hasAlpha = false;
+            coordinatesIndex = 0;
+        }
+    }
+}

+ 36 - 36
Exporters/3ds Max/BabylonExport.Entities/BabylonVector3.cs

@@ -1,36 +1,36 @@
-using System;
-
-namespace BabylonExport.Entities
-{
-    public class BabylonVector3
-    {
-        public float X { get; set; }
-        public float Y { get; set; }
-        public float Z { get; set; }
-
-        public float[] ToArray()
-        {
-            return new [] {X, Y, Z};
-        }
-
-        public float Length()
-        {
-            return (float)Math.Sqrt(X * X + Y * Y + Z * Z);
-        }
-
-        public static BabylonVector3 operator +(BabylonVector3 a, BabylonVector3 b)
-        {
-            return new BabylonVector3 {X = a.X + b.X, Y = a.Y + b.Y, Z = a.Z + b.Z};
-        }
-
-        public static BabylonVector3 operator -(BabylonVector3 a, BabylonVector3 b)
-        {
-            return new BabylonVector3 { X = a.X - b.X, Y = a.Y - b.Y, Z = a.Z - b.Z };
-        }
-
-        public static BabylonVector3 operator /(BabylonVector3 a, float b)
-        {
-            return new BabylonVector3 { X = a.X / b, Y = a.Y / b, Z = a.Z / b };
-        }
-    }
-}
+using System;
+
+namespace BabylonExport.Entities
+{
+    public class BabylonVector3
+    {
+        public float X { get; set; }
+        public float Y { get; set; }
+        public float Z { get; set; }
+
+        public float[] ToArray()
+        {
+            return new [] {X, Y, Z};
+        }
+
+        public float Length()
+        {
+            return (float)Math.Sqrt(X * X + Y * Y + Z * Z);
+        }
+
+        public static BabylonVector3 operator +(BabylonVector3 a, BabylonVector3 b)
+        {
+            return new BabylonVector3 {X = a.X + b.X, Y = a.Y + b.Y, Z = a.Z + b.Z};
+        }
+
+        public static BabylonVector3 operator -(BabylonVector3 a, BabylonVector3 b)
+        {
+            return new BabylonVector3 { X = a.X - b.X, Y = a.Y - b.Y, Z = a.Z - b.Z };
+        }
+
+        public static BabylonVector3 operator /(BabylonVector3 a, float b)
+        {
+            return new BabylonVector3 { X = a.X / b, Y = a.Y / b, Z = a.Z / b };
+        }
+    }
+}

TEMPAT SAMPAH
Exporters/3ds Max/Max2Babylon-0.24.zip


+ 8 - 8
Exporters/3ds Max/Max2Babylon/BabylonActionCallback.cs

@@ -1,8 +1,8 @@
-using Autodesk.Max.Plugins;
-
-namespace Max2Babylon
-{
-    class BabylonActionCallback : ActionCallback
-    {
-    }
-}
+using Autodesk.Max.Plugins;
+
+namespace Max2Babylon
+{
+    class BabylonActionCallback : ActionCallback
+    {
+    }
+}

+ 71 - 71
Exporters/3ds Max/Max2Babylon/BabylonExportActionItem.cs

@@ -1,71 +1,71 @@
-using System.Windows.Forms;
-using ActionItem = Autodesk.Max.Plugins.ActionItem;
-
-namespace Max2Babylon
-{
-    public class BabylonExportActionItem : ActionItem
-    {
-        private ExporterForm form;
-
-        public override bool ExecuteAction()
-        {
-            if (form == null)
-                form = new ExporterForm(this);
-            form.Show();
-            form.BringToFront();
-            form.WindowState = FormWindowState.Normal;
-
-            return true;
-        }
-
-        public void Close()
-        {
-            if (form == null)
-            {
-                return;
-            }
-            form.Dispose();
-            form = null;
-        }
-
-        public override int Id_
-        {
-            get { return 1; }
-        }
-
-        public override string ButtonText
-        {
-            get { return "Babylon File Exporter"; }
-        }
-
-        public override string MenuText
-        {
-            get { return "&Babylon File Exporter..."; }
-        }
-
-        public override string DescriptionText
-        {
-            get { return "Generate a babylon.js scene file2"; }
-        }
-
-        public override string CategoryText
-        {
-            get { return "Babylon"; }
-        }
-
-        public override bool IsChecked_
-        {
-            get { return false; }
-        }
-
-        public override bool IsItemVisible
-        {
-            get { return true; }
-        }
-
-        public override bool IsEnabled_
-        {
-            get { return true; }
-        }
-    }
-}
+using System.Windows.Forms;
+using ActionItem = Autodesk.Max.Plugins.ActionItem;
+
+namespace Max2Babylon
+{
+    public class BabylonExportActionItem : ActionItem
+    {
+        private ExporterForm form;
+
+        public override bool ExecuteAction()
+        {
+            if (form == null)
+                form = new ExporterForm(this);
+            form.Show();
+            form.BringToFront();
+            form.WindowState = FormWindowState.Normal;
+
+            return true;
+        }
+
+        public void Close()
+        {
+            if (form == null)
+            {
+                return;
+            }
+            form.Dispose();
+            form = null;
+        }
+
+        public override int Id_
+        {
+            get { return 1; }
+        }
+
+        public override string ButtonText
+        {
+            get { return "Babylon File Exporter"; }
+        }
+
+        public override string MenuText
+        {
+            get { return "&Babylon File Exporter..."; }
+        }
+
+        public override string DescriptionText
+        {
+            get { return "Generate a babylon.js scene file2"; }
+        }
+
+        public override string CategoryText
+        {
+            get { return "Babylon"; }
+        }
+
+        public override bool IsChecked_
+        {
+            get { return false; }
+        }
+
+        public override bool IsItemVisible
+        {
+            get { return true; }
+        }
+
+        public override bool IsEnabled_
+        {
+            get { return true; }
+        }
+    }
+}

+ 91 - 91
Exporters/3ds Max/Max2Babylon/BabylonPropertiesActionItem.cs

@@ -1,91 +1,91 @@
-using Autodesk.Max;
-using ActionItem = Autodesk.Max.Plugins.ActionItem;
-
-namespace Max2Babylon
-{
-    public class BabylonPropertiesActionItem : ActionItem
-    {
-        public override bool ExecuteAction()
-        {
-            if (Loader.Core.SelNodeCount == 0)
-            {
-                using (var frm = new ScenePropertiesForm())
-                {
-                    frm.ShowDialog();
-                    return true;
-                }
-            }
-
-            var firstNode = Loader.Core.GetSelNode(0);
-
-            if (firstNode.ObjectRef != null && firstNode.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Camera)
-            {
-                using (var frm = new CameraPropertiesForm())
-                {
-                    frm.ShowDialog();
-                    return true;
-                }
-            }
-
-           
-
-            if (firstNode.ObjectRef != null && firstNode.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Light)
-            {
-                using (var frm = new LightPropertiesForm())
-                {
-                    frm.ShowDialog();
-                    return true;
-                }
-            }
-           
-            // consider non-recognized objects as meshes so they can be animated intermediate nodes
-            using (var frm = new ObjectPropertiesForm())
-            {
-                frm.ShowDialog();
-                return true;
-            }
-            
-
-        }
-
-        public override int Id_
-        {
-            get { return 1; }
-        }
-
-        public override string ButtonText
-        {
-            get { return "Babylon Properties"; }
-        }
-
-        public override string MenuText
-        {
-            get { return "Babylon Properties"; }
-        }
-
-        public override string DescriptionText
-        {
-            get { return "UI for setting Babylon.js specific properties"; }
-        }
-
-        public override string CategoryText
-        {
-            get { return "Babylon"; }
-        }
-
-        public override bool IsChecked_
-        {
-            get { return false; }
-        }
-
-        public override bool IsItemVisible
-        {
-            get { return true; }
-        }
-
-        public override bool IsEnabled_
-        {
-            get { return true; }
-        }
-    }
-}
+using Autodesk.Max;
+using ActionItem = Autodesk.Max.Plugins.ActionItem;
+
+namespace Max2Babylon
+{
+    public class BabylonPropertiesActionItem : ActionItem
+    {
+        public override bool ExecuteAction()
+        {
+            if (Loader.Core.SelNodeCount == 0)
+            {
+                using (var frm = new ScenePropertiesForm())
+                {
+                    frm.ShowDialog();
+                    return true;
+                }
+            }
+
+            var firstNode = Loader.Core.GetSelNode(0);
+
+            if (firstNode.ObjectRef != null && firstNode.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Camera)
+            {
+                using (var frm = new CameraPropertiesForm())
+                {
+                    frm.ShowDialog();
+                    return true;
+                }
+            }
+
+           
+
+            if (firstNode.ObjectRef != null && firstNode.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Light)
+            {
+                using (var frm = new LightPropertiesForm())
+                {
+                    frm.ShowDialog();
+                    return true;
+                }
+            }
+           
+            // consider non-recognized objects as meshes so they can be animated intermediate nodes
+            using (var frm = new ObjectPropertiesForm())
+            {
+                frm.ShowDialog();
+                return true;
+            }
+            
+
+        }
+
+        public override int Id_
+        {
+            get { return 1; }
+        }
+
+        public override string ButtonText
+        {
+            get { return "Babylon Properties"; }
+        }
+
+        public override string MenuText
+        {
+            get { return "Babylon Properties"; }
+        }
+
+        public override string DescriptionText
+        {
+            get { return "UI for setting Babylon.js specific properties"; }
+        }
+
+        public override string CategoryText
+        {
+            get { return "Babylon"; }
+        }
+
+        public override bool IsChecked_
+        {
+            get { return false; }
+        }
+
+        public override bool IsItemVisible
+        {
+            get { return true; }
+        }
+
+        public override bool IsEnabled_
+        {
+            get { return true; }
+        }
+    }
+}

+ 52 - 52
Exporters/3ds Max/Max2Babylon/Descriptor.cs

@@ -1,52 +1,52 @@
-using Autodesk.Max;
-
-namespace Max2Babylon
-{
-    public class Descriptor : Autodesk.Max.Plugins.ClassDesc2
-    {
-        public override object Create(bool loading)
-        {
-            return new GlobalUtility();
-        }
-
-        public override bool IsPublic
-        {
-            get
-            {
-                return true;
-            }
-        }
-
-        public override string ClassName
-        {
-            get
-            {
-                return "Babylon File Exporter";
-            }
-        }
-
-        public override SClass_ID SuperClassID
-        {
-            get
-            {
-                return SClass_ID.Gup;
-            }
-        }
-
-        public override IClass_ID ClassID
-        {
-            get
-            {
-                return Loader.Class_ID;
-            }
-        }
-
-        public override string Category
-        {
-            get
-            {
-                return "Babylon";
-            }
-        }
-    }
-}
+using Autodesk.Max;
+
+namespace Max2Babylon
+{
+    public class Descriptor : Autodesk.Max.Plugins.ClassDesc2
+    {
+        public override object Create(bool loading)
+        {
+            return new GlobalUtility();
+        }
+
+        public override bool IsPublic
+        {
+            get
+            {
+                return true;
+            }
+        }
+
+        public override string ClassName
+        {
+            get
+            {
+                return "Babylon File Exporter";
+            }
+        }
+
+        public override SClass_ID SuperClassID
+        {
+            get
+            {
+                return SClass_ID.Gup;
+            }
+        }
+
+        public override IClass_ID ClassID
+        {
+            get
+            {
+                return Loader.Class_ID;
+            }
+        }
+
+        public override string Category
+        {
+            get
+            {
+                return "Babylon";
+            }
+        }
+    }
+}

+ 315 - 309
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Animation.cs

@@ -1,309 +1,315 @@
-using System;
-using System.Collections.Generic;
-using Autodesk.Max;
-using BabylonExport.Entities;
-
-namespace Max2Babylon
-{
-    partial class BabylonExporter
-    {
-        const int Ticks = 160;
-
-        private static BabylonAnimationKey GenerateFloatFunc(int index, IIKeyControl keyControl)
-        {
-            var key = Loader.Global.ILinFloatKey.Create();
-            keyControl.GetKey(index, key);
-
-            return new BabylonAnimationKey
-            {
-                frame = key.Time / Ticks,
-                values = new[] { key.Val }
-            };
-        }
-
-        private static bool ExportFloatController(IControl control, string property, List<BabylonAnimation> animations)
-        {
-            return ExportController(control, property, animations, 0x2001, BabylonAnimation.DataType.Float, GenerateFloatFunc);
-        }
-
-        private static bool ExportQuaternionController(IControl control, string property, List<BabylonAnimation> animations)
-        {
-            IQuat previousQuat = null;
-
-            return ExportController(control, property, animations, 0x2003, BabylonAnimation.DataType.Quaternion,
-                (index, keyControl) =>
-                {
-                    var key = Loader.Global.ILinRotKey.Create();
-                    keyControl.GetKey(index, key);
-                    var newQuat = key.Val;
-
-                    if (index > 0)
-                    {
-                        newQuat = previousQuat.Multiply(newQuat);
-                    }
-
-                    previousQuat = newQuat;
-
-                    return new BabylonAnimationKey
-                    {
-                        frame = key.Time / Ticks,
-                        values = newQuat.ToArray()
-                    };
-                });
-        }
-
-        private static bool ExportVector3Controller(IControl control, string property, List<BabylonAnimation> animations)
-        {
-            var result = false;
-
-            if (control == null)
-            {
-                return false;
-            }
-
-            if (control.XController != null || control.YController != null || control.ZController != null)
-            {
-                result |= ExportFloatController(control.XController, property + ".x", animations);
-                result |= ExportFloatController(control.ZController, property + ".y", animations);
-                result |= ExportFloatController(control.YController, property + ".z", animations);
-
-                return result;
-            }
-
-            if (ExportController(control, property, animations, 0x2002, BabylonAnimation.DataType.Vector3,
-                (index, keyControl) =>
-                {
-                    var key = Loader.Global.ILinPoint3Key.Create();
-                    keyControl.GetKey(index, key);
-
-                    return new BabylonAnimationKey
-                    {
-                        frame = key.Time / Ticks,
-                        values = key.Val.ToArraySwitched()
-                    };
-                }))
-            {
-                return true;
-            }
-
-            return ExportController(control, property, animations, 0x2004, BabylonAnimation.DataType.Vector3,
-                (index, keyControl) =>
-                {
-                    var key = Loader.Global.ILinScaleKey.Create();
-                    keyControl.GetKey(index, key);
-
-                    return new BabylonAnimationKey
-                    {
-                        frame = key.Time / Ticks,
-                        values = key.Val.S.ToArraySwitched()
-                    };
-                });
-        }
-
-        private static bool ExportController(IControl control, string property, List<BabylonAnimation> animations, uint classId, BabylonAnimation.DataType dataType, Func<int, IIKeyControl, BabylonAnimationKey> generateFunc)
-        {
-            if (control == null)
-            {
-                return false;
-            }
-
-            var keyControl = control.GetInterface(InterfaceID.Keycontrol) as IIKeyControl;
-
-            if (keyControl == null)
-            {
-                return false;
-            }
-
-            if (control.ClassID.PartA != classId)
-            {
-                return false;
-            }
-
-            var keys = new List<BabylonAnimationKey>();
-            BabylonAnimation.LoopBehavior loopBehavior;
-
-            switch (control.GetORT(2))
-            {
-                case 2:
-                    loopBehavior = BabylonAnimation.LoopBehavior.Cycle;
-                    break;
-                default:
-                    loopBehavior = BabylonAnimation.LoopBehavior.Relative;
-                    break;
-            }
-
-            for (var index = 0; index < keyControl.NumKeys; index++)
-            {
-                keys.Add(generateFunc(index, keyControl));
-            }
-
-            if (keys.Count == 0)
-            {
-                return false;
-            }
-
-            var end = Loader.Core.AnimRange.End;
-            if (keys[keys.Count - 1].frame != end / Ticks)
-            {
-                keys.Add(new BabylonAnimationKey()
-                {
-                    frame = end / Ticks,
-                    values = keys[keys.Count - 1].values
-                });
-            }
-
-            var babylonAnimation = new BabylonAnimation
-            {
-                dataType = (int)dataType,
-                name = property + " animation",
-                keys = keys.ToArray(),
-                framePerSecond = Loader.Global.FrameRate,
-                loopBehavior = (int)loopBehavior,
-                property = property
-            };
-
-            animations.Add(babylonAnimation);
-
-            return true;
-        }
-
-        private static void ExportVector3Animation(string property, List<BabylonAnimation> animations,
-            Func<int, float[]> extractValueFunc)
-        {
-            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Vector3);
-        }
-
-        private static void ExportQuaternionAnimation(string property, List<BabylonAnimation> animations,
-            Func<int, float[]> extractValueFunc)
-        {
-            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Quaternion);
-        }
-
-        private static void ExportFloatAnimation(string property, List<BabylonAnimation> animations,
-            Func<int, float[]> extractValueFunc)
-        {
-            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Float);
-        }
-
-        static void RemoveLinearAnimationKeys(List<BabylonAnimationKey> keys)
-        {
-            for (int ixFirst = keys.Count - 3; ixFirst >= 0; --ixFirst)
-            {
-                while (keys.Count - ixFirst >= 3)
-                {
-                    if (!RemoveAnimationKey(keys, ixFirst))
-                    {
-                        break;
-                    }
-                }
-            }
-        }
-
-        static float[] weightedLerp(int frame0, int frame1, int frame2, float[] value0, float[] value2)
-        {
-            double weight2 = (frame1 - frame0) / (double)(frame2 - frame0);
-            double weight0 = 1 - weight2;
-            float[] result = new float[value0.Length];
-            for (int i = 0; i < result.Length; ++i)
-            {
-                result[i] = (float)(value0[i] * weight0 + value2[i] * weight2);
-            }
-            return result;
-        }
-
-        private static bool RemoveAnimationKey(List<BabylonAnimationKey> keys, int ixFirst)
-        {
-            var first = keys[ixFirst];
-            var middle = keys[ixFirst + 1];
-            var last = keys[ixFirst + 2];
-
-            // first pass, frame equality
-            if (first.values.IsEqualTo(last.values) && first.values.IsEqualTo(middle.values))
-            {
-                keys.RemoveAt(ixFirst + 1);
-                return true;
-            }
-
-            // second pass : linear interpolation detection
-            var computedMiddleValue = weightedLerp(first.frame, middle.frame, last.frame, first.values, last.values);
-            if (computedMiddleValue.IsEqualTo(middle.values))
-            {
-                keys.RemoveAt(ixFirst + 1);
-                return true;
-            }
-            return false;
-
-        }
-
-        private static void ExportAnimation(string property, List<BabylonAnimation> animations, Func<int, float[]> extractValueFunc, BabylonAnimation.DataType dataType)
-        {
-            var exportNonOptimizedAnimations = Loader.Core.RootNode.GetBoolProperty("babylonjs_exportnonoptimizedanimations");
-
-            var start = Loader.Core.AnimRange.Start;
-            var end = Loader.Core.AnimRange.End;
-
-            float[] previous = null;
-            var keys = new List<BabylonAnimationKey>();
-            for (var key = start; key <= end; key += Ticks)
-            {
-                var current = extractValueFunc(key);
-
-                if (exportNonOptimizedAnimations && previous != null && previous.IsEqualTo(current))
-                {
-                    continue; // Do not add key
-                }
-
-                keys.Add(new BabylonAnimationKey()
-                {
-                    frame = key / Ticks,
-                    values = current
-                });
-
-                previous = current;
-            }
-
-            if (!exportNonOptimizedAnimations)
-            {
-                RemoveLinearAnimationKeys(keys);
-            }
-
-            if (keys.Count > 1)
-            {
-                var animationPresent = true;
-
-                if (keys.Count == 2)
-                {
-                    if (keys[0].values.IsEqualTo(keys[1].values))
-                    {
-                        animationPresent = false;
-                    }
-                }
-
-                if (animationPresent)
-                {
-
-                    if (keys[keys.Count - 1].frame != end / Ticks)
-                    {
-                        keys.Add(new BabylonAnimationKey()
-                        {
-                            frame = end / Ticks,
-                            values = keys[keys.Count - 1].values
-                        });
-                    }
-
-                    var babylonAnimation = new BabylonAnimation
-                    {
-                        dataType = (int)dataType,
-                        name = property + " animation",
-                        keys = keys.ToArray(),
-                        framePerSecond = Loader.Global.FrameRate,
-                        loopBehavior = (int)BabylonAnimation.LoopBehavior.Cycle,
-                        property = property
-                    };
-
-                    animations.Add(babylonAnimation);
-                }
-            }
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Autodesk.Max;
+using BabylonExport.Entities;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        const int Ticks = 160;
+
+        private static BabylonAnimationKey GenerateFloatFunc(int index, IIKeyControl keyControl)
+        {
+            var key = Loader.Global.ILinFloatKey.Create();
+            keyControl.GetKey(index, key);
+
+            return new BabylonAnimationKey
+            {
+                frame = key.Time / Ticks,
+                values = new[] { key.Val }
+            };
+        }
+
+        private static bool ExportFloatController(IControl control, string property, List<BabylonAnimation> animations)
+        {
+            return ExportController(control, property, animations, 0x2001, BabylonAnimation.DataType.Float, GenerateFloatFunc);
+        }
+
+        private static bool ExportQuaternionController(IControl control, string property, List<BabylonAnimation> animations)
+        {
+            IQuat previousQuat = null;
+
+            return ExportController(control, property, animations, 0x2003, BabylonAnimation.DataType.Quaternion,
+                (index, keyControl) =>
+                {
+                    var key = Loader.Global.ILinRotKey.Create();
+                    keyControl.GetKey(index, key);
+                    var newQuat = key.Val;
+
+                    if (index > 0)
+                    {
+                        newQuat = previousQuat.Multiply(newQuat);
+                    }
+
+                    previousQuat = newQuat;
+
+                    return new BabylonAnimationKey
+                    {
+                        frame = key.Time / Ticks,
+                        values = newQuat.ToArray()
+                    };
+                });
+        }
+
+        private static bool ExportVector3Controller(IControl control, string property, List<BabylonAnimation> animations)
+        {
+            var result = false;
+
+            if (control == null)
+            {
+                return false;
+            }
+
+            if (control.XController != null || control.YController != null || control.ZController != null)
+            {
+                result |= ExportFloatController(control.XController, property + ".x", animations);
+                result |= ExportFloatController(control.ZController, property + ".y", animations);
+                result |= ExportFloatController(control.YController, property + ".z", animations);
+
+                return result;
+            }
+
+            if (ExportController(control, property, animations, 0x2002, BabylonAnimation.DataType.Vector3,
+                (index, keyControl) =>
+                {
+                    var key = Loader.Global.ILinPoint3Key.Create();
+                    keyControl.GetKey(index, key);
+
+                    return new BabylonAnimationKey
+                    {
+                        frame = key.Time / Ticks,
+                        values = key.Val.ToArraySwitched()
+                    };
+                }))
+            {
+                return true;
+            }
+
+            return ExportController(control, property, animations, 0x2004, BabylonAnimation.DataType.Vector3,
+                (index, keyControl) =>
+                {
+                    var key = Loader.Global.ILinScaleKey.Create();
+                    keyControl.GetKey(index, key);
+
+                    return new BabylonAnimationKey
+                    {
+                        frame = key.Time / Ticks,
+                        values = key.Val.S.ToArraySwitched()
+                    };
+                });
+        }
+
+        private static bool ExportController(IControl control, string property, List<BabylonAnimation> animations, uint classId, BabylonAnimation.DataType dataType, Func<int, IIKeyControl, BabylonAnimationKey> generateFunc)
+        {
+            if (control == null)
+            {
+                return false;
+            }
+
+            var keyControl = control.GetInterface(InterfaceID.Keycontrol) as IIKeyControl;
+
+            if (keyControl == null)
+            {
+                return false;
+            }
+
+            if (control.ClassID.PartA != classId)
+            {
+                return false;
+            }
+
+            var keys = new List<BabylonAnimationKey>();
+            BabylonAnimation.LoopBehavior loopBehavior;
+
+            switch (control.GetORT(2))
+            {
+                case 2:
+                    loopBehavior = BabylonAnimation.LoopBehavior.Cycle;
+                    break;
+                default:
+                    loopBehavior = BabylonAnimation.LoopBehavior.Relative;
+                    break;
+            }
+
+            for (var index = 0; index < keyControl.NumKeys; index++)
+            {
+                keys.Add(generateFunc(index, keyControl));
+            }
+
+            if (keys.Count == 0)
+            {
+                return false;
+            }
+
+            var end = Loader.Core.AnimRange.End;
+            if (keys[keys.Count - 1].frame != end / Ticks)
+            {
+                keys.Add(new BabylonAnimationKey()
+                {
+                    frame = end / Ticks,
+                    values = keys[keys.Count - 1].values
+                });
+            }
+
+            var babylonAnimation = new BabylonAnimation
+            {
+                dataType = (int)dataType,
+                name = property + " animation",
+                keys = keys.ToArray(),
+                framePerSecond = Loader.Global.FrameRate,
+                loopBehavior = (int)loopBehavior,
+                property = property
+            };
+
+            animations.Add(babylonAnimation);
+
+            return true;
+        }
+
+        private static void ExportColor3Animation(string property, List<BabylonAnimation> animations,
+            Func<int, float[]> extractValueFunc)
+        {
+            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Color3);
+        }
+
+        private static void ExportVector3Animation(string property, List<BabylonAnimation> animations,
+            Func<int, float[]> extractValueFunc)
+        {
+            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Vector3);
+        }
+
+        private static void ExportQuaternionAnimation(string property, List<BabylonAnimation> animations,
+            Func<int, float[]> extractValueFunc)
+        {
+            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Quaternion);
+        }
+
+        private static void ExportFloatAnimation(string property, List<BabylonAnimation> animations,
+            Func<int, float[]> extractValueFunc)
+        {
+            ExportAnimation(property, animations, extractValueFunc, BabylonAnimation.DataType.Float);
+        }
+
+        static void RemoveLinearAnimationKeys(List<BabylonAnimationKey> keys)
+        {
+            for (int ixFirst = keys.Count - 3; ixFirst >= 0; --ixFirst)
+            {
+                while (keys.Count - ixFirst >= 3)
+                {
+                    if (!RemoveAnimationKey(keys, ixFirst))
+                    {
+                        break;
+                    }
+                }
+            }
+        }
+
+        static float[] weightedLerp(int frame0, int frame1, int frame2, float[] value0, float[] value2)
+        {
+            double weight2 = (frame1 - frame0) / (double)(frame2 - frame0);
+            double weight0 = 1 - weight2;
+            float[] result = new float[value0.Length];
+            for (int i = 0; i < result.Length; ++i)
+            {
+                result[i] = (float)(value0[i] * weight0 + value2[i] * weight2);
+            }
+            return result;
+        }
+
+        private static bool RemoveAnimationKey(List<BabylonAnimationKey> keys, int ixFirst)
+        {
+            var first = keys[ixFirst];
+            var middle = keys[ixFirst + 1];
+            var last = keys[ixFirst + 2];
+
+            // first pass, frame equality
+            if (first.values.IsEqualTo(last.values) && first.values.IsEqualTo(middle.values))
+            {
+                keys.RemoveAt(ixFirst + 1);
+                return true;
+            }
+
+            // second pass : linear interpolation detection
+            var computedMiddleValue = weightedLerp(first.frame, middle.frame, last.frame, first.values, last.values);
+            if (computedMiddleValue.IsEqualTo(middle.values))
+            {
+                keys.RemoveAt(ixFirst + 1);
+                return true;
+            }
+            return false;
+
+        }
+
+        private static void ExportAnimation(string property, List<BabylonAnimation> animations, Func<int, float[]> extractValueFunc, BabylonAnimation.DataType dataType)
+        {
+            var exportNonOptimizedAnimations = Loader.Core.RootNode.GetBoolProperty("babylonjs_exportnonoptimizedanimations");
+
+            var start = Loader.Core.AnimRange.Start;
+            var end = Loader.Core.AnimRange.End;
+
+            float[] previous = null;
+            var keys = new List<BabylonAnimationKey>();
+            for (var key = start; key <= end; key += Ticks)
+            {
+                var current = extractValueFunc(key);
+
+                if (exportNonOptimizedAnimations && previous != null && previous.IsEqualTo(current))
+                {
+                    continue; // Do not add key
+                }
+
+                keys.Add(new BabylonAnimationKey()
+                {
+                    frame = key / Ticks,
+                    values = current
+                });
+
+                previous = current;
+            }
+
+            if (!exportNonOptimizedAnimations)
+            {
+                RemoveLinearAnimationKeys(keys);
+            }
+
+            if (keys.Count > 1)
+            {
+                var animationPresent = true;
+
+                if (keys.Count == 2)
+                {
+                    if (keys[0].values.IsEqualTo(keys[1].values))
+                    {
+                        animationPresent = false;
+                    }
+                }
+
+                if (animationPresent)
+                {
+
+                    if (keys[keys.Count - 1].frame != end / Ticks)
+                    {
+                        keys.Add(new BabylonAnimationKey()
+                        {
+                            frame = end / Ticks,
+                            values = keys[keys.Count - 1].values
+                        });
+                    }
+
+                    var babylonAnimation = new BabylonAnimation
+                    {
+                        dataType = (int)dataType,
+                        name = property + " animation",
+                        keys = keys.ToArray(),
+                        framePerSecond = Loader.Global.FrameRate,
+                        loopBehavior = (int)BabylonAnimation.LoopBehavior.Cycle,
+                        property = property
+                    };
+
+                    animations.Add(babylonAnimation);
+                }
+            }
+        }
+    }
+}

+ 127 - 127
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Camera.cs

@@ -1,127 +1,127 @@
-using System.Collections.Generic;
-using Autodesk.Max;
-using BabylonExport.Entities;
-using System.Linq;
-
-namespace Max2Babylon
-{
-    partial class BabylonExporter
-    {
-        private void ExportCamera(IIGameScene scene,  IIGameNode cameraNode, BabylonScene babylonScene)
-        {
-            if (cameraNode.MaxNode.GetBoolProperty("babylonjs_noexport"))
-            {
-                return;
-            }
-            var gameCamera = cameraNode.IGameObject.AsGameCamera();
-            var maxCamera = gameCamera.MaxObject as ICameraObject;
-            var initialized = gameCamera.InitializeData;
-            var babylonCamera = new BabylonCamera();
-
-            RaiseMessage(cameraNode.Name, 1);
-            babylonCamera.name = cameraNode.Name;
-            babylonCamera.id = cameraNode.MaxNode.GetGuid().ToString();
-            if (cameraNode.NodeParent != null)
-            {
-                babylonCamera.parentId = GetParentID(cameraNode.NodeParent, babylonScene, scene);
-            }
-
-            babylonCamera.fov = Tools.ConvertFov(maxCamera.GetFOV(0, Tools.Forever));
-
-            if (maxCamera.ManualClip == 1)
-            {
-                babylonCamera.minZ = maxCamera.GetClipDist(0, 1, Tools.Forever);
-                babylonCamera.maxZ = maxCamera.GetClipDist(0, 2, Tools.Forever);
-            }
-            else
-            {
-                babylonCamera.minZ = 0.1f;
-                babylonCamera.maxZ = 10000.0f;
-            }
-
-            if (babylonCamera.minZ == 0.0f)
-            {
-                babylonCamera.minZ = 0.1f;
-            }
-
-            // Type
-            babylonCamera.type = cameraNode.MaxNode.GetStringProperty("babylonjs_type", "FreeCamera");
-
-            // Control
-            babylonCamera.speed = cameraNode.MaxNode.GetFloatProperty("babylonjs_speed", 1.0f);
-            babylonCamera.inertia = cameraNode.MaxNode.GetFloatProperty("babylonjs_inertia", 0.9f);
-
-            // Collisions
-            babylonCamera.checkCollisions = cameraNode.MaxNode.GetBoolProperty("babylonjs_checkcollisions");
-            babylonCamera.applyGravity = cameraNode.MaxNode.GetBoolProperty("babylonjs_applygravity");
-            babylonCamera.ellipsoid = cameraNode.MaxNode.GetVector3Property("babylonjs_ellipsoid");
-
-            // Position
-            var wm = cameraNode.GetLocalTM(0);
-            if (cameraNode.NodeParent != null)
-            {
-                var parentWorld = cameraNode.NodeParent.GetObjectTM(0);
-                wm.MultiplyBy(parentWorld.Inverse);
-            }
-            var position = wm.Translation;
-            babylonCamera.position = new float[] { position.X, position.Y, position.Z };
-
-            // Target
-            var target = gameCamera.CameraTarget;
-            if (target != null)
-            {
-                babylonCamera.lockedTargetId = target.MaxNode.GetGuid().ToString();
-            }
-            else
-            {
-                var dir = wm.GetRow(3);
-                babylonCamera.target = new float[] { position.X - dir.X, position.Y - dir.Y, position.Z - dir.Z };
-            }
-
-            // Animations
-            var animations = new List<BabylonAnimation>();
-
-            ExportVector3Animation("position", animations, key =>
-            {
-                var tm = cameraNode.GetLocalTM(key);
-                if (cameraNode.NodeParent != null)
-                {
-                    var parentWorld = cameraNode.NodeParent.GetObjectTM(key);
-                    tm.MultiplyBy(parentWorld.Inverse);
-                }
-                var translation = tm.Translation;
-                return new float[] { translation.X, translation.Y, translation.Z };
-            });
-
-            if (gameCamera.CameraTarget == null)
-            {
-                ExportVector3Animation("target", animations, key =>
-                {
-                    var tm = cameraNode.GetLocalTM(key);
-                    if (cameraNode.NodeParent != null)
-                    {
-                        var parentWorld = cameraNode.NodeParent.GetObjectTM(key);
-                        tm.MultiplyBy(parentWorld.Inverse);
-                    }
-                    var translation = tm.Translation;
-                    var dir = tm.GetRow(3);
-                    return new float[] { translation.X - dir.X, translation.Y - dir.Y, translation.Z - dir.Z };
-                });
-            }
-
-            ExportFloatAnimation("fov", animations, key => new[] { Tools.ConvertFov((gameCamera.MaxObject as ICameraObject).GetFOV(key, Tools.Forever)) });
-
-            babylonCamera.animations = animations.ToArray();
-
-            if (cameraNode.MaxNode.GetBoolProperty("babylonjs_autoanimate"))
-            {
-                babylonCamera.autoAnimate = true;
-                babylonCamera.autoAnimateFrom = (int)cameraNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_from");
-                babylonCamera.autoAnimateTo = (int)cameraNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_to");
-                babylonCamera.autoAnimateLoop = cameraNode.MaxNode.GetBoolProperty("babylonjs_autoanimateloop");
-            }
-
-            babylonScene.CamerasList.Add(babylonCamera);
-        }
-    }
-}
+using System.Collections.Generic;
+using Autodesk.Max;
+using BabylonExport.Entities;
+using System.Linq;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        private void ExportCamera(IIGameScene scene,  IIGameNode cameraNode, BabylonScene babylonScene)
+        {
+            if (cameraNode.MaxNode.GetBoolProperty("babylonjs_noexport"))
+            {
+                return;
+            }
+            var gameCamera = cameraNode.IGameObject.AsGameCamera();
+            var maxCamera = gameCamera.MaxObject as ICameraObject;
+            var initialized = gameCamera.InitializeData;
+            var babylonCamera = new BabylonCamera();
+
+            RaiseMessage(cameraNode.Name, 1);
+            babylonCamera.name = cameraNode.Name;
+            babylonCamera.id = cameraNode.MaxNode.GetGuid().ToString();
+            if (cameraNode.NodeParent != null)
+            {
+                babylonCamera.parentId = GetParentID(cameraNode.NodeParent, babylonScene, scene);
+            }
+
+            babylonCamera.fov = Tools.ConvertFov(maxCamera.GetFOV(0, Tools.Forever));
+
+            if (maxCamera.ManualClip == 1)
+            {
+                babylonCamera.minZ = maxCamera.GetClipDist(0, 1, Tools.Forever);
+                babylonCamera.maxZ = maxCamera.GetClipDist(0, 2, Tools.Forever);
+            }
+            else
+            {
+                babylonCamera.minZ = 0.1f;
+                babylonCamera.maxZ = 10000.0f;
+            }
+
+            if (babylonCamera.minZ == 0.0f)
+            {
+                babylonCamera.minZ = 0.1f;
+            }
+
+            // Type
+            babylonCamera.type = cameraNode.MaxNode.GetStringProperty("babylonjs_type", "FreeCamera");
+
+            // Control
+            babylonCamera.speed = cameraNode.MaxNode.GetFloatProperty("babylonjs_speed", 1.0f);
+            babylonCamera.inertia = cameraNode.MaxNode.GetFloatProperty("babylonjs_inertia", 0.9f);
+
+            // Collisions
+            babylonCamera.checkCollisions = cameraNode.MaxNode.GetBoolProperty("babylonjs_checkcollisions");
+            babylonCamera.applyGravity = cameraNode.MaxNode.GetBoolProperty("babylonjs_applygravity");
+            babylonCamera.ellipsoid = cameraNode.MaxNode.GetVector3Property("babylonjs_ellipsoid");
+
+            // Position
+            var wm = cameraNode.GetLocalTM(0);
+            if (cameraNode.NodeParent != null)
+            {
+                var parentWorld = cameraNode.NodeParent.GetObjectTM(0);
+                wm.MultiplyBy(parentWorld.Inverse);
+            }
+            var position = wm.Translation;
+            babylonCamera.position = new [] { position.X, position.Y, position.Z };
+
+            // Target
+            var target = gameCamera.CameraTarget;
+            if (target != null)
+            {
+                babylonCamera.lockedTargetId = target.MaxNode.GetGuid().ToString();
+            }
+            else
+            {
+                var dir = wm.GetRow(3);
+                babylonCamera.target = new [] { position.X - dir.X, position.Y - dir.Y, position.Z - dir.Z };
+            }
+
+            // Animations
+            var animations = new List<BabylonAnimation>();
+
+            ExportVector3Animation("position", animations, key =>
+            {
+                var tm = cameraNode.GetLocalTM(key);
+                if (cameraNode.NodeParent != null)
+                {
+                    var parentWorld = cameraNode.NodeParent.GetObjectTM(key);
+                    tm.MultiplyBy(parentWorld.Inverse);
+                }
+                var translation = tm.Translation;
+                return new [] { translation.X, translation.Y, translation.Z };
+            });
+
+            if (gameCamera.CameraTarget == null)
+            {
+                ExportVector3Animation("target", animations, key =>
+                {
+                    var tm = cameraNode.GetLocalTM(key);
+                    if (cameraNode.NodeParent != null)
+                    {
+                        var parentWorld = cameraNode.NodeParent.GetObjectTM(key);
+                        tm.MultiplyBy(parentWorld.Inverse);
+                    }
+                    var translation = tm.Translation;
+                    var dir = tm.GetRow(3);
+                    return new float[] { translation.X - dir.X, translation.Y - dir.Y, translation.Z - dir.Z };
+                });
+            }
+
+            ExportFloatAnimation("fov", animations, key => new[] { Tools.ConvertFov((gameCamera.MaxObject as ICameraObject).GetFOV(key, Tools.Forever)) });
+
+            babylonCamera.animations = animations.ToArray();
+
+            if (cameraNode.MaxNode.GetBoolProperty("babylonjs_autoanimate"))
+            {
+                babylonCamera.autoAnimate = true;
+                babylonCamera.autoAnimateFrom = (int)cameraNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_from");
+                babylonCamera.autoAnimateTo = (int)cameraNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_to");
+                babylonCamera.autoAnimateLoop = cameraNode.MaxNode.GetBoolProperty("babylonjs_autoanimateloop");
+            }
+
+            babylonScene.CamerasList.Add(babylonCamera);
+        }
+    }
+}

+ 223 - 218
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Light.cs

@@ -1,218 +1,223 @@
-using System;
-using System.Collections.Generic;
-using Autodesk.Max;
-using BabylonExport.Entities;
-using System.Linq;
-
-namespace Max2Babylon
-{
-    partial class BabylonExporter
-    {
-        void ExportDefaultLight(BabylonScene babylonScene)
-        {
-            var babylonLight = new BabylonLight();
-            babylonLight.name = "Default light";
-            babylonLight.id = Guid.NewGuid().ToString();
-            babylonLight.type = 3;
-            babylonLight.groundColor = new float[] { 0, 0, 0 };
-            babylonLight.direction = new[] { 0, 1.0f, 0 };
-
-            babylonLight.intensity = 1;
-
-            babylonLight.diffuse = new[] { 1.0f, 1.0f, 1.0f };
-            babylonLight.specular = new[] { 1.0f, 1.0f, 1.0f };
-
-            babylonScene.LightsList.Add(babylonLight);
-        }
-
-        private void ExportLight(IIGameScene scene, IIGameNode lightNode, BabylonScene babylonScene)
-        {
-            if (lightNode.MaxNode.GetBoolProperty("babylonjs_noexport"))
-            {
-                return;
-            }
-
-            var gameLight = lightNode.IGameObject.AsGameLight();
-            var initialized = gameLight.InitializeData;
-            var babylonLight = new BabylonLight();
-
-            RaiseMessage(lightNode.Name, 1);
-            babylonLight.name = lightNode.Name;
-            babylonLight.id = lightNode.MaxNode.GetGuid().ToString();
-            if (lightNode.NodeParent != null)
-            {
-                babylonLight.parentId = GetParentID(lightNode.NodeParent, babylonScene, scene);
-            }
-
-            // Type
-
-            var maxLight = (lightNode.MaxNode.ObjectRef as ILightObject);
-            var lightState = Loader.Global.LightState.Create();
-            maxLight.EvalLightState(0, Tools.Forever, lightState);
-
-            switch (lightState.Type)
-            {
-                case LightType.OmniLgt:
-                    babylonLight.type = 0;
-                    break;
-                case LightType.SpotLgt:
-                    babylonLight.type = 2;
-                    babylonLight.angle = (float)(maxLight.GetFallsize(0, Tools.Forever) * Math.PI / 180.0f);
-                    babylonLight.exponent = 1;
-                    break;
-                case LightType.DirectLgt:
-                    babylonLight.type = 1;
-                    break;
-                case LightType.AmbientLgt:
-                    babylonLight.type = 3;
-                    babylonLight.groundColor = new float[] { 0, 0, 0 };
-                    break;
-            }
-
-
-            // Shadows 
-            if (maxLight.ShadowMethod == 1)
-            {
-                if (lightState.Type == LightType.DirectLgt || lightState.Type == LightType.SpotLgt)
-                {
-                    ExportShadowGenerator(lightNode.MaxNode, babylonScene);
-                }
-                else
-                {
-                    RaiseWarning("Shadows maps are only supported for directional and spot lights", 2);
-                }
-            }
-
-            // Position
-            var wm = lightNode.GetObjectTM(0);
-            if (lightNode.NodeParent != null)
-            {
-                var parentWorld = lightNode.NodeParent.GetObjectTM(0);
-                wm.MultiplyBy(parentWorld.Inverse);
-            }
-            var position = wm.Translation;
-            babylonLight.position = new[] { position.X, position.Y, position.Z };
-
-            // Direction
-            var target = gameLight.LightTarget;
-            if (target != null)
-            {
-                var targetWm = target.GetObjectTM(0);
-                var targetPosition = targetWm.Translation;
-
-                var direction = targetPosition.Subtract(position).Normalize;
-                babylonLight.direction = new[] { direction.X, direction.Y, direction.Z };
-            }
-            else
-            {
-                var vDir = Loader.Global.Point3.Create(0, -1, 0);
-                vDir = wm.ExtractMatrix3().VectorTransform(vDir).Normalize;
-                babylonLight.direction = new[] { vDir.X, vDir.Y, vDir.Z };
-            }
-
-            var maxScene = Loader.Core.RootNode;
-
-            // Exclusion
-            var inclusion = maxLight.ExclList.TestFlag(1); //NT_INCLUDE 
-            var checkExclusionList = maxLight.ExclList.TestFlag(2); //NT_AFFECT_ILLUM
-
-            if (checkExclusionList)
-            {
-                var excllist = new List<string>();
-                var incllist = new List<string>();
-
-                foreach (var meshNode in maxScene.NodesListBySuperClass(SClass_ID.Geomobject))
-                {
-                    if (meshNode.CastShadows == 1)
-                    {
-                        var inList = maxLight.ExclList.FindNode(meshNode) != -1;
-
-                        if (inList)
-                        {
-                            if (inclusion)
-                            {
-                                incllist.Add(meshNode.GetGuid().ToString());
-                            }
-                            else
-                            {
-                                excllist.Add(meshNode.GetGuid().ToString());
-                            }
-                        }
-                    }
-                }
-
-                babylonLight.includedOnlyMeshesIds = incllist.ToArray();
-                babylonLight.excludedMeshesIds = excllist.ToArray();
-            }
-
-            // Other fields 
-            babylonLight.intensity = maxLight.GetIntensity(0, Tools.Forever);
-
-
-            babylonLight.diffuse = lightState.AffectDiffuse ? maxLight.GetRGBColor(0, Tools.Forever).ToArray() : new float[] { 0, 0, 0 };
-            babylonLight.specular = lightState.AffectDiffuse ? maxLight.GetRGBColor(0, Tools.Forever).ToArray() : new float[] { 0, 0, 0 };
-
-
-            if (maxLight.UseAtten)
-            {
-                babylonLight.range = maxLight.GetAtten(0, 1, Tools.Forever);
-            }
-
-
-            // Animations
-            var animations = new List<BabylonAnimation>();
-
-            ExportVector3Animation("position", animations, key =>
-            {
-                var mat = lightNode.GetObjectTM(key);
-                if (lightNode.NodeParent != null)
-                {
-                    var parentWorld = lightNode.NodeParent.GetObjectTM(key);
-                    mat.MultiplyBy(parentWorld.Inverse);
-                }
-                var pos = mat.Translation;
-                return new[] { pos.X, pos.Y, pos.Z };
-            });
-
-            ExportVector3Animation("direction", animations, key =>
-            {
-                var wmLight = lightNode.GetObjectTM(key);
-                if (lightNode.NodeParent != null)
-                {
-                    var parentWorld = lightNode.NodeParent.GetObjectTM(key);
-                    wmLight.MultiplyBy(parentWorld.Inverse);
-                }
-                var positionLight = wmLight.Translation;
-                var lightTarget = gameLight.LightTarget;
-                if (lightTarget != null)
-                {
-                    var targetWm = lightTarget.GetObjectTM(key);
-                    var targetPosition = targetWm.Translation;
-
-                    var direction = targetPosition.Subtract(positionLight).Normalize;
-                    return new[] { direction.X, direction.Y, direction.Z };
-                }
-                else
-                {
-                    var vDir = Loader.Global.Point3.Create(0, -1, 0);
-                    vDir = wmLight.ExtractMatrix3().VectorTransform(vDir).Normalize;
-                    return new[] { vDir.X, vDir.Y, vDir.Z };
-                }
-            });
-
-            ExportFloatAnimation("intensity", animations, key => new[] { maxLight.GetIntensity(key, Tools.Forever) });
-
-            babylonLight.animations = animations.ToArray();
-
-            if (lightNode.MaxNode.GetBoolProperty("babylonjs_autoanimate"))
-            {
-                babylonLight.autoAnimate = true;
-                babylonLight.autoAnimateFrom = (int)lightNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_from");
-                babylonLight.autoAnimateTo = (int)lightNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_to");
-                babylonLight.autoAnimateLoop = lightNode.MaxNode.GetBoolProperty("babylonjs_autoanimateloop");
-            }
-
-            babylonScene.LightsList.Add(babylonLight);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Autodesk.Max;
+using BabylonExport.Entities;
+using System.Linq;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        void ExportDefaultLight(BabylonScene babylonScene)
+        {
+            var babylonLight = new BabylonLight();
+            babylonLight.name = "Default light";
+            babylonLight.id = Guid.NewGuid().ToString();
+            babylonLight.type = 3;
+            babylonLight.groundColor = new float[] { 0, 0, 0 };
+            babylonLight.direction = new[] { 0, 1.0f, 0 };
+
+            babylonLight.intensity = 1;
+
+            babylonLight.diffuse = new[] { 1.0f, 1.0f, 1.0f };
+            babylonLight.specular = new[] { 1.0f, 1.0f, 1.0f };
+
+            babylonScene.LightsList.Add(babylonLight);
+        }
+
+        private void ExportLight(IIGameScene scene, IIGameNode lightNode, BabylonScene babylonScene)
+        {
+            if (lightNode.MaxNode.GetBoolProperty("babylonjs_noexport"))
+            {
+                return;
+            }
+
+            var gameLight = lightNode.IGameObject.AsGameLight();
+            var initialized = gameLight.InitializeData;
+            var babylonLight = new BabylonLight();
+
+            RaiseMessage(lightNode.Name, 1);
+            babylonLight.name = lightNode.Name;
+            babylonLight.id = lightNode.MaxNode.GetGuid().ToString();
+            if (lightNode.NodeParent != null)
+            {
+                babylonLight.parentId = GetParentID(lightNode.NodeParent, babylonScene, scene);
+            }
+
+            // Type
+
+            var maxLight = (lightNode.MaxNode.ObjectRef as ILightObject);
+            var lightState = Loader.Global.LightState.Create();
+            maxLight.EvalLightState(0, Tools.Forever, lightState);
+
+            switch (lightState.Type)
+            {
+                case LightType.OmniLgt:
+                    babylonLight.type = 0;
+                    break;
+                case LightType.SpotLgt:
+                    babylonLight.type = 2;
+                    babylonLight.angle = (float)(maxLight.GetFallsize(0, Tools.Forever) * Math.PI / 180.0f);
+                    babylonLight.exponent = 1;
+                    break;
+                case LightType.DirectLgt:
+                    babylonLight.type = 1;
+                    break;
+                case LightType.AmbientLgt:
+                    babylonLight.type = 3;
+                    babylonLight.groundColor = new float[] { 0, 0, 0 };
+                    break;
+            }
+
+
+            // Shadows 
+            if (maxLight.ShadowMethod == 1)
+            {
+                if (lightState.Type == LightType.DirectLgt || lightState.Type == LightType.SpotLgt || lightState.Type == LightType.OmniLgt)
+                {
+                    ExportShadowGenerator(lightNode.MaxNode, babylonScene);
+                }
+                else
+                {
+                    RaiseWarning("Shadows maps are only supported for point, directional and spot lights", 2);
+                }
+            }
+
+            // Position
+            var wm = lightNode.GetObjectTM(0);
+            if (lightNode.NodeParent != null)
+            {
+                var parentWorld = lightNode.NodeParent.GetObjectTM(0);
+                wm.MultiplyBy(parentWorld.Inverse);
+            }
+            var position = wm.Translation;
+            babylonLight.position = new[] { position.X, position.Y, position.Z };
+
+            // Direction
+            var target = gameLight.LightTarget;
+            if (target != null)
+            {
+                var targetWm = target.GetObjectTM(0);
+                var targetPosition = targetWm.Translation;
+
+                var direction = targetPosition.Subtract(position).Normalize;
+                babylonLight.direction = new[] { direction.X, direction.Y, direction.Z };
+            }
+            else
+            {
+                var vDir = Loader.Global.Point3.Create(0, -1, 0);
+                vDir = wm.ExtractMatrix3().VectorTransform(vDir).Normalize;
+                babylonLight.direction = new[] { vDir.X, vDir.Y, vDir.Z };
+            }
+
+            var maxScene = Loader.Core.RootNode;
+
+            // Exclusion
+            var inclusion = maxLight.ExclList.TestFlag(1); //NT_INCLUDE 
+            var checkExclusionList = maxLight.ExclList.TestFlag(2); //NT_AFFECT_ILLUM
+
+            if (checkExclusionList)
+            {
+                var excllist = new List<string>();
+                var incllist = new List<string>();
+
+                foreach (var meshNode in maxScene.NodesListBySuperClass(SClass_ID.Geomobject))
+                {
+                    if (meshNode.CastShadows == 1)
+                    {
+                        var inList = maxLight.ExclList.FindNode(meshNode) != -1;
+
+                        if (inList)
+                        {
+                            if (inclusion)
+                            {
+                                incllist.Add(meshNode.GetGuid().ToString());
+                            }
+                            else
+                            {
+                                excllist.Add(meshNode.GetGuid().ToString());
+                            }
+                        }
+                    }
+                }
+
+                babylonLight.includedOnlyMeshesIds = incllist.ToArray();
+                babylonLight.excludedMeshesIds = excllist.ToArray();
+            }
+
+            // Other fields 
+            babylonLight.intensity = maxLight.GetIntensity(0, Tools.Forever);
+
+
+            babylonLight.diffuse = lightState.AffectDiffuse ? maxLight.GetRGBColor(0, Tools.Forever).ToArray() : new float[] { 0, 0, 0 };
+            babylonLight.specular = lightState.AffectDiffuse ? maxLight.GetRGBColor(0, Tools.Forever).ToArray() : new float[] { 0, 0, 0 };
+
+
+            if (maxLight.UseAtten)
+            {
+                babylonLight.range = maxLight.GetAtten(0, 3, Tools.Forever);
+            }
+
+
+            // Animations
+            var animations = new List<BabylonAnimation>();
+
+            ExportVector3Animation("position", animations, key =>
+            {
+                var mat = lightNode.GetObjectTM(key);
+                if (lightNode.NodeParent != null)
+                {
+                    var parentWorld = lightNode.NodeParent.GetObjectTM(key);
+                    mat.MultiplyBy(parentWorld.Inverse);
+                }
+                var pos = mat.Translation;
+                return new[] { pos.X, pos.Y, pos.Z };
+            });
+
+            ExportVector3Animation("direction", animations, key =>
+            {
+                var wmLight = lightNode.GetObjectTM(key);
+                if (lightNode.NodeParent != null)
+                {
+                    var parentWorld = lightNode.NodeParent.GetObjectTM(key);
+                    wmLight.MultiplyBy(parentWorld.Inverse);
+                }
+                var positionLight = wmLight.Translation;
+                var lightTarget = gameLight.LightTarget;
+                if (lightTarget != null)
+                {
+                    var targetWm = lightTarget.GetObjectTM(key);
+                    var targetPosition = targetWm.Translation;
+
+                    var direction = targetPosition.Subtract(positionLight).Normalize;
+                    return new[] { direction.X, direction.Y, direction.Z };
+                }
+                else
+                {
+                    var vDir = Loader.Global.Point3.Create(0, -1, 0);
+                    vDir = wmLight.ExtractMatrix3().VectorTransform(vDir).Normalize;
+                    return new[] { vDir.X, vDir.Y, vDir.Z };
+                }
+            });
+
+            ExportFloatAnimation("intensity", animations, key => new[] { maxLight.GetIntensity(key, Tools.Forever) });
+
+            ExportColor3Animation("diffuse", animations, key =>
+            {
+                return lightState.AffectDiffuse? maxLight.GetRGBColor(key, Tools.Forever).ToArray() : new float[] { 0, 0, 0 };
+            });
+
+            babylonLight.animations = animations.ToArray();
+
+            if (lightNode.MaxNode.GetBoolProperty("babylonjs_autoanimate"))
+            {
+                babylonLight.autoAnimate = true;
+                babylonLight.autoAnimateFrom = (int)lightNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_from");
+                babylonLight.autoAnimateTo = (int)lightNode.MaxNode.GetFloatProperty("babylonjs_autoanimate_to");
+                babylonLight.autoAnimateLoop = lightNode.MaxNode.GetBoolProperty("babylonjs_autoanimateloop");
+            }
+
+            babylonScene.LightsList.Add(babylonLight);
+        }
+    }
+}

+ 149 - 149
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Material.cs

@@ -1,149 +1,149 @@
-using System;
-using System.Collections.Generic;
-using Autodesk.Max;
-using BabylonExport.Entities;
-
-namespace Max2Babylon
-{
-    partial class BabylonExporter
-    {
-        readonly List<IIGameMaterial> referencedMaterials = new List<IIGameMaterial>();
-
-        private void ExportMaterial(IIGameMaterial materialNode, BabylonScene babylonScene)
-        {
-            var name = materialNode.MaterialName;
-            var id = materialNode.MaxMaterial.GetGuid().ToString();
-
-            RaiseMessage(name, 1);
-
-            if (materialNode.SubMaterialCount > 0)
-            {
-                var babylonMultimaterial = new BabylonMultiMaterial { name = name, id = id };
-
-                var guids = new List<string>();
-
-                for (var index = 0; index < materialNode.SubMaterialCount; index++)
-                {
-                    var subMat = materialNode.GetSubMaterial(index);
-
-                    if (subMat != null)
-                    {
-                        guids.Add(subMat.MaxMaterial.GetGuid().ToString());
-
-                        if (!referencedMaterials.Contains(subMat))
-                        {
-                            referencedMaterials.Add(subMat);
-                            ExportMaterial(subMat, babylonScene);
-                        }
-                    }
-                    else
-                    {
-                        guids.Add(Guid.Empty.ToString());
-                    }
-                }
-
-                babylonMultimaterial.materials = guids.ToArray();
-
-                babylonScene.MultiMaterialsList.Add(babylonMultimaterial);
-                return;
-            }
-
-            var babylonMaterial = new BabylonMaterial
-            {
-                name = name,
-                id = id,
-                ambient = materialNode.MaxMaterial.GetAmbient(0, false).ToArray(),
-                diffuse = materialNode.MaxMaterial.GetDiffuse(0, false).ToArray(),
-                specular = materialNode.MaxMaterial.GetSpecular(0, false).Scale(materialNode.MaxMaterial.GetShinStr(0, false)),
-                specularPower = materialNode.MaxMaterial.GetShininess(0, false) * 256,
-                emissive =
-                    materialNode.MaxMaterial.GetSelfIllumColorOn(0, false)
-                        ? materialNode.MaxMaterial.GetSelfIllumColor(0, false).ToArray()
-                        : materialNode.MaxMaterial.GetDiffuse(0, false).Scale(materialNode.MaxMaterial.GetSelfIllum(0, false)),
-                alpha = 1.0f - materialNode.MaxMaterial.GetXParency(0, false)
-            };
-
-
-            var stdMat = materialNode.MaxMaterial.GetParamBlock(0).Owner as IStdMat2;
-
-            if (stdMat != null)
-            {
-                babylonMaterial.backFaceCulling = !stdMat.TwoSided;
-                babylonMaterial.wireframe = stdMat.Wire;
-
-                // Textures
-                BabylonFresnelParameters fresnelParameters;
-
-                babylonMaterial.ambientTexture = ExportTexture(stdMat, 0, out fresnelParameters, babylonScene);                // Ambient
-                babylonMaterial.diffuseTexture = ExportTexture(stdMat, 1, out fresnelParameters, babylonScene);                // Diffuse
-                if (fresnelParameters != null)
-                {
-                    babylonMaterial.diffuseFresnelParameters = fresnelParameters;
-                }
-
-                babylonMaterial.specularTexture = ExportTexture(stdMat, 2, out fresnelParameters, babylonScene);               // Specular
-                babylonMaterial.emissiveTexture = ExportTexture(stdMat, 5, out fresnelParameters, babylonScene);               // Emissive
-                if (fresnelParameters != null)
-                {
-                    babylonMaterial.emissiveFresnelParameters = fresnelParameters;
-                    if (babylonMaterial.emissive[0] == 0 &&
-                        babylonMaterial.emissive[1] == 0 &&
-                        babylonMaterial.emissive[2] == 0 &&
-                        babylonMaterial.emissiveTexture == null)
-                    {
-                        babylonMaterial.emissive = new float[] { 1, 1, 1 };
-                    }
-                }
-
-                babylonMaterial.opacityTexture = ExportTexture(stdMat, 6, out fresnelParameters, babylonScene, false, true);   // Opacity
-                if (fresnelParameters != null)
-                {
-                    babylonMaterial.opacityFresnelParameters = fresnelParameters;
-                    if (babylonMaterial.alpha == 1 &&
-                         babylonMaterial.opacityTexture == null)
-                    {
-                        babylonMaterial.alpha = 0;
-                    }
-                }
-
-                babylonMaterial.bumpTexture = ExportTexture(stdMat, 8, out fresnelParameters, babylonScene);                   // Bump
-                babylonMaterial.reflectionTexture = ExportTexture(stdMat, 9, out fresnelParameters, babylonScene, true);       // Reflection
-                if (fresnelParameters != null)
-                {
-                    if (babylonMaterial.reflectionTexture == null)
-                    {
-                        RaiseWarning("Fallout cannot be used with reflection channel without a texture", 2);
-                    }
-                    else
-                    {
-                        babylonMaterial.reflectionFresnelParameters = fresnelParameters;
-                    }
-                }
-
-                // Constraints
-                if (babylonMaterial.diffuseTexture != null)
-                {
-                    babylonMaterial.diffuse = new[] { 1.0f, 1.0f, 1.0f };
-                }
-
-                if (babylonMaterial.emissiveTexture != null)
-                {
-                    babylonMaterial.emissive = new float[] { 0, 0, 0 };
-                }
-
-                if (babylonMaterial.opacityTexture != null && babylonMaterial.diffuseTexture != null &&
-                    babylonMaterial.diffuseTexture.name == babylonMaterial.opacityTexture.name &&
-                    babylonMaterial.diffuseTexture.hasAlpha && !babylonMaterial.opacityTexture.getAlphaFromRGB)
-                {
-                    // This is a alpha testing purpose
-                    babylonMaterial.opacityTexture = null;
-                    babylonMaterial.diffuseTexture.hasAlpha = true;
-                    RaiseWarning("Opacity texture was removed because alpha from diffuse texture can be use instead", 2);
-                    RaiseWarning("If you do not want this behavior, just set Alpha Source = None on your diffuse texture", 2);
-                }
-            }
-
-            babylonScene.MaterialsList.Add(babylonMaterial);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Autodesk.Max;
+using BabylonExport.Entities;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        readonly List<IIGameMaterial> referencedMaterials = new List<IIGameMaterial>();
+
+        private void ExportMaterial(IIGameMaterial materialNode, BabylonScene babylonScene)
+        {
+            var name = materialNode.MaterialName;
+            var id = materialNode.MaxMaterial.GetGuid().ToString();
+
+            RaiseMessage(name, 1);
+
+            if (materialNode.SubMaterialCount > 0)
+            {
+                var babylonMultimaterial = new BabylonMultiMaterial { name = name, id = id };
+
+                var guids = new List<string>();
+
+                for (var index = 0; index < materialNode.SubMaterialCount; index++)
+                {
+                    var subMat = materialNode.GetSubMaterial(index);
+
+                    if (subMat != null)
+                    {
+                        guids.Add(subMat.MaxMaterial.GetGuid().ToString());
+
+                        if (!referencedMaterials.Contains(subMat))
+                        {
+                            referencedMaterials.Add(subMat);
+                            ExportMaterial(subMat, babylonScene);
+                        }
+                    }
+                    else
+                    {
+                        guids.Add(Guid.Empty.ToString());
+                    }
+                }
+
+                babylonMultimaterial.materials = guids.ToArray();
+
+                babylonScene.MultiMaterialsList.Add(babylonMultimaterial);
+                return;
+            }
+
+            var babylonMaterial = new BabylonMaterial
+            {
+                name = name,
+                id = id,
+                ambient = materialNode.MaxMaterial.GetAmbient(0, false).ToArray(),
+                diffuse = materialNode.MaxMaterial.GetDiffuse(0, false).ToArray(),
+                specular = materialNode.MaxMaterial.GetSpecular(0, false).Scale(materialNode.MaxMaterial.GetShinStr(0, false)),
+                specularPower = materialNode.MaxMaterial.GetShininess(0, false) * 256,
+                emissive =
+                    materialNode.MaxMaterial.GetSelfIllumColorOn(0, false)
+                        ? materialNode.MaxMaterial.GetSelfIllumColor(0, false).ToArray()
+                        : materialNode.MaxMaterial.GetDiffuse(0, false).Scale(materialNode.MaxMaterial.GetSelfIllum(0, false)),
+                alpha = 1.0f - materialNode.MaxMaterial.GetXParency(0, false)
+            };
+
+
+            var stdMat = materialNode.MaxMaterial.GetParamBlock(0).Owner as IStdMat2;
+
+            if (stdMat != null)
+            {
+                babylonMaterial.backFaceCulling = !stdMat.TwoSided;
+                babylonMaterial.wireframe = stdMat.Wire;
+
+                // Textures
+                BabylonFresnelParameters fresnelParameters;
+
+                babylonMaterial.ambientTexture = ExportTexture(stdMat, 0, out fresnelParameters, babylonScene);                // Ambient
+                babylonMaterial.diffuseTexture = ExportTexture(stdMat, 1, out fresnelParameters, babylonScene);                // Diffuse
+                if (fresnelParameters != null)
+                {
+                    babylonMaterial.diffuseFresnelParameters = fresnelParameters;
+                }
+
+                babylonMaterial.specularTexture = ExportTexture(stdMat, 2, out fresnelParameters, babylonScene);               // Specular
+                babylonMaterial.emissiveTexture = ExportTexture(stdMat, 5, out fresnelParameters, babylonScene);               // Emissive
+                if (fresnelParameters != null)
+                {
+                    babylonMaterial.emissiveFresnelParameters = fresnelParameters;
+                    if (babylonMaterial.emissive[0] == 0 &&
+                        babylonMaterial.emissive[1] == 0 &&
+                        babylonMaterial.emissive[2] == 0 &&
+                        babylonMaterial.emissiveTexture == null)
+                    {
+                        babylonMaterial.emissive = new float[] { 1, 1, 1 };
+                    }
+                }
+
+                babylonMaterial.opacityTexture = ExportTexture(stdMat, 6, out fresnelParameters, babylonScene, false, true);   // Opacity
+                if (fresnelParameters != null)
+                {
+                    babylonMaterial.opacityFresnelParameters = fresnelParameters;
+                    if (babylonMaterial.alpha == 1 &&
+                         babylonMaterial.opacityTexture == null)
+                    {
+                        babylonMaterial.alpha = 0;
+                    }
+                }
+
+                babylonMaterial.bumpTexture = ExportTexture(stdMat, 8, out fresnelParameters, babylonScene);                   // Bump
+                babylonMaterial.reflectionTexture = ExportTexture(stdMat, 9, out fresnelParameters, babylonScene, true);       // Reflection
+                if (fresnelParameters != null)
+                {
+                    if (babylonMaterial.reflectionTexture == null)
+                    {
+                        RaiseWarning("Fallout cannot be used with reflection channel without a texture", 2);
+                    }
+                    else
+                    {
+                        babylonMaterial.reflectionFresnelParameters = fresnelParameters;
+                    }
+                }
+
+                // Constraints
+                if (babylonMaterial.diffuseTexture != null)
+                {
+                    babylonMaterial.diffuse = new[] { 1.0f, 1.0f, 1.0f };
+                }
+
+                if (babylonMaterial.emissiveTexture != null)
+                {
+                    babylonMaterial.emissive = new float[] { 0, 0, 0 };
+                }
+
+                if (babylonMaterial.opacityTexture != null && babylonMaterial.diffuseTexture != null &&
+                    babylonMaterial.diffuseTexture.name == babylonMaterial.opacityTexture.name &&
+                    babylonMaterial.diffuseTexture.hasAlpha && !babylonMaterial.opacityTexture.getAlphaFromRGB)
+                {
+                    // This is a alpha testing purpose
+                    babylonMaterial.opacityTexture = null;
+                    babylonMaterial.diffuseTexture.hasAlpha = true;
+                    RaiseWarning("Opacity texture was removed because alpha from diffuse texture can be use instead", 2);
+                    RaiseWarning("If you do not want this behavior, just set Alpha Source = None on your diffuse texture", 2);
+                }
+            }
+
+            babylonScene.MaterialsList.Add(babylonMaterial);
+        }
+    }
+}

File diff ditekan karena terlalu besar
+ 726 - 726
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Mesh.cs


+ 66 - 65
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.ShadowGenerator.cs

@@ -1,65 +1,66 @@
-using System.Collections.Generic;
-using Autodesk.Max;
-using BabylonExport.Entities;
-
-namespace Max2Babylon
-{
-    partial class BabylonExporter
-    {
-        private BabylonShadowGenerator ExportShadowGenerator(IINode lightNode, BabylonScene babylonScene)
-        {
-            var maxLight = (lightNode.ObjectRef as ILightObject);
-            var babylonShadowGenerator = new BabylonShadowGenerator();
-
-            RaiseMessage("Exporting shadow map", 2);
-
-            babylonShadowGenerator.lightId = lightNode.GetGuid().ToString();
-
-            babylonShadowGenerator.mapSize = maxLight.GetMapSize(0, Tools.Forever);
-
-            babylonShadowGenerator.bias = lightNode.GetFloatProperty("babylonjs_shadows_bias", 0.00005f);
-
-            var shadowsType = lightNode.GetStringProperty("babylonjs_shadows_type", "Blurred Variance");
-
-            switch (shadowsType)
-            {
-                case "Hard shadows":
-                    break;
-                case "Poisson Sampling":
-                    babylonShadowGenerator.usePoissonSampling = true;
-                    break;
-                case "Variance":
-                    babylonShadowGenerator.useVarianceShadowMap = true;
-                    break;
-                case"Blurred Variance":
-                    babylonShadowGenerator.useBlurVarianceShadowMap = true;
-                    babylonShadowGenerator.blurScale = lightNode.GetFloatProperty("babylonjs_shadows_blurScale", 2);
-                    babylonShadowGenerator.blurBoxOffset = lightNode.GetFloatProperty("babylonjs_shadows_blurBoxOffset", 1);
-                    break;
-            }
-
-            
-            var list = new List<string>();
-
-            var inclusion = maxLight.ExclList.TestFlag(1); //NT_INCLUDE 
-            var checkExclusionList = maxLight.ExclList.TestFlag(4); //NT_AFFECT_SHADOWCAST 
-
-            foreach (var meshNode in Loader.Core.RootNode.NodesListBySuperClass(SClass_ID.Geomobject))
-            {
-                if (meshNode.CastShadows == 1)
-                {
-                    var inList = maxLight.ExclList.FindNode(meshNode) != -1;
-
-                    if (!checkExclusionList || (inList && inclusion) || (!inList && !inclusion))
-                    {
-                        list.Add(meshNode.GetGuid().ToString());
-                    }
-                }
-            }
-            babylonShadowGenerator.renderList = list.ToArray();
-
-            babylonScene.ShadowGeneratorsList.Add(babylonShadowGenerator);
-            return babylonShadowGenerator;
-        }
-    }
-}
+using System.Collections.Generic;
+using Autodesk.Max;
+using BabylonExport.Entities;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        private BabylonShadowGenerator ExportShadowGenerator(IINode lightNode, BabylonScene babylonScene)
+        {
+            var maxLight = (lightNode.ObjectRef as ILightObject);
+            var babylonShadowGenerator = new BabylonShadowGenerator();
+
+            RaiseMessage("Exporting shadow map", 2);
+
+            babylonShadowGenerator.lightId = lightNode.GetGuid().ToString();
+
+            babylonShadowGenerator.mapSize = maxLight.GetMapSize(0, Tools.Forever);
+
+            babylonShadowGenerator.bias = lightNode.GetFloatProperty("babylonjs_shadows_bias", 0.00005f);
+            babylonShadowGenerator.forceBackFacesOnly = lightNode.GetBoolProperty("babylonjs_forcebackfaces");
+
+            var shadowsType = lightNode.GetStringProperty("babylonjs_shadows_type", "Blurred Variance");
+
+            switch (shadowsType)
+            {
+                case "Hard shadows":
+                    break;
+                case "Poisson Sampling":
+                    babylonShadowGenerator.usePoissonSampling = true;
+                    break;
+                case "Variance":
+                    babylonShadowGenerator.useVarianceShadowMap = true;
+                    break;
+                case"Blurred Variance":
+                    babylonShadowGenerator.useBlurVarianceShadowMap = true;
+                    babylonShadowGenerator.blurScale = lightNode.GetFloatProperty("babylonjs_shadows_blurScale", 2);
+                    babylonShadowGenerator.blurBoxOffset = lightNode.GetFloatProperty("babylonjs_shadows_blurBoxOffset", 1);
+                    break;
+            }
+
+            
+            var list = new List<string>();
+
+            var inclusion = maxLight.ExclList.TestFlag(1); //NT_INCLUDE 
+            var checkExclusionList = maxLight.ExclList.TestFlag(4); //NT_AFFECT_SHADOWCAST 
+
+            foreach (var meshNode in Loader.Core.RootNode.NodesListBySuperClass(SClass_ID.Geomobject))
+            {
+                if (meshNode.CastShadows == 1)
+                {
+                    var inList = maxLight.ExclList.FindNode(meshNode) != -1;
+
+                    if (!checkExclusionList || (inList && inclusion) || (!inList && !inclusion))
+                    {
+                        list.Add(meshNode.GetGuid().ToString());
+                    }
+                }
+            }
+            babylonShadowGenerator.renderList = list.ToArray();
+
+            babylonScene.ShadowGeneratorsList.Add(babylonShadowGenerator);
+            return babylonShadowGenerator;
+        }
+    }
+}

+ 134 - 134
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Skeleton.cs

@@ -1,134 +1,134 @@
-using System;
-using System.Collections.Generic;
-using Autodesk.Max;
-using BabylonExport.Entities;
-using SharpDX;
-
-namespace Max2Babylon
-{
-    internal class BonePoseInfo
-    {
-        public IGMatrix AbsoluteTransform { get; set; }
-        public IGMatrix LocalTransform { get; set; }
-    }
-    partial class BabylonExporter
-    {
-        readonly List<IIGameSkin> skins = new List<IIGameSkin>();
-        readonly List<IIGameNode> skinnedNodes = new List<IIGameNode>();
-
-        IGMatrix WithNoScale(IGMatrix mat)
-        {
-            var mat3 = mat.ExtractMatrix3();
-            mat3.NoScale();
-            return Loader.Global.GMatrix.Create(mat3);
-        }
-        private void ExportSkin(IIGameSkin skin, BabylonScene babylonScene)
-        {
-            var babylonSkeleton = new BabylonSkeleton { id = skins.IndexOf(skin) };
-            babylonSkeleton.name = "skeleton #" + babylonSkeleton.id;
-
-            RaiseMessage(babylonSkeleton.name, 1);
-
-            var skinIndex = skins.IndexOf(skin);
-            var meshNode = skinnedNodes[skinIndex];
-            var skinInitMatrix = meshNode.GetObjectTM(0);
-
-            var bones = new List<BabylonBone>();
-            var gameBones = new List<IIGameNode>();
-            var boneIds = new List<int>();
-            var bindPoseInfos = new List<BonePoseInfo>();
-            for(int i = 0; i < skin.TotalSkinBoneCount; ++i)
-            {
-                bones.Add(null);
-                gameBones.Add(null);
-                boneIds.Add(-1);
-                bindPoseInfos.Add(null);
-            }
-            for (var index = 0; index < skin.TotalSkinBoneCount; index++)
-            {
-                var gameBone = skin.GetIGameBone(index, false);
-
-                var sortedIndex = skinSortedBones[skin].IndexOf(gameBone.NodeID);
-
-                gameBones[sortedIndex] = (gameBone);
-                boneIds[sortedIndex] =(gameBone.NodeID);
-                bones[sortedIndex]=(new BabylonBone { index = sortedIndex, name = gameBone.Name });
-
-                var boneInitMatrix = gameBone.GetObjectTM(0);
-                bindPoseInfos[sortedIndex] = (new BonePoseInfo { AbsoluteTransform = boneInitMatrix });
-            }
-
-            // fix hierarchy an generate animation keys
-            var exportNonOptimizedAnimations = Loader.Core.RootNode.GetBoolProperty("babylonjs_exportnonoptimizedanimations");
-
-            for (var index = 0; index < skin.TotalSkinBoneCount; index++)
-            {
-                var gameBone = gameBones[index];
-                var parent = gameBone.NodeParent;
-                var babBone = bones[index];
-                if (parent != null)
-                {
-                    babBone.parentBoneIndex = boneIds.IndexOf(parent.NodeID);
-                }
-                if (babBone.parentBoneIndex == -1)
-                {
-                    bindPoseInfos[index].LocalTransform = bindPoseInfos[index].AbsoluteTransform.Multiply(skinInitMatrix.Inverse);
-                }
-                else
-                {
-                    var parentBindPoseInfos = bindPoseInfos[babBone.parentBoneIndex];
-                    bindPoseInfos[index].LocalTransform = bindPoseInfos[index].AbsoluteTransform.Multiply(parentBindPoseInfos.AbsoluteTransform.Inverse);
-                }
-                babBone.matrix = bindPoseInfos[index].LocalTransform.ToArray();
-
-                var babylonAnimation = new BabylonAnimation
-                {
-                    name = gameBone.Name + "Animation",
-                    property = "_matrix",
-                    dataType = (int)BabylonAnimation.DataType.Matrix,
-                    loopBehavior = (int)BabylonAnimation.LoopBehavior.Cycle,
-                    framePerSecond = Loader.Global.FrameRate
-                };
-
-                var start = Loader.Core.AnimRange.Start;
-                var end = Loader.Core.AnimRange.End;
-
-                float[] previous = null;
-                var keys = new List<BabylonAnimationKey>();
-                for (var key = start; key <= end; key += Ticks)
-                {
-                    var objectTM = gameBone.GetObjectTM(key);
-                    var parentNode = gameBone.NodeParent;
-                    IGMatrix mat;
-                    if (parentNode == null || babBone.parentBoneIndex == -1)
-                    {
-                        mat = objectTM.Multiply(meshNode.GetObjectTM(key).Inverse);
-                    }
-                    else
-                    {
-                        mat = objectTM.Multiply(parentNode.GetObjectTM(key).Inverse);
-                    }
-
-                    var current = mat.ToArray();
-                    if (key == start || key == end || exportNonOptimizedAnimations || !(previous.IsEqualTo(current)))
-                    {
-                        keys.Add(new BabylonAnimationKey
-                        {
-                            frame = key / Ticks,
-                            values = current
-                        });
-                    }
-
-                    previous = current;
-                }
-
-                babylonAnimation.keys = keys.ToArray();
-                babBone.animation = babylonAnimation;
-            }
-
-            babylonSkeleton.bones = bones.ToArray();
-
-            babylonScene.SkeletonsList.Add(babylonSkeleton);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Autodesk.Max;
+using BabylonExport.Entities;
+using SharpDX;
+
+namespace Max2Babylon
+{
+    internal class BonePoseInfo
+    {
+        public IGMatrix AbsoluteTransform { get; set; }
+        public IGMatrix LocalTransform { get; set; }
+    }
+    partial class BabylonExporter
+    {
+        readonly List<IIGameSkin> skins = new List<IIGameSkin>();
+        readonly List<IIGameNode> skinnedNodes = new List<IIGameNode>();
+
+        IGMatrix WithNoScale(IGMatrix mat)
+        {
+            var mat3 = mat.ExtractMatrix3();
+            mat3.NoScale();
+            return Loader.Global.GMatrix.Create(mat3);
+        }
+        private void ExportSkin(IIGameSkin skin, BabylonScene babylonScene)
+        {
+            var babylonSkeleton = new BabylonSkeleton { id = skins.IndexOf(skin) };
+            babylonSkeleton.name = "skeleton #" + babylonSkeleton.id;
+
+            RaiseMessage(babylonSkeleton.name, 1);
+
+            var skinIndex = skins.IndexOf(skin);
+            var meshNode = skinnedNodes[skinIndex];
+            var skinInitMatrix = meshNode.GetObjectTM(0);
+
+            var bones = new List<BabylonBone>();
+            var gameBones = new List<IIGameNode>();
+            var boneIds = new List<int>();
+            var bindPoseInfos = new List<BonePoseInfo>();
+            for(int i = 0; i < skin.TotalSkinBoneCount; ++i)
+            {
+                bones.Add(null);
+                gameBones.Add(null);
+                boneIds.Add(-1);
+                bindPoseInfos.Add(null);
+            }
+            for (var index = 0; index < skin.TotalSkinBoneCount; index++)
+            {
+                var gameBone = skin.GetIGameBone(index, false);
+
+                var sortedIndex = skinSortedBones[skin].IndexOf(gameBone.NodeID);
+
+                gameBones[sortedIndex] = (gameBone);
+                boneIds[sortedIndex] =(gameBone.NodeID);
+                bones[sortedIndex]=(new BabylonBone { index = sortedIndex, name = gameBone.Name });
+
+                var boneInitMatrix = gameBone.GetObjectTM(0);
+                bindPoseInfos[sortedIndex] = (new BonePoseInfo { AbsoluteTransform = boneInitMatrix });
+            }
+
+            // fix hierarchy an generate animation keys
+            var exportNonOptimizedAnimations = Loader.Core.RootNode.GetBoolProperty("babylonjs_exportnonoptimizedanimations");
+
+            for (var index = 0; index < skin.TotalSkinBoneCount; index++)
+            {
+                var gameBone = gameBones[index];
+                var parent = gameBone.NodeParent;
+                var babBone = bones[index];
+                if (parent != null)
+                {
+                    babBone.parentBoneIndex = boneIds.IndexOf(parent.NodeID);
+                }
+                if (babBone.parentBoneIndex == -1)
+                {
+                    bindPoseInfos[index].LocalTransform = bindPoseInfos[index].AbsoluteTransform.Multiply(skinInitMatrix.Inverse);
+                }
+                else
+                {
+                    var parentBindPoseInfos = bindPoseInfos[babBone.parentBoneIndex];
+                    bindPoseInfos[index].LocalTransform = bindPoseInfos[index].AbsoluteTransform.Multiply(parentBindPoseInfos.AbsoluteTransform.Inverse);
+                }
+                babBone.matrix = bindPoseInfos[index].LocalTransform.ToArray();
+
+                var babylonAnimation = new BabylonAnimation
+                {
+                    name = gameBone.Name + "Animation",
+                    property = "_matrix",
+                    dataType = (int)BabylonAnimation.DataType.Matrix,
+                    loopBehavior = (int)BabylonAnimation.LoopBehavior.Cycle,
+                    framePerSecond = Loader.Global.FrameRate
+                };
+
+                var start = Loader.Core.AnimRange.Start;
+                var end = Loader.Core.AnimRange.End;
+
+                float[] previous = null;
+                var keys = new List<BabylonAnimationKey>();
+                for (var key = start; key <= end; key += Ticks)
+                {
+                    var objectTM = gameBone.GetObjectTM(key);
+                    var parentNode = gameBone.NodeParent;
+                    IGMatrix mat;
+                    if (parentNode == null || babBone.parentBoneIndex == -1)
+                    {
+                        mat = objectTM.Multiply(meshNode.GetObjectTM(key).Inverse);
+                    }
+                    else
+                    {
+                        mat = objectTM.Multiply(parentNode.GetObjectTM(key).Inverse);
+                    }
+
+                    var current = mat.ToArray();
+                    if (key == start || key == end || exportNonOptimizedAnimations || !(previous.IsEqualTo(current)))
+                    {
+                        keys.Add(new BabylonAnimationKey
+                        {
+                            frame = key / Ticks,
+                            values = current
+                        });
+                    }
+
+                    previous = current;
+                }
+
+                babylonAnimation.keys = keys.ToArray();
+                babBone.animation = babylonAnimation;
+            }
+
+            babylonSkeleton.bones = bones.ToArray();
+
+            babylonScene.SkeletonsList.Add(babylonSkeleton);
+        }
+    }
+}

+ 244 - 244
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs

@@ -1,244 +1,244 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Autodesk.Max;
-using BabylonExport.Entities;
-
-namespace Max2Babylon
-{
-    partial class BabylonExporter
-    {
-        bool IsTextureCube(string filepath)
-        {
-            try
-            {
-                if (Path.GetExtension(filepath).ToLower() != ".dds")
-                {
-                    return false;
-                }
-
-                var data = File.ReadAllBytes(filepath);
-                var intArray = new int[data.Length / 4];
-
-                Buffer.BlockCopy(data, 0, intArray, 0, intArray.Length * 4);
-
-
-                int width = intArray[4];
-                int height = intArray[3];
-                int mipmapsCount = intArray[7];
-
-                if ((width >> (mipmapsCount - 1)) > 1)
-                {
-                    var expected = 1;
-                    var currentSize = Math.Max(width, height);
-
-                    while (currentSize > 1)
-                    {
-                        currentSize = currentSize >> 1;
-                        expected++;
-                    }
-
-                    RaiseWarning(string.Format("Mipmaps chain is not complete: {0} maps instead of {1} (based on texture max size: {2})", mipmapsCount, expected, width), 2);
-                    RaiseWarning(string.Format("You must generate a complete mipmaps chain for .dds)"), 2);
-                    RaiseWarning(string.Format("Mipmaps will be disabled for this texture. If you want automatic texture generation you cannot use a .dds)"), 2);
-                }
-
-                bool isCube = (intArray[28] & 0x200) == 0x200;
-
-                return isCube;
-            }
-            catch
-            {
-                return false;
-            }
-        }
-
-        private BabylonTexture ExportTexture(IStdMat2 stdMat, int index, out BabylonFresnelParameters fresnelParameters, BabylonScene babylonScene, bool allowCube = false, bool forceAlpha = false)
-        {
-            fresnelParameters = null;
-
-            if (!stdMat.MapEnabled(index))
-            {
-                return null;
-            }
-            var babylonTexture = new BabylonTexture();
-
-            var texMap = stdMat.GetSubTexmap(index);
-
-            if (texMap == null)
-            {
-                RaiseWarning("Texture channel " + index + " activated but no texture found.");
-                return null;
-            }
-
-            // Fallout
-            if (texMap.ClassName == "Falloff") // This is the only way I found to detect it. This is crappy but it works
-            {
-                fresnelParameters = new BabylonFresnelParameters();
-
-                var paramBlock = texMap.GetParamBlock(0);
-                var color1 = paramBlock.GetColor(0, 0, 0);
-                var color2 = paramBlock.GetColor(4, 0, 0);
-
-                fresnelParameters.isEnabled = true;
-                fresnelParameters.leftColor = color2.ToArray();
-                fresnelParameters.rightColor = color1.ToArray();
-
-                if (paramBlock.GetInt(8, 0, 0) == 2)
-                {
-                    fresnelParameters.power = paramBlock.GetFloat(12, 0, 0);
-                }
-                else
-                {
-                    fresnelParameters.power = 1;
-                }
-                var texMap1 = paramBlock.GetTexmap(2, 0, 0);
-                var texMap1On = paramBlock.GetInt(3, 0, 0);
-
-                var texMap2 = paramBlock.GetTexmap(6, 0, 0);
-                var texMap2On = paramBlock.GetInt(7, 0, 0);
-
-                if (texMap1 != null && texMap1On != 0)
-                {
-                    texMap = texMap1;
-                    fresnelParameters.rightColor = new float[] { 1, 1, 1 };
-
-                    if (texMap2 != null && texMap2On != 0)
-                    {
-                        RaiseWarning(string.Format("You cannot specify two textures for falloff. Only one is supported"), 2);
-                    }
-                }
-                else if (texMap2 != null && texMap2On != 0)
-                {
-                    fresnelParameters.leftColor = new float[] { 1, 1, 1 };
-                    texMap = texMap2;
-                }
-                else
-                {
-                    return null;
-                }
-            }
-
-            // Bitmap
-            var texture = texMap.GetParamBlock(0).Owner as IBitmapTex;
-
-            if (texture == null)
-            {
-                return null;
-            }
-
-            if (forceAlpha)
-            {
-                babylonTexture.hasAlpha = true;
-                babylonTexture.getAlphaFromRGB = (texture.AlphaSource == 2) || (texture.AlphaSource == 3);
-            }
-            else
-            {
-                babylonTexture.hasAlpha = (texture.AlphaSource != 3);
-                babylonTexture.getAlphaFromRGB = (texture.AlphaSource == 2);
-            }
-
-
-            babylonTexture.level = stdMat.GetTexmapAmt(index, 0);
-
-            var uvGen = texture.UVGen;
-
-            switch (uvGen.GetCoordMapping(0))
-            {
-                case 1: //MAP_SPHERICAL
-                    babylonTexture.coordinatesMode = 1;
-                    break;
-                case 2: //MAP_PLANAR
-                    babylonTexture.coordinatesMode = 2;
-                    break;
-                default:
-                    babylonTexture.coordinatesMode = 0;
-                    break;
-            }
-
-            babylonTexture.coordinatesIndex = uvGen.MapChannel - 1;
-            if (uvGen.MapChannel > 2)
-            {
-                RaiseWarning(string.Format("Unsupported map channel, Only channel 1 and 2 are supported."), 2);
-            }
-
-            babylonTexture.uOffset = uvGen.GetUOffs(0);
-            babylonTexture.vOffset = uvGen.GetVOffs(0);
-
-            babylonTexture.uScale = uvGen.GetUScl(0);
-            babylonTexture.vScale = uvGen.GetVScl(0);
-
-            if (Path.GetExtension(texture.MapName).ToLower() == ".dds")
-            {
-                babylonTexture.vScale *= -1; // Need to invert Y-axis for DDS texture
-            }
-
-            babylonTexture.uAng = uvGen.GetUAng(0);
-            babylonTexture.vAng = uvGen.GetVAng(0);
-            babylonTexture.wAng = uvGen.GetWAng(0);
-
-            babylonTexture.wrapU = 0; // CLAMP
-            if ((uvGen.TextureTiling & 1) != 0) // WRAP
-            {
-                babylonTexture.wrapU = 1;
-            }
-            else if ((uvGen.TextureTiling & 4) != 0) // MIRROR
-            {
-                babylonTexture.wrapU = 2;
-            }
-
-            babylonTexture.wrapV = 0; // CLAMP
-            if ((uvGen.TextureTiling & 2) != 0) // WRAP
-            {
-                babylonTexture.wrapV = 1;
-            }
-            else if ((uvGen.TextureTiling & 8) != 0) // MIRROR
-            {
-                babylonTexture.wrapV = 2;
-            }
-
-            babylonTexture.name = Path.GetFileName(texture.MapName);
-
-            // Animations
-            var animations = new List<BabylonAnimation>();
-            ExportFloatAnimation("uOffset", animations, key => new[] { uvGen.GetUOffs(key) });
-            ExportFloatAnimation("vOffset", animations, key => new[] { uvGen.GetVOffs(key) });
-            ExportFloatAnimation("uScale", animations, key => new[] { uvGen.GetUScl(key) });
-            ExportFloatAnimation("vScale", animations, key => new[] { uvGen.GetVScl(key) });
-            ExportFloatAnimation("uAng", animations, key => new[] { uvGen.GetUAng(key) });
-            ExportFloatAnimation("vAng", animations, key => new[] { uvGen.GetVAng(key) });
-            ExportFloatAnimation("wAng", animations, key => new[] { uvGen.GetWAng(key) });
-
-            babylonTexture.animations = animations.ToArray();
-            var absolutePath = texture.Map.FullFilePath;
-            // Copy texture to output
-            try
-            {
-                if (File.Exists(absolutePath))
-                {
-                    babylonTexture.isCube = IsTextureCube(absolutePath);
-                    if (CopyTexturesToOutput)
-                    {
-                        File.Copy(absolutePath, Path.Combine(babylonScene.OutputPath, babylonTexture.name), true);
-                    }
-                }
-                else
-                {
-                    RaiseWarning(string.Format("Texture {0} not found.", babylonTexture.name), 2);
-                }
-
-            }
-            catch
-            {
-                // silently fails
-            }
-
-            if (babylonTexture.isCube && !allowCube)
-            {
-                RaiseWarning(string.Format("Cube texture are only supported for reflection channel"), 2);
-            }
-
-            return babylonTexture;
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.IO;
+using Autodesk.Max;
+using BabylonExport.Entities;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        bool IsTextureCube(string filepath)
+        {
+            try
+            {
+                if (Path.GetExtension(filepath).ToLower() != ".dds")
+                {
+                    return false;
+                }
+
+                var data = File.ReadAllBytes(filepath);
+                var intArray = new int[data.Length / 4];
+
+                Buffer.BlockCopy(data, 0, intArray, 0, intArray.Length * 4);
+
+
+                int width = intArray[4];
+                int height = intArray[3];
+                int mipmapsCount = intArray[7];
+
+                if ((width >> (mipmapsCount - 1)) > 1)
+                {
+                    var expected = 1;
+                    var currentSize = Math.Max(width, height);
+
+                    while (currentSize > 1)
+                    {
+                        currentSize = currentSize >> 1;
+                        expected++;
+                    }
+
+                    RaiseWarning(string.Format("Mipmaps chain is not complete: {0} maps instead of {1} (based on texture max size: {2})", mipmapsCount, expected, width), 2);
+                    RaiseWarning(string.Format("You must generate a complete mipmaps chain for .dds)"), 2);
+                    RaiseWarning(string.Format("Mipmaps will be disabled for this texture. If you want automatic texture generation you cannot use a .dds)"), 2);
+                }
+
+                bool isCube = (intArray[28] & 0x200) == 0x200;
+
+                return isCube;
+            }
+            catch
+            {
+                return false;
+            }
+        }
+
+        private BabylonTexture ExportTexture(IStdMat2 stdMat, int index, out BabylonFresnelParameters fresnelParameters, BabylonScene babylonScene, bool allowCube = false, bool forceAlpha = false)
+        {
+            fresnelParameters = null;
+
+            if (!stdMat.MapEnabled(index))
+            {
+                return null;
+            }
+            var babylonTexture = new BabylonTexture();
+
+            var texMap = stdMat.GetSubTexmap(index);
+
+            if (texMap == null)
+            {
+                RaiseWarning("Texture channel " + index + " activated but no texture found.");
+                return null;
+            }
+
+            // Fallout
+            if (texMap.ClassName == "Falloff") // This is the only way I found to detect it. This is crappy but it works
+            {
+                fresnelParameters = new BabylonFresnelParameters();
+
+                var paramBlock = texMap.GetParamBlock(0);
+                var color1 = paramBlock.GetColor(0, 0, 0);
+                var color2 = paramBlock.GetColor(4, 0, 0);
+
+                fresnelParameters.isEnabled = true;
+                fresnelParameters.leftColor = color2.ToArray();
+                fresnelParameters.rightColor = color1.ToArray();
+
+                if (paramBlock.GetInt(8, 0, 0) == 2)
+                {
+                    fresnelParameters.power = paramBlock.GetFloat(12, 0, 0);
+                }
+                else
+                {
+                    fresnelParameters.power = 1;
+                }
+                var texMap1 = paramBlock.GetTexmap(2, 0, 0);
+                var texMap1On = paramBlock.GetInt(3, 0, 0);
+
+                var texMap2 = paramBlock.GetTexmap(6, 0, 0);
+                var texMap2On = paramBlock.GetInt(7, 0, 0);
+
+                if (texMap1 != null && texMap1On != 0)
+                {
+                    texMap = texMap1;
+                    fresnelParameters.rightColor = new float[] { 1, 1, 1 };
+
+                    if (texMap2 != null && texMap2On != 0)
+                    {
+                        RaiseWarning(string.Format("You cannot specify two textures for falloff. Only one is supported"), 2);
+                    }
+                }
+                else if (texMap2 != null && texMap2On != 0)
+                {
+                    fresnelParameters.leftColor = new float[] { 1, 1, 1 };
+                    texMap = texMap2;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+
+            // Bitmap
+            var texture = texMap.GetParamBlock(0).Owner as IBitmapTex;
+
+            if (texture == null)
+            {
+                return null;
+            }
+
+            if (forceAlpha)
+            {
+                babylonTexture.hasAlpha = true;
+                babylonTexture.getAlphaFromRGB = (texture.AlphaSource == 2) || (texture.AlphaSource == 3);
+            }
+            else
+            {
+                babylonTexture.hasAlpha = (texture.AlphaSource != 3);
+                babylonTexture.getAlphaFromRGB = (texture.AlphaSource == 2);
+            }
+
+
+            babylonTexture.level = stdMat.GetTexmapAmt(index, 0);
+
+            var uvGen = texture.UVGen;
+
+            switch (uvGen.GetCoordMapping(0))
+            {
+                case 1: //MAP_SPHERICAL
+                    babylonTexture.coordinatesMode = 1;
+                    break;
+                case 2: //MAP_PLANAR
+                    babylonTexture.coordinatesMode = 2;
+                    break;
+                default:
+                    babylonTexture.coordinatesMode = 0;
+                    break;
+            }
+
+            babylonTexture.coordinatesIndex = uvGen.MapChannel - 1;
+            if (uvGen.MapChannel > 2)
+            {
+                RaiseWarning(string.Format("Unsupported map channel, Only channel 1 and 2 are supported."), 2);
+            }
+
+            babylonTexture.uOffset = uvGen.GetUOffs(0);
+            babylonTexture.vOffset = uvGen.GetVOffs(0);
+
+            babylonTexture.uScale = uvGen.GetUScl(0);
+            babylonTexture.vScale = uvGen.GetVScl(0);
+
+            if (Path.GetExtension(texture.MapName).ToLower() == ".dds")
+            {
+                babylonTexture.vScale *= -1; // Need to invert Y-axis for DDS texture
+            }
+
+            babylonTexture.uAng = uvGen.GetUAng(0);
+            babylonTexture.vAng = uvGen.GetVAng(0);
+            babylonTexture.wAng = uvGen.GetWAng(0);
+
+            babylonTexture.wrapU = 0; // CLAMP
+            if ((uvGen.TextureTiling & 1) != 0) // WRAP
+            {
+                babylonTexture.wrapU = 1;
+            }
+            else if ((uvGen.TextureTiling & 4) != 0) // MIRROR
+            {
+                babylonTexture.wrapU = 2;
+            }
+
+            babylonTexture.wrapV = 0; // CLAMP
+            if ((uvGen.TextureTiling & 2) != 0) // WRAP
+            {
+                babylonTexture.wrapV = 1;
+            }
+            else if ((uvGen.TextureTiling & 8) != 0) // MIRROR
+            {
+                babylonTexture.wrapV = 2;
+            }
+
+            babylonTexture.name = Path.GetFileName(texture.MapName);
+
+            // Animations
+            var animations = new List<BabylonAnimation>();
+            ExportFloatAnimation("uOffset", animations, key => new[] { uvGen.GetUOffs(key) });
+            ExportFloatAnimation("vOffset", animations, key => new[] { uvGen.GetVOffs(key) });
+            ExportFloatAnimation("uScale", animations, key => new[] { uvGen.GetUScl(key) });
+            ExportFloatAnimation("vScale", animations, key => new[] { uvGen.GetVScl(key) });
+            ExportFloatAnimation("uAng", animations, key => new[] { uvGen.GetUAng(key) });
+            ExportFloatAnimation("vAng", animations, key => new[] { uvGen.GetVAng(key) });
+            ExportFloatAnimation("wAng", animations, key => new[] { uvGen.GetWAng(key) });
+
+            babylonTexture.animations = animations.ToArray();
+            var absolutePath = texture.Map.FullFilePath;
+            // Copy texture to output
+            try
+            {
+                if (File.Exists(absolutePath))
+                {
+                    babylonTexture.isCube = IsTextureCube(absolutePath);
+                    if (CopyTexturesToOutput)
+                    {
+                        File.Copy(absolutePath, Path.Combine(babylonScene.OutputPath, babylonTexture.name), true);
+                    }
+                }
+                else
+                {
+                    RaiseWarning(string.Format("Texture {0} not found.", babylonTexture.name), 2);
+                }
+
+            }
+            catch
+            {
+                // silently fails
+            }
+
+            if (babylonTexture.isCube && !allowCube)
+            {
+                RaiseWarning(string.Format("Cube texture are only supported for reflection channel"), 2);
+            }
+
+            return babylonTexture;
+        }
+    }
+}

+ 322 - 322
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.cs

@@ -1,322 +1,322 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.IO;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using Autodesk.Max;
-using BabylonExport.Entities;
-using Newtonsoft.Json;
-using Color = System.Drawing.Color;
-using System.Runtime.InteropServices;
-
-namespace Max2Babylon
-{
-    internal partial class BabylonExporter
-    {
-        public event Action<int> OnImportProgressChanged;
-        public event Action<string, int> OnWarning;
-        public event Action<string, Color, int, bool> OnMessage;
-        public event Action<string, int> OnError;
-
-        public bool AutoSave3dsMaxFile { get; set; }
-        public bool ExportHiddenObjects { get; set; }
-        public bool IsCancelled { get; set; }
-
-        public bool CopyTexturesToOutput { get; set; }
-
-        public string MaxSceneFileName { get; set; }
-
-        public bool ExportQuaternionsInsteadOfEulers { get; set; }
-
-        void ReportProgressChanged(int progress)
-        {
-            if (OnImportProgressChanged != null)
-            {
-                OnImportProgressChanged(progress);
-            }
-        }
-
-        void RaiseError(string error, int rank = 0)
-        {
-            if (OnError != null)
-            {
-                OnError(error, rank);
-            }
-        }
-
-        void RaiseWarning(string warning, int rank = 0)
-        {
-            if (OnWarning != null)
-            {
-                OnWarning(warning, rank);
-            }
-        }
-
-        void RaiseMessage(string message, int rank = 0, bool emphasis = false)
-        {
-            RaiseMessage(message, Color.Black, rank, emphasis);
-        }
-
-        void RaiseMessage(string message, Color color, int rank = 0, bool emphasis = false)
-        {
-            if (OnMessage != null)
-            {
-                OnMessage(message, color, rank, emphasis);
-            }
-        }
-
-        void CheckCancelled()
-        {
-            Application.DoEvents();
-            if (IsCancelled)
-            {
-                throw new OperationCanceledException();
-            }
-        }
-
-        public async Task ExportAsync(string outputFile, bool generateManifest, bool onlySelected, bool generateBinary, Form callerForm)
-        {
-            var gameConversionManger = Loader.Global.ConversionManager;
-            gameConversionManger.CoordSystem = Autodesk.Max.IGameConversionManager.CoordSystem.D3d;
-
-            var gameScene = Loader.Global.IGameInterface;
-            gameScene.InitialiseIGame(onlySelected);
-            gameScene.SetStaticFrame(0);
-
-            MaxSceneFileName = gameScene.SceneFileName;
-
-            IsCancelled = false;
-            RaiseMessage("Exportation started", Color.Blue);
-            ReportProgressChanged(0);
-            var babylonScene = new BabylonScene(Path.GetDirectoryName(outputFile));
-            var rawScene = Loader.Core.RootNode;
-
-            if (!Directory.Exists(babylonScene.OutputPath))
-            {
-                RaiseError("Exportation stopped: Output folder does not exist");
-                ReportProgressChanged(100);
-                return;
-            }
-
-            var watch = new Stopwatch();
-            watch.Start();
-
-            // Save scene
-            RaiseMessage("Saving 3ds max file");
-
-            if (AutoSave3dsMaxFile)
-            {
-                var forceSave = Loader.Core.FileSave;
-
-                if (callerForm != null)
-                {
-                    callerForm.BringToFront();
-                }
-            }
-
-            // Global
-            babylonScene.autoClear = true;
-            babylonScene.clearColor = Loader.Core.GetBackGround(0, Tools.Forever).ToArray();
-            babylonScene.ambientColor = Loader.Core.GetAmbient(0, Tools.Forever).ToArray();
-
-            babylonScene.gravity = rawScene.GetVector3Property("babylonjs_gravity");
-            ExportQuaternionsInsteadOfEulers = rawScene.GetBoolProperty("babylonjs_exportquaternions", 1);
-
-            // Sounds
-            var soundName = rawScene.GetStringProperty("babylonjs_sound_filename", "");
-
-            if (!string.IsNullOrEmpty(soundName))
-            {
-                var filename = Path.GetFileName(soundName);
-
-                var globalSound = new BabylonSound
-                {
-                    autoplay = rawScene.GetBoolProperty("babylonjs_sound_autoplay", 1),
-                    loop = rawScene.GetBoolProperty("babylonjs_sound_loop", 1),
-                    name = filename
-                };
-
-                babylonScene.SoundsList.Add(globalSound);
-
-                try
-                {
-                    File.Copy(soundName, Path.Combine(babylonScene.OutputPath, filename), true);
-                }
-                catch
-                {
-                }
-            }
-
-            // Cameras
-            BabylonCamera mainCamera = null;
-            ICameraObject mainCameraNode = null;
-
-            RaiseMessage("Exporting cameras");
-            var camerasTab = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Camera);
-            for (int ix = 0; ix < camerasTab.Count; ++ix)
-            {
-                var indexer = new IntPtr(ix);
-                var cameraNode = camerasTab[indexer];
-                Marshal.FreeHGlobal(indexer);
-                ExportCamera(gameScene, cameraNode, babylonScene);
-
-                if (mainCamera == null && babylonScene.CamerasList.Count > 0)
-                {
-                    mainCameraNode = (cameraNode.MaxNode.ObjectRef as ICameraObject);
-                    mainCamera = babylonScene.CamerasList[0];
-                    babylonScene.activeCameraID = mainCamera.id;
-                    RaiseMessage("Active camera set to " + mainCamera.name, Color.Green, 1, true);
-                }
-            }
-
-            if (mainCamera == null)
-            {
-                RaiseWarning("No camera defined", 1);
-            }
-            else
-            {
-                RaiseMessage(string.Format("Total: {0}", babylonScene.CamerasList.Count), Color.Gray, 1);
-            }
-
-            // Fog
-            for (var index = 0; index < Loader.Core.NumAtmospheric; index++)
-            {
-                var atmospheric = Loader.Core.GetAtmospheric(index);
-
-                if (atmospheric.Active(0) && atmospheric.ClassName == "Fog")
-                {
-                    var fog = atmospheric as IStdFog;
-
-                    RaiseMessage("Exporting fog");
-
-                    if (fog != null)
-                    {
-                        babylonScene.fogColor = fog.GetColor(0).ToArray();
-                        babylonScene.fogMode = 3;
-                    }
-#if !MAX2015 && !MAX2016
-                    else
-                    {
-                        var paramBlock = atmospheric.GetReference(0) as IIParamBlock;
-
-                        babylonScene.fogColor = Tools.GetParamBlockValueColor(paramBlock, "Fog Color");
-                        babylonScene.fogMode = 3;
-                    }
-#endif
-                    if (mainCamera != null)
-                    {
-                        babylonScene.fogStart = mainCameraNode.GetEnvRange(0, 0, Tools.Forever);
-                        babylonScene.fogEnd = mainCameraNode.GetEnvRange(0, 1, Tools.Forever);
-                    }
-                }
-            }
-
-            // Meshes
-            ReportProgressChanged(10);
-            RaiseMessage("Exporting meshes");
-            var meshes = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Mesh);
-            var progressionStep = 80.0f / meshes.Count;
-            var progression = 10.0f;
-            for (int ix = 0; ix < meshes.Count; ++ix)
-            {
-                var indexer = new IntPtr(ix);
-                var meshNode = meshes[indexer];
-                Marshal.FreeHGlobal(indexer);
-                ExportMesh(gameScene, meshNode, babylonScene);
-
-
-                ReportProgressChanged((int)progression);
-
-                progression += progressionStep;
-
-                CheckCancelled();
-            }
-
-
-            // Materials
-            RaiseMessage("Exporting materials");
-            var matsToExport = referencedMaterials.ToArray(); // Snapshot because multimaterials can export new materials
-            foreach (var mat in matsToExport)
-            {
-                ExportMaterial(mat, babylonScene);
-                CheckCancelled();
-            }
-            RaiseMessage(string.Format("Total: {0}", babylonScene.MaterialsList.Count + babylonScene.MultiMaterialsList.Count), Color.Gray, 1);
-
-            // Lights
-            RaiseMessage("Exporting lights");
-            var lightNodes = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Light);
-            for (var i = 0; i < lightNodes.Count; ++i)
-            {
-                ExportLight(gameScene, lightNodes[new IntPtr(i)], babylonScene);
-                CheckCancelled();
-            }
-
-
-            if (babylonScene.LightsList.Count == 0)
-            {
-                RaiseWarning("No light defined", 1);
-                RaiseWarning("A default hemispheric light was added for your convenience", 1);
-                ExportDefaultLight(babylonScene);
-            }
-            else
-            {
-                RaiseMessage(string.Format("Total: {0}", babylonScene.LightsList.Count), Color.Gray, 1);
-            }
-
-            // Skeletons
-            if (skins.Count > 0)
-            {
-                RaiseMessage("Exporting skeletons");
-                foreach (var skin in skins)
-                {
-                    ExportSkin(skin, babylonScene);
-                }
-            }
-
-            // Actions
-            babylonScene.actions = ExportNodeAction(gameScene.GetIGameNode(rawScene));
-
-            // Output
-            RaiseMessage("Saving to output file");
-            babylonScene.Prepare(false);
-            var jsonSerializer = JsonSerializer.Create(new JsonSerializerSettings());
-            var sb = new StringBuilder();
-            var sw = new StringWriter(sb, CultureInfo.InvariantCulture);
-
-            await Task.Run(() =>
-            {
-                using (var jsonWriter = new JsonTextWriterOptimized(sw))
-                {
-                    jsonWriter.Formatting = Formatting.None;
-                    jsonSerializer.Serialize(jsonWriter, babylonScene);
-                }
-                File.WriteAllText(outputFile, sb.ToString());
-
-                if (generateManifest)
-                {
-                    File.WriteAllText(outputFile + ".manifest",
-                        "{\r\n\"version\" : 1,\r\n\"enableSceneOffline\" : true,\r\n\"enableTexturesOffline\" : true\r\n}");
-                }
-            });
-
-            // Binary
-            if (generateBinary)
-            {
-                RaiseMessage("Generating binary files");
-                BabylonFileConverter.BinaryConverter.Convert(outputFile, Path.GetDirectoryName(outputFile) + "\\Binary",
-                    message => RaiseMessage(message, 1),
-                    error => RaiseError(error, 1));
-            }
-
-            ReportProgressChanged(100);
-            watch.Stop();
-            RaiseMessage(string.Format("Exportation done in {0:0.00}s", watch.ElapsedMilliseconds / 1000.0), Color.Blue);
-        }
-
-
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Autodesk.Max;
+using BabylonExport.Entities;
+using Newtonsoft.Json;
+using Color = System.Drawing.Color;
+using System.Runtime.InteropServices;
+
+namespace Max2Babylon
+{
+    internal partial class BabylonExporter
+    {
+        public event Action<int> OnImportProgressChanged;
+        public event Action<string, int> OnWarning;
+        public event Action<string, Color, int, bool> OnMessage;
+        public event Action<string, int> OnError;
+
+        public bool AutoSave3dsMaxFile { get; set; }
+        public bool ExportHiddenObjects { get; set; }
+        public bool IsCancelled { get; set; }
+
+        public bool CopyTexturesToOutput { get; set; }
+
+        public string MaxSceneFileName { get; set; }
+
+        public bool ExportQuaternionsInsteadOfEulers { get; set; }
+
+        void ReportProgressChanged(int progress)
+        {
+            if (OnImportProgressChanged != null)
+            {
+                OnImportProgressChanged(progress);
+            }
+        }
+
+        void RaiseError(string error, int rank = 0)
+        {
+            if (OnError != null)
+            {
+                OnError(error, rank);
+            }
+        }
+
+        void RaiseWarning(string warning, int rank = 0)
+        {
+            if (OnWarning != null)
+            {
+                OnWarning(warning, rank);
+            }
+        }
+
+        void RaiseMessage(string message, int rank = 0, bool emphasis = false)
+        {
+            RaiseMessage(message, Color.Black, rank, emphasis);
+        }
+
+        void RaiseMessage(string message, Color color, int rank = 0, bool emphasis = false)
+        {
+            if (OnMessage != null)
+            {
+                OnMessage(message, color, rank, emphasis);
+            }
+        }
+
+        void CheckCancelled()
+        {
+            Application.DoEvents();
+            if (IsCancelled)
+            {
+                throw new OperationCanceledException();
+            }
+        }
+
+        public async Task ExportAsync(string outputFile, bool generateManifest, bool onlySelected, bool generateBinary, Form callerForm)
+        {
+            var gameConversionManger = Loader.Global.ConversionManager;
+            gameConversionManger.CoordSystem = Autodesk.Max.IGameConversionManager.CoordSystem.D3d;
+
+            var gameScene = Loader.Global.IGameInterface;
+            gameScene.InitialiseIGame(onlySelected);
+            gameScene.SetStaticFrame(0);
+
+            MaxSceneFileName = gameScene.SceneFileName;
+
+            IsCancelled = false;
+            RaiseMessage("Exportation started", Color.Blue);
+            ReportProgressChanged(0);
+            var babylonScene = new BabylonScene(Path.GetDirectoryName(outputFile));
+            var rawScene = Loader.Core.RootNode;
+
+            if (!Directory.Exists(babylonScene.OutputPath))
+            {
+                RaiseError("Exportation stopped: Output folder does not exist");
+                ReportProgressChanged(100);
+                return;
+            }
+
+            var watch = new Stopwatch();
+            watch.Start();
+
+            // Save scene
+            RaiseMessage("Saving 3ds max file");
+
+            if (AutoSave3dsMaxFile)
+            {
+                var forceSave = Loader.Core.FileSave;
+
+                if (callerForm != null)
+                {
+                    callerForm.BringToFront();
+                }
+            }
+
+            // Global
+            babylonScene.autoClear = true;
+            babylonScene.clearColor = Loader.Core.GetBackGround(0, Tools.Forever).ToArray();
+            babylonScene.ambientColor = Loader.Core.GetAmbient(0, Tools.Forever).ToArray();
+
+            babylonScene.gravity = rawScene.GetVector3Property("babylonjs_gravity");
+            ExportQuaternionsInsteadOfEulers = rawScene.GetBoolProperty("babylonjs_exportquaternions", 1);
+
+            // Sounds
+            var soundName = rawScene.GetStringProperty("babylonjs_sound_filename", "");
+
+            if (!string.IsNullOrEmpty(soundName))
+            {
+                var filename = Path.GetFileName(soundName);
+
+                var globalSound = new BabylonSound
+                {
+                    autoplay = rawScene.GetBoolProperty("babylonjs_sound_autoplay", 1),
+                    loop = rawScene.GetBoolProperty("babylonjs_sound_loop", 1),
+                    name = filename
+                };
+
+                babylonScene.SoundsList.Add(globalSound);
+
+                try
+                {
+                    File.Copy(soundName, Path.Combine(babylonScene.OutputPath, filename), true);
+                }
+                catch
+                {
+                }
+            }
+
+            // Cameras
+            BabylonCamera mainCamera = null;
+            ICameraObject mainCameraNode = null;
+
+            RaiseMessage("Exporting cameras");
+            var camerasTab = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Camera);
+            for (int ix = 0; ix < camerasTab.Count; ++ix)
+            {
+                var indexer = new IntPtr(ix);
+                var cameraNode = camerasTab[indexer];
+                Marshal.FreeHGlobal(indexer);
+                ExportCamera(gameScene, cameraNode, babylonScene);
+
+                if (mainCamera == null && babylonScene.CamerasList.Count > 0)
+                {
+                    mainCameraNode = (cameraNode.MaxNode.ObjectRef as ICameraObject);
+                    mainCamera = babylonScene.CamerasList[0];
+                    babylonScene.activeCameraID = mainCamera.id;
+                    RaiseMessage("Active camera set to " + mainCamera.name, Color.Green, 1, true);
+                }
+            }
+
+            if (mainCamera == null)
+            {
+                RaiseWarning("No camera defined", 1);
+            }
+            else
+            {
+                RaiseMessage(string.Format("Total: {0}", babylonScene.CamerasList.Count), Color.Gray, 1);
+            }
+
+            // Fog
+            for (var index = 0; index < Loader.Core.NumAtmospheric; index++)
+            {
+                var atmospheric = Loader.Core.GetAtmospheric(index);
+
+                if (atmospheric.Active(0) && atmospheric.ClassName == "Fog")
+                {
+                    var fog = atmospheric as IStdFog;
+
+                    RaiseMessage("Exporting fog");
+
+                    if (fog != null)
+                    {
+                        babylonScene.fogColor = fog.GetColor(0).ToArray();
+                        babylonScene.fogMode = 3;
+                    }
+#if !MAX2015 && !MAX2016
+                    else
+                    {
+                        var paramBlock = atmospheric.GetReference(0) as IIParamBlock;
+
+                        babylonScene.fogColor = Tools.GetParamBlockValueColor(paramBlock, "Fog Color");
+                        babylonScene.fogMode = 3;
+                    }
+#endif
+                    if (mainCamera != null)
+                    {
+                        babylonScene.fogStart = mainCameraNode.GetEnvRange(0, 0, Tools.Forever);
+                        babylonScene.fogEnd = mainCameraNode.GetEnvRange(0, 1, Tools.Forever);
+                    }
+                }
+            }
+
+            // Meshes
+            ReportProgressChanged(10);
+            RaiseMessage("Exporting meshes");
+            var meshes = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Mesh);
+            var progressionStep = 80.0f / meshes.Count;
+            var progression = 10.0f;
+            for (int ix = 0; ix < meshes.Count; ++ix)
+            {
+                var indexer = new IntPtr(ix);
+                var meshNode = meshes[indexer];
+                Marshal.FreeHGlobal(indexer);
+                ExportMesh(gameScene, meshNode, babylonScene);
+
+
+                ReportProgressChanged((int)progression);
+
+                progression += progressionStep;
+
+                CheckCancelled();
+            }
+
+
+            // Materials
+            RaiseMessage("Exporting materials");
+            var matsToExport = referencedMaterials.ToArray(); // Snapshot because multimaterials can export new materials
+            foreach (var mat in matsToExport)
+            {
+                ExportMaterial(mat, babylonScene);
+                CheckCancelled();
+            }
+            RaiseMessage(string.Format("Total: {0}", babylonScene.MaterialsList.Count + babylonScene.MultiMaterialsList.Count), Color.Gray, 1);
+
+            // Lights
+            RaiseMessage("Exporting lights");
+            var lightNodes = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Light);
+            for (var i = 0; i < lightNodes.Count; ++i)
+            {
+                ExportLight(gameScene, lightNodes[new IntPtr(i)], babylonScene);
+                CheckCancelled();
+            }
+
+
+            if (babylonScene.LightsList.Count == 0)
+            {
+                RaiseWarning("No light defined", 1);
+                RaiseWarning("A default hemispheric light was added for your convenience", 1);
+                ExportDefaultLight(babylonScene);
+            }
+            else
+            {
+                RaiseMessage(string.Format("Total: {0}", babylonScene.LightsList.Count), Color.Gray, 1);
+            }
+
+            // Skeletons
+            if (skins.Count > 0)
+            {
+                RaiseMessage("Exporting skeletons");
+                foreach (var skin in skins)
+                {
+                    ExportSkin(skin, babylonScene);
+                }
+            }
+
+            // Actions
+            babylonScene.actions = ExportNodeAction(gameScene.GetIGameNode(rawScene));
+
+            // Output
+            RaiseMessage("Saving to output file");
+            babylonScene.Prepare(false);
+            var jsonSerializer = JsonSerializer.Create(new JsonSerializerSettings());
+            var sb = new StringBuilder();
+            var sw = new StringWriter(sb, CultureInfo.InvariantCulture);
+
+            await Task.Run(() =>
+            {
+                using (var jsonWriter = new JsonTextWriterOptimized(sw))
+                {
+                    jsonWriter.Formatting = Formatting.None;
+                    jsonSerializer.Serialize(jsonWriter, babylonScene);
+                }
+                File.WriteAllText(outputFile, sb.ToString());
+
+                if (generateManifest)
+                {
+                    File.WriteAllText(outputFile + ".manifest",
+                        "{\r\n\"version\" : 1,\r\n\"enableSceneOffline\" : true,\r\n\"enableTexturesOffline\" : true\r\n}");
+                }
+            });
+
+            // Binary
+            if (generateBinary)
+            {
+                RaiseMessage("Generating binary files");
+                BabylonFileConverter.BinaryConverter.Convert(outputFile, Path.GetDirectoryName(outputFile) + "\\Binary",
+                    message => RaiseMessage(message, 1),
+                    error => RaiseError(error, 1));
+            }
+
+            ReportProgressChanged(100);
+            watch.Stop();
+            RaiseMessage(string.Format("Exportation done in {0:0.00}s", watch.ElapsedMilliseconds / 1000.0), Color.Blue);
+        }
+
+
+    }
+}

+ 69 - 69
Exporters/3ds Max/Max2Babylon/Exporter/GlobalVertex.cs

@@ -1,69 +1,69 @@
-using Autodesk.Max;
-
-namespace Max2Babylon
-{
-    public struct GlobalVertex
-    {
-        public int BaseIndex { get; set; }
-        public int CurrentIndex { get; set; }
-        public IPoint3 Position { get; set; }
-        public IPoint3 Normal { get; set; }
-        public IPoint2 UV { get; set; }
-        public IPoint2 UV2 { get; set; }
-        public int BonesIndices { get; set; }
-        public IPoint4 Weights { get; set; }
-        public float[] Color { get; set; }
-
-        public override int GetHashCode()
-        {
-            return base.GetHashCode();
-        }
-
-        public override bool Equals(object obj)
-        {
-            if (!(obj is GlobalVertex))
-            {
-                return false;
-            }
-
-            var other = (GlobalVertex)obj;
-
-            if (other.BaseIndex != BaseIndex)
-            {
-                return false;
-            }
-
-            if (!other.Position.IsAlmostEqualTo(Position, Tools.Epsilon))
-            {
-                return false;
-            }
-
-            if (!other.Normal.IsAlmostEqualTo(Normal, Tools.Epsilon))
-            {
-                return false;
-            }
-
-            if (UV != null && !other.UV.IsAlmostEqualTo(UV, Tools.Epsilon))
-            {
-                return false;
-            }
-
-            if (UV2 != null && !other.UV2.IsAlmostEqualTo(UV2, Tools.Epsilon))
-            {
-                return false;
-            }
-
-            if (Weights != null && !other.Weights.IsAlmostEqualTo(Weights, Tools.Epsilon))
-            {
-                return false;
-            }
-
-            if (Color != null && !other.Color.IsAlmostEqualTo(Color, Tools.Epsilon))
-            {
-                return false;
-            }
-
-            return other.BonesIndices == BonesIndices;
-        }
-    }
-}
+using Autodesk.Max;
+
+namespace Max2Babylon
+{
+    public struct GlobalVertex
+    {
+        public int BaseIndex { get; set; }
+        public int CurrentIndex { get; set; }
+        public IPoint3 Position { get; set; }
+        public IPoint3 Normal { get; set; }
+        public IPoint2 UV { get; set; }
+        public IPoint2 UV2 { get; set; }
+        public int BonesIndices { get; set; }
+        public IPoint4 Weights { get; set; }
+        public float[] Color { get; set; }
+
+        public override int GetHashCode()
+        {
+            return base.GetHashCode();
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (!(obj is GlobalVertex))
+            {
+                return false;
+            }
+
+            var other = (GlobalVertex)obj;
+
+            if (other.BaseIndex != BaseIndex)
+            {
+                return false;
+            }
+
+            if (!other.Position.IsAlmostEqualTo(Position, Tools.Epsilon))
+            {
+                return false;
+            }
+
+            if (!other.Normal.IsAlmostEqualTo(Normal, Tools.Epsilon))
+            {
+                return false;
+            }
+
+            if (UV != null && !other.UV.IsAlmostEqualTo(UV, Tools.Epsilon))
+            {
+                return false;
+            }
+
+            if (UV2 != null && !other.UV2.IsAlmostEqualTo(UV2, Tools.Epsilon))
+            {
+                return false;
+            }
+
+            if (Weights != null && !other.Weights.IsAlmostEqualTo(Weights, Tools.Epsilon))
+            {
+                return false;
+            }
+
+            if (Color != null && !other.Color.IsAlmostEqualTo(Color, Tools.Epsilon))
+            {
+                return false;
+            }
+
+            return other.BonesIndices == BonesIndices;
+        }
+    }
+}

+ 98 - 98
Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.Designer.cs

@@ -1,99 +1,99 @@
-namespace Max2Babylon
-{
-    partial class ActionsBuilderForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.ActionsBuilderWebView = new System.Windows.Forms.WebBrowser();
-            this.butCancel = new System.Windows.Forms.Button();
-            this.butOK = new System.Windows.Forms.Button();
-            this.SuspendLayout();
-            // 
-            // ActionsBuilderWebView
-            // 
-            this.ActionsBuilderWebView.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
-            this.ActionsBuilderWebView.AllowNavigation = false;
-            this.ActionsBuilderWebView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.ActionsBuilderWebView.IsWebBrowserContextMenuEnabled = false;
-            this.ActionsBuilderWebView.Location = new System.Drawing.Point(0, 0);
-            this.ActionsBuilderWebView.MinimumSize = new System.Drawing.Size(20, 20);
-            this.ActionsBuilderWebView.Name = "ActionsBuilderWebView";
-            this.ActionsBuilderWebView.Size = new System.Drawing.Size(723, 537);
-            this.ActionsBuilderWebView.TabIndex = 0;
-            this.ActionsBuilderWebView.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.ActionsBuilderWebView_DocumentCompleted);
-            // 
-            // butCancel
-            // 
-            this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.butCancel.Location = new System.Drawing.Point(636, 544);
-            this.butCancel.Name = "butCancel";
-            this.butCancel.Size = new System.Drawing.Size(75, 23);
-            this.butCancel.TabIndex = 1;
-            this.butCancel.Text = "Cancel";
-            this.butCancel.UseVisualStyleBackColor = true;
-            this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
-            // 
-            // butOK
-            // 
-            this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.butOK.Location = new System.Drawing.Point(555, 544);
-            this.butOK.Name = "butOK";
-            this.butOK.Size = new System.Drawing.Size(75, 23);
-            this.butOK.TabIndex = 2;
-            this.butOK.Text = "OK";
-            this.butOK.UseVisualStyleBackColor = true;
-            this.butOK.Click += new System.EventHandler(this.butOK_Click);
-            // 
-            // ActionsBuilderForm
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(723, 579);
-            this.Controls.Add(this.butOK);
-            this.Controls.Add(this.butCancel);
-            this.Controls.Add(this.ActionsBuilderWebView);
-            this.Name = "ActionsBuilderForm";
-            this.Text = "Babylon.js Actions Builder";
-            this.Activated += new System.EventHandler(this.ActionsBuilderForm_Activated);
-            this.Deactivate += new System.EventHandler(this.ActionsBuilderForm_Deactivate);
-            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ActionsBuilderForm_FormClosed);
-            this.Load += new System.EventHandler(this.ActionsBuilderForm_Load);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.WebBrowser ActionsBuilderWebView;
-        private System.Windows.Forms.Button butCancel;
-        private System.Windows.Forms.Button butOK;
-    }
+namespace Max2Babylon
+{
+    partial class ActionsBuilderForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.ActionsBuilderWebView = new System.Windows.Forms.WebBrowser();
+            this.butCancel = new System.Windows.Forms.Button();
+            this.butOK = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // ActionsBuilderWebView
+            // 
+            this.ActionsBuilderWebView.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
+            this.ActionsBuilderWebView.AllowNavigation = false;
+            this.ActionsBuilderWebView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.ActionsBuilderWebView.IsWebBrowserContextMenuEnabled = false;
+            this.ActionsBuilderWebView.Location = new System.Drawing.Point(0, 0);
+            this.ActionsBuilderWebView.MinimumSize = new System.Drawing.Size(20, 20);
+            this.ActionsBuilderWebView.Name = "ActionsBuilderWebView";
+            this.ActionsBuilderWebView.Size = new System.Drawing.Size(723, 537);
+            this.ActionsBuilderWebView.TabIndex = 0;
+            this.ActionsBuilderWebView.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.ActionsBuilderWebView_DocumentCompleted);
+            // 
+            // butCancel
+            // 
+            this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.butCancel.Location = new System.Drawing.Point(636, 544);
+            this.butCancel.Name = "butCancel";
+            this.butCancel.Size = new System.Drawing.Size(75, 23);
+            this.butCancel.TabIndex = 1;
+            this.butCancel.Text = "Cancel";
+            this.butCancel.UseVisualStyleBackColor = true;
+            this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
+            // 
+            // butOK
+            // 
+            this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.butOK.Location = new System.Drawing.Point(555, 544);
+            this.butOK.Name = "butOK";
+            this.butOK.Size = new System.Drawing.Size(75, 23);
+            this.butOK.TabIndex = 2;
+            this.butOK.Text = "OK";
+            this.butOK.UseVisualStyleBackColor = true;
+            this.butOK.Click += new System.EventHandler(this.butOK_Click);
+            // 
+            // ActionsBuilderForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(723, 579);
+            this.Controls.Add(this.butOK);
+            this.Controls.Add(this.butCancel);
+            this.Controls.Add(this.ActionsBuilderWebView);
+            this.Name = "ActionsBuilderForm";
+            this.Text = "Babylon.js Actions Builder";
+            this.Activated += new System.EventHandler(this.ActionsBuilderForm_Activated);
+            this.Deactivate += new System.EventHandler(this.ActionsBuilderForm_Deactivate);
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ActionsBuilderForm_FormClosed);
+            this.Load += new System.EventHandler(this.ActionsBuilderForm_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.WebBrowser ActionsBuilderWebView;
+        private System.Windows.Forms.Button butCancel;
+        private System.Windows.Forms.Button butOK;
+    }
 }

+ 170 - 170
Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.cs

@@ -1,170 +1,170 @@
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using Autodesk.Max;
-using System.Runtime.InteropServices;
-
-namespace Max2Babylon
-{
-
-    public partial class ActionsBuilderForm : Form
-    {
-        private readonly BabylonActionsBuilderActionItem _babylonActionsBuilderAction;
-        private IINode _node = null;
-
-        private HtmlDocument _document;
-        private string _objectName;
-        private string _propertyName = "babylon_actionsbuilder";
-        private string _jsonResult = "";
-        private bool isRootNode;
-
-        public ActionsBuilderForm(BabylonActionsBuilderActionItem babylonActionsBuilderAction)
-        {
-            InitializeComponent();
-
-            // Finish
-            _babylonActionsBuilderAction = babylonActionsBuilderAction;
-        }
-        
-        private void ActionsBuilderForm_Load(object sender, EventArgs e)
-        {
-            if (Loader.Core.SelNodeCount > 0)
-            {
-                isRootNode = false;
-                _node = Loader.Core.GetSelNode(0);
-            }
-            else
-            {
-                isRootNode = true;
-                _node = Loader.Core.RootNode;
-            }
-            _objectName = _node.Name;
-
-            // Set url (webview)
-            string assemblyPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
-            ActionsBuilderWebView.Url = new Uri(string.Format("{0}/BabylonActionsBuilder/index.html", assemblyPath), System.UriKind.Absolute);
-        }
-
-        private void ActionsBuilderForm_FormClosed(object sender, FormClosedEventArgs e)
-        {
-            _babylonActionsBuilderAction.Close();
-        }
-
-        private void fillObjectsList(ITab<IIGameNode> list, string scriptName)
-        {
-            object[] names = new object[list.Count];
-            for (int i = 0; i < list.Count; i++)
-            {
-                var indexer = new IntPtr(i);
-                var node = list[indexer];
-                names[i] = node.MaxNode.Name;
-            }
-            _document.InvokeScript(scriptName, names);
-        }
-
-        private void fillSoundsList(ITab<IIGameNode> list, string scriptName)
-        {
-            object[] names = new object[list.Count];
-            for (int i = 0; i < list.Count; i++)
-            {
-                var indexer = new IntPtr(i);
-                var node = list[indexer].MaxNode;
-                string soundFile = "";
-
-                soundFile = Tools.GetStringProperty(node, "babylonjs_sound_filename", soundFile);
-                names[i] = Path.GetFileName(soundFile);
-            }
-            _document.InvokeScript(scriptName, names);
-        }
-
-        private void ActionsBuilderWebView_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
-        {
-            // Set common properties (name, is scene or object, etc.)
-            _document = ActionsBuilderWebView.Document;
-
-            // Update screen
-            _document.InvokeScript("hideButtons");
-
-            // Set object name
-            _document.GetElementById("ActionsBuilderObjectName").SetAttribute("value", _objectName);
-            _document.InvokeScript("updateObjectName");
-
-            if (isRootNode)
-                _document.InvokeScript("setIsScene");
-            else
-                _document.InvokeScript("setIsObject");
-
-            //_document.InvokeScript("updateObjectName");
-
-            if (getProperty())
-            {
-                _document.GetElementById("ActionsBuilderJSON").SetAttribute("value", _jsonResult);
-                _document.InvokeScript("loadFromJSON");
-            }
-
-            // Set lists of meshes, lights, cameras etc.
-            var gameScene = Loader.Global.IGameInterface;
-            gameScene.InitialiseIGame(false);
-
-            var meshes = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Mesh);
-            fillObjectsList(meshes, "setMeshesNames");
-
-            var lights = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Light);
-            fillObjectsList(lights, "setLightsNames");
-
-            var cameras = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Camera);
-            fillObjectsList(cameras, "setCamerasNames");
-
-            fillSoundsList(meshes, "setSoundsNames");
-
-            // Finish
-            _document.InvokeScript("resetList");
-
-            // Need to subclass this, then allow 3ds Max usage 
-            //Win32.SubClass(this.ActionsBuilderWebView.Handle);
-        }
-
-        private void butOK_Click(object sender, EventArgs e)
-        {
-            _document.InvokeScript("createJSON");
-            _jsonResult = _document.GetElementById("ActionsBuilderJSON").GetAttribute("value");
-
-            setProperty();
-
-            _babylonActionsBuilderAction.Close();
-        }
-
-        private void ActionsBuilderForm_Activated(object sender, EventArgs e)
-        {
-            Loader.Global.DisableAccelerators();
-        }
-
-        private void ActionsBuilderForm_Deactivate(object sender, EventArgs e)
-        {
-            Loader.Global.EnableAccelerators();
-        }
-
-        private void setProperty()
-        {
-            if (_node != null)
-                Tools.SetStringProperty(_node, _propertyName, _jsonResult);
-        }
-
-        private bool getProperty()
-        {
-            if (_node != null)
-                _jsonResult = Tools.GetStringProperty(_node, _propertyName, _jsonResult);
-            else
-                return false;
-
-            return true;
-        }
-
-        private void butCancel_Click(object sender, EventArgs e)
-        {
-            _babylonActionsBuilderAction.Close();
-        }
-    }
-
-}
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Autodesk.Max;
+using System.Runtime.InteropServices;
+
+namespace Max2Babylon
+{
+
+    public partial class ActionsBuilderForm : Form
+    {
+        private readonly BabylonActionsBuilderActionItem _babylonActionsBuilderAction;
+        private IINode _node = null;
+
+        private HtmlDocument _document;
+        private string _objectName;
+        private string _propertyName = "babylon_actionsbuilder";
+        private string _jsonResult = "";
+        private bool isRootNode;
+
+        public ActionsBuilderForm(BabylonActionsBuilderActionItem babylonActionsBuilderAction)
+        {
+            InitializeComponent();
+
+            // Finish
+            _babylonActionsBuilderAction = babylonActionsBuilderAction;
+        }
+        
+        private void ActionsBuilderForm_Load(object sender, EventArgs e)
+        {
+            if (Loader.Core.SelNodeCount > 0)
+            {
+                isRootNode = false;
+                _node = Loader.Core.GetSelNode(0);
+            }
+            else
+            {
+                isRootNode = true;
+                _node = Loader.Core.RootNode;
+            }
+            _objectName = _node.Name;
+
+            // Set url (web view)
+            string assemblyPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
+            ActionsBuilderWebView.Url = new Uri(string.Format("{0}/BabylonActionsBuilder/index.html", assemblyPath), System.UriKind.Absolute);
+        }
+
+        private void ActionsBuilderForm_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            _babylonActionsBuilderAction.Close();
+        }
+
+        private void fillObjectsList(ITab<IIGameNode> list, string scriptName)
+        {
+            object[] names = new object[list.Count];
+            for (int i = 0; i < list.Count; i++)
+            {
+                var indexer = new IntPtr(i);
+                var node = list[indexer];
+                names[i] = node.MaxNode.Name;
+            }
+            _document.InvokeScript(scriptName, names);
+        }
+
+        private void fillSoundsList(ITab<IIGameNode> list, string scriptName)
+        {
+            object[] names = new object[list.Count];
+            for (int i = 0; i < list.Count; i++)
+            {
+                var indexer = new IntPtr(i);
+                var node = list[indexer].MaxNode;
+                string soundFile = "";
+
+                soundFile = Tools.GetStringProperty(node, "babylonjs_sound_filename", soundFile);
+                names[i] = Path.GetFileName(soundFile);
+            }
+            _document.InvokeScript(scriptName, names);
+        }
+
+        private void ActionsBuilderWebView_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
+        {
+            // Set common properties (name, is scene or object, etc.)
+            _document = ActionsBuilderWebView.Document;
+
+            // Update version (no buttons for 3ds Max)
+            _document.InvokeScript("hideButtons");
+
+            // Set object name
+            _document.GetElementById("ActionsBuilderObjectName").SetAttribute("value", _objectName);
+            _document.InvokeScript("updateObjectName");
+
+            if (isRootNode)
+                _document.InvokeScript("setIsScene");
+            else
+                _document.InvokeScript("setIsObject");
+
+            //_document.InvokeScript("updateObjectName");
+
+            if (getProperty())
+            {
+                _document.GetElementById("ActionsBuilderJSON").SetAttribute("value", _jsonResult);
+                _document.InvokeScript("loadFromJSON");
+            }
+
+            // Set lists of meshes, lights, cameras etc.
+            var gameScene = Loader.Global.IGameInterface;
+            gameScene.InitialiseIGame(false);
+
+            var meshes = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Mesh);
+            fillObjectsList(meshes, "setMeshesNames");
+
+            var lights = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Light);
+            fillObjectsList(lights, "setLightsNames");
+
+            var cameras = gameScene.GetIGameNodeByType(Autodesk.Max.IGameObject.ObjectTypes.Camera);
+            fillObjectsList(cameras, "setCamerasNames");
+
+            fillSoundsList(meshes, "setSoundsNames");
+
+            // Finish
+            _document.InvokeScript("resetList");
+
+            // Need to subclass this, then allow 3ds Max usage 
+            //Win32.SubClass(this.ActionsBuilderWebView.Handle);
+        }
+
+        private void butOK_Click(object sender, EventArgs e)
+        {
+            _document.InvokeScript("createJSON");
+            _jsonResult = _document.GetElementById("ActionsBuilderJSON").GetAttribute("value");
+
+            setProperty();
+
+            _babylonActionsBuilderAction.Close();
+        }
+
+        private void ActionsBuilderForm_Activated(object sender, EventArgs e)
+        {
+            Loader.Global.DisableAccelerators();
+        }
+
+        private void ActionsBuilderForm_Deactivate(object sender, EventArgs e)
+        {
+            Loader.Global.EnableAccelerators();
+        }
+
+        private void setProperty()
+        {
+            if (_node != null)
+                Tools.SetStringProperty(_node, _propertyName, _jsonResult);
+        }
+
+        private bool getProperty()
+        {
+            if (_node != null)
+                _jsonResult = Tools.GetStringProperty(_node, _propertyName, _jsonResult);
+            else
+                return false;
+
+            return true;
+        }
+
+        private void butCancel_Click(object sender, EventArgs e)
+        {
+            _babylonActionsBuilderAction.Close();
+        }
+    }
+
+}

+ 119 - 119
Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.resx

@@ -1,120 +1,120 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 415 - 415
Exporters/3ds Max/Max2Babylon/Forms/CameraPropertiesForm.Designer.cs

@@ -1,416 +1,416 @@
-namespace Max2Babylon
-{
-    partial class CameraPropertiesForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.ellipsoidControl = new Max2Babylon.Vector3Control();
-            this.label3 = new System.Windows.Forms.Label();
-            this.chkGravity = new System.Windows.Forms.CheckBox();
-            this.chkCollisions = new System.Windows.Forms.CheckBox();
-            this.butOK = new System.Windows.Forms.Button();
-            this.butCancel = new System.Windows.Forms.Button();
-            this.groupBox2 = new System.Windows.Forms.GroupBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.nupInertia = new System.Windows.Forms.NumericUpDown();
-            this.label1 = new System.Windows.Forms.Label();
-            this.nupSpeed = new System.Windows.Forms.NumericUpDown();
-            this.groupBox3 = new System.Windows.Forms.GroupBox();
-            this.grpAutoAnimate = new System.Windows.Forms.GroupBox();
-            this.chkLoop = new System.Windows.Forms.CheckBox();
-            this.nupTo = new System.Windows.Forms.NumericUpDown();
-            this.label4 = new System.Windows.Forms.Label();
-            this.nupFrom = new System.Windows.Forms.NumericUpDown();
-            this.label5 = new System.Windows.Forms.Label();
-            this.chkAutoAnimate = new System.Windows.Forms.CheckBox();
-            this.groupBox4 = new System.Windows.Forms.GroupBox();
-            this.label6 = new System.Windows.Forms.Label();
-            this.cbCameraType = new System.Windows.Forms.ComboBox();
-            this.chkNoExport = new System.Windows.Forms.CheckBox();
-            this.groupBox1.SuspendLayout();
-            this.groupBox2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupInertia)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupSpeed)).BeginInit();
-            this.groupBox3.SuspendLayout();
-            this.grpAutoAnimate.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).BeginInit();
-            this.groupBox4.SuspendLayout();
-            this.SuspendLayout();
-            // 
-            // groupBox1
-            // 
-            this.groupBox1.Controls.Add(this.ellipsoidControl);
-            this.groupBox1.Controls.Add(this.label3);
-            this.groupBox1.Controls.Add(this.chkGravity);
-            this.groupBox1.Controls.Add(this.chkCollisions);
-            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox1.Location = new System.Drawing.Point(12, 119);
-            this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(319, 138);
-            this.groupBox1.TabIndex = 0;
-            this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Collisions";
-            // 
-            // ellipsoidControl
-            // 
-            this.ellipsoidControl.Location = new System.Drawing.Point(21, 95);
-            this.ellipsoidControl.Name = "ellipsoidControl";
-            this.ellipsoidControl.Size = new System.Drawing.Size(294, 28);
-            this.ellipsoidControl.TabIndex = 3;
-            this.ellipsoidControl.X = 0F;
-            this.ellipsoidControl.Y = 0F;
-            this.ellipsoidControl.Z = 0F;
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(18, 79);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(48, 13);
-            this.label3.TabIndex = 2;
-            this.label3.Text = "Ellipsoid:";
-            // 
-            // chkGravity
-            // 
-            this.chkGravity.AutoSize = true;
-            this.chkGravity.Location = new System.Drawing.Point(21, 51);
-            this.chkGravity.Name = "chkGravity";
-            this.chkGravity.Size = new System.Drawing.Size(86, 17);
-            this.chkGravity.TabIndex = 1;
-            this.chkGravity.Text = "Apply gravity";
-            this.chkGravity.ThreeState = true;
-            this.chkGravity.UseVisualStyleBackColor = true;
-            // 
-            // chkCollisions
-            // 
-            this.chkCollisions.AutoSize = true;
-            this.chkCollisions.Location = new System.Drawing.Point(21, 28);
-            this.chkCollisions.Name = "chkCollisions";
-            this.chkCollisions.Size = new System.Drawing.Size(102, 17);
-            this.chkCollisions.TabIndex = 0;
-            this.chkCollisions.Text = "Check collisions";
-            this.chkCollisions.ThreeState = true;
-            this.chkCollisions.UseVisualStyleBackColor = true;
-            // 
-            // butOK
-            // 
-            this.butOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
-            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.butOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butOK.Location = new System.Drawing.Point(93, 578);
-            this.butOK.Name = "butOK";
-            this.butOK.Size = new System.Drawing.Size(75, 23);
-            this.butOK.TabIndex = 1;
-            this.butOK.Text = "OK";
-            this.butOK.UseVisualStyleBackColor = true;
-            this.butOK.Click += new System.EventHandler(this.butOK_Click);
-            // 
-            // butCancel
-            // 
-            this.butCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
-            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butCancel.Location = new System.Drawing.Point(174, 578);
-            this.butCancel.Name = "butCancel";
-            this.butCancel.Size = new System.Drawing.Size(75, 23);
-            this.butCancel.TabIndex = 2;
-            this.butCancel.Text = "Cancel";
-            this.butCancel.UseVisualStyleBackColor = true;
-            // 
-            // groupBox2
-            // 
-            this.groupBox2.Controls.Add(this.label2);
-            this.groupBox2.Controls.Add(this.nupInertia);
-            this.groupBox2.Controls.Add(this.label1);
-            this.groupBox2.Controls.Add(this.nupSpeed);
-            this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox2.Location = new System.Drawing.Point(12, 263);
-            this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(319, 140);
-            this.groupBox2.TabIndex = 3;
-            this.groupBox2.TabStop = false;
-            this.groupBox2.Text = "Control";
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(21, 81);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(36, 13);
-            this.label2.TabIndex = 3;
-            this.label2.Text = "Inertia";
-            // 
-            // nupInertia
-            // 
-            this.nupInertia.DecimalPlaces = 2;
-            this.nupInertia.Location = new System.Drawing.Point(24, 103);
-            this.nupInertia.Name = "nupInertia";
-            this.nupInertia.Size = new System.Drawing.Size(120, 20);
-            this.nupInertia.TabIndex = 2;
-            this.nupInertia.Value = new decimal(new int[] {
-            9,
-            0,
-            0,
-            65536});
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(21, 28);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(41, 13);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "Speed:";
-            // 
-            // nupSpeed
-            // 
-            this.nupSpeed.DecimalPlaces = 1;
-            this.nupSpeed.Location = new System.Drawing.Point(24, 50);
-            this.nupSpeed.Name = "nupSpeed";
-            this.nupSpeed.Size = new System.Drawing.Size(120, 20);
-            this.nupSpeed.TabIndex = 0;
-            this.nupSpeed.Value = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            // 
-            // groupBox3
-            // 
-            this.groupBox3.Controls.Add(this.grpAutoAnimate);
-            this.groupBox3.Controls.Add(this.chkAutoAnimate);
-            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox3.Location = new System.Drawing.Point(12, 409);
-            this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(319, 156);
-            this.groupBox3.TabIndex = 5;
-            this.groupBox3.TabStop = false;
-            this.groupBox3.Text = "Animations";
-            // 
-            // grpAutoAnimate
-            // 
-            this.grpAutoAnimate.Controls.Add(this.chkLoop);
-            this.grpAutoAnimate.Controls.Add(this.nupTo);
-            this.grpAutoAnimate.Controls.Add(this.label4);
-            this.grpAutoAnimate.Controls.Add(this.nupFrom);
-            this.grpAutoAnimate.Controls.Add(this.label5);
-            this.grpAutoAnimate.Enabled = false;
-            this.grpAutoAnimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.grpAutoAnimate.Location = new System.Drawing.Point(21, 51);
-            this.grpAutoAnimate.Name = "grpAutoAnimate";
-            this.grpAutoAnimate.Size = new System.Drawing.Size(292, 99);
-            this.grpAutoAnimate.TabIndex = 3;
-            this.grpAutoAnimate.TabStop = false;
-            // 
-            // chkLoop
-            // 
-            this.chkLoop.AutoSize = true;
-            this.chkLoop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkLoop.Location = new System.Drawing.Point(9, 66);
-            this.chkLoop.Name = "chkLoop";
-            this.chkLoop.Size = new System.Drawing.Size(47, 17);
-            this.chkLoop.TabIndex = 5;
-            this.chkLoop.Text = "Loop";
-            this.chkLoop.ThreeState = true;
-            this.chkLoop.UseVisualStyleBackColor = true;
-            // 
-            // nupTo
-            // 
-            this.nupTo.Location = new System.Drawing.Point(47, 40);
-            this.nupTo.Maximum = new decimal(new int[] {
-            1000,
-            0,
-            0,
-            0});
-            this.nupTo.Name = "nupTo";
-            this.nupTo.Size = new System.Drawing.Size(120, 20);
-            this.nupTo.TabIndex = 3;
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(6, 42);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(23, 13);
-            this.label4.TabIndex = 4;
-            this.label4.Text = "To:";
-            // 
-            // nupFrom
-            // 
-            this.nupFrom.Location = new System.Drawing.Point(47, 14);
-            this.nupFrom.Maximum = new decimal(new int[] {
-            1000,
-            0,
-            0,
-            0});
-            this.nupFrom.Name = "nupFrom";
-            this.nupFrom.Size = new System.Drawing.Size(120, 20);
-            this.nupFrom.TabIndex = 1;
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(6, 16);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(33, 13);
-            this.label5.TabIndex = 2;
-            this.label5.Text = "From:";
-            // 
-            // chkAutoAnimate
-            // 
-            this.chkAutoAnimate.AutoSize = true;
-            this.chkAutoAnimate.Location = new System.Drawing.Point(21, 28);
-            this.chkAutoAnimate.Name = "chkAutoAnimate";
-            this.chkAutoAnimate.Size = new System.Drawing.Size(88, 17);
-            this.chkAutoAnimate.TabIndex = 0;
-            this.chkAutoAnimate.Text = "Auto animate";
-            this.chkAutoAnimate.ThreeState = true;
-            this.chkAutoAnimate.UseVisualStyleBackColor = true;
-            this.chkAutoAnimate.CheckedChanged += new System.EventHandler(this.chkAutoAnimate_CheckedChanged);
-            // 
-            // groupBox4
-            // 
-            this.groupBox4.Controls.Add(this.label6);
-            this.groupBox4.Controls.Add(this.cbCameraType);
-            this.groupBox4.Controls.Add(this.chkNoExport);
-            this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox4.Location = new System.Drawing.Point(12, 12);
-            this.groupBox4.Name = "groupBox4";
-            this.groupBox4.Size = new System.Drawing.Size(319, 101);
-            this.groupBox4.TabIndex = 6;
-            this.groupBox4.TabStop = false;
-            this.groupBox4.Text = "Misc.";
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(16, 58);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(34, 13);
-            this.label6.TabIndex = 6;
-            this.label6.Text = "Type:";
-            // 
-            // cbCameraType
-            // 
-            this.cbCameraType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cbCameraType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.cbCameraType.FormattingEnabled = true;
-            this.cbCameraType.Items.AddRange(new object[] {
-            "AnaglyphArcRotateCamera",
-            "AnaglyphFreeCamera",
-            "ArcRotateCamera",
-            "DeviceOrientationCamera",
-            "FollowCamera",
-            "FreeCamera",
-            "GamepadCamera",
-            "TouchCamera",
-            "VirtualJoysticksCamera",
-            "WebVRFreeCamera",
-            "VRDeviceOrientationFreeCamera"});
-            this.cbCameraType.Location = new System.Drawing.Point(23, 74);
-            this.cbCameraType.Name = "cbCameraType";
-            this.cbCameraType.Size = new System.Drawing.Size(290, 21);
-            this.cbCameraType.TabIndex = 5;
-            // 
-            // chkNoExport
-            // 
-            this.chkNoExport.AutoSize = true;
-            this.chkNoExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkNoExport.Location = new System.Drawing.Point(21, 28);
-            this.chkNoExport.Name = "chkNoExport";
-            this.chkNoExport.Size = new System.Drawing.Size(87, 17);
-            this.chkNoExport.TabIndex = 4;
-            this.chkNoExport.Text = "Do not export";
-            this.chkNoExport.ThreeState = true;
-            this.chkNoExport.UseVisualStyleBackColor = true;
-            // 
-            // CameraPropertiesForm
-            // 
-            this.AcceptButton = this.butOK;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.butCancel;
-            this.ClientSize = new System.Drawing.Size(343, 613);
-            this.Controls.Add(this.groupBox4);
-            this.Controls.Add(this.groupBox3);
-            this.Controls.Add(this.groupBox2);
-            this.Controls.Add(this.butCancel);
-            this.Controls.Add(this.butOK);
-            this.Controls.Add(this.groupBox1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Name = "CameraPropertiesForm";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "Babylon.js - Camera Properties";
-            this.Load += new System.EventHandler(this.CameraPropertiesForm_Load);
-            this.groupBox1.ResumeLayout(false);
-            this.groupBox1.PerformLayout();
-            this.groupBox2.ResumeLayout(false);
-            this.groupBox2.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupInertia)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupSpeed)).EndInit();
-            this.groupBox3.ResumeLayout(false);
-            this.groupBox3.PerformLayout();
-            this.grpAutoAnimate.ResumeLayout(false);
-            this.grpAutoAnimate.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).EndInit();
-            this.groupBox4.ResumeLayout(false);
-            this.groupBox4.PerformLayout();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.Button butOK;
-        private System.Windows.Forms.Button butCancel;
-        private System.Windows.Forms.CheckBox chkCollisions;
-        private System.Windows.Forms.CheckBox chkGravity;
-        private System.Windows.Forms.GroupBox groupBox2;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.NumericUpDown nupSpeed;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.NumericUpDown nupInertia;
-        private System.Windows.Forms.Label label3;
-        private Vector3Control ellipsoidControl;
-        private System.Windows.Forms.GroupBox groupBox3;
-        private System.Windows.Forms.GroupBox grpAutoAnimate;
-        private System.Windows.Forms.CheckBox chkLoop;
-        private System.Windows.Forms.NumericUpDown nupTo;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.NumericUpDown nupFrom;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.CheckBox chkAutoAnimate;
-        private System.Windows.Forms.GroupBox groupBox4;
-        private System.Windows.Forms.CheckBox chkNoExport;
-        private System.Windows.Forms.Label label6;
-        private System.Windows.Forms.ComboBox cbCameraType;
-    }
+namespace Max2Babylon
+{
+    partial class CameraPropertiesForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.ellipsoidControl = new Max2Babylon.Vector3Control();
+            this.label3 = new System.Windows.Forms.Label();
+            this.chkGravity = new System.Windows.Forms.CheckBox();
+            this.chkCollisions = new System.Windows.Forms.CheckBox();
+            this.butOK = new System.Windows.Forms.Button();
+            this.butCancel = new System.Windows.Forms.Button();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.nupInertia = new System.Windows.Forms.NumericUpDown();
+            this.label1 = new System.Windows.Forms.Label();
+            this.nupSpeed = new System.Windows.Forms.NumericUpDown();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.grpAutoAnimate = new System.Windows.Forms.GroupBox();
+            this.chkLoop = new System.Windows.Forms.CheckBox();
+            this.nupTo = new System.Windows.Forms.NumericUpDown();
+            this.label4 = new System.Windows.Forms.Label();
+            this.nupFrom = new System.Windows.Forms.NumericUpDown();
+            this.label5 = new System.Windows.Forms.Label();
+            this.chkAutoAnimate = new System.Windows.Forms.CheckBox();
+            this.groupBox4 = new System.Windows.Forms.GroupBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.cbCameraType = new System.Windows.Forms.ComboBox();
+            this.chkNoExport = new System.Windows.Forms.CheckBox();
+            this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupInertia)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupSpeed)).BeginInit();
+            this.groupBox3.SuspendLayout();
+            this.grpAutoAnimate.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).BeginInit();
+            this.groupBox4.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.ellipsoidControl);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.Controls.Add(this.chkGravity);
+            this.groupBox1.Controls.Add(this.chkCollisions);
+            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox1.Location = new System.Drawing.Point(12, 119);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(319, 138);
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "Collisions";
+            // 
+            // ellipsoidControl
+            // 
+            this.ellipsoidControl.Location = new System.Drawing.Point(21, 95);
+            this.ellipsoidControl.Name = "ellipsoidControl";
+            this.ellipsoidControl.Size = new System.Drawing.Size(294, 28);
+            this.ellipsoidControl.TabIndex = 3;
+            this.ellipsoidControl.X = 0F;
+            this.ellipsoidControl.Y = 0F;
+            this.ellipsoidControl.Z = 0F;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(18, 79);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(48, 13);
+            this.label3.TabIndex = 2;
+            this.label3.Text = "Ellipsoid:";
+            // 
+            // chkGravity
+            // 
+            this.chkGravity.AutoSize = true;
+            this.chkGravity.Location = new System.Drawing.Point(21, 51);
+            this.chkGravity.Name = "chkGravity";
+            this.chkGravity.Size = new System.Drawing.Size(86, 17);
+            this.chkGravity.TabIndex = 1;
+            this.chkGravity.Text = "Apply gravity";
+            this.chkGravity.ThreeState = true;
+            this.chkGravity.UseVisualStyleBackColor = true;
+            // 
+            // chkCollisions
+            // 
+            this.chkCollisions.AutoSize = true;
+            this.chkCollisions.Location = new System.Drawing.Point(21, 28);
+            this.chkCollisions.Name = "chkCollisions";
+            this.chkCollisions.Size = new System.Drawing.Size(102, 17);
+            this.chkCollisions.TabIndex = 0;
+            this.chkCollisions.Text = "Check collisions";
+            this.chkCollisions.ThreeState = true;
+            this.chkCollisions.UseVisualStyleBackColor = true;
+            // 
+            // butOK
+            // 
+            this.butOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.butOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butOK.Location = new System.Drawing.Point(93, 578);
+            this.butOK.Name = "butOK";
+            this.butOK.Size = new System.Drawing.Size(75, 23);
+            this.butOK.TabIndex = 1;
+            this.butOK.Text = "OK";
+            this.butOK.UseVisualStyleBackColor = true;
+            this.butOK.Click += new System.EventHandler(this.butOK_Click);
+            // 
+            // butCancel
+            // 
+            this.butCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butCancel.Location = new System.Drawing.Point(174, 578);
+            this.butCancel.Name = "butCancel";
+            this.butCancel.Size = new System.Drawing.Size(75, 23);
+            this.butCancel.TabIndex = 2;
+            this.butCancel.Text = "Cancel";
+            this.butCancel.UseVisualStyleBackColor = true;
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.label2);
+            this.groupBox2.Controls.Add(this.nupInertia);
+            this.groupBox2.Controls.Add(this.label1);
+            this.groupBox2.Controls.Add(this.nupSpeed);
+            this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox2.Location = new System.Drawing.Point(12, 263);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(319, 140);
+            this.groupBox2.TabIndex = 3;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "Control";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(21, 81);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(36, 13);
+            this.label2.TabIndex = 3;
+            this.label2.Text = "Inertia";
+            // 
+            // nupInertia
+            // 
+            this.nupInertia.DecimalPlaces = 2;
+            this.nupInertia.Location = new System.Drawing.Point(24, 103);
+            this.nupInertia.Name = "nupInertia";
+            this.nupInertia.Size = new System.Drawing.Size(120, 20);
+            this.nupInertia.TabIndex = 2;
+            this.nupInertia.Value = new decimal(new int[] {
+            9,
+            0,
+            0,
+            65536});
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(21, 28);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(41, 13);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "Speed:";
+            // 
+            // nupSpeed
+            // 
+            this.nupSpeed.DecimalPlaces = 1;
+            this.nupSpeed.Location = new System.Drawing.Point(24, 50);
+            this.nupSpeed.Name = "nupSpeed";
+            this.nupSpeed.Size = new System.Drawing.Size(120, 20);
+            this.nupSpeed.TabIndex = 0;
+            this.nupSpeed.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.grpAutoAnimate);
+            this.groupBox3.Controls.Add(this.chkAutoAnimate);
+            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox3.Location = new System.Drawing.Point(12, 409);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(319, 156);
+            this.groupBox3.TabIndex = 5;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "Animations";
+            // 
+            // grpAutoAnimate
+            // 
+            this.grpAutoAnimate.Controls.Add(this.chkLoop);
+            this.grpAutoAnimate.Controls.Add(this.nupTo);
+            this.grpAutoAnimate.Controls.Add(this.label4);
+            this.grpAutoAnimate.Controls.Add(this.nupFrom);
+            this.grpAutoAnimate.Controls.Add(this.label5);
+            this.grpAutoAnimate.Enabled = false;
+            this.grpAutoAnimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.grpAutoAnimate.Location = new System.Drawing.Point(21, 51);
+            this.grpAutoAnimate.Name = "grpAutoAnimate";
+            this.grpAutoAnimate.Size = new System.Drawing.Size(292, 99);
+            this.grpAutoAnimate.TabIndex = 3;
+            this.grpAutoAnimate.TabStop = false;
+            // 
+            // chkLoop
+            // 
+            this.chkLoop.AutoSize = true;
+            this.chkLoop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkLoop.Location = new System.Drawing.Point(9, 66);
+            this.chkLoop.Name = "chkLoop";
+            this.chkLoop.Size = new System.Drawing.Size(47, 17);
+            this.chkLoop.TabIndex = 5;
+            this.chkLoop.Text = "Loop";
+            this.chkLoop.ThreeState = true;
+            this.chkLoop.UseVisualStyleBackColor = true;
+            // 
+            // nupTo
+            // 
+            this.nupTo.Location = new System.Drawing.Point(47, 40);
+            this.nupTo.Maximum = new decimal(new int[] {
+            1000,
+            0,
+            0,
+            0});
+            this.nupTo.Name = "nupTo";
+            this.nupTo.Size = new System.Drawing.Size(120, 20);
+            this.nupTo.TabIndex = 3;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(6, 42);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(23, 13);
+            this.label4.TabIndex = 4;
+            this.label4.Text = "To:";
+            // 
+            // nupFrom
+            // 
+            this.nupFrom.Location = new System.Drawing.Point(47, 14);
+            this.nupFrom.Maximum = new decimal(new int[] {
+            1000,
+            0,
+            0,
+            0});
+            this.nupFrom.Name = "nupFrom";
+            this.nupFrom.Size = new System.Drawing.Size(120, 20);
+            this.nupFrom.TabIndex = 1;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(6, 16);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(33, 13);
+            this.label5.TabIndex = 2;
+            this.label5.Text = "From:";
+            // 
+            // chkAutoAnimate
+            // 
+            this.chkAutoAnimate.AutoSize = true;
+            this.chkAutoAnimate.Location = new System.Drawing.Point(21, 28);
+            this.chkAutoAnimate.Name = "chkAutoAnimate";
+            this.chkAutoAnimate.Size = new System.Drawing.Size(88, 17);
+            this.chkAutoAnimate.TabIndex = 0;
+            this.chkAutoAnimate.Text = "Auto animate";
+            this.chkAutoAnimate.ThreeState = true;
+            this.chkAutoAnimate.UseVisualStyleBackColor = true;
+            this.chkAutoAnimate.CheckedChanged += new System.EventHandler(this.chkAutoAnimate_CheckedChanged);
+            // 
+            // groupBox4
+            // 
+            this.groupBox4.Controls.Add(this.label6);
+            this.groupBox4.Controls.Add(this.cbCameraType);
+            this.groupBox4.Controls.Add(this.chkNoExport);
+            this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox4.Location = new System.Drawing.Point(12, 12);
+            this.groupBox4.Name = "groupBox4";
+            this.groupBox4.Size = new System.Drawing.Size(319, 101);
+            this.groupBox4.TabIndex = 6;
+            this.groupBox4.TabStop = false;
+            this.groupBox4.Text = "Misc.";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(16, 58);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(34, 13);
+            this.label6.TabIndex = 6;
+            this.label6.Text = "Type:";
+            // 
+            // cbCameraType
+            // 
+            this.cbCameraType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbCameraType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cbCameraType.FormattingEnabled = true;
+            this.cbCameraType.Items.AddRange(new object[] {
+            "AnaglyphArcRotateCamera",
+            "AnaglyphFreeCamera",
+            "ArcRotateCamera",
+            "DeviceOrientationCamera",
+            "FollowCamera",
+            "FreeCamera",
+            "GamepadCamera",
+            "TouchCamera",
+            "VirtualJoysticksCamera",
+            "WebVRFreeCamera",
+            "VRDeviceOrientationFreeCamera"});
+            this.cbCameraType.Location = new System.Drawing.Point(23, 74);
+            this.cbCameraType.Name = "cbCameraType";
+            this.cbCameraType.Size = new System.Drawing.Size(290, 21);
+            this.cbCameraType.TabIndex = 5;
+            // 
+            // chkNoExport
+            // 
+            this.chkNoExport.AutoSize = true;
+            this.chkNoExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkNoExport.Location = new System.Drawing.Point(21, 28);
+            this.chkNoExport.Name = "chkNoExport";
+            this.chkNoExport.Size = new System.Drawing.Size(87, 17);
+            this.chkNoExport.TabIndex = 4;
+            this.chkNoExport.Text = "Do not export";
+            this.chkNoExport.ThreeState = true;
+            this.chkNoExport.UseVisualStyleBackColor = true;
+            // 
+            // CameraPropertiesForm
+            // 
+            this.AcceptButton = this.butOK;
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.butCancel;
+            this.ClientSize = new System.Drawing.Size(343, 613);
+            this.Controls.Add(this.groupBox4);
+            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.butCancel);
+            this.Controls.Add(this.butOK);
+            this.Controls.Add(this.groupBox1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "CameraPropertiesForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Babylon.js - Camera Properties";
+            this.Load += new System.EventHandler(this.CameraPropertiesForm_Load);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupInertia)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupSpeed)).EndInit();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
+            this.grpAutoAnimate.ResumeLayout(false);
+            this.grpAutoAnimate.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).EndInit();
+            this.groupBox4.ResumeLayout(false);
+            this.groupBox4.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.Button butOK;
+        private System.Windows.Forms.Button butCancel;
+        private System.Windows.Forms.CheckBox chkCollisions;
+        private System.Windows.Forms.CheckBox chkGravity;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.NumericUpDown nupSpeed;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.NumericUpDown nupInertia;
+        private System.Windows.Forms.Label label3;
+        private Vector3Control ellipsoidControl;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.GroupBox grpAutoAnimate;
+        private System.Windows.Forms.CheckBox chkLoop;
+        private System.Windows.Forms.NumericUpDown nupTo;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.NumericUpDown nupFrom;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.CheckBox chkAutoAnimate;
+        private System.Windows.Forms.GroupBox groupBox4;
+        private System.Windows.Forms.CheckBox chkNoExport;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.ComboBox cbCameraType;
+    }
 }

+ 71 - 71
Exporters/3ds Max/Max2Babylon/Forms/CameraPropertiesForm.cs

@@ -1,71 +1,71 @@
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using Autodesk.Max;
-
-namespace Max2Babylon
-{
-    public partial class CameraPropertiesForm : Form
-    {
-        private readonly List<IINode> cameras = new List<IINode>();
-
-        public CameraPropertiesForm()
-        {
-            InitializeComponent();
-        }
-
-        private void CameraPropertiesForm_Load(object sender, EventArgs e)
-        {
-            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
-            {
-                var node = Loader.Core.GetSelNode(index);
-
-                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Camera)
-                {
-                    cameras.Add(node);
-                }
-            }
-
-            Tools.PrepareCheckBox(chkNoExport, cameras, "babylonjs_noexport");
-            Tools.PrepareCheckBox(chkCollisions, cameras, "babylonjs_checkcollisions");
-            Tools.PrepareCheckBox(chkGravity, cameras, "babylonjs_applygravity");
-
-            Tools.PrepareNumericUpDown(nupSpeed, cameras, "babylonjs_speed", 1.0f);
-            Tools.PrepareNumericUpDown(nupInertia, cameras, "babylonjs_inertia", 0.9f);
-
-            Tools.PrepareVector3Control(ellipsoidControl, cameras[0], "babylonjs_ellipsoid", 0.5f, 1.0f, 0.5f);
-
-            Tools.PrepareComboBox(cbCameraType, cameras[0], "babylonjs_type", "FreeCamera");
-
-            Tools.PrepareCheckBox(chkAutoAnimate, cameras, "babylonjs_autoanimate");
-            Tools.PrepareCheckBox(chkLoop, cameras, "babylonjs_autoanimateloop");
-            Tools.PrepareNumericUpDown(nupFrom, cameras, "babylonjs_autoanimate_from");
-            Tools.PrepareNumericUpDown(nupTo, cameras, "babylonjs_autoanimate_to", 100.0f);
-        }
-
-        private void butOK_Click(object sender, EventArgs e)
-        {
-            Tools.UpdateCheckBox(chkNoExport, cameras, "babylonjs_noexport");
-            Tools.UpdateCheckBox(chkCollisions, cameras, "babylonjs_checkcollisions");
-            Tools.UpdateCheckBox(chkGravity, cameras, "babylonjs_applygravity");
-
-            Tools.UpdateNumericUpDown(nupSpeed, cameras, "babylonjs_speed");
-            Tools.UpdateNumericUpDown(nupInertia, cameras, "babylonjs_inertia");
-
-            Tools.UpdateVector3Control(ellipsoidControl, cameras, "babylonjs_ellipsoid");
-
-            Tools.UpdateComboBox(cbCameraType, cameras, "babylonjs_type");
-
-            Tools.UpdateCheckBox(chkAutoAnimate, cameras, "babylonjs_autoanimate");
-            Tools.UpdateCheckBox(chkLoop, cameras, "babylonjs_autoanimateloop");
-            Tools.UpdateNumericUpDown(nupFrom, cameras, "babylonjs_autoanimate_from");
-            Tools.UpdateNumericUpDown(nupTo, cameras, "babylonjs_autoanimate_to");
-        }
-
-        private void chkAutoAnimate_CheckedChanged(object sender, EventArgs e)
-        {
-            grpAutoAnimate.Enabled = chkAutoAnimate.Checked;
-        }
-
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Autodesk.Max;
+
+namespace Max2Babylon
+{
+    public partial class CameraPropertiesForm : Form
+    {
+        private readonly List<IINode> cameras = new List<IINode>();
+
+        public CameraPropertiesForm()
+        {
+            InitializeComponent();
+        }
+
+        private void CameraPropertiesForm_Load(object sender, EventArgs e)
+        {
+            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
+            {
+                var node = Loader.Core.GetSelNode(index);
+
+                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Camera)
+                {
+                    cameras.Add(node);
+                }
+            }
+
+            Tools.PrepareCheckBox(chkNoExport, cameras, "babylonjs_noexport");
+            Tools.PrepareCheckBox(chkCollisions, cameras, "babylonjs_checkcollisions");
+            Tools.PrepareCheckBox(chkGravity, cameras, "babylonjs_applygravity");
+
+            Tools.PrepareNumericUpDown(nupSpeed, cameras, "babylonjs_speed", 1.0f);
+            Tools.PrepareNumericUpDown(nupInertia, cameras, "babylonjs_inertia", 0.9f);
+
+            Tools.PrepareVector3Control(ellipsoidControl, cameras[0], "babylonjs_ellipsoid", 0.5f, 1.0f, 0.5f);
+
+            Tools.PrepareComboBox(cbCameraType, cameras[0], "babylonjs_type", "FreeCamera");
+
+            Tools.PrepareCheckBox(chkAutoAnimate, cameras, "babylonjs_autoanimate");
+            Tools.PrepareCheckBox(chkLoop, cameras, "babylonjs_autoanimateloop");
+            Tools.PrepareNumericUpDown(nupFrom, cameras, "babylonjs_autoanimate_from");
+            Tools.PrepareNumericUpDown(nupTo, cameras, "babylonjs_autoanimate_to", 100.0f);
+        }
+
+        private void butOK_Click(object sender, EventArgs e)
+        {
+            Tools.UpdateCheckBox(chkNoExport, cameras, "babylonjs_noexport");
+            Tools.UpdateCheckBox(chkCollisions, cameras, "babylonjs_checkcollisions");
+            Tools.UpdateCheckBox(chkGravity, cameras, "babylonjs_applygravity");
+
+            Tools.UpdateNumericUpDown(nupSpeed, cameras, "babylonjs_speed");
+            Tools.UpdateNumericUpDown(nupInertia, cameras, "babylonjs_inertia");
+
+            Tools.UpdateVector3Control(ellipsoidControl, cameras, "babylonjs_ellipsoid");
+
+            Tools.UpdateComboBox(cbCameraType, cameras, "babylonjs_type");
+
+            Tools.UpdateCheckBox(chkAutoAnimate, cameras, "babylonjs_autoanimate");
+            Tools.UpdateCheckBox(chkLoop, cameras, "babylonjs_autoanimateloop");
+            Tools.UpdateNumericUpDown(nupFrom, cameras, "babylonjs_autoanimate_from");
+            Tools.UpdateNumericUpDown(nupTo, cameras, "babylonjs_autoanimate_to");
+        }
+
+        private void chkAutoAnimate_CheckedChanged(object sender, EventArgs e)
+        {
+            grpAutoAnimate.Enabled = chkAutoAnimate.Checked;
+        }
+
+    }
+}

+ 119 - 119
Exporters/3ds Max/Max2Babylon/Forms/CameraPropertiesForm.resx

@@ -1,120 +1,120 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 319 - 319
Exporters/3ds Max/Max2Babylon/Forms/ExporterForm.Designer.cs

@@ -1,320 +1,320 @@
-namespace Max2Babylon
-{
-    partial class ExporterForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExporterForm));
-            this.butExport = new System.Windows.Forms.Button();
-            this.label1 = new System.Windows.Forms.Label();
-            this.txtFilename = new System.Windows.Forms.TextBox();
-            this.butBrowse = new System.Windows.Forms.Button();
-            this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
-            this.progressBar = new System.Windows.Forms.ProgressBar();
-            this.treeView = new System.Windows.Forms.TreeView();
-            this.butCancel = new System.Windows.Forms.Button();
-            this.pictureBox2 = new System.Windows.Forms.PictureBox();
-            this.chkManifest = new System.Windows.Forms.CheckBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.chkCopyTextures = new System.Windows.Forms.CheckBox();
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.chkBinary = new System.Windows.Forms.CheckBox();
-            this.chkOnlySelected = new System.Windows.Forms.CheckBox();
-            this.chkAutoSave = new System.Windows.Forms.CheckBox();
-            this.chkHidden = new System.Windows.Forms.CheckBox();
-            this.butExportAndRun = new System.Windows.Forms.Button();
-            this.butClose = new System.Windows.Forms.Button();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
-            this.groupBox1.SuspendLayout();
-            this.SuspendLayout();
-            // 
-            // butExport
-            // 
-            this.butExport.Anchor = System.Windows.Forms.AnchorStyles.Top;
-            this.butExport.Enabled = false;
-            this.butExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butExport.Location = new System.Drawing.Point(211, 153);
-            this.butExport.Name = "butExport";
-            this.butExport.Size = new System.Drawing.Size(197, 27);
-            this.butExport.TabIndex = 0;
-            this.butExport.Text = "Export";
-            this.butExport.UseVisualStyleBackColor = true;
-            this.butExport.Click += new System.EventHandler(this.butExport_Click);
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(6, 17);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(52, 13);
-            this.label1.TabIndex = 2;
-            this.label1.Text = "Filename:";
-            // 
-            // txtFilename
-            // 
-            this.txtFilename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtFilename.Location = new System.Drawing.Point(18, 34);
-            this.txtFilename.Name = "txtFilename";
-            this.txtFilename.Size = new System.Drawing.Size(420, 20);
-            this.txtFilename.TabIndex = 3;
-            this.txtFilename.TextChanged += new System.EventHandler(this.txtFilename_TextChanged);
-            // 
-            // butBrowse
-            // 
-            this.butBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.butBrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butBrowse.Location = new System.Drawing.Point(444, 32);
-            this.butBrowse.Name = "butBrowse";
-            this.butBrowse.Size = new System.Drawing.Size(43, 23);
-            this.butBrowse.TabIndex = 4;
-            this.butBrowse.Text = "...";
-            this.butBrowse.UseVisualStyleBackColor = true;
-            this.butBrowse.Click += new System.EventHandler(this.butBrowse_Click);
-            // 
-            // saveFileDialog
-            // 
-            this.saveFileDialog.DefaultExt = "babylon";
-            this.saveFileDialog.Filter = "Babylon files|*.babylon";
-            this.saveFileDialog.RestoreDirectory = true;
-            // 
-            // progressBar
-            // 
-            this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.progressBar.Location = new System.Drawing.Point(12, 516);
-            this.progressBar.Name = "progressBar";
-            this.progressBar.Size = new System.Drawing.Size(627, 23);
-            this.progressBar.TabIndex = 5;
-            // 
-            // treeView
-            // 
-            this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.treeView.Location = new System.Drawing.Point(12, 186);
-            this.treeView.Name = "treeView";
-            this.treeView.Size = new System.Drawing.Size(799, 324);
-            this.treeView.TabIndex = 6;
-            // 
-            // butCancel
-            // 
-            this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.butCancel.Enabled = false;
-            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butCancel.Location = new System.Drawing.Point(645, 516);
-            this.butCancel.Name = "butCancel";
-            this.butCancel.Size = new System.Drawing.Size(80, 23);
-            this.butCancel.TabIndex = 7;
-            this.butCancel.Text = "Cancel";
-            this.butCancel.UseVisualStyleBackColor = true;
-            this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
-            // 
-            // pictureBox2
-            // 
-            this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
-            this.pictureBox2.Location = new System.Drawing.Point(511, 12);
-            this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(300, 130);
-            this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
-            this.pictureBox2.TabIndex = 9;
-            this.pictureBox2.TabStop = false;
-            // 
-            // chkManifest
-            // 
-            this.chkManifest.AutoSize = true;
-            this.chkManifest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkManifest.Location = new System.Drawing.Point(18, 104);
-            this.chkManifest.Name = "chkManifest";
-            this.chkManifest.Size = new System.Drawing.Size(112, 17);
-            this.chkManifest.TabIndex = 2;
-            this.chkManifest.Text = "Generate .manifest";
-            this.chkManifest.UseVisualStyleBackColor = true;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(6, 62);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(46, 13);
-            this.label2.TabIndex = 11;
-            this.label2.Text = "Options:";
-            // 
-            // chkCopyTextures
-            // 
-            this.chkCopyTextures.AutoSize = true;
-            this.chkCopyTextures.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkCopyTextures.Location = new System.Drawing.Point(18, 81);
-            this.chkCopyTextures.Name = "chkCopyTextures";
-            this.chkCopyTextures.Size = new System.Drawing.Size(132, 17);
-            this.chkCopyTextures.TabIndex = 12;
-            this.chkCopyTextures.Text = "Copy textures to output";
-            this.chkCopyTextures.UseVisualStyleBackColor = true;
-            // 
-            // groupBox1
-            // 
-            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.groupBox1.Controls.Add(this.chkBinary);
-            this.groupBox1.Controls.Add(this.chkOnlySelected);
-            this.groupBox1.Controls.Add(this.chkAutoSave);
-            this.groupBox1.Controls.Add(this.chkHidden);
-            this.groupBox1.Controls.Add(this.label1);
-            this.groupBox1.Controls.Add(this.chkCopyTextures);
-            this.groupBox1.Controls.Add(this.txtFilename);
-            this.groupBox1.Controls.Add(this.chkManifest);
-            this.groupBox1.Controls.Add(this.butBrowse);
-            this.groupBox1.Controls.Add(this.label2);
-            this.groupBox1.Location = new System.Drawing.Point(12, 6);
-            this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(493, 136);
-            this.groupBox1.TabIndex = 13;
-            this.groupBox1.TabStop = false;
-            // 
-            // chkBinary
-            // 
-            this.chkBinary.AutoSize = true;
-            this.chkBinary.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkBinary.Location = new System.Drawing.Point(320, 104);
-            this.chkBinary.Name = "chkBinary";
-            this.chkBinary.Size = new System.Drawing.Size(135, 17);
-            this.chkBinary.TabIndex = 16;
-            this.chkBinary.Text = "Generate binary version";
-            this.chkBinary.UseVisualStyleBackColor = true;
-            // 
-            // chkOnlySelected
-            // 
-            this.chkOnlySelected.AutoSize = true;
-            this.chkOnlySelected.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkOnlySelected.Location = new System.Drawing.Point(320, 81);
-            this.chkOnlySelected.Name = "chkOnlySelected";
-            this.chkOnlySelected.Size = new System.Drawing.Size(118, 17);
-            this.chkOnlySelected.TabIndex = 15;
-            this.chkOnlySelected.Text = "Export only selected";
-            this.chkOnlySelected.UseVisualStyleBackColor = true;
-            // 
-            // chkAutoSave
-            // 
-            this.chkAutoSave.AutoSize = true;
-            this.chkAutoSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkAutoSave.Location = new System.Drawing.Point(166, 104);
-            this.chkAutoSave.Name = "chkAutoSave";
-            this.chkAutoSave.Size = new System.Drawing.Size(130, 17);
-            this.chkAutoSave.TabIndex = 14;
-            this.chkAutoSave.Text = "Auto save 3ds Max file";
-            this.chkAutoSave.UseVisualStyleBackColor = true;
-            // 
-            // chkHidden
-            // 
-            this.chkHidden.AutoSize = true;
-            this.chkHidden.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkHidden.Location = new System.Drawing.Point(166, 81);
-            this.chkHidden.Name = "chkHidden";
-            this.chkHidden.Size = new System.Drawing.Size(125, 17);
-            this.chkHidden.TabIndex = 13;
-            this.chkHidden.Text = "Export hidden objects";
-            this.chkHidden.UseVisualStyleBackColor = true;
-            // 
-            // butExportAndRun
-            // 
-            this.butExportAndRun.Anchor = System.Windows.Forms.AnchorStyles.Top;
-            this.butExportAndRun.Enabled = false;
-            this.butExportAndRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butExportAndRun.Location = new System.Drawing.Point(414, 153);
-            this.butExportAndRun.Name = "butExportAndRun";
-            this.butExportAndRun.Size = new System.Drawing.Size(197, 27);
-            this.butExportAndRun.TabIndex = 14;
-            this.butExportAndRun.Text = "Export && Run";
-            this.butExportAndRun.UseVisualStyleBackColor = true;
-            this.butExportAndRun.Click += new System.EventHandler(this.butExportAndRun_Click);
-            // 
-            // butClose
-            // 
-            this.butClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.butClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butClose.Location = new System.Drawing.Point(731, 516);
-            this.butClose.Name = "butClose";
-            this.butClose.Size = new System.Drawing.Size(80, 23);
-            this.butClose.TabIndex = 7;
-            this.butClose.Text = "Close";
-            this.butClose.UseVisualStyleBackColor = true;
-            this.butClose.Click += new System.EventHandler(this.butClose_Click);
-            // 
-            // ExporterForm
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(823, 551);
-            this.Controls.Add(this.butExportAndRun);
-            this.Controls.Add(this.groupBox1);
-            this.Controls.Add(this.pictureBox2);
-            this.Controls.Add(this.butClose);
-            this.Controls.Add(this.butCancel);
-            this.Controls.Add(this.treeView);
-            this.Controls.Add(this.progressBar);
-            this.Controls.Add(this.butExport);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
-            this.MinimumSize = new System.Drawing.Size(750, 400);
-            this.Name = "ExporterForm";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "Babylon.js - Export scene to .babylon file";
-            this.Activated += new System.EventHandler(this.ExporterForm_Activated);
-            this.Deactivate += new System.EventHandler(this.ExporterForm_Deactivate);
-            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ExporterForm_FormClosed);
-            this.Load += new System.EventHandler(this.ExporterForm_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
-            this.groupBox1.ResumeLayout(false);
-            this.groupBox1.PerformLayout();
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Button butExport;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.TextBox txtFilename;
-        private System.Windows.Forms.Button butBrowse;
-        private System.Windows.Forms.SaveFileDialog saveFileDialog;
-        private System.Windows.Forms.ProgressBar progressBar;
-        private System.Windows.Forms.TreeView treeView;
-        private System.Windows.Forms.Button butCancel;
-        private System.Windows.Forms.PictureBox pictureBox2;
-        private System.Windows.Forms.CheckBox chkManifest;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.CheckBox chkCopyTextures;
-        private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.CheckBox chkHidden;
-        private System.Windows.Forms.CheckBox chkAutoSave;
-        private System.Windows.Forms.Button butExportAndRun;
-        private System.Windows.Forms.CheckBox chkOnlySelected;
-        private System.Windows.Forms.Button butClose;
-        private System.Windows.Forms.CheckBox chkBinary;
-    }
+namespace Max2Babylon
+{
+    partial class ExporterForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExporterForm));
+            this.butExport = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.txtFilename = new System.Windows.Forms.TextBox();
+            this.butBrowse = new System.Windows.Forms.Button();
+            this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
+            this.progressBar = new System.Windows.Forms.ProgressBar();
+            this.treeView = new System.Windows.Forms.TreeView();
+            this.butCancel = new System.Windows.Forms.Button();
+            this.pictureBox2 = new System.Windows.Forms.PictureBox();
+            this.chkManifest = new System.Windows.Forms.CheckBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.chkCopyTextures = new System.Windows.Forms.CheckBox();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.chkBinary = new System.Windows.Forms.CheckBox();
+            this.chkOnlySelected = new System.Windows.Forms.CheckBox();
+            this.chkAutoSave = new System.Windows.Forms.CheckBox();
+            this.chkHidden = new System.Windows.Forms.CheckBox();
+            this.butExportAndRun = new System.Windows.Forms.Button();
+            this.butClose = new System.Windows.Forms.Button();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
+            this.groupBox1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // butExport
+            // 
+            this.butExport.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.butExport.Enabled = false;
+            this.butExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butExport.Location = new System.Drawing.Point(211, 153);
+            this.butExport.Name = "butExport";
+            this.butExport.Size = new System.Drawing.Size(197, 27);
+            this.butExport.TabIndex = 0;
+            this.butExport.Text = "Export";
+            this.butExport.UseVisualStyleBackColor = true;
+            this.butExport.Click += new System.EventHandler(this.butExport_Click);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(6, 17);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(52, 13);
+            this.label1.TabIndex = 2;
+            this.label1.Text = "Filename:";
+            // 
+            // txtFilename
+            // 
+            this.txtFilename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtFilename.Location = new System.Drawing.Point(18, 34);
+            this.txtFilename.Name = "txtFilename";
+            this.txtFilename.Size = new System.Drawing.Size(420, 20);
+            this.txtFilename.TabIndex = 3;
+            this.txtFilename.TextChanged += new System.EventHandler(this.txtFilename_TextChanged);
+            // 
+            // butBrowse
+            // 
+            this.butBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.butBrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butBrowse.Location = new System.Drawing.Point(444, 32);
+            this.butBrowse.Name = "butBrowse";
+            this.butBrowse.Size = new System.Drawing.Size(43, 23);
+            this.butBrowse.TabIndex = 4;
+            this.butBrowse.Text = "...";
+            this.butBrowse.UseVisualStyleBackColor = true;
+            this.butBrowse.Click += new System.EventHandler(this.butBrowse_Click);
+            // 
+            // saveFileDialog
+            // 
+            this.saveFileDialog.DefaultExt = "babylon";
+            this.saveFileDialog.Filter = "Babylon files|*.babylon";
+            this.saveFileDialog.RestoreDirectory = true;
+            // 
+            // progressBar
+            // 
+            this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.progressBar.Location = new System.Drawing.Point(12, 516);
+            this.progressBar.Name = "progressBar";
+            this.progressBar.Size = new System.Drawing.Size(627, 23);
+            this.progressBar.TabIndex = 5;
+            // 
+            // treeView
+            // 
+            this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.treeView.Location = new System.Drawing.Point(12, 186);
+            this.treeView.Name = "treeView";
+            this.treeView.Size = new System.Drawing.Size(799, 324);
+            this.treeView.TabIndex = 6;
+            // 
+            // butCancel
+            // 
+            this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.butCancel.Enabled = false;
+            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butCancel.Location = new System.Drawing.Point(645, 516);
+            this.butCancel.Name = "butCancel";
+            this.butCancel.Size = new System.Drawing.Size(80, 23);
+            this.butCancel.TabIndex = 7;
+            this.butCancel.Text = "Cancel";
+            this.butCancel.UseVisualStyleBackColor = true;
+            this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
+            // 
+            // pictureBox2
+            // 
+            this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
+            this.pictureBox2.Location = new System.Drawing.Point(511, 12);
+            this.pictureBox2.Name = "pictureBox2";
+            this.pictureBox2.Size = new System.Drawing.Size(300, 130);
+            this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+            this.pictureBox2.TabIndex = 9;
+            this.pictureBox2.TabStop = false;
+            // 
+            // chkManifest
+            // 
+            this.chkManifest.AutoSize = true;
+            this.chkManifest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkManifest.Location = new System.Drawing.Point(18, 104);
+            this.chkManifest.Name = "chkManifest";
+            this.chkManifest.Size = new System.Drawing.Size(112, 17);
+            this.chkManifest.TabIndex = 2;
+            this.chkManifest.Text = "Generate .manifest";
+            this.chkManifest.UseVisualStyleBackColor = true;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(6, 62);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(46, 13);
+            this.label2.TabIndex = 11;
+            this.label2.Text = "Options:";
+            // 
+            // chkCopyTextures
+            // 
+            this.chkCopyTextures.AutoSize = true;
+            this.chkCopyTextures.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkCopyTextures.Location = new System.Drawing.Point(18, 81);
+            this.chkCopyTextures.Name = "chkCopyTextures";
+            this.chkCopyTextures.Size = new System.Drawing.Size(132, 17);
+            this.chkCopyTextures.TabIndex = 12;
+            this.chkCopyTextures.Text = "Copy textures to output";
+            this.chkCopyTextures.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Controls.Add(this.chkBinary);
+            this.groupBox1.Controls.Add(this.chkOnlySelected);
+            this.groupBox1.Controls.Add(this.chkAutoSave);
+            this.groupBox1.Controls.Add(this.chkHidden);
+            this.groupBox1.Controls.Add(this.label1);
+            this.groupBox1.Controls.Add(this.chkCopyTextures);
+            this.groupBox1.Controls.Add(this.txtFilename);
+            this.groupBox1.Controls.Add(this.chkManifest);
+            this.groupBox1.Controls.Add(this.butBrowse);
+            this.groupBox1.Controls.Add(this.label2);
+            this.groupBox1.Location = new System.Drawing.Point(12, 6);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(493, 136);
+            this.groupBox1.TabIndex = 13;
+            this.groupBox1.TabStop = false;
+            // 
+            // chkBinary
+            // 
+            this.chkBinary.AutoSize = true;
+            this.chkBinary.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkBinary.Location = new System.Drawing.Point(320, 104);
+            this.chkBinary.Name = "chkBinary";
+            this.chkBinary.Size = new System.Drawing.Size(135, 17);
+            this.chkBinary.TabIndex = 16;
+            this.chkBinary.Text = "Generate binary version";
+            this.chkBinary.UseVisualStyleBackColor = true;
+            // 
+            // chkOnlySelected
+            // 
+            this.chkOnlySelected.AutoSize = true;
+            this.chkOnlySelected.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkOnlySelected.Location = new System.Drawing.Point(320, 81);
+            this.chkOnlySelected.Name = "chkOnlySelected";
+            this.chkOnlySelected.Size = new System.Drawing.Size(118, 17);
+            this.chkOnlySelected.TabIndex = 15;
+            this.chkOnlySelected.Text = "Export only selected";
+            this.chkOnlySelected.UseVisualStyleBackColor = true;
+            // 
+            // chkAutoSave
+            // 
+            this.chkAutoSave.AutoSize = true;
+            this.chkAutoSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkAutoSave.Location = new System.Drawing.Point(166, 104);
+            this.chkAutoSave.Name = "chkAutoSave";
+            this.chkAutoSave.Size = new System.Drawing.Size(130, 17);
+            this.chkAutoSave.TabIndex = 14;
+            this.chkAutoSave.Text = "Auto save 3ds Max file";
+            this.chkAutoSave.UseVisualStyleBackColor = true;
+            // 
+            // chkHidden
+            // 
+            this.chkHidden.AutoSize = true;
+            this.chkHidden.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkHidden.Location = new System.Drawing.Point(166, 81);
+            this.chkHidden.Name = "chkHidden";
+            this.chkHidden.Size = new System.Drawing.Size(125, 17);
+            this.chkHidden.TabIndex = 13;
+            this.chkHidden.Text = "Export hidden objects";
+            this.chkHidden.UseVisualStyleBackColor = true;
+            // 
+            // butExportAndRun
+            // 
+            this.butExportAndRun.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.butExportAndRun.Enabled = false;
+            this.butExportAndRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butExportAndRun.Location = new System.Drawing.Point(414, 153);
+            this.butExportAndRun.Name = "butExportAndRun";
+            this.butExportAndRun.Size = new System.Drawing.Size(197, 27);
+            this.butExportAndRun.TabIndex = 14;
+            this.butExportAndRun.Text = "Export && Run";
+            this.butExportAndRun.UseVisualStyleBackColor = true;
+            this.butExportAndRun.Click += new System.EventHandler(this.butExportAndRun_Click);
+            // 
+            // butClose
+            // 
+            this.butClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.butClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butClose.Location = new System.Drawing.Point(731, 516);
+            this.butClose.Name = "butClose";
+            this.butClose.Size = new System.Drawing.Size(80, 23);
+            this.butClose.TabIndex = 7;
+            this.butClose.Text = "Close";
+            this.butClose.UseVisualStyleBackColor = true;
+            this.butClose.Click += new System.EventHandler(this.butClose_Click);
+            // 
+            // ExporterForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(823, 551);
+            this.Controls.Add(this.butExportAndRun);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.pictureBox2);
+            this.Controls.Add(this.butClose);
+            this.Controls.Add(this.butCancel);
+            this.Controls.Add(this.treeView);
+            this.Controls.Add(this.progressBar);
+            this.Controls.Add(this.butExport);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+            this.MinimumSize = new System.Drawing.Size(750, 400);
+            this.Name = "ExporterForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Babylon.js - Export scene to .babylon file";
+            this.Activated += new System.EventHandler(this.ExporterForm_Activated);
+            this.Deactivate += new System.EventHandler(this.ExporterForm_Deactivate);
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ExporterForm_FormClosed);
+            this.Load += new System.EventHandler(this.ExporterForm_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button butExport;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox txtFilename;
+        private System.Windows.Forms.Button butBrowse;
+        private System.Windows.Forms.SaveFileDialog saveFileDialog;
+        private System.Windows.Forms.ProgressBar progressBar;
+        private System.Windows.Forms.TreeView treeView;
+        private System.Windows.Forms.Button butCancel;
+        private System.Windows.Forms.PictureBox pictureBox2;
+        private System.Windows.Forms.CheckBox chkManifest;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.CheckBox chkCopyTextures;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.CheckBox chkHidden;
+        private System.Windows.Forms.CheckBox chkAutoSave;
+        private System.Windows.Forms.Button butExportAndRun;
+        private System.Windows.Forms.CheckBox chkOnlySelected;
+        private System.Windows.Forms.Button butClose;
+        private System.Windows.Forms.CheckBox chkBinary;
+    }
 }

+ 229 - 229
Exporters/3ds Max/Max2Babylon/Forms/ExporterForm.cs

@@ -1,229 +1,229 @@
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-using Color = System.Drawing.Color;
-
-namespace Max2Babylon
-{
-    public partial class ExporterForm : Form
-    {
-        private readonly BabylonExportActionItem babylonExportAction;
-        private BabylonExporter exporter;
-
-        TreeNode currentNode;
-        int currentRank;
-
-        public ExporterForm(BabylonExportActionItem babylonExportAction)
-        {
-            InitializeComponent();
-
-            this.babylonExportAction = babylonExportAction;
-        }
-
-        private void ExporterForm_Load(object sender, EventArgs e)
-        {
-            txtFilename.Text = Loader.Core.RootNode.GetLocalData();
-            Tools.PrepareCheckBox(chkManifest, Loader.Core.RootNode, "babylonjs_generatemanifest");
-            Tools.PrepareCheckBox(chkCopyTextures, Loader.Core.RootNode, "babylonjs_copytextures", 1);
-            Tools.PrepareCheckBox(chkHidden, Loader.Core.RootNode, "babylonjs_exporthidden");
-            Tools.PrepareCheckBox(chkAutoSave, Loader.Core.RootNode, "babylonjs_autosave", 1);
-            Tools.PrepareCheckBox(chkOnlySelected, Loader.Core.RootNode, "babylonjs_onlySelected");
-            Tools.PrepareCheckBox(chkBinary, Loader.Core.RootNode, "babylonjs_binary"); 
-        }
-
-        private void butBrowse_Click(object sender, EventArgs e)
-        {
-            if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
-            {
-                txtFilename.Text = saveFileDialog.FileName;
-            }
-        }
-
-        private async void butExport_Click(object sender, EventArgs e)
-        {
-            await DoExport();
-        }
-
-        private async Task<bool> DoExport()
-        {
-            Tools.UpdateCheckBox(chkManifest, Loader.Core.RootNode, "babylonjs_generatemanifest");
-            Tools.UpdateCheckBox(chkCopyTextures, Loader.Core.RootNode, "babylonjs_copytextures");
-            Tools.UpdateCheckBox(chkHidden, Loader.Core.RootNode, "babylonjs_exporthidden");
-            Tools.UpdateCheckBox(chkAutoSave, Loader.Core.RootNode, "babylonjs_autosave");
-            Tools.UpdateCheckBox(chkOnlySelected, Loader.Core.RootNode, "babylonjs_onlySelected");
-            Tools.UpdateCheckBox(chkBinary, Loader.Core.RootNode, "babylonjs_binary");
-
-            Loader.Core.RootNode.SetLocalData(txtFilename.Text);
-
-            exporter = new BabylonExporter();
-
-            treeView.Nodes.Clear();
-
-            exporter.OnImportProgressChanged += progress =>
-            {
-                progressBar.Value = progress;
-                Application.DoEvents();
-            };
-
-            exporter.OnWarning += (warning, rank) =>
-            {
-                try
-                {
-                    currentNode = CreateTreeNode(rank, warning, Color.DarkOrange);
-                    currentNode.EnsureVisible();
-                }
-                catch
-                {
-                }
-                Application.DoEvents();
-            };
-
-            exporter.OnError += (error, rank) =>
-            {
-                try
-                {
-                    currentNode = CreateTreeNode(rank, error, Color.Red);
-                    currentNode.EnsureVisible();
-                }
-                catch
-                {
-                }
-                Application.DoEvents();
-            };
-
-            exporter.OnMessage += (message, color, rank, emphasis) =>
-            {
-                try
-                {
-                    currentNode = CreateTreeNode(rank, message, color);
-
-                    if (emphasis)
-                    {
-                        currentNode.EnsureVisible();
-                    }
-                }
-                catch
-                {
-                }
-                Application.DoEvents();
-            };
-
-            butExport.Enabled = false;
-            butExportAndRun.Enabled = false;
-            butCancel.Enabled = true;
-
-            bool success = true;
-            try
-            {
-                exporter.AutoSave3dsMaxFile = chkAutoSave.Checked;
-                exporter.ExportHiddenObjects = chkHidden.Checked;
-                exporter.CopyTexturesToOutput = chkCopyTextures.Checked;
-                await exporter.ExportAsync(txtFilename.Text, chkManifest.Checked, chkOnlySelected.Checked, chkBinary.Checked, this);
-            }
-            catch (OperationCanceledException)
-            {
-                progressBar.Value = 0;
-                success = false;
-            }
-            catch (Exception ex)
-            {
-                currentNode = CreateTreeNode(0, "Exportation cancelled: " + ex.Message, Color.Red);
-
-                currentNode.EnsureVisible();
-                progressBar.Value = 0;
-                success = false;
-            }
-
-            butCancel.Enabled = false;
-            butExport.Enabled = true;
-            butExportAndRun.Enabled = WebServer.IsSupported;
-
-            BringToFront();
-
-            return success;
-        }
-
-        private TreeNode CreateTreeNode(int rank, string text, Color color)
-        {
-            TreeNode newNode = null;
-
-            Invoke(new Action(() =>
-            {
-                newNode = new TreeNode(text) {ForeColor = color};
-                if (rank == 0)
-                {
-                    treeView.Nodes.Add(newNode);
-                }
-                else if (rank == currentRank + 1)
-                {
-                    currentNode.Nodes.Add(newNode);
-                }
-                else
-                {
-                    var parentNode = currentNode;
-                    while (currentRank != rank - 1)
-                    {
-                        parentNode = parentNode.Parent;
-                        currentRank--;
-                    }
-                    parentNode.Nodes.Add(newNode);
-                }
-
-                currentRank = rank;
-            }));
-
-            return newNode;
-        }
-
-        private void ExporterForm_FormClosed(object sender, FormClosedEventArgs e)
-        {
-            if (exporter != null)
-            {
-                exporter.IsCancelled = true;                
-            }
-            babylonExportAction.Close();
-        }
-
-        private void txtFilename_TextChanged(object sender, EventArgs e)
-        {
-            butExport.Enabled = !string.IsNullOrEmpty(txtFilename.Text.Trim());
-            butExportAndRun.Enabled = butExport.Enabled && WebServer.IsSupported;
-        }
-
-        private void butCancel_Click(object sender, EventArgs e)
-        {
-            exporter.IsCancelled = true;
-        }
-
-        private void ExporterForm_Activated(object sender, EventArgs e)
-        {
-            Loader.Global.DisableAccelerators();
-        }
-
-        private void ExporterForm_Deactivate(object sender, EventArgs e)
-        {
-            Loader.Global.EnableAccelerators();
-        }
-
-        private async void butExportAndRun_Click(object sender, EventArgs e)
-        {
-            if (await DoExport())
-            {
-                WebServer.SceneFilename = Path.GetFileName(txtFilename.Text);
-                WebServer.SceneFolder = Path.GetDirectoryName(txtFilename.Text);
-
-                Process.Start("http://localhost:" + WebServer.Port);
-
-                WindowState = FormWindowState.Minimized;
-            }
-        }
-
-        private void butClose_Click(object sender, EventArgs e)
-        {
-            Close();
-        }
-    }
-}
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using Color = System.Drawing.Color;
+
+namespace Max2Babylon
+{
+    public partial class ExporterForm : Form
+    {
+        private readonly BabylonExportActionItem babylonExportAction;
+        private BabylonExporter exporter;
+
+        TreeNode currentNode;
+        int currentRank;
+
+        public ExporterForm(BabylonExportActionItem babylonExportAction)
+        {
+            InitializeComponent();
+
+            this.babylonExportAction = babylonExportAction;
+        }
+
+        private void ExporterForm_Load(object sender, EventArgs e)
+        {
+            txtFilename.Text = Loader.Core.RootNode.GetLocalData();
+            Tools.PrepareCheckBox(chkManifest, Loader.Core.RootNode, "babylonjs_generatemanifest");
+            Tools.PrepareCheckBox(chkCopyTextures, Loader.Core.RootNode, "babylonjs_copytextures", 1);
+            Tools.PrepareCheckBox(chkHidden, Loader.Core.RootNode, "babylonjs_exporthidden");
+            Tools.PrepareCheckBox(chkAutoSave, Loader.Core.RootNode, "babylonjs_autosave", 1);
+            Tools.PrepareCheckBox(chkOnlySelected, Loader.Core.RootNode, "babylonjs_onlySelected");
+            Tools.PrepareCheckBox(chkBinary, Loader.Core.RootNode, "babylonjs_binary"); 
+        }
+
+        private void butBrowse_Click(object sender, EventArgs e)
+        {
+            if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
+            {
+                txtFilename.Text = saveFileDialog.FileName;
+            }
+        }
+
+        private async void butExport_Click(object sender, EventArgs e)
+        {
+            await DoExport();
+        }
+
+        private async Task<bool> DoExport()
+        {
+            Tools.UpdateCheckBox(chkManifest, Loader.Core.RootNode, "babylonjs_generatemanifest");
+            Tools.UpdateCheckBox(chkCopyTextures, Loader.Core.RootNode, "babylonjs_copytextures");
+            Tools.UpdateCheckBox(chkHidden, Loader.Core.RootNode, "babylonjs_exporthidden");
+            Tools.UpdateCheckBox(chkAutoSave, Loader.Core.RootNode, "babylonjs_autosave");
+            Tools.UpdateCheckBox(chkOnlySelected, Loader.Core.RootNode, "babylonjs_onlySelected");
+            Tools.UpdateCheckBox(chkBinary, Loader.Core.RootNode, "babylonjs_binary");
+
+            Loader.Core.RootNode.SetLocalData(txtFilename.Text);
+
+            exporter = new BabylonExporter();
+
+            treeView.Nodes.Clear();
+
+            exporter.OnImportProgressChanged += progress =>
+            {
+                progressBar.Value = progress;
+                Application.DoEvents();
+            };
+
+            exporter.OnWarning += (warning, rank) =>
+            {
+                try
+                {
+                    currentNode = CreateTreeNode(rank, warning, Color.DarkOrange);
+                    currentNode.EnsureVisible();
+                }
+                catch
+                {
+                }
+                Application.DoEvents();
+            };
+
+            exporter.OnError += (error, rank) =>
+            {
+                try
+                {
+                    currentNode = CreateTreeNode(rank, error, Color.Red);
+                    currentNode.EnsureVisible();
+                }
+                catch
+                {
+                }
+                Application.DoEvents();
+            };
+
+            exporter.OnMessage += (message, color, rank, emphasis) =>
+            {
+                try
+                {
+                    currentNode = CreateTreeNode(rank, message, color);
+
+                    if (emphasis)
+                    {
+                        currentNode.EnsureVisible();
+                    }
+                }
+                catch
+                {
+                }
+                Application.DoEvents();
+            };
+
+            butExport.Enabled = false;
+            butExportAndRun.Enabled = false;
+            butCancel.Enabled = true;
+
+            bool success = true;
+            try
+            {
+                exporter.AutoSave3dsMaxFile = chkAutoSave.Checked;
+                exporter.ExportHiddenObjects = chkHidden.Checked;
+                exporter.CopyTexturesToOutput = chkCopyTextures.Checked;
+                await exporter.ExportAsync(txtFilename.Text, chkManifest.Checked, chkOnlySelected.Checked, chkBinary.Checked, this);
+            }
+            catch (OperationCanceledException)
+            {
+                progressBar.Value = 0;
+                success = false;
+            }
+            catch (Exception ex)
+            {
+                currentNode = CreateTreeNode(0, "Exportation cancelled: " + ex.Message, Color.Red);
+
+                currentNode.EnsureVisible();
+                progressBar.Value = 0;
+                success = false;
+            }
+
+            butCancel.Enabled = false;
+            butExport.Enabled = true;
+            butExportAndRun.Enabled = WebServer.IsSupported;
+
+            BringToFront();
+
+            return success;
+        }
+
+        private TreeNode CreateTreeNode(int rank, string text, Color color)
+        {
+            TreeNode newNode = null;
+
+            Invoke(new Action(() =>
+            {
+                newNode = new TreeNode(text) {ForeColor = color};
+                if (rank == 0)
+                {
+                    treeView.Nodes.Add(newNode);
+                }
+                else if (rank == currentRank + 1)
+                {
+                    currentNode.Nodes.Add(newNode);
+                }
+                else
+                {
+                    var parentNode = currentNode;
+                    while (currentRank != rank - 1)
+                    {
+                        parentNode = parentNode.Parent;
+                        currentRank--;
+                    }
+                    parentNode.Nodes.Add(newNode);
+                }
+
+                currentRank = rank;
+            }));
+
+            return newNode;
+        }
+
+        private void ExporterForm_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            if (exporter != null)
+            {
+                exporter.IsCancelled = true;                
+            }
+            babylonExportAction.Close();
+        }
+
+        private void txtFilename_TextChanged(object sender, EventArgs e)
+        {
+            butExport.Enabled = !string.IsNullOrEmpty(txtFilename.Text.Trim());
+            butExportAndRun.Enabled = butExport.Enabled && WebServer.IsSupported;
+        }
+
+        private void butCancel_Click(object sender, EventArgs e)
+        {
+            exporter.IsCancelled = true;
+        }
+
+        private void ExporterForm_Activated(object sender, EventArgs e)
+        {
+            Loader.Global.DisableAccelerators();
+        }
+
+        private void ExporterForm_Deactivate(object sender, EventArgs e)
+        {
+            Loader.Global.EnableAccelerators();
+        }
+
+        private async void butExportAndRun_Click(object sender, EventArgs e)
+        {
+            if (await DoExport())
+            {
+                WebServer.SceneFilename = Path.GetFileName(txtFilename.Text);
+                WebServer.SceneFolder = Path.GetDirectoryName(txtFilename.Text);
+
+                Process.Start("http://localhost:" + WebServer.Port);
+
+                WindowState = FormWindowState.Minimized;
+            }
+        }
+
+        private void butClose_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+    }
+}

+ 320 - 320
Exporters/3ds Max/Max2Babylon/Forms/ExporterForm.resx

@@ -1,321 +1,321 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        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
-        QmCC
-</value>
-  </data>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+        QmCC
+</value>
+  </data>
 </root>

+ 419 - 405
Exporters/3ds Max/Max2Babylon/Forms/LightPropertiesForm.Designer.cs

@@ -1,406 +1,420 @@
-namespace Max2Babylon
-{
-    partial class LightPropertiesForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.butOK = new System.Windows.Forms.Button();
-            this.butCancel = new System.Windows.Forms.Button();
-            this.groupBox3 = new System.Windows.Forms.GroupBox();
-            this.grpAutoAnimate = new System.Windows.Forms.GroupBox();
-            this.chkLoop = new System.Windows.Forms.CheckBox();
-            this.nupTo = new System.Windows.Forms.NumericUpDown();
-            this.label4 = new System.Windows.Forms.Label();
-            this.nupFrom = new System.Windows.Forms.NumericUpDown();
-            this.label5 = new System.Windows.Forms.Label();
-            this.chkAutoAnimate = new System.Windows.Forms.CheckBox();
-            this.groupBox4 = new System.Windows.Forms.GroupBox();
-            this.chkNoExport = new System.Windows.Forms.CheckBox();
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.grpBlurInfo = new System.Windows.Forms.GroupBox();
-            this.nupBlurBoxOffset = new System.Windows.Forms.NumericUpDown();
-            this.label3 = new System.Windows.Forms.Label();
-            this.label6 = new System.Windows.Forms.Label();
-            this.nupBlurScale = new System.Windows.Forms.NumericUpDown();
-            this.cbCameraType = new System.Windows.Forms.ComboBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.nupBias = new System.Windows.Forms.NumericUpDown();
-            this.label1 = new System.Windows.Forms.Label();
-            this.groupBox3.SuspendLayout();
-            this.grpAutoAnimate.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).BeginInit();
-            this.groupBox4.SuspendLayout();
-            this.groupBox1.SuspendLayout();
-            this.grpBlurInfo.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupBlurBoxOffset)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupBlurScale)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupBias)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // butOK
-            // 
-            this.butOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
-            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.butOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butOK.Location = new System.Drawing.Point(93, 454);
-            this.butOK.Name = "butOK";
-            this.butOK.Size = new System.Drawing.Size(75, 23);
-            this.butOK.TabIndex = 1;
-            this.butOK.Text = "OK";
-            this.butOK.UseVisualStyleBackColor = true;
-            this.butOK.Click += new System.EventHandler(this.butOK_Click);
-            // 
-            // butCancel
-            // 
-            this.butCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
-            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butCancel.Location = new System.Drawing.Point(174, 454);
-            this.butCancel.Name = "butCancel";
-            this.butCancel.Size = new System.Drawing.Size(75, 23);
-            this.butCancel.TabIndex = 2;
-            this.butCancel.Text = "Cancel";
-            this.butCancel.UseVisualStyleBackColor = true;
-            // 
-            // groupBox3
-            // 
-            this.groupBox3.Controls.Add(this.grpAutoAnimate);
-            this.groupBox3.Controls.Add(this.chkAutoAnimate);
-            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox3.Location = new System.Drawing.Point(12, 284);
-            this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(319, 156);
-            this.groupBox3.TabIndex = 5;
-            this.groupBox3.TabStop = false;
-            this.groupBox3.Text = "Animations";
-            // 
-            // grpAutoAnimate
-            // 
-            this.grpAutoAnimate.Controls.Add(this.chkLoop);
-            this.grpAutoAnimate.Controls.Add(this.nupTo);
-            this.grpAutoAnimate.Controls.Add(this.label4);
-            this.grpAutoAnimate.Controls.Add(this.nupFrom);
-            this.grpAutoAnimate.Controls.Add(this.label5);
-            this.grpAutoAnimate.Enabled = false;
-            this.grpAutoAnimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.grpAutoAnimate.Location = new System.Drawing.Point(21, 51);
-            this.grpAutoAnimate.Name = "grpAutoAnimate";
-            this.grpAutoAnimate.Size = new System.Drawing.Size(292, 99);
-            this.grpAutoAnimate.TabIndex = 3;
-            this.grpAutoAnimate.TabStop = false;
-            // 
-            // chkLoop
-            // 
-            this.chkLoop.AutoSize = true;
-            this.chkLoop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkLoop.Location = new System.Drawing.Point(9, 66);
-            this.chkLoop.Name = "chkLoop";
-            this.chkLoop.Size = new System.Drawing.Size(47, 17);
-            this.chkLoop.TabIndex = 5;
-            this.chkLoop.Text = "Loop";
-            this.chkLoop.ThreeState = true;
-            this.chkLoop.UseVisualStyleBackColor = true;
-            // 
-            // nupTo
-            // 
-            this.nupTo.Location = new System.Drawing.Point(47, 40);
-            this.nupTo.Maximum = new decimal(new int[] {
-            1000,
-            0,
-            0,
-            0});
-            this.nupTo.Name = "nupTo";
-            this.nupTo.Size = new System.Drawing.Size(120, 20);
-            this.nupTo.TabIndex = 3;
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(6, 42);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(23, 13);
-            this.label4.TabIndex = 4;
-            this.label4.Text = "To:";
-            // 
-            // nupFrom
-            // 
-            this.nupFrom.Location = new System.Drawing.Point(47, 14);
-            this.nupFrom.Maximum = new decimal(new int[] {
-            1000,
-            0,
-            0,
-            0});
-            this.nupFrom.Name = "nupFrom";
-            this.nupFrom.Size = new System.Drawing.Size(120, 20);
-            this.nupFrom.TabIndex = 1;
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(6, 16);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(33, 13);
-            this.label5.TabIndex = 2;
-            this.label5.Text = "From:";
-            // 
-            // chkAutoAnimate
-            // 
-            this.chkAutoAnimate.AutoSize = true;
-            this.chkAutoAnimate.Location = new System.Drawing.Point(21, 28);
-            this.chkAutoAnimate.Name = "chkAutoAnimate";
-            this.chkAutoAnimate.Size = new System.Drawing.Size(88, 17);
-            this.chkAutoAnimate.TabIndex = 0;
-            this.chkAutoAnimate.Text = "Auto animate";
-            this.chkAutoAnimate.ThreeState = true;
-            this.chkAutoAnimate.UseVisualStyleBackColor = true;
-            this.chkAutoAnimate.CheckedChanged += new System.EventHandler(this.chkAutoAnimate_CheckedChanged);
-            // 
-            // groupBox4
-            // 
-            this.groupBox4.Controls.Add(this.chkNoExport);
-            this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox4.Location = new System.Drawing.Point(12, 12);
-            this.groupBox4.Name = "groupBox4";
-            this.groupBox4.Size = new System.Drawing.Size(319, 59);
-            this.groupBox4.TabIndex = 7;
-            this.groupBox4.TabStop = false;
-            this.groupBox4.Text = "Misc.";
-            // 
-            // chkNoExport
-            // 
-            this.chkNoExport.AutoSize = true;
-            this.chkNoExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkNoExport.Location = new System.Drawing.Point(21, 28);
-            this.chkNoExport.Name = "chkNoExport";
-            this.chkNoExport.Size = new System.Drawing.Size(87, 17);
-            this.chkNoExport.TabIndex = 4;
-            this.chkNoExport.Text = "Do not export";
-            this.chkNoExport.ThreeState = true;
-            this.chkNoExport.UseVisualStyleBackColor = true;
-            // 
-            // groupBox1
-            // 
-            this.groupBox1.Controls.Add(this.grpBlurInfo);
-            this.groupBox1.Controls.Add(this.nupBias);
-            this.groupBox1.Controls.Add(this.label6);
-            this.groupBox1.Controls.Add(this.label1);
-            this.groupBox1.Controls.Add(this.cbCameraType);
-            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox1.Location = new System.Drawing.Point(12, 77);
-            this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(319, 201);
-            this.groupBox1.TabIndex = 6;
-            this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Shadows";
-            // 
-            // grpBlurInfo
-            // 
-            this.grpBlurInfo.Controls.Add(this.nupBlurBoxOffset);
-            this.grpBlurInfo.Controls.Add(this.label3);
-            this.grpBlurInfo.Controls.Add(this.nupBlurScale);
-            this.grpBlurInfo.Controls.Add(this.label2);
-            this.grpBlurInfo.Enabled = false;
-            this.grpBlurInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.grpBlurInfo.Location = new System.Drawing.Point(21, 108);
-            this.grpBlurInfo.Name = "grpBlurInfo";
-            this.grpBlurInfo.Size = new System.Drawing.Size(292, 87);
-            this.grpBlurInfo.TabIndex = 13;
-            this.grpBlurInfo.TabStop = false;
-            this.grpBlurInfo.Text = "Blur info";
-            // 
-            // nupBlurBoxOffset
-            // 
-            this.nupBlurBoxOffset.Location = new System.Drawing.Point(89, 50);
-            this.nupBlurBoxOffset.Maximum = new decimal(new int[] {
-            3,
-            0,
-            0,
-            0});
-            this.nupBlurBoxOffset.Minimum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.nupBlurBoxOffset.Name = "nupBlurBoxOffset";
-            this.nupBlurBoxOffset.Size = new System.Drawing.Size(120, 20);
-            this.nupBlurBoxOffset.TabIndex = 13;
-            this.nupBlurBoxOffset.Value = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(6, 52);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(77, 13);
-            this.label3.TabIndex = 14;
-            this.label3.Text = "Blur box offset:";
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(21, 55);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(34, 13);
-            this.label6.TabIndex = 8;
-            this.label6.Text = "Type:";
-            // 
-            // nupBlurScale
-            // 
-            this.nupBlurScale.Location = new System.Drawing.Point(89, 24);
-            this.nupBlurScale.Maximum = new decimal(new int[] {
-            10,
-            0,
-            0,
-            0});
-            this.nupBlurScale.Minimum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.nupBlurScale.Name = "nupBlurScale";
-            this.nupBlurScale.Size = new System.Drawing.Size(120, 20);
-            this.nupBlurScale.TabIndex = 11;
-            this.nupBlurScale.Value = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            // 
-            // cbCameraType
-            // 
-            this.cbCameraType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cbCameraType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.cbCameraType.FormattingEnabled = true;
-            this.cbCameraType.Items.AddRange(new object[] {
-            "Hard shadows",
-            "Poisson Sampling",
-            "Variance",
-            "Blurred Variance"});
-            this.cbCameraType.Location = new System.Drawing.Point(24, 71);
-            this.cbCameraType.Name = "cbCameraType";
-            this.cbCameraType.Size = new System.Drawing.Size(289, 21);
-            this.cbCameraType.TabIndex = 7;
-            this.cbCameraType.SelectedIndexChanged += new System.EventHandler(this.cbCameraType_SelectedIndexChanged);
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(6, 26);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(56, 13);
-            this.label2.TabIndex = 12;
-            this.label2.Text = "Blur scale:";
-            // 
-            // nupBias
-            // 
-            this.nupBias.DecimalPlaces = 5;
-            this.nupBias.Location = new System.Drawing.Point(57, 26);
-            this.nupBias.Maximum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.nupBias.Name = "nupBias";
-            this.nupBias.Size = new System.Drawing.Size(120, 20);
-            this.nupBias.TabIndex = 9;
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(21, 28);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(30, 13);
-            this.label1.TabIndex = 10;
-            this.label1.Text = "Bias:";
-            // 
-            // LightPropertiesForm
-            // 
-            this.AcceptButton = this.butOK;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.butCancel;
-            this.ClientSize = new System.Drawing.Size(343, 489);
-            this.Controls.Add(this.groupBox1);
-            this.Controls.Add(this.groupBox4);
-            this.Controls.Add(this.groupBox3);
-            this.Controls.Add(this.butCancel);
-            this.Controls.Add(this.butOK);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Name = "LightPropertiesForm";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "Babylon.js - Light Properties";
-            this.Load += new System.EventHandler(this.LightPropertiesForm_Load);
-            this.groupBox3.ResumeLayout(false);
-            this.groupBox3.PerformLayout();
-            this.grpAutoAnimate.ResumeLayout(false);
-            this.grpAutoAnimate.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).EndInit();
-            this.groupBox4.ResumeLayout(false);
-            this.groupBox4.PerformLayout();
-            this.groupBox1.ResumeLayout(false);
-            this.groupBox1.PerformLayout();
-            this.grpBlurInfo.ResumeLayout(false);
-            this.grpBlurInfo.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupBlurBoxOffset)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupBlurScale)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupBias)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Button butOK;
-        private System.Windows.Forms.Button butCancel;
-        private System.Windows.Forms.GroupBox groupBox3;
-        private System.Windows.Forms.GroupBox grpAutoAnimate;
-        private System.Windows.Forms.CheckBox chkLoop;
-        private System.Windows.Forms.NumericUpDown nupTo;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.NumericUpDown nupFrom;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.CheckBox chkAutoAnimate;
-        private System.Windows.Forms.GroupBox groupBox4;
-        private System.Windows.Forms.CheckBox chkNoExport;
-        private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.Label label6;
-        private System.Windows.Forms.ComboBox cbCameraType;
-        private System.Windows.Forms.NumericUpDown nupBlurScale;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.NumericUpDown nupBias;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.GroupBox grpBlurInfo;
-        private System.Windows.Forms.NumericUpDown nupBlurBoxOffset;
-        private System.Windows.Forms.Label label3;
-    }
+namespace Max2Babylon
+{
+    partial class LightPropertiesForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.butOK = new System.Windows.Forms.Button();
+            this.butCancel = new System.Windows.Forms.Button();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.grpAutoAnimate = new System.Windows.Forms.GroupBox();
+            this.chkLoop = new System.Windows.Forms.CheckBox();
+            this.nupTo = new System.Windows.Forms.NumericUpDown();
+            this.label4 = new System.Windows.Forms.Label();
+            this.nupFrom = new System.Windows.Forms.NumericUpDown();
+            this.label5 = new System.Windows.Forms.Label();
+            this.chkAutoAnimate = new System.Windows.Forms.CheckBox();
+            this.groupBox4 = new System.Windows.Forms.GroupBox();
+            this.chkNoExport = new System.Windows.Forms.CheckBox();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.grpBlurInfo = new System.Windows.Forms.GroupBox();
+            this.nupBlurBoxOffset = new System.Windows.Forms.NumericUpDown();
+            this.label3 = new System.Windows.Forms.Label();
+            this.nupBlurScale = new System.Windows.Forms.NumericUpDown();
+            this.label2 = new System.Windows.Forms.Label();
+            this.nupBias = new System.Windows.Forms.NumericUpDown();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.cbCameraType = new System.Windows.Forms.ComboBox();
+            this.ckForceBackFaces = new System.Windows.Forms.CheckBox();
+            this.groupBox3.SuspendLayout();
+            this.grpAutoAnimate.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).BeginInit();
+            this.groupBox4.SuspendLayout();
+            this.groupBox1.SuspendLayout();
+            this.grpBlurInfo.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupBlurBoxOffset)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupBlurScale)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupBias)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // butOK
+            // 
+            this.butOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.butOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butOK.Location = new System.Drawing.Point(93, 484);
+            this.butOK.Name = "butOK";
+            this.butOK.Size = new System.Drawing.Size(75, 23);
+            this.butOK.TabIndex = 1;
+            this.butOK.Text = "OK";
+            this.butOK.UseVisualStyleBackColor = true;
+            this.butOK.Click += new System.EventHandler(this.butOK_Click);
+            // 
+            // butCancel
+            // 
+            this.butCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butCancel.Location = new System.Drawing.Point(174, 484);
+            this.butCancel.Name = "butCancel";
+            this.butCancel.Size = new System.Drawing.Size(75, 23);
+            this.butCancel.TabIndex = 2;
+            this.butCancel.Text = "Cancel";
+            this.butCancel.UseVisualStyleBackColor = true;
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.grpAutoAnimate);
+            this.groupBox3.Controls.Add(this.chkAutoAnimate);
+            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox3.Location = new System.Drawing.Point(12, 319);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(319, 156);
+            this.groupBox3.TabIndex = 5;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "Animations";
+            // 
+            // grpAutoAnimate
+            // 
+            this.grpAutoAnimate.Controls.Add(this.chkLoop);
+            this.grpAutoAnimate.Controls.Add(this.nupTo);
+            this.grpAutoAnimate.Controls.Add(this.label4);
+            this.grpAutoAnimate.Controls.Add(this.nupFrom);
+            this.grpAutoAnimate.Controls.Add(this.label5);
+            this.grpAutoAnimate.Enabled = false;
+            this.grpAutoAnimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.grpAutoAnimate.Location = new System.Drawing.Point(21, 51);
+            this.grpAutoAnimate.Name = "grpAutoAnimate";
+            this.grpAutoAnimate.Size = new System.Drawing.Size(292, 99);
+            this.grpAutoAnimate.TabIndex = 3;
+            this.grpAutoAnimate.TabStop = false;
+            // 
+            // chkLoop
+            // 
+            this.chkLoop.AutoSize = true;
+            this.chkLoop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkLoop.Location = new System.Drawing.Point(9, 66);
+            this.chkLoop.Name = "chkLoop";
+            this.chkLoop.Size = new System.Drawing.Size(47, 17);
+            this.chkLoop.TabIndex = 5;
+            this.chkLoop.Text = "Loop";
+            this.chkLoop.ThreeState = true;
+            this.chkLoop.UseVisualStyleBackColor = true;
+            // 
+            // nupTo
+            // 
+            this.nupTo.Location = new System.Drawing.Point(47, 40);
+            this.nupTo.Maximum = new decimal(new int[] {
+            1000,
+            0,
+            0,
+            0});
+            this.nupTo.Name = "nupTo";
+            this.nupTo.Size = new System.Drawing.Size(120, 20);
+            this.nupTo.TabIndex = 3;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(6, 42);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(23, 13);
+            this.label4.TabIndex = 4;
+            this.label4.Text = "To:";
+            // 
+            // nupFrom
+            // 
+            this.nupFrom.Location = new System.Drawing.Point(47, 14);
+            this.nupFrom.Maximum = new decimal(new int[] {
+            1000,
+            0,
+            0,
+            0});
+            this.nupFrom.Name = "nupFrom";
+            this.nupFrom.Size = new System.Drawing.Size(120, 20);
+            this.nupFrom.TabIndex = 1;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(6, 16);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(33, 13);
+            this.label5.TabIndex = 2;
+            this.label5.Text = "From:";
+            // 
+            // chkAutoAnimate
+            // 
+            this.chkAutoAnimate.AutoSize = true;
+            this.chkAutoAnimate.Location = new System.Drawing.Point(21, 28);
+            this.chkAutoAnimate.Name = "chkAutoAnimate";
+            this.chkAutoAnimate.Size = new System.Drawing.Size(88, 17);
+            this.chkAutoAnimate.TabIndex = 0;
+            this.chkAutoAnimate.Text = "Auto animate";
+            this.chkAutoAnimate.ThreeState = true;
+            this.chkAutoAnimate.UseVisualStyleBackColor = true;
+            this.chkAutoAnimate.CheckedChanged += new System.EventHandler(this.chkAutoAnimate_CheckedChanged);
+            // 
+            // groupBox4
+            // 
+            this.groupBox4.Controls.Add(this.chkNoExport);
+            this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox4.Location = new System.Drawing.Point(12, 12);
+            this.groupBox4.Name = "groupBox4";
+            this.groupBox4.Size = new System.Drawing.Size(319, 59);
+            this.groupBox4.TabIndex = 7;
+            this.groupBox4.TabStop = false;
+            this.groupBox4.Text = "Misc.";
+            // 
+            // chkNoExport
+            // 
+            this.chkNoExport.AutoSize = true;
+            this.chkNoExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkNoExport.Location = new System.Drawing.Point(21, 28);
+            this.chkNoExport.Name = "chkNoExport";
+            this.chkNoExport.Size = new System.Drawing.Size(87, 17);
+            this.chkNoExport.TabIndex = 4;
+            this.chkNoExport.Text = "Do not export";
+            this.chkNoExport.ThreeState = true;
+            this.chkNoExport.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.ckForceBackFaces);
+            this.groupBox1.Controls.Add(this.grpBlurInfo);
+            this.groupBox1.Controls.Add(this.nupBias);
+            this.groupBox1.Controls.Add(this.label6);
+            this.groupBox1.Controls.Add(this.label1);
+            this.groupBox1.Controls.Add(this.cbCameraType);
+            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox1.Location = new System.Drawing.Point(12, 77);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(319, 236);
+            this.groupBox1.TabIndex = 6;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "Shadows";
+            // 
+            // grpBlurInfo
+            // 
+            this.grpBlurInfo.Controls.Add(this.nupBlurBoxOffset);
+            this.grpBlurInfo.Controls.Add(this.label3);
+            this.grpBlurInfo.Controls.Add(this.nupBlurScale);
+            this.grpBlurInfo.Controls.Add(this.label2);
+            this.grpBlurInfo.Enabled = false;
+            this.grpBlurInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.grpBlurInfo.Location = new System.Drawing.Point(18, 144);
+            this.grpBlurInfo.Name = "grpBlurInfo";
+            this.grpBlurInfo.Size = new System.Drawing.Size(292, 87);
+            this.grpBlurInfo.TabIndex = 13;
+            this.grpBlurInfo.TabStop = false;
+            this.grpBlurInfo.Text = "Blur info";
+            // 
+            // nupBlurBoxOffset
+            // 
+            this.nupBlurBoxOffset.Location = new System.Drawing.Point(89, 50);
+            this.nupBlurBoxOffset.Maximum = new decimal(new int[] {
+            3,
+            0,
+            0,
+            0});
+            this.nupBlurBoxOffset.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.nupBlurBoxOffset.Name = "nupBlurBoxOffset";
+            this.nupBlurBoxOffset.Size = new System.Drawing.Size(120, 20);
+            this.nupBlurBoxOffset.TabIndex = 13;
+            this.nupBlurBoxOffset.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(6, 52);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(77, 13);
+            this.label3.TabIndex = 14;
+            this.label3.Text = "Blur box offset:";
+            // 
+            // nupBlurScale
+            // 
+            this.nupBlurScale.Location = new System.Drawing.Point(89, 24);
+            this.nupBlurScale.Maximum = new decimal(new int[] {
+            10,
+            0,
+            0,
+            0});
+            this.nupBlurScale.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.nupBlurScale.Name = "nupBlurScale";
+            this.nupBlurScale.Size = new System.Drawing.Size(120, 20);
+            this.nupBlurScale.TabIndex = 11;
+            this.nupBlurScale.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(6, 26);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(56, 13);
+            this.label2.TabIndex = 12;
+            this.label2.Text = "Blur scale:";
+            // 
+            // nupBias
+            // 
+            this.nupBias.DecimalPlaces = 5;
+            this.nupBias.Location = new System.Drawing.Point(57, 26);
+            this.nupBias.Maximum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.nupBias.Name = "nupBias";
+            this.nupBias.Size = new System.Drawing.Size(120, 20);
+            this.nupBias.TabIndex = 9;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(18, 92);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(34, 13);
+            this.label6.TabIndex = 8;
+            this.label6.Text = "Type:";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(21, 28);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(30, 13);
+            this.label1.TabIndex = 10;
+            this.label1.Text = "Bias:";
+            // 
+            // cbCameraType
+            // 
+            this.cbCameraType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbCameraType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cbCameraType.FormattingEnabled = true;
+            this.cbCameraType.Items.AddRange(new object[] {
+            "Hard shadows",
+            "Poisson Sampling",
+            "Variance",
+            "Blurred Variance"});
+            this.cbCameraType.Location = new System.Drawing.Point(21, 108);
+            this.cbCameraType.Name = "cbCameraType";
+            this.cbCameraType.Size = new System.Drawing.Size(289, 21);
+            this.cbCameraType.TabIndex = 7;
+            this.cbCameraType.SelectedIndexChanged += new System.EventHandler(this.cbCameraType_SelectedIndexChanged);
+            // 
+            // ckForceBackFaces
+            // 
+            this.ckForceBackFaces.AutoSize = true;
+            this.ckForceBackFaces.Location = new System.Drawing.Point(24, 61);
+            this.ckForceBackFaces.Name = "ckForceBackFaces";
+            this.ckForceBackFaces.Size = new System.Drawing.Size(135, 17);
+            this.ckForceBackFaces.TabIndex = 14;
+            this.ckForceBackFaces.Text = "Force Back Faces only";
+            this.ckForceBackFaces.ThreeState = true;
+            this.ckForceBackFaces.UseVisualStyleBackColor = true;
+            // 
+            // LightPropertiesForm
+            // 
+            this.AcceptButton = this.butOK;
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.butCancel;
+            this.ClientSize = new System.Drawing.Size(343, 519);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.groupBox4);
+            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.butCancel);
+            this.Controls.Add(this.butOK);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "LightPropertiesForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Babylon.js - Light Properties";
+            this.Load += new System.EventHandler(this.LightPropertiesForm_Load);
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
+            this.grpAutoAnimate.ResumeLayout(false);
+            this.grpAutoAnimate.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupTo)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupFrom)).EndInit();
+            this.groupBox4.ResumeLayout(false);
+            this.groupBox4.PerformLayout();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.grpBlurInfo.ResumeLayout(false);
+            this.grpBlurInfo.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupBlurBoxOffset)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupBlurScale)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupBias)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button butOK;
+        private System.Windows.Forms.Button butCancel;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.GroupBox grpAutoAnimate;
+        private System.Windows.Forms.CheckBox chkLoop;
+        private System.Windows.Forms.NumericUpDown nupTo;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.NumericUpDown nupFrom;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.CheckBox chkAutoAnimate;
+        private System.Windows.Forms.GroupBox groupBox4;
+        private System.Windows.Forms.CheckBox chkNoExport;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.ComboBox cbCameraType;
+        private System.Windows.Forms.NumericUpDown nupBlurScale;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.NumericUpDown nupBias;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.GroupBox grpBlurInfo;
+        private System.Windows.Forms.NumericUpDown nupBlurBoxOffset;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.CheckBox ckForceBackFaces;
+    }
 }

+ 67 - 65
Exporters/3ds Max/Max2Babylon/Forms/LightPropertiesForm.cs

@@ -1,65 +1,67 @@
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using Autodesk.Max;
-
-namespace Max2Babylon
-{
-    public partial class LightPropertiesForm : Form
-    {
-        private readonly List<IINode> lights = new List<IINode>();
-
-        public LightPropertiesForm()
-        {
-            InitializeComponent();
-        }
-
-        private void LightPropertiesForm_Load(object sender, EventArgs e)
-        {
-            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
-            {
-                var node = Loader.Core.GetSelNode(index);
-
-                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Light)
-                {
-                    lights.Add(node);
-                }
-            }
-
-            Tools.PrepareCheckBox(chkNoExport, lights, "babylonjs_noexport");
-            Tools.PrepareCheckBox(chkAutoAnimate, lights, "babylonjs_autoanimate");
-            Tools.PrepareCheckBox(chkLoop, lights, "babylonjs_autoanimateloop");
-            Tools.PrepareNumericUpDown(nupFrom, lights, "babylonjs_autoanimate_from");
-            Tools.PrepareNumericUpDown(nupTo, lights, "babylonjs_autoanimate_to", 100.0f);
-
-            Tools.PrepareNumericUpDown(nupBias, lights, "babylonjs_shadows_bias", 0.00005f);
-            Tools.PrepareNumericUpDown(nupBlurScale, lights, "babylonjs_shadows_blurScale", 2);
-            Tools.PrepareNumericUpDown(nupBlurBoxOffset, lights, "babylonjs_shadows_blurBoxOffset", 1);
-            Tools.PrepareComboBox(cbCameraType, lights[0], "babylonjs_shadows_type", "Blurred Variance");
-        }
-
-        private void butOK_Click(object sender, EventArgs e)
-        {
-            Tools.UpdateCheckBox(chkNoExport, lights, "babylonjs_noexport");
-            Tools.UpdateCheckBox(chkAutoAnimate, lights, "babylonjs_autoanimate");
-            Tools.UpdateCheckBox(chkLoop, lights, "babylonjs_autoanimateloop");
-            Tools.UpdateNumericUpDown(nupFrom, lights, "babylonjs_autoanimate_from");
-            Tools.UpdateNumericUpDown(nupTo, lights, "babylonjs_autoanimate_to");
-
-            Tools.UpdateNumericUpDown(nupBias, lights, "babylonjs_shadows_bias");
-            Tools.UpdateNumericUpDown(nupBlurScale, lights, "babylonjs_shadows_blurScale");
-            Tools.UpdateNumericUpDown(nupBlurBoxOffset, lights, "babylonjs_shadows_blurBoxOffset");
-            Tools.UpdateComboBox(cbCameraType, lights, "babylonjs_shadows_type");
-        }
-
-        private void chkAutoAnimate_CheckedChanged(object sender, EventArgs e)
-        {
-            grpAutoAnimate.Enabled = chkAutoAnimate.Checked;
-        }
-
-        private void cbCameraType_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            grpBlurInfo.Enabled = (cbCameraType.SelectedIndex == 3);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Autodesk.Max;
+
+namespace Max2Babylon
+{
+    public partial class LightPropertiesForm : Form
+    {
+        private readonly List<IINode> lights = new List<IINode>();
+
+        public LightPropertiesForm()
+        {
+            InitializeComponent();
+        }
+
+        private void LightPropertiesForm_Load(object sender, EventArgs e)
+        {
+            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
+            {
+                var node = Loader.Core.GetSelNode(index);
+
+                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Light)
+                {
+                    lights.Add(node);
+                }
+            }
+
+            Tools.PrepareCheckBox(chkNoExport, lights, "babylonjs_noexport");
+            Tools.PrepareCheckBox(chkAutoAnimate, lights, "babylonjs_autoanimate");
+            Tools.PrepareCheckBox(chkLoop, lights, "babylonjs_autoanimateloop");
+            Tools.PrepareCheckBox(ckForceBackFaces, lights, "babylonjs_forcebackfaces");
+            Tools.PrepareNumericUpDown(nupFrom, lights, "babylonjs_autoanimate_from");
+            Tools.PrepareNumericUpDown(nupTo, lights, "babylonjs_autoanimate_to", 100.0f);
+
+            Tools.PrepareNumericUpDown(nupBias, lights, "babylonjs_shadows_bias", 0.00005f);
+            Tools.PrepareNumericUpDown(nupBlurScale, lights, "babylonjs_shadows_blurScale", 2);
+            Tools.PrepareNumericUpDown(nupBlurBoxOffset, lights, "babylonjs_shadows_blurBoxOffset", 1);
+            Tools.PrepareComboBox(cbCameraType, lights[0], "babylonjs_shadows_type", "Blurred Variance");
+        }
+
+        private void butOK_Click(object sender, EventArgs e)
+        {
+            Tools.UpdateCheckBox(chkNoExport, lights, "babylonjs_noexport");
+            Tools.UpdateCheckBox(chkAutoAnimate, lights, "babylonjs_autoanimate");
+            Tools.UpdateCheckBox(chkLoop, lights, "babylonjs_autoanimateloop");
+            Tools.UpdateCheckBox(ckForceBackFaces, lights, "babylonjs_forcebackfaces");
+            Tools.UpdateNumericUpDown(nupFrom, lights, "babylonjs_autoanimate_from");
+            Tools.UpdateNumericUpDown(nupTo, lights, "babylonjs_autoanimate_to");
+
+            Tools.UpdateNumericUpDown(nupBias, lights, "babylonjs_shadows_bias");
+            Tools.UpdateNumericUpDown(nupBlurScale, lights, "babylonjs_shadows_blurScale");
+            Tools.UpdateNumericUpDown(nupBlurBoxOffset, lights, "babylonjs_shadows_blurBoxOffset");
+            Tools.UpdateComboBox(cbCameraType, lights, "babylonjs_shadows_type");
+        }
+
+        private void chkAutoAnimate_CheckedChanged(object sender, EventArgs e)
+        {
+            grpAutoAnimate.Enabled = chkAutoAnimate.Checked;
+        }
+
+        private void cbCameraType_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            grpBlurInfo.Enabled = (cbCameraType.SelectedIndex == 3);
+        }
+    }
+}

+ 119 - 119
Exporters/3ds Max/Max2Babylon/Forms/LightPropertiesForm.resx

@@ -1,120 +1,120 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

File diff ditekan karena terlalu besar
+ 943 - 943
Exporters/3ds Max/Max2Babylon/Forms/ObjectPropertiesForm.Designer.cs


+ 122 - 122
Exporters/3ds Max/Max2Babylon/Forms/ObjectPropertiesForm.cs

@@ -1,122 +1,122 @@
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using Autodesk.Max;
-
-namespace Max2Babylon
-{
-    public partial class ObjectPropertiesForm : Form
-    {
-        private readonly List<IINode> objects = new List<IINode>();
-
-        public ObjectPropertiesForm()
-        {
-            InitializeComponent();
-        }
-
-        private void butOK_Click(object sender, EventArgs e)
-        {
-            Tools.UpdateCheckBox(chkNoExport, objects, "babylonjs_noexport");
-            Tools.UpdateCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
-            Tools.UpdateCheckBox(chkPickable, objects, "babylonjs_checkpickable");
-            Tools.UpdateCheckBox(chkOptimize, objects, "babylonjs_optimizevertices");
-            Tools.UpdateCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
-            Tools.UpdateCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");
-
-            Tools.UpdateCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate");
-            Tools.UpdateCheckBox(chkLoop, objects, "babylonjs_autoanimateloop");
-            Tools.UpdateNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
-            Tools.UpdateNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to");
-
-            Tools.UpdateNumericUpDown(nupAlphaIndex, objects, "babylonjs_alphaindex");
-            Tools.UpdateNumericUpDown(nupMass, objects, "babylonjs_mass");
-            Tools.UpdateNumericUpDown(nupFriction, objects, "babylonjs_friction");
-            Tools.UpdateNumericUpDown(nupRestitution, objects, "babylonjs_restitution");
-            Tools.UpdateComboBox(cbImpostor, objects, "babylonjs_impostor");
-
-            Tools.UpdateCheckBox(chkAutoPlay, objects, "babylonjs_sound_autoplay");
-            Tools.UpdateCheckBox(chkLoop, objects, "babylonjs_sound_loop");
-            Tools.UpdateNumericUpDown(nupVolume, objects, "babylonjs_sound_volume");
-            Tools.UpdateNumericUpDown(nupPlaybackRate, objects, "babylonjs_sound_playbackrate");
-
-            Tools.UpdateComboBox(cbDistanceModel, objects, "babylonjs_sound_distancemodel");
-            Tools.UpdateNumericUpDown(nupMaxDistance, objects, "babylonjs_sound_maxdistance");
-            Tools.UpdateNumericUpDown(nupRolloff, objects, "babylonjs_sound_rolloff");
-            Tools.UpdateNumericUpDown(nupRefDistance, objects, "babylonjs_sound_refdistance");
-
-            Tools.UpdateCheckBox(chkDirectional, objects, "babylonjs_sound_directional");
-            Tools.UpdateNumericUpDown(nupConeInnerAngle, objects, "babylonjs_sound_coneinnerangle");
-            Tools.UpdateNumericUpDown(nupConeOuterAngle, objects, "babylonjs_sound_coneouterangle");
-            Tools.UpdateNumericUpDown(nupConeOuterGain, objects, "babylonjs_sound_coneoutergain");
-
-            Tools.UpdateTextBox(txtSound, objects, "babylonjs_sound_filename");
-        }
-
-        private void ObjectPropertiesForm_Load(object sender, EventArgs e)
-        {
-            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
-            {
-                var node = Loader.Core.GetSelNode(index);
-
-                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Geomobject)
-                {
-                    objects.Add(node);
-                }
-            }
-
-            Tools.PrepareCheckBox(chkNoExport, objects, "babylonjs_noexport");
-            Tools.PrepareCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
-            Tools.PrepareCheckBox(chkPickable, objects, "babylonjs_checkpickable");
-            Tools.PrepareCheckBox(chkOptimize, objects, "babylonjs_optimizevertices");
-            Tools.PrepareCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
-            Tools.PrepareCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");
-
-            Tools.PrepareCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate", 1);
-            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_autoanimateloop", 1);
-            Tools.PrepareNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
-            Tools.PrepareNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to", 100.0f);
-            Tools.PrepareNumericUpDown(nupAlphaIndex, objects, "babylonjs_alphaindex", 1000);
-
-            Tools.PrepareNumericUpDown(nupMass, objects, "babylonjs_mass");
-            Tools.PrepareNumericUpDown(nupFriction, objects, "babylonjs_friction", 0.2f);
-            Tools.PrepareNumericUpDown(nupRestitution, objects, "babylonjs_restitution", 0.2f);
-
-            Tools.PrepareComboBox(cbImpostor, objects[0], "babylonjs_impostor", "None");
-
-            Tools.PrepareCheckBox(chkAutoPlay, objects, "babylonjs_sound_autoplay", 1);
-            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_sound_loop", 1);
-            Tools.PrepareNumericUpDown(nupVolume, objects, "babylonjs_sound_volume", 1.0f);
-            Tools.PrepareNumericUpDown(nupPlaybackRate, objects, "babylonjs_sound_playbackrate", 1.0f);
-
-            Tools.PrepareComboBox(cbDistanceModel, objects[0], "babylonjs_sound_distancemodel", "linear");
-            Tools.PrepareNumericUpDown(nupMaxDistance, objects, "babylonjs_sound_maxdistance", 100.0f);
-            Tools.PrepareNumericUpDown(nupRolloff, objects, "babylonjs_sound_rolloff", 1.0f);
-            Tools.PrepareNumericUpDown(nupRefDistance, objects, "babylonjs_sound_refdistance", 1.0f);
-
-            Tools.PrepareCheckBox(chkDirectional, objects, "babylonjs_sound_directional", 0);
-            Tools.PrepareNumericUpDown(nupConeInnerAngle, objects, "babylonjs_sound_coneinnerangle", 360.00f);
-            Tools.PrepareNumericUpDown(nupConeOuterAngle, objects, "babylonjs_sound_coneouterangle", 360.00f);
-            Tools.PrepareNumericUpDown(nupConeOuterGain, objects, "babylonjs_sound_coneoutergain", 1.0f);
-
-            Tools.PrepareTextBox(txtSound, objects[0], "babylonjs_sound_filename");
-        }
-
-        private void chkAutoAnimate_CheckedChanged(object sender, EventArgs e)
-        {
-            grpAutoAnimate.Enabled = chkAutoAnimate.Checked;
-        }
-
-        private void chkDirectional_CheckedChanged(object sender, EventArgs e)
-        {
-            grpDirectional.Enabled = chkDirectional.Checked;
-        }
-
-        private void cmdFileBrowse_Click(object sender, EventArgs e)
-        {
-            if (ofdOpenSound.ShowDialog() == DialogResult.OK)
-            {
-                txtSound.Text = ofdOpenSound.FileName;
-            }
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Autodesk.Max;
+
+namespace Max2Babylon
+{
+    public partial class ObjectPropertiesForm : Form
+    {
+        private readonly List<IINode> objects = new List<IINode>();
+
+        public ObjectPropertiesForm()
+        {
+            InitializeComponent();
+        }
+
+        private void butOK_Click(object sender, EventArgs e)
+        {
+            Tools.UpdateCheckBox(chkNoExport, objects, "babylonjs_noexport");
+            Tools.UpdateCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
+            Tools.UpdateCheckBox(chkPickable, objects, "babylonjs_checkpickable");
+            Tools.UpdateCheckBox(chkOptimize, objects, "babylonjs_optimizevertices");
+            Tools.UpdateCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
+            Tools.UpdateCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");
+
+            Tools.UpdateCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate");
+            Tools.UpdateCheckBox(chkLoop, objects, "babylonjs_autoanimateloop");
+            Tools.UpdateNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
+            Tools.UpdateNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to");
+
+            Tools.UpdateNumericUpDown(nupAlphaIndex, objects, "babylonjs_alphaindex");
+            Tools.UpdateNumericUpDown(nupMass, objects, "babylonjs_mass");
+            Tools.UpdateNumericUpDown(nupFriction, objects, "babylonjs_friction");
+            Tools.UpdateNumericUpDown(nupRestitution, objects, "babylonjs_restitution");
+            Tools.UpdateComboBox(cbImpostor, objects, "babylonjs_impostor");
+
+            Tools.UpdateCheckBox(chkAutoPlay, objects, "babylonjs_sound_autoplay");
+            Tools.UpdateCheckBox(chkLoop, objects, "babylonjs_sound_loop");
+            Tools.UpdateNumericUpDown(nupVolume, objects, "babylonjs_sound_volume");
+            Tools.UpdateNumericUpDown(nupPlaybackRate, objects, "babylonjs_sound_playbackrate");
+
+            Tools.UpdateComboBox(cbDistanceModel, objects, "babylonjs_sound_distancemodel");
+            Tools.UpdateNumericUpDown(nupMaxDistance, objects, "babylonjs_sound_maxdistance");
+            Tools.UpdateNumericUpDown(nupRolloff, objects, "babylonjs_sound_rolloff");
+            Tools.UpdateNumericUpDown(nupRefDistance, objects, "babylonjs_sound_refdistance");
+
+            Tools.UpdateCheckBox(chkDirectional, objects, "babylonjs_sound_directional");
+            Tools.UpdateNumericUpDown(nupConeInnerAngle, objects, "babylonjs_sound_coneinnerangle");
+            Tools.UpdateNumericUpDown(nupConeOuterAngle, objects, "babylonjs_sound_coneouterangle");
+            Tools.UpdateNumericUpDown(nupConeOuterGain, objects, "babylonjs_sound_coneoutergain");
+
+            Tools.UpdateTextBox(txtSound, objects, "babylonjs_sound_filename");
+        }
+
+        private void ObjectPropertiesForm_Load(object sender, EventArgs e)
+        {
+            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
+            {
+                var node = Loader.Core.GetSelNode(index);
+
+                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Geomobject)
+                {
+                    objects.Add(node);
+                }
+            }
+
+            Tools.PrepareCheckBox(chkNoExport, objects, "babylonjs_noexport");
+            Tools.PrepareCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
+            Tools.PrepareCheckBox(chkPickable, objects, "babylonjs_checkpickable");
+            Tools.PrepareCheckBox(chkOptimize, objects, "babylonjs_optimizevertices");
+            Tools.PrepareCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
+            Tools.PrepareCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");
+
+            Tools.PrepareCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate", 1);
+            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_autoanimateloop", 1);
+            Tools.PrepareNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
+            Tools.PrepareNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to", 100.0f);
+            Tools.PrepareNumericUpDown(nupAlphaIndex, objects, "babylonjs_alphaindex", 1000);
+
+            Tools.PrepareNumericUpDown(nupMass, objects, "babylonjs_mass");
+            Tools.PrepareNumericUpDown(nupFriction, objects, "babylonjs_friction", 0.2f);
+            Tools.PrepareNumericUpDown(nupRestitution, objects, "babylonjs_restitution", 0.2f);
+
+            Tools.PrepareComboBox(cbImpostor, objects[0], "babylonjs_impostor", "None");
+
+            Tools.PrepareCheckBox(chkAutoPlay, objects, "babylonjs_sound_autoplay", 1);
+            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_sound_loop", 1);
+            Tools.PrepareNumericUpDown(nupVolume, objects, "babylonjs_sound_volume", 1.0f);
+            Tools.PrepareNumericUpDown(nupPlaybackRate, objects, "babylonjs_sound_playbackrate", 1.0f);
+
+            Tools.PrepareComboBox(cbDistanceModel, objects[0], "babylonjs_sound_distancemodel", "linear");
+            Tools.PrepareNumericUpDown(nupMaxDistance, objects, "babylonjs_sound_maxdistance", 100.0f);
+            Tools.PrepareNumericUpDown(nupRolloff, objects, "babylonjs_sound_rolloff", 1.0f);
+            Tools.PrepareNumericUpDown(nupRefDistance, objects, "babylonjs_sound_refdistance", 1.0f);
+
+            Tools.PrepareCheckBox(chkDirectional, objects, "babylonjs_sound_directional", 0);
+            Tools.PrepareNumericUpDown(nupConeInnerAngle, objects, "babylonjs_sound_coneinnerangle", 360.00f);
+            Tools.PrepareNumericUpDown(nupConeOuterAngle, objects, "babylonjs_sound_coneouterangle", 360.00f);
+            Tools.PrepareNumericUpDown(nupConeOuterGain, objects, "babylonjs_sound_coneoutergain", 1.0f);
+
+            Tools.PrepareTextBox(txtSound, objects[0], "babylonjs_sound_filename");
+        }
+
+        private void chkAutoAnimate_CheckedChanged(object sender, EventArgs e)
+        {
+            grpAutoAnimate.Enabled = chkAutoAnimate.Checked;
+        }
+
+        private void chkDirectional_CheckedChanged(object sender, EventArgs e)
+        {
+            grpDirectional.Enabled = chkDirectional.Checked;
+        }
+
+        private void cmdFileBrowse_Click(object sender, EventArgs e)
+        {
+            if (ofdOpenSound.ShowDialog() == DialogResult.OK)
+            {
+                txtSound.Text = ofdOpenSound.FileName;
+            }
+        }
+    }
+}

+ 122 - 122
Exporters/3ds Max/Max2Babylon/Forms/ObjectPropertiesForm.resx

@@ -1,123 +1,123 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="ofdOpenSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="ofdOpenSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 286 - 272
Exporters/3ds Max/Max2Babylon/Forms/ScenePropertiesForm.Designer.cs

@@ -1,273 +1,287 @@
-namespace Max2Babylon
-{
-    partial class ScenePropertiesForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.gravityControl = new Max2Babylon.Vector3Control();
-            this.label3 = new System.Windows.Forms.Label();
-            this.butCancel = new System.Windows.Forms.Button();
-            this.butOK = new System.Windows.Forms.Button();
-            this.groupBox2 = new System.Windows.Forms.GroupBox();
-            this.chkQuaternions = new System.Windows.Forms.CheckBox();
-            this.groupBox3 = new System.Windows.Forms.GroupBox();
-            this.cmdBrowse = new System.Windows.Forms.Button();
-            this.txtSound = new System.Windows.Forms.TextBox();
-            this.chkLoop = new System.Windows.Forms.CheckBox();
-            this.chkAutoPlay = new System.Windows.Forms.CheckBox();
-            this.ofdOpenSound = new System.Windows.Forms.OpenFileDialog();
-            this.nupVolume = new System.Windows.Forms.NumericUpDown();
-            this.lblVolume = new System.Windows.Forms.Label();
-            this.groupBox1.SuspendLayout();
-            this.groupBox2.SuspendLayout();
-            this.groupBox3.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupVolume)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // groupBox1
-            // 
-            this.groupBox1.Controls.Add(this.gravityControl);
-            this.groupBox1.Controls.Add(this.label3);
-            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox1.Location = new System.Drawing.Point(12, 12);
-            this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(319, 87);
-            this.groupBox1.TabIndex = 0;
-            this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Collisions";
-            // 
-            // gravityControl
-            // 
-            this.gravityControl.Location = new System.Drawing.Point(21, 44);
-            this.gravityControl.Name = "gravityControl";
-            this.gravityControl.Size = new System.Drawing.Size(294, 28);
-            this.gravityControl.TabIndex = 5;
-            this.gravityControl.X = 0F;
-            this.gravityControl.Y = 0F;
-            this.gravityControl.Z = 0F;
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(18, 28);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(43, 13);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "Gravity:";
-            // 
-            // butCancel
-            // 
-            this.butCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
-            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butCancel.Location = new System.Drawing.Point(174, 351);
-            this.butCancel.Name = "butCancel";
-            this.butCancel.Size = new System.Drawing.Size(75, 23);
-            this.butCancel.TabIndex = 4;
-            this.butCancel.Text = "Cancel";
-            this.butCancel.UseVisualStyleBackColor = true;
-            // 
-            // butOK
-            // 
-            this.butOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
-            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.butOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.butOK.Location = new System.Drawing.Point(93, 351);
-            this.butOK.Name = "butOK";
-            this.butOK.Size = new System.Drawing.Size(75, 23);
-            this.butOK.TabIndex = 3;
-            this.butOK.Text = "OK";
-            this.butOK.UseVisualStyleBackColor = true;
-            this.butOK.Click += new System.EventHandler(this.butOK_Click);
-            // 
-            // groupBox2
-            // 
-            this.groupBox2.Controls.Add(this.chkQuaternions);
-            this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox2.Location = new System.Drawing.Point(12, 105);
-            this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(319, 87);
-            this.groupBox2.TabIndex = 5;
-            this.groupBox2.TabStop = false;
-            this.groupBox2.Text = "Advanced";
-            // 
-            // chkQuaternions
-            // 
-            this.chkQuaternions.AutoSize = true;
-            this.chkQuaternions.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkQuaternions.Location = new System.Drawing.Point(21, 28);
-            this.chkQuaternions.Name = "chkQuaternions";
-            this.chkQuaternions.Size = new System.Drawing.Size(221, 17);
-            this.chkQuaternions.TabIndex = 2;
-            this.chkQuaternions.Text = "Export quaternions instead of Euler angles";
-            this.chkQuaternions.UseVisualStyleBackColor = true;
-            // 
-            // groupBox3
-            // 
-            this.groupBox3.Controls.Add(this.nupVolume);
-            this.groupBox3.Controls.Add(this.lblVolume);
-            this.groupBox3.Controls.Add(this.cmdBrowse);
-            this.groupBox3.Controls.Add(this.txtSound);
-            this.groupBox3.Controls.Add(this.chkLoop);
-            this.groupBox3.Controls.Add(this.chkAutoPlay);
-            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.groupBox3.Location = new System.Drawing.Point(12, 198);
-            this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(319, 136);
-            this.groupBox3.TabIndex = 6;
-            this.groupBox3.TabStop = false;
-            this.groupBox3.Text = "Sound";
-            // 
-            // cmdBrowse
-            // 
-            this.cmdBrowse.Anchor = System.Windows.Forms.AnchorStyles.Right;
-            this.cmdBrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.cmdBrowse.Location = new System.Drawing.Point(276, 28);
-            this.cmdBrowse.Name = "cmdBrowse";
-            this.cmdBrowse.Size = new System.Drawing.Size(37, 23);
-            this.cmdBrowse.TabIndex = 6;
-            this.cmdBrowse.Text = "...";
-            this.cmdBrowse.UseVisualStyleBackColor = true;
-            this.cmdBrowse.Click += new System.EventHandler(this.cmdBrowse_Click);
-            // 
-            // txtSound
-            // 
-            this.txtSound.Location = new System.Drawing.Point(21, 28);
-            this.txtSound.Name = "txtSound";
-            this.txtSound.Size = new System.Drawing.Size(249, 20);
-            this.txtSound.TabIndex = 5;
-            // 
-            // chkLoop
-            // 
-            this.chkLoop.AutoSize = true;
-            this.chkLoop.Checked = true;
-            this.chkLoop.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.chkLoop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkLoop.Location = new System.Drawing.Point(21, 77);
-            this.chkLoop.Name = "chkLoop";
-            this.chkLoop.Size = new System.Drawing.Size(47, 17);
-            this.chkLoop.TabIndex = 4;
-            this.chkLoop.Text = "Loop";
-            this.chkLoop.UseVisualStyleBackColor = true;
-            // 
-            // chkAutoPlay
-            // 
-            this.chkAutoPlay.AutoSize = true;
-            this.chkAutoPlay.Checked = true;
-            this.chkAutoPlay.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.chkAutoPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.chkAutoPlay.Location = new System.Drawing.Point(21, 54);
-            this.chkAutoPlay.Name = "chkAutoPlay";
-            this.chkAutoPlay.Size = new System.Drawing.Size(67, 17);
-            this.chkAutoPlay.TabIndex = 3;
-            this.chkAutoPlay.Text = "Auto play";
-            this.chkAutoPlay.UseVisualStyleBackColor = true;
-            // 
-            // ofdOpenSound
-            // 
-            this.ofdOpenSound.Filter = "Sound files|*.wav;*.mp3";
-            // 
-            // nupVolume
-            // 
-            this.nupVolume.DecimalPlaces = 2;
-            this.nupVolume.Increment = new decimal(new int[] {
-            1,
-            0,
-            0,
-            65536});
-            this.nupVolume.Location = new System.Drawing.Point(150, 108);
-            this.nupVolume.Maximum = new decimal(new int[] {
-            10,
-            0,
-            0,
-            0});
-            this.nupVolume.Name = "nupVolume";
-            this.nupVolume.Size = new System.Drawing.Size(120, 20);
-            this.nupVolume.TabIndex = 10;
-            this.nupVolume.Value = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            // 
-            // lblVolume
-            // 
-            this.lblVolume.AutoSize = true;
-            this.lblVolume.Location = new System.Drawing.Point(18, 110);
-            this.lblVolume.Name = "lblVolume";
-            this.lblVolume.Size = new System.Drawing.Size(45, 13);
-            this.lblVolume.TabIndex = 9;
-            this.lblVolume.Text = "Volume:";
-            // 
-            // ScenePropertiesForm
-            // 
-            this.AcceptButton = this.butOK;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.butCancel;
-            this.ClientSize = new System.Drawing.Size(343, 386);
-            this.Controls.Add(this.groupBox3);
-            this.Controls.Add(this.groupBox2);
-            this.Controls.Add(this.butCancel);
-            this.Controls.Add(this.butOK);
-            this.Controls.Add(this.groupBox1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Name = "ScenePropertiesForm";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "Babylon.js - Scene Properties";
-            this.Load += new System.EventHandler(this.ScenePropertiesForm_Load);
-            this.groupBox1.ResumeLayout(false);
-            this.groupBox1.PerformLayout();
-            this.groupBox2.ResumeLayout(false);
-            this.groupBox2.PerformLayout();
-            this.groupBox3.ResumeLayout(false);
-            this.groupBox3.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.nupVolume)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.GroupBox groupBox1;
-        private Vector3Control gravityControl;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Button butCancel;
-        private System.Windows.Forms.Button butOK;
-        private System.Windows.Forms.GroupBox groupBox2;
-        private System.Windows.Forms.CheckBox chkQuaternions;
-        private System.Windows.Forms.GroupBox groupBox3;
-        private System.Windows.Forms.CheckBox chkLoop;
-        private System.Windows.Forms.CheckBox chkAutoPlay;
-        private System.Windows.Forms.Button cmdBrowse;
-        private System.Windows.Forms.TextBox txtSound;
-        private System.Windows.Forms.OpenFileDialog ofdOpenSound;
-        private System.Windows.Forms.NumericUpDown nupVolume;
-        private System.Windows.Forms.Label lblVolume;
-    }
+namespace Max2Babylon
+{
+    partial class ScenePropertiesForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.gravityControl = new Max2Babylon.Vector3Control();
+            this.label3 = new System.Windows.Forms.Label();
+            this.butCancel = new System.Windows.Forms.Button();
+            this.butOK = new System.Windows.Forms.Button();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.chkAnimations = new System.Windows.Forms.CheckBox();
+            this.chkQuaternions = new System.Windows.Forms.CheckBox();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.nupVolume = new System.Windows.Forms.NumericUpDown();
+            this.lblVolume = new System.Windows.Forms.Label();
+            this.cmdBrowse = new System.Windows.Forms.Button();
+            this.txtSound = new System.Windows.Forms.TextBox();
+            this.chkLoop = new System.Windows.Forms.CheckBox();
+            this.chkAutoPlay = new System.Windows.Forms.CheckBox();
+            this.ofdOpenSound = new System.Windows.Forms.OpenFileDialog();
+            this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.groupBox3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupVolume)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.gravityControl);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox1.Location = new System.Drawing.Point(12, 12);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(319, 87);
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "Collisions";
+            // 
+            // gravityControl
+            // 
+            this.gravityControl.Location = new System.Drawing.Point(21, 44);
+            this.gravityControl.Name = "gravityControl";
+            this.gravityControl.Size = new System.Drawing.Size(294, 28);
+            this.gravityControl.TabIndex = 5;
+            this.gravityControl.X = 0F;
+            this.gravityControl.Y = 0F;
+            this.gravityControl.Z = 0F;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(18, 28);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(43, 13);
+            this.label3.TabIndex = 4;
+            this.label3.Text = "Gravity:";
+            // 
+            // butCancel
+            // 
+            this.butCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.butCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butCancel.Location = new System.Drawing.Point(174, 351);
+            this.butCancel.Name = "butCancel";
+            this.butCancel.Size = new System.Drawing.Size(75, 23);
+            this.butCancel.TabIndex = 4;
+            this.butCancel.Text = "Cancel";
+            this.butCancel.UseVisualStyleBackColor = true;
+            // 
+            // butOK
+            // 
+            this.butOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.butOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.butOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.butOK.Location = new System.Drawing.Point(93, 351);
+            this.butOK.Name = "butOK";
+            this.butOK.Size = new System.Drawing.Size(75, 23);
+            this.butOK.TabIndex = 3;
+            this.butOK.Text = "OK";
+            this.butOK.UseVisualStyleBackColor = true;
+            this.butOK.Click += new System.EventHandler(this.butOK_Click);
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.chkAnimations);
+            this.groupBox2.Controls.Add(this.chkQuaternions);
+            this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox2.Location = new System.Drawing.Point(12, 105);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(319, 87);
+            this.groupBox2.TabIndex = 5;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "Advanced";
+            // 
+            // chkAnimations
+            // 
+            this.chkAnimations.AutoSize = true;
+            this.chkAnimations.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkAnimations.Location = new System.Drawing.Point(21, 51);
+            this.chkAnimations.Name = "chkAnimations";
+            this.chkAnimations.Size = new System.Drawing.Size(149, 17);
+            this.chkAnimations.TabIndex = 3;
+            this.chkAnimations.Text = "Do not optimize animations";
+            this.chkAnimations.UseVisualStyleBackColor = true;
+            // 
+            // chkQuaternions
+            // 
+            this.chkQuaternions.AutoSize = true;
+            this.chkQuaternions.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkQuaternions.Location = new System.Drawing.Point(21, 28);
+            this.chkQuaternions.Name = "chkQuaternions";
+            this.chkQuaternions.Size = new System.Drawing.Size(221, 17);
+            this.chkQuaternions.TabIndex = 2;
+            this.chkQuaternions.Text = "Export quaternions instead of Euler angles";
+            this.chkQuaternions.UseVisualStyleBackColor = true;
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.nupVolume);
+            this.groupBox3.Controls.Add(this.lblVolume);
+            this.groupBox3.Controls.Add(this.cmdBrowse);
+            this.groupBox3.Controls.Add(this.txtSound);
+            this.groupBox3.Controls.Add(this.chkLoop);
+            this.groupBox3.Controls.Add(this.chkAutoPlay);
+            this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.groupBox3.Location = new System.Drawing.Point(12, 198);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(319, 136);
+            this.groupBox3.TabIndex = 6;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "Sound";
+            // 
+            // nupVolume
+            // 
+            this.nupVolume.DecimalPlaces = 2;
+            this.nupVolume.Increment = new decimal(new int[] {
+            1,
+            0,
+            0,
+            65536});
+            this.nupVolume.Location = new System.Drawing.Point(150, 108);
+            this.nupVolume.Maximum = new decimal(new int[] {
+            10,
+            0,
+            0,
+            0});
+            this.nupVolume.Name = "nupVolume";
+            this.nupVolume.Size = new System.Drawing.Size(120, 20);
+            this.nupVolume.TabIndex = 10;
+            this.nupVolume.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
+            // lblVolume
+            // 
+            this.lblVolume.AutoSize = true;
+            this.lblVolume.Location = new System.Drawing.Point(18, 110);
+            this.lblVolume.Name = "lblVolume";
+            this.lblVolume.Size = new System.Drawing.Size(45, 13);
+            this.lblVolume.TabIndex = 9;
+            this.lblVolume.Text = "Volume:";
+            // 
+            // cmdBrowse
+            // 
+            this.cmdBrowse.Anchor = System.Windows.Forms.AnchorStyles.Right;
+            this.cmdBrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cmdBrowse.Location = new System.Drawing.Point(276, 28);
+            this.cmdBrowse.Name = "cmdBrowse";
+            this.cmdBrowse.Size = new System.Drawing.Size(37, 23);
+            this.cmdBrowse.TabIndex = 6;
+            this.cmdBrowse.Text = "...";
+            this.cmdBrowse.UseVisualStyleBackColor = true;
+            this.cmdBrowse.Click += new System.EventHandler(this.cmdBrowse_Click);
+            // 
+            // txtSound
+            // 
+            this.txtSound.Location = new System.Drawing.Point(21, 28);
+            this.txtSound.Name = "txtSound";
+            this.txtSound.Size = new System.Drawing.Size(249, 20);
+            this.txtSound.TabIndex = 5;
+            // 
+            // chkLoop
+            // 
+            this.chkLoop.AutoSize = true;
+            this.chkLoop.Checked = true;
+            this.chkLoop.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chkLoop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkLoop.Location = new System.Drawing.Point(21, 77);
+            this.chkLoop.Name = "chkLoop";
+            this.chkLoop.Size = new System.Drawing.Size(47, 17);
+            this.chkLoop.TabIndex = 4;
+            this.chkLoop.Text = "Loop";
+            this.chkLoop.UseVisualStyleBackColor = true;
+            // 
+            // chkAutoPlay
+            // 
+            this.chkAutoPlay.AutoSize = true;
+            this.chkAutoPlay.Checked = true;
+            this.chkAutoPlay.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chkAutoPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.chkAutoPlay.Location = new System.Drawing.Point(21, 54);
+            this.chkAutoPlay.Name = "chkAutoPlay";
+            this.chkAutoPlay.Size = new System.Drawing.Size(67, 17);
+            this.chkAutoPlay.TabIndex = 3;
+            this.chkAutoPlay.Text = "Auto play";
+            this.chkAutoPlay.UseVisualStyleBackColor = true;
+            // 
+            // ofdOpenSound
+            // 
+            this.ofdOpenSound.Filter = "Sound files|*.wav;*.mp3";
+            // 
+            // ScenePropertiesForm
+            // 
+            this.AcceptButton = this.butOK;
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.butCancel;
+            this.ClientSize = new System.Drawing.Size(343, 386);
+            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.butCancel);
+            this.Controls.Add(this.butOK);
+            this.Controls.Add(this.groupBox1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "ScenePropertiesForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Babylon.js - Scene Properties";
+            this.Load += new System.EventHandler(this.ScenePropertiesForm_Load);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nupVolume)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.GroupBox groupBox1;
+        private Vector3Control gravityControl;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Button butCancel;
+        private System.Windows.Forms.Button butOK;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.CheckBox chkQuaternions;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.CheckBox chkLoop;
+        private System.Windows.Forms.CheckBox chkAutoPlay;
+        private System.Windows.Forms.Button cmdBrowse;
+        private System.Windows.Forms.TextBox txtSound;
+        private System.Windows.Forms.OpenFileDialog ofdOpenSound;
+        private System.Windows.Forms.NumericUpDown nupVolume;
+        private System.Windows.Forms.Label lblVolume;
+        private System.Windows.Forms.CheckBox chkAnimations;
+    }
 }

+ 49 - 47
Exporters/3ds Max/Max2Babylon/Forms/ScenePropertiesForm.cs

@@ -1,47 +1,49 @@
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using Autodesk.Max;
-
-namespace Max2Babylon
-{
-    public partial class ScenePropertiesForm : Form
-    {
-        public ScenePropertiesForm()
-        {
-            InitializeComponent();
-        }
-
-        private void butOK_Click(object sender, EventArgs e)
-        {
-            Tools.UpdateVector3Control(gravityControl, Loader.Core.RootNode, "babylonjs_gravity");
-            Tools.UpdateCheckBox(chkQuaternions, Loader.Core.RootNode, "babylonjs_exportquaternions");
-
-            Tools.UpdateCheckBox(chkAutoPlay, Loader.Core.RootNode, "babylonjs_sound_autoplay");
-            Tools.UpdateCheckBox(chkLoop, Loader.Core.RootNode, "babylonjs_sound_loop");
-            Tools.UpdateNumericUpDown(nupVolume, new List<IINode> { Loader.Core.RootNode }, "babylonjs_sound_volume");
-
-            Tools.UpdateTextBox(txtSound, new List<IINode> { Loader.Core.RootNode }, "babylonjs_sound_filename");
-        }
-
-        private void ScenePropertiesForm_Load(object sender, EventArgs e)
-        {
-            Tools.PrepareVector3Control(gravityControl, Loader.Core.RootNode, "babylonjs_gravity", 0, -0.9f);
-            Tools.PrepareCheckBox(chkQuaternions, Loader.Core.RootNode, "babylonjs_exportquaternions", 1);
-
-            Tools.PrepareCheckBox(chkAutoPlay, Loader.Core.RootNode, "babylonjs_sound_autoplay", 1);
-            Tools.PrepareCheckBox(chkLoop, Loader.Core.RootNode, "babylonjs_sound_loop", 1);
-            Tools.PrepareNumericUpDown(nupVolume, new List<IINode>{Loader.Core.RootNode}, "babylonjs_sound_volume", 1.0f);
-
-            Tools.PrepareTextBox(txtSound, Loader.Core.RootNode, "babylonjs_sound_filename");
-        }
-
-        private void cmdBrowse_Click(object sender, EventArgs e)
-        {
-            if (ofdOpenSound.ShowDialog() == DialogResult.OK)
-            {
-                txtSound.Text = ofdOpenSound.FileName;
-            }
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Autodesk.Max;
+
+namespace Max2Babylon
+{
+    public partial class ScenePropertiesForm : Form
+    {
+        public ScenePropertiesForm()
+        {
+            InitializeComponent();
+        }
+
+        private void butOK_Click(object sender, EventArgs e)
+        {
+            Tools.UpdateVector3Control(gravityControl, Loader.Core.RootNode, "babylonjs_gravity");
+            Tools.UpdateCheckBox(chkQuaternions, Loader.Core.RootNode, "babylonjs_exportquaternions");
+            Tools.UpdateCheckBox(chkAnimations, Loader.Core.RootNode, "babylonjs_exportnonoptimizedanimations");
+
+            Tools.UpdateCheckBox(chkAutoPlay, Loader.Core.RootNode, "babylonjs_sound_autoplay");
+            Tools.UpdateCheckBox(chkLoop, Loader.Core.RootNode, "babylonjs_sound_loop");
+            Tools.UpdateNumericUpDown(nupVolume, new List<IINode> { Loader.Core.RootNode }, "babylonjs_sound_volume");
+
+            Tools.UpdateTextBox(txtSound, new List<IINode> { Loader.Core.RootNode }, "babylonjs_sound_filename");
+        }
+
+        private void ScenePropertiesForm_Load(object sender, EventArgs e)
+        {
+            Tools.PrepareVector3Control(gravityControl, Loader.Core.RootNode, "babylonjs_gravity", 0, -0.9f);
+            Tools.PrepareCheckBox(chkQuaternions, Loader.Core.RootNode, "babylonjs_exportquaternions", 1);
+            Tools.PrepareCheckBox(chkAnimations, Loader.Core.RootNode, "babylonjs_exportnonoptimizedanimations", 0);
+
+            Tools.PrepareCheckBox(chkAutoPlay, Loader.Core.RootNode, "babylonjs_sound_autoplay", 1);
+            Tools.PrepareCheckBox(chkLoop, Loader.Core.RootNode, "babylonjs_sound_loop", 1);
+            Tools.PrepareNumericUpDown(nupVolume, new List<IINode>{Loader.Core.RootNode}, "babylonjs_sound_volume", 1.0f);
+
+            Tools.PrepareTextBox(txtSound, Loader.Core.RootNode, "babylonjs_sound_filename");
+        }
+
+        private void cmdBrowse_Click(object sender, EventArgs e)
+        {
+            if (ofdOpenSound.ShowDialog() == DialogResult.OK)
+            {
+                txtSound.Text = ofdOpenSound.FileName;
+            }
+        }
+    }
+}

+ 122 - 122
Exporters/3ds Max/Max2Babylon/Forms/ScenePropertiesForm.resx

@@ -1,123 +1,123 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="ofdOpenSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="ofdOpenSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 152 - 152
Exporters/3ds Max/Max2Babylon/Forms/Vector3Control.Designer.cs

@@ -1,152 +1,152 @@
-namespace Max2Babylon
-{
-    partial class Vector3Control
-    {
-        /// <summary> 
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary> 
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Component Designer generated code
-
-        /// <summary> 
-        /// Required method for Designer support - do not modify 
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.label1 = new System.Windows.Forms.Label();
-            this.nupX = new System.Windows.Forms.NumericUpDown();
-            this.nupY = new System.Windows.Forms.NumericUpDown();
-            this.label2 = new System.Windows.Forms.Label();
-            this.nupZ = new System.Windows.Forms.NumericUpDown();
-            this.label3 = new System.Windows.Forms.Label();
-            ((System.ComponentModel.ISupportInitialize)(this.nupX)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupY)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupZ)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(4, 6);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(20, 13);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "X: ";
-            // 
-            // nupX
-            // 
-            this.nupX.DecimalPlaces = 2;
-            this.nupX.Location = new System.Drawing.Point(30, 4);
-            this.nupX.Maximum = new decimal(new int[] {
-            1000000,
-            0,
-            0,
-            0});
-            this.nupX.Minimum = new decimal(new int[] {
-            1000000,
-            0,
-            0,
-            -2147483648});
-            this.nupX.Name = "nupX";
-            this.nupX.Size = new System.Drawing.Size(57, 20);
-            this.nupX.TabIndex = 1;
-            // 
-            // nupY
-            // 
-            this.nupY.DecimalPlaces = 2;
-            this.nupY.Location = new System.Drawing.Point(123, 4);
-            this.nupY.Maximum = new decimal(new int[] {
-            1000000,
-            0,
-            0,
-            0});
-            this.nupY.Minimum = new decimal(new int[] {
-            1000000,
-            0,
-            0,
-            -2147483648});
-            this.nupY.Name = "nupY";
-            this.nupY.Size = new System.Drawing.Size(57, 20);
-            this.nupY.TabIndex = 3;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(97, 6);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(17, 13);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "Y:";
-            // 
-            // nupZ
-            // 
-            this.nupZ.DecimalPlaces = 2;
-            this.nupZ.Location = new System.Drawing.Point(216, 4);
-            this.nupZ.Maximum = new decimal(new int[] {
-            1000000,
-            0,
-            0,
-            0});
-            this.nupZ.Minimum = new decimal(new int[] {
-            1000000,
-            0,
-            0,
-            -2147483648});
-            this.nupZ.Name = "nupZ";
-            this.nupZ.Size = new System.Drawing.Size(57, 20);
-            this.nupZ.TabIndex = 5;
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(190, 6);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(17, 13);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "Z:";
-            // 
-            // Vector3Control
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.Controls.Add(this.nupZ);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.nupY);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.nupX);
-            this.Controls.Add(this.label1);
-            this.Name = "Vector3Control";
-            this.Size = new System.Drawing.Size(294, 28);
-            ((System.ComponentModel.ISupportInitialize)(this.nupX)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupY)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.nupZ)).EndInit();
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.NumericUpDown nupX;
-        private System.Windows.Forms.NumericUpDown nupY;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.NumericUpDown nupZ;
-        private System.Windows.Forms.Label label3;
-    }
-}
+namespace Max2Babylon
+{
+    partial class Vector3Control
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.label1 = new System.Windows.Forms.Label();
+            this.nupX = new System.Windows.Forms.NumericUpDown();
+            this.nupY = new System.Windows.Forms.NumericUpDown();
+            this.label2 = new System.Windows.Forms.Label();
+            this.nupZ = new System.Windows.Forms.NumericUpDown();
+            this.label3 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.nupX)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupY)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupZ)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(4, 6);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(20, 13);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "X: ";
+            // 
+            // nupX
+            // 
+            this.nupX.DecimalPlaces = 2;
+            this.nupX.Location = new System.Drawing.Point(30, 4);
+            this.nupX.Maximum = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            0});
+            this.nupX.Minimum = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            -2147483648});
+            this.nupX.Name = "nupX";
+            this.nupX.Size = new System.Drawing.Size(57, 20);
+            this.nupX.TabIndex = 1;
+            // 
+            // nupY
+            // 
+            this.nupY.DecimalPlaces = 2;
+            this.nupY.Location = new System.Drawing.Point(123, 4);
+            this.nupY.Maximum = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            0});
+            this.nupY.Minimum = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            -2147483648});
+            this.nupY.Name = "nupY";
+            this.nupY.Size = new System.Drawing.Size(57, 20);
+            this.nupY.TabIndex = 3;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(97, 6);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(17, 13);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "Y:";
+            // 
+            // nupZ
+            // 
+            this.nupZ.DecimalPlaces = 2;
+            this.nupZ.Location = new System.Drawing.Point(216, 4);
+            this.nupZ.Maximum = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            0});
+            this.nupZ.Minimum = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            -2147483648});
+            this.nupZ.Name = "nupZ";
+            this.nupZ.Size = new System.Drawing.Size(57, 20);
+            this.nupZ.TabIndex = 5;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(190, 6);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(17, 13);
+            this.label3.TabIndex = 4;
+            this.label3.Text = "Z:";
+            // 
+            // Vector3Control
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.nupZ);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.nupY);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.nupX);
+            this.Controls.Add(this.label1);
+            this.Name = "Vector3Control";
+            this.Size = new System.Drawing.Size(294, 28);
+            ((System.ComponentModel.ISupportInitialize)(this.nupX)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupY)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.nupZ)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.NumericUpDown nupX;
+        private System.Windows.Forms.NumericUpDown nupY;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.NumericUpDown nupZ;
+        private System.Windows.Forms.Label label3;
+    }
+}

+ 30 - 30
Exporters/3ds Max/Max2Babylon/Forms/Vector3Control.cs

@@ -1,30 +1,30 @@
-using System.Windows.Forms;
-
-namespace Max2Babylon
-{
-    public partial class Vector3Control : UserControl
-    {
-        public Vector3Control()
-        {
-            InitializeComponent();
-        }
-
-        public float X
-        {
-            get { return (float)nupX.Value; }
-            set { nupX.Value = (decimal)value; }
-        }
-
-        public float Y
-        {
-            get { return (float)nupY.Value; }
-            set { nupY.Value = (decimal)value; }
-        }
-
-        public float Z
-        {
-            get { return (float)nupZ.Value; }
-            set { nupZ.Value = (decimal)value; }
-        }
-    }
-}
+using System.Windows.Forms;
+
+namespace Max2Babylon
+{
+    public partial class Vector3Control : UserControl
+    {
+        public Vector3Control()
+        {
+            InitializeComponent();
+        }
+
+        public float X
+        {
+            get { return (float)nupX.Value; }
+            set { nupX.Value = (decimal)value; }
+        }
+
+        public float Y
+        {
+            get { return (float)nupY.Value; }
+            set { nupY.Value = (decimal)value; }
+        }
+
+        public float Z
+        {
+            get { return (float)nupZ.Value; }
+            set { nupZ.Value = (decimal)value; }
+        }
+    }
+}

+ 119 - 119
Exporters/3ds Max/Max2Babylon/Forms/Vector3Control.resx

@@ -1,120 +1,120 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 128 - 128
Exporters/3ds Max/Max2Babylon/GlobalUtility.cs

@@ -1,128 +1,128 @@
-using Autodesk.Max;
-using Autodesk.Max.IQuadMenuContext;
-using Autodesk.Max.Plugins;
-
-namespace Max2Babylon
-{
-    class GlobalUtility : GUP
-    {
-        IIMenu menu;
-        IIMenuItem menuItem;
-        IIMenuItem menuItemBabylon;
-        uint idActionTable;
-        IActionTable actionTable;
-        IActionCallback actionCallback;
-
-        public override void Stop()
-        {
-            try
-            {
-                if (actionTable != null)
-                {
-                    Loader.Global.COREInterface.ActionManager.DeactivateActionTable(actionCallback, idActionTable);
-                }
-
-                // Clean up menu
-                if (menu != null)
-                {
-                    Loader.Global.COREInterface.MenuManager.UnRegisterMenu(menu);
-                    Loader.Global.ReleaseIMenu(menu);
-                    Loader.Global.ReleaseIMenuItem(menuItemBabylon);
-                    Loader.Global.ReleaseIMenuItem(menuItem);
-
-                    menu = null;
-                    menuItem = null;
-                }
-            }
-            catch
-            {
-                // Fails silently
-            }
-        }
-
-        public override uint Start
-        {
-            get
-            {
-                IIActionManager actionManager = Loader.Core.ActionManager;
-                IIMenuManager menuManager = Loader.Core.MenuManager;
-
-                // Set up global actions
-                idActionTable = (uint)actionManager.NumActionTables;
-
-                string actionTableName = "Babylon Actions";
-                actionTable = Loader.Global.ActionTable.Create(idActionTable, 0, ref actionTableName);
-                actionTable.AppendOperation(new BabylonExportActionItem());
-                actionTable.AppendOperation(new BabylonPropertiesActionItem());
-                actionTable.AppendOperation(new BabylonActionsBuilderActionItem());
-                actionCallback = new BabylonActionCallback();
-
-                actionManager.RegisterActionTable(actionTable);
-                actionManager.ActivateActionTable(actionCallback as ActionCallback, idActionTable);
-
-                // Set up menu
-                menu = menuManager.FindMenu("Babylon");
-
-                if (menu != null)
-                {
-                    menuManager.UnRegisterMenu(menu);
-                    Loader.Global.ReleaseIMenu(menu);
-                    menu = null;
-                }
-
-                // Main menu
-                menu = Loader.Global.IMenu;
-                menu.Title = "Babylon";
-                menuManager.RegisterMenu(menu, 0);
-
-                // Launch option
-                menuItemBabylon = Loader.Global.IMenuItem;
-                menuItemBabylon.Title = "&File Exporter";
-                menuItemBabylon.ActionItem = actionTable[0];
-
-                menu.AddItem(menuItemBabylon, -1);
-
-                menuItem = Loader.Global.IMenuItem;
-                menuItem.SubMenu = menu;
-
-                menuManager.MainMenuBar.AddItem(menuItem, -1);
-
-                // Quad
-                var rootQuadMenu = menuManager.GetViewportRightClickMenu(RightClickContext.NonePressed);
-                var quadMenu = rootQuadMenu.GetMenu(0);
-
-                menu = menuManager.FindMenu("Babylon...");
-
-                if (menu != null)
-                {
-                    menuManager.UnRegisterMenu(menu);
-                    Loader.Global.ReleaseIMenu(menu);
-                    menu = null;
-                }
-
-                menu = Loader.Global.IMenu;
-                menu.Title = "Babylon...";
-                menuManager.RegisterMenu(menu, 0);
-
-                menuItemBabylon = Loader.Global.IMenuItem;
-                menuItemBabylon.Title = "Babylon Properties";
-                menuItemBabylon.ActionItem = actionTable[1];
-                menu.AddItem(menuItemBabylon, -1);
-
-                menuItemBabylon = Loader.Global.IMenuItem;
-                menuItemBabylon.Title = "Babylon Actions Builder";
-                menuItemBabylon.ActionItem = actionTable[2];
-                menu.AddItem(menuItemBabylon, -1);
-
-                menuItem = Loader.Global.IMenuItem;
-                menuItem.SubMenu = menu;
-
-                quadMenu.AddItem(menuItem, -1);
-
-                Loader.Global.COREInterface.MenuManager.UpdateMenuBar();
-
-                return 0;
-            }
-        }
-    }
-}
+using Autodesk.Max;
+using Autodesk.Max.IQuadMenuContext;
+using Autodesk.Max.Plugins;
+
+namespace Max2Babylon
+{
+    class GlobalUtility : GUP
+    {
+        IIMenu menu;
+        IIMenuItem menuItem;
+        IIMenuItem menuItemBabylon;
+        uint idActionTable;
+        IActionTable actionTable;
+        IActionCallback actionCallback;
+
+        public override void Stop()
+        {
+            try
+            {
+                if (actionTable != null)
+                {
+                    Loader.Global.COREInterface.ActionManager.DeactivateActionTable(actionCallback, idActionTable);
+                }
+
+                // Clean up menu
+                if (menu != null)
+                {
+                    Loader.Global.COREInterface.MenuManager.UnRegisterMenu(menu);
+                    Loader.Global.ReleaseIMenu(menu);
+                    Loader.Global.ReleaseIMenuItem(menuItemBabylon);
+                    Loader.Global.ReleaseIMenuItem(menuItem);
+
+                    menu = null;
+                    menuItem = null;
+                }
+            }
+            catch
+            {
+                // Fails silently
+            }
+        }
+
+        public override uint Start
+        {
+            get
+            {
+                IIActionManager actionManager = Loader.Core.ActionManager;
+                IIMenuManager menuManager = Loader.Core.MenuManager;
+
+                // Set up global actions
+                idActionTable = (uint)actionManager.NumActionTables;
+
+                string actionTableName = "Babylon Actions";
+                actionTable = Loader.Global.ActionTable.Create(idActionTable, 0, ref actionTableName);
+                actionTable.AppendOperation(new BabylonExportActionItem());
+                actionTable.AppendOperation(new BabylonPropertiesActionItem());
+                actionTable.AppendOperation(new BabylonActionsBuilderActionItem());
+                actionCallback = new BabylonActionCallback();
+
+                actionManager.RegisterActionTable(actionTable);
+                actionManager.ActivateActionTable(actionCallback as ActionCallback, idActionTable);
+
+                // Set up menu
+                menu = menuManager.FindMenu("Babylon");
+
+                if (menu != null)
+                {
+                    menuManager.UnRegisterMenu(menu);
+                    Loader.Global.ReleaseIMenu(menu);
+                    menu = null;
+                }
+
+                // Main menu
+                menu = Loader.Global.IMenu;
+                menu.Title = "Babylon";
+                menuManager.RegisterMenu(menu, 0);
+
+                // Launch option
+                menuItemBabylon = Loader.Global.IMenuItem;
+                menuItemBabylon.Title = "&File Exporter";
+                menuItemBabylon.ActionItem = actionTable[0];
+
+                menu.AddItem(menuItemBabylon, -1);
+
+                menuItem = Loader.Global.IMenuItem;
+                menuItem.SubMenu = menu;
+
+                menuManager.MainMenuBar.AddItem(menuItem, -1);
+
+                // Quad
+                var rootQuadMenu = menuManager.GetViewportRightClickMenu(RightClickContext.NonePressed);
+                var quadMenu = rootQuadMenu.GetMenu(0);
+
+                menu = menuManager.FindMenu("Babylon...");
+
+                if (menu != null)
+                {
+                    menuManager.UnRegisterMenu(menu);
+                    Loader.Global.ReleaseIMenu(menu);
+                    menu = null;
+                }
+
+                menu = Loader.Global.IMenu;
+                menu.Title = "Babylon...";
+                menuManager.RegisterMenu(menu, 0);
+
+                menuItemBabylon = Loader.Global.IMenuItem;
+                menuItemBabylon.Title = "Babylon Properties";
+                menuItemBabylon.ActionItem = actionTable[1];
+                menu.AddItem(menuItemBabylon, -1);
+
+                menuItemBabylon = Loader.Global.IMenuItem;
+                menuItemBabylon.Title = "Babylon Actions Builder";
+                menuItemBabylon.ActionItem = actionTable[2];
+                menu.AddItem(menuItemBabylon, -1);
+
+                menuItem = Loader.Global.IMenuItem;
+                menuItem.SubMenu = menu;
+
+                quadMenu.AddItem(menuItem, -1);
+
+                Loader.Global.COREInterface.MenuManager.UpdateMenuBar();
+
+                return 0;
+            }
+        }
+    }
+}

+ 19 - 19
Exporters/3ds Max/Max2Babylon/JsonTextWriterOptimized.cs

@@ -1,19 +1,19 @@
-using System;
-using System.IO;
-using Newtonsoft.Json;
-
-namespace Max2Babylon
-{
-    class JsonTextWriterOptimized : JsonTextWriter
-    {
-        public JsonTextWriterOptimized(TextWriter textWriter)
-            : base(textWriter)
-        {
-        }
-        public override void WriteValue(float value)
-        {
-            value = (float)Math.Round(value, 4);
-            base.WriteValue(value);
-        }
-    }
-}
+using System;
+using System.IO;
+using Newtonsoft.Json;
+
+namespace Max2Babylon
+{
+    class JsonTextWriterOptimized : JsonTextWriter
+    {
+        public JsonTextWriterOptimized(TextWriter textWriter)
+            : base(textWriter)
+        {
+        }
+        public override void WriteValue(float value)
+        {
+            value = (float)Math.Round(value, 4);
+            base.WriteValue(value);
+        }
+    }
+}

+ 29 - 29
Exporters/3ds Max/Max2Babylon/Loader.cs

@@ -1,29 +1,29 @@
-using System;
-using System.ComponentModel;
-using Autodesk.Max;
-using Autodesk.Max.Plugins;
-
-namespace Max2Babylon
-{
-    public class Loader
-    {
-        public static IGlobal Global;
-        public static IInterface14 Core;
-        public static IClass_ID Class_ID;
-
-        public static void AssemblyMain()
-        {
-            Global = GlobalInterface.Instance;
-            Core = Global.COREInterface14;
-            Class_ID = Global.Class_ID.Create(0x8217f123, 0xef980456);
-            Core.AddClass(new Descriptor());
-        }
-
-        public static void AssemblyShutdown()
-        {
-
-        }
-
-     
-    }
-}
+using System;
+using System.ComponentModel;
+using Autodesk.Max;
+using Autodesk.Max.Plugins;
+
+namespace Max2Babylon
+{
+    public class Loader
+    {
+        public static IGlobal Global;
+        public static IInterface14 Core;
+        public static IClass_ID Class_ID;
+
+        public static void AssemblyMain()
+        {
+            Global = GlobalInterface.Instance;
+            Core = Global.COREInterface14;
+            Class_ID = Global.Class_ID.Create(0x8217f123, 0xef980456);
+            Core.AddClass(new Descriptor());
+        }
+
+        public static void AssemblyShutdown()
+        {
+
+        }
+
+     
+    }
+}