summaryrefslogtreecommitdiff
path: root/scene/2d/sprite_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/sprite_2d.cpp')
-rw-r--r--scene/2d/sprite_2d.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp
index dde9790b44..31040020dd 100644
--- a/scene/2d/sprite_2d.cpp
+++ b/scene/2d/sprite_2d.cpp
@@ -206,6 +206,7 @@ void Sprite2D::set_region(bool p_region) {
region = p_region;
update();
+ notify_property_list_changed();
}
bool Sprite2D::is_region() const {
@@ -383,6 +384,10 @@ void Sprite2D::_validate_property(PropertyInfo &property) const {
if (property.name == "frame_coords") {
property.usage |= PROPERTY_USAGE_KEYING_INCREMENTS;
}
+
+ if (!region && (property.name == "region_rect" || property.name == "region_filter_clip")) {
+ property.usage = PROPERTY_USAGE_NOEDITOR;
+ }
}
void Sprite2D::_texture_changed() {