Hide the contact shadow property as it often looks broken

The property can still be adjusted by setting its value in a script,
but it's no longer exposed in the editor. There are significant bugs
that prevent its widespread use anyway.
This commit is contained in:
Hugo Locurcio 2020-01-19 14:28:39 +01:00
parent 4febf69f2a
commit b6d4106aaf
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -240,7 +240,8 @@ void Light::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow", "has_shadow");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_shadow_color", "get_shadow_color");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_bias", PROPERTY_HINT_RANGE, "-10,10,0.001"), "set_param", "get_param", PARAM_SHADOW_BIAS);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_contact", PROPERTY_HINT_RANGE, "0,10,0.001"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
// Hide from the editor as contact shadows often look broken (GH-23838, GH-25619, GH-31084).
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_contact", PROPERTY_HINT_RANGE, "0,10,0.001", PROPERTY_USAGE_NOEDITOR), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_reverse_cull_face"), "set_shadow_reverse_cull_face", "get_shadow_reverse_cull_face");
ADD_GROUP("Editor", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");