Commit 04234f3
Fixed various 3d layer bugs (#1439)
* 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-proofing
* Keyframe Animation QOL inprovements (#1420)
* Fix keyframe getting created at the wrong frame when the uses right clicks at the same 'x-position' as the frame marking
* Hide extra UI when no FX are present
* formatting
* Rename _hide_extra_UI to _hide_extra_ui
Fix linting error
---------
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
* Fix tracks being created twice if a project is loaded on startup
* Some more futureproofing of the keyframe timeline code
* Allow non-integer values in keyframe property sliders
* QOL improvements when adding or selecting keyframes (#1423)
* 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-proofing
* Keyframe Animation QOL inprovements (#1420)
* Fix keyframe getting created at the wrong frame when the uses right clicks at the same 'x-position' as the frame marking
* Hide extra UI when no FX are present
* formatting
* Rename _hide_extra_UI to _hide_extra_ui
Fix linting error
---------
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
* Select newly added keyframe
* only select keyframe if it's added for the first time
* Improve selection of keyframes
* Formatting
* To move single keyframe, you no longer have to select it first
* Formatting
* Snap cursor to frame when drag is released
* formatting
---------
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
* Add a method in Global for creating nodes from variables
Used for keyframe property node generation and for the future 3D layer object properties
* Animate Basis variables as well
* Use a hint_string parameter in create_node_from_variable
* Add more options to V2, V3 and Basis sliders in Global.create_node_from_variable
* Emit KeyframeButton.updated_position only when the position has changed
Otherwise it is being called every time the user clicks on a keyframe button, filling the undo history with unnecessary actions
* Fix steps, min and max values
Needs extra checks to see if the min and max values are floats or ints, and if they are, make them be Vector2/3/Basis
* Make Global.create_node_from_variable() handle Fonts and Textures
* 3D Layer Rewrite (#1429)
* Begin rewrite -- remove nodes from cel and add them to layer
* Select objects
* Improve object picking
* Remove 3D object
* Improve object picking again, make gizmos usable
No undo/redo for property changing yet
* Make lights pickable, besides the directional light
Not entirely sure why RenderingServer.instances_cull_ray() does not pick up DirectionalLight3Ds, considering it picks the other light types and the documentation clearly states that it does pick up DirectionalLight3Ds
* Undo redo for gizmos
* Add a material to every newly added mesh
* Start working on slider generation when selecting an object
* Make sliders functional
* Use an AnimationPlayer to store properties for each frame
Does not currently animate properly because it needs each Cel3D to have a unique viewport texture, which only updates when the current cel is active
* Make Cel3Ds use unique textures
* 3D cel animation fixes
* Fix image_texture regeneration when changing cel size
* Remove tracks when removing a 3D node
* Make undo/redo steps for track & key creation
I don't like that they are separate steps, but this is the only way I could get it to work for now.
* Pick lights from their gizmo positions
* Node property nodes are now better categorized in multiple foldable containers
* Change 3D text
* Change fonts
* Fix undoing adding and deleting not updating the canvas
* Remove depracated code from Cel3D
* Save and load scenes in pxo files
* Refuse to load scenes that contain scripts in them
* Add lights to gizmos when loading from pxo
* Create a 3DObjectTree panel
* Add the new panel to the UI
* Give readable names to 3D nodes
* Load GLTF files as 3D layers
* Remove some sliders
* Another attempt at unifying animation track and key creation with change of property
This time it seems to be working well, fingers crossed.
* Formatting/linting
* Make get_points() work for non-VisualInstance3D nodes as well
* Remove unused script
* Support enums
* More slider improvements
* Support editing multiple materials in ArrayMeshes
* Remove properties from WorldEnvironment
* Fix canvas flickering when switching to a different 3D cel
* Update current 3D cel when undoing/redoing a property on another cel
Needed to update interpolated data
* Remove unneeded RenderingServer.frame_post_draw
At least it should be unneeded, more testing would be nice
* Fix crash when loading a pre-v1.2 pxo with 3D layers
* Use Global.create_node_from_variable() to generate property editing nodes
* Update Global.create_node_from_variable() parameters
* Load & modify textures
* Modify image button now works better when there is no initial image and if that image has been modified while that node is active
* Write code for detecting UV coords based on mouse position
Can later be used for directly drawing on 3D models
* Detect the correct surface in get_3d_node_uvs()
* Start working on pencil support for 3D layers
Undo does not work yet
* Undo/redo support for drawing on primitive meshes
* Undo/redo should now work properly for all cases of drawing on a 3D model
* Raise pxo version
* Show rotation in sliders in degrees
* Fix position sliders having way too broad limits
Not the most elegant solution but works for now.
* Fix crash if a 3D object is selected during exit
* Fix layer tools not updating when added at startup
* Fixed Cut function on a 3d Cel Crashing the application
---------
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>1 parent fe5cac3 commit 04234f3
4 files changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
417 | | - | |
418 | 416 | | |
419 | | - | |
| 417 | + | |
| 418 | + | |
420 | 419 | | |
| 420 | + | |
| 421 | + | |
421 | 422 | | |
422 | 423 | | |
423 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
| |||
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
491 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
492 | 497 | | |
493 | 498 | | |
494 | 499 | | |
| |||
0 commit comments