Explorar o código

Feature: Various inspector improvements and fixes regarding distributions

BearishSun %!s(int64=7) %!d(string=hai) anos
pai
achega
6f6825102a
Modificáronse 39 ficheiros con 685 adicións e 277 borrados
  1. 3 2
      CMakeLists.txt
  2. 1 1
      Data/.reqversion
  3. 34 0
      Data/Raw/DataList.json
  4. 1 1
      Data/Raw/DataPackageContents.txt
  5. 250 14
      Data/Raw/GUISkin.json
  6. 1 1
      Source/EditorCore/Build/BsBuiltinEditorResources.cpp
  7. 17 5
      Source/EditorCore/GUI/BsGUIColorDistributionField.cpp
  8. 5 0
      Source/EditorCore/GUI/BsGUIColorDistributionField.h
  9. 59 25
      Source/EditorCore/GUI/BsGUIFloatDistributionField.cpp
  10. 5 0
      Source/EditorCore/GUI/BsGUIFloatDistributionField.h
  11. 9 0
      Source/EditorCore/GUI/BsGUITimeline.cpp
  12. 4 0
      Source/EditorCore/GUI/BsGUITimeline.h
  13. 17 18
      Source/EditorCore/GUI/BsGUIVector2Field.cpp
  14. 7 4
      Source/EditorCore/GUI/BsGUIVector2Field.h
  15. 27 20
      Source/EditorCore/GUI/BsGUIVector3Field.cpp
  16. 10 4
      Source/EditorCore/GUI/BsGUIVector3Field.h
  17. 33 11
      Source/EditorCore/GUI/BsGUIVector4Field.cpp
  18. 11 2
      Source/EditorCore/GUI/BsGUIVector4Field.h
  19. 6 6
      Source/Scripting/MBansheeEditor/GUI/GUIColorDistributionField.cs
  20. 2 2
      Source/Scripting/MBansheeEditor/GUI/GUIFloatDistributionField.cs
  21. 2 2
      Source/Scripting/MBansheeEditor/GUI/GUIVector2DistributionField.cs
  22. 2 2
      Source/Scripting/MBansheeEditor/GUI/GUIVector3DistributionField.cs
  23. 9 0
      Source/Scripting/MBansheeEditor/Generated/GUIColorDistributionField.generated.cs
  24. 9 0
      Source/Scripting/MBansheeEditor/Generated/GUIFloatDistributionField.generated.cs
  25. 9 0
      Source/Scripting/MBansheeEditor/Generated/GUIVector2DistributionField.generated.cs
  26. 9 0
      Source/Scripting/MBansheeEditor/Generated/GUIVector3DistributionField.generated.cs
  27. 40 154
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectorWindow.cs
  28. 19 0
      Source/Scripting/MBansheeEngine/Generated/ColorGradient.generated.cs
  29. 12 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIColorDistributionField.generated.cpp
  30. 2 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIColorDistributionField.generated.h
  31. 13 1
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.cpp
  32. 2 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.h
  33. 13 1
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector2DistributionField.generated.cpp
  34. 2 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector2DistributionField.generated.h
  35. 12 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector3DistributionField.generated.cpp
  36. 2 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector3DistributionField.generated.h
  37. 23 0
      Source/Scripting/SBansheeEngine/Generated/BsScriptColorGradient.generated.cpp
  38. 2 0
      Source/Scripting/SBansheeEngine/Generated/BsScriptColorGradient.generated.h
  39. 1 1
      Source/bsf

+ 3 - 2
CMakeLists.txt

@@ -28,7 +28,7 @@ add_subdirectory(${BSF_SOURCE_DIR})
 
 set (BS_PREBUILT_DEPENDENCIES_VERSION 24)
 set (BS_SRC_DEPENDENCIES_VERSION 15)
-set (BS_BUILTIN_ASSETS_VERSION 12)
+set (BS_BUILTIN_ASSETS_VERSION 13)
 
 # Options
 set(GENERATE_SCRIPT_BINDINGS OFF CACHE BOOL "If true, script binding files will be generated. Script bindings are required for the project to build properly, however they take a while to generate. If you are sure the script bindings are up to date, you can turn off their generation (temporarily) to speed up the build.")
@@ -42,7 +42,8 @@ check_and_update_builtin_assets(Banshee ${PROJECT_SOURCE_DIR}/Data/Raw Raw ${BS_
 		
 ## Import built-in assets
 if(${INCLUDE_ASSET_PACKAGING_SCRIPTS})
-	add_run_asset_import_target(EditorBuiltinAssets ${PROJECT_SOURCE_DIR}/Data ${PROJECT_SOURCE_DIR} "--editor")
+	add_run_asset_import_target(EditorBuiltinAssets ${PROJECT_SOURCE_DIR}/Data ${BSF_SOURCE_DIR}/.. "--editor")
+	add_upload_assets_target(EditorBuiltinAssets "BansheeCompiledData_Master" ${PROJECT_SOURCE_DIR}/Data Raw/DataPackageContents.txt)
 endif()
 
 ## Fetch built-in assets

+ 1 - 1
Data/.reqversion

@@ -1 +1 @@
-2
+3

+ 34 - 0
Data/Raw/DataList.json

@@ -18,6 +18,15 @@
                 16
             ],
             "UUID": "10999b74-d976-4116-9f72-21e489a7a8e4"
+        },
+        {
+            "Antialiasing": true,
+            "Name": "arialBold.ttf",
+            "Path": "arialbd.ttf",
+            "Sizes": [
+                8
+            ],
+            "UUID": "3d111a58-012b-11e9-8eb2-f2801f1b9fd1"
         }
     ],
     "GUISkin": {
@@ -924,6 +933,31 @@
             "Path": "DropDownArrowNormal.png",
             "SpriteUUID": "ec9065e4-4faa-c25b-eaa0-4faa1715356f",
             "TextureUUID": "3a3a6257-41e7-6879-6584-41e7155ed876"
+        },
+        {
+            "Path": "ButtonAddOnBlue.png",
+            "SpriteUUID": "84497ab7-4902-b14c-739f-490242a9737d",
+            "TextureUUID": "4699fb83-4d2e-648f-17bc-4d2e6a66436c"
+        },
+        {
+            "Path": "ButtonAddOnGray.png",
+            "SpriteUUID": "b0b76e49-4410-e62a-1b8c-44104cb1156f",
+            "TextureUUID": "0a2c209c-492f-b733-9e9a-492f7a22d93c"
+        },
+        {
+            "Path": "ButtonAddOnGreen.png",
+            "SpriteUUID": "b3332e90-42d6-f017-26b9-42d6cf767541",
+            "TextureUUID": "2162e96f-4123-1ff4-3aba-4123ce0136d8"
+        },
+        {
+            "Path": "ButtonAddOnRed.png",
+            "SpriteUUID": "eaeba18a-45a1-69d7-a8bd-45a17ce1f21c",
+            "TextureUUID": "4c196334-49db-4e84-85b6-49db4545b997"
+        },
+        {
+            "Path": "CurveBg.png",
+            "SpriteUUID": "fd9eebd6-48d6-13d8-a2ae-48d6080e2142",
+            "TextureUUID": "a00466ae-43c2-5460-b49d-43c2f66fe13a"
         }
     ],
     "SplashScreen": {

+ 1 - 1
Data/Raw/DataPackageContents.txt

@@ -6,7 +6,7 @@ Data/arial.ttf.asset
 Data/arial.ttf_8_texpage_0.asset
 Data/arialAA.ttf.asset
 Data/arialAA.ttf_16_texpage_0.asset
-Data/GUISkin.asset
+Data/GUISkin.json.asset
 Data/Layout.asset
 Data/SplashScreen.png.asset
 Data/Timestamp.asset

+ 250 - 14
Data/Raw/GUISkin.json

@@ -2287,6 +2287,70 @@
             }
         ]
     },
+    {
+        "fixedHeight": true,
+        "height": 21,
+        "minWidth": 30,
+        "name": "GUIFloatFieldX",
+        "subStyles": [
+            {
+                "name": "EditorFieldInput",
+                "style": "InputBox"
+            },
+            {
+                "name": "EditorFieldLabel",
+                "style": "ButtonAddOnRed"
+            }
+        ]
+    },
+    {
+        "fixedHeight": true,
+        "height": 21,
+        "minWidth": 30,
+        "name": "GUIFloatFieldY",
+        "subStyles": [
+            {
+                "name": "EditorFieldInput",
+                "style": "InputBox"
+            },
+            {
+                "name": "EditorFieldLabel",
+                "style": "ButtonAddOnGreen"
+            }
+        ]
+    },
+    {
+        "fixedHeight": true,
+        "height": 21,
+        "minWidth": 30,
+        "name": "GUIFloatFieldZ",
+        "subStyles": [
+            {
+                "name": "EditorFieldInput",
+                "style": "InputBox"
+            },
+            {
+                "name": "EditorFieldLabel",
+                "style": "ButtonAddOnBlue"
+            }
+        ]
+    },
+    {
+        "fixedHeight": true,
+        "height": 21,
+        "minWidth": 30,
+        "name": "GUIFloatFieldGray",
+        "subStyles": [
+            {
+                "name": "EditorFieldInput",
+                "style": "InputBox"
+            },
+            {
+                "name": "EditorFieldLabel",
+                "style": "ButtonAddOnGray"
+            }
+        ]
+    },
     {
         "fixedHeight": true,
         "height": 21,
@@ -2337,7 +2401,7 @@
     },
     {
         "fixedHeight": true,
-        "height": 35,
+        "height": 21,
         "minWidth": 30,
         "name": "GUIVector2Field",
         "subStyles": [
@@ -2346,14 +2410,18 @@
                 "style": "EditorFieldLabel"
             },
             {
-                "name": "EditorFloatField",
-                "style": "GUIFloatField"
+                "name": "XFloatField",
+                "style": "GUIFloatFieldX"
+            },
+            {
+                "name": "YFloatField",
+                "style": "GUIFloatFieldY"
             }
         ]
     },
     {
         "fixedHeight": true,
-        "height": 35,
+        "height": 21,
         "minWidth": 30,
         "name": "GUIVector3Field",
         "subStyles": [
@@ -2362,8 +2430,16 @@
                 "style": "EditorFieldLabel"
             },
             {
-                "name": "EditorFloatField",
-                "style": "GUIFloatField"
+                "name": "XFloatField",
+                "style": "GUIFloatFieldX"
+            },
+            {
+                "name": "YFloatField",
+                "style": "GUIFloatFieldY"
+            },
+            {
+                "name": "ZFloatField",
+                "style": "GUIFloatFieldZ"
             }
         ]
     },
@@ -2378,8 +2454,20 @@
                 "style": "EditorFieldLabel"
             },
             {
-                "name": "EditorFloatField",
-                "style": "GUIFloatField"
+                "name": "XFloatField",
+                "style": "GUIFloatFieldX"
+            },
+            {
+                "name": "YFloatField",
+                "style": "GUIFloatFieldY"
+            },
+            {
+                "name": "ZFloatField",
+                "style": "GUIFloatFieldZ"
+            },
+            {
+                "name": "WFloatField",
+                "style": "GUIFloatFieldGray"
             }
         ]
     },
@@ -3102,14 +3190,20 @@
     },
     {
         "name": "GUICurves",
-        "minHeight": 20,
+        "minHeight": 40,
         "margins": {
             "bottom": 2,
             "left": 2,
             "right": 2,
             "top": 2
         },
-        "minWidth": 30
+        "minWidth": 30,
+        "subStyles": [
+            {
+                "name": "Background",
+                "style": "CurveBg"
+            }
+        ]
     },
     {
         "name": "GUIFloatDistributionField",
@@ -3137,13 +3231,13 @@
     },
     {
         "name": "GUIVector2DistributionField",
-        "minHeight": 40,
+        "minHeight": 21,
 		"maxHeight": 100,
         "minWidth": 30,
         "subStyles": [
             {
                 "name": "FloatField",
-                "style": "GUIFloatField"
+                "style": "GUIVector2Field"
             },
             {
                 "name": "CurvesField",
@@ -3161,13 +3255,13 @@
     },
     {
         "name": "GUIVector3DistributionField",
-        "minHeight": 60,
+        "minHeight": 21,
 		"maxHeight": 150,
         "minWidth": 30,
         "subStyles": [
             {
                 "name": "FloatField",
-                "style": "GUIFloatField"
+                "style": "GUIVector3Field"
             },
             {
                 "name": "CurvesField",
@@ -3238,5 +3332,147 @@
 		"active": {
             "texture": "DropDownArrowActive.png"
         }
+    },
+    {
+        "fixedHeight": true,
+        "height": 19,
+		"fixedWidth": true,
+		"width": 15,
+        "border": {
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "top": 4
+        },
+        "margins": {
+            "bottom": 2,
+            "left": 2,
+            "right": 2,
+            "top": 2
+        },
+        "normal": {
+            "textColor": {
+                "a": 1.0,
+                "b": 0.7,
+                "g": 0.7,
+                "r": 0.7
+            },
+            "texture": "ButtonAddOnBlue.png"
+        },
+        "name": "ButtonAddOnBlue",
+        "textHorzAlign": 1,
+        "textVertAlign": 1,
+        "font": "arialBold.ttf",
+        "fontSize": 8
+    },
+    {
+        "fixedHeight": true,
+        "height": 19,
+		"fixedWidth": true,
+		"width": 15,
+        "border": {
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "top": 4
+        },
+        "margins": {
+            "bottom": 2,
+            "left": 2,
+            "right": 2,
+            "top": 2
+        },
+        "normal": {
+            "textColor": {
+                "a": 1.0,
+                "b": 0.7,
+                "g": 0.7,
+                "r": 0.7
+            },
+            "texture": "ButtonAddOnGreen.png"
+        },
+        "name": "ButtonAddOnGreen",
+        "textHorzAlign": 1,
+        "textVertAlign": 1,
+        "font": "arialBold.ttf",
+        "fontSize": 8
+    },
+    {
+        "fixedHeight": true,
+        "height": 19,
+		"fixedWidth": true,
+		"width": 15,
+        "border": {
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "top": 4
+        },
+        "margins": {
+            "bottom": 2,
+            "left": 2,
+            "right": 2,
+            "top": 2
+        },
+        "normal": {
+            "textColor": {
+                "a": 1.0,
+                "b": 0.7,
+                "g": 0.7,
+                "r": 0.7
+            },
+            "texture": "ButtonAddOnRed.png"
+        },
+        "name": "ButtonAddOnRed",
+        "textHorzAlign": 1,
+        "textVertAlign": 1,
+        "font": "arialBold.ttf",
+        "fontSize": 8
+    },
+    {
+        "fixedHeight": true,
+        "height": 19,
+		"fixedWidth": true,
+		"width": 15,
+        "border": {
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "top": 4
+        },
+        "margins": {
+            "bottom": 2,
+            "left": 2,
+            "right": 2,
+            "top": 2
+        },
+        "normal": {
+            "textColor": {
+                "a": 1.0,
+                "b": 0.7,
+                "g": 0.7,
+                "r": 0.7
+            },
+            "texture": "ButtonAddOnGray.png"
+        },
+        "name": "ButtonAddOnGray",
+        "textHorzAlign": 1,
+        "textVertAlign": 1,
+        "font": "arialBold.ttf",
+        "fontSize": 8
+    },
+    {
+        "minHeight": 4,
+		"minWidth": 4,
+        "border": {
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "top": 1
+        },
+        "normal": {
+            "texture": "CurveBg.png"
+        },
+        "name": "CurveBg"
     }
 ]

+ 1 - 1
Source/EditorCore/Build/BsBuiltinEditorResources.cpp

@@ -150,7 +150,7 @@ namespace bs
 
 		mDefaultFont = gResources().load<Font>(BuiltinDataFolder + (DefaultFontFilename + ".asset"));
 		mDefaultAAFont = gResources().load<Font>(BuiltinDataFolder + (DefaultAAFontFilename + ".asset"));
-		mSkin = gResources().load<GUISkin>(BuiltinDataFolder + (GUISkinFile + ".asset"));
+		mSkin = gResources().load<GUISkin>(BuiltinDataFolder + (GUISkinFile + ".json.asset"));
 	}
 
 	HSpriteTexture BuiltinEditorResources::getGUIIcon(const String& name) const

+ 17 - 5
Source/EditorCore/GUI/BsGUIColorDistributionField.cpp

@@ -23,24 +23,28 @@ namespace bs
 		mContextMenu->addMenuItem("Constant", [this]()
 		{
 			mValue = ColorDistribution(mMinConstant);
+			mPropertyType = PDT_Constant;
 			rebuild();
 		}, 50);
 
 		mContextMenu->addMenuItem("Range", [this]()
 		{
 			mValue = ColorDistribution(mMinConstant, mMaxConstant);
+			mPropertyType = PDT_RandomRange;
 			rebuild();
 		}, 40);
 
 		mContextMenu->addMenuItem("Gradient", [this]()
 		{
 			mValue = ColorDistribution(mMinGradient);
+			mPropertyType = PDT_Curve;
 			rebuild();
 		}, 30);
 
 		mContextMenu->addMenuItem("Gradient range", [this]()
 		{
 			mValue = ColorDistribution(mMinGradient, mMaxGradient);
+			mPropertyType = PDT_RandomCurveRange;
 			rebuild();
 		}, 20);
 
@@ -51,7 +55,7 @@ namespace bs
 	{
 		mValue = value;
 
-		switch (mValue.getType())
+		switch (mPropertyType)
 		{
 		default:
 		case PDT_Constant:
@@ -59,28 +63,36 @@ namespace bs
 			mMaxConstant = mMinConstant;
 			mMinGradient = mMinConstant;
 			mMaxGradient = mMinConstant;
+
+			mMinColorField->setValue(mMinConstant);
 			break;
 		case PDT_RandomRange: 
 			mMinConstant = mValue.getMinConstant();
 			mMaxConstant = mValue.getMaxConstant();
 			mMinGradient = mMinConstant;
 			mMaxGradient = mMaxConstant;
+
+			mMinColorField->setValue(mMinConstant);
+			mMaxColorField->setValue(mMaxConstant);
 			break;
 		case PDT_Curve: 
 			mMinGradient = mValue.getMinGradient();
 			mMaxGradient = mMinGradient;
 			mMinConstant = Color::fromRGBA(mMinGradient.evaluate(0.0f));
 			mMaxConstant = Color::fromRGBA(mMaxGradient.evaluate(0.0f));
+
+			mMinGradientField->setValue(mMinGradient);
 			break;
 		case PDT_RandomCurveRange: 
 			mMinGradient = mValue.getMinGradient();
 			mMaxGradient = mValue.getMaxGradient();
 			mMinConstant = Color::fromRGBA(mMinGradient.evaluate(0.0f));
 			mMaxConstant = Color::fromRGBA(mMaxGradient.evaluate(0.0f));
+
+			mMinGradientField->setValue(mMinGradient);
+			mMaxGradientField->setValue(mMaxGradient);
 			break;
 		}
-
-		rebuild();
 	}
 
 	void GUIColorDistributionField::setTint(const Color& color)
@@ -168,11 +180,11 @@ namespace bs
 		mLayout->clear();
 		mLayout->addElement(mLabel);
 
-		switch (mValue.getType())
+		switch (mPropertyType)
 		{
 		default:
 		case PDT_Constant:
-			mMinColorField = GUIColorField::create(HString("Constant"), 50, GUIOptions(), getSubStyleName(COLOR_FIELD_STYLE_TYPE));
+			mMinColorField = GUIColorField::create(GUIOptions(), getSubStyleName(COLOR_FIELD_STYLE_TYPE));
 			mMaxColorField = nullptr;
 			mMinGradientField = nullptr;
 			mMaxGradientField = nullptr;

+ 5 - 0
Source/EditorCore/GUI/BsGUIColorDistributionField.h

@@ -46,6 +46,10 @@ namespace bs
 		BS_SCRIPT_EXPORT(pr:setter,n:Value)
 		void setValue(const ColorDistribution& value);
 
+		/** Returns the type of the currently selected distribution. */
+		BS_SCRIPT_EXPORT(pr:getter,n:DistributionType)
+		PropertyDistributionType getType() const { return mPropertyType; }
+
 		/** @copydoc GUIElement::setTint */
 		void setTint(const Color& color) override;
 
@@ -79,6 +83,7 @@ namespace bs
 		GUIColorField* mMaxColorField = nullptr;
 		GUIColorGradientField* mMinGradientField = nullptr;
 		GUIColorGradientField* mMaxGradientField = nullptr;
+		PropertyDistributionType mPropertyType = PDT_Constant;
 
 		Color mMinConstant = Color::White;
 		Color mMaxConstant = Color::White;

+ 59 - 25
Source/EditorCore/GUI/BsGUIFloatDistributionField.cpp

@@ -36,12 +36,14 @@ namespace bs
 		mContextMenu->addMenuItem("Constant", [this]()
 		{
 			mValue = TDistribution<T>(mMinConstant);
+			mPropertyType = PDT_Constant;
 			rebuild();
 		}, 50);
 
 		mContextMenu->addMenuItem("Range", [this]()
 		{
 			mValue = TDistribution<T>(mMinConstant, mMaxConstant);
+			mPropertyType = PDT_RandomRange;
 			rebuild();
 		}, 40);
 
@@ -51,6 +53,7 @@ namespace bs
 			AnimationUtility::combineCurve<T>(mMinCurve, combinedCurve);
 
 			mValue = TDistribution<T>(combinedCurve);
+			mPropertyType = PDT_Curve;
 			rebuild();
 		}, 30);
 
@@ -63,6 +66,7 @@ namespace bs
 			AnimationUtility::combineCurve<T>(mMaxCurve, combinedCurveMax);
 
 			mValue = TDistribution<T>(combinedCurveMin, combinedCurveMax);
+			mPropertyType = PDT_RandomCurveRange;
 			rebuild();
 		}, 20);
 
@@ -74,7 +78,7 @@ namespace bs
 	{
 		mValue = value;
 
-		switch (mValue.getType())
+		switch (mPropertyType)
 		{
 		default:
 		case PDT_Constant:
@@ -87,11 +91,13 @@ namespace bs
 					{ TCurveProperties<T>::getComponent(mMinConstant, i), 0.0f, 0.0f, 0.0f},
 					{ TCurveProperties<T>::getComponent(mMinConstant, i), 0.0f, 0.0f, 1.0f} });
 
-				mMaxCurve[1] = TAnimationCurve<float>({
+				mMaxCurve[i] = TAnimationCurve<float>({
 					{ TCurveProperties<T>::getComponent(mMinConstant, i), 0.0f, 0.0f, 0.0f},
 					{ TCurveProperties<T>::getComponent(mMinConstant, i), 0.0f, 0.0f, 1.0f} });
 			}
 
+			mMinInput->setValue(mMinConstant);
+
 			break;
 		case PDT_RandomRange: 
 			mMinConstant = mValue.getMinConstant();
@@ -103,10 +109,14 @@ namespace bs
 					{ TCurveProperties<T>::getComponent(mMinConstant, i), 0.0f, 0.0f, 0.0f},
 					{ TCurveProperties<T>::getComponent(mMinConstant, i), 0.0f, 0.0f, 1.0f} });
 
-				mMaxCurve[1] = TAnimationCurve<float>({
+				mMaxCurve[i] = TAnimationCurve<float>({
 					{ TCurveProperties<T>::getComponent(mMaxConstant, i), 0.0f, 0.0f, 0.0f},
 					{ TCurveProperties<T>::getComponent(mMaxConstant, i), 0.0f, 0.0f, 1.0f} });
 			}
+
+			mMinInput->setValue(mMinConstant);
+			mMaxInput->setValue(mMaxConstant);
+
 			break;
 		case PDT_Curve:
 			AnimationUtility::splitCurve(mValue.getMinCurve(), mMinCurve);
@@ -116,6 +126,8 @@ namespace bs
 			{
 				TCurveProperties<T>::setComponent(mMinConstant, i, mMinCurve[i].evaluate(0.0f));
 				TCurveProperties<T>::setComponent(mMaxConstant, i, mMaxCurve[i].evaluate(0.0f));
+
+				mCurveDisplay[i]->setCurves({ CurveDrawInfo(mMinCurve[i], Color::BansheeOrange) });
 			}
 
 			break;
@@ -127,12 +139,16 @@ namespace bs
 			{
 				TCurveProperties<T>::setComponent(mMinConstant, i, mMinCurve[i].evaluate(0.0f));
 				TCurveProperties<T>::setComponent(mMaxConstant, i, mMaxCurve[i].evaluate(0.0f));
+
+				mCurveDisplay[i]->setCurves(
+					{
+						CurveDrawInfo(mMinCurve[i], Color::BansheeOrange),
+						CurveDrawInfo(mMaxCurve[i], Color::Red)
+					});	
 			}
 
 			break;
 		}
-
-		rebuild();
 	}
 
 	template<class T, class SELF>
@@ -171,34 +187,34 @@ namespace bs
 	template<class T, class SELF>
 	Vector2I TGUIDistributionField<T, SELF>::_getOptimalSize() const
 	{
-		Vector2I optimalsize = mDropDownButton->_getOptimalSize();
-
-		if(mLabel)
-		{
-			optimalsize.x += mLabel->_getOptimalSize().x;
-			optimalsize.y = std::max(optimalsize.y, mLabel->_getOptimalSize().y);
-		}
+		Vector2I optimalsize = Vector2I::ZERO;
 
 		if(impl::isVertical<T>())
 		{
 			if (mMinInput)
 			{
-				optimalsize.x = std::max(optimalsize.x, mMinInput->_getOptimalSize().x);
-				optimalsize.y += mMinInput->_getOptimalSize().y;
+				Vector2I elemOptimal = mMinInput->_calculateLayoutSizeRange().optimal;
+
+				optimalsize.x = std::max(optimalsize.x, elemOptimal.x);
+				optimalsize.y += elemOptimal.y;
 			}
 
 			if (mMaxInput)
 			{
-				optimalsize.x = std::max(optimalsize.x, mMaxInput->_getOptimalSize().x);
-				optimalsize.y += mMaxInput->_getOptimalSize().y;
+				Vector2I elemOptimal = mMaxInput->_calculateLayoutSizeRange().optimal;
+
+				optimalsize.x = std::max(optimalsize.x, elemOptimal.x);
+				optimalsize.y += elemOptimal.y;
 			}
 
 			for(UINT32 i = 0; i < NumComponents; i++)
 			{
 				if (mCurveDisplay[i])
 				{
-					optimalsize.x = std::max(optimalsize.x, 50);
-					optimalsize.y += mCurveDisplay[i]->_getOptimalSize().y;
+					Vector2I elemOptimal = mCurveDisplay[i]->_calculateLayoutSizeRange().optimal;
+
+					optimalsize.x = std::max(optimalsize.x, elemOptimal.x);
+					optimalsize.y += elemOptimal.y;
 				}
 			}
 		}
@@ -206,25 +222,43 @@ namespace bs
 		{
 			if (mMinInput)
 			{
-				optimalsize.x += mMinInput->_getOptimalSize().x;
-				optimalsize.y = std::max(optimalsize.y, mMinInput->_getOptimalSize().y);
+				Vector2I elemOptimal = mMinInput->_calculateLayoutSizeRange().optimal;
+
+				optimalsize.x += elemOptimal.x;
+				optimalsize.y = std::max(optimalsize.y, elemOptimal.y);
 			}
 
 			if (mMaxInput)
 			{
-				optimalsize.x += mMaxInput->_getOptimalSize().x;
-				optimalsize.y = std::max(optimalsize.y, mMaxInput->_getOptimalSize().y);
+				Vector2I elemOptimal = mMaxInput->_calculateLayoutSizeRange().optimal;
+
+				optimalsize.x += elemOptimal.x;
+				optimalsize.y = std::max(optimalsize.y, elemOptimal.y);
 			}
 
 			for(UINT32 i = 0; i < NumComponents; i++)
 			{
 				if (mCurveDisplay[i])
 				{
-					optimalsize.x += mCurveDisplay[i]->_getOptimalSize().x;
-					optimalsize.y = std::max(optimalsize.y, 50);
+					Vector2I elemOptimal = mCurveDisplay[i]->_calculateLayoutSizeRange().optimal;
+
+					optimalsize.x += elemOptimal.x;
+					optimalsize.y = std::max(optimalsize.y, elemOptimal.y);
 				}
 			}
 		}
+		
+		Vector2I dropDownSize = mDropDownButton->_calculateLayoutSizeRange().optimal;
+		optimalsize.x += dropDownSize.x;
+		optimalsize.y = std::max(optimalsize.y, dropDownSize.y);
+
+		if (mLabel)
+		{
+			Vector2I elemOptimal = mLabel->_calculateLayoutSizeRange().optimal;
+
+			optimalsize.x += elemOptimal.x;
+			optimalsize.y = std::max(optimalsize.y, elemOptimal.y);
+		}
 
 		return optimalsize;
 	}
@@ -270,7 +304,7 @@ namespace bs
 		{
 		default:
 		case PDT_Constant:
-			mMinInput = GUIConstantType::create(HString("Constant"), 50, GUIOptions(), getSubStyleName(FLOAT_FIELD_STYLE_TYPE));
+			mMinInput = GUIConstantType::create(GUIOptions(), getSubStyleName(FLOAT_FIELD_STYLE_TYPE));
 			mMaxInput = nullptr;
 
 			for(int i = 0; i < NumComponents; i++)

+ 5 - 0
Source/EditorCore/GUI/BsGUIFloatDistributionField.h

@@ -67,6 +67,10 @@ namespace bs
 		BS_SCRIPT_EXPORT(pr:setter,n:Value)
 		void setValue(const TDistribution<T>& value);
 
+		/** Returns the type of the currently selected distribution. */
+		BS_SCRIPT_EXPORT(pr:getter,n:DistributionType)
+		PropertyDistributionType getType() const { return mPropertyType; }
+
 		/** @copydoc GUIElement::setTint */
 		void setTint(const Color& color) override;
 
@@ -116,6 +120,7 @@ namespace bs
 		GUIConstantType* mMinInput = nullptr;
 		GUIConstantType* mMaxInput = nullptr;
 		GUICurves* mCurveDisplay[NumComponents] = { };
+		PropertyDistributionType mPropertyType = PDT_Constant;
 
 		T mMinConstant = TCurveProperties<T>::getZero();
 		T mMaxConstant = TCurveProperties<T>::getZero();

+ 9 - 0
Source/EditorCore/GUI/BsGUITimeline.cpp

@@ -7,6 +7,7 @@
 #include "GUI/BsGUICanvas.h"
 #include "Math/BsLine2.h"
 #include "GUI/BsGUIWidget.h"
+#include "GUI/BsGUITexture.h"
 
 namespace bs
 {
@@ -14,7 +15,12 @@ namespace bs
 		:GUIElementContainer(dimensions, styleName)
 	{
 		mCanvas = GUICanvas::create();
+		mBackground = GUITexture::create(getSubStyleName(BACKGROUND_STYLE_TYPE));
+
+		mBackground->_setElementDepth(255);
+
 		_registerChildElement(mCanvas);
+		_registerChildElement(mBackground);
 	}
 
 	const String& GUITimeline::getGUITypeName()
@@ -131,6 +137,8 @@ namespace bs
 
 	void GUITimeline::_updateLayoutInternal(const GUILayoutData& data)
 	{
+		mBackground->_setLayoutData(data);
+
 		mCanvas->_setLayoutData(data);
 		mCanvas->_updateLayoutInternal(data);
 	}
@@ -143,5 +151,6 @@ namespace bs
 	void GUITimeline::styleUpdated()
 	{
 		mCanvas->setStyle(GUICanvas::getGUITypeName());
+		mBackground->setStyle(getSubStyleName(BACKGROUND_STYLE_TYPE));
 	}
 }

+ 4 - 0
Source/EditorCore/GUI/BsGUITimeline.h

@@ -20,6 +20,9 @@ namespace bs
 		/** Returns type name of the GUI element used for finding GUI element styles. */
 		static const String& getGUITypeName();
 
+		/** Style type name for the internal background image. */
+		static constexpr const char* BACKGROUND_STYLE_TYPE = "Background";
+
 		/**	Determines the range of values to display on the timeline, in seconds. */
 		BS_SCRIPT_EXPORT(pr:setter,n:Range)
 		void setRange(float range);
@@ -128,6 +131,7 @@ namespace bs
 		void styleUpdated() override;
 
 		GUICanvas* mCanvas = nullptr;
+		GUITexture* mBackground = nullptr;
 
 		float mRange = 20.0f;
 		float mOffset = 0.0f;

+ 17 - 18
Source/EditorCore/GUI/BsGUIVector2Field.cpp

@@ -5,37 +5,30 @@
 #include "GUI/BsGUILayoutY.h"
 #include "GUI/BsGUIFloatField.h"
 #include "GUI/BsGUILabel.h"
+#include "GUI/BsGUISpace.h"
 
 using namespace std::placeholders;
 
 namespace bs
 {
-	const UINT32 GUIVector2Field::ELEMENT_LABEL_WIDTH = 10;
+	const UINT32 GUIVector2Field::ELEMENT_LABEL_WIDTH = 15;
 
 	GUIVector2Field::GUIVector2Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
 		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
 		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel),
 		mFieldX(nullptr), mFieldY(nullptr)
 	{
-		mFieldX = GUIFloatField::create(HString("X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
-		mFieldY = GUIFloatField::create(HString("Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
+		mFieldX = GUIFloatField::create(HString("X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getXFieldStyleType()));
+		mFieldY = GUIFloatField::create(HString("Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getYFieldStyleType()));
 
 		mFieldX->onValueChanged.connect(std::bind(&GUIVector2Field::valueChanged, this, _1));
 		mFieldY->onValueChanged.connect(std::bind(&GUIVector2Field::valueChanged, this, _1));
 		mFieldX->onConfirm.connect(std::bind(&GUIVector2Field::inputConfirmed, this));
 		mFieldY->onConfirm.connect(std::bind(&GUIVector2Field::inputConfirmed, this));
 
-		mLayout->removeElement(mLabel);
-
-		GUILayout* layout = mLayout->addNewElement<GUILayoutY>();
-
-		layout->addElement(mLabel);
-		mLabel->resetDimensions();
-
-		GUILayout* elementLayout = layout->addNewElement<GUILayoutX>();
-
-		elementLayout->addElement(mFieldX);
-		elementLayout->addElement(mFieldY);
+		mLayout->addElement(mFieldX);
+		mLayout->addNewElement<GUIFixedSpace>(5);
+		mLayout->addElement(mFieldY);
 	}
 
 	Vector2 GUIVector2Field::getValue() const
@@ -83,8 +76,8 @@ namespace bs
 		if (mLabel != nullptr)
 			mLabel->setStyle(getSubStyleName(getLabelStyleType()));
 
-		mFieldX->setStyle(getSubStyleName(getFloatFieldStyleType()));
-		mFieldY->setStyle(getSubStyleName(getFloatFieldStyleType()));
+		mFieldX->setStyle(getSubStyleName(getXFieldStyleType()));
+		mFieldY->setStyle(getSubStyleName(getYFieldStyleType()));
 	}
 
 	const String& GUIVector2Field::getGUITypeName()
@@ -93,9 +86,15 @@ namespace bs
 		return typeName;
 	}
 
-	const String& GUIVector2Field::getFloatFieldStyleType()
+	const String& GUIVector2Field::getXFieldStyleType()
+	{
+		static String LABEL_STYLE_TYPE = "XFloatField";
+		return LABEL_STYLE_TYPE;
+	}
+
+	const String& GUIVector2Field::getYFieldStyleType()
 	{
-		static String LABEL_STYLE_TYPE = "EditorFloatField";
+		static String LABEL_STYLE_TYPE = "YFloatField";
 		return LABEL_STYLE_TYPE;
 	}
 }

+ 7 - 4
Source/EditorCore/GUI/BsGUIVector2Field.h

@@ -22,8 +22,11 @@ namespace bs
 		/** Returns type name of the GUI element used for finding GUI element styles. */
 		static const String& getGUITypeName();
 
-		/** Style type name for the internal input boxes. */
-		static const String& getFloatFieldStyleType();
+		/** Style type name for the internal X input box. */
+		static const String& getXFieldStyleType();
+
+		/** Style type name for the internal Y input box. */
+		static const String& getYFieldStyleType();
 
 		GUIVector2Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style, const GUIDimensions& dimensions, bool withLabel);
@@ -38,12 +41,12 @@ namespace bs
 		bool hasInputFocus() const;
 
 		/** @copydoc GUIElement::setTint */
-		virtual void setTint(const Color& color) override;
+		void setTint(const Color& color) override;
 
 		Event<void(const Vector2&)> onValueChanged; /**< Triggers when the field value changes. */
 		Event<void()> onConfirm; /**< Triggered when the user hits the Enter key with the input box in focus. */
 	protected:
-		virtual ~GUIVector2Field() { }
+		virtual ~GUIVector2Field() = default;
 
 	protected:
 		static const UINT32 ELEMENT_LABEL_WIDTH;

+ 27 - 20
Source/EditorCore/GUI/BsGUIVector3Field.cpp

@@ -5,21 +5,22 @@
 #include "GUI/BsGUILayoutY.h"
 #include "GUI/BsGUIFloatField.h"
 #include "GUI/BsGUILabel.h"
+#include "GUI/BsGUISpace.h"
 
 using namespace std::placeholders;
 
 namespace bs
 {
-	const UINT32 GUIVector3Field::ELEMENT_LABEL_WIDTH = 10;
+	const UINT32 GUIVector3Field::ELEMENT_LABEL_WIDTH = 15;
 
 	GUIVector3Field::GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
 		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
 		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel),
 		mFieldX(nullptr), mFieldY(nullptr), mFieldZ(nullptr)
 	{
-		mFieldX = GUIFloatField::create(HString("X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
-		mFieldY = GUIFloatField::create(HString("Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
-		mFieldZ = GUIFloatField::create(HString("Z"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
+		mFieldX = GUIFloatField::create(HString("X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getXFieldStyleType()));
+		mFieldY = GUIFloatField::create(HString("Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getYFieldStyleType()));
+		mFieldZ = GUIFloatField::create(HString("Z"), ELEMENT_LABEL_WIDTH, getSubStyleName(getZFieldStyleType()));
 
 		mFieldX->onValueChanged.connect(std::bind(&GUIVector3Field::valueChanged, this, _1));
 		mFieldY->onValueChanged.connect(std::bind(&GUIVector3Field::valueChanged, this, _1));
@@ -29,17 +30,11 @@ namespace bs
 		mFieldY->onConfirm.connect(std::bind(&GUIVector3Field::inputConfirmed, this));
 		mFieldZ->onConfirm.connect(std::bind(&GUIVector3Field::inputConfirmed, this));
 
-		mLayout->removeElement(mLabel);
-
-		GUILayout* layout = mLayout->addNewElement<GUILayoutY>();
-		layout->addElement(mLabel);
-		mLabel->resetDimensions();
-
-		GUILayout* elementLayout = layout->addNewElement<GUILayoutX>();
-
-		elementLayout->addElement(mFieldX);
-		elementLayout->addElement(mFieldY);
-		elementLayout->addElement(mFieldZ);
+		mLayout->addElement(mFieldX);
+		mLayout->addNewElement<GUIFixedSpace>(5);
+		mLayout->addElement(mFieldY);
+		mLayout->addNewElement<GUIFixedSpace>(5);
+		mLayout->addElement(mFieldZ);
 	}
 
 	Vector3 GUIVector3Field::getValue() const
@@ -79,9 +74,9 @@ namespace bs
 		if (mLabel != nullptr)
 			mLabel->setStyle(getSubStyleName(getLabelStyleType()));
 
-		mFieldX->setStyle(getSubStyleName(getFloatFieldStyleType()));
-		mFieldY->setStyle(getSubStyleName(getFloatFieldStyleType()));
-		mFieldZ->setStyle(getSubStyleName(getFloatFieldStyleType()));
+		mFieldX->setStyle(getSubStyleName(getXFieldStyleType()));
+		mFieldY->setStyle(getSubStyleName(getYFieldStyleType()));
+		mFieldZ->setStyle(getSubStyleName(getZFieldStyleType()));
 	}
 
 	void GUIVector3Field::valueChanged(float newValue)
@@ -101,9 +96,21 @@ namespace bs
 		return typeName;
 	}
 
-	const String& GUIVector3Field::getFloatFieldStyleType()
+	const String& GUIVector3Field::getXFieldStyleType()
+	{
+		static String LABEL_STYLE_TYPE = "XFloatField";
+		return LABEL_STYLE_TYPE;
+	}
+
+	const String& GUIVector3Field::getYFieldStyleType()
+	{
+		static String LABEL_STYLE_TYPE = "YFloatField";
+		return LABEL_STYLE_TYPE;
+	}
+
+	const String& GUIVector3Field::getZFieldStyleType()
 	{
-		static String LABEL_STYLE_TYPE = "EditorFloatField";
+		static String LABEL_STYLE_TYPE = "ZFloatField";
 		return LABEL_STYLE_TYPE;
 	}
 }

+ 10 - 4
Source/EditorCore/GUI/BsGUIVector3Field.h

@@ -22,8 +22,14 @@ namespace bs
 		/** Returns type name of the GUI element used for finding GUI element styles.  */
 		static const String& getGUITypeName();
 
-		/** Style type name for the internal input boxes. */
-		static const String& getFloatFieldStyleType();
+		/** Style type name for the internal X input box. */
+		static const String& getXFieldStyleType();
+
+		/** Style type name for the internal Y input box. */
+		static const String& getYFieldStyleType();
+
+		/** Style type name for the internal Z input box. */
+		static const String& getZFieldStyleType();
 
 		GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style, const GUIDimensions& dimensions, bool withLabel);
@@ -38,12 +44,12 @@ namespace bs
 		bool hasInputFocus() const;
 
 		/** @copydoc GUIElement::setTint */
-		virtual void setTint(const Color& color) override;
+		void setTint(const Color& color) override;
 
 		Event<void(const Vector3&)> onValueChanged; /**< Triggers when the field value changes. */
 		Event<void()> onConfirm; /**< Triggered when the user hits the Enter key with the input box in focus. */
 	protected:
-		virtual ~GUIVector3Field() { }
+		virtual ~GUIVector3Field() = default;
 
 		/** @copydoc GUIElement::styleUpdated */
 		void styleUpdated() override;

+ 33 - 11
Source/EditorCore/GUI/BsGUIVector4Field.cpp

@@ -5,21 +5,22 @@
 #include "GUI/BsGUILayoutY.h"
 #include "GUI/BsGUIFloatField.h"
 #include "GUI/BsGUILabel.h"
+#include "GUI/BsGUISpace.h"
 
 using namespace std::placeholders;
 
 namespace bs
 {
-	const UINT32 GUIVector4Field::ELEMENT_LABEL_WIDTH = 10;
+	const UINT32 GUIVector4Field::ELEMENT_LABEL_WIDTH = 15;
 
 	GUIVector4Field::GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
 		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
 		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mFieldX(nullptr), mFieldY(nullptr)
 	{
-		mFieldX = GUIFloatField::create(HString("X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
-		mFieldY = GUIFloatField::create(HString("Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
-		mFieldZ = GUIFloatField::create(HString("Z"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
-		mFieldW = GUIFloatField::create(HString("W"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
+		mFieldX = GUIFloatField::create(HString("X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getXFieldStyleType()));
+		mFieldY = GUIFloatField::create(HString("Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getYFieldStyleType()));
+		mFieldZ = GUIFloatField::create(HString("Z"), ELEMENT_LABEL_WIDTH, getSubStyleName(getZFieldStyleType()));
+		mFieldW = GUIFloatField::create(HString("W"), ELEMENT_LABEL_WIDTH, getSubStyleName(getWFieldStyleType()));
 
 		mFieldX->onValueChanged.connect(std::bind(&GUIVector4Field::valueChanged, this, _1));
 		mFieldY->onValueChanged.connect(std::bind(&GUIVector4Field::valueChanged, this, _1));
@@ -40,8 +41,11 @@ namespace bs
 		GUILayout* elementLayout = layout->addNewElement<GUILayoutX>();
 
 		elementLayout->addElement(mFieldX);
+		elementLayout->addNewElement<GUIFixedSpace>(5);
 		elementLayout->addElement(mFieldY);
+		elementLayout->addNewElement<GUIFixedSpace>(5);
 		elementLayout->addElement(mFieldZ);
+		elementLayout->addNewElement<GUIFixedSpace>(5);
 		elementLayout->addElement(mFieldW);
 	}
 
@@ -85,10 +89,10 @@ namespace bs
 		if (mLabel != nullptr)
 			mLabel->setStyle(getSubStyleName(getLabelStyleType()));
 
-		mFieldX->setStyle(getSubStyleName(getFloatFieldStyleType()));
-		mFieldY->setStyle(getSubStyleName(getFloatFieldStyleType()));
-		mFieldZ->setStyle(getSubStyleName(getFloatFieldStyleType()));
-		mFieldW->setStyle(getSubStyleName(getFloatFieldStyleType()));
+		mFieldX->setStyle(getSubStyleName(getXFieldStyleType()));
+		mFieldY->setStyle(getSubStyleName(getYFieldStyleType()));
+		mFieldZ->setStyle(getSubStyleName(getZFieldStyleType()));
+		mFieldW->setStyle(getSubStyleName(getWFieldStyleType()));
 	}
 
 	void GUIVector4Field::valueChanged(float newValue)
@@ -108,9 +112,27 @@ namespace bs
 		return typeName;
 	}
 
-	const String& GUIVector4Field::getFloatFieldStyleType()
+	const String& GUIVector4Field::getXFieldStyleType()
 	{
-		static String LABEL_STYLE_TYPE = "EditorFloatField";
+		static String LABEL_STYLE_TYPE = "XFloatField";
+		return LABEL_STYLE_TYPE;
+	}
+
+	const String& GUIVector4Field::getYFieldStyleType()
+	{
+		static String LABEL_STYLE_TYPE = "YFloatField";
+		return LABEL_STYLE_TYPE;
+	}
+
+	const String& GUIVector4Field::getZFieldStyleType()
+	{
+		static String LABEL_STYLE_TYPE = "ZFloatField";
+		return LABEL_STYLE_TYPE;
+	}
+
+	const String& GUIVector4Field::getWFieldStyleType()
+	{
+		static String LABEL_STYLE_TYPE = "WFloatField";
 		return LABEL_STYLE_TYPE;
 	}
 }

+ 11 - 2
Source/EditorCore/GUI/BsGUIVector4Field.h

@@ -22,8 +22,17 @@ namespace bs
 		/** Returns type name of the GUI element used for finding GUI element styles. */
 		static const String& getGUITypeName();
 
-		/** Style type name for the internal input boxes. */
-		static const String& getFloatFieldStyleType();
+		/** Style type name for the internal X input box. */
+		static const String& getXFieldStyleType();
+
+		/** Style type name for the internal Y input box. */
+		static const String& getYFieldStyleType();
+
+		/** Style type name for the internal Z input box. */
+		static const String& getZFieldStyleType();
+
+		/** Style type name for the internal W input box. */
+		static const String& getWFieldStyleType();
 
 		GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style, const GUIDimensions& dimensions, bool withLabel);

+ 6 - 6
Source/Scripting/MBansheeEditor/GUI/GUIColorDistributionField.cs

@@ -14,8 +14,8 @@ namespace BansheeEditor
         {
             ColorDistribution distribution = Value;
 
-            if (distribution.DistributionType == PropertyDistributionType.Constant ||
-                distribution.DistributionType == PropertyDistributionType.RandomRange)
+            if (DistributionType == PropertyDistributionType.Constant ||
+                DistributionType == PropertyDistributionType.RandomRange)
             {
                 ColorPicker.Show(distribution.GetMinConstant(), (success, value) =>
                 {
@@ -30,8 +30,8 @@ namespace BansheeEditor
                     OnChanged?.Invoke();
                 });
             }
-            else if (distribution.DistributionType == PropertyDistributionType.Curve || 
-                     distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
+            else if (DistributionType == PropertyDistributionType.Curve || 
+                     DistributionType == PropertyDistributionType.RandomCurveRange)
             {
                 GradientPicker.Show(distribution.GetMinGradient(), (success, colorGradient) =>
                 {
@@ -52,7 +52,7 @@ namespace BansheeEditor
         {
             ColorDistribution distribution = Value;
 
-            if (distribution.DistributionType == PropertyDistributionType.RandomRange)
+            if (DistributionType == PropertyDistributionType.RandomRange)
             {
                 ColorPicker.Show(distribution.GetMaxConstant(), (success, value) =>
                 {
@@ -63,7 +63,7 @@ namespace BansheeEditor
                     OnChanged?.Invoke();
                 });
             }
-            else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
+            else if (DistributionType == PropertyDistributionType.RandomCurveRange)
             {
                 GradientPicker.Show(distribution.GetMaxGradient(), (success, colorGradient) =>
                 {

+ 2 - 2
Source/Scripting/MBansheeEditor/GUI/GUIFloatDistributionField.cs

@@ -19,7 +19,7 @@ namespace BansheeEditor
         {
             FloatDistribution distribution = Value;
 
-            if (distribution.DistributionType == PropertyDistributionType.Curve)
+            if (DistributionType == PropertyDistributionType.Curve)
             {
                 CurveEditorWindow.Show(distribution.GetMinCurve(), (success, curve) =>
                 {
@@ -30,7 +30,7 @@ namespace BansheeEditor
                     OnChanged?.Invoke();
                 });
             }
-            else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
+            else if (DistributionType == PropertyDistributionType.RandomCurveRange)
             {
                 CurveEditorWindow.Show(distribution.GetMinCurve(), distribution.GetMaxCurve(), 
                     (success, minCurve, maxCurve) =>

+ 2 - 2
Source/Scripting/MBansheeEditor/GUI/GUIVector2DistributionField.cs

@@ -19,7 +19,7 @@ namespace BansheeEditor
         {
             Vector2Distribution distribution = Value;
 
-            if (distribution.DistributionType == PropertyDistributionType.Curve)
+            if (DistributionType == PropertyDistributionType.Curve)
             {
                 AnimationCurve[] curves = AnimationUtility.SplitCurve2D(distribution.GetMinCurve());
                 if (component < curves.Length)
@@ -37,7 +37,7 @@ namespace BansheeEditor
                     });
                 }
             }
-            else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
+            else if (DistributionType == PropertyDistributionType.RandomCurveRange)
             {
                 AnimationCurve[] minCurves = AnimationUtility.SplitCurve2D(distribution.GetMinCurve());
                 AnimationCurve[] maxCurves = AnimationUtility.SplitCurve2D(distribution.GetMaxCurve());

+ 2 - 2
Source/Scripting/MBansheeEditor/GUI/GUIVector3DistributionField.cs

@@ -19,7 +19,7 @@ namespace BansheeEditor
         {
             Vector3Distribution distribution = Value;
 
-            if (distribution.DistributionType == PropertyDistributionType.Curve)
+            if (DistributionType == PropertyDistributionType.Curve)
             {
                 AnimationCurve[] curves = AnimationUtility.SplitCurve3D(distribution.GetMinCurve());
                 if (component < curves.Length)
@@ -37,7 +37,7 @@ namespace BansheeEditor
                     });
                 }
             }
-            else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
+            else if (DistributionType == PropertyDistributionType.RandomCurveRange)
             {
                 AnimationCurve[] minCurves = AnimationUtility.SplitCurve3D(distribution.GetMinCurve());
                 AnimationCurve[] maxCurves = AnimationUtility.SplitCurve3D(distribution.GetMaxCurve());

+ 9 - 0
Source/Scripting/MBansheeEditor/Generated/GUIColorDistributionField.generated.cs

@@ -83,6 +83,13 @@ namespace BansheeEditor
 			set { Internal_setValue(mCachedPtr, value); }
 		}
 
+		/// <summary>Returns the type of the currently selected distribution.</summary>
+		[ShowInInspector]
+		public PropertyDistributionType DistributionType
+		{
+			get { return Internal_getType(mCachedPtr); }
+		}
+
 		/// <summary>Triggered when the user clicks on the minimum value display for the distribution.</summary>
 		partial void OnMinClicked();
 
@@ -94,6 +101,8 @@ namespace BansheeEditor
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setValue(IntPtr thisPtr, ColorDistribution value);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create(GUIColorDistributionField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create0(GUIColorDistributionField managedInstance, ref GUIContent labelContent, string style);

+ 9 - 0
Source/Scripting/MBansheeEditor/Generated/GUIFloatDistributionField.generated.cs

@@ -83,6 +83,13 @@ namespace BansheeEditor
 			set { Internal_setValue(mCachedPtr, value); }
 		}
 
+		/// <summary>Returns the type of the currently selected distribution.</summary>
+		[ShowInInspector]
+		public PropertyDistributionType DistributionType
+		{
+			get { return Internal_getType(mCachedPtr); }
+		}
+
 		/// <summary>
 		/// Checks if any of the float input fields currently have input focus. Only relevant for non-curve distributions.
 		/// </summary>
@@ -115,6 +122,8 @@ namespace BansheeEditor
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setValue(IntPtr thisPtr, FloatDistribution value);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern bool Internal_hasInputFocus(IntPtr thisPtr);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create(GUIFloatDistributionField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);

+ 9 - 0
Source/Scripting/MBansheeEditor/Generated/GUIVector2DistributionField.generated.cs

@@ -83,6 +83,13 @@ namespace BansheeEditor
 			set { Internal_setValue(mCachedPtr, value); }
 		}
 
+		/// <summary>Returns the type of the currently selected distribution.</summary>
+		[ShowInInspector]
+		public PropertyDistributionType DistributionType
+		{
+			get { return Internal_getType(mCachedPtr); }
+		}
+
 		/// <summary>
 		/// Checks if any of the float input fields currently have input focus. Only relevant for non-curve distributions.
 		/// </summary>
@@ -115,6 +122,8 @@ namespace BansheeEditor
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setValue(IntPtr thisPtr, Vector2Distribution value);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern bool Internal_hasInputFocus(IntPtr thisPtr);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create(GUIVector2DistributionField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);

+ 9 - 0
Source/Scripting/MBansheeEditor/Generated/GUIVector3DistributionField.generated.cs

@@ -83,6 +83,13 @@ namespace BansheeEditor
 			set { Internal_setValue(mCachedPtr, value); }
 		}
 
+		/// <summary>Returns the type of the currently selected distribution.</summary>
+		[ShowInInspector]
+		public PropertyDistributionType DistributionType
+		{
+			get { return Internal_getType(mCachedPtr); }
+		}
+
 		/// <summary>
 		/// Checks if any of the float input fields currently have input focus. Only relevant for non-curve distributions.
 		/// </summary>
@@ -115,6 +122,8 @@ namespace BansheeEditor
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setValue(IntPtr thisPtr, Vector3Distribution value);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern bool Internal_hasInputFocus(IntPtr thisPtr);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create(GUIVector3DistributionField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);

+ 40 - 154
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectorWindow.cs

@@ -72,15 +72,9 @@ namespace BansheeEditor
         private GUIEnumField soMobility;
         private GUILayout soPrefabLayout;
         private bool soHasPrefab;
-        private GUIFloatField soPosX;
-        private GUIFloatField soPosY;
-        private GUIFloatField soPosZ;
-        private GUIFloatField soRotX;
-        private GUIFloatField soRotY;
-        private GUIFloatField soRotZ;
-        private GUIFloatField soScaleX;
-        private GUIFloatField soScaleY;
-        private GUIFloatField soScaleZ;
+        private GUIVector3Field soPos;
+        private GUIVector3Field soRot;
+        private GUIVector3Field soScale;
 
         private Rect2I[] dropAreas = new Rect2I[0];
 
@@ -274,89 +268,26 @@ namespace BansheeEditor
 
             soPrefabLayout = sceneObjectLayout.AddLayoutX();
 
-            GUILayoutX positionLayout = sceneObjectLayout.AddLayoutX();
-            GUILabel positionLbl = new GUILabel(new LocEdString("Position"), GUIOption.FixedWidth(50));
-            soPosX = new GUIFloatField(new LocEdString("X"), 10, "", GUIOption.FixedWidth(60));
-            soPosY = new GUIFloatField(new LocEdString("Y"), 10, "", GUIOption.FixedWidth(60));
-            soPosZ = new GUIFloatField(new LocEdString("Z"), 10, "", GUIOption.FixedWidth(60));
-
-            soPosX.OnChanged += (x) => OnPositionChanged(0, x);
-            soPosY.OnChanged += (y) => OnPositionChanged(1, y);
-            soPosZ.OnChanged += (z) => OnPositionChanged(2, z);
-
-            soPosX.OnConfirmed += OnModifyConfirm;
-            soPosY.OnConfirmed += OnModifyConfirm;
-            soPosZ.OnConfirmed += OnModifyConfirm;
-
-            soPosX.OnFocusLost += OnModifyConfirm;
-            soPosY.OnFocusLost += OnModifyConfirm;
-            soPosZ.OnFocusLost += OnModifyConfirm;
-
-            positionLayout.AddElement(positionLbl);
-            positionLayout.AddElement(soPosX);
-            positionLayout.AddSpace(10);
-            positionLayout.AddFlexibleSpace();
-            positionLayout.AddElement(soPosY);
-            positionLayout.AddSpace(10);
-            positionLayout.AddFlexibleSpace();
-            positionLayout.AddElement(soPosZ);
-            positionLayout.AddFlexibleSpace();
-
-            GUILayoutX rotationLayout = sceneObjectLayout.AddLayoutX();
-            GUILabel rotationLbl = new GUILabel(new LocEdString("Rotation"), GUIOption.FixedWidth(50));
-            soRotX = new GUIFloatField(new LocEdString("X"), 10, "", GUIOption.FixedWidth(60));
-            soRotY = new GUIFloatField(new LocEdString("Y"), 10, "", GUIOption.FixedWidth(60));
-            soRotZ = new GUIFloatField(new LocEdString("Z"), 10, "", GUIOption.FixedWidth(60));
-
-            soRotX.OnChanged += (x) => OnRotationChanged(0, x);
-            soRotY.OnChanged += (y) => OnRotationChanged(1, y);
-            soRotZ.OnChanged += (z) => OnRotationChanged(2, z);
-
-            soRotX.OnConfirmed += OnModifyConfirm;
-            soRotY.OnConfirmed += OnModifyConfirm;
-            soRotZ.OnConfirmed += OnModifyConfirm;
-
-            soRotX.OnFocusLost += OnModifyConfirm;
-            soRotY.OnFocusLost += OnModifyConfirm;
-            soRotZ.OnFocusLost += OnModifyConfirm;
-
-            rotationLayout.AddElement(rotationLbl);
-            rotationLayout.AddElement(soRotX);
-            rotationLayout.AddSpace(10);
-            rotationLayout.AddFlexibleSpace();
-            rotationLayout.AddElement(soRotY);
-            rotationLayout.AddSpace(10);
-            rotationLayout.AddFlexibleSpace();
-            rotationLayout.AddElement(soRotZ);
-            rotationLayout.AddFlexibleSpace();
-
-            GUILayoutX scaleLayout = sceneObjectLayout.AddLayoutX();
-            GUILabel scaleLbl = new GUILabel(new LocEdString("Scale"), GUIOption.FixedWidth(50));
-            soScaleX = new GUIFloatField(new LocEdString("X"), 10, "", GUIOption.FixedWidth(60));
-            soScaleY = new GUIFloatField(new LocEdString("Y"), 10, "", GUIOption.FixedWidth(60));
-            soScaleZ = new GUIFloatField(new LocEdString("Z"), 10, "", GUIOption.FixedWidth(60));
-
-            soScaleX.OnChanged += (x) => OnScaleChanged(0, x);
-            soScaleY.OnChanged += (y) => OnScaleChanged(1, y);
-            soScaleZ.OnChanged += (z) => OnScaleChanged(2, z);
-
-            soScaleX.OnConfirmed += OnModifyConfirm;
-            soScaleY.OnConfirmed += OnModifyConfirm;
-            soScaleZ.OnConfirmed += OnModifyConfirm;
-
-            soScaleX.OnFocusLost += OnModifyConfirm;
-            soScaleY.OnFocusLost += OnModifyConfirm;
-            soScaleZ.OnFocusLost += OnModifyConfirm;
-
-            scaleLayout.AddElement(scaleLbl);
-            scaleLayout.AddElement(soScaleX);
-            scaleLayout.AddSpace(10);
-            scaleLayout.AddFlexibleSpace();
-            scaleLayout.AddElement(soScaleY);
-            scaleLayout.AddSpace(10);
-            scaleLayout.AddFlexibleSpace();
-            scaleLayout.AddElement(soScaleZ);
-            scaleLayout.AddFlexibleSpace();
+            soPos = new GUIVector3Field(new LocEdString("Position"), 50);
+            sceneObjectLayout.AddElement(soPos);
+
+            soPos.OnChanged += OnPositionChanged;
+            soPos.OnConfirmed += OnModifyConfirm;
+            soPos.OnFocusLost += OnModifyConfirm;
+
+            soRot = new GUIVector3Field(new LocEdString("Rotation"), 50);
+            sceneObjectLayout.AddElement(soRot);
+
+            soRot.OnChanged += OnRotationChanged;
+            soRot.OnConfirmed += OnModifyConfirm;
+            soRot.OnFocusLost += OnModifyConfirm;
+
+            soScale = new GUIVector3Field(new LocEdString("Scale"), 50);
+            sceneObjectLayout.AddElement(soScale);
+
+            soScale.OnChanged += OnScaleChanged;
+            soScale.OnConfirmed += OnModifyConfirm;
+            soScale.OnFocusLost += OnModifyConfirm;
 
             sceneObjectLayout.AddFlexibleSpace();
 
@@ -443,32 +374,14 @@ namespace BansheeEditor
 
             Vector3 scale = activeSO.LocalScale;
 
-            if(!soPosX.HasInputFocus)
-                soPosX.Value = position.x;
-
-            if (!soPosY.HasInputFocus)
-                soPosY.Value = position.y;
-
-            if (!soPosZ.HasInputFocus)
-                soPosZ.Value = position.z;
-
-            if (!soRotX.HasInputFocus)
-                soRotX.Value = angles.x;
-
-            if (!soRotY.HasInputFocus)
-                soRotY.Value = angles.y;
-
-            if (!soRotZ.HasInputFocus)
-                soRotZ.Value = angles.z;
+            if (!soPos.HasInputFocus)
+                soPos.Value = position;
 
-            if (!soScaleX.HasInputFocus)
-                soScaleX.Value = scale.x;
+            if (!soRot.HasInputFocus)
+                soRot.Value = angles;
 
-            if (!soScaleY.HasInputFocus)
-                soScaleY.Value = scale.y;
-
-            if (!soScaleZ.HasInputFocus)
-                soScaleZ.Value = scale.z;
+            if (!soScale.HasInputFocus)
+                soScale.Value = scale;
         }
 
         private void OnInitialize()
@@ -747,15 +660,9 @@ namespace BansheeEditor
             soMobility = null;
             soPrefabLayout = null;
             soHasPrefab = false;
-            soPosX = null;
-            soPosY = null;
-            soPosZ = null;
-            soRotX = null;
-            soRotY = null;
-            soRotZ = null;
-            soScaleX = null;
-            soScaleY = null;
-            soScaleZ = null;
+            soPos = null;
+            soRot = null;
+            soScale = null;
             dropAreas = new Rect2I[0];
 
             activeResourcePath = null;
@@ -808,25 +715,16 @@ namespace BansheeEditor
         /// Triggered when the position value in the currently active <see cref="SceneObject"/> changes. Updates the 
         /// necessary GUI elements.
         /// </summary>
-        /// <param name="idx">Index of the coordinate that was changed.</param>
         /// <param name="value">New value of the field.</param>
-        private void OnPositionChanged(int idx, float value)
+        private void OnPositionChanged(Vector3 value)
         {
             if (activeSO == null)
                 return;
 
             if (EditorApplication.ActiveCoordinateMode == HandleCoordinateMode.World)
-            {
-                Vector3 position = activeSO.Position;
-                position[idx] = value;
-                activeSO.Position = position;
-            }
+                activeSO.Position = value;
             else
-            {
-                Vector3 position = activeSO.LocalPosition;
-                position[idx] = value;
-                activeSO.LocalPosition = position;
-            }
+                activeSO.LocalPosition = value;
 
             modifyState = InspectableState.ModifyInProgress;
             EditorApplication.SetSceneDirty();
@@ -836,25 +734,16 @@ namespace BansheeEditor
         /// Triggered when the rotation value in the currently active <see cref="SceneObject"/> changes. Updates the 
         /// necessary GUI elements.
         /// </summary>
-        /// <param name="idx">Index of the euler angle that was changed (0 - X, 1 - Y, 2 - Z).</param>
         /// <param name="value">New value of the field.</param>
-        private void OnRotationChanged(int idx, float value)
+        private void OnRotationChanged(Vector3 value)
         {
             if (activeSO == null)
                 return;
 
             if (EditorApplication.ActiveCoordinateMode == HandleCoordinateMode.World)
-            {
-                Vector3 angles = activeSO.Rotation.ToEuler();
-                angles[idx] = value;
-                activeSO.Rotation = Quaternion.FromEuler(angles);
-            }
+                activeSO.Rotation = Quaternion.FromEuler(value);
             else
-            {
-                Vector3 angles = activeSO.LocalRotation.ToEuler();
-                angles[idx] = value;
-                activeSO.LocalRotation = Quaternion.FromEuler(angles);
-            }
+                activeSO.LocalRotation = Quaternion.FromEuler(value);
 
             modifyState = InspectableState.ModifyInProgress;
             EditorApplication.SetSceneDirty();
@@ -864,16 +753,13 @@ namespace BansheeEditor
         /// Triggered when the scale value in the currently active <see cref="SceneObject"/> changes. Updates the 
         /// necessary GUI elements.
         /// </summary>
-        /// <param name="idx">Index of the coordinate that was changed.</param>
         /// <param name="value">New value of the field.</param>
-        private void OnScaleChanged(int idx, float value)
+        private void OnScaleChanged(Vector3 value)
         {
             if (activeSO == null)
                 return;
 
-            Vector3 scale = activeSO.LocalScale;
-            scale[idx] = value;
-            activeSO.LocalScale = scale;
+            activeSO.LocalScale = value;
 
             modifyState = InspectableState.ModifyInProgress;
             EditorApplication.SetSceneDirty();

+ 19 - 0
Source/Scripting/MBansheeEngine/Generated/ColorGradient.generated.cs

@@ -32,6 +32,13 @@ namespace BansheeEngine
 			Internal_ColorGradient1(this, keys);
 		}
 
+		/// <summary>Returns the number of color keys in the gradient.</summary>
+		[ShowInInspector]
+		public uint NumKeys
+		{
+			get { return Internal_getNumKeys(mCachedPtr); }
+		}
+
 		/// <summary>
 		/// Keys that control the gradient, sorted by time from first to last. Key times should be in range [0, 1].
 		/// </summary>
@@ -48,6 +55,14 @@ namespace BansheeEngine
 			return Internal_getKeys(mCachedPtr);
 		}
 
+		/// <summary>Returns the color key at the specified index. If out of range an empty key is returned.</summary>
+		public ColorGradientKey GetKey(uint idx)
+		{
+			ColorGradientKey temp;
+			Internal_getKey(mCachedPtr, idx, out temp);
+			return temp;
+		}
+
 		/// <summary>Specify a "gradient" that represents a single color value.</summary>
 		public void SetConstant(Color color)
 		{
@@ -73,6 +88,10 @@ namespace BansheeEngine
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern ColorGradientKey[] Internal_getKeys(IntPtr thisPtr);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern uint Internal_getNumKeys(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getKey(IntPtr thisPtr, uint idx, out ColorGradientKey __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setConstant(IntPtr thisPtr, ref Color color);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_evaluate(IntPtr thisPtr, float t, out Color __output);

+ 12 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIColorDistributionField.generated.cpp

@@ -24,6 +24,7 @@ namespace bs
 	{
 		metaData.scriptClass->addInternalCall("Internal_getValue", (void*)&ScriptGUIColorDistributionField::Internal_getValue);
 		metaData.scriptClass->addInternalCall("Internal_setValue", (void*)&ScriptGUIColorDistributionField::Internal_setValue);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptGUIColorDistributionField::Internal_getType);
 		metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptGUIColorDistributionField::Internal_create);
 		metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptGUIColorDistributionField::Internal_create0);
 		metaData.scriptClass->addInternalCall("Internal_create1", (void*)&ScriptGUIColorDistributionField::Internal_create1);
@@ -63,6 +64,17 @@ namespace bs
 		static_cast<GUIColorDistributionField*>(thisPtr->getGUIElement())->setValue(*tmpvalue);
 	}
 
+	PropertyDistributionType ScriptGUIColorDistributionField::Internal_getType(ScriptGUIColorDistributionField* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = static_cast<GUIColorDistributionField*>(thisPtr->getGUIElement())->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
 	void ScriptGUIColorDistributionField::Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style)
 	{
 		GUIContent tmplabelContent;

+ 2 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIColorDistributionField.generated.h

@@ -4,6 +4,7 @@
 #include "Wrappers/GUI/BsScriptGUIElement.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Localization/BsHString.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 
 namespace bs
 {
@@ -28,6 +29,7 @@ namespace bs
 
 		static MonoObject* Internal_getValue(ScriptGUIColorDistributionField* thisPtr);
 		static void Internal_setValue(ScriptGUIColorDistributionField* thisPtr, MonoObject* value);
+		static PropertyDistributionType Internal_getType(ScriptGUIColorDistributionField* thisPtr);
 		static void Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style);
 		static void Internal_create0(MonoObject* managedInstance, __GUIContentInterop* labelContent, MonoString* style);
 		static void Internal_create1(MonoObject* managedInstance, MonoObject* labelText, uint32_t labelWidth, MonoString* style);

+ 13 - 1
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.cpp

@@ -4,9 +4,9 @@
 #include "BsMonoUtil.h"
 #include "../../../EditorCore/GUI/BsGUIFloatDistributionField.h"
 #include "BsScriptTDistribution.generated.h"
+#include "BsScriptHString.generated.h"
 #include "BsScriptGUIContent.generated.h"
 #include "../../../EditorCore/GUI/BsGUIFloatDistributionField.h"
-#include "BsScriptHString.generated.h"
 
 namespace bs
 {
@@ -26,6 +26,7 @@ namespace bs
 	{
 		metaData.scriptClass->addInternalCall("Internal_getValue", (void*)&ScriptGUIFloatDistributionField::Internal_getValue);
 		metaData.scriptClass->addInternalCall("Internal_setValue", (void*)&ScriptGUIFloatDistributionField::Internal_setValue);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptGUIFloatDistributionField::Internal_getType);
 		metaData.scriptClass->addInternalCall("Internal_hasInputFocus", (void*)&ScriptGUIFloatDistributionField::Internal_hasInputFocus);
 		metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptGUIFloatDistributionField::Internal_create);
 		metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptGUIFloatDistributionField::Internal_create0);
@@ -72,6 +73,17 @@ namespace bs
 		static_cast<GUIFloatDistributionField*>(thisPtr->getGUIElement())->setValue(*tmpvalue);
 	}
 
+	PropertyDistributionType ScriptGUIFloatDistributionField::Internal_getType(ScriptGUIFloatDistributionField* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = static_cast<GUIFloatDistributionField*>(thisPtr->getGUIElement())->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
 	bool ScriptGUIFloatDistributionField::Internal_hasInputFocus(ScriptGUIFloatDistributionField* thisPtr)
 	{
 		bool tmp__output;

+ 2 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.h

@@ -4,6 +4,7 @@
 #include "Wrappers/GUI/BsScriptGUIElement.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Localization/BsHString.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 
 namespace bs
 {
@@ -31,6 +32,7 @@ namespace bs
 
 		static MonoObject* Internal_getValue(ScriptGUIFloatDistributionField* thisPtr);
 		static void Internal_setValue(ScriptGUIFloatDistributionField* thisPtr, MonoObject* value);
+		static PropertyDistributionType Internal_getType(ScriptGUIFloatDistributionField* thisPtr);
 		static bool Internal_hasInputFocus(ScriptGUIFloatDistributionField* thisPtr);
 		static void Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style);
 		static void Internal_create0(MonoObject* managedInstance, __GUIContentInterop* labelContent, MonoString* style);

+ 13 - 1
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector2DistributionField.generated.cpp

@@ -4,9 +4,9 @@
 #include "BsMonoUtil.h"
 #include "../../../EditorCore/GUI/BsGUIFloatDistributionField.h"
 #include "BsScriptTDistribution.generated.h"
+#include "BsScriptHString.generated.h"
 #include "BsScriptGUIContent.generated.h"
 #include "../../../EditorCore/GUI/BsGUIFloatDistributionField.h"
-#include "BsScriptHString.generated.h"
 
 namespace bs
 {
@@ -26,6 +26,7 @@ namespace bs
 	{
 		metaData.scriptClass->addInternalCall("Internal_getValue", (void*)&ScriptGUIVector2DistributionField::Internal_getValue);
 		metaData.scriptClass->addInternalCall("Internal_setValue", (void*)&ScriptGUIVector2DistributionField::Internal_setValue);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptGUIVector2DistributionField::Internal_getType);
 		metaData.scriptClass->addInternalCall("Internal_hasInputFocus", (void*)&ScriptGUIVector2DistributionField::Internal_hasInputFocus);
 		metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptGUIVector2DistributionField::Internal_create);
 		metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptGUIVector2DistributionField::Internal_create0);
@@ -72,6 +73,17 @@ namespace bs
 		static_cast<GUIVector2DistributionField*>(thisPtr->getGUIElement())->setValue(*tmpvalue);
 	}
 
+	PropertyDistributionType ScriptGUIVector2DistributionField::Internal_getType(ScriptGUIVector2DistributionField* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = static_cast<GUIVector2DistributionField*>(thisPtr->getGUIElement())->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
 	bool ScriptGUIVector2DistributionField::Internal_hasInputFocus(ScriptGUIVector2DistributionField* thisPtr)
 	{
 		bool tmp__output;

+ 2 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector2DistributionField.generated.h

@@ -4,6 +4,7 @@
 #include "Wrappers/GUI/BsScriptGUIElement.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Localization/BsHString.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 
 namespace bs
 {
@@ -31,6 +32,7 @@ namespace bs
 
 		static MonoObject* Internal_getValue(ScriptGUIVector2DistributionField* thisPtr);
 		static void Internal_setValue(ScriptGUIVector2DistributionField* thisPtr, MonoObject* value);
+		static PropertyDistributionType Internal_getType(ScriptGUIVector2DistributionField* thisPtr);
 		static bool Internal_hasInputFocus(ScriptGUIVector2DistributionField* thisPtr);
 		static void Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style);
 		static void Internal_create0(MonoObject* managedInstance, __GUIContentInterop* labelContent, MonoString* style);

+ 12 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector3DistributionField.generated.cpp

@@ -26,6 +26,7 @@ namespace bs
 	{
 		metaData.scriptClass->addInternalCall("Internal_getValue", (void*)&ScriptGUIVector3DistributionField::Internal_getValue);
 		metaData.scriptClass->addInternalCall("Internal_setValue", (void*)&ScriptGUIVector3DistributionField::Internal_setValue);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptGUIVector3DistributionField::Internal_getType);
 		metaData.scriptClass->addInternalCall("Internal_hasInputFocus", (void*)&ScriptGUIVector3DistributionField::Internal_hasInputFocus);
 		metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptGUIVector3DistributionField::Internal_create);
 		metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptGUIVector3DistributionField::Internal_create0);
@@ -72,6 +73,17 @@ namespace bs
 		static_cast<GUIVector3DistributionField*>(thisPtr->getGUIElement())->setValue(*tmpvalue);
 	}
 
+	PropertyDistributionType ScriptGUIVector3DistributionField::Internal_getType(ScriptGUIVector3DistributionField* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = static_cast<GUIVector3DistributionField*>(thisPtr->getGUIElement())->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
 	bool ScriptGUIVector3DistributionField::Internal_hasInputFocus(ScriptGUIVector3DistributionField* thisPtr)
 	{
 		bool tmp__output;

+ 2 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIVector3DistributionField.generated.h

@@ -4,6 +4,7 @@
 #include "Wrappers/GUI/BsScriptGUIElement.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 #include "../../../bsf/Source/Foundation/bsfCore/Localization/BsHString.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
 
 namespace bs
 {
@@ -31,6 +32,7 @@ namespace bs
 
 		static MonoObject* Internal_getValue(ScriptGUIVector3DistributionField* thisPtr);
 		static void Internal_setValue(ScriptGUIVector3DistributionField* thisPtr, MonoObject* value);
+		static PropertyDistributionType Internal_getType(ScriptGUIVector3DistributionField* thisPtr);
 		static bool Internal_hasInputFocus(ScriptGUIVector3DistributionField* thisPtr);
 		static void Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style);
 		static void Internal_create0(MonoObject* managedInstance, __GUIContentInterop* labelContent, MonoString* style);

+ 23 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptColorGradient.generated.cpp

@@ -21,6 +21,8 @@ namespace bs
 		metaData.scriptClass->addInternalCall("Internal_ColorGradient1", (void*)&ScriptColorGradient::Internal_ColorGradient1);
 		metaData.scriptClass->addInternalCall("Internal_setKeys", (void*)&ScriptColorGradient::Internal_setKeys);
 		metaData.scriptClass->addInternalCall("Internal_getKeys", (void*)&ScriptColorGradient::Internal_getKeys);
+		metaData.scriptClass->addInternalCall("Internal_getNumKeys", (void*)&ScriptColorGradient::Internal_getNumKeys);
+		metaData.scriptClass->addInternalCall("Internal_getKey", (void*)&ScriptColorGradient::Internal_getKey);
 		metaData.scriptClass->addInternalCall("Internal_setConstant", (void*)&ScriptColorGradient::Internal_setConstant);
 		metaData.scriptClass->addInternalCall("Internal_evaluate", (void*)&ScriptColorGradient::Internal_evaluate);
 
@@ -98,6 +100,27 @@ namespace bs
 		return __output;
 	}
 
+	uint32_t ScriptColorGradient::Internal_getNumKeys(ScriptColorGradient* thisPtr)
+	{
+		uint32_t tmp__output;
+		tmp__output = thisPtr->getInternal()->getNumKeys();
+
+		uint32_t __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	void ScriptColorGradient::Internal_getKey(ScriptColorGradient* thisPtr, uint32_t idx, __ColorGradientKeyInterop* __output)
+	{
+		ColorGradientKey tmp__output;
+		tmp__output = thisPtr->getInternal()->getKey(idx);
+
+		__ColorGradientKeyInterop interop__output;
+		interop__output = ScriptColorGradientKey::toInterop(tmp__output);
+		MonoUtil::valueCopy(__output, &interop__output, ScriptColorGradientKey::getMetaData()->scriptClass->_getInternalClass());
+	}
+
 	void ScriptColorGradient::Internal_setConstant(ScriptColorGradient* thisPtr, Color* color)
 	{
 		thisPtr->getInternal()->setConstant(*color);

+ 2 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptColorGradient.generated.h

@@ -28,6 +28,8 @@ namespace bs
 		static void Internal_ColorGradient1(MonoObject* managedInstance, MonoArray* keys);
 		static void Internal_setKeys(ScriptColorGradient* thisPtr, MonoArray* keys, float duration);
 		static MonoArray* Internal_getKeys(ScriptColorGradient* thisPtr);
+		static uint32_t Internal_getNumKeys(ScriptColorGradient* thisPtr);
+		static void Internal_getKey(ScriptColorGradient* thisPtr, uint32_t idx, __ColorGradientKeyInterop* __output);
 		static void Internal_setConstant(ScriptColorGradient* thisPtr, Color* color);
 		static void Internal_evaluate(ScriptColorGradient* thisPtr, float t, Color* __output);
 	};

+ 1 - 1
Source/bsf

@@ -1 +1 @@
-Subproject commit 018c2c0b9d7c20b1549e19376aaea3e983a6e582
+Subproject commit 6fa00e7b338ceb13c5e2555846a8f1c0f937ba09