Commit graph

7129 commits

Author SHA1 Message Date
Rémi Verschelde 1ffe3ed47a
Merge pull request #33685 from Scony/improve-item-lists-add-item-methods
ItemList's add_(icon_)item method returns id of added item
2021-01-15 16:24:20 +01:00
Rémi Verschelde 8cd11032fb
Merge pull request #38562 from Calinou/3d-light-size-property-hint
Tweak the 3D light size property to only allow reasonable values
2021-01-15 16:21:53 +01:00
Rémi Verschelde 86e2d4c593
Merge pull request #45196 from Paulb23/text_edit_draw_behind_gutter
Fix TextEdit drawing Caret and icons out of bounds
2021-01-15 16:08:45 +01:00
Rémi Verschelde fa5ead4db7
Merge pull request #42713 from madmiraal/fix-42614
Update area-body_shape_entered-exited signal documentation.
2021-01-15 13:00:23 +01:00
Rémi Verschelde 274db4aa64
Merge pull request #45149 from pycbouh/ge-disconnect-crash
Prevent signal disconnection attempts on invalid references
2021-01-15 12:48:56 +01:00
Rémi Verschelde 64ba83a096
Merge pull request #44870 from alexpech12/fix-rich-text-label-set-visible-characters
Keep RichTextLabel visible character properties in sync
2021-01-15 00:59:26 +01:00
PouleyKetchoupp 9e660475a7 Improve Raycast3D render debug
Fix Raycast3D node render debug not showing in editor camera preview.

Use dynamic mesh update to change the ray on-the-fly without too much
extra cost when collision debug is enabled.

Fixes #43571
2021-01-14 15:52:01 -07:00
Paulb23 7666c1caf3 Fix TextEdit drawing Caret and icons out of bounds 2021-01-14 22:19:57 +00:00
Yuri Sizov 5e8e9fc601 Prevent signal disconnection attempts on invalid references 2021-01-14 15:19:32 +03:00
Alexander Pech 463e2002ab Keep RichTextLabel visible character properties in sync
The RichTextLabel class is inconsistent in how it updates the
visible_characters and percent_visible properties when either is changed.

To keep both properties consistent, update percent_visible when setting the
visible_characters property.
For both properties, when setting one, notify change for the other.

Docs updated for member set_visible_characters on RichTextLabel class.
2021-01-14 21:32:41 +11:00
Marcel Admiraal 95020d3e38 Fix not clearing a Joint3D with only a B node when removing the B node 2021-01-13 18:58:05 +00:00
Rémi Verschelde 0b409d89d0
Merge pull request #45136 from akien-mga/clang-format-11
CI: Update to clang-format 11 and apply ternary operator changes
2021-01-13 16:10:44 +01:00
Rémi Verschelde 7f8ab378e9
Merge pull request #45102 from nekomatata/fix-update-shape-data
Fix collision shape update when changing shape properties
2021-01-13 09:18:15 +01:00
Rémi Verschelde d2148692bc
Merge pull request #45125 from aaronfranke/poly-lib
Update PolyPartition / Triangulator library
2021-01-12 21:40:10 +01:00
Aaron Franke ddd6fb37e8
Update PolyPartition / Triangulator library 2021-01-12 13:46:16 -05:00
Rémi Verschelde ab1503c9d5
Merge pull request #45121 from Chaosus/shader_emit
Renamed `emit_particle` to `emit_subparticle` shader function
2021-01-12 19:33:29 +01:00
Rémi Verschelde af878716f2
CI: Update to clang-format 11 and apply ternary operator changes 2021-01-12 19:32:53 +01:00
PouleyKetchoupp 4b43cd17c5 Fix collision shape update when changing shape properties
This change does two things:

1. Properly update the internal shape data using _update_in_shape_owner
when updating a shape (in 2D it was resetting one way collision)

2. Avoid unnecessary updates when calling set_shape with the same shape,
which happens each time a shape property is modified
(e.g shape.extents.x = ...)

Fixes #45090
2021-01-12 10:28:20 -07:00
Rafał Mikrut 56734f44e5 Fix errors when removing non Control node from TabContainer 2021-01-12 10:48:18 +01:00
Yuri Roubinsky ef941a6500 Renamed emit_particle to emit_subparticle shader function 2021-01-12 09:41:08 +03:00
Filip de9e1e4540 Fixed completion and hint panel positioning in TextExit 2021-01-11 22:05:38 +01:00
K. S. Ernest (iFire) Lee 59b61a1f64 Scale error in mesh optimizer so it uses absolute scale.
Switch to simplify sloppy for another try.

Update to meshoptimizer e3f53f66e7a35b9b8764bee478589d79e34fa698.
2021-01-11 06:07:54 -08:00
Marcel Admiraal 5fa12da6f9 Rename the final parameter of area_shape_entered-exited local_shape. 2021-01-09 13:34:59 +00:00
Aaron Franke 1d5042c9e2
Use Math_TAU and deg2rad/rad2deg in more places and optimize code 2021-01-09 03:47:14 -05:00
Rémi Verschelde 50f7314329
RichTextLabel: Fix build after #35505
Should have rebased before merging.
2021-01-08 09:18:19 +01:00
Rémi Verschelde 9349a5507f
Merge pull request #35505 from dalexeev/rtl_colors
Unified named colors in RichTextLabel
2021-01-08 09:03:55 +01:00
AberrantWolf cff0352b3d Make tooltips appear on the same display as the editor
The `current_screen` field was never being set on tooptip windows, leading to scenarios where, if the editor wasn't on screen 0, tooltips may not appear in the right place, especially when your screens have different resolutions.
2021-01-07 12:16:55 +03:00
Rémi Verschelde a7baf01352
Merge pull request #44950 from reduz/shader-debugger
Added ability to visualize native shaders
2021-01-06 16:28:45 +01:00
reduz cdb216f4e4 Added ability to visualize native shaders 2021-01-06 09:40:09 -03:00
David Kennedy 715cf48f81 Makes script editor not draw non existent spaces.
Fixes #44775 Editor is incorrectly drawing non existent space.
2021-01-05 20:20:41 -03:00
Rémi Verschelde a4af94068a
Tooltips: Fix unassigned strip_edges() call on text
Fixes #43940, was a regression from #43280.
2021-01-05 15:14:27 +01:00
Rémi Verschelde 8b7f582f22
Revert "solved ctrl + alt + special character Issue #6851" 2021-01-05 14:41:35 +01:00
Rémi Verschelde 321a4d5e79
Merge pull request #44906 from EricEzaM/PR/popup-menu-fix-not-matching-button-size
Fixed PopupMenu not matching parent MenuButton/OptionButton width
2021-01-04 14:47:32 +01:00
Eric M 056fcf3d75 Fixed PopupMenu not matching parent MenuButton/OptionButton width 2021-01-04 18:47:09 +10:00
Eric M e5aaa7d890 Fixed hover highlight style rect of items being cut off.
This was caused by an incorrect calculation of the height of each item when determining the minimum size, plus a few things which were leftover after the PopupMenu rework.
2021-01-04 18:35:40 +10:00
Rafał Mikrut b0f28d2259 Remove memory leak in Canvas Group 2021-01-03 21:29:18 +01:00
Rémi Verschelde 7a16efc885
Merge pull request #42188 from Eoin-ONeill-Yokai/animationstateplayback/missing_binds
AnimationStateMachinePlayback: Added Missing Method Bindings
2021-01-02 11:01:13 +01:00
Eoin O'Neill 674fb52f52 StateMachinePlayback: Added missing bindings to get_current_play_pos and get_current_length.
This allows the user to query the AnimationNodeStateMachinePlayback's current
play position and total length of current animation state. These methods are currently
used in the editor plugin, but can also be useful for querying general playback state
information.

Added documentation for AnimationNodeStateMachinePlayback's `get_current_play_position`
2021-01-01 22:39:46 -08:00
Rémi Verschelde 96aff740fe
Merge pull request #44809 from Calinou/physics-render-layers-zero-index
Use zero-indexing for physics and render layer names
2021-01-01 23:37:37 +01:00
Rémi Verschelde 2900b40507
Merge pull request #44839 from qarmin/fix_crash_tile_map
Do not iterate over map when removing its values
2021-01-01 23:06:35 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde a6b869988f
Merge pull request #44276 from YeldhamDev/tooltip_position_embedded_fix
Fix tooltip position in main embedded window
2021-01-01 16:28:59 +01:00
Marcel Admiraal 026aa4381d Add signal to inform joint that body has exited tree 2020-12-31 16:19:57 +00:00
Rafał Mikrut 29b2882381 Do not iterate over map when removing its values 2020-12-31 15:47:37 +01:00
hoontee 6e2a55c464 Do not clear materials when setting mesh 2020-12-30 11:02:01 -06:00
Hugo Locurcio f87d42f4ca
Use zero-indexing for physics and render layer names
The first layer is now Layer 0 instead of Layer 1, and the last
layer is now Layer 19 instead of Layer 20.

This helps reference physics and render layers from scripts since
layers start from 0 there.
2020-12-30 16:03:11 +01:00
Yuri Roubinsky c98c6eadbe Add convert options between constants and uniforms in visual shaders 2020-12-30 13:07:08 +03:00
Rémi Verschelde 3a9777cb3f
Merge pull request #44724 from Chaosus/popup_separator
Added optional id parameter to `PopupMenu::add_separator`
2020-12-29 17:39:44 +01:00
Rémi Verschelde 848f5ba05c
Merge pull request #44762 from KoBeWi/offset_is_now_point_not_offset_point
Rename offset to point in remove_point()
2020-12-29 13:37:49 +01:00
Rémi Verschelde 2086acfacc
Merge pull request #44614 from madmiraal/rename-normalmap-normal_map
Consistently use normal_map
2020-12-29 10:39:56 +01:00
Rémi Verschelde 09212fba1e
Fix missed renamings from empty() to is_empty()
Those were missed in #44401 or added by later PRs.
2020-12-29 09:55:07 +01:00
Rémi Verschelde c6e9d912e1
Merge pull request #44781 from mrushyendra/scroll_container_ready_fix
Allow ScrollBar params of a ScrollContainer to be modified from _ready()
2020-12-29 09:44:08 +01:00
Rémi Verschelde 652bdd573e
Merge pull request #43691 from bruvzg/ctl_dropcap
[Complex Text Layouts] Add drop-cap support to RTL.
2020-12-29 09:14:46 +01:00
Marcel Admiraal b4a190e0bc Consistently use normal_map 2020-12-29 08:04:19 +00:00
Maganty Rushyendra b8610dbd31 Allow ScrollBar params of a ScrollContainer to be modified in _ready()
Initializes the sizes of the ScrollContainer and its associated
ScrollBars in _ready() to allow scroll values to be set in GDScript
initially.
2020-12-29 13:02:02 +08:00
Rémi Verschelde 6cebb8c117
Merge pull request #44586 from madmiraal/rename-stepify
Rename Math::stepify to snapped
2020-12-28 21:46:43 +01:00
kobewi 4f72a07eaa Rename offset to point in remove_point() 2020-12-28 17:57:55 +01:00
Rémi Verschelde 4ca98c7a35
Merge pull request #44183 from madmiraal/box_shape-size
Use a size Vector for adjusting the size of Rectangles and Boxes
2020-12-28 16:06:50 +01:00
Rémi Verschelde 058f3fe069
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-28 16:00:12 +01:00
Rémi Verschelde 18bbd6410f
Merge pull request #44232 from madmiraal/rename-camera2d-drag-offset
Rename Camera2D offset_h and offset_v properties
2020-12-28 15:56:56 +01:00
Rémi Verschelde 9addcb7603
Merge pull request #44751 from madmiraal/rename-rect-grow_margin
Rename Rect2 and Rect2i grow_margin() to grow_side()
2020-12-28 15:56:14 +01:00
Rémi Verschelde 8f4c4bb610
Merge pull request #44434 from madmiraal/rename-camera3d-near-and-far
Rename Camera3D near and far getters and setters
2020-12-28 14:57:31 +01:00
Rémi Verschelde feb4e5ed2c
Merge pull request #44569 from madmiraal/rename-unselect-deselect
Rename unselect to deselect
2020-12-28 14:53:43 +01:00
Rémi Verschelde e4c0572385
Merge pull request #44593 from madmiraal/rename-mainloop-methods
Rename MainLoop methods to match Node methods
2020-12-28 14:44:28 +01:00
Rémi Verschelde 891b1cdf28
Merge pull request #44607 from madmiraal/rename-control-rotation
Rename Control rotation to rotation_degrees
2020-12-28 14:42:06 +01:00
Marcel Admiraal b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00
Marcel Admiraal b628912af0 Rename Rect2 and Rect2i grow_margin() to grow_side() 2020-12-28 12:47:33 +00:00
Marcel Admiraal 04ab6c39cf Rename Camera2D offset_h and offset_v properties 2020-12-28 11:01:20 +00:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Yuri Roubinsky ca8c794d04 Added optional id parameter to PopupMenu::add_separator 2020-12-27 15:18:47 +03:00
Marcel Admiraal dc8c29ee95 Update GraphEdit connection to reflect new signal name 2020-12-26 09:48:40 +00:00
Rémi Verschelde 7d972b8c67
Merge pull request #44640 from nekomatata/joint2d_update_body_transforms
Update body transforms on joint2D setup
2020-12-25 14:59:53 +01:00
PouleyKetchoupp 11bee25de4 Update body transforms on joint2D setup
Body transforms from physics are used to setup the joint and they are
only updated before the physics step by default.

Without forcing the transform update, joints could use a previous
position if the body's position was set after it was added to the scene.

3D physics is not affected by this issue.
2020-12-23 20:04:22 -07:00
Rémi Verschelde c4c211c3b7
Merge pull request #44605 from madmiraal/rename-control-margin
Rename Control margin to offset
2020-12-23 18:24:00 +01:00
Rémi Verschelde b233f23c37
Merge pull request #44535 from Demindiro/fix-joint-rid-not-passed
Fix joint RID not being passed to _set in PhysicalBone
2020-12-23 16:08:06 +01:00
Marcel Admiraal b832003c6b Rename Control rotation to rotation_degrees 2020-12-23 07:06:30 +00:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Rémi Verschelde 8ad0ff8ae5
Merge pull request #44487 from bruvzg/ctl_fixes_2
[CTL] Fix RTL scrolling and tabs selection.
2020-12-23 01:15:29 +01:00
Marcel Admiraal d9e9eb8d04 Rename MainLoop methods to match Node methods 2020-12-22 12:34:57 +00:00
David Hoppenbrouwers 41e00b6787
Fix joint RID not being passed to _set in PhysicalBone
Also remove default RID() argument from JointData._set()
2020-12-22 13:20:34 +01:00
Rémi Verschelde 6e43c68e40
Merge pull request #44182 from clayjohn/ASSAO
Replace SAO with ASSAO as Godot's new SSAO
2020-12-22 11:27:25 +01:00
clayjohn 44f8922305 Port ASSAO to Godot to replace SAO 2020-12-21 23:08:59 -08:00
Marcel Admiraal 7b293eddfb Rename unselect to deselect 2020-12-21 10:26:41 +00:00
Marcel Admiraal fdf92ca298 Rename XRPositionalTracker methods
Renames:
- set_type() -> set_tracker_type()
- set_name() -> set_tracker_name()
- get_tracks_orientation() - `is_tracking_orientation()
- get_tracks_position() -> `is_tracking_position()
- get_hand() -> get_tracker_hand()
- set_hand() -> set_tracker_hand()
2020-12-21 06:32:53 +00:00
bruvzg 784f869f0f
Fix RichTextLabel content height and scrollbar calculations. 2020-12-21 07:49:27 +02:00
bruvzg 1adea98d07
Use integer text position in scroll container, TextEdit and canvas editor, to ensure sharp text rendering.
Use integer font align/advance with any font scaling, to ensure sharp text rendering.
2020-12-21 07:49:27 +02:00
Rémi Verschelde f7ddcbf446
Merge pull request #44328 from gongpha/tabs-label-incorrect
Refresh TextLine buffer when moving a tab
2020-12-21 00:26:08 +01:00
Rémi Verschelde 153c132a7e
Merge pull request #44300 from KoBeWi/🧹🧹
Move initialization of some classes to headers
2020-12-21 00:24:36 +01:00
Marcel Admiraal ecf8ae5bcf Rename Camera3D near and far getters and setters
Renames:
- get_znear() -> get_near()
- set_znear() -> set_near()
- get_zfar() -> get_far()
- set_zfar() -> set_far()
2020-12-20 13:46:57 +00:00
Pedro J. Estébanez b7367ac426 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.
2020-12-20 12:45:08 +01:00
Rémi Verschelde e9d12f9e4e
Merge pull request #44521 from madmiraal/rename-rect2-clip
Rename Rect2 and Rect2i clip() to intersection()
2020-12-19 21:32:14 +01:00
Hugo Locurcio 7ae487d2bb
Increase the default Camera Zfar to 4000
This makes it possible to view far away objects without
having to tweak any settings. This results in a more usable
editor when working on large-scale levels.

This change should have no impact on performance, but note that
Z-fighting will be visible at a distance. This can be made less
visible by increasing the Znear value (however, doing so will cause
nearby surfaces to disappear).

This change was also applied to the editor, but it will only
apply to newly created scenes.

This also changes the default camera settings in the glTF importer
to match the Camera node's defaults.
2020-12-19 14:52:44 +01:00
Marcel Admiraal 2df9a8ccad Rename Rect2 and Rect2i clip() to intersection() 2020-12-19 12:59:08 +00:00
reduz d2302f53d6 Implement automatic LOD (Level of Detail)
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)
-Disabled AABB.get_support test because its broken
2020-12-18 15:48:03 +01:00
Rémi Verschelde 36b4e035dc
Merge pull request #44496 from Chaosus/graph_edit_lines
Added GraphEdit properties to control lines thickness and antialiasing
2020-12-18 15:03:06 +01:00
Yuri Roubinsky 52e44ed3ef Added GraphEdit properties to control lines thickness and antialiasing 2020-12-18 16:41:45 +03:00
Rémi Verschelde 771b99b7f4
Merge pull request #44495 from godotengine/font-typo-44494
Font: Fix typo in DynamicFontData compat code
2020-12-18 14:08:15 +01:00
Rémi Verschelde a5c47dab5b
Font: Fix typo in DynamicFontData compat code
Fixes #44494.
2020-12-18 12:59:52 +01:00
Rémi Verschelde c7b53c03ae
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.
2020-12-18 10:29:34 +01:00
Yuri Sizov f5bcbd8325 FIx visual issues with GraphEdit minimap 2020-12-17 22:59:04 +03:00