Add 3D editor gizmo icons for Decal, LightmapProbe and FogVolume

- Tweak CPUParticles3D editor gizmo icon to use the same outline
  color as other gizmo icons. Make the internal icon easier to see
  by using an orange color instead of gray.

Co-authored-by: MewPurPur <mew.pur.pur@abv.bg>
This commit is contained in:
Hugo Locurcio 2023-09-11 22:47:33 +02:00
parent 221884e6bc
commit 5345cf3e75
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
7 changed files with 23 additions and 1 deletions

View File

@ -1 +1 @@
<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" fill="#f7f5cf" stroke="#b3b3b3" stroke-width="3"/><path d="M88 82a18 18 0 0 0 2.484-35.814 27 30 0 0 0-52.944 0 18 18 0 0 0 2.484 35.802zm-48 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm48 0a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm-24 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12z" fill="#b3b3b3"/></svg>
<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" stroke="#000" stroke-width="8" stroke-opacity=".3"/><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" fill="#f7f5cf"/><path d="M88 82a18 18 0 0 0 2.484-35.814 27 30 0 0 0-52.944 0 18 18 0 0 0 2.484 35.802zm-48 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm48 0a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm-24 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12z" fill="#e1b44c"/></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1 @@
<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><circle cx="64" cy="64" fill="none" stroke="#000" stroke-width="8" stroke-opacity=".3" r="48"/><path d="M111.313 55.934a48 48 0 1 0-71.28 49.528z" fill="#f7f5cf"/><path d="M111.313 55.934a48 48 0 0 0-71.28 49.528z" fill="#e1b44c"/><path d="M40.033 105.462a48 48 0 0 0 71.28-49.528z" fill="#f7f5cf" fill-opacity=".4"/></svg>

After

Width:  |  Height:  |  Size: 411 B

View File

@ -0,0 +1 @@
<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M20 68S8 68 8 56s16-12 16-12 0-32 28-32 28 24 28 24 10.08-16 24-8 4 24 4 24 12 0 12 8-8 8-8 8zm16 8a4 4 0 0 0 0 8h64a4 4 0 0 0 0-8zm-8 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8zm56 0a4 4 0 0 0 0 8h20a4 4 0 0 0 0-8zm-40 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8z" stroke="#000" stroke-width="8" stroke-opacity=".3"/><path d="M20 68S8 68 8 56s16-12 16-12 0-32 28-32 28 24 28 24 10.08-16 24-8 4 24 4 24 12 0 12 8-8 8-8 8zm16 8a4 4 0 0 0 0 8h64a4 4 0 0 0 0-8zm-8 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8zm56 0a4 4 0 0 0 0 8h20a4 4 0 0 0 0-8zm-40 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8z" fill="#f7f5cf"/></svg>

After

Width:  |  Height:  |  Size: 674 B

View File

@ -0,0 +1 @@
<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M8 72h24V56H8zm16.4 20.28 11.32 11.312L47.032 92.28 35.72 80.968zm0-56.56 11.32 11.312L47.032 35.72 35.72 24.4zM40 64a24 24 0 0 0 48 0 24 24 0 0 0-48 0zm24 56A56 56 0 0 0 64 8v18.672a37.328 37.328 0 0 1 0 74.656z" stroke="#000" stroke-width="8" stroke-opacity=".3"/><path d="M8 72h24V56H8zm16.4 20.28 11.32 11.312L47.032 92.28 35.72 80.968zm0-56.56 11.32 11.312L47.032 35.72 35.72 24.4zM40 64a24 24 0 0 0 48 0 24 24 0 0 0-48 0zm24 56A56 56 0 0 0 64 8v18.672a37.328 37.328 0 0 1 0 74.656z" fill="#f7f5cf"/></svg>

After

Width:  |  Height:  |  Size: 608 B

View File

@ -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/node_3d_editor_plugin.h"
#include "scene/3d/decal.h"
@ -38,6 +40,8 @@
DecalGizmoPlugin::DecalGizmoPlugin() {
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");
@ -162,7 +166,9 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
Ref<Material> material = get_material("decal_material", p_gizmo);
const Ref<Material> 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"));
}

View File

@ -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<Material> icon = get_material("fog_volume_icon", p_gizmo);
p_gizmo->add_unscaled_billboard(icon, 0.05);
p_gizmo->add_handles(handles, handles_material);
}
}

View File

@ -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<Material> icon = get_material("lightmap_probe_icon", p_gizmo);
p_gizmo->add_lines(lines, material_lines);
p_gizmo->add_unscaled_billboard(icon, 0.05);
}