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

@@ -1038,7 +1038,7 @@ void CompressedTexture2D::reload_from_file() {
load(path);
}
void CompressedTexture2D::_validate_property(PropertyInfo &property) const {
void CompressedTexture2D::_validate_property(PropertyInfo &p_property) const {
}
void CompressedTexture2D::_bind_methods() {
@@ -1394,7 +1394,7 @@ void CompressedTexture3D::reload_from_file() {
load(path);
}
void CompressedTexture3D::_validate_property(PropertyInfo &property) const {
void CompressedTexture3D::_validate_property(PropertyInfo &p_property) const {
}
void CompressedTexture3D::_bind_methods() {
@@ -2789,12 +2789,12 @@ bool AnimatedTexture::is_pixel_opaque(int p_x, int p_y) const {
return true;
}
void AnimatedTexture::_validate_property(PropertyInfo &property) const {
String prop = property.name;
void AnimatedTexture::_validate_property(PropertyInfo &p_property) const {
String prop = p_property.name;
if (prop.begins_with("frame_")) {
int frame = prop.get_slicec('/', 0).get_slicec('_', 1).to_int();
if (frame >= frame_count) {
property.usage = PROPERTY_USAGE_NONE;
p_property.usage = PROPERTY_USAGE_NONE;
}
}
}
@@ -3214,7 +3214,7 @@ void CompressedTextureLayered::reload_from_file() {
load(path);
}
void CompressedTextureLayered::_validate_property(PropertyInfo &property) const {
void CompressedTextureLayered::_validate_property(PropertyInfo &p_property) const {
}
void CompressedTextureLayered::_bind_methods() {