Merge pull request #64339 from YuriSizov/core-multilevel-validate-property

This commit is contained in:
Rémi Verschelde
2022-08-22 21:39:48 +02:00
committed by GitHub
135 changed files with 770 additions and 800 deletions
+6 -6
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() {