diff options
author | Clay John <claynjohn@gmail.com> | 2022-08-18 14:31:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 14:31:19 -0600 |
commit | 0a313b4b8350f697b67c0d91c9f689942f0b5bb7 (patch) | |
tree | 1540844574776fb17228644c74493a1a673ac7fe /scene/3d/label_3d.cpp | |
parent | d60db2dba884ba0dc97755bd01ea40f2a18e547b (diff) | |
parent | 0f95db678627bdf1dc4b3a74c4cc7e0387b1df2a (diff) |
Merge pull request #64449 from Calinou/label3d-hide-ineffective-properties
Hide properties that have no effect in Label3D inspector
Diffstat (limited to 'scene/3d/label_3d.cpp')
-rw-r--r-- | scene/3d/label_3d.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp index 712a37e745..ed2bce253a 100644 --- a/scene/3d/label_3d.cpp +++ b/scene/3d/label_3d.cpp @@ -163,7 +163,17 @@ void Label3D::_bind_methods() { } void Label3D::_validate_property(PropertyInfo &property) const { - if (property.name == "material_override" || property.name == "material_overlay") { + if ( + property.name == "material_override" || + property.name == "material_overlay" || + property.name == "lod_bias" || + property.name == "gi_mode" || + property.name == "gi_lightmap_scale") { + property.usage = PROPERTY_USAGE_NO_EDITOR; + } + + if (property.name == "cast_shadow" && alpha_cut == ALPHA_CUT_DISABLED) { + // Alpha-blended materials can't cast shadows. property.usage = PROPERTY_USAGE_NO_EDITOR; } } @@ -889,6 +899,7 @@ void Label3D::set_alpha_cut_mode(AlphaCutMode p_mode) { if (alpha_cut != p_mode) { alpha_cut = p_mode; _queue_update(); + notify_property_list_changed(); } } @@ -927,7 +938,12 @@ Label3D::Label3D() { mesh = RenderingServer::get_singleton()->mesh_create(); + // Disable shadow casting by default to improve performance and avoid unintended visual artifacts. set_cast_shadows_setting(SHADOW_CASTING_SETTING_OFF); + + // Label3D can't contribute to GI in any way, so disable it to improve performance. + set_gi_mode(GI_MODE_DISABLED); + set_base(mesh); } |