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
Rémi Verschelde
7d1b4567b0
Merge pull request #4155 from JoshuaGrams/anim_tree_switched
...
AnimationTreePlayer: Various processing improvements
2016-04-11 13:02:21 +02:00
sanikoyes
da28a2f062
Fix crash when tween control object previous freed
2016-04-07 15:45:16 +08:00
Josh Grams
4f6b2152e2
AnimationTreePlayer (transition_node_set_current): fix by removing copy-paste duplication.
2016-04-06 15:09:00 -04:00
Josh Grams
1b95dca6bd
AnimationTreePlayer (set_active, reset, constructor): seek all animations to start.
2016-04-06 15:07:58 -04:00
Josh Grams
5d6b58fea6
AnimationTreePlayer (_process_node): more robust oneshot termination condition.
2016-04-06 15:06:42 -04:00
Josh Grams
0a9c8a9f36
AnimationTreePlayer (_process_node:TIMESEEK): allow auto-advance with 0 xfade.
2016-03-31 12:12:05 -04:00
Josh Grams
7fe28d4168
AnimationTreePlayer (_process_node:TIMESEEK): give p_seek precedence over tsn->seek_pos.
2016-03-31 10:06:38 -04:00
Josh Grams
8920ab0fbf
* AnimationTreePlayer (_process_node): remove `switched` argument.
...
The _process_node function (which recurses through the blend tree
generating blend values and the active animation list) had an argument
named `switched` which would loop an animation back to the beginning if
it had reached the end (regardless of whether or not it was supposed to
be a looping animation).
This argument was only used in four places: two of them were overridden
by a seek-to-zero, and I believe the other two are bugs.
In OneShot, it was used to reset the oneshot animation to the beginning
when fired. But this would fail if the oneshot node was fired before it
had completed its previous run. While this *could* be a valid way for
oneshot to work (firing does nothing if it's already running), the code
currently resets the fade-in, so I believe that it is intended to reset.
I replaced this usage with seek-to-0.
In Transition, it was used on the previous (fading out) animation when
seeking the Transition node, which I believe is incorrect: why would you
want to loop a non-looping animation instead of simply fading out from
the end? Also it will never happen unless you seek the Transition node
twice during one cross-fade.
The other two uses are in Transition and _process_animation, where it is
used along with a seek-to-zero which overrides it.
2016-03-27 07:19:05 -04:00
Rémi Verschelde
6ef3c3b645
Merge pull request #3980 from JoshuaGrams/timescale-remainder
...
TimeScale node: scale return value (time remaining).
2016-03-09 20:17:13 +01:00
Josh Grams
65b7791263
TimeScale node: return +inf remaining for 0 scale.
2016-03-09 06:57:28 -05:00
Hubert Jarosz
4a4f247914
remove trailing whitespace
2016-03-09 00:00:52 +01:00
Josh Grams
2fa200ff53
AnimationTreePlayer: distinguish value tracks.
...
If the node had a 3D Transform, the transform would always get written,
even if the tracks on that node were supposed to be value tracks.
2016-03-08 17:23:32 -05:00
Josh Grams
2e1b1234a3
TimeScale node: scale return value (time remaining).
2016-03-07 17:21:07 -05:00
Rémi Verschelde
46bfcd3507
Merge pull request #3858 from JoshuaGrams/blend3
...
AnimationTreePlayer (Blend3): process all inputs.
2016-03-01 14:02:11 +01:00
Josh Grams
391ce81c5e
AnimationTreePlayer: blend value tracks ( closes #2299 )
...
Variant:
- zero() sets a Variant to the appropriate type of zero value
- blend() blends part of one Variant on top of another.
2016-03-01 07:37:36 -05:00
Josh Grams
b79351aa45
AnimationTreePlayer (Blend3): process all inputs.
...
Always call _process_node on all three inputs so that looped animations
don't get out of sync.
2016-02-28 06:55:53 -05:00
Juan Linietsky
db43e94175
-Made some icon data types smaller so they take up less space
...
-Fixed sample import plugin, makes samples sound strange in smp when limited hz
2016-02-11 00:01:35 -03:00
Juan Linietsky
11933811ee
store animation names in alphabetical order, fixes #3423
2016-02-01 00:31:13 -03:00
George Marques
5be9ff7b67
Update copyright to 2016 in headers
2016-01-01 11:50:53 -02:00
Juan Linietsky
f65eb470ae
-fix function calls in animationtree, closes #2789
2015-12-16 08:34:57 -03:00
Sergey Lapin
8eff61ca87
This fixes long standing animation bug
...
When AnimationTreePlayer switches to new animation it never
seeks it to 0 which leads to problems with non-looping animations being
played just once.
This patch is direct approach fixing this problem.
It handles most common cases of occurance.
Closes #2199
2015-12-10 16:39:57 +03:00
Juan Linietsky
200b7bb87c
-Display on animation editor which keys are invalid and which tracks are unresolved
...
-Added a tool to clean up unresolved tracks and unused keys
2015-12-05 14:18:22 -03:00
Juan Linietsky
0c3386b2ed
Merge pull request #2707 from akien-mga/master
...
Cosmetic fixes to SCons buildsystem
2015-11-18 19:43:28 -03:00
Saracen
e011bcf162
Experimental retooling of AnimationTreePlayer to allow manual advancement.
2015-11-02 17:06:28 +00:00
Rémi Verschelde
399b1b0474
Cosmetic fixes to SCons buildsystem
...
- Removed trailing spaces
- Made sure all indentation is done using tabs (fixes #39 )
- Potentially fixed an identation issue for openssl check
2015-11-01 20:53:26 +01:00
Juan Linietsky
0fb7b5aa0c
HTML5 exporter Improvements
...
-Better template handling
-Voice support
-Stream support
2015-09-10 00:10:54 -03:00
Juan Linietsky
95047562d7
Several performance improvements, mainly in loading and instancing scenes and resources.
...
A general speedup should be apparent, with even more peformance increase when compiling optimized.
WARNING: Tested and it seems to work, but if something breaks, please report.
2015-06-29 00:29:49 -03:00
Juan Linietsky
954256268a
Merge branch 'master' of https://github.com/okamstudio/godot
...
Conflicts:
demos/2d/motion/engine.cfg
2015-06-06 11:09:00 -03:00
Juan Linietsky
0e1510214a
small fixes
2015-06-01 23:35:23 -03:00
Juan Linietsky
f36e7dcb40
improved animation editor
...
-same-value link keys
-new layout
-forward, backwards playback
-integrated curve/property editor
-auto increment sprite frame after insert
-copy & paste animation resoucres
2015-05-25 01:47:02 -03:00
Juan Linietsky
e323cc0505
-Rename unexisting by nonexistant, closes #1940
...
-Added function to retrieve list of actions fron InputMap
2015-05-18 10:20:54 -03:00
ehriche
fe13c728fd
added notes to resolve undefined behavior of calculations in tweening
...
interpolators in future.
2015-05-06 00:51:49 +02:00
sanikoyes
6d0914dfc5
Spine: add feature to insert/remove interpolates while updating
2015-05-05 11:12:17 +08:00