EsotericSoftware / spine-editor

Issue tracking for the Spine editor.
http://esotericsoftware.com/
29 stars 2 forks source link

Add a setting to set the default curve(interpolation) in the setting window #613

Closed misaki-eymard closed 2 years ago

misaki-eymard commented 2 years ago

Add a setting that allows you to choose the default curve from Linear, Stepped, and Bezier. Currently, Spine Editor 4.0 and newer versions don't allow setting the default curve. (3.8 and older versions allow you to set it at the Preset panel in the Graph view.) There are two requests for this feature on the forum: http://esotericsoftware.com/forum/viewtopic.php?f=11&t=16674 http://esotericsoftware.com/forum/Some-minor-feature-QoL-requests-15565?p=68357

NathanSweet commented 2 years ago

When you set a key between two existing keys, the curve type of the earlier of the existing keys determines the curve type of the new key. When the curve type is Bezier, Spine does "curve splitting", where the new key is Bezier and the handles adjusted so the Bezier curve between the existing keys doesn't change.

When you set a key after the last existing key, the last key's curve type is set to the curve type before it.

When you set a key before the first existing key, the new key's curve type is set to the curve type after it.

The only time a "default curve type" setting would be used is when setting the second key on a timeline.

kccha commented 2 years ago

Hi @NathanSweet, just want to clarify that this is not only for the second key on the timeline, but for the second key for each new track/row on the timeline. The behavior you mentioned occurs for each individual row of the timeline. For my purposes, most of my anims are stepped and so I need to readjust the graph manually whenever I am working on a row that did not have any keys. Hope that helps to clarify at least my use case. Let me know if you need more info. Thank you!

NathanSweet commented 2 years ago

@kccha Thanks, yep by "timeline" I meant each row in the graph or dopesheet. Each "row" is called a timeline in the runtime API, but I understand the confusion with the global timeline in the UI that indicates the current frame.

"track" isn't the right term, as that's used for layering animations on top of each other. We could say "each keyed property", but that's not quite perfect, since some timelines can key multiple properties. Eg the translate timeline keys both the X and Y properties. Despite that, in the Spine User Guide we use "property row" and we treat each row as a keyed property. This is a little weak, but can make sense if you think of translate as a property that happens to key two other properties.

NathanSweet commented 2 years ago

4.1.13-beta