Commit graph

4656 commits

Author SHA1 Message Date
Jean Dao b6ab75504b Fix: use function in SceneTree::call_group
When calling call_group from C++, the function name is not passed on to
call_group_flags, resulting in first argument being mistakenly used
instead of function.

(cherry picked from commit 7240701ec9)
2019-09-24 09:00:45 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Rémi Verschelde fc18d637a8 Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.

(cherry picked from commit fc370b3feb)
2019-09-24 09:00:45 +02:00
qarmin 3b703d6707 Small fixes, mostly dupicated code
(cherry picked from commit 856a8226a5)
2019-09-24 09:00:45 +02:00
Guilherme Felipe 21d3ad2e52 Continuation of #27562
[AnimationTree] Fix scale interpolation

(cherry picked from commit dbda5b6700)
2019-09-24 09:00:44 +02:00
Paul Trojahn f5def1329e Support UTF-8 in TextEdit and LineEdit navigation
This allows jumps over whole non ASCII words with Ctrl+Left/Right in
a LineEdit or TextEdit.
Fixes #25681

(cherry picked from commit 8851e16f75)
2019-09-24 09:00:44 +02:00
Mateus Felipe C. C. Pinto 8946ac9616 Make AnimatedSprite.animation complain when invalid animation name
(cherry picked from commit 2933ef42f7)
2019-09-24 09:00:44 +02:00
Emmanuel Barroga 45e4f467e7 Fix ProgressBar Wrong Value with Border
Closes: #30969

The FG rectangle of the progressbar is incorrect when dealing with a non-zero border. This issue stems from wrong order of operations when drawing the rectangle: int p = r * get_size().width - mp;


(cherry picked from commit 7db96e22dd)
2019-09-24 09:00:44 +02:00
Daniel Rakos a670c66457 Fix texture resource reload bug
If a non-imported texture resource file (e.g. DDS) gets updated the editor
doesn't reload it. The cause of the problem is two-fold:

First, the code of ImageTexture assumes that textures are always imported
from an image, but that's not the case for e.g. DDS. This change thus adds
code to issue a resource reload in case an image reload is not possible
(which is the case for non-imported texture resources).

Second, the code is filled with bogus calls to Image::get_image_data_size()
to determine the mipmap offset when that should be done using
Image::get_image_mipmap_offset(). Previous code literally passed the integer
mip level value to Image::get_image_data_size() where that actually expects
a boolean. Thus this part of the change might actually solve some other
issues as well.

To be pedantic, the texture_get_data() funciton of the rasterizer drivers is
still quite a mess, as it only ever returns the whole mipchain when
GLES_OVER_GL is set (practically only on desktop builds) but this change does
not attempt to resolve that.

(cherry picked from commit e34eb5c26c)
2019-07-17 09:49:34 +02:00
Juan Linietsky c7293e9b30 Properly deal with clicking on audio stream change or stop (AudioStreamPlayer only)
(cherry picked from commit 040b59c010)
2019-07-03 13:19:40 +02:00
Juan Linietsky 89402e38c7 Revert "Fix AudioStreams::stop possibly causing a small noise"
(cherry picked from commit 60eec47077)
2019-07-03 13:19:40 +02:00
Juan Linietsky fcbe50befa Added bindings for methods related to obtaining base an instance from VisualInstance
(cherry picked from commit 33a0011ab2)
2019-04-24 07:01:39 +02:00
Juan Linietsky 08113feb5f Expose visible instance count to multimesh
(cherry picked from commits f46899e922)
and 479649b5fb)
2019-04-24 07:01:04 +02:00
Rémi Verschelde 4764e17970 Revert "Added the ability to change the default cursor property for the RichTextLabel component."
This reverts commit 4fda05e15f.
2019-04-23 16:01:16 +02:00
Ignacio Etcheverry 39f1a110a1 Fix wrong method binds and registered class
(cherry picked from commit 2f3328a039)
2019-04-22 21:57:06 +02:00
Hein-Pieter van Braam-Stewart 4aa7760c74 Revert "Ensure non-emitting particles not processed on entering tree"
This reverts commit 24b7f08892.

This causes a particles regression in tps-demo
2019-04-21 00:59:13 +02:00
Juan Linietsky c76c33fb50 Added generator audio stream, and spectrum analyzer audio effect
Made AudioFrame and Vector2 equivalent for casting.
Added ability to obtain the playback object from stream players.
Added ability to obtain effect instance from audio server.

(cherry picked from commit e33764744c)
2019-04-20 23:50:19 +02:00
Bastiaan Olij 49df4b7a7a Added height map shape that implement heightmap collision shape
(cherry picked from commit 8627f1515b)
2019-04-20 23:33:50 +02:00
Michael Alexsander Silva Dias 94f6c3a810 Make AnimatedSprite able to play backwards
(cherry picked from commit 4a2c433028)
2019-04-20 23:17:21 +02:00
Chaosus 4f3fc559bc Added method to clear all points in Line2D
(cherry picked from commit 61b22beeae)
2019-04-20 22:14:16 +02:00
Chaosus 759c1fb0b8 Added signal for Tween emitted at completion
(cherry picked from commit a19e99aacb)
2019-04-20 22:13:33 +02:00
marxin c33a924c28 Fix new GCC 9 warnings: -Wdeprecated-copy.
(cherry picked from commit 6be77da7eb)
2019-04-20 22:04:25 +02:00
groud 4be1343f3c Enhance tree scrolling when dragging
(cherry picked from commit 14a901e88f)
2019-04-20 22:00:35 +02:00
Rémi Verschelde 34c2679506 Fix disable_3d=yes -Wunused-variable errors
(cherry picked from commit f25b057846)
2019-04-20 20:30:57 +02:00
Hein-Pieter van Braam-Stewart 650c8512cd Object::script may not be a valid Ref<Script>
It appears that Object::script may be a valid ScriptInstance but not be
castable to Ref<Script>. There were only 5 places in the code that made
this assumption. This commit fixes that.

(cherry picked from commit 20b0046945)
2019-04-20 20:30:30 +02:00
CatThingy 4da40c39f1 Removed unnecessary error from _area_inout
The error was previously removed from _body_inout
for the same reason. Fixes #28022.

(cherry picked from commit 8166f8d3c8)
2019-04-20 20:25:40 +02:00
volzhs 20ffda695a Set initial value for autorestart_random_delay of AnimationNodeOneShot
(cherry picked from commit eea3bddd1d)
2019-04-20 20:24:27 +02:00
PouleyKetchoupp 367b371fdd Fixes caches_cleared signal discrepancies in AnimationTree (fixes #25460)
(cherry picked from commit 66e07a2ec6)
2019-04-20 20:23:10 +02:00
Andrea Catania 3d74b1e2ef Added No bone set state in the IK
The problem is that initially the root bone was not set, and you didn't know that because the "no set" state was missing. Now I've added it. https://github.com/godotengine/godot-docs/issues/2333

(cherry picked from commit f65fde73da)
2019-04-20 20:22:01 +02:00
PouleyKetchoupp a028160522 Fixed uninitialized xfade in AnimationNodeTransition
(cherry picked from commit dafd7768ab)
2019-04-20 20:17:35 +02:00
Hendrikto 456eb53439 Remove unused imports
(cherry picked from commit 49a81308c0)
2019-04-20 20:15:44 +02:00
Ignacio Etcheverry 3445984901 Replace a few #if/#elif with #ifdef and "#elif defined"
(cherry picked from commit ad2127a3e8)
2019-04-20 20:13:07 +02:00
Robear Selwans 96222dedb5 Fixed an issue where changing the default_cursor on the RichTextLabel's meta_hover_ended caused the entire project to crash
(cherry picked from commit 84dfb3ff2d)
2019-04-20 20:09:57 +02:00
Guilherme Felipe aedea36d0c Fix wrong blend of animation tree
Interpolation cannot use zero values, must use the values from the
animation to be blended.

(cherry picked from commit 45d97b9860)
2019-04-20 20:09:34 +02:00
Ryan Roden-Corrent fd4a65df7b Fill out some of the AnimationNode docs.
The API docs for various animation nodes are pretty empty, yet the
tutorial at
https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html
contains some details.

These details should be included in the API docs so looking up a
particular class actually provides some information rather than
requiring the user to hunt for a different tutorial.

This also links the AnimationTree tutorial and demo in the docs.
I've found the TPS demo to be the best resource so far for learning
how to use the AnimationTree. This should be easy to find if someone
looks up the AnimationTree API docs.

Finally, this fixes a param typo in AnimationNodeStateMachine.

(cherry picked from commit 584288a32c)
2019-04-19 13:04:22 +02:00
Andrii Doroshenko (Xrayez) 948562261d Fix BitMap calculating incorrect true bit count
(cherry picked from commit b16946dea6)
2019-04-06 21:19:08 +02:00
Hugo Locurcio 67dc8cf252 Use the editor theme's accent color for 2D/3D selections and rotations
(cherry picked from commit d59b210aec)
2019-04-06 21:18:20 +02:00
marxin 4889c65922 Fix -Wnon-virtual-dtor warnings.
Example of the warning:
./core/script_language.h:198:7: warning: 'class ScriptCodeCompletionCache' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]

(cherry picked from commit f9f2413e69)
2019-04-03 17:01:04 +02:00
Paulb23 4eefd2d581 Fixed not deselecting when clearing lineedit.
(cherry picked from commit bfba1e36bc)
2019-04-03 17:00:45 +02:00
Rémi Verschelde 7f691e8bb9
Merge pull request #27419 from GameCoderStudios/keep-custom-tracks-properties
Fix: Keep-custom-tracks option now keeps animation loop property and value track update mode.
2019-04-01 17:16:05 +02:00
Daeil Kim 364aea1eff Ensure non-emitting particles not processed on entering tree
Also removed non-active CPUParticles(3d) from render list
Fixes #27066

(cherry picked from commit 24b7f08892)
2019-04-01 11:20:35 +02:00
Kanabenki 72433a35b1 Add missing check for 2d physics bounce and friction setters
The override check was already present for 3d physics but missing for 2d

(cherry picked from commit 3f64215a43)
2019-04-01 11:19:32 +02:00
piyushdagar 683c95ebdb Fixed CollisionObject signals do not trigger on Area
(cherry picked from commit d7387e8a68)
2019-04-01 11:19:13 +02:00
Guilherme Felipe 2f8362a2ab StateMachine: Fix sync mode
(cherry picked from commit d35eae166c)
2019-04-01 11:17:33 +02:00
K. S. Ernest (iFire) Lee 804b68c981 Fix scaling issue for texture button focus texture.
(cherry picked from commit 1971c09e5e)
2019-04-01 11:14:34 +02:00
Michael Alexsander Silva Dias 373e6aa17a Make size cache dirty when removing tiles in 'TileMap'
(cherry picked from commit be5f35dfa0)
2019-04-01 11:14:08 +02:00
qarmin 5650c1ecde Fix inspector update after changing anchor via buttons
(cherry picked from commit 8b391b9ab0)
2019-04-01 11:13:20 +02:00
Robear Selwans 4fda05e15f Added the ability to change the default cursor property for the RichTextLabel component.
(cherry picked from commit b852a7a854)
2019-04-01 11:10:04 +02:00
Paul Trojahn 0c3c4d61f7 Remove extraneous line breaks from text resources
Fixes #23539

(cherry picked from commit 9bbda4db2f)
2019-04-01 11:08:47 +02:00
Angeloss 589c5698a0 Fix: Keep custom tracks option now keeps animation loop property and value track update mode. 2019-03-27 11:32:41 -06:00