Commit Graph

236 Commits

Author SHA1 Message Date
Rémi Verschelde
33c907f9f5
Merge pull request #58929 from reduz/remove-variant-arg-macros
Remove VARIANT_ARG* macros
2022-03-09 20:48:45 +01:00
reduz
21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Haoyu Qiu
25d93200c8 Add missing i18n to various strings 2022-03-07 21:50:49 +08:00
kobewi
2057ea2883 Remove duplicate editor settings definitions 2022-03-06 22:05:49 +01:00
kobewi
7d44bb8f06 Remove set_as_minsize() 2022-03-06 00:57:42 +01:00
jmb462
dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
Rémi Verschelde
760a95e86a
Merge pull request #57877 from bruvzg/subpixel_gl_pos 2022-02-15 13:58:38 +01:00
jmb462
64ca6a0696 Fix AnimationTrack mouse wheel zooming at low zoom level 2022-02-13 00:24:35 +01:00
bruvzg
29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Francois Belair
52649d5402 Fix selecting keys in Track Edit 2022-02-10 17:57:08 -05:00
Francois Belair
13a0d9177d Implement drawing and editing all anim beziers
* Move bezier edit from track to button in toolbar
* Draw, edit all bezier curves simultaneously
* Add click on curve to select tracks
* Tie track editor's filter view to bezier editor
* Implement visibility and locking
* Fix editor spacing issues
* Fix track buttons spacing
* Add keyframe focus and (de)select all key handling
2022-02-09 19:48:22 -05:00
Rémi Verschelde
8161e28512
Merge pull request #55899 from groud/fix_rotation_track_wrong_type
Fixes rotation 3D track inspector not using the correct type
2022-02-09 22:17:07 +01:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Gilles Roudière
73e784de1e Remove get_focus_owner() from Control, replaced by get_viewport()->gui_get_focus_owner() 2022-02-03 11:59:32 +01:00
Anilforextra
fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
kobewi
98692d68c3 Minor tweaks and fixes to panning 2022-01-23 13:49:53 +01:00
Rémi Verschelde
e363f404a5
Merge pull request #57000 from KoBeWi/UNLIMITED_PANNING 2022-01-23 00:47:52 +01:00
kobewi
74bfe88267 Add ViewPanner to 2D editor 2022-01-21 18:35:06 +01:00
Rémi Verschelde
cfb986c631
Merge pull request #51452 from omar-polo/fix-macros 2022-01-20 22:50:39 +01:00
Omar Polo
bd448e5535 Rename or refactor macros to avoid leading underscores
These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
trollodel
aa1102fc53 Store panels and docks singletons in their own classes 2022-01-20 20:13:26 +01:00
Fabio Alessandrelli
7e14548fc6 [Editor] Move some animation specific keying logic out of inspector.
Most of the custom logic to handle special keying cases is now inside
the AnimationPlayerEditorPlugin.

The EditorInspector now emits a signal when inspecting a new object.
2022-01-19 11:08:25 +01:00
kobewi
fbb5580b3d Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde
1032c2c434
Merge pull request #55487 from YeldhamDev/scroll_bikeshedding 2022-01-03 14:10:41 +01:00
Gilles Roudière
c77dd7b96f Fixes rotation 3D track inspector not using the correct type 2021-12-13 12:25:08 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
kobewi
841a9ef820 ScrollContainer's scrollbar visibility is now enum 2021-12-07 18:27:12 +01:00
Rémi Verschelde
75ac048e4b
Merge pull request #55662 from KoBeWi/update_minimum_size_changed_to_update_minimum_size 2021-12-06 18:28:46 +01:00
kobewi
b7d83689e4 Fix error when adding RESET key for new track 2021-12-06 17:36:25 +01:00
Rémi Verschelde
e8082003f1
Merge pull request #52280 from jmb462/fix-bad-popup-offset-with-single-window-off 2021-12-06 16:05:10 +01:00
jmb462
81efebb3a1
Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-12-06 14:29:48 +01:00
kobewi
ea7cc1dea9 Rename minimum_size_changed() method 2021-12-06 14:02:34 +01:00
kobewi
f77a494d22 Allow to add RESET values from existing keys 2021-12-06 13:35:54 +01:00
kobewi
9cb66cac2d Add a constant StringName for RESET animation 2021-12-06 12:26:42 +01:00
Michael Alexsander
ec4f4c6cda Rename all methods that return ScrollBar nodes to get_*_scroll_bar() 2021-11-30 13:46:36 -03:00
Nathan Lovato
a5d0a74b65 Make bezier handle type a property of keyframes, update interface
- Replaced unused code related to old close icon with a button
- Add bezier handle options to right-click menu
- Remove mirror handle mode, only keep balanced
- Update animation reference
2021-11-16 09:26:35 -05:00
Hugo Locurcio
d7cd44418d
Use a different icon for eased keyframes in the animation editor
This makes easing tracks easier to recognize, in a way similar
to curved lines in the Path2D editor.
2021-11-15 13:16:21 +01:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
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