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:
parent
eb300ba8fe
commit
336846e547
6 changed files with 21 additions and 24 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue