mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Hide extra options from various nodes if they're not enabled
This commit is contained in:
@@ -109,6 +109,7 @@ Color Decal::get_modulate() const {
|
||||
void Decal::set_enable_distance_fade(bool p_enable) {
|
||||
distance_fade_enabled = p_enable;
|
||||
RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length);
|
||||
notify_property_list_changed();
|
||||
}
|
||||
|
||||
bool Decal::is_distance_fade_enabled() const {
|
||||
@@ -153,6 +154,14 @@ Vector<Face3> Decal::get_faces(uint32_t p_usage_flags) const {
|
||||
return Vector<Face3>();
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void Decal::_validate_property(PropertyInfo &property) const {
|
||||
if (!distance_fade_enabled && (property.name == "distance_fade_begin" || property.name == "distance_fade_length")) {
|
||||
property.usage = PROPERTY_USAGE_NOEDITOR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Decal::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_extents", "extents"), &Decal::set_extents);
|
||||
ClassDB::bind_method(D_METHOD("get_extents"), &Decal::get_extents);
|
||||
|
||||
Reference in New Issue
Block a user