Commit graph

203 commits

Author SHA1 Message Date
Răzvan C. Rădulescu
07874292d0 Check "done" state in original loop
My first attepmt I added a second loop to check if processing should
stop. This attempts to optimize by using the original loop (one loop).

Also resets `elapsed` time on finish of tween which fixes `tell()`.
2018-06-27 10:17:00 +02:00
Răzvan C. Rădulescu
5c914e2d5b Fix and make Tween node less confusing
I've made the following changes:
- make `is_active` the main way of keeping track of tween
  processing/activity, meaning that `is_active` will now return
  `false` if all tween actions have finished or if it isn't started
  or if it was stopped via `set_active(false)` or any other mode
- removed is_stopped because is redundand now

The above meant that we don't have to keep track of yet another variable
`available` since everything is based on `*processing_internal` so I
removed it, likewise it's own local `processing` variable was removed,
as well as the "double" `_set_process` which it feels more like a hack.

What wasn't changed:
- `tell()` still returns max value (i.e. `== get_runtime()` when all
  tweens `finish`)

*More testing is needed*. So far I've tested repeat on/off, delay,
`is_active()` working corretly, `set_active(true), set_active(false)`,
but probably more tests are necessary, all the resets, stops, resume
etc.
2018-06-26 18:16:57 +02:00
Thomas Herzog
0f45d0aa7d ensure BlendSpace1D syncs animations 2018-06-26 02:41:36 +02:00
Juan Linietsky
8c7da84e1e renamed AnimationGraphPlayer to AnimationTree 2018-06-25 18:40:24 -03:00
Juan Linietsky
87f48e7a3e
Merge pull request #19720 from karroffel/blendspace-1d
add BlendSpace1D animation node
2018-06-25 16:50:33 -03:00
Juan Linietsky
5b035107e3 removed print 2018-06-25 16:47:09 -03:00
Thomas Herzog
0f7c35f955 added BlendSpace1D editor plugin
This commit also fixes a crash in the BlendSpace2D as well as correct
the drawing of the x-zero indicator in the BlendSpace2D editor plugin.
2018-06-25 21:46:12 +02:00
Thomas Herzog
84252f2ec4 added AnimationBlendSpace1D 2018-06-25 21:36:53 +02:00
Thomas Herzog
1ff7aa4c9b rename BlendSpace to BlendSpace2D 2018-06-25 21:36:10 +02:00
Juan Linietsky
4f5a7ebaec State machine animation node 2018-06-25 16:22:41 -03:00
Juan Linietsky
2365fe472b Added auto triangle generation in blend space, using Delaunay. 2018-06-21 22:48:47 -03:00
Juan Linietsky
b80946ee0d Fix crashes, ability to add blendpsace into blendtree, ability to delete with delete key 2018-06-21 18:08:11 -03:00
Juan Linietsky
a0719533bd Animation Blend Spaces 2018-06-21 15:46:11 -03:00
Juan Linietsky
0a1c1c660f -Added AnimationGraphPlayer (still missing features)
-Added ability to edit resources from built-in inspector (wip, needs testing and feedback)
2018-06-18 22:12:08 -03:00
Juan Linietsky
b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
steincodes
d3483d8c1e Adding is_stopped method to Tween 2018-06-07 17:14:31 +05:30
Max Hilbrunner
140822cc8f
Merge pull request #18885 from Gamblify/AnimationTreeExposePos
Expose animation pos to user for AnimationNodes in AnimationTree
2018-05-26 18:18:07 +02:00
Rasmus Ketelsen
c518b96362 Take tween speed into account when calculating runtime 2018-05-25 15:05:45 +02:00
Gustav Lund
da8fe2f31d Expose the animation pos to the user for AnimationNodes in AnimationTrees 2018-05-17 09:15:47 +02:00
Michael Alexsander Silva Dias
7f72d6476b Fixed some warnings found with Cppcheck. 2018-05-14 02:14:56 -03:00
AndreaCatania
9e57a07fb6 Implemented ragdoll
Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

a

Implemented implicit hierarchy.

Improved

Added some physics properties

Added bone offset to preserve COM, partially fixed scaling

work in progress

WIP

wip

Implemented Joint Gizmos

Implemented pin joint joint

Implemented all joints
2018-05-07 21:03:16 +02:00
Michael Alexsander Silva Dias
863eb0e1e0 Added "play_backwards" to the list o functions to autocomplete. 2018-05-07 12:28:55 -03:00
Rémi Verschelde
bf7ca623a6 Fix Coverity reports of uninitialized scalar variable
Fixes most current reports on Coverity Scan of uninitialized scalar
variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html

These happen most of the time (in our code) when instanciating structs
without a constructor (or with an incomplete one), and later returning
the instance. This is sometimes intended though, as some parameters are
only used in some situations and should not be double-initialized for
performance reasons (e.g. `constant` in ShaderLanguage::Token).
2018-04-19 15:20:45 +02:00
tagcup
a5e0bb447c Avoid converting Quat to Euler angles when not necessary.
Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis.

Added various missing functions and constructors.

Should close #17968.
2018-04-14 15:53:25 -04:00
Rémi Verschelde
fbc61374ca Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
Juan Linietsky
a6c9ccf007
Merge pull request #17150 from robfram/check-animation-playing-backwards
Added `get_playing_speed` method to AnimationPlayer, returning the actual playing speed of the animation being played
2018-04-08 11:36:15 -03:00
karroffel
4303fbca5a fix bone scale/rotation in AnimationPlayers
fixes #17325.

The bone pose transform was created by setting the rotation and
**then** scaling the transform. This leads to object "deformation"
that's not intended.
2018-04-03 16:43:50 +02:00
Bernhard Liebl
b553b38e7b AnimationPlayer: fix scrubbing after play backwards 2018-03-09 19:41:14 +01:00
robfram
5ef88cf577 Added get_playing_speed method to AnimationPlayer, returning the actual
playing speed of the animation being played.

As stated in #16550, there is no way to get the playing speed of an
animation. The `playback_speed` property is for the whole AnimationPlayer
node, and the argument passed to `play` method is another scale applied
in top of the AnimationPlayer properties.

Thus, the actual playing speed is AnimationPlayer.speed_scale *
AnimationPlayer.playback.current.speed_scale. If it is not playing, the
method returns 0.
2018-03-03 09:29:22 +01:00
Bojidar Marinov
57bed14e95
Remove duplicate "autoplay" property
Part of #16051
2018-01-25 16:17:35 +02:00
Paul Joannon
e30aa1386c
update signals' MethodInfo in Tween
key is a NodePath, not a String
2018-01-23 13:06:03 +01:00
Bojidar Marinov
f2355949c4
Fix an issue with the animation editor not seeking to the target time properly.
Fixes #15646.
2018-01-14 12:28:57 +02:00
Unknown
5876457410 modify default param names in couple of signals
'name' default param should not be used since there is problem with name shadowing
2018-01-12 15:45:29 +01:00
Juan Linietsky
a26e6c8215 Renamed tree_exited to tree_exiting. tree_exited is now used for actual out of tree notification.
Updated doc accordingly.
2018-01-12 08:29:24 -03:00
Bojidar Marinov
9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
AndreaCatania
09a6a74074 Forced no duplication of animation data 2018-01-11 19:52:46 +01:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b23f7bc923
Merge pull request #15161 from volzhs/tween-follow
Fix Tween follow not working
2018-01-03 11:45:19 +01:00
Rémi Verschelde
48962db5b4
Merge pull request #15132 from RandomShaper/fix-multiple-finish
Fix AnimationPlayer redundantly signaling finish
2018-01-03 11:24:48 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
firefly2442
6af109cd99 change float to bool as correct type 2017-12-30 22:14:27 -07:00
volzhs
c3f59f290c Fix Tween follow not working
Fix regression from 7609efe757
2017-12-29 21:59:45 +09:00
Pedro J. Estébanez
9c3fbfc9db Fix AnimationPlayer redundantly signaling finish
Now it will emit only when actually going from not-finished-yet to finished, as has always been the case.

The bug was a side effect of 2d2467c0ff.
2017-12-28 21:48:09 +01:00
Noshyaar
d26b6f284f
Merge pull request #15008 from AlmightyScientist/issue-15000
Animation Tree: Prevent cycle_test from being altered by past-test.
2017-12-27 10:28:12 +07:00
Poommetee Ketson
f9c2cfbe31 AnimTreePlayer: fix duplicated properties 2017-12-25 19:26:39 +07:00
AlmightyScientist
7ace1f2494 Animation Tree: Prevent cycle_test from being altered by past-test. 2017-12-24 18:21:59 +01:00
Rémi Verschelde
aa6772d7ab Revert property changes in "[DOCS] AnimationPlayer new props, members/methods"
This partially reverts commits e79456519d
and 2d07fe2920, which introduced API changes
needing more in-depth review at this stage.

Kept the removal of "get_position" binding, redundant with
"get_current_animation_position". Kept docs changes where applicable.
Also removed the obsolete "stop_all" method which does the same as "stop".

Fixes #14602.
2017-12-14 00:36:41 +01:00
Rémi Verschelde
ce0f894b48 doc: Sync classref with current source 2017-12-10 00:43:49 +01:00
Ray Koopa
ad9f987715 Add feature to disable animation tracks 2017-12-09 18:22:16 +01:00
Rémi Verschelde
b5813bddeb
Merge pull request #14315 from willnationsdev/animationtreeplayer-docs
[DOCS] AnimationTreePlayer props/members/methods, EditorFileSystem methods
2017-12-09 14:52:35 +01:00