mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Make _validate_property a multilevel method
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user