From d323b1c7e2f55eab221d7328896c0153bd7357a2 Mon Sep 17 00:00:00 2001 From: Saas Date: Thu, 16 Oct 2025 20:28:34 +0200 Subject: [PATCH 1/2] move skylight and environment probe bake buttons into dedicated groups --- .../CustomEditors/Dedicated/EnvironmentProbeEditor.cs | 8 +++++--- Source/Editor/CustomEditors/Dedicated/SkyLightEditor.cs | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/Editor/CustomEditors/Dedicated/EnvironmentProbeEditor.cs b/Source/Editor/CustomEditors/Dedicated/EnvironmentProbeEditor.cs index 8f2173a4e..7649da514 100644 --- a/Source/Editor/CustomEditors/Dedicated/EnvironmentProbeEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/EnvironmentProbeEditor.cs @@ -1,6 +1,7 @@ // Copyright (c) Wojciech Figat. All rights reserved. using FlaxEngine; +using FlaxEngine.GUI; namespace FlaxEditor.CustomEditors.Dedicated { @@ -11,7 +12,7 @@ namespace FlaxEditor.CustomEditors.Dedicated [CustomEditor(typeof(EnvironmentProbe)), DefaultEditor] public class EnvironmentProbeEditor : ActorEditor { - private FlaxEngine.GUI.Button _bake; + private Button _bake; /// public override void Initialize(LayoutElementsContainer layout) @@ -20,8 +21,9 @@ namespace FlaxEditor.CustomEditors.Dedicated if (Values.HasDifferentTypes == false) { - layout.Space(10); - _bake = layout.Button("Bake").Button; + var group = layout.Group("Bake"); + group.Panel.ItemsMargin = new Margin(Utilities.Constants.UIMargin * 2); + _bake = group.Button("Bake").Button; _bake.Clicked += BakeButtonClicked; } } diff --git a/Source/Editor/CustomEditors/Dedicated/SkyLightEditor.cs b/Source/Editor/CustomEditors/Dedicated/SkyLightEditor.cs index 0a38e0dfe..ee3f2a504 100644 --- a/Source/Editor/CustomEditors/Dedicated/SkyLightEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/SkyLightEditor.cs @@ -1,6 +1,7 @@ // Copyright (c) Wojciech Figat. All rights reserved. using FlaxEngine; +using FlaxEngine.GUI; namespace FlaxEditor.CustomEditors.Dedicated { @@ -19,8 +20,9 @@ namespace FlaxEditor.CustomEditors.Dedicated if (Values.HasDifferentTypes == false) { // Add 'Bake' button - layout.Space(10); - var button = layout.Button("Bake"); + var group = layout.Group("Bake"); + group.Panel.ItemsMargin = new Margin(Utilities.Constants.UIMargin * 2); + var button = group.Button("Bake"); button.Button.Clicked += BakeButtonClicked; } } From a9fc5f720dde33f3cfe09ff5b1ab9335cfa45f03 Mon Sep 17 00:00:00 2001 From: Saas Date: Thu, 16 Oct 2025 20:35:53 +0200 Subject: [PATCH 2/2] break up EnvironmentProbe properties into groups --- Source/Engine/Level/Actors/EnvironmentProbe.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Engine/Level/Actors/EnvironmentProbe.h b/Source/Engine/Level/Actors/EnvironmentProbe.h index 09f771437..4a77a811e 100644 --- a/Source/Engine/Level/Actors/EnvironmentProbe.h +++ b/Source/Engine/Level/Actors/EnvironmentProbe.h @@ -42,38 +42,38 @@ public: /// /// The reflections texture resolution. /// - API_FIELD(Attributes="EditorOrder(0), EditorDisplay(\"Probe\")") + API_FIELD(Attributes="EditorOrder(0), EditorDisplay(\"Quality\")") ProbeCubemapResolution CubemapResolution = ProbeCubemapResolution::UseGraphicsSettings; + /// + /// The probe update mode. + /// + API_FIELD(Attributes = "EditorOrder(10), EditorDisplay(\"Quality\")") + ProbeUpdateMode UpdateMode = ProbeUpdateMode::Manual; + /// /// The reflections brightness. /// - API_FIELD(Attributes="EditorOrder(10), Limit(0, 1000, 0.01f), EditorDisplay(\"Probe\")") + API_FIELD(Attributes="EditorOrder(0), Limit(0, 1000, 0.01f), EditorDisplay(\"Probe\")") float Brightness = 1.0f; /// /// The probe rendering order. The higher values are render later (on top). /// - API_FIELD(Attributes = "EditorOrder(25), EditorDisplay(\"Probe\")") + API_FIELD(Attributes = "EditorOrder(20), EditorDisplay(\"Probe\")") int32 SortOrder = 0; - /// - /// The probe update mode. - /// - API_FIELD(Attributes="EditorOrder(30), EditorDisplay(\"Probe\")") - ProbeUpdateMode UpdateMode = ProbeUpdateMode::Manual; - /// /// The probe capture camera near plane distance. /// - API_FIELD(Attributes="EditorOrder(30), Limit(0, float.MaxValue, 0.01f), EditorDisplay(\"Probe\")") + API_FIELD(Attributes="EditorOrder(25), Limit(0, float.MaxValue, 0.01f), EditorDisplay(\"Probe\")") float CaptureNearPlane = 10.0f; public: /// /// Gets the probe radius. /// - API_PROPERTY(Attributes="EditorOrder(20), DefaultValue(3000.0f), Limit(0), EditorDisplay(\"Probe\")") + API_PROPERTY(Attributes="EditorOrder(15), DefaultValue(3000.0f), Limit(0), EditorDisplay(\"Probe\")") float GetRadius() const; ///