The 'pos' variable passed to get_color() and get_offset() can be
negative if the color ramp itself is empty. This causes a lookup in an
empty position in the color Vector which leads to a crash.
We add a check so we never do a lookup in the color Vector if the
gradient is empty.
This fixes#10501
(cherry picked from commit 67b9d6eef2)
- Change get_rect_region to return UV region instead of pixel rect
- Fixed atlas texture Sprite3D Y offsets being applied in the wrong direction and fixed Flip not adjusting the geometry.
- Changed get_rect_region name to get_rect_region_uv_rect
The change in #10524 subtly changes the behavior of set_motion_scale()
and set_motion_offset() if the ParallaxLayer does not have a parent
node. Previously it would still set the corresponding property, but
after this change the property change would be discarded.
I'm not entirely sure if this actually matters as there doesn't appear
to be any code that picks up this change if the ParallaxLayer gets
re-parented later, but it's better to not change behavior regardless.
This backports the work in #7815 and the subsequent fixes in #8393
The following program now works as expected in this branch in both
release_debug and debug mode:
```gdscript
print(sqrt(-1))
print(sqrt(-1))
var simple1=asin(10.0)
var simple2=acos(10.0)
print(simple1)
print(simple2)
```
And successfully prints -nan 4 times
This fixes#9580 and fixes#8925
So when a material is set, every tile will be rendered with that. Quadrants will not be recreated, so a `CanvasItem` will exist per material per quadrant regardless a global material is set.
This makes also __Use parent material__ work for `TileMap`s.
Based on 3bb5abbc35
These include:
* generate_tangents()
* add_to_format()
* create_from()
* append_from()
Reordered and grouped the bindings to match the header for improved readability.
Removed commented out `generate_flat_normals()` method which wasn't present
in the header.
Fixes#9946
(cherry picked from commit aa1165a3f5)
* Added set_text function to RichTextLabel
* Added percent_visible attributes and functions to RichTextLabel
This should make switching from Label to RichTextLabel easier.
(cherry picked from commit d649140b9b)
- Use `NOTIFICATION_ENTER`/`EXIT_WORLD` for `Area` (intead of `*_TREE`).
- Now both bodies' and areas' constraints are cleaned up.
- And now also that happens as soon as the space is set to null (i.e., when exiting the tree) instead of only at freeing time.
- When clearing constraints, the loop goes on to the next if the current is already released, instead of breaking.
- When one has been already released, no error is shown from now on, as it's something expected, since a pair (our kind of constraint of interest) can be freed by any of its involved collision objects and the other will try again.
- Implement index shifting (or marking as -1) for shapes indices in collision pairs shapes are removed.
- Standarize behavior of bodies and areas so that anything that invalidates a given pair gives the same result (collision mask, actual collision, etc); for instance, triggering area enter/exit signals.
- Add missing member initializations.
- Extend the new-space-equals-area/body-current-space test to every case.
- Fix 3D ray-casts early accepting Areas (skipping the mask check).
- Fix unpairing of large elements (2D's `BroadPhase2DHashGrid`).
Some of these prevent random crashes caused by constraints with dangling pointers to involved objects.
Fixes#8856.
Fixes#7589.
Fixes#6676.
And maybe others.
- Refactor touch acceptance logic so the same is used whether passby is enabled or not.
- Remove the check for visibility during input handling as it should never fail; instead using now an ERR_FAIL_COND() just in case since we have been checking for that so far.
Fixes#9159.
The Tree node column/table form is missing the ability to
capture column title clicks easily.
Adding this functionality will give us the ability to
create functions such as sort by column, which is a common
table manipulation ability in games/apps.
https://godotengine.org/qa/7699
(cherry picked from commit 7b00ad22b9)
The Tree node has the ability to jump to a specific item by typing the first few chars of it's name.
But on selection ('item_activated' signal), it didn't clear the search string used for that. It was especially annoying in `FileDialog`s and has been bugging me for
ages :P
With this, you can traverse a directory structure in a FileDiag quickly with the keyboard (like you'd expect from pretty much any modern file browser) :)
(cherry picked from commit def41b9856)
Adds a tooltip parameter to `TreeItem::add_button()` and set a few tooltips in the Project settings and SceneTree dock.
(cherry picked from commit 29999942a2)
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
Ported from 304a1f5b5a (#7864).
Fixes#492 and #3913.
Pause mode was not correctly propagating effectively stopping
immediately when the mode was not PAUSE_MODE_INHERIT.
(cherry picked from commit a5ce7a98cb)
auto_accept_quit value is set first properly with GLOBAL_DEF("application/auto_accept_quit", true) in main.cpp
after that it's reset to true in SceneTree:init() whatever value was.
Add four methods to the TileMap node to make collision layers and masks be modified bit by bit (like PhysicBody2Ds and RayCast2Ds):
* set_collision_layer_bit()
* set_collision_mask_bit()
* get_collision_layer_bit()
* get_collision_mask_bit()
- Fix monitoring flag being reset when the scene is out of the tree (happens on save all if the current scene is not the focused one, therefore on save-on-run as well)
- Fix the inability to reset the monitoring flag while the area is out of the tree