mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Inspector: Fix PROPERTY_HINT_SPRITE_FRAME not behaving as RANGE
This was a regression in 3.1 and later from the new inspector, where PROPERTY_HINT_SPRITE_FRAME was not fully re-implemented. It's meant to be a normal PROPERTY_HINT_RANGE which also automatically increments its value when keyed in the animation player. To avoid code duplication, I made the frames properties use the actual PROPERTY_HINT_RANGE and introduced a PROPERTY_USAGE_KEYING_INCREMENTS usage flag instead.
This commit is contained in:
@@ -504,7 +504,7 @@ bool EditorProperty::use_keying_next() const {
|
||||
PropertyInfo &p = I->get();
|
||||
|
||||
if (p.name == property) {
|
||||
return p.hint == PROPERTY_HINT_SPRITE_FRAME;
|
||||
return (p.usage & PROPERTY_USAGE_KEYING_INCREMENTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user