Commit graph

4016 commits

Author SHA1 Message Date
PouleyKetchoupp ccac36a6e2 Remove unused PhysicsShapeQueryResult3D & PhysicsShapeQueryResult2D 2021-07-05 11:16:11 -07:00
reduz f4379cbc82 Clean up Tree
Fixes some problems introduced by #49917

* Tree used minimum size as a stretch ratio, so it forced a minimum size of 1.
* Minimum size redone, stretch ratio moved to a separate setting
* Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired.
* Added a clip content option for situations where fit to contents does not apply.
* Icon would scroll with the item, making it invislbe if the item is too long.
* Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
2021-07-04 13:13:53 -03:00
Rémi Verschelde cb4e42155d
Merge pull request #50054 from reduz/curve-texture-3d
Implement Curve3Texture
2021-07-03 20:32:18 +02:00
reduz d6893cb2e8 Implement Curve3Texture
* This was required by users in some scenarios, such as animating individual axes over time with a single texture.
* Examples: Shaders, Particles, etc.
* CurveTexture now defaults to RGB, can be changed to Red if needed, this allows to freely exchange them.
2021-07-03 12:11:01 -03:00
reduz 6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
Rémi Verschelde b9b128cb1d
Merge pull request #50102 from nekomatata/expose-body-test-motion-3d
Expose body_test_motion in 3D physics server
2021-07-03 09:29:46 +02:00
PouleyKetchoupp 62e577267f Expose body_test_motion in 3D physics server
Results are exposed through PhysicsTestMotionResult3D, the same way it's
done for 2D.

Also cleaned a few things in the 2D version.
2021-07-02 18:03:44 -07:00
Rémi Verschelde a8fb450b3c
Merge pull request #50092 from YeldhamDev/window_get_contents_expose
Expose `Window.get_contents_minimum_size()` to scripts
2021-07-02 22:12:11 +02:00
Michael Alexsander a829e88ddc Expose Window.get_contents_minimum_size() to scripts 2021-07-02 15:35:56 -03:00
Hugo Locurcio 5370f4876e
Remove leftovers from the DirectionalLight3D Optimized shadow depth range
The Optimized shadow depth range was removed in late 2020 in favor
of the Stable shadow depth range, but it still had a (broken) property
that allowed to enable it.
2021-07-02 20:32:43 +02:00
Hugo Locurcio 7d4c20f9db
Improve and clarify documentation for RandomNumberGenerator 2021-07-02 17:47:52 +02:00
Nick H c6f28ed62b Add get_dead_zone() method to InputMap
This commit adds a new method to the `InputMap`, allowing the user to get the value of an action's dead zone as a float.
2021-07-02 03:07:37 -04:00
Rémi Verschelde ad8a2b3d52
Merge pull request #50040 from reduz/fix-renderingserver-bindings
Clean up RenderingServer and its bindings
2021-07-01 15:17:33 +02:00
reduz 37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
Rémi Verschelde 230a24a49d
Merge pull request #50026 from lyuma/callable_is_valid
Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.x
2021-07-01 12:57:14 +02:00
Lyuma 8f1efa656b Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.x 2021-07-01 02:54:01 -07:00
Eric 525ad7c37e Enable Camera2D smoothing on limit change 2021-06-30 16:21:29 -07:00
Rémi Verschelde 915344fe76
Merge pull request #49834 from nekomatata/physics-disable-modes
Add support for controlling physics nodes' behavior when disabled
2021-06-30 20:36:36 +02:00
Rémi Verschelde 270f9d4c88
Merge pull request #50014 from reduz/remove-immediate
Deprecate ImmediateGeometry
2021-06-30 20:18:59 +02:00
reduz 85cf99f28e Deprecate ImmediateGeometry
* Removed entirely from RenderingServer.
* Replaced by ImmediateMesh resource.
* ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future.
* Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4).
* RootMotionView works again.
* Polygon3D editor works again.
2021-06-30 14:14:41 -03:00
Rémi Verschelde a02620f3a5
Merge pull request #50009 from reduz/fix-suffixes-and-degrees
Fix editor suffixes and degrees conversion
2021-06-30 18:47:40 +02:00
PouleyKetchoupp 5cbdc7a0ac Add support for controlling physics nodes' behavior when disabled
New property disable_mode to set different behaviors:
Remove: remove from physics simulation
MakeStatic: change body mode to static (doesn't affect area and soft body)
KeepActive: do nothing

Extra change:
Handle disable/enable node state with specific notifications, in order
to differentiate global pause from disabled nodes.
2021-06-30 09:20:44 -07:00
reduz 75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
Rémi Verschelde bcd1fc832f
Merge pull request #49901 from nekomatata/move-and-collide-fix-slide
Fix move_and_collide causing sliding on slopes
2021-06-30 02:18:01 +02:00
reduz d07f7c8d25 Fixes to 2D viewport
* Editor 2D viewport now uses embedded subwindows (windows no longer pop up)
* Restored the ability to disable 3D on the 2D viewport (makes 3D not display on 2D when there is a camera on the scene)
2021-06-29 17:40:45 -03:00
Rémi Verschelde 76dc811c76
Merge pull request #49470 from levilindsey/master
Update File.store_var description to mention which properties of an object are included.
2021-06-29 13:59:17 +02:00
Rémi Verschelde 90982d60cb
Merge pull request #37181 from jitspoe/master.button_icon_alignment 2021-06-29 13:31:53 +02:00
Rémi Verschelde dfdde2c598
Merge pull request #49812 from nekomatata/node-path-editor-update
NodePath properly updated in the editor in more cases when nodes are moved or renamed
2021-06-29 12:51:38 +02:00
Rémi Verschelde 36d4314f15
Merge pull request #49921 from SirQuartz/patch-7
Update `Label.clip_text()` Method Description
2021-06-29 12:39:52 +02:00
jitspoe e192eb05db
Add alignment options to icons on buttons.
They can now be centered and right-aligned.

Fixes #11380.
2021-06-29 12:31:40 +02:00
Rémi Verschelde 8fb7a9f023
Merge pull request #49719 from LightningAA/rename-node-is-ancestor-of
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-29 12:07:25 +02:00
Gilles Roudière 30a615dd94 Implement painting properties over TileSets 2021-06-29 11:07:46 +02:00
PouleyKetchoupp 9758a75221 Fix move_and_collide causing sliding on slopes
Make sure the direction of the motion is preserved, unless the depth is
higher than the margin, which means the body needs depenetration in any
direction.

Also changed move_and_slide to avoid sliding on the first motion, in
order to avoid issues with unstable position on ground when jumping.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-06-28 17:17:52 -07:00
Rémi Verschelde 89f270f4c5
Merge pull request #49917 from groud/tree_disable_scroll
Allow disabling scrolling in Tree and implement horizontal scrolling
2021-06-28 18:41:23 +02:00
PouleyKetchoupp 3e4e530523 NodePath properly updated in the editor in more cases
Fix more cases of node path needing an update when nodes are renamed or
moved in the editor.

Built-in node properties:
Before, node paths were checked only for script export variables. Now
all properties are checked from the node, which includes built-in node
properties.
Allows proper node path updates for nodes like remote transform, physics
joints, etc.

Arrays and dictionaries:
Node paths nested in array and dictionary properties are now also
updated in the editor.

Also update the documentation to be clear about node path update in the
editor and at runtime.

Co-authored-by: latorril <latorril@gmail.com>
2021-06-28 09:28:29 -07:00
Gilles Roudière d7d32ced5b Implement Tree's internal minimum width calculation 2021-06-28 15:54:31 +02:00
Hugo Locurcio f28b55b551
Increase the default ReflectionProbe extents to Vector3(10, 10, 10)
On top of having a more realistic size out of the box, this matches
the default VoxelGI extents for better usability.
2021-06-27 16:46:03 +02:00
Nick H ea94aeac48
Amend Label.clip_text() Method Description
This update fixes an inconsistencies in the documentation about the `clip_text()` method.
2021-06-25 23:33:00 -04:00
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
Gilles Roudière b2dddc3c82 Allow disabling scrolling in Tree 2021-06-25 21:19:46 +02:00
kobewi 452e10ba7b Remove clips_input() method and use clip_content 2021-06-25 15:46:37 +02:00
Rémi Verschelde e4430771db
Merge pull request #49885 from reduz/implement-render-pass-support
Implement Framebuffer Subpass support
2021-06-25 15:00:01 +02:00
reduz bde6f5eed1 Implement Framebuffer Subpass support
* Required for better optimizing mobile platforms
* Will be used by the Vulkan mobile renderer.
2021-06-24 15:59:15 -03:00
kobewi 678827bebc Correct the description of Tween.custom_step 2021-06-24 16:01:12 +02:00
Hugo Locurcio b4ed84ba2b
Allow a top and bottom radius equal to 0 in CylinderMesh
The CylinderMesh generation code handles this special case and
avoids generating the top and bottom faces if their radius is equal
to 0. This improves performance by reducing the number of vertices
to draw.

If both values are set to 0, nothing will be visible but the mesh
generation will still succeed.

This also improves the CylinderMesh class documentation.
2021-06-23 18:50:10 +02:00
Lightning_A 899e5f8685 Rename is_a_parent_of() to is_ancestor_of() 2021-06-21 08:39:28 -06:00
Paulb23 1a0cfc219b Move indent management to CodeEdit 2021-06-20 20:00:54 +01:00
Rémi Verschelde 953de68cfc
Merge pull request #35608 from golfinq/master 2021-06-20 18:51:15 +02:00
Aaron Franke 0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
golfinq 0c1d10d1ca Rich Text Label now allows for foreground colors and background colors 2021-06-20 11:29:37 -04:00