Commit graph

210 commits

Author SHA1 Message Date
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
Will Nations c80d6ed439 [DOCS] AnimationTreePlayer props/members/methods 2017-12-08 15:19:51 -06:00
Will Nations 2d07fe2920 [DOCS] AnimationPlayer prop API fixed 2017-12-07 11:19:21 -06:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Will Nations e79456519d [DOCS] AnimationPlayer new props, members/methods 2017-12-04 23:59:12 -06:00
Pedro J. Estébanez d0e09d84f0 Implement onion skinning for the animation editor 2017-11-25 13:25:14 +01:00
Pedro J. Estébanez ff03a0bc7b Implement backup/restore for animated values 2017-11-25 02:18:28 +01:00
Rémi Verschelde 613d374bc5
Merge pull request #12284 from bojidar-bg/allow-subproperty-set
Allow for getting/setting "dotted" properties of objects
2017-11-21 22:44:14 +01:00
Bojidar Marinov 0cf9597758
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
2017-11-21 20:58:21 +02:00
Ferenc Arn d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Pedro J. Estébanez e477fa2bd2 Change AnimationPlayer looping logic
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.
2017-11-13 12:49:31 +01:00
Bojidar Marinov 7bbde636e8 Make Tween::interpolate_property's able to get() the initial value
To use this behavior, pass `null` in place of the initial_value parameter.
2017-11-13 11:23:46 +02:00
Rasmus Ketelsen 02382c4fd8 Fixed AnimationPlayer.get_autoplay() returning empty string 2017-11-02 08:42:43 +01:00
Poommetee Ketson 9b634180aa Refactor Fixed to Physics 2017-10-21 21:28:08 +07:00
Rémi Verschelde 08ebbc90a8 Merge pull request #12107 from RandomShaper/fix-anim-before-first-key
Fix animation before first key
2017-10-20 23:08:02 +02:00
Pedro J. Estébanez f4959ee32b Fix animation before first key
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.
2017-10-15 01:28:08 +02:00
Pedro J. Estébanez 2d2467c0ff Fix animation not stopping after seeking to the end 2017-10-14 22:21:20 +02:00
Marcelo Fernandez ac2879d189 Added a name/path description when there is an error in the Animation Track 2017-10-07 11:51:24 -03:00
AndreaCatania 4537977d6d Renamed fixed_process to physics_process 2017-09-30 16:19:07 +02:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Maxim Sheronov 0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Juan Linietsky 1c5376ae59 Many fixes to visual script, changed virtuals override for a proper selector. 2017-09-12 07:58:54 -03:00
Rémi Verschelde 39621bf681 Fix AnimationTreePlayer bogus argument name
Regression from 6fa6149517.
2017-09-01 21:29:00 +02:00
Juan Linietsky 6fa6149517 Fix some argument ordering, closes #10010 2017-09-01 15:01:17 -03:00
cryptonaut 023b68542f Cleaned up logic in Tween::_tween_process(), fixes #9187 2017-08-29 00:08:59 -07:00
Rémi Verschelde 7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Hein-Pieter van Braam cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Juan Linietsky 2cc8309249 Merge pull request #10351 from neikeq/enums-are-for-the-weak
ClassDB: Provide the enum name of integer constants
2017-08-21 19:56:08 -03:00
Ignacio Etcheverry 32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Juan Linietsky 541fdffc0a Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
2017-08-20 12:55:46 -03:00
Ignacio Etcheverry 90b8a5b71e Removes editor_hint from SceneTree 2017-08-19 01:29:45 +02:00
TwistedTwigleg 00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00
Ignacio Etcheverry 2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Indah Sylvia 5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Juan Linietsky 7e4970214c Fixed some string names and animation playback options, closes #9446 2017-08-06 22:51:56 -03:00
Poommetee Ketson e3998528e0 BuildSystem: generated files have .gen.extension 2017-06-25 07:55:01 +07:00
alexholly 935f730170 renamed all Rect3.pos to Rect3.position 2017-06-09 15:54:02 +02:00
Poommetee Ketson c7ac90c97f Fix autoplay animation starts from last editor state #8976 2017-05-31 23:54:40 +07:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Shin-NiL d8c396a44f Honor the Tween's final values 2017-03-30 07:58:20 -03:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Saracen 5e938f0001 Inf and NaN support added to GDScript. 2017-02-28 21:52:33 +00:00
Rémi Verschelde df365fdc3c Merge pull request #6462 from RandomShaper/fix-improve-anim-blend
Fix/improve AnimationPlayer blending logic
2017-02-27 14:39:54 +01:00
Andreas Haas 0157969ccc
Tween: Fix undefined behavior found by static code analyzer.
Adresses the issue mentioned in https://software.intel.com/en-us/articles/the-ultimate-question-of-programming-refactoring-and-everything
2017-02-22 00:56:40 +01:00
Hein-Pieter van Braam 411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Hein-Pieter van Braam 0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
sanikoyes 9123e91634 Fix tween Transform2D typo 2017-02-07 15:45:49 +08:00
Juan Linietsky 4c28f35b2c Merge pull request #7002 from RandomShaper/vcs-friendliness
Greater VCS friendliness
2017-01-25 14:52:40 -03:00
Ferenc Arn 6f4f9aa6de Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
2017-01-16 13:36:33 -06:00
Pedro J. Estébanez 7dbb1c0571 Improve .tscn VCS
Serialize dictionaries adding newlines between key-value pairs
Serialize group lists also with newlines in between
Serialize string properties escaping only " and \ (needed for a good diff experience with built-in scripts and shaders)

Bonus:
Make AnimationPlayer serialize its blend times always sorted so their order is predictable in the .tscn file.

This PR is back-compat; won't break the load of existing files.
2017-01-16 18:03:51 +01:00
Rémi Verschelde f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00
Juan Linietsky dcb95ec147 removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
2017-01-14 11:10:42 -03:00
Rémi Verschelde 93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Juan Linietsky 00ec16e3f3 renamed tween animationplayer scale functions to speed_scale 2017-01-13 19:36:04 -03:00
Rémi Verschelde f392b340ff Tween: Rename times_in_sec (sic) param to duration 2017-01-13 19:40:18 +01:00
Juan Linietsky 83cb84753f Renamed most signals so they refer to:
-An action being requested to the user in present tense: (ie, draw, gui_input, etc)
-A notification that an action happened, in past tense (ie, area_entered, modal_closed, etc).
2017-01-12 00:51:08 -03:00
Juan Linietsky bc26f90581 Type renames:
Matrix32 -> Transform2D
	Matrix3 -> Basis
	AABB -> Rect3
	RawArray -> PoolByteArray
	IntArray -> PoolIntArray
	FloatArray -> PoolFloatArray
	Vector2Array -> PoolVector2Array
	Vector3Array -> PoolVector3Array
	ColorArray -> PoolColorArray
2017-01-11 00:52:51 -03:00
Juan Linietsky f3f4a11cfb - _ready() callback only happens once now, if you want to receive it again, use request_ready()
- C++ Nodes mostly do an internal process callback, so it does not conflict with users willing to use their own process callbacks
- callbacks such as _input, _process, _fixed_process _unhandled_input, _unhandled_key_input do not requiere calling a function to enable them. They are enabled automatically if found on the script.
2017-01-10 18:04:33 -03:00
Juan Linietsky 1b0930c435 Renamed finished to animation_finished, also passes the animation name when finished 2017-01-08 17:41:32 -03:00
Juan Linietsky 2ab83e1abb Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
Juan Linietsky b085c40edf -Conversion of most properties to a simpler syntax, easier to use by script
-Modified help to display properties

GDScript can still not make use of them, though.
2017-01-04 01:16:14 -03:00
Juan Linietsky 118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
2017-01-02 23:03:46 -03:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
Rémi Verschelde cc54189911 Merge pull request #7000 from m4nu3lf/master
Fixed Mix nodes in Animation Tree Player
2016-11-02 22:12:47 +01:00
Rémi Verschelde d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
m4nu3lf 40ba6d328b Fixed Mix nodes in Animation Tree Player 2016-10-31 19:31:37 +00:00
Pawel Kowal 20a18907c1 Fix regression #6864 caused by #6613 2016-10-26 15:15:20 +02:00
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Pawel Kowal acc242fd6a Tween reset/stop/resume/remove for all object properties at once 2016-09-25 23:25:52 +02:00
Pedro J. Estébanez 83df74a17d Fix/improve AnimationPlayer blending logic 2016-09-12 04:33:40 +02:00
sanikoyes cccea7e0b4 Tween: fix non-repeat interpolate_callback does not delete after call triggered 2016-08-31 10:27:20 +08:00
Juan Linietsky 223ca1363c Merge pull request #5352 from m4nu3lf/master
AnimationTreePlayer filters improved
2016-07-10 13:40:56 -03:00
Rémi Verschelde da034f324a Revert "Added toggle for loop interpolation based on adolson's code"
This reverts commits 8884b8f519
bd5c8f2aa0
and 5cb31f6d5b.

<reduz> Akien, I understand the need for the second loop mode, but I think
the current UI is pretty confusing. I think this should be changed for an
enum, both there and in the animation.. otherwise we should revert it
[...]
<reduz> alternatively this could be added per track, which I think should
make it a little less confusing

Reopens #959..
2016-06-26 23:45:18 +02:00
m4nu3lf cfa11777c0 AnimationTreePlayer filters improved
Now the AnimationTreePlayer filters for Blend2 and OneShot nodes
behave as expected, that is the main animation is not affected by
the secondary animation if the track is filterd out for arbitarily
complex trees.
2016-06-22 19:34:12 +01:00
George Marques 5cb31f6d5b
Replace 'or'/'and' keywords
Some compilers do not like this.
2016-06-19 12:36:50 -03:00
Rémi Verschelde 3520902194 Merge pull request #4724 from Cybolic/optional-loop-interpolation
Added toggle for loop interpolation based on adolson's code
2016-06-19 12:30:22 +02:00
Juan Linietsky 7c20c386c5 -Added trigger mode to tracks, useful for properties that work as triggers, such as playing a sample, an animation, etc.
-Better interpolation of discrete tracks, fixes #4417
2016-06-19 01:43:02 -03:00
Rémi Verschelde b7dbf9207a Drop empty files that are not used anywhere
Part of #5272
2016-06-18 19:46:30 +02:00
Rémi Verschelde a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
m4nu3lf 048f5a6b75 TimeSeek node in AnimationTreePlayer now propagates filters 2016-06-10 23:23:09 +01:00
Hubert Jarosz 33403d91f7
remove trailing whitespace 2016-05-21 15:29:25 +02:00
Christian Dannie Storgaard 8884b8f519 Added toggle for loop interpolation based on adolson's code 2016-05-20 13:13:32 +03:00
Paulb23 488495852b Fixed animation player auto-queue duplication and undo/redo 2016-05-07 17:27:52 +01:00
Josh Grams bd95e18ae4 AnimationTree: add filters to Animation nodes. 2016-04-26 06:49:06 -04:00
Josh Grams 2272824ee2 AnimationTree: set value track property per frame, not per track. 2016-04-24 04:39:32 -04:00
Jakub Grzesik fd9b82a082 animation_started signal to AnimationPlayer 2016-04-14 17:19:20 +02:00
Rémi Verschelde 20f62dd958 Merge pull request #4308 from JoshuaGrams/atp-resources
AnimationTreePlayer: fix discrete value tracks.
2016-04-14 12:39:08 +02:00
Josh Grams ee59b2053f AnimationTreePlayer: fix discrete value tracks.
Discrete value tracks don't update every frame (only when a new key is
reached).  So we can't use the actual property value as an accumulator:
it will end up being zero most of the time.
2016-04-12 11:54:17 -04:00
Rémi Verschelde 08aaff21f3 Merge pull request #4286 from JoshuaGrams/atp-resources
AnimationTreePlayer: allow animating resource properties.
2016-04-12 13:18:47 +02:00
Rémi Verschelde 29ed58eab6 Merge pull request #4284 from JoshuaGrams/atp-process-mode
AnimationTreePlayer: constructor now sets processing mode.
2016-04-12 08:56:48 +02:00
Josh Grams aabb0d9cbc AnimationTreePlayer: allow animating resource properties.
e.g. Particles2D config and param values.
2016-04-11 20:10:35 -04:00
Josh Grams ed497cb153 AnimationTreePlayer: constructor now sets processing mode. 2016-04-11 11:54:32 -04:00