Commit graph

6412 commits

Author SHA1 Message Date
PouleyKetchoupp
17bb7c6735 Fix errors with invalid CollisionPolygon2D
Fixed internal errors when the shape is invalid and made warnings more
descriptive.

(cherry picked from commit 2217e477b9)
2021-03-05 22:45:29 +01:00
PouleyKetchoupp
6c0002afb5 Fix errors and crash with empty ConvexPolygonShape2D
(cherry picked from commit 6fb6090748)
2021-03-05 22:45:29 +01:00
lawnjelly
136f94fa24 Fix Camera2D frame delay
Fixes camera frame delay by always doing a scroll update except when smoothing is active.
2021-03-05 15:46:26 +00:00
Rémi Verschelde
cad3771ce7
Merge pull request #46623 from Janglee123/tilemap-collision-show
Added `show_collision` property for tilemap node.
2021-03-04 23:40:17 +01:00
janglee
7b6cc3e687 Added show_collision property.
If true, collision shapes are shown in the editor and at run-time.
Requires Visible Collision Shapes to be enabled in the Debug menu,
for collision shapes to be visible at run-time.
2021-03-05 01:21:40 +05:30
Pedro Rodrigues
138d5121eb Fix crash trying to destroy an ImageTexture object containing a null texture
The problem happened when `ImageTexture::create_from_image` was called
with an empty image. In this situation an RID was allocated despite the
texture being null. The destructor would then crash trying to acess this
null texture.

Fixes #46274

(cherry picked from commit 46218d8c37)
2021-03-04 12:21:17 +01:00
kobewi
b82d5688b9 Deselect column only if belongs to deselected item
(cherry picked from commit 5cd5722f6a)
2021-03-04 12:20:35 +01:00
sps1112
6ea1e97e06 Add null check for NavigationMesh.create_from_mesh()
(cherry picked from commit cf6bfea93f)
2021-03-04 11:41:46 +01:00
sps1112
216aba8228 Add size<=0 check in BakedLighmapData._get_user_data()
(cherry picked from commit 18bb6e74be)
2021-03-04 11:41:10 +01:00
Michael Alexsander
292c9e380a Make Camera2D's editor helper code only be compiled on editor builds
(cherry picked from commit f70ccbca52)
2021-03-04 11:35:39 +01:00
Zak
3f36ca7323 HTTPRequest: Improve response when disconnecting while downloading
Previously if a disconnect occured while downloading a non recoverable error was displayed. This PR attempts to fix this by making sure `request_completed` signal is emitted with an `STATUS_CONNECTION_ERROR` response code.

(cherry picked from commit 70c39737db)
2021-03-04 11:31:57 +01:00
Rémi Verschelde
c003423674
Merge pull request #46579 from nekomatata/fix-joint-remove-body-regression-3.2
[3.2] Fix Joint2D/Joint node path reset on scene switch
2021-03-03 16:41:59 +01:00
PouleyKetchoupp
cdf0ebfac7 Fix Joint2D/Joint node path reset on scene switch
When one of the bodies exited the tree, the corresponding node path was
reset instead of just resetting the joint from the physics server. That
was causing the node path to be reset on scene switch when one of the
bodies is under the joint in the scene tree.
2021-03-02 08:32:00 -07:00
Rémi Verschelde
9ee835ac93
Merge pull request #46409 from asheraryam/fix-scale-pivot-jitter
Fix flicker in control nodes due to pivot offset
2021-03-02 16:15:21 +01:00
Pedro Rodrigues
279b9f43f3 Fix crash in GIProbe::bake
The problem happened when the passed from_node was null and the GIProbe
node had no parent node.

Fixes #45978

(cherry picked from commit 82fed7b6da)
2021-03-02 10:26:14 +01:00
Fabio Alessandrelli
05367c755c [Net] Better EOF handling in HTTPRequest.
This fix request_completed being emitted two times, the first with the
result, the second as a failure when retrieving responses served with
read-until-EOF.

(cherry picked from commit d61cd469f1)
2021-03-02 10:26:14 +01:00
Eryk Dwornicki
127f3c0566 Fixed bug that caused collision not to be properly reenabled when joint between two bodies is destroyed
(cherry picked from commit 519e314bea)
2021-03-02 10:26:14 +01:00
Yuri Sizov
59dfd084ab Properly hide GraphEdit's minimap 2021-03-01 18:18:05 +03:00
lawnjelly
b1e24597e7 Renaming rendering/2d project settings.
The rendering/quality/2d section of project settings is becoming considerably expanded in 3.2.4, and arguably was not the correct place for settings that were not really to do with quality.

3.2.4 is the last sensible opportunity we will have to move these settings, as the only existing one likely to break compatibility in a small way is `pixel_snap`, and given that the whole snapping area is being overhauled we can draw attention to the fact it has changed in the release notes.

Class reference is also updated and slightly improved.

`pixel_snap` is renamed to `gpu_pixel_snap` in the project settings and code to help differentiate from CPU side transform snapping.
2021-03-01 11:38:46 +00:00
lawnjelly
847a37b196 Change 2d transform snapping from floor to round
Two common problems have emerged as a result of transform snapping:
1) Camera jitter with a camera following a snapped object
2) Pixel gaps between e.g. a platform and a player, where a platform rounds down and a player rounds up

Using round seems to greatly reduce problems due to camera jitter. It also may prove better for  pixel gaps because pixel art is often designed on a grid, so whole numbers are too expected, which are unstable with floor().
2021-02-28 14:34:39 +00:00
asheraryam
25f35b2c9f Fix jitter in control nodes when using pivot-offset and animating scale
This is based on suggested fix from this comment
https://github.com/godotengine/godot/issues/36087#issuecomment-771593146 -- basically the old rounding workaround is removed, and rounding is now done locally in the scroll_container instead.

Fixes #28804

Co-authored-by: Georg Wacker <contact@georgwacker.com>
2021-02-28 15:30:48 +03:00
Delf Neumärker
7df977c3ed
Fix crash during drag if user freed the drag preview 2021-02-27 15:16:06 +01:00
Rémi Verschelde
9047e760d1
Merge pull request #46451 from hilfazer/click_mesh_instance_crash
Prevent crash when clicking Mesh in MeshInstance when is scene root
2021-02-26 20:59:19 +01:00
hilfazer
84a9efcebc Prevent crash when clicking Mesh in MeshInstance when is scene root 2021-02-26 18:58:05 +01:00
Eric M
3b2c43312c Fixed issues with slider focus and scroll input
(cherry picked from commit 707cf278a5)
2021-02-26 15:27:42 +01:00
Meriipu
6f77f1bb3e If the mouse is held on notification_wm_mouse_exit, do not drop focus
This fixes a bug where users of the scrollbar had to be very careful
not to move the mouse outside the viewport, otherwise the scrollbar
would drop its drag-action and stop scrolling until clicked again.

The existing behaviour had the side-effect of also dropping the
cosmetic highlighting of the scrollbar (in addition to the dragging),
for the specific case where the mouse was move outside the window.
The previous behaviour did nothing to remove the highlight if the
mouse was released (but not moved) inside the viewport.

This separate issue with the lingering highlight of the scrollbar
(until a mouse-movement action is performed inside the viewport) is
fixed in an immediate followup to this commit.

Closes bug #39634

(cherry picked from commit 44657db3e2)
2021-02-26 15:22:08 +01:00
Delf Neumärker
28e36dc7b9 Fix crash when loading a scene containing an uncreatable type
(cherry picked from commit 04a4828c5e)
2021-02-26 11:30:38 +01:00
Emmanuel Leblond
94fe2dd31e
Fix Godot returned status code on unexpected error 2021-02-25 18:39:29 +01:00
Rémi Verschelde
6fc9c409dd
Merge pull request #46420 from nekomatata/draw-collision-outline-option-3.2
[3.2] Added option in project settings to draw Shape2D outlines
2021-02-25 17:15:52 +01:00
Rémi Verschelde
e919a413fb
Merge pull request #46397 from trollodel/collisionobject3d-debug-shapes-3.2
Allow CollisionObject to show collision shape meshes
2021-02-25 16:54:47 +01:00
PouleyKetchoupp
d94cd42ccd Added option in project settings to draw Shape2D outlines
Disabling collision outlines can be useful for performance when the game
is running and many collision shapes are displayed.
2021-02-25 07:48:33 -07:00
Rémi Verschelde
96d38d9751 Revert "Warn when setting Control size inside ready()"
This reverts commit a8105d73c7.

We need to improve the logic somewhat to make the warning more specific to
actual problematic scenarios. Will likely be cherry-picked again + fixes
for the next release.

Fixes #46376.
2021-02-25 15:14:32 +01:00
kleonc
80e4b2d02e MeshDataTool::create_from_surface Fail on invalid index data
(cherry picked from commit 8e82cf8174)
2021-02-25 15:14:32 +01:00
Jummit
0a9190134d expose edit_selected in Tree
(cherry picked from commit 13fb24cb6f)
2021-02-25 15:14:32 +01:00
Christoffer Sundbom
3b63467783 Tween: Add null check for target object
Fixes #45399.

(cherry picked from commit 5b2100d85c)
2021-02-25 15:14:31 +01:00
trollodel
2da6d82f3b Allow CollisionObject to show collision shape meshes
Add an editor gizmo to CollisionObject.
CollisionShape no longer shows collision shapes directly.
2021-02-24 21:33:40 +01:00
Hugo Locurcio
2735a5498e Improve the get_node() error message to be more descriptive
- Mention the origin of the `get_node()` call.
- Mention whether the attempted path is absolute or relative.

See #46214.

(cherry picked from commit e6abdc943d)
2021-02-22 14:16:42 +01:00
kleonc
566ad4fd22 Label::set_lines_skipped Fail if passed a negative value
(cherry picked from commit d7bb7cad47)
2021-02-22 10:16:54 +01:00
kleonc
bd7c24371d Line2D::set_point_position Fail if passed index is out of bounds
(cherry picked from commit df49fdd189)
2021-02-22 10:16:22 +01:00
Kongfa Waroros
af5fe70623 Keep Hue value when Saturation or Value is zero
(cherry picked from commit 27749711b2)
2021-02-22 10:15:29 +01:00
nc
bc86f3e27e improve error message when travel() is called on an AnimationNodeStateMachine when the state machine is not playing
(cherry picked from commit 0c968d603a)
2021-02-22 10:15:00 +01:00
Tomasz Chabora
a8105d73c7 Warn when setting Control size inside ready()
(cherry picked from commit 84da090a69)
2021-02-22 10:15:00 +01:00
PouleyKetchoupp
cefaa6fb06 Fixed export var default value in PackedScene when script is not loaded in editor
(cherry picked from commit 4e14eefd94)
2021-02-22 10:15:00 +01:00
Hugo Locurcio
aacaad5066
Draw an outline for 2D debug collision shapes
This makes them easier to distinguish, especially when used
in a TileMap.

The default color's opacity has been slightly decreased to account
for the new outline.
2021-02-21 17:55:54 +01:00
hilfazer
28fa0f5d13 Prevent selecting hidden nodes in Canvas Item Editor 2021-02-20 20:30:16 +01:00
Ellen Poe
8ac22bdae4 Don't fade out after pausing unless stream is running
(cherry picked from commit eb5566f5c5)
2021-02-19 15:55:41 +01:00
Ellen Poe
d55501505c Initialize fadeout to false in AudioStreamPlayer
(cherry picked from commit b8a13a4968)
2021-02-19 15:55:34 +01:00
Delf Neumärker
4065fa0bcf Fix crash when calling connect_nodes_forced with invalid params
(cherry picked from commit 4a468171e5)
2021-02-19 15:54:00 +01:00
Eoin O'Neill
2fb221e79a Collision Shape 2D 'Disabled' Visualization Correction
Having white or strongly desaturated debug collision shape color
setting would make it harder to visualize enabled / disabled state.
This change makes it easier to visualize enabled / disabled state
by reducing the alpha color by half when disabled.

(cherry picked from commit 0c4594f6c9)
2021-02-19 15:51:43 +01:00
Delf Neumärker
fd90fc2c9b Fix handling of negative indices in SurfaceTool
(cherry picked from commit 735f75a16b)
2021-02-18 23:47:35 +01:00