Commit eb4b8c7
committed
Add support for animated layer effects and a keyframe-based timeline (#1417)
* Start working on animatable layer effects
* Interpolate colors & animated effects work on apply
* Add nodes to change tween properties
* Use smaller texts for the tween property option buttons
* Fix crash when enabling animation, disabling and enabling it again
* Remove keyframes
* Load and save animated parameters in pxo files
* Format
* Start working on a keyframe based timeline
* Create keyframes in the UI
* Start working on keyframe value changing
* Remove animated layer effect code from the layer FX settings
* Refactor animated_params dictionary
* Probably fix pxo loading
At least old pxo files seem to be working properly
* Update timeline when adding/removing keyframes
* Use a tree for the layer elements
Need to implement folding logic for the keyframes themselves though
* Add a timeline cursor
* Improve cursor moving logic
* More timeline cursor improvements
* Some UI improvements
* Make timeline a bit prettier
* Fix animated params pxo loading
* Some small improvements
* Fix scrolling
* Don't create keyframe if there already is one
* Fix frame container not resizing when clicking on keyframes
* Added Constant transition
* Add undo/redo when adding and deleting keyframes
* Fix keyframe unselection
* Start working on multiple selected keyframes
* Change name of a script
* Change properties of all selected keyframes
With undo/redo support
* [WIP] Move keyframes
While it technically works, the UI side is not being updated. Also, I just realized that the way we're handling keyframe creation and deletion is wrong, because the nodes get freed when switching to a different layer, or a different project. So we most likely should just re-create the keyframe nodes when we add, delete or move them. Which means I also need to change the selected_keyframes array to store param_name and frame_index, instead of nodes.
* Add IDs to keyframes for easier handling
* Don't allow keyframes to go below frame 0
Mostly so they can't be lost. The proper solution would be to support negative frames, like Godot's animation player editor does, but this should work for now.
* Zoom in the timeline
* Support booleans and colors, scroll timeline when changing cel or layer
* Implement the keyframe timeline inside the main timeline panel
I feel like the UI does need some improvements still
* Make properties grid container and delete keyframe button persistent nodes
* Undo/redo refreshes the keyframe property UI
* Hide tags when keyframe timeline is visible
* Fix property nodes not having the correct name
* Use a custom node to draw frames instead of using labels
* Fix group layers passthrough mode not having its effect be animated
* Don't create tracks for properties that currently cannot be animated
Such as textures
* Better documentation and future-proofing1 parent b243e24 commit eb4b8c7
File tree
22 files changed
+1136
-23
lines changed- assets/graphics/timeline
- src
- Classes
- Layers
- UI/Timeline
- KeyframeTimeline
- LayerEffects
22 files changed
+1136
-23
lines changedLoading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
8 | 31 | | |
9 | 32 | | |
10 | 33 | | |
11 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
12 | 37 | | |
13 | 38 | | |
14 | 39 | | |
| |||
19 | 44 | | |
20 | 45 | | |
21 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
22 | 125 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
27 | 133 | | |
28 | 134 | | |
29 | 135 | | |
| |||
34 | 140 | | |
35 | 141 | | |
36 | 142 | | |
| 143 | + | |
| 144 | + | |
37 | 145 | | |
38 | 146 | | |
39 | 147 | | |
40 | 148 | | |
41 | 149 | | |
42 | 150 | | |
43 | 151 | | |
44 | | - | |
45 | | - | |
| 152 | + | |
| 153 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
| 260 | + | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
261 | | - | |
262 | | - | |
| 264 | + | |
263 | 265 | | |
264 | | - | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
277 | 283 | | |
278 | | - | |
| 284 | + | |
279 | 285 | | |
280 | 286 | | |
281 | 287 | | |
| |||
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
315 | | - | |
| 321 | + | |
| 322 | + | |
316 | 323 | | |
317 | 324 | | |
318 | 325 | | |
| |||
337 | 344 | | |
338 | 345 | | |
339 | 346 | | |
| 347 | + | |
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
| |||
363 | 371 | | |
364 | 372 | | |
365 | 373 | | |
| 374 | + | |
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
1798 | 1799 | | |
1799 | 1800 | | |
1800 | 1801 | | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
0 commit comments