1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Make _validate_property a multilevel method

This commit is contained in:
Yuri Sizov
2022-08-12 23:57:11 +03:00
parent fdc36ad082
commit 1a24c9e14b
135 changed files with 770 additions and 800 deletions

View File

@@ -94,16 +94,16 @@ void NoiseTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "Noise"), "set_noise", "get_noise");
}
void NoiseTexture::_validate_property(PropertyInfo &property) const {
if (property.name == "bump_strength") {
void NoiseTexture::_validate_property(PropertyInfo &p_property) const {
if (p_property.name == "bump_strength") {
if (!as_normal_map) {
property.usage = PROPERTY_USAGE_NO_EDITOR;
p_property.usage = PROPERTY_USAGE_NO_EDITOR;
}
}
if (property.name == "seamless_blend_skirt") {
if (p_property.name == "seamless_blend_skirt") {
if (!seamless) {
property.usage = PROPERTY_USAGE_NO_EDITOR;
p_property.usage = PROPERTY_USAGE_NO_EDITOR;
}
}
}