diff --git a/editor/icons/GizmoCPUParticles3D.svg b/editor/icons/GizmoCPUParticles3D.svg index 3dae7ade80f..b67aa0eaed9 100644 --- a/editor/icons/GizmoCPUParticles3D.svg +++ b/editor/icons/GizmoCPUParticles3D.svg @@ -1 +1 @@ - + diff --git a/editor/icons/GizmoDecal.svg b/editor/icons/GizmoDecal.svg new file mode 100644 index 00000000000..bd3b3f608fd --- /dev/null +++ b/editor/icons/GizmoDecal.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/GizmoFogVolume.svg b/editor/icons/GizmoFogVolume.svg new file mode 100644 index 00000000000..6a3423b1a2a --- /dev/null +++ b/editor/icons/GizmoFogVolume.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/GizmoLightmapProbe.svg b/editor/icons/GizmoLightmapProbe.svg new file mode 100644 index 00000000000..7259a7c184f --- /dev/null +++ b/editor/icons/GizmoLightmapProbe.svg @@ -0,0 +1 @@ + diff --git a/editor/plugins/gizmos/decal_gizmo_plugin.cpp b/editor/plugins/gizmos/decal_gizmo_plugin.cpp index 68206a7ee54..7572e1dcd52 100644 --- a/editor/plugins/gizmos/decal_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/decal_gizmo_plugin.cpp @@ -30,7 +30,9 @@ #include "decal_gizmo_plugin.h" +#include "editor/editor_node.h" #include "editor/editor_settings.h" +#include "editor/editor_string_names.h" #include "editor/editor_undo_redo_manager.h" #include "editor/plugins/gizmos/gizmo_3d_helper.h" #include "editor/plugins/node_3d_editor_plugin.h" @@ -40,6 +42,8 @@ DecalGizmoPlugin::DecalGizmoPlugin() { helper.instantiate(); Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/decal", Color(0.6, 0.5, 1.0)); + create_icon_material("decal_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoDecal"), EditorStringName(EditorIcons))); + create_material("decal_material", gizmo_color); create_handle_material("handles"); @@ -124,7 +128,9 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { Vector handles = helper->box_get_handles(decal->get_size()); Ref material = get_material("decal_material", p_gizmo); + const Ref icon = get_material("decal_icon", p_gizmo); p_gizmo->add_lines(lines, material); + p_gizmo->add_unscaled_billboard(icon, 0.05); p_gizmo->add_handles(handles, get_material("handles")); } diff --git a/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp b/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp index 8f7cbee4055..931a738aa29 100644 --- a/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp @@ -30,7 +30,9 @@ #include "fog_volume_gizmo_plugin.h" +#include "editor/editor_node.h" #include "editor/editor_settings.h" +#include "editor/editor_string_names.h" #include "editor/editor_undo_redo_manager.h" #include "editor/plugins/node_3d_editor_plugin.h" #include "scene/3d/fog_volume.h" @@ -41,6 +43,8 @@ FogVolumeGizmoPlugin::FogVolumeGizmoPlugin() { gizmo_color.a = 0.15; create_material("shape_material_internal", gizmo_color); + create_icon_material("fog_volume_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoFogVolume"), EditorStringName(EditorIcons))); + create_handle_material("handles"); } @@ -143,6 +147,8 @@ void FogVolumeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_lines(lines, material); p_gizmo->add_collision_segments(lines); + const Ref icon = get_material("fog_volume_icon", p_gizmo); + p_gizmo->add_unscaled_billboard(icon, 0.05); p_gizmo->add_handles(handles, handles_material); } } diff --git a/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp b/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp index 093beac6a25..420829515f8 100644 --- a/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp @@ -30,11 +30,15 @@ #include "lightmap_probe_gizmo_plugin.h" +#include "editor/editor_node.h" #include "editor/editor_settings.h" +#include "editor/editor_string_names.h" #include "editor/plugins/node_3d_editor_plugin.h" #include "scene/3d/lightmap_probe.h" LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() { + create_icon_material("lightmap_probe_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoLightmapProbe"), EditorStringName(EditorIcons))); + Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/lightprobe_lines", Color(0.5, 0.6, 1)); gizmo_color.a = 0.3; @@ -111,5 +115,8 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } } + const Ref icon = get_material("lightmap_probe_icon", p_gizmo); + p_gizmo->add_lines(lines, material_lines); + p_gizmo->add_unscaled_billboard(icon, 0.05); }