Commit graph

6631 commits

Author SHA1 Message Date
besh81
c1e887edb8
Fixed bug in tab_container with hidden tabs
Fix a bug that occour when there are hidden tabs in tab_container.
The visualization isn't correct due to missing values in tab_widths array.

(cherry picked from commit e7e7aa7d12)
2021-05-09 17:47:38 +02:00
Gilles Roudière
472f7e9756
Adds a pressed signal to ButtonGroup
(cherry picked from commit 323f176915)
2021-05-09 17:47:37 +02:00
kleonc
1184013fcf
TileMap::world_to_map Ensure half offset is added according to the returned value
Decide whether half offset should be added based on the value used for calculating the return value of this method.

(cherry picked from commit f1420c7cbf)
2021-05-09 17:15:44 +02:00
Rémi Verschelde
ee86dc3011
TileSet: Improve error message for invalid IDs
Supersedes #47321.
Fixes #47313.
2021-05-09 16:56:52 +02:00
QbieShay
3af20b9bdf Added ring emitter for 3D particles
This commits adds a new emitter type for particles material
and 3D CPU particles. The new emitter is called "ring"
and it can emit either in a ring or cylinder fashion.
This adds the following properties for the emitter:
1. ring_emitter_axis: the axis along which the ring/cylinder
    will be constructed
2. ring_emitter_radius: outer radius of the ring/cylinder
3. ring_emitter_inner_radius: inner radius of the cylinder.
    when set to zero, particles will emit in the full volume.
4. ring_emitter_height: height of the ring/cylinder emitter.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-09 13:18:05 +02:00
Pedro J. Estébanez
4da9a501f6 Add animation reset track feature
As a bonus, to have consistency between use Beziers and create insert tracks, use Beziers also gets a default via editor settings that is used when the confirmation dialog is disabled, instead of just falling back to creating non-Bezier tracks.
2021-05-09 09:40:16 +02:00
rafallus
0ad0f71ba0
Check input mesh is valid in SurfaceTool methods 2021-05-09 00:38:17 +02:00
Marcel Admiraal
8766769fd4 Move collision layer and mask into CollisionObject. 2021-05-08 11:40:57 +01:00
Rémi Verschelde
84061ab03d
Merge pull request #48251 from TwistedTwigleg/skeletonik_changes_and_bug_fixes_regressionfix3_Godot3
[3.x] Fixed issue in SkeletonIK leading to some root bones being twisted incorrectly
2021-05-08 10:40:38 +02:00
TwistedTwigleg
c1bc87ed0d Fixes the SkeletonIK twisting issue by using the skeleton global pose without overrides 2021-05-06 20:11:21 -04:00
Rémi Verschelde
64403ddcab
Merge pull request #42543 from clayjohn/vertex-lighting-bug
Force vertex shading in SpatialMaterial when used
2021-05-07 00:48:32 +02:00
clayjohn
3dd2e5d870 Only set base in Sprite3D when needed 2021-05-05 22:35:21 -07:00
clayjohn
0445531ced Force vertex shading in SpatialMaterial when used 2021-05-05 19:49:18 -07:00
Rémi Verschelde
2a1fb62e96
Merge pull request #48316 from nekomatata/expose-physics-debug-shape-3.x
[3.x] Expose get_debug_mesh in Shape to scripting API
2021-05-05 15:17:48 +02:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
0c8b5b5c4d
Style: Remove redundant void argument lists
Using clang-tidy's `modernize-redundant-void-arg`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
2021-05-04 16:40:33 +02:00
Rémi Verschelde
b4af1eba0a
Style: Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2021-05-04 16:39:13 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Rémi Verschelde
7e61be3cb0
Style: Remove executable bit from non-runnable files 2021-05-04 14:45:07 +02:00
Koala
d08666f999
Fix indent left line selection
(cherry picked from commit 2c64008718)
2021-05-04 12:47:36 +02:00
PouleyKetchoupp
cc83557716
Allow values > 1 for friction and bounce in PhysicsMaterial
(cherry picked from commit 67987be644)
2021-05-04 12:46:35 +02:00
Rémi Verschelde
9052d56c92
Merge pull request #48217 from nekomatata/fix-mesh-instance-skinning-init
Fix skinning initialization in MeshInstance when loaded from thread
2021-05-04 12:28:04 +02:00
Fabio Alessandrelli
77e3514315
[Net] Implement String::parse_url for parsing URLs.
Splits the URL into (scheme, host, port, path).
Supports both literal IPv4 and IPv6.
Strip credentials when present (e.g. http://user:pass@example.com/).

Use that function in both HTTPRequest and WebSocketClient.

(cherry picked from commit 3bb40669d5)
2021-05-03 21:39:43 +02:00
Rémi Verschelde
6abf571d79
Merge pull request #48324 from MaxStgs/fix_comparsion
[3.x] Fix BakedLightmap bias bound check
2021-05-03 17:06:15 +02:00
MaxStgs
b4cc8ed6f2 Fix BakedLightmap bias bound check 2021-04-30 15:16:51 +05:00
PouleyKetchoupp
0ba5001fb6 Expose get_debug_mesh in Shape to scripting API
Can be useful for custom drawing of physics shapes without having to add
a collision object node to the tree.
2021-04-29 18:20:29 -07:00
Rémi Verschelde
e94161dada
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
2021-04-29 16:57:00 +02:00
Rémi Verschelde
0c14d10522
Merge pull request #48296 from akien-mga/3.x-cherrypicks 2021-04-29 13:48:49 +02:00
Rémi Verschelde
606073db06
Merge pull request #47173 from LightningAA/graphedit-zoom-cherrypicks 2021-04-29 13:33:17 +02:00
Rémi Verschelde
d252ef4c5e
Merge pull request #46527 from kuruk-mm/3_2_lineedit 2021-04-29 13:32:33 +02:00
Rémi Verschelde
880b830ca8
Merge pull request #46292 from hilfazer/nested_scene_instances_duplication 2021-04-29 13:31:27 +02:00
Rémi Verschelde
188147e82c
Merge pull request #48259 from akien-mga/scenetree-global_menu_action-types
SceneTree: Fix type hints for `global_menu_action` signal
2021-04-29 13:27:32 +02:00
Rémi Verschelde
70ae90e0e8
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.

Backport of #48239.
2021-04-29 12:34:11 +02:00
Rémi Verschelde
d54c13ac1a
Tabs: Remove unused 'panel' stylebox from default theme
Cf. https://github.com/godotengine/godot/issues/37875#issuecomment-625297308.

(cherry picked from commit cd8d321961)
2021-04-29 12:30:10 +02:00
Lightning_A
e4addffde1
Put physics override parameters in their own group and document that areas can be used to influence audio
(cherry picked from commit 80b1a29c46)
2021-04-29 12:27:31 +02:00
floppyhammer
4628ab2a15
ImproveCompletionPanelPositionInShaderEditor
(cherry picked from commit e927a9fef0)
2021-04-29 11:35:52 +02:00
David Hoppenbrouwers
224fce946b
Fix joint RID not being passed to _set in PhysicalBone
Also remove default RID() argument from JointData._set()

(cherry picked from commit 41e00b6787)
2021-04-29 11:30:17 +02:00
univeous
43d3eca5e9
allow input echo when changing ui focus
(cherry picked from commit f5b506763e)
2021-04-29 11:27:56 +02:00
Lyuma
11b8b8ad27
Allow renaming bones and blendshapes.
(cherry picked from commit d13568a8d1)
2021-04-29 11:27:56 +02:00
Rémi Verschelde
31581ca429
Merge pull request #46687 from QbieShay/fix-particle-rotate-y 2021-04-28 17:08:44 +02:00
Rémi Verschelde
3edf1adf91
Merge pull request #38348 from asheraryam/convex-decompose
[3.x] Create GDScript bindings for creating multiple-convex collision bodies
2021-04-28 16:48:59 +02:00
Rémi Verschelde
6cb61b67e6
Merge pull request #41471 from Calinou/giprobe-deprecate-compress-3.2 2021-04-28 12:01:55 +02:00
Rémi Verschelde
6ba10c6c1f
SceneTree: Fix type hints for global_menu_action signal
Fixes https://github.com/godotengine/godot-headers/issues/89.
2021-04-28 09:40:59 +02:00
Rafał Mikrut
06976c3e84 [3.x] Fix crashes when using _input functions 2021-04-27 16:51:29 +02:00
asheraryam
342c88841d Create bindings for creating multiple-convex-collision static bodies from gdscript 2021-04-27 06:55:17 +03:00
PouleyKetchoupp
feee9f9695 Fix skinning initialization in MeshInstance when loaded from thread
Fix for a regression from software skinning support:
instance_attach_skeleton wasn't called in set_mesh before, and it's
causing issues when the mesh instance is loaded from a thread.
1. Call from a thread queues instance_attach_skeleton with RID() in the
visual server.
2. Call from the main thread when entering tree calls
instance_attach_skeleton immediately with a valid skeleton
3. Queued instance_attach_skeleton resets the attached skeleton

This change prevents that to happen by making sure
instance_attach_skeleton is not called on set_mesh as it was doing
before, but there might be a more general problem to solve in how
visual server commands are executed when resources are loaded from
a different thread.
2021-04-26 11:42:46 -07:00
Lightning_A
827f6739a2 Initialize some graphedit values in the header 2021-04-26 09:22:28 -06:00
Tomasz Chabora
44e84c61a6
Add disabled theme icons for CheckBox
(cherry picked from commit 3a40c268a6)
2021-04-26 13:15:28 +02:00
Johannes
a3c67dd3fc
Fix removal of rect_min_size not triggering resize
fixes #46672

(cherry picked from commit c8868fcaab)
2021-04-26 13:07:59 +02:00
Rémi Verschelde
030f0f58a3
Scene: Remove unused mesh_materials StringNames
They were added in 8be2fabbe5 (2.1 era) but
were likely a first attempt that didn't get unused in the end.

(cherry picked from commit 764eee03a4)
2021-04-26 12:20:28 +02:00
ray90514
ea8004052d
Fix LineEdit undo behaves strangely
(cherry picked from commit 7501c7f48a)
2021-04-26 12:20:28 +02:00
Rémi Verschelde
e554ecd691
Merge pull request #47451 from BastiaanOlij/arvr_positional_tracker_ref
Change ARVRPositionalTracker to a reference (3.x)
2021-04-26 07:45:34 +02:00
Rémi Verschelde
e572be0c5f
Merge pull request #47484 from rafallus/fix/rigidbody-crash3.x
Fix crash on RigidBody _direct_state_changed (3.x)
2021-04-24 01:36:24 +02:00
Rémi Verschelde
32c1bada99
Merge pull request #47827 from Chaosus/vs_fix_default_input_overriding_3.2
[3.x] Prevents default values of VSNodeCustom from overriding by a script
2021-04-23 22:06:08 +02:00
JFonS
2db2d1153d CPU lightmapper environment energy fixes.
* Better handling of the scene's environment energy in the lightmapper
  bakes.
* Fixed a bug where ProceduralSky::get_panorama() returned a reference
  instead of a copy.
* Removed includes to Embree's internal header files.
2021-04-22 16:26:04 +02:00
TwistedTwigleg
51be345a17
Changed SkeletonIK3D to clear bone overrides when stopping
(cherry picked from commit 9ebdf812df)
2021-04-17 10:51:22 +02:00
smix8
fe7b624353 fix skeleton (ik) not resetting global_bone_overrides properly
fix skeleton (ik) not resetting global_bone_overrides properly
2021-04-15 16:50:59 +02:00
Rémi Verschelde
9df1ed3edb
Merge pull request #47849 from nekomatata/debug-shape-crash-fix-3.x
[3.x] Fix crashes with CollisionObject debug shapes
2021-04-13 10:13:19 +02:00
PouleyKetchoupp
a1db6784d6 Fix crashes with CollisionObject debug shapes
MeshInstance added as child nodes for CollisionObject debug shapes can
be invalidated while deleting the collision object (child nodes are
deleted first), which caused accesses to invalid memory in
shape_owner_remove_shape that lead to random crashes.

Also optimized accesses to shapes to avoid copy-on-write on each
iteration.
2021-04-12 20:04:13 -07:00
Yuri Roubinsky
ac91e2ca0d [3.2] Prevents default values of VSNodeCustom from overriding by a script 2021-04-12 14:52:19 +03:00
TwistedTwigleg
9c33f091cd Godot 3.x backport: Fix for SkeletonIK not working correctly with 0 interpolation and incorrectly rotating with animation. Now the root bone rotates differently to ensure it always rotates correctly and works with BoneAttachment nodes. 2021-04-08 18:45:54 -04:00
rafallus
e075b6b411 Check if _direct_state_changed() argument is valid
- Modified classes: RigidBody, PhysicalBone, VehicleBody, RigidBody2D, KinematicBody2D
- The input argument is untrusted even in release mode
2021-04-07 20:00:30 -05:00
Lightning_A
77cf07c013 Make scrollwheel zoom based on mouse position, cherry-picked for 3.x 2021-04-06 09:36:15 -06:00
Rémi Verschelde
822b734601
Re-allow playing AnimatedSprite2D without frames
Fixes #47578, partial revert of #47064.

(cherry picked from commit 77264e346b)
2021-04-05 15:01:01 +02:00
bruvzg
d844e72157
RichTextLabel: On custom effect change, parse bbcode only if it's enabled and not empty.
(cherry picked from commit 9f73abfa9f)
2021-04-05 12:01:51 +02:00
Kevin Smith
c081596a55
Make ColorPicker button text and tooltips appear in exported projects
(cherry picked from commit a7d12920f2)
2021-04-05 11:58:03 +02:00
Rémi Verschelde
54f0d8cf96
Merge pull request #47533 from qarmin/fix_navigation
[3.x] Validate argument in Navigation2D::navpoly_add
2021-03-31 20:29:45 +02:00
Rafał Mikrut
050edac8e0 Validate argument in Navigation2D::navpoly_add 2021-03-31 20:10:51 +02:00
Rémi Verschelde
7b35fc4549
Merge pull request #47382 from akien-mga/3.x-tilemap-collisions-opt-in
TileMap: Make collision visibility opt-in
2021-03-31 17:59:41 +02:00
Rémi Verschelde
72a547dc9d
TileMap: Make collision visibility opt-in
Supersedes #47204, see discussion there.
2021-03-30 23:39:37 +02:00
Hugo Locurcio
5fdb8b02e3
Require editor restart after changing GUI custom theme or font
The `restart_if_changed` project setting hint wasn't set correctly.

(cherry picked from commit 0724424179)
2021-03-30 16:02:33 +02:00
volzhs
b4d88cfe20
Fix typo 'previus_selected'
(cherry picked from commit 990c88f24c)
2021-03-29 14:23:43 +02:00
volzhs
3ee4efe1eb
Fix drawing boxselection on GraphEdit
(cherry picked from commit 1bdc14acea)
2021-03-29 14:23:08 +02:00
Bastiaan Olij
4cce36e35d Change ARVRPositionalTracker to a reference and better expose it to GDNative 2021-03-29 23:01:04 +11:00
lupoDharkael
3b0cf34299 Control: Expose pass_on_modal_close_click 2021-03-25 18:29:41 +01:00
Morris Tabor
e06b096994 Fix ParticlesMaterial spread 2021-03-25 17:27:00 +01:00
Nathan Franke
5e434841ec
Add Root Null Check
(cherry picked from commit 3c921ba801)
2021-03-21 01:20:59 +01:00
jmb462
6c950977a5
Prevent resizing minimap bigger than GraphEdit (Fix #47189)
Minimap size couldn't be resized back after been resized bigger than GraphEdit cause the grabber was out of GraphEdit.
This commit prevents resizing minimap bigger than GraphEdit and fix this issue.

(cherry picked from commit 045f55ec00)
2021-03-20 23:08:46 +01:00
Lightning_A
72c54c10eb Enable zooming graph_edit with scrollwheel, cherry-picked for 3.x 2021-03-19 14:18:46 -06:00
Yuri Roubinsky
70cd4c5958 Fix GraphEdit connects when graph is zoomed/unzoomed, cherry-picked for 3.x 2021-03-19 14:12:23 -06:00
Yuri Roubinsky
3ad676cbbe Fix GraphEdit reconnecting to disconnected port, cherry-picked for 3.x 2021-03-19 14:12:11 -06:00
Yuri Roubinsky
0b7384621e Prevents incorrect connection attempt on port clicking in GraphEdit, cherry-picked for 3.x 2021-03-19 14:11:54 -06:00
TwistedTwigleg
f50c8062dd
Fix for regression in SkeletonIK code
(cherry picked from commit c15e23396d)
2021-03-19 10:53:58 +01:00
Justin Ho
672fdb7af2
Check for null pointer in get_column_width(0)
(cherry picked from commit fa6fd3a2d0)
2021-03-19 10:51:09 +01:00
jmb462
843eb80039
Fix BBCode tables overlap with bottom text
New row height was added only if all the column was full.

(cherry picked from commit 25af026d9e)
2021-03-19 10:49:36 +01:00
PouleyKetchoupp
0b51cb7a11 Fix spamming errors when SoftBody pinned nodes have no attachment
There was a specific case where the node path wasn't checked for
validity before trying to access the attachment node.

It could cause lots of error log noise in both editor and game.
2021-03-18 16:22:53 -07:00
jmb462
c695ef29b8 3.2 - Fix Tween.is_active() always true after stop() and then start()
Fix #39760 & #39801

These issues were resolved in master branch (and closed) but are still active in the 3.2 branch.
2021-03-18 22:01:59 +01:00
Crystal Melting Dot
0eb0e6128c
Fix TabContainer _get_tab_width
Now it translates node name before calculating tab width

(cherry picked from commit 89baf02fb6)
2021-03-17 21:06:09 +01:00
jmb462
ae8019a7f6
Fix crash on calling play() in a uninitialized AnimatedSprite2D
When AnimatedSprite2D::play() was called before SpriteFrames has been initialized, a crach occurred (issue #46013).

Modification : An error message on null check test has been added to prevent crash.

Fix #46013.

(cherry picked from commit 324ab63844)
2021-03-17 15:33:38 +01:00
Kongfa Waroros
e8d0089901
Check AnimationNode to update properties
(cherry picked from commit 981ca8045f)
2021-03-17 15:17:02 +01:00
Rémi Verschelde
0d0841e08e
Merge pull request #47082 from nekomatata/collision-debug-shape-game-only-3.3
[3.3] Disable debug collision shapes in the editor
2021-03-17 10:38:12 +01:00
PouleyKetchoupp
baf24b4503 Disable debug collision shapes in the editor
If the editor was started with --debug-collisions, 3d shapes were
displayed twice, both with the gizmo and debug shapes. Some shapes could
also persist after being removed due to the usage of queue_free() to
destroy the debug shapes.
2021-03-16 17:58:51 -07:00
Kongfa Waroros
7646cbbca6
Check if _edit_set_position and _edit_set_rect was used outside an editor
(cherry picked from commit b80406770f)
2021-03-16 11:11:31 +01:00
Pop0p
d2a577f7f1
trims_whitespaces_when_creating_folder_windows
When creating a Windows folder via a Godot's dialog, the extra spaces are not removed which causes problems with Windows. We now remove leading and trailing whitespace when creating a dir.

(cherry picked from commit c8538153b0)
2021-03-13 22:25:34 +01:00
Rémi Verschelde
eb1698dd2a
Fix Control::_edit_set_state bogus error check
My mistake when cherry-picking #46699 with f8ee8b1b73,
I forgot to amend the cherry-pick to change 'offsets' back to 'margins' for the 3.2
branch.

Fixes #46979.
2021-03-13 21:10:12 +01:00
Rémi Verschelde
ba174332af
Merge pull request #46939 from abaire/relaxes_gltf_name_sanitization_3.2
Relaxes Node naming constraints in glTF documents to match the Editor.
2021-03-13 14:57:09 +01:00
abaire
b032067e42 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-03-12 08:35:50 -08:00
Rémi Verschelde
3f246ebeed
Merge pull request #46932 from JFonS/fix_lm_capture_env
[3.2] Batch of lightmapper fixes and minor improvements
2021-03-12 12:30:36 +01:00
JFonS
e2c28675ef Batch of lightmapper fixes and minor improvements
- Fix objects with no material being considered as fully transparent by the lightmapper.
- Added "environment_min_light" property: gives artistic control over the shadow color.
- Fixed "Custom Color" environment mode, it was ignored before.
- Added "interior" property to BakedLightmapData: controls whether dynamic capture objects receive environment light or not.
- Automatically update dynamic capture objects when the capture data changes (also works for "energy" which used to require object movement to trigger the update).
- Added "use_in_baked_light" property to GridMap: controls whether the GridMap will be included in BakedLightmap bakes.
- Set "flush zero" and "denormal zero" mode for SSE2 instructions in the Embree raycaster. According to Embree docs it should give a performance improvement.
2021-03-12 12:00:53 +01:00
TwistedTwigleg
71c6c85565 Changes to SkeletonIK:
* Removed the pointers to PhysicalBone in the code, as they were unused.
* Forward ported the SkeletonIK bone scaling fix I made from Godot 3.2 to Godot 4.0.
* Fixed issue where the root bone in the IK chain would not rotate correctly.
  * The issue turned out to be the update_chain function being called in solve. This would override the root bone transform incorrectly and that would cause it not to rotate after just a single solve. Removing the update_chain function fixes the issue and based on my testing there are no adverse effects.
  * While the old fix on this PR (prior to a force push) required a hack fix, this new fix does not!
* Removed the update_chain function. This change doesn't appear to have any adverse effects in any of the projects I tested (including with animations, Skeleton3D or otherwise, from AnimationPlayer nodes!)
* Fixed issue where the scale of the Skeleton node would change the position of the target, causing it not to work with skeletons that have a global scale of anything but 1.

(cherry picked from commit a622649876)
2021-03-12 11:29:03 +01:00
sps1112
f8ee8b1b73 Fix Control._edit_set_state crash
(cherry picked from commit 05f5a43cad)
2021-03-12 10:11:54 +01:00
Rémi Verschelde
b7e06930aa
Revert "Fix flicker in control nodes due to pivot offset" 2021-03-11 11:01:48 +01:00
Rémi Verschelde
6e9b1d99e2 Camera2D: Update scrolls when the Viewport is resized
Factored the `viewport`/`custom_viewport` setup code which was used in two
locations to ensure consistency.

Fixes #46826.
2021-03-09 17:17:51 +01:00
Angad Kambli
144749c31b use collision mask in vehicle raycast
(cherry picked from commit bfc533fc4c)
2021-03-08 17:40:22 +01:00
Rémi Verschelde
118567ca28
Merge pull request #46657 from lawnjelly/revert_snapping
Revert backport of 2D transform and camera snapping options
2021-03-08 14:49:41 +01:00
Rémi Verschelde
3fafaf2cf2
Merge pull request #46717 from lawnjelly/camera_process
Improve process logic in Camera2D
2021-03-08 14:42:08 +01:00
lawnjelly
8763d891fe Improve process logic in Camera2D
The logic for internal process and internal physics process in Camera2D was very buggy and convoluted for historical reasons.

This is a cleanup to make the logic simpler and easier to follow.
2021-03-08 13:29:19 +00:00
kobewi
749892c9fc Release mouse when SpinBox leaves scene tree
(cherry picked from commit 83f6c6b360)
2021-03-07 22:51:06 +01:00
Hugo Locurcio
ac6251d8b2
Remove deprecation warning messages from InterpolatedCamera
Since Godot 4.0's relea	se is still a while away, warning users
every time the project starts might be a bit too dramatic.
2021-03-07 15:56:41 +01:00
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
lawnjelly
bf1de6bbfa Revert backport of 2D transform and camera snapping options
More work is needed to make sure that those options actually solve users' issues, so we prefer to remove the options for 3.2.4 and revisit for a future release.
2021-03-05 14:20:31 +00:00
QbieShay
ffbb81e769 fixed particle rotate y flag 2021-03-05 11:31:03 +01: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
Mateo Kuruk Miccino
74b3021691 LineEdit: Now double click to select a word, and triple click to select all the content 2021-02-28 17:41:11 -03: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