Commit graph

6453 commits

Author SHA1 Message Date
Hugo Locurcio 575dbd4bb2
Fix artifacts in DynamicFont when scaling with filtering enabled 2020-10-29 00:33:11 +01:00
Eric Tuvesson 9320266fe8
fix(sprite2d): Rect is not handling pixel snap
related https://github.com/godotengine/godot/issues/42985

(cherry picked from commit e892a92ad6)
2020-10-28 15:09:16 +01:00
Gilles Roudière 638e24684f
Fixes setting top_level not updating the global position
(cherry picked from commit 131a7b58c8)
2020-10-28 14:05:42 +01:00
Andrii Doroshenko (Xrayez) 921046c822
Add border_width to ReferenceRect
Exposes a hidden parameter behind `CanvasItem.draw_rect()`.

(cherry picked from commit aef00021a9)
2020-10-28 14:05:40 +01:00
Gabriel Van Eyck 7735cdaf8f
Fix emit_signal timing for GraphEdit's begin/end node move
(cherry picked from commit fbc095dc78)
2020-10-28 14:05:40 +01:00
Dominik 'dreamsComeTrue' Jasiński ba00ced445
TextEdit - fix valid bounds in 'set_line'. Fixes #41967
(cherry picked from commit 99c8a07919)
2020-10-28 14:05:39 +01:00
Yuri Roubinsky 374253242d [3.2] Shows ColorRect in Color constants autocompletion 2020-10-28 12:39:41 +03:00
Hugo Locurcio 3499799cb3
Improve the font oversampling warning messages to be more descriptive 2020-10-27 12:27:41 +01:00
hilfazer 6dbc08668b Move Editable Children information from scene's root to instanced nodes 2020-10-26 11:55:47 +01:00
Hugo Locurcio 2dbc329704
Add a debanding property to Viewport for GLES3
It can be enabled in the Project Settings
(`rendering/quality/filters/use_debanding`). It's disabled
by default as it has a small performance impact and can make
PNG screenshots much larger (due to how dithering works).

As a result, it should be enabled only when banding is noticeable enough.

Since debanding requires a HDR viewport to work, it's only supported
in the GLES3 backend.
2020-10-20 19:07:15 +02:00
Rémi Verschelde 150f9ce807
Merge pull request #42009 from Calinou/theme-node-type-3.2
Rename the `type` parameter to `node_type` in Theme and Control (3.2)
2020-10-20 15:58:41 +02:00
Hugo Locurcio af45c97652
Add fast approximate antialiasing (FXAA) to Viewport
This backports FXAA from the `master` branch.

Co-authored-by: Clay John <claynjohn@gmail.com>
2020-10-20 14:54:52 +02:00
Rémi Verschelde a239894827
Merge pull request #42902 from akien-mga/3.2-cherrypicks
Cherry-picks for the 3.2 branch (future 3.2.4) - 5th batch
2020-10-19 22:14:05 +02:00
Juan Linietsky 388ebfb498
Merge pull request #41629 from JFonS/disable_baked_lights
Disable lights for objects with baked lighting
2020-10-19 14:12:50 -03:00
Rémi Verschelde 4028414e0e
Revert "Made toplevel a property for Node3D and CanvasItem"
This reverts commit a726d011d5.
2020-10-19 16:58:56 +02:00
volzhs 78143ee93e
Respect Tree.set_icon_max_width size for drawing selection box
(cherry picked from commit cac4fedb2a)
2020-10-19 16:10:00 +02:00
Duroxxigar 11a07d071a
Added a more helpful error message when there is no current animation for the animation player
(cherry picked from commit 8bfeb9d6ae)
2020-10-19 16:09:58 +02:00
Dashcell c43e8d8fbd
Dropping file on parrent dirrectory fixed
(cherry picked from commit 1ac936f035)
2020-10-19 15:14:13 +02:00
Rémi Verschelde 3495cb91d8
Merge pull request #41577 from FIF15/deprecate-redundant-property-enabled-focus-mode
Deprecate Redundant property enabled_focus_mode
2020-10-19 14:15:43 +02:00
PouleyKetchoupp 5c831bc8d6 Fix mesh instance materials not initialized correctly
This fixes a regression from PR #40313 (support for software skinning in MeshInstance).

Before, the base mesh was always updated on load even if not skinning
was used, which caused mesh instance materials to be reset on the
rendering side.

Now the base mesh is set only when it has been modified, or when
switching software skinning on or off. In this case the mesh instance
materials are always updated properly afterwards.
2020-10-16 09:33:24 +02:00
FIF15 8311a37ed9 Deprecate Redundant property enabled_focus_mode
of BaseButton
see #41529 for details
this closes #41529
2020-10-16 14:14:04 +08:00
lawnjelly 0abae185c8 Change per frame software skinning check to is_visible
My mistake I missed this before the PR got merged:

is_visible_in_tree() should be avoided being called per frame unless absolutely necessary, because it is a recursive function that traverses the scene tree. It should be used when deciding on rare occasions whether to switch on or off skeleton processing, but it is better to use the cheaper is_visible() check on the per frame update.
2020-10-12 19:03:43 +01:00
JFonS fcb00ca048 Disable lights for objects with baked lighting
Don't apply lighting to objects when they have a lightmap texture and
the light is set to BAKE_ALL. This prevents applying the same direct
light twice on the same object and makes setting up scenes with mixed
lighting much easier.
2020-10-11 20:41:40 +02:00
Hugo Locurcio ad4e80f2fa
Recommend restarting after changing the reflection atlas size or HDR
This closes #42687.
2020-10-10 17:04:00 +02:00
PouleyKetchoupp f9544716f4 Option for software skinning in MeshInstance
Option in MeshInstance to enable software skinning, in order to test
against the current USE_SKELETON_SOFTWARE path which causes problems
with bad performance.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2020-10-08 16:14:55 +02:00
lolligerjoj 0586c856f6
Expose Animation::value_track_interpolate to GDscript
(cherry picked from commit ff4af94414)
2020-10-04 20:50:34 +02:00
clayjohn 89677b5b7f Use full float UVs in Sprite3D 2020-10-03 10:54:14 -07:00
Marcel Admiraal be41b818c4 Remove area or body from map before emitting signals. 2020-10-02 17:01:47 +01:00
Rémi Verschelde 10fa15a047
Better validate CollisionShape config. warning after #37226
It could cause a crash when running the test for PlaneShape.
Fixes #42479.
2020-10-02 09:51:45 +02:00
Yuri Roubinsky ec7228a675 [3.2] Optimizations for Fresnel and Texture nodes in visual shaders 2020-10-02 08:42:06 +03:00
Duroxxigar a726d011d5
Made toplevel a property for Node3D and CanvasItem
(cherry picked from commit 85a8dbb7b6)
2020-10-01 16:00:47 +02:00
Rémi Verschelde e40b4eeeea
Merge pull request #37226 from arrowinaknee/fix-node-config-warnings
[3.2] Update get_configuration_warning() overrides to retrieve warnings from parent class
2020-10-01 14:04:26 +02:00
Rémi Verschelde 9da889ff29
Merge pull request #40555 from RandomShaper/fix_debugger_autofocus_3.2
Fix debugger not getting focused on break on Windows (3.2)
2020-10-01 13:54:38 +02:00
Rémi Verschelde ef223f3aa7
Merge pull request #41185 from Chaosus/vs_uniform_ref_3.2
[3.2] Added UniformRef visual shader node
2020-10-01 13:50:08 +02:00
Danil Alexeev ebb5821bce
Improve appearance of [connection] and [editable] sections in .tscn files
(cherry picked from commit 02c0edac60)
2020-09-29 13:57:58 +02:00
Haoyu Qiu fa81e3621f
Fixes ParallaxLayer offset when ignore camera zoom
(cherry picked from commit 5e2167631b)
2020-09-29 13:57:56 +02:00
D00T24 766b637ed0
changed max point limit to 1 instead of 2
(cherry picked from commit bcc0493a4a)
2020-09-29 13:57:56 +02:00
Hugo Locurcio a4651b59fb
Add a property hint to StyleBoxFlat shadow_size for editor usability
This adds a visible range to the slider so it can be dragged more easily.

This closes #42309.

(cherry picked from commit feb4002017)
2020-09-29 08:54:45 +02:00
Danil Alexeev 44bdd8f16c
Improvement for the Copy button in the Output Log
Now if no text is selected, pressing the Copy button copies the entire text.

(cherry picked from commit fb6eb21afc)
2020-09-29 08:54:45 +02:00
clayjohn b730c5596c Restore default alpha_scissor_threshold to Sprite3D 2020-09-27 22:54:50 -07:00
Michael Alexsander 2d848227cf
Add 'get_previous_tab()' to 'Tabs'
(cherry picked from commit 2b319889cb)
2020-09-24 14:43:10 +02:00
Jonathan Vice 96ca267209
Reorder sprite h_frames & v_frames
(cherry picked from commit 28326aec60)
2020-09-24 14:43:10 +02:00
HellonLegs 9340385731
LineEdit/TextEdit: solved control + alt issue
(cherry picked from commit f412237f38)
2020-09-24 14:43:08 +02:00
booer bf9090c23f
Fixes updating CPUParticles emmision shape values
(cherry picked from commit 113921b56c)
2020-09-24 14:43:08 +02:00
Ryan Roden-Corrent c11edbdcb3
Fix hints on PhysicsMaterial bounce/friction.
These values are only meaningful in the range 0 to 1.
Make sure the editor enforces reasonable values.
Fixes #42202.

(cherry picked from commit 6c18baee9c)
2020-09-24 14:43:07 +02:00
Somnath Sarkar 1f7a3e0f8d
Sort points in a Gradient for color and offset updates.
(cherry picked from commit d5d832417e)
2020-09-24 14:43:06 +02:00
mvl be13df0a08
Fix bug where leading and trailing spaces werent taken into account with center and right allignment.
(cherry picked from commit 4318ad94ac)
2020-09-24 14:43:05 +02:00
Eric M e24b9f0520
Fixed bug where spinbox would not update to it's actual value after non-numeric input
(cherry picked from commit e76e39d5f5)
2020-09-24 12:08:10 +02:00
Zak d94323e37b
Adds automatic update for region_rect
When changing the texture region for a StyleBox, the regions was not updating automatically in the Texture editor.

(cherry picked from commit 7d7727bade)
2020-09-24 12:05:34 +02:00
Rémi Verschelde c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 14:09:51 +02:00
Hugo Locurcio 369e5a7f35
Mark InterpolatedCamera as deprecated
InterpolatedCamera has already been removed from the `master` branch.
This adds a deprecation notice to inform people about the upcoming removal
in Godot 4.0.

Its functionality could be replicated in a GDScript add-on with relative
ease.
2020-09-16 15:36:40 +02:00
clayjohn a4f2fea2ae Fix axis bug regression in Sprite3D 2020-09-15 08:02:19 -07:00
Hugo Locurcio e36587751f
Rename the type parameter to node_type in Theme and Control
This makes it clearer that it expects a node type as a string (such as "Label")
instead of a type like "TYPE_ARRAY". This is backwards-compatible since only
the name of the parameter is changed, not its order.

See https://github.com/godotengine/godot-proposals/issues/1495#issuecomment-691507839
2020-09-12 18:42:45 +02:00
Wilson E. Alvarez 2b7c9d9070
Disconnect item_rect_changed when removing a child of GraphEdit 2020-09-11 17:36:55 -04:00
PouleyKetchoupp 819765130d
Fix RichTextLabel alignment for clickable regions
Fixes #41006 (regression from #39164).

The original alignment fix was limited to PROCESS_DRAW mode, which
caused some discrepancies with PROCESS_POINTER mode.
Now only PROCESS_CACHE is excluded with a condition a few lines above.

(cherry picked from commit b783fa1416)
2020-09-11 11:15:40 +02:00
Rémi Verschelde 4a9264271d
doc: Sync classref with current source 2020-09-08 14:20:53 +02:00
Marcel Admiraal f26131fca5
Check if old mouse column is still available.
(cherry picked from commit 79802b31a9)
2020-09-08 13:39:32 +02:00
PouleyKetchoupp c21d14fe69
Fix LineEdit not consuming enter events
LineEdit should not return early when processing KEY_ENTER, so it can
consume the event properly.

Regression introduced by mistake while fixing enter events for Android
(PR #40487 - c0b394572f)

(cherry picked from commit 5c63dec36e)
2020-09-08 13:38:58 +02:00
Rémi Verschelde 3f276033c1
Merge pull request #41536 from Chaosus/vs_fix_specular_3.2
[3.2] Fix specular render_mode for visual shaders
2020-09-08 09:46:12 +02:00
Fredia Huya-Kouadio 0af5cded1e Fix the update logic for user-added custom defines.
The previous logic was causing the (unintentional) removal of custom defines automatically added by the engine.
2020-09-06 21:31:09 -07:00
Rémi Verschelde 8a66ea7cb0
Revert "Updated LineEdit to address #41278"
This reverts commit 1b6d116dfb.
2020-09-01 14:01:50 +02:00
Tony-Goat 1b6d116dfb
Updated LineEdit to address #41278
Updated set_max_length() function to actually pull a substring of the current text so it's not all thrown away when the new max length is shorter than the current length.

(cherry picked from commit 71febfd6e2)
2020-08-31 15:53:56 +02:00
Andrii Doroshenko (Xrayez) 7493bc5530
Make AnimatedTexture.MAX_FRAMES public
The constant is already exposed in GDScript, but not in C++.
This information is useful for implementing animated texture
resource importers via modules.

(cherry picked from commit 528056a3c5)
2020-08-31 15:29:43 +02:00
Yuri Roubinsky 7facd00ace [3.2] Fix specular render_mode for visual shaders 2020-08-28 13:06:55 +03:00
Rémi Verschelde 2d42625184
Revert "bug with Tween.is_active, fixes #39760"
This reverts commit 8ef40b9306.
2020-08-25 12:58:40 +02:00
PouleyKetchoupp d82cc621e1
Fix 2D Particle velocity with directed emission mask
Changed CPU velocity calculation for EMISSION_SHAPE_DIRECTED_POINTS
to follow the same logic as in the GPU version:
mat2 rotm;
rotm[0] = texelFetch(emission_texture_normal, emission_tex_ofs, 0).xy;
rotm[1] = rotm[0].yx * vec2(1.0, -1.0);
VELOCITY.xy = rotm * VELOCITY.xy;

Now both CPUParticles2D & CPUParticles3D (z disabled) show the same results
as their GPU counterparts and take the initial velocity settings into account.

(cherry picked from commit 1c231cacb3)
2020-08-21 02:28:19 +02:00
Rémi Verschelde a6ef6b10b2 Revert "Fixes the get_visible_line_count() of rich text label"
This reverts commit dc7e9d46e6.
2020-08-17 11:21:36 +02:00
Cheeseness e70b165c61 Skip indentation of empty lines when indenting a selection.
(cherry picked from commit 1f159306ed)
2020-08-17 11:04:36 +02:00
Rémi Verschelde 5acc78ac81
Merge pull request #41314 from clayjohn/Sprite3D-uvs
Check for uncompressed uvs in Sprite3D
2020-08-17 08:44:51 +02:00
clayjohn d33a9aaacb Check for uncompressed uvs in Sprite3D 2020-08-16 19:19:14 -07:00
Tomasz Chabora 7ce476c425 Expose NOTIFICATION_POST_ENTER_TREE
(cherry picked from commit 677796a2c3)
2020-08-14 00:32:05 +02:00
Umang Kalra 330afdd6cb Fix RichTextLabel center alignment bug
Fixes #40207.

(cherry picked from commit cec21ab82c)
2020-08-14 00:32:05 +02:00
Yuri Roubinsky d0c705781c [3.2] Added UniformRef visual shader node 2020-08-11 15:04:06 +03:00
Martin Capitanio 71bad8dba6 Add option to disable virtual keyboard for TextEdit
Adding support for disabling virtual keyboard on mobile platforms, in
order to make it consistent with LineEdit.

It allows implementing a custom virtual keyboard.

See: https://github.com/godotengine/godot/pull/41139
2020-08-09 18:22:11 +02:00
ConorLPBoyle ba3f0fa971 Fixed reload_goal not being called when SkeletonIK3D::start is invoked with p_one_time = true
(cherry picked from commit fa4d9c9446)
2020-07-28 11:28:34 +02:00
Tomasz Chabora cd01cda143 Fix ultra long node names
(cherry picked from commit d3f2062d86)
2020-07-28 00:43:37 +02:00
Daniel Ting 6f71bc2a06 Evenly distribute stretched Nodes in BoxContainer
Add any leftover fractional pixels to an error accumulator. When the
accumulator is greater or equal to one, add one pixel to the current
Node's size and subtract one from the accumulator.

Closes #36522

(cherry picked from commit 04ea6ec88d)
2020-07-28 00:39:21 +02:00
Rémi Verschelde a2edf04fd2
Merge pull request #40469 from nekomatata/virtual-keyboard-enter-fixes-3.2
[3.2] Fix Return key events in LineEdit & TextEdit on Android
2020-07-26 20:26:02 +02:00
Tomasz Chabora 307bac0757 Keep transition value when replacing key
(cherry picked from commit e1a1bb0a6e)
2020-07-24 10:31:57 +02:00
PouleyKetchoupp 930c880fa6 Add option to disable virtual keyboard for LineEdit
Co-authored-by: Alexander Holland <alexander.holland@live.de>
(cherry picked from commit 0aa56e3ab8)
2020-07-24 10:31:57 +02:00
Tomasz Chabora e511e0f16a Prevent infinite loop in Tree incremental search
(cherry picked from commit c0479496fa)
2020-07-24 10:31:57 +02:00
Umang Kalra dc7e9d46e6 Fixes the get_visible_line_count() of rich text label
(cherry picked from commit bd32c273ff)
2020-07-24 10:31:56 +02:00
Chistpohe LY 8ef40b9306 bug with Tween.is_active, fixes #39760
(cherry picked from commit d60617de10)
2020-07-24 10:31:56 +02:00
Rémi Verschelde 7b4b83e9dc
Merge pull request #39817 from yrk06/ExposeInertiaTensor
Added Rigid Body Method "get_inverse_inertia_tensor"
2020-07-21 16:50:56 +02:00
clayjohn fb4e55bb7a Pass Sprite3D AABBs to VisualServer 2020-07-20 20:22:12 -07:00
Pedro J. Estébanez 633b75c9e1 Fix debugger not getting focused on break on Windows
This is a revert of 9d78274e06, which was an attempt to fix #21431, but in the end it seems a different problem was the root of the issue.

Renewing focus steal allowance every time is needed on Windows.
2020-07-21 01:09:17 +02:00
Pedro J. Estébanez 06904ac215 Add DynamicFont::get_available_chars() 2020-07-20 17:45:04 +02:00
Yerik d09b16512b Added Method get_inverse_inertia_tensor 2020-07-19 13:51:32 -03:00
PouleyKetchoupp c0b394572f Fix Return key events in LineEdit & TextEdit on Android
Depending on the device implementation, editor actions could be
received with different action ids or not at all for multi-line.

Added a parameter to virtual keyboards to properly handle single-line
and multi-line cases in all situations.

Single-line:
Input type set to text without multiline to make sure actions are sent.
IME options are set to DONE action to force action id consistency.

Multi-line:
Input type set to text and multiline to make sure enter triggers new lines.
Actions are disabled by the multiline flag, so '\n' characters are
handled in text changed callbacks.
2020-07-17 18:25:40 +02:00
Juan Linietsky ceeb690476 Properly pass safe margin on initialization.
Fixes jitter.

(cherry picked from commit 13e0385702)
2020-07-15 12:48:18 +02:00
Patrick Dawson 8218170b3c Avoid overflow when calculating visible_cells
(cherry picked from commit 9e28df22a0)
2020-07-15 12:11:31 +02:00
Rémi Verschelde 37100384c3
Merge pull request #40300 from 0xafbf/fix-parent-check
Fix parent check for add_child_below_node
2020-07-14 09:14:28 +02:00
Maganty Rushyendra e76a9a51df Emit signals for GraphEdit multi-node selection and unselection
Emit `node_selected` and `node_deselected` signals where appropriate
when selecting or unselecting multiple GraphEdit nodes at once.

(cherry picked from commit c1d5c7727c)
2020-07-13 15:12:50 +02:00
ArrowInAKnee e48430b1d4 Make all get_configuration_warning() overrides retrieve warnings from parent 2020-07-13 01:50:02 +03:00
Andrés Botero 6b05f8f602 Fix parent check for add_child_below_node 2020-07-11 15:57:17 -05:00
Maganty Rushyendra 76a43c93cd Fix repeated updates of PathFollow3D Transform
Add optional parameter to specify whether applying rotation to the
PathFollow3D's Transform is necessary, preventing erroneous updates.

(cherry picked from commit be3a1769fe)
2020-07-10 10:59:24 +02:00
Rémi Verschelde 1f886d1f31
Merge pull request #39867 from clayjohn/Sprite3D-mesh
Use mesh instead of immediate for drawing Sprite3D
2020-07-06 16:36:27 +02:00
Rémi Verschelde 3a916152d8
Merge pull request #39803 from TwistedTwigleg/3.2.skeleton_ik_scale_fix
[3.2] Fixed SkeletonIK not working with scaled skeletons
2020-07-06 16:16:57 +02:00
Andrii Doroshenko (Xrayez) 41f99c8f53 Provide warning when using polygon shapes in CollisionShape2D node
`ConvexPolygonShape2D` and `ConcavePolygonShape2D` are only meant to be
used directly in code and not in the editor for physics-based use cases
specifically.

Developers are advised to use `CollisionPolygon2D` instead, which does
generate those shapes under the hood, handling polygon convexivity,
proper orientation etc.

(cherry picked from commit dc446203be)
2020-07-06 14:16:28 +02:00
Rémi Verschelde 037571d08e
Merge pull request #40087 from akien-mga/3.2-cherrypicks
Cherry-picks for the 3.2 branch (future 3.2.3) - 1st batch
2020-07-04 01:37:52 +02:00
clayjohn 6c0ff26f35 Use mesh instead of immediate for drawing Sprite3D 2020-07-03 12:19:26 -06:00
lrgilbert c0db0749f7 Fixed separation of ports on GraphNode
Fixes #32474.

(cherry picked from commit 47c929c972)
2020-07-03 15:34:30 +02:00
PouleyKetchoupp d6b23306c8 Fix RichTextLabel fill alignment regression
Fixes #40068 (regression from #39164) by not applying the line offset
change in the case of fill alignment mode.

(cherry picked from commit 44f88999c7)
2020-07-03 15:34:30 +02:00
Pedro J. Estébanez a235bab96c Ignore blend times for inexistent animations
(cherry picked from commit fdf1977e8f)
2020-07-03 15:34:30 +02:00
Rémi Verschelde d004188348 Environment: Fix glow hdr bleed scale being unused
The glow hdr bleed threshold was passed in its stead.

Fixed in master too with #40016.
2020-07-03 14:27:42 +02:00
Michael Alexsander 32c154d297 Fix Tree's 'scroll_to_item()' not working correctly on some cases
(cherry picked from commit 144a4cc39f)
2020-07-03 13:17:57 +02:00
Hugo Locurcio 89421c58cd Write "Aces" tonemapping in uppercase as it's an acronym
(cherry picked from commit a31fc59ff3)
2020-07-03 13:17:57 +02:00
lordkettune c68ef4d754 Fix issues with custom tracks on reimport
(cherry picked from commit 4313a7bdc8)
2020-07-03 13:17:57 +02:00
Mark Kuo 46590fa3b0 VideoPlayer: fix possible race condition
In set_stream() we write to 'playback' while accessing the same object
in _mix_audio() in audio thread. Protect the 'write' part in
set_stream() to avoid possible crash in _mix_audio() function.

(cherry picked from commit e435d57758)
2020-07-03 13:17:57 +02:00
Thakee Nathees 3a08658881 animation autocomplete bug fixed
(cherry picked from commit b07e788ad9)
2020-07-03 13:17:57 +02:00
Haoyu Qiu 38509f1a89 Prevent dragging from SceneTree buttons
(cherry picked from commit 45d0799b5b)
2020-07-03 13:17:57 +02:00
PouleyKetchoupp 83e376e731 Format remote printerr properly in script debugger output
Fixes #33324
2020-07-02 17:43:37 +02:00
TwistedTwigleg 3dc466b244 Fixed issue where the SkeletonIK node would incorrectly scale bones in the IK chain 2020-07-01 11:16:25 -04:00
Adam Reichold f06fc1fdf4 Call Spatial::get_global_transform and Vector3::dot only once within Camera::is_position_behind to avoid redundant work.
(cherry picked from commit b2a204799a)
2020-06-29 10:48:45 +02:00
Stijn Hinlopen 65155c2855 No longer scroll vertically when scrollbars are unavailable
(cherry picked from commit 5f7499beac)
2020-06-29 10:47:43 +02:00
Pedro J. Estébanez 0f0360702b Handle gone TabContainer popup nicely 2020-06-24 19:31:26 +02:00
Rémi Verschelde 571a0c60c0 Revert "Implement Skew in Node2D"
This reverts commit 7f61710183.

See #38868, in its current implementation a small skew value might end up
serialized to scene files due to floating point precision errors, which is
detrimental to VCS.

This can be cherry-picked anew once a fix for #38868 has been found.
2020-06-22 10:26:06 +02:00
Marcel Admiraal b006f5402d Check for motion in cast_motion() before doing Bullet convexSweepTest().
Also ensure that default closest_safe and closest_unsafe values are
defined in cast_motion() and before cast_motion() is called.
2020-06-21 16:28:01 +01:00
PouleyKetchoupp b3af0b2a39 Option in RichTextLabel for height to fit content
(cherry picked from commit ad8081216c)
2020-06-19 16:17:27 +02:00
Andy Maloney 5bbb15418f [3.2][macOS] Command-backspace in line edit
Make command-backspace in line edit work like other macOS applications.

If there is a selection, command-backspace deletes the selection.

If there isn't a selection, command-backspace deletes from the cursor to the beginning of the line edit.

This addresses part of godotengine/godot#23548
2020-06-18 17:42:51 -04:00
Andrii Doroshenko (Xrayez) 5084043373 Bind Shape2D draw method
(cherry picked from commit 430d1fd795)
2020-06-18 10:51:44 +02:00
Marcel Admiraal ea4ee986b5 Normalise p_up_direction vector in move_and_slide() and
move_and_slide_with_snap() and fix tolerance in
move_and_slide_with_snap() max floor angle.
2020-06-16 10:11:54 +01:00
Rémi Verschelde 2e8480d56a
Merge pull request #39571 from Chaosus/fix_vs
[3.2] Use path instead classname to prevent errors for exported visual shaders
2020-06-16 09:33:15 +02:00
Yuri Roubinsky 87ebc29d8e Use path instead classname to prevent errors for exported visual shaders 2020-06-15 21:33:32 +03:00
Ranoller 616fb219db
(3.2) Fix bad position in Camera2D offset and camera rotation if smothing enabled
Fix https://github.com/godotengine/godot/issues/16323 in 3.2 branch. Apply same solution of https://github.com/godotengine/godot/issues/2074 in rotation and offset.
2020-06-15 16:34:03 +02:00
Umang Kalra 1d0c39e395 Fixes the stopping of animation effects in bbcode after appending
(cherry picked from commit 88b30a29bf)
2020-06-15 14:34:35 +02:00
Lisandro Lorea cb119e349a Fix TabContainer emitting spurious tab_selected signals when a theme is changed
- The repaint code was moved outside of set_current_tab() and to a "_repaint()" private function
- _on_theme_changed() will now only call _repaint() and update()
This means _on_theme_changed() will do only what it needs (repainting the TabContainer to account for the new theme)

fixes #39498

(cherry picked from commit 5123006f06)
2020-06-15 14:34:35 +02:00
Tomasz Chabora 2f04896b0e Re-enable scroll follow on RichTextLabel clear
(cherry picked from commit 46fd51056a)
2020-06-15 14:34:35 +02:00
Thibault Truffert 24b3bf0637 Make text deletion methods public for LineEdit
(cherry picked from commit 2bb44ea5bd)
2020-06-11 09:42:23 +02:00
Maganty Rushyendra 0df5d74e6e Fix signal duplication bug when duplicating node with instanced children
Change error checking in `duplicate_signals()` to check for path to
`p_original`, thus adhering to the method used in `duplicate`, instead
of checking for ownership.
2020-06-11 09:37:47 +08:00
Rémi Verschelde 7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Michael Alexsander 2652a2d184 Add generic file icon and its modulation to the 'FileDialog'
(cherry picked from commit 637927f803)
2020-06-10 15:30:52 +02:00
Rémi Verschelde f3fcdfbdd0 PackedScene: Prevent crash when root node has parent attribute
The crash happens further down when setting an invalid owner in
`Node::_set_owner_nocheck` but I couldn't figure out how to fix it.

But here the proper fix is to catch the invalid scene file early on
and fail loading it.

Part of #17372.

(cherry picked from commit c080ec5da2)
2020-06-10 15:30:52 +02:00
Giuliano Barberi 221051d523 Tree: Calling update in _gui_input less frequently
(cherry picked from commit d443a13244)
2020-06-10 15:30:51 +02:00
Tomasz Chabora e94aab7936 Restore capture caches when missing
(cherry picked from commit 642d91381a)
2020-06-10 15:30:51 +02:00
Marcus Brummer ae67ec3ece Set "shader_param/" prefix in Shader::has_param()
(cherry picked from commit ffbb211bbe)
2020-06-05 12:47:01 +02:00
Hugo Locurcio 61da4882aa Add performance hints to the DirectionalLight shadow mode property hint
This also clarifies some parts in the DirectionalLight documentation.

(cherry picked from commit b46756c723)
2020-06-04 12:16:39 +02:00
Umang Kalra c1f6854ada Fixes the right and center alignment bug of rich text label
(cherry picked from commit b2a32d007d)
2020-06-04 12:09:40 +02:00
Hugo Locurcio d56b9d5ebf Disable antialiasing on the DynamicFont outline as well when requested
This partially addresses
https://github.com/godotengine/godot-proposals/issues/943.

(cherry picked from commit 2919fc7317)
2020-06-04 12:09:40 +02:00
Maganty Rushyendra 25af738762 Expose get_char_size() from Font instead of BitmapFont
`get_char_size()` is a public virtual function defined in the `Font`
class. Implementations exist for both `BitmapFont` and `Dynamic Font`.
However, it was only exposed to the GDScript API through the Bitmap
Font, and not for Dynamic Font.

This commit exposes the function through `Font` instead.

Fixes #23967

(cherry picked from commit a4413710f9)
2020-06-04 12:09:39 +02:00
Dominik 'dreamsComeTrue' Jasiński d15e9c2126 Allow scroll_to_line when scroll_active is 'false'
Fix #36134

(cherry picked from commit 8f11a91917)
2020-06-04 12:09:39 +02:00
Thakee Nathees 25ed0d4366 colorpicker margin bug fixed
(cherry picked from commit 9d224ac429)
2020-06-04 11:14:16 +02:00
PouleyKetchoupp 719369c71b Fix resource preview in remote inspector
The specific case for object reference seems unnecessary, as `RES res = var`
already does the work. The case where REF is invalid is never hit in the case
of already freed objects.

The assignment `res = *r` was causing the resource to be always invalidated
on the 3.2 branch.

(cherry picked from commit 12685df423)
2020-05-25 11:46:51 +02:00
Marcel Admiraal dac3504cc3 Fix C4724: potential mod by 0 warnings. 2020-05-21 11:28:01 +01:00
SkyJJ 2197ef0566 Fix Android LineEdit editing bugs
(cherry picked from commit cc473b948f)
2020-05-20 12:07:08 +02:00
Rémi Verschelde f390749439 Fix Visual Studio C4724 warning (potential mod by 0) 2020-05-19 11:09:28 +02:00
Marcus Brummer 4779d289d5 Fixed text editor drawing if smooth scrolling is disabled.
Fixes #38778

(cherry picked from commit b048eb05ad)
2020-05-18 16:40:33 +02:00
smartin015 8cab02ec06 Remove get_local_mouse_position() hack in GraphEdit
(cherry picked from commit 00457c68bc)
2020-05-18 16:40:33 +02:00
Fredia Huya-Kouadio 4db8ade565 Remove the custom_defines section from the editor 2020-05-18 01:07:38 -07:00
etienne.frank 46327d48a2 Fix minimap selection offset
The minimap selection was shifted of 1 line too late.

(cherry picked from commit 72ab355945)
2020-05-13 16:10:12 +02:00
Eduardo Nunes Pereira 55ab98233a Using the common behaviour when use command+shift on text line for osx
* On press left+command+shift or right+command+shift it should behave like shift+home or shift+end and select the text
* Using home and end events as reference

(cherry picked from commit d8f8a3c606)
2020-05-11 11:13:22 +02:00
Thakee Nathees 7bc293b081 Fix: printing empty string does nothing in editor output pannel
Fix: #38490
(cherry picked from commit 5640cad1e1)
2020-05-11 11:02:53 +02:00
Marcel Admiraal 4c9ccffad2 Prevent CapsuleShape2D height from being less than zero.
(cherry picked from commit 68eaaa6d6b)
2020-05-11 11:01:13 +02:00
Tomasz Chabora 0200db15cc Fix VisibilityEnabler2D behavior on start
(cherry picked from commit d0c5d91032)
2020-05-11 10:33:38 +02:00
janglee d16abbdee4 Improved go-to definition (Ctrl + Click)
Co-Authored-By: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
(cherry picked from commit be7a353c70)
2020-05-11 09:33:21 +05:30
Mateo Kuruk Miccino 1cba7fb180 GUI: Touch screen button click area now is synced with its draw 2020-05-07 11:04:59 -03:00
Thakee Nathees 1a39b4ea22 method bind TextEdit::set_line() added
(cherry picked from commit b9acf1cedf)
2020-05-07 13:43:43 +02:00
hoontee 159992f663 Fix bug with AudioStreamPlayer3D audio position
Applies 0c78a58b64 to `AudioStreamPlayer3D::play`.

(cherry picked from commit 330bd686ab)
2020-05-07 13:37:06 +02:00
nobuyuki_nyuu 12386a2d80 PopupMenu.get_current_index() bound to ClassDB
(cherry picked from commit 35f30086de)
2020-05-07 13:36:53 +02:00
Stanislav Labzyuk e3712cf689 Bind set_suffix/get_suffix in Tree
(cherry picked from commit ac8814624d)
2020-05-06 23:31:02 +02:00
Eric M b7fbdf4bed Updated editor spin slider to have better behaviour and adjusted control's size_flags_stretch_ratio value range
(cherry picked from commit 915ab50673)
2020-05-06 23:30:28 +02:00
Thakee Nathees a5a28239a6 Fix: Tween always return true for _get(), _set()
(cherry picked from commit 2811268231)
2020-05-06 23:29:45 +02:00
Yuri Roubinsky 1f89c3bfeb (3.2) Some fixes for canvas item visual shader inputs 2020-05-05 12:21:25 +03:00
Rémi Verschelde f629df647d Revert "Emit signal when animation ends by seek"
This reverts commit bf1cc116e1.

This needs more discussion to avoid breaking some users' expectations.
See #38086 for arguments.

(cherry picked from commit 69f36cea8c)
2020-05-04 16:10:32 +02:00
Juan Linietsky 7f61710183 Implement Skew in Node2D
Skew is x-axis only, because it must be bidirectionally convertible to a 2x3 matrix, but you can subtract it  to the rotation to get the effect on y-axis

(cherry picked from commit efb1f7d76b)
2020-05-04 16:10:22 +02:00
Thomas Riedmair 7e669123f9 Fix performance issue in update_bitmask_region fallback
(cherry picked from commit e0f084b924)
2020-05-04 16:10:22 +02:00
Bastiaan Olij 02b1a5de47 Added missing spring enums for generic_6dof_joint
(cherry picked from commit 45d1f41837)
2020-05-04 16:10:22 +02:00
jitspoe e0be022b1e Fix custom w component being uninitialized on CPU particles.
(cherry picked from commit 38085f2f6982c491935a434bb45e358dbebe1714)
(cherry picked from commit b9c280b73ff6a13ea490d2da0f2728bcef3038dc)
(cherry picked from commit 895ed2aed7)
2020-05-04 16:10:22 +02:00
Pedro J. Estébanez d8be5a9986 Add MODULATE builtin to canvas item shaders 2020-05-04 00:10:24 +02:00
Rémi Verschelde 8426ed2650
Merge pull request #38378 from lawnjelly/kessel_ios_particle
Fix uninitialized memory in CPUParticles2D
2020-05-01 15:17:06 +02:00
lawnjelly 9af4c09d1b Fix uninitialized memory in CPUParticles2D
Calls to set_amount can increase the size of the particle array, but do not zero the memory, they only set the active flag to false. This uninitialized memory can be sent to the GPU, possibly as NaNs.
2020-05-01 13:49:53 +01:00
Revan Ji 6a7d50403a Add set_frame, pause, and oneshot to AnimatedTexture
Add API documentation for said changes.

(cherry picked from commit f5029e18ca)
2020-05-01 11:00:10 +02:00
Darenn 3c26de316e Fixed bbcode parsing for built-in RichTextEffects in RichTextLabel
RichTextEffect can now have a bbcode string starting like one of the built-in.
It was impossible before as the built-in would take precedence over the custom effect that has the same bbcode start.

Example : [fade] would take precedence over [fade_in]
(cherry picked from commit b4e3042cba)
2020-05-01 10:57:00 +02:00
Sam 68b968ff6c Resets global pose of IK chain bones being solved, rather than the whole skeleton. Resolves #38026
(cherry picked from commit e321d38c0e)
2020-05-01 10:56:58 +02:00
Bojidar Marinov 4b58d453d4 Expose the cell_size affecting VisibilityNotifier2D precision
Refs: #4803
(cherry picked from commit d49ff7aff7)
2020-05-01 10:56:58 +02:00
John Wigg ee8b3bef2d Limit undo stack size
The stack size of the undo history of a TextEdit was not limited leading
to potential memory leaks when doing lots of operations on a TextEdit.

This commit adds the option gui/common/text_edit_undo_stack_max_size
to the project settings. The first element of the undo stack is popped
if the stack's size exceeds this value ensuring limited memory usage.

The default stack size setting is 1024.

Fixes #37838.

(cherry picked from commit 4a82390aaf)
2020-05-01 10:56:58 +02:00
Andrea Catania b7dace75c7 Make softbody completelly stiff to attachment point
(cherry picked from commit ca7ee56759)
2020-05-01 10:56:57 +02:00
Rémi Verschelde a9def52225
Merge pull request #38156 from Calinou/tweak-ssao-property-hints-3.2
Tweak SSAO property hints to allow setting more precise values (3.2)
2020-04-25 12:55:33 +02:00
Hugo Locurcio 464fe67e96
Tweak SSAO property hints to allow setting more precise values
This was requested by an user on Twitter who was working on a game with a very small-scale world.
2020-04-23 21:59:53 +02:00
Pedro J. Estébanez 07c4dc1b30 Avoid invocation to Object's copy constructor
Needed for the next commit. That's the only place in all the Godot code base
where that's attempted and it's not needed because Objects are not meant to
be copied that way.
2020-04-23 12:44:47 +02:00
volzhs f670f6e351 Emit signal when animation ends by seek
(cherry picked from commit bf1cc116e1)
2020-04-23 11:11:13 +02:00
Andrea Catania 4a6f2b8af6 Activate Physics Process in SpringArm3D.
(cherry picked from commit 152303bf51)
2020-04-20 11:51:30 +02:00
Rémi Verschelde 008e0748c1
Merge pull request #37349 from lawnjelly/kessel32_1
GLES2 2d Batch rendering (across items)
2020-04-17 12:55:33 +02:00
asheraryam 93f7e8d8fc Add "node_unselected" signal for GraphEdit 2020-04-16 16:56:58 +03:00
Michael Alexsander b4429c325a Fix incorrect TabContainer documentation for 'get_tab_control()'
(cherry picked from commit 8f925b1970)
2020-04-16 12:57:22 +02:00
Dominik 'dreamsComeTrue' Jasiński 5fdecebee1 Calculate strike-through position correctly
Fixes: #37637
(cherry picked from commit 06a79f260c)
2020-04-16 12:57:22 +02:00
Marcel Admiraal 103278d84b Run SpringArm3D's process within physics.
(cherry picked from commit 188bb6f867)
2020-04-16 12:57:22 +02:00
lawnjelly b6d652367b Items and draw calls added to IDE Monitor in '2d' section
This adds 2 new values (items and draw calls) to the performance monitor in a '2d' section, rather than reusing the 3d values in the 'raster' section.

This makes it far easier to optimize games to minimize drawcalls.
2020-04-16 11:52:22 +01:00
theludovyc 58fcbc2b06 Remove unused ofs variable
(cherry picked from commit 875c994109)
2020-04-16 12:47:18 +02:00
Guilherme Felipe ddde3819d6 Fix TextureRect::flip_* when used with atlas texture
Fix #37526

(cherry picked from commit fb2d2dd5d0)
2020-04-16 12:47:18 +02:00
PouleyKetchoupp 18c5ef5473 Add style for highlighted Slider grab area
(cherry picked from commit 4c8173af0f)
2020-04-16 12:47:17 +02:00
SkyJJ 92df8cc83a Fix profiler frame number stops updating when window is minimized
(cherry picked from commit c1ee20a05d)
2020-04-16 12:01:52 +02:00
Leleat 8da00fbfc7 fixed PopupMenus letterjumping on any InputEvent
(cherry picked from commit 8a5660f3d1)
2020-04-16 11:58:14 +02:00
MickeMakaron e3ca6d87ad Handle huge offset values in Path2D and Path3D set_offset
(cherry picked from commit 2edb59ec88)
2020-04-16 11:45:40 +02:00
Zak Grumbles 5d9108c9c6 Fix OptionButton docs godotengine#36803
* item_selected and item_focused docs incorrectly had 'id' as the parameter. Changed to
'index'.
* Fix parameter name in ADD_SIGNAL callin code.

(cherry picked from commit a8de034f78)
2020-04-16 11:45:19 +02:00
Thakee Nathees 324213a6db fix project manager don't consume Enter key #17620
(cherry picked from commit b98153886f)
2020-04-16 11:44:44 +02:00
Waridley 219ce2f149 Fix volume interpolation in positional audio nodes
Fixes #22016

(cherry picked from commit ff1fbd2bc5)
2020-04-16 11:43:58 +02:00
janglee e1ca49b4b6 Corrected text selection in color picker
Fixes #35603

(cherry picked from commit 77b70aa79d)
2020-04-16 11:43:35 +02:00
Andrea Catania a51e78528f Fixed IK rotation issue
(cherry picked from commit 277696d6c5)
2020-04-16 11:42:07 +02:00
qarmin 57952d562c Fixes leak with drives [3.2] 2020-04-12 14:05:47 +02:00
Eoin O'Neill c18381119e Correction to RichTextLabel Tabulation
Correct backtrack assignment to prevent excessive tabulation. Worth
noting that tabulation is treated differently in RichTextLabel because
of custom user-asignable tab variable which creates problems with
dynamic fonts specifically.

(cherry picked from commit 2000e110a9)
2020-04-06 18:19:14 +02:00
Gil Arasa Verge f144ec9e67 Clicking backgrd. dimming of editor popup stops input event propagation
A click on the dimmed background of a popup in the editor should stop the input event from propagating to the background.

This solution reuses the system introduced in commit efc3ffb8, taking advantage of the hide() notifications from the modal where we will set the flag "pass_on_modal_close_click(false)" to stop event handling at the viewport input event handling.
The viewport first hides the modal and after marks the input as handled if the flag mentioned above is set.

Fixes #36341

(cherry picked from commit 35bc88ca34)
2020-03-25 11:38:54 +01:00
Andrea Catania e30a0a30b6 Added new method to replace an already added node to the animation state machine
(cherry picked from commit 422926cfc6)
2020-03-25 11:38:54 +01:00
nathanwfranke b95a2306db Fix tab container too large when tabs are hidden
(cherry picked from commit c0a84f747e)
2020-03-25 11:38:54 +01:00
Rémi Verschelde acd14e645a Remove unused classes and stray headers
Found by reviewing headers with 1 or less matching includes:
```
find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers
for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes
```

(cherry picked from commit 9d24541597)
2020-03-25 11:38:54 +01:00
Dominik 'dreamsComeTrue' Jasiński e97d9c7bfc Remove unreferenced & undocumented class Space2D
(cherry picked from commit f530c38174)
2020-03-25 11:38:54 +01:00
Rémi Verschelde 86ecefa1a2 Fix potential divisions by 0 reported by MSVC
The `TextEdit` one was indeed a potential bug.
The `PCKPacker` one seems to be a false positive, it's already in a
`for` loop that depends on `files.size()`.

(cherry picked from commit ca4e4506db)
2020-03-25 11:38:54 +01:00
Tomasz Chabora c8318012a8 Make search in RichTextLabel case-insensitive
(cherry picked from commit b3f83ac115)
2020-03-25 11:38:53 +01:00
Rasmus Vermeulen 5c64458d9e Add size warning to Viewport Node
(cherry picked from commits 855f4dc193
and 760095e28d)
2020-03-25 11:38:53 +01:00
Tomasz Chabora 8fd7efef84 Fix visibility enabler flag toggling
(cherry picked from commit 2ccd1a7805)
2020-03-25 11:38:53 +01:00
simpuid 223d0abd7e Remove update condition from LineEdit::update_placeholder_width
Placeholder with length greater than `max_length` are allowed, so there is no reason for those update condition.
It fixes the odd alignment of placeholder when it's length is greater than `max_length`

(cherry picked from commit 43b2f75d64)
2020-03-25 11:38:53 +01:00
Darren Kaste 53c8d8a5fb Use LineEdit secret character width everywhere
(cherry picked from commit c7c47410aa)
2020-03-25 11:38:53 +01:00
Darren Kaste f657614760 Calculate LineEdit selection with secret character
(cherry picked from commit 395a038c85)
2020-03-25 11:38:53 +01:00
Ev1lbl0w b9b53966a3 Fix divison by zero issue
(cherry picked from commit 380b8039ec)
2020-03-25 11:38:53 +01:00
lupoDharkael 536c2fc0c0 Loop over faces in create_trimesh_shape()
(cherry picked from commit ee0262977e)
2020-03-25 11:38:53 +01:00
Dominik 'dreamsComeTrue' Jasiński e590a33d45 Allow single quotes in comments
Fixes: #36638
(cherry picked from commit ab6456d1bc)
2020-03-25 09:45:08 +01:00
Rémi Verschelde cc70b2fa0a
Merge pull request #36342 from m4gr3d/external_texture_support_for_godot_3_2
Add support for opengl external textures
2020-03-17 16:29:14 +01:00
Rémi Verschelde c01e840f03
Merge pull request #36639 from RandomShaper/imvu/improve_drives_ux_3.2
Improve UX of drive letters (3.2)
2020-03-17 16:27:33 +01:00
Pedro J. Estébanez 6105dfdac9 Improve UX of drive letters
Namely, move the drive dropdown to just the left of the path text box and don't include the former
in the latter.

This improves the UX on Windows.

In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its
dropdown is kept at the original location.
2020-03-17 14:48:54 +01:00
Pierre Caye 5062d7499f Add a new configuration warning to CollisionShape
In the case where a ConcavePolygonShape is used as a shape for a RigidBody
in another mode than static, a configuration warning will appear in the
editor.

(cherry picked from commit ad227d9a85)
2020-03-06 23:51:26 +01:00
fhuya 30d738eda7 Add support for opengl external textures as defined by https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt 2020-03-05 13:09:49 -08:00
Fabio Alessandrelli e92669654a Fix debugger crash inspecting freed object.
This seems to be the correct way to validate a reference.
Why is cast_to failing?

(cherry picked from commit d8ba07ea8f)
2020-03-04 12:40:14 +01:00
Juan Linietsky 03c8e12d54 Add support for named binds in Skin.
Helps better reutilization of skeletons from Maya exported files.

(cherry picked from commit 9a34f39d32)
2020-03-04 12:40:14 +01:00
janglee ffea9fc39f Added tween support for Rect2
Fixes #34575

(cherry picked from commit 4bbe87abb7)
2020-03-04 12:40:14 +01:00
Hugo Locurcio b80190721b Allow using MeshLibrary.get_item_preview() in non-editor builds again
This closes #36268.

(cherry picked from commit 64fac9dd5d)
2020-03-04 12:40:13 +01:00
Dominik 'dreamsComeTrue' Jasiński f328ac36d6 Fix: auto brace complete for quoted strings
Fixes #36002

(cherry picked from commit 6a404a88e4)
2020-03-04 09:53:44 +01:00
Eevee e70e0d24d9 Fix inverted use of Camera2D.offset_v
The code above for horizontal movement uses the right margin (_positive_ x direction) when the offset is negative, but vertical movement uses the top margin (_negative_ y direction) when the offset is negative.

The resulting problem is easily seen in the editor — set the drag margins to be asymmetrical, turn on drawing the drag margins, and slide the offsets from -1 to 1 and back.  The horizontal offset moves the camera's center between the left and right margins, but the vertical offset gets them backwards and will move the camera outside the margins entirely.

(cherry picked from commit 40816574ac)
2020-03-04 09:50:21 +01:00
Rémi Verschelde 2bae35353d Revert "Fix control node transform animation jitter with pivot offset"
This reverts commit 15315f118c.

It caused a regression: #36087.
2020-03-04 09:50:21 +01:00
Rémi Verschelde 416cd715a3
Merge pull request #36236 from Janglee123/vehicle-random-force-fix
Fixing Vehicle-Wheels getting a random engine_force at start
2020-03-02 16:50:10 +01:00
Dominik 'dreamsComeTrue' Jasiński eb22bcead7 RichTextLabel: proper handling of internal key events
Fixes #36211

(cherry picked from commit ff030afc93)
2020-02-19 10:09:28 +01:00
Michael Alexsander 18eba898f8 Fix hiding ColorPicker's presets not fully hiding its controls
(cherry picked from commit 5f5ccfc361)
2020-02-18 14:20:04 +01:00
WARIO-MDMA 707d1a38ec Reduce AudioStreamPlayer's pitch_scale max value
(cherry picked from commit 61d20b1f56)
2020-02-18 14:19:51 +01:00
janglee 5948530332 Fixed random force on vehicle wheel 2020-02-15 20:30:17 +05:30
bitstopper 7cb3a20418 Fixes broken CPUParticles2D AtlasTextures usage
(cherry picked from commit 36d9906d6a)
2020-02-14 16:14:13 +01:00
Yuri Roubinsky e10b0c9eaa Added missing '\n' in visual shader expression node code generation
(cherry picked from commit 6e1187ad2f)
2020-02-14 16:13:44 +01:00
Yuri Roubinsky 1930c79364 Added missing '\n' in visual shader fresnel node code generation
(cherry picked from commit c8639a0013)
2020-02-14 16:13:44 +01:00
Yuri Roubinsky 5579eb823b Few extra formatting fixes for visual shader node generation
For 'If' and 'Switch' nodes

(cherry picked from commit b0f166f0c5)
2020-02-14 16:13:44 +01:00
Yuri Roubinsky 1f4885fe49 Added missing '\n' in visual shader custom node code generation
(cherry picked from commit 9d8b59e86a)
2020-02-14 16:13:44 +01:00
Yuri Roubinsky fb56d93163 Better visual shader code generation
(cherry picked from commit bfec48abf1)
2020-02-14 16:13:44 +01:00
zxcvdev 6380943831 Fix GPU Particles
The special case atan(y,0) of the built-in shader function atan(y,x)
returns different results on different devices. So this commit will add
checks when the atan(y,x) function is used in ParticlesMaterial to set
the direction of GPU Particles to make sure the desired values are
returned (act as atan2(y,x)).

(cherry picked from commit 3580ad6005)
2020-02-14 16:04:07 +01:00
Haoyu Qiu be34e45233 Uses split cursor for SplitContainer
(cherry picked from commit 206b9f2d23)
2020-02-14 16:02:56 +01:00
muiroc 1b5996c95d pass missing args in AnimationNode script calls
(cherry picked from commit ed3a8cc83d)
2020-02-14 15:59:56 +01:00
Haoyu Qiu 0a3bf2b627 Fixes add group in Group Editor dialog
Before this fix, new group can't be created if any existing group starts
with the new name.

(cherry picked from commit 421ea09195)
2020-02-14 15:58:36 +01:00
Eoin O'Neill 0dedc0a1a3 Fix RichTextEffect visibility to Account for Skipped Characters.
A picture is easier to describe this issue than words. Basically, rich
text effects allowed for character visibility changes. While doing so
would work properly, the rich text label would render the next `word` in
an offset accounting for the hidden characters (leaving a huge space.)

This patch fixes this issue by keeping track of the amount of
`backtrack` necessary per line.

(cherry picked from commit b3fd4884d7)
2020-02-14 15:57:47 +01:00
sumit0190 58a940e5aa Update cached_width of the line_edit element when setting it to be secret
(cherry picked from commit 2e08578985)
2020-02-14 15:56:48 +01:00
Eric Rybicki 63daa19538 Use a new approach to fix bone pose override not being reset when IK animation is stopped.
This reverts PR #35460 & commit 551c37167b.

(cherry picked from commit bb0358dd8d)
2020-02-14 15:55:47 +01:00
Haoyu Qiu 7cfcf1824b Completes doc for ItemList and Tree
(cherry picked from commit 7a41c44be2)
2020-02-12 15:05:02 +01:00
Georg Wacker 15315f118c Fix control node transform animation jitter with pivot offset
The workaround for moving the pivot is not needed anymore, in fact it causes all transforms applied to control nodes to jitter while animating (if a pivot offset is set).

This can be observed via AnimationPlayer and Tween.

The fix is to remove the obsolete workaround that causes this bug.

Fixes #28804

(cherry picked from commit dfb7d46a2a)
2020-02-06 13:02:07 +01:00
Michael Alexsander a779774c86 Hide TileSet's properties from the inspector
(cherry picked from commit 5452028d55)
2020-02-06 13:02:07 +01:00
Haoyu Qiu dc20acd4fc Updates Path2D in debugging if navigation is visible
(cherry picked from commit 00d578ba3e)
2020-02-06 13:02:07 +01:00
Yuri Roubinsky 72f7e4efe0 Fix canvas_item light alpha output in visual shaders
(cherry picked from commit b822da00f8)
2020-02-06 13:02:07 +01:00
Haoyu Qiu 808a0bac33 Fixes OptionButton min size
(cherry picked from commit ddc397d9ff)
2020-02-06 13:02:07 +01:00
Rémi Verschelde 8d00dcb421
Merge pull request #35670 from clayjohn/material-flag-cache
Add an extra bit to material flag cache
2020-01-28 20:59:49 +01:00
clayjohn ec4d606e07 Add an extra bit to material flag cache 2020-01-28 10:38:54 -08:00
Rémi Verschelde 11d28b2d10 Revert "make Label consider spaces for visible_characters"
This reverts commit 695980a0f2.

Fixes #35668.
2020-01-28 19:37:04 +01:00
Rémi Verschelde 50830632c9
Merge pull request #35620 from TrevorPeyton/bind-autotile-center
Added binding for Autotile Center
2020-01-28 10:50:09 +01:00
Yuri Roubinsky 9705d5587e Hide "control" methods from VisualShaderNodeGroupBase 2020-01-28 10:24:59 +03:00
Yuri Roubinsky 274f1d8610 Hide "editable" property from VisualShaderNodeGroupBase public interface 2020-01-28 09:43:07 +03:00
Yuri Roubinsky 796484d761 Added missing property "size" to VisualShaderNodeGroupBase 2020-01-27 19:18:48 +03:00
Yuri Roubinsky 3479cf4b42 Removed unused method "build" from VisualShaderNodeExpression 2020-01-27 18:24:39 +03:00
TrevorPeyton ae4fee52d5
Added binding for Autotile Center 2020-01-27 09:07:32 -05:00
Yuri Roubinsky 4912d4c6e4 Added missed bracket to VisualShaderNodeCubeMap 2020-01-27 13:09:15 +03:00
Yuri Roubinsky 4445f892d2 Fix VisualShaderNodeCubeMap generation 2020-01-27 12:17:06 +03:00
Rémi Verschelde bb6c0d3e8b doc: Complete documentation for VideoStreams
Also quick clean up of the matching C++ files.
2020-01-26 11:29:07 +01:00
Haoyu Qiu 71b1a1c7d9 Updates minimum size on VideoPlayer::set_stream 2020-01-26 10:24:56 +08:00
Haoyu Qiu df3fad11fd Fixes crash in Spatial::notification 2020-01-25 13:16:51 +08:00
Tomasz Chabora 9ad7fc3405 Allow greater values in unit_offset 2020-01-24 14:40:33 +01:00
Yuri Roubinsky ce43c92208 Docs for some nodes in visual shader
Fix typo in `VisualShaderNodeCompare.ComparisonType` name.
2020-01-23 22:39:00 +01:00
Michael Alexsander 151f33111b Fix TileSet shape data not updating when being set via code 2020-01-23 11:48:38 -03:00
Rémi Verschelde efea348fe8
Merge pull request #35460 from ericrybick/35409-skeleton-does-not-return-to-original-pose-when-ik-playback-is-stopped
Fix bone pose override not being reset when IK animation is stopped
2020-01-23 14:38:04 +01:00
Rémi Verschelde ba177ccaec doc: Misc updates for AnimationNode* and others
- Add some missing descriptions.
- Add links to tutorials for ARVR and AnimationTree.
- Style fixes.
- Engine changes:
  * Make `AnimationNodeTransition.input_<number>` properties internal
    so that they don't appear in the docs. They still appear in the
    inspector based on the actual number of inputs requested.
  * Drop unimplemented `CPUParticles.flatness`. It's only used for 3D
    particles in `ParticlesMaterial`, and thus only relevant for
    `CPUParticles3D`.
2020-01-23 12:37:33 +01:00
Yuri Roubinsky 86cdccebe6 Hide "default_input_values" property in VisualShaderNode. 2020-01-23 11:18:51 +03:00
Eric Rybicki 551c37167b Fix bone pose override not being reset when IK animation is stopped
Fixes #35409
2020-01-23 08:48:08 +01:00
Rémi Verschelde c2e07db071
Merge pull request #35438 from MadEqua/virtual-keyboard-line-edit
Android virtual keyboard respecting LineEdit max length.
2020-01-23 08:20:24 +01:00
Bruno Lourenço a3bcdbeb78 Android virtual keyboard respecting LineEdit max length. 2020-01-23 01:52:49 +00:00
Rémi Verschelde 94d3bcbc9b
Merge pull request #35452 from nekomatata/tween-start-fail
Fixed Tween::start() with pending updates
2020-01-22 22:56:40 +01:00
PouleyKetchoupp 6c04c824bd Fixed Tween::start() with pending updates
Start was canceled instead of deferred in case of an update in progress.
Fixes #35441
2020-01-22 22:27:37 +01:00
Rémi Verschelde 37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
Rémi Verschelde 41feb410a6
Merge pull request #35338 from rburing/fix_find_focus_neighbor
Fix Control::_window_find_focus_neighbour
2020-01-22 21:16:35 +01:00
lawnjelly eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
Fixes #26637.
Fixes #19900.

The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.

Code which called this function has also been modified accordingly.

This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.

It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Bastiaan Olij 5cf9f4faeb Incorrect joystick id was returned on an inactive ARVR controller 2020-01-22 18:27:32 +11:00
Rémi Verschelde 5127afa812
Merge pull request #35413 from akien-mga/if-0-means-couperet
Remove unused #if 0'ed code
2020-01-21 22:27:50 +01:00
Rémi Verschelde 4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Rémi Verschelde 0be64da008 Allow greater values for DynamicFont size property
See https://github.com/godotengine/godot/issues/22581#issuecomment-576836691.

Not using `or_greater` as there *is* a max size value that the current
implementation can accept. If using e.g. size 6000 with
FiraSans-Regular.ttf, errors are printed due to failing asserts on a
glyph size that should be within 4096x4096 px.
2020-01-21 20:59:16 +01:00
Yuri Roubinsky a8ab4e3357 Forbid recursive connections in visual shader 2020-01-20 18:15:45 +03:00
Haoyu Qiu 0eab15a5a9 Destroys FreeType library on load error 2020-01-20 11:00:51 +08:00
Ricardo Buring 40542b0b0f Fix Control::_window_find_focus_neighbor
Due to a typo, the size of a candidate neighbor was confused with the
size of the control itself.

Fixes #34936.
2020-01-19 23:38:50 +01:00
Rémi Verschelde 6472e09a85 SceneTree: Abort change_scene if we're quitting
Otherwise we can have a segmentation fault if we try to call
`add_child` on an already freed node.

Fixes #35323.
2020-01-19 22:08:40 +01:00
Rémi Verschelde eb89254690 Fix crash when confirming dialogs with Return key
Regression from #34040, apparently making this a const reference
introduces issues (not sure why, but previous code worked fine).

Fixes #34691.

Co-authored-by: dankan1890 <mewuidev2@gmail.com>
2020-01-17 12:47:23 +01:00
Eric Rybicki 41efc08532 Fix SkeletonIK not playing animation if more than one IK-Bone is active 2020-01-16 20:22:15 +01:00
Rémi Verschelde 1de633205f Validate input in (CPU)Particles set_emission_shape()
Fixes #29777.

Co-authored-by: Cameron Reikes <cameronreikes@gmail.com>
2020-01-16 11:08:51 +01:00
Rémi Verschelde dd3779c12e
Merge pull request #35183 from YeldhamDev/scrollbar_regression
Fix scrollbar regression on large scales
2020-01-16 07:56:05 +01:00
Michael Alexsander 76e03f9b4d Fix scrollbar regression on large scales 2020-01-16 00:59:46 -03:00
Haoyu Qiu 574918f344 Updates ScrollContainer min size when toggle scrollbars 2020-01-16 09:42:31 +08:00
Rémi Verschelde 7c624949b5
Merge pull request #35147 from madmiraal/fix-34992
Fixes get_floor_normal() returning the user defined floor_normal.
2020-01-15 14:17:15 +01:00
Marcel Admiraal 907adb37ce Fixes get_floor_normal() returning the user defined floor_normal.
When there is no collision with a floor the get_floor_normal() function
should return the zero vector to be consistent with get_floor_velocity().

Renames floor_normal to up_direction in all bindings.

Updates the documentation of get_floor_normal() and get_floor_velocity()
to make it clear when the values are valid. Updates the documentation for
move_and_slide() and move_and_slide_with_snap() to use the new up_direction
parameter name.
2020-01-15 10:13:35 +01:00
Haoyu Qiu 26e3b4a58a Updates LineEdit's min size when necessary
These properties will affect the minimum size of LineEdit:

* The right icon (`set_right_icon`)
* The clear button (`set_editable` and `set_clear_button_enabled`)
* The text, when "expand to text length" is enabled (`set_text`)
2020-01-15 10:15:32 +08:00
Rémi Verschelde 40f0649e5b Fix typos with codespell
Using codespell 1.16.0.

See ab3bccdb78 for procedure.
2020-01-15 00:49:52 +01:00
Michael Alexsander db8c4c2a22 Fix regression on scrollbar raising in ScrollContainer 2020-01-14 19:55:12 -03:00
Michael Alexsander 34bf81fa7c Cleanup unnecessary code from before the scrollbar overlapping fixes 2020-01-14 18:19:12 -03:00