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).
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.
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.
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.
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
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.
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.
So now it can seek to the actual values at time=length when instructed to seek to time=N*length.
That is, formerly in the editor you had no way of seeing the actual state at time=length other than temporarily disabling looping. Now you can preview both endpoints.
As a side effect, the values at anim time 0 will only be applied when actually seeking to 0, instead of at every time=N*length, as formerly. No issue.
Prior to this, the value assumed for the interval between the start of the track and the first frame would be the one of the first key if
- *seeking/playing a continuous track*;
- *seeking a discrete track*.
And the first key would be ignored until reached -thus not modifying the target property/transform- in the remaining case; namely, *playing a discrete track*.
In other words, the inner workings of the animation system considered the unreached first key for interpolation but not for a query of every key inside a time range.
With this changes, the first key is only considered is the animation is looped and ignored otherwise. That way, in order to have a start value, you'll need an explicit key at the very beginning of the track, while having the flexibility of the animation player not touching the target value until the first key is reached.
This corresponds to the point 1) of #10752.