Commit graph

193 commits

Author SHA1 Message Date
Silc 'Tokage' Renew 953a7bce7e reimplement ping-pong 2021-11-03 13:39:33 +09:00
Rémi Verschelde 24fdedfe94
Merge pull request #54050 from reduz/animation-compression 2021-10-25 14:27:58 +02:00
Wilson E. Alvarez fc30f6350a
Fix max argument count on AnimationTrackEdit spinbox 2021-10-24 10:05:01 -04:00
Silc 'Tokage' Renew 653e2a550c Fixed animation insertion in SkeletonEditor 2021-10-23 16:50:00 +09:00
reduz a69541da4c Implement Animation Compression
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different).

* Implement bitwidth based animation compression (see animation.h for format).
* Can compress imported animations up to 10 times.
* Compression format opens the door to streaming.
* Works transparently (happens all inside animation.h)
2021-10-21 18:27:34 -03:00
reduz ae1c016547 Implement Animation Blend Shape Tracks
* New track type BLEND_SHAPE
* Blend shapes are imported via this new track type
* Processing is more optimized (no longer relies on variants)
* Modified the Blend Shape API in MeshInstance3D to use indices rather than StringNames (more optimizes)
* Promo: Fixed a small bug in gizmo updating in Node3D that affected performance

Dedicated BlendShape tracks are required for both optimization and eventually implementing them in animation compression.
2021-10-16 08:36:05 -03:00
reduz ec19ed3723 Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.

This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:

* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.

*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 20:08:42 -03:00
Juan Linietsky 610de0974d
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation" 2021-10-11 19:27:50 -03:00
Tokage 372ba76663 implement ping-pong loop in animation
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-09 18:08:43 +09:00
Silc 'Tokage' Renew 7a447026c2 fixed insert track queue in AnimationTrackEditor doesn't work correctly 2021-10-07 07:30:36 +09:00
Silc Renew f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
Lightning_A c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Lightning_A e4dfa69bcf Fix non-const iterators in const methods 2021-09-30 15:07:30 -06:00
reduz 5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
Hugo Locurcio 4a4d977bea
Improve the animation bezier editor
- Allow snapping bezier handles to the timeline.
- Allow precise snapping when holding Shift for keyframes and handles.
  - Previously, it was only allowed for seeking the timeline.
  - This change also impacts the animation track editor,
    not just the bezier editor.
- Invert the Ctrl + mouse wheel behavior to match the zoom direction
  in the animation track editor.
- Increase the line spacing between the "Time:" and "Value:" texts
  to improve readability.
- Tweak box selection styling to match the animation track editor.
- Adjust line widths for hiDPI displays.
2021-08-14 22:04:45 +02:00
Aaron Franke fa3a32a2d6
Use Key enum instead of plain integers 2021-08-10 16:26:55 -05:00
Rémi Verschelde e010e05b3d
Merge pull request #51217 from timothyqiu/more-i18n
Fix various i18n failures
2021-08-08 19:25:00 +02:00
Rémi Verschelde de2c2be19b
Shortcut: Rename shortcut property to event
Having a property which has the same name as its class leads to confusing
situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut`
which has a `shortcut` property of type `InputEvent`).

Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event`
to better reflect what the methods check.
2021-08-05 13:48:43 +02:00
Haoyu Qiu 04ad838e2c Fix various i18n failures 2021-08-03 23:53:36 +08:00
Rémi Verschelde ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke 4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
reduz 6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Rémi Verschelde aab6dc301c
Merge pull request #50086 from Geometror/label-improve-layout-options
Improvements to Label's layout options
2021-07-13 13:10:42 +02:00
Haoyu Qiu 4383f8a790 Merge similar editor strings 2021-07-13 13:44:52 +08:00
Hendrik Brucker 56a8d3f30c Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
2021-07-04 16:43:55 +02:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
kleonc 1d890e16f7 AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks 2021-06-17 23:28:04 +02:00
Gregory Basile 8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
Rémi Verschelde e312df0972
Fix build after merge of #48598 2021-06-15 18:37:12 +02:00
Rémi Verschelde 5bd0692d0c
Merge pull request #48598 from Calinou/animation-track-editor-improve-scrolling
Improve scrolling actions in the animation track editor
2021-06-15 18:27:06 +02:00
Marcel Admiraal 8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
Aaron Franke 125d1a7cd3
Rename Animation TYPE_TRANSFORM to TYPE_TRANSFORM3D 2021-06-03 21:11:54 -04:00
Aaron Franke 08a85352fb
Rename Variant TRANSFORM to TRANSFORM3D
Also _transform to _transform3d
2021-06-03 07:30:01 -04:00
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Rémi Verschelde 809948f977
Merge pull request #40397 from KoBeWi/silent_seeker
Allow to move timeline without moving animation
2021-05-23 17:28:21 +02:00
trollodel bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
Hugo Locurcio 81f380f9b8
Improve scrolling actions in the animation track editor
- Implement timeline scrobbling using Alt + Mouse wheel anywhere in the
  animation track editor.
  - Snap settings are followed, and precise snapping can be obtained by also
    holding down Shift.
  - This modifier wasn't used by anything in the animation editor.
- Allow zooming by using Ctrl + Mouse wheel on the timeline itself.
  - Previously, this was only possible on the track area, not the timeline.
2021-05-10 01:15:09 +02:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Tokage d459766edd fix AnimationTrackEditor's undo with correction invalid method name 2021-05-05 14:00:56 +09:00
Marcel Admiraal 86822b187e Rename LineEdit caret_* properties getters and setters to match property 2021-04-17 12:41:23 +01:00
Rafał Mikrut 504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Tomasz Chabora f45e4c57f1 Allow to move timeline without moving animation 2021-03-21 00:24:16 +01:00
Dominik 'dreamsComeTrue' Jasiński 08a45ebfba Make Animation's SceneTreeDialog filter nodes properly 2021-03-19 22:30:32 +01:00
nemerle 7bbacb5ff6 fix incorrectly connected optimize_dialog signal 2021-03-08 11:14:45 +01:00
reduz 1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rémi Verschelde c0846b62b0
Merge pull request #44865 from RandomShaper/fix_reset_anim_crash
Fix crash related to reset animation
2021-01-01 22:50:25 +01:00
Pedro J. Estébanez 69cec347e1 Fix crash related to reset animation 2021-01-01 22:24:26 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00