1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Show visual-oriented 3D node gizmos only when selected

Affected nodes:

- DirectionalLight3D, OmniLight3D, SpotLight3D
- ReflectionProbe
- LightmapGI
- VoxelGI
- GPUParticles3D (but not collision/attractor nodes)
- AudioStreamPlayer3D

This reduces visual clutter in the editor with 3D scenes.
This commit is contained in:
Hugo Locurcio
2023-09-15 01:41:28 +02:00
parent b467afe65d
commit 1024ba0c0d
6 changed files with 367 additions and 352 deletions

View File

@@ -68,17 +68,17 @@ void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
LightmapGI *baker = Object::cast_to<LightmapGI>(p_gizmo->get_node_3d());
Ref<LightmapGIData> data = baker->get_light_data();
p_gizmo->clear();
p_gizmo->add_unscaled_billboard(icon, 0.05);
if (data.is_null()) {
if (data.is_null() || !p_gizmo->is_selected()) {
return;
}
Ref<Material> material_lines = get_material("lightmap_lines", p_gizmo);
Ref<Material> material_probes = get_material("lightmap_probe_material", p_gizmo);
p_gizmo->clear();
Vector<Vector3> lines;
HashSet<Vector2i> lines_found;