Commit graph

396 commits

Author SHA1 Message Date
Haoyu Qiu
859922a5f0 Delete the node in AnimationTreePlayer.remove_node 2021-08-03 00:12:04 +08:00
Hugo Locurcio
10ef55ce23
Use bullet points in the editor instead of dashes where relevant 2021-07-28 19:47:11 +02:00
bowling-allie
86e5893755
Fixes BlendSpace2D BLEND_MODE_DISCRETE_CARRY.
When BlendSpace2D switches animations, it will now correctly
calculate the previous animation position and length and
apply is to the new animation.

(cherry picked from commit bcb1e2b79f)
2021-07-13 10:47:20 +02:00
Marcel Admiraal
5a58516231 Remove duplicate ERR_PRINTS macro 2021-06-16 11:56:25 +01:00
Rémi Verschelde
ed28ce53bf
Merge pull request #47142 from jmb462/fix-tween-is_active-always-true-after-stop-and-start
[3.x] Fix Tween.is_active() always true after stop() and then start() (Fix #39760 & #39801)
2021-06-03 11:16:08 +02:00
TwistedTwigleg
ec7b72e81d SkeletonIK: Fixed issue where bones become detached if multiple SkeletonIK nodes are used 2021-05-24 11:30:16 -04:00
Tokage
0454848f4d
fix unintentional object rotation by animation tree
(cherry picked from commit ddac0e95dc)
2021-05-09 17:48:45 +02:00
Pedro J. Estébanez
4da9a501f6 Add animation reset track feature
As a bonus, to have consistency between use Beziers and create insert tracks, use Beziers also gets a default via editor settings that is used when the confirmation dialog is disabled, instead of just falling back to creating non-Bezier tracks.
2021-05-09 09:40:16 +02:00
TwistedTwigleg
c1bc87ed0d Fixes the SkeletonIK twisting issue by using the skeleton global pose without overrides 2021-05-06 20:11:21 -04:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Rémi Verschelde
e94161dada
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
2021-04-29 16:57:00 +02:00
TwistedTwigleg
51be345a17
Changed SkeletonIK3D to clear bone overrides when stopping
(cherry picked from commit 9ebdf812df)
2021-04-17 10:51:22 +02:00
TwistedTwigleg
9c33f091cd Godot 3.x backport: Fix for SkeletonIK not working correctly with 0 interpolation and incorrectly rotating with animation. Now the root bone rotates differently to ensure it always rotates correctly and works with BoneAttachment nodes. 2021-04-08 18:45:54 -04:00
TwistedTwigleg
f50c8062dd
Fix for regression in SkeletonIK code
(cherry picked from commit c15e23396d)
2021-03-19 10:53:58 +01:00
jmb462
c695ef29b8 3.2 - Fix Tween.is_active() always true after stop() and then start()
Fix #39760 & #39801

These issues were resolved in master branch (and closed) but are still active in the 3.2 branch.
2021-03-18 22:01:59 +01:00
Kongfa Waroros
e8d0089901
Check AnimationNode to update properties
(cherry picked from commit 981ca8045f)
2021-03-17 15:17:02 +01:00
TwistedTwigleg
71c6c85565 Changes to SkeletonIK:
* Removed the pointers to PhysicalBone in the code, as they were unused.
* Forward ported the SkeletonIK bone scaling fix I made from Godot 3.2 to Godot 4.0.
* Fixed issue where the root bone in the IK chain would not rotate correctly.
  * The issue turned out to be the update_chain function being called in solve. This would override the root bone transform incorrectly and that would cause it not to rotate after just a single solve. Removing the update_chain function fixes the issue and based on my testing there are no adverse effects.
  * While the old fix on this PR (prior to a force push) required a hack fix, this new fix does not!
* Removed the update_chain function. This change doesn't appear to have any adverse effects in any of the projects I tested (including with animations, Skeleton3D or otherwise, from AnimationPlayer nodes!)
* Fixed issue where the scale of the Skeleton node would change the position of the target, causing it not to work with skeletons that have a global scale of anything but 1.

(cherry picked from commit a622649876)
2021-03-12 11:29:03 +01:00
Christoffer Sundbom
3b63467783 Tween: Add null check for target object
Fixes #45399.

(cherry picked from commit 5b2100d85c)
2021-02-25 15:14:31 +01:00
nc
bc86f3e27e improve error message when travel() is called on an AnimationNodeStateMachine when the state machine is not playing
(cherry picked from commit 0c968d603a)
2021-02-22 10:15:00 +01:00
Angad Kambli
1ca1b78a09 add checks for node type range in add_node function 2021-02-17 14:22:50 +05:30
muiroc
11fc3b8758 Use the blend parameter passed to blend_animation during graph processing
(cherry picked from commit 01bd1b33c7)
2021-02-05 09:26:50 +01:00
Rémi Verschelde
49646383f1
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 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Eoin O'Neill
650f7c6f35
StateMachinePlayback: Added missing bindings to get_current_play_pos and get_current_length.
This allows the user to query the AnimationNodeStateMachinePlayback's current
play position and total length of current animation state. These methods are currently
used in the editor plugin, but can also be useful for querying general playback state
information.

Added documentation for AnimationNodeStateMachinePlayback's `get_current_play_position`

(cherry picked from commit 674fb52f52)
2021-01-05 20:48:57 +01:00
Marcel Admiraal
79952c5435 Remove ChainTip copy constructor 2020-12-07 12:32:49 +00:00
Pedro J. Estébanez
a45bf288e8
Fix premature end of animation playing backwards
(cherry picked from commit 826af5b28a)
2020-11-11 15:12:01 +01:00
Duroxxigar
11a07d071a
Added a more helpful error message when there is no current animation for the animation player
(cherry picked from commit 8bfeb9d6ae)
2020-10-19 16:09:58 +02:00
Rémi Verschelde
2d42625184
Revert "bug with Tween.is_active, fixes #39760"
This reverts commit 8ef40b9306.
2020-08-25 12:58:40 +02:00
ConorLPBoyle
ba3f0fa971 Fixed reload_goal not being called when SkeletonIK3D::start is invoked with p_one_time = true
(cherry picked from commit fa4d9c9446)
2020-07-28 11:28:34 +02:00
Chistpohe LY
8ef40b9306 bug with Tween.is_active, fixes #39760
(cherry picked from commit d60617de10)
2020-07-24 10:31:56 +02:00
Rémi Verschelde
3a916152d8
Merge pull request #39803 from TwistedTwigleg/3.2.skeleton_ik_scale_fix
[3.2] Fixed SkeletonIK not working with scaled skeletons
2020-07-06 16:16:57 +02:00
Pedro J. Estébanez
a235bab96c Ignore blend times for inexistent animations
(cherry picked from commit fdf1977e8f)
2020-07-03 15:34:30 +02:00
Thakee Nathees
3a08658881 animation autocomplete bug fixed
(cherry picked from commit b07e788ad9)
2020-07-03 13:17:57 +02:00
TwistedTwigleg
3dc466b244 Fixed issue where the SkeletonIK node would incorrectly scale bones in the IK chain 2020-07-01 11:16:25 -04:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Tomasz Chabora
e94aab7936 Restore capture caches when missing
(cherry picked from commit 642d91381a)
2020-06-10 15:30:51 +02:00
Thakee Nathees
a5a28239a6 Fix: Tween always return true for _get(), _set()
(cherry picked from commit 2811268231)
2020-05-06 23:29:45 +02:00
Rémi Verschelde
f629df647d Revert "Emit signal when animation ends by seek"
This reverts commit bf1cc116e1.

This needs more discussion to avoid breaking some users' expectations.
See #38086 for arguments.

(cherry picked from commit 69f36cea8c)
2020-05-04 16:10:32 +02:00
Sam
68b968ff6c Resets global pose of IK chain bones being solved, rather than the whole skeleton. Resolves #38026
(cherry picked from commit e321d38c0e)
2020-05-01 10:56:58 +02:00
volzhs
f670f6e351 Emit signal when animation ends by seek
(cherry picked from commit bf1cc116e1)
2020-04-23 11:11:13 +02:00
Andrea Catania
a51e78528f Fixed IK rotation issue
(cherry picked from commit 277696d6c5)
2020-04-16 11:42:07 +02:00
Andrea Catania
e30a0a30b6 Added new method to replace an already added node to the animation state machine
(cherry picked from commit 422926cfc6)
2020-03-25 11:38:54 +01:00
janglee
ffea9fc39f Added tween support for Rect2
Fixes #34575

(cherry picked from commit 4bbe87abb7)
2020-03-04 12:40:14 +01:00
muiroc
1b5996c95d pass missing args in AnimationNode script calls
(cherry picked from commit ed3a8cc83d)
2020-02-14 15:59:56 +01:00
Eric Rybicki
63daa19538 Use a new approach to fix bone pose override not being reset when IK animation is stopped.
This reverts PR #35460 & commit 551c37167b.

(cherry picked from commit bb0358dd8d)
2020-02-14 15:55:47 +01:00
Rémi Verschelde
efea348fe8
Merge pull request #35460 from ericrybick/35409-skeleton-does-not-return-to-original-pose-when-ik-playback-is-stopped
Fix bone pose override not being reset when IK animation is stopped
2020-01-23 14:38:04 +01:00