Commit graph

8400 commits

Author SHA1 Message Date
Juan Linietsky 93aa158b5e
Merge pull request #52277 from groud/implement_array_property_hint
Implement properties arrays in the Inspector.
2021-09-07 11:59:46 -03:00
Silc 'Tokage' Renew 48aa2d5494 Fixed regression of skinning with skeleton 2021-09-07 23:59:29 +09:00
Fabio Alessandrelli bf9aae09ba [Net] Move multiplayer to core subdir, split RPCManager.
Move multiplayer classes to "core/multiplayer" subdir.

Move the RPCConfig and enums (TransferMode, RPCMode) to a separate
file (multiplayer.h), and bind them to the global namespace.

Move the RPC handling code to its own class (RPCManager).

Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-07 11:14:30 +02:00
Gilles Roudière 88c3e3180a
Merge pull request #52050 from nobuyukinyuu/bind-get-tab-idx-at-point-40
Bind TabContainer::get_tab_idx_at_point() to ClassDB
2021-09-07 11:09:35 +02:00
Gilles Roudière 4bd7700e89 Implement properties arrays in the Inspector. 2021-09-07 09:51:28 +02:00
PouleyKetchoupp 82ea2a7045 Proper support for custom mass properties in 2D/3D physics bodies
Changes:
-Added support for custom inertia and center of mass in 3D
-Added support for custom center of mass in 2D
-Calculated center of mass from shapes in 2D (same as in 3D)
-Fixed mass properties calculation with disabled shapes in 2D/3D
-Removed first_integration which is not used in 2D and doesn't seem to
make a lot of sense (prevents omit_force_integration to work during the
first frame)
-Support for custom inertia on different axes for RigidBody3D
2021-09-06 10:20:16 -07:00
Camille Mohr-Daurat a93fb2655a
Merge pull request #52286 from nekomatata/restore-kinematic-body
Add AnimatableBody inherited from StaticBody for moving platforms
2021-09-06 09:32:46 -07:00
Paulb23 9785167b39 Fix brace placement with space auto indent 2021-09-06 17:10:39 +01:00
Gilles Roudière 1f97d57384
Merge pull request #35859 from Calinou/minimap-add-hover-pressed-feedback
Add visual feedback when hovering or dragging the code minimap grabber
2021-09-06 16:22:36 +02:00
daniel-mcclintock 8a8c172b93 Fix crash during completion lookback 2021-09-06 23:10:06 +10:00
Gilles Roudière b0b30aaf41
Merge pull request #52435 from groud/fix_crash_in_tilemap_physics
Fix crash in TileMap physics
2021-09-06 15:09:28 +02:00
Gilles Roudière a4cd553f42 Fix crash in TileMap physics 2021-09-06 13:11:41 +02:00
Pip d7a6f8990a
Remove dead code from Viewport::_gui_input_event 2021-09-06 03:11:02 -04:00
Awkor 3aa2a7fc18 Prevent editing properties managed by parent container 2021-09-05 23:23:53 +02:00
jmb462 752e2bcee0 Fix comment causes content of folded methods to not hide 2021-09-05 12:30:27 +02:00
Silc 'Tokage' Renew facf8f1883 Apply set_read_only() to child classes of EditorProperty elements 2021-09-05 18:22:17 +09:00
Hennadii Chernyshchyk 2b78353e79
Remove extra get_script_instance check
Otherwise, `_ready()` will not be called on classes
that define this function and doesn't have a script attached.
2021-09-04 12:14:54 +03:00
Hugo Locurcio c8949f21e7
Add visual feedback when hovering or dragging the code minimap grabber
This makes it more obvious that the minimap grabber can be dragged
to scroll.
2021-09-04 02:25:22 +02:00
William Deurwaarder b92347c220 Fix incorrectly removing two characters by auto brace
In some situations when there were no braces auto brace still removed two
characters.  This has been fixed by adding a test that a brace is found.
2021-09-03 00:33:50 +02:00
JestemStefan 177173578a Changed Window current_screen parameter from string to int 2021-09-02 23:34:15 +02:00
William Deurwaarder b54b0bc580 Fix documentation viewer to scroll to end
Extra `line separation` height was not taken into account when the offset for
the different paragraphs (lines) was calculated.
2021-09-02 22:11:14 +02:00
Paulb23 dd0988f027 Fix getting deliminator start over empty lines and blank start keys 2021-09-02 18:22:49 +01:00
Michael Alexsander ee4b0108e0 Make some enhancements to the POT generation 2021-09-02 11:12:54 -03:00
Paulb23 ce064348fa Add CodeEdit breakpoint unit tests 2021-09-01 16:46:04 +01:00
Paulb23 cd6b11222c Prevent crash on startup if no audio server 2021-09-01 16:46:04 +01:00
Gilles Roudière c97afc033f
Merge pull request #38722 from KoBeWi/proposition
Add offset for TextureProgress progress texture
2021-09-01 16:20:05 +02:00
kobewi e78ee616f7 Add offset for TextureProgress progress texture 2021-09-01 14:39:08 +02:00
kleonc 3311a5b593 TabContainer Fix drawing current tab when it's disabled 2021-09-01 03:59:45 +02:00
PouleyKetchoupp 83baecdff0 Add AnimatableBody inherited from StaticBody for moving platforms
Instead of having a physics node named Static that can be either Static
or Kinematic, AnimatableBody is added again as a separate node:
-Inherited from StaticBody to make its usage clearer
-Still separated from CharacterBody to make its usage more focused

Properly implemented constant velocity for kinematic bodies in godot
physics servers (induced velocity without actually moving).

Also updated description for the different physics nodes to make their
usage clearer.
2021-08-31 18:14:32 -07:00
Juan Linietsky 7946066577
Merge pull request #49471 from nekomatata/body-state-sync-callback
Clean physics direct body state usage in 2D and 3D physics
2021-08-31 14:30:17 -03:00
Camille Mohr-Daurat 0ee1179c1c
Merge pull request #52279 from fabriceci/delta-double
Change delta type to double in Physics_body_2/3D
2021-08-31 08:25:36 -07:00
Hugo Locurcio d33a7367b6
Write node groups one a single line when saving a .tscn file
This makes `.tscn` files more readable by ensuring sections are always
written on a single line.
2021-08-31 17:06:18 +02:00
kobewi f2cb0a8d4b Add Listener2D 2021-08-31 16:53:14 +02:00
Camille Mohr-Daurat a9fcbb1001
Merge pull request #51364 from bengtsts/master
Expose soft body pin methods to GDScript
2021-08-31 07:41:34 -07:00
fabriceci f9d548627d delta time as double 2021-08-31 14:32:56 +02:00
fabriceci 1a481c8191 Change platform detection by allowing select layers by type (wall or floor) 2021-08-31 09:59:04 +02:00
Juan Linietsky bcd73fc00a
Merge pull request #52240 from Rubonnek/rename-rel-path
Rename `String::is_rel_path` to `String::is_relative_path`
2021-08-30 20:45:45 -03:00
Bengt Söderström 08a80962cf Expose soft body pin methods to GDScript 2021-08-30 20:07:14 +02:00
Juan Linietsky 6dab6e4136
Revert " Improve collision generation usability in the new 3D scene import workflow." 2021-08-30 11:30:36 -03:00
Camille Mohr-Daurat b60a51f023
Merge pull request #51985 from AndreaCatania/coll
Improve collision generation usability in the new 3D scene import workflow.
2021-08-30 07:25:51 -07:00
Wilson E. Alvarez d11c1afc04
Rename String::is_rel_path to String::is_relative_path 2021-08-29 20:41:29 -04:00
Fabio Alessandrelli 64b9f30b92 [Net] Rename RPC "puppet" to "auth" (authority). Drop "master".
This commit completely removes the RPC_MODE_MASTER ("master" keyword),
and renames the RPC_MODE_PUPPET to RPC_MODE_AUTHORITY ("auth" keyword).

This commit also renames the "Node.[get|set]_network_master" methods to
"Node.[get|set]_network_authority".

This commit also renames the RPC_MODE_REMOTE constant to RPC_MODE_ANY.

RPC_MODE_MASTER in Godot 3.x meant that a given RPC would be callable by
any puppet peer on the master, while RPC_MODE_PUPPET meant that it would
be callable by the master on any puppet.

Beside proving to be very confusing to the user (referring to where it
could be called instead of who can call it) the RPC_MODE_MASTER is quite
useless. It is almost the same as RPC_MODE_REMOTE (anyone can call) with
the exception that the network master cannot. While this could be useful
to check in some case, in such a function you would anyway need to check
in code who is the caller via get_rpc_sender_id(), so adding the check
there for those rare cases does not warrants a dedicated mode.
2021-08-30 00:54:38 +02:00
Juan Linietsky 72bf79186e
Merge pull request #30391 from KoBeWi/hiding_children
Add support for internal nodes
2021-08-29 19:36:30 -03:00
Juan Linietsky 07707a3627
Revert "Display a matrix for Node2D and don't display a duplicate origin" 2021-08-29 17:01:07 -03:00
Aaron Franke ee7bb9bbb9
Display a matrix for Node2D and don't display a duplicate origin 2021-08-29 10:34:50 -05:00
nobuyuki_nyuu 65d83cc99b Bind TabContainer::get_tab_idx_at_point() to ClassDB 2021-08-29 09:10:44 -05:00
Max Hilbrunner 00e66e26cc
Merge pull request #49664 from nekomatata/fix-editable-duplicated
Fix loading packed scene with editable children at runtime
2021-08-28 22:14:35 +02:00
Max Hilbrunner e0355d5db6
Merge pull request #43573 from lewiji/master
sprite_3d.cpp: return _is_playing() from public is_playing() function
2021-08-28 19:55:54 +02:00
Michael Alexsander 565ba91d28
Merge pull request #51906 from requizm/fix/49077
Fix tooltips don't appear for PopupMenus
2021-08-28 15:43:02 +00:00
Paulb23 c5d7ae7920 Allow nested complex ops in TextEdit 2021-08-28 12:49:55 +01:00
Paulb23 de009cb5ae Optimise TextEdit get height and width 2021-08-28 11:27:23 +01:00
AndreaCatania 2d2d24a538 Improve collision generation usability in the new 3D scene import workflow.
With this PR it's possible to add a collision during the Mesh import, directly in editor.
To generate the shape is possible to chose between the following options:
- Decompose Convex: The Mesh is decomposed in one or many Convex Shapes (Using the VHACD library).
- Simple Convex: Is generated a convex shape that enclose the entire mesh.
- Trimesh: Generate a trimesh shape using the Mesh faces.
- Box: Add a primitive box shape, where you can tweak the `size`, `position`, `rotation`.
- Sphere: Add a primitive sphere shape, where you can tweak the `radius`, `position`, `rotation`.
- Cylinder: Add a primitive cylinder shape, where you can tweak the `height`, `radius`, `position`, `rotation`.
- Capsule: Add a primitive capsule shape, where you can tweak the `height`, `radius`, `position`, `rotation`.

It's also possible to chose the generated body, so you can create:
- Rigid Body.
- Static Body.
- Area.
2021-08-28 08:34:15 +02:00
kobewi a913ae8d56 Add support for internal nodes 2021-08-28 02:07:23 +02:00
LeaoLuciano c50c5b9bef LinkButton's text now is automatically translated 2021-08-27 20:11:58 -03:00
PouleyKetchoupp fab88a810c Fix loading packed scene with editable children at runtime
At runtime, packed scenes with nodes marked as editable instance where
saved with node type tags, which prevented the scene to be then loaded
as an instance, causing duplicated nodes in the tree.

This change ensures nodes marked as editable instances and their owned
children are properly set as instances.

That doesn't make a difference in the editor, since such nodes where
already set as instances based on their instance state, but it helps
at runtime where instance states are disabled.

Co-authored-by: latorril <latorril@gmail.com>
2021-08-27 14:49:47 -07:00
Max Hilbrunner 701195937d
Merge pull request #52096 from kleonc/tree-item-drag-drop-drawing
Tree Fix line rendering when drag and dropping TreeItem
2021-08-27 20:55:37 +02:00
Juan Linietsky 54caaa21ce
Merge pull request #51296 from ellenhp/mix_in_audio_server
Move mixing out of the AudioStreamPlayback* nodes
2021-08-27 15:38:20 -03:00
Camille Mohr-Daurat 87f575efdd
Merge pull request #52135 from fabriceci/fix-transmission-velocity-on-wall-4
Remove velocity transmission on_wall when collider is CharacterBody.
2021-08-27 10:56:42 -07:00
Ellen Poe 3598d300cb Do all audio mixing in the AudioServer 2021-08-27 10:41:57 -07:00
Ellen Poe 53843ba872 Require AudioStream::mix to return the number of frames successfully mixed 2021-08-27 10:27:58 -07:00
K. S. Ernest (iFire) Lee 90a35dac48
Merge pull request #51908 from bruvzg/msdf_fonts2
Make FontData importable resource. Add multi-channel SDF font rendering.
2021-08-27 08:51:37 -07:00
Camille Mohr-Daurat ca4f20529c
Merge pull request #51896 from nekomatata/restore-ray-shape
Refactor RayShape and rename to SeparationRayShape
2021-08-27 08:49:49 -07:00
bruvzg 4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
fabriceci 4da0cfe459 Remove velocity transmission on_wall when collider is CharacterBody. 2021-08-26 23:02:30 +02:00
Camille Mohr-Daurat adafc509f3
Merge pull request #52132 from nekomatata/fix-physics-process-delta
Fix delta passed in _physics_process
2021-08-26 11:27:38 -07:00
PouleyKetchoupp cbce1550ff Fix delta passed in _physics_process
Regression due to typo in recent GDVIRTUAL_CALL change.
2021-08-26 10:49:12 -07:00
K. S. Ernest (iFire) Lee 98d55ba66f
Merge pull request #52131 from nekomatata/fix-blend-tree-reset
Fix AnimationBlendTree reset on resource loading
2021-08-26 10:06:09 -07:00
Juan Linietsky d19b12dbd2
Merge pull request #52107 from timothyqiu/overriden
Fix misspelled "overriden"
2021-08-26 13:07:52 -03:00
PouleyKetchoupp aae50da074 Fix AnimationBlendTree reset on resource loading
When reset_state was called on an existing AnimationBlendTree, the
output node would disappear, causing some errors in the editor and
preventing animations to play properly.

This change ensures the output node is always present in the node tree.
2021-08-26 09:07:13 -07:00
Bastiaan Olij 64626cc435 Optionally scale 3D render content 2021-08-26 20:48:40 +10:00
Haoyu Qiu eba7265a1c Fix misspelled "overriden"
In recent GDVIRTUAL PR and SkeletonModification3DJiggle doc.
2021-08-26 01:44:01 +08:00
PouleyKetchoupp 6a9ed72185 Clean physics direct body state usage in 2D and 3D physics
Use a C++ callback instead of Callable for synchronizing physics nodes' state with physics servers.

Remove usage of PhysicsDirectBodyState in physics nodes when not
necessary.

Store PhysicsDirectBodyState for bodies individually instead of a
singleton to avoid issues when accessing direct body state for multiple
bodies.

PhysicsDirectBodyState is initialized only when needed, so it doesn't
have to be created when using the physics server directly.

Move PhysicsDirectBodyState2D and PhysicsDirectBodyState3D to separate
cpp files.
2021-08-25 08:57:42 -07:00
JFonS 353bb45e21
Merge pull request #51995 from drcd1/sphere-mesh-normals-fix
Fixes the normals of SphereMesh when the sphere/hemisphere is oblong
2021-08-25 16:22:20 +02:00
kleonc d35ef5fab0 Tree Fix line rendering when drag and dropping TreeItem 2021-08-25 13:29:54 +02:00
JFonS c334989e00
Merge pull request #51821 from Calinou/builtin-shaders-add-comments
Add comments at the top of each built-in shader to ease debugging
2021-08-25 11:37:57 +02:00
Hugo Locurcio bb0122c933
Merge pull request #48374 from Calinou/gradienttexture-add-hdr-property
Add an `use_hdr` property to GradientTexture to allow storing HDR colors
2021-08-25 08:03:34 +02:00
Hugo Locurcio 7192852da3
Remove 16× MSAA support due to driver bugs and low performance
In the `master` branch, 16× MSAA caused the entire system to freeze
on NVIDIA GPUs. This is likely caused by graphics drivers not actually
implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead.

On top of that, modern shader complexity makes 16× MSAA very difficult
to use while keeping a good framerate. 8× MSAA is hard enough to use
as it is.
2021-08-25 07:56:27 +02:00
K. S. Ernest (iFire) Lee 24f562bd1e
Merge pull request #52024 from V-Sekai/anim-length
Calculate proper animation length.
2021-08-24 19:29:02 -07:00
K. S. Ernest (iFire) Lee ffe54af0db Calculate proper animation length. 2021-08-24 18:50:22 -07:00
PouleyKetchoupp 3d5dc80348 Rename RayShape to SeparationRayShape
Makes it clearer that it's used for special cases when picking a
collision shape.
2021-08-24 17:34:55 -07:00
PouleyKetchoupp aa4791735d Rename slips_on_slope to slide_on_slope
Also added some precision to the documentation.
2021-08-24 17:34:55 -07:00
PouleyKetchoupp d9720d4395 Fix CharacterBody motion with RayShape
Make separation ray shapes work properly in move_and_slide, wihtout the
specific code in CharacterBody like before.

Now most of the logic is handled inside the physics server. The only
thing that's needed is to use ray shapes only for recovery and ignore
them when performing the motion itself (unless we're snapping or slips
on slope is on).
2021-08-24 17:34:55 -07:00
PouleyKetchoupp 45c7af9862 Restore RayShape as a regular shape type
Partial revert from previously removing ray shapes completely, added
back as a shape type but without the specific character controller code.
2021-08-24 16:03:05 -07:00
Camille Mohr-Daurat c89a5fb8be
Merge pull request #51904 from nekomatata/move-and-slide-fixes-3d
Port recent move_and_slide fixes to 3D
2021-08-24 16:01:12 -07:00
William Deurwaarder d875706e01 RichTextLabel returns member (Array) for custom effects for Editor
As RichTextLabel returned a copy of the member (Vector) the editor was notified
that the value had changed which caused the dropdown menu to be immediately
closed after opening.

The fix is to return the member (Array) in stead of a copy which is the same
instance and thereby does not notify the editor that the value has changed.
2021-08-24 22:02:24 +02:00
PouleyKetchoupp bae06008c8 Port recent move_and_slide fixes to 3D
Improves stop on slopes, sliding on walls and gravity handling by
porting existing changes from CharacterBody2D to CharacterBody3D.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-08-24 11:30:01 -07:00
Haoyu Qiu d12cceadd2 Make RichTextLabel honour default cursor shape property 2021-08-24 22:07:42 +08:00
Juan Linietsky 6609ce1944
Merge pull request #52000 from lyuma/set_editable_instance
Make Node editable_instance methods available to GDScript
2021-08-24 08:31:34 -03:00
Lyuma 7eb6ae2798 Make Node editable_instance methods available to GDScript 2021-08-23 21:45:18 -07:00
Camille Mohr-Daurat 770a1d00a3
Merge pull request #51751 from jeffrey-cochran/windforce
Created an area-specific wind force that interacts with soft bodies
2021-08-23 16:48:19 -07:00
reduz 44d62a9f4b Implement NativeExtension pointer arguments
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
2021-08-23 19:58:40 -03:00
Jeffrey Cochran e806397196 Enabled area-specific wind forces 2021-08-23 17:00:50 -04:00
Hugo Locurcio 0af213a4e0
Merge pull request #51259 from nekomatata/fix-tilemap-one-way-collision
Fix one-way collision in Tilemap
2021-08-23 18:54:01 +02:00
kobewi 7939ad5b8c Restore syntax highlighting 2021-08-23 18:08:17 +02:00
Michael Alexsander 88db541705
Merge pull request #51947 from AnilBK/redundant-assignments
[cppcheck] Remove some redundant assignments.
2021-08-23 13:23:45 +00:00
bruvzg 54345f11fb Fix label outline overlaps. 2021-08-23 14:13:13 +03:00
reduz 5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
K. S. Ernest (iFire) Lee bb1c930a41
Merge pull request #51991 from requizm/fix/51990
Fix 3d animations doesn't play
2021-08-22 17:12:08 -07:00
Duarte David f4ac08a182 Fixes the normals of SphereMesh when the sphere/hemisphere is oblong 2021-08-22 21:45:39 +01:00
requizm e4b29cb6be Fix 3d animations doesn't play
Add comment


Fix


ff
2021-08-22 23:19:26 +03:00