Commit Graph

169 Commits

Author SHA1 Message Date
92600420ba Backported from Godot4: Implemented SkeletonEditorGizmo.
-TokageItLab, lyuma
f2e9867e9f
- It still has some issues, as this one works differently than the 3.x version, they will be fixed later.
2022-08-11 17:31:02 +02:00
b6eb2db442 Backported returning AfterGUIInput from forward_spatial_gui_input from Godot4. Also removed the first index parameter. This fully broke the skeleton editor, it will be fixed soon. 2022-08-11 02:24:30 +02:00
58539a22b6 Backported from Godot4: Node3D gizmo improvements
* Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs.
* Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins.
* Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes.
* Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles.
* Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
- JFonS
cfb555a081
- Note: MeshDataResourceEditor is now kind of painful to use, it will be fixed a bit later.
2022-08-11 01:24:29 +02:00
22ce231a4e Backported from Godot 4: New and improved IK system for Skeleton3D
This PR and commit adds a new IK system for 3D with the Skeleton3D node
that adds several new IK solvers, as well as additional changes and functionality
for making bone manipulation in Godot easier.
This work was sponsored by GSoC 2020 and TwistedTwigleg
Full list of changes:
* Adds a SkeletonModification3D resource
  * This resource is the base where all IK code is written and executed
* Adds a SkeletonModificationStack3D resource
  * This node oversees the execution of the modifications and acts as a bridge of sorts for the modifications to the Skeleton3D node
* Adds SkeletonModification3D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK
  * Each modification is in it's own file
* Several changes to Skeletons, listed below:
  * Added local_pose_override, which acts just like global_pose_override but keeps bone-child relationships intract
    * So if you move a bone using local_pose_override, all of the bones that are children will also be moved. This is different than global_pose_override, which only affects the individual bone
  * Internally bones keep track of their children. This removes the need of a processing list, makes it possible to update just a few select bones at a time, and makes it easier to traverse down the bone chain
  * Additional functions added for converting from world transform to global poses, global poses to local poses, and all the same changes but backwards (local to global, global to world). This makes it much easier to work with bone transforms without needing to think too much about how to convert them.
  * New signal added, bone_pose_changed, that can be used to tell if a specific bone changed its transform. Needed for BoneAttachment3D
  * Added functions for getting the forward position of a bone
* BoneAttachment3D node refactored heavily
  * BoneAttachment3D node is now completely standalone in its functionality.
    * This makes the code easier and less interconnected, as well as allowing them to function properly without being direct children of Skeleton3D nodes
  * BoneAttachment3D now can be set either using the index or the bone name.
  * BoneAttachment3D nodes can now set the bone transform instead of just following it. This is disabled by default for compatibility
  * BoneAttachment3D now shows a warning when not configured correctly
* Added rotate_to_align function in Basis
* Added class reference documentation for all changes
- TwistedTwigleg
5ffed49907
Note: It still needs some work.
2022-08-10 01:01:38 +02:00
0ffa8e33a7 Backporter from Godot 4: Unexpose methods and property for binding children to Bones.
- madmiraal
65faa12fd3
2022-08-09 22:05:43 +02:00
a478334d4a Backported from Godot master: Made low level changes to the Skeleton3D class and Skeleton3D inspector. Changes listed below:
* Added helper functions to Skeleton3D for converting transforms from bone space to global space, and vice versa.
* Updated the Skeleton3D class reference.
* Changed the icon used for bones in the Skeleton3D inspector to use BoneAttachement3D's icon.
* Changed the Skeleton3D inspector to use EditorPropertyTransform and EditorPropertyVector3 when possible.
* Placed the Transform/Matrix for each bone in a sub-section, so it is visually similar to the Node3D inspector.
- TwistedTwigleg
24905becb2
- Also fixed smaller issues.
2022-08-09 21:57:46 +02:00
27aaa70037 Added back set_bone_pose to Skeleton, as I don't see any reason not to have it. Also improved it it. 2022-08-09 18:31:47 +02:00
6d293dc7a3 Removed Transform type track from the Animation. This leaves a few things, like the skeleton editor broken, it will be fixed soon. 2022-08-09 17:40:42 +02:00
8fd473f685 Backported: "Remove animation 3D transform track, replace by loc/rot/scale tracks" from Godot4.
ec19ed3723
Its a bit broken right now, more patches need to be ported. Also I kept the Transform track for now, and I did not touch the gltf module yet.
2022-08-08 23:49:18 +02:00
Rémi Verschelde
2ca1470010 File: Re-add support to skip CR (\r) in File::get_as_text
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.

(cherry picked from commit 1418f97c70a5551bdbfeea853cbc479b32ea9e08)
2022-08-02 17:58:32 +02:00
c4e7bc1c45 Reused the old unused PROPERTY_HINT_SPRITE_FRAMES as PROPERTY_HINT_BUTTON. It allows you to add buttons to the inspectors. 2022-07-31 00:01:58 +02:00
9f5fb428ab Ported: Add error messages and docs to explain restrictions when calling NetworkedMultiplayerCustom.initialize()
- dsnopek
5eaf83f2d7
2022-07-30 00:49:12 +02:00
641c15f906 Ported: [3.x] HTML5: Add support for Input.vibrate_handheld() - pattlebass
fb7ecc748f
2022-07-30 00:29:14 +02:00
41ef59bcc8 Ported: Expose VisualServer.viewport_set_use_32_bpc_depth() to the scripting API.
Previously, only the Viewport methods/properties were exposed to the
scripting API. - Calinou
ed4976d1d5
2022-07-29 23:03:48 +02:00
Rémi Verschelde
fa9d1120c4 doc: Fixup reference to Camera 2022-07-29 22:39:58 +02:00
Zak Grumbles
11ab10b7f2 Improve documentation for Camera3D's current member
* Added additional information to the camera documentation to explain
  how the 'current' attribute behaves when multiple cameras are in a
  scene.

(cherry picked from commit 349c750b18acf770ef6f0e43643c8a37a3beb450)
2022-07-29 22:38:52 +02:00
Derwent Ready (drentsoft)
1288e9c520 Clarified usage of TreeItem get_next*() and get_prev*() functions.
(cherry picked from commit df5a9228808497f19b5bddf7b58d2a532cd990d0)
2022-07-29 22:38:35 +02:00
7161d7bc29 Ported: Add NetworkedMultiplayerCustom so high-level multiplayer backends can be added from GDScript. - dsnopek
8ad5889c1a
2022-07-29 22:19:12 +02:00
31136b3669 Ported: Document support limitations for OmniLight cubemap shadows in GLES2 - Calinou
b03ceaba2f
2022-07-29 22:11:41 +02:00
01b1c3e99f Ported: Improve documentation for HTTPRequest's timeout property - Calinou
28b9e376cf
2022-07-29 21:30:22 +02:00
d6637c39a7 Ported: AudioStreamPlayer: Clarify that no validation is made on 'bus' name - akien-mga
685cecbd5f
2022-07-29 21:23:58 +02:00
9af3a7a709 Ported sort() for poolVectors from 7b8b91f505 . 2022-07-29 21:18:44 +02:00
5ebeb6a36c Ported: Add global_translation and global_rotation to Spatial - foxydevloper
5238740fef
2022-07-29 21:02:00 +02:00
3fb2c16ba0 Ported: Input: Re-enable input accumulation disabled by error in 3.4
Input accumulation was implemented and enabled by default in 3.1, and
I don't recall major complaints around it (or bugs were fixed).
In 3.4, #42220 added input buffering and apparently toggled input
accumulation off by mistake.
This led to multiple bug reports about degraded performance on Windows,
or simply unexpected behavior change (see linked issues in #55037).
Fixes #55037.
- akien-mga
d6bcdd18c3
2022-07-29 20:50:00 +02:00
88fe196e79 Ported: [3.x, macOS, Windows, X11] Add stylus inverted/eraser support to InputEventMouseMotion event.
- hansemro
193d5c11f3
2022-07-29 20:31:16 +02:00
Jean-Marc Pelletier
2f9f0ecf8b StyleBox: Document correct methods to draw with a RID
(cherry picked from commit 63d5f3156178fd57fdf991c74833adfd97490c10)
2022-07-29 19:58:55 +02:00
c2f38ef861 Ported:
Input: Document that accumulated input is disabled by default

This was actually disabled by mistake in 3.4 causing a regression, but since
this issue survived the whole 3.4.x series and it's now very close to 3.5,
it's too late to change it again.
We might consider it for 3.6 after some beta testing.
- akien-mga
7de45b6203
2022-07-29 19:42:05 +02:00
16dd2f1141 Ported: Clarify NavigationAgent radius property
Documents Navigation radius property, especially that it affects avoidance only.
- smix8
7aff541538
2022-07-29 18:13:29 +02:00
11a92cfe27 Ported: Add NavigationServer map_force_update() function
Adds map_force_update() function to NavigationServer. This function immediately flushes the Navigationserver command queue and recalculates all navigationmeshes and region connections for a specific map.
- smix8
721c99a530
2022-07-29 17:56:48 +02:00
da20b32f66 Ported: Add NavigationServer.region_owns_point() helper function
Adds a helper function to check if a world space position is currently owned by a navigation region.
- smix8
f0069cc1e9
2022-07-29 17:52:38 +02:00
f811d48449 Ported: Add Navigation function to get all navigation maps
Added new function that returns all created navigation map RIDs from the NavigationServer. The function returns both 2D and 3D created navigation maps as technically there is no distinction between them.
- smix8
38ee593b76
2022-07-29 17:49:24 +02:00
Hugo Locurcio
0e32de0bad Clamp Viewport shadow atlas sizes to improve usability
- Add a range hint to the Viewport `shadow_atlas_size` property.
- Add range steps to the shadow resolution project settings that
  match the lowest allowed values (since lower increments don't
  make sense).
2022-07-29 17:38:06 +02:00
328da6b799 Ported: Print a warning for Viewports that have 2D usage and HDR enabled
2D usage + HDR isn't supported, so the usage must be changed to 3D
to be able to use HDR.
- Calinou
f64d5f4095
2022-07-29 17:36:54 +02:00
6871b0c752 Ported: Only show relevant properties in the DirectionalLight inspector
Some split distance properties are unused depending on the
current shadow mode. Also, Blend Splits and Bias Split Scale can
only be used if the shadow mode is PSSM 2 Splits or PSSM 4 Splits.
- Calinou
1806661462
2022-07-29 17:24:47 +02:00
f78be19966 Ported: Add process_mode property to InterpolatedCamera - saneery
cb94797ce4
2022-07-29 17:19:58 +02:00
Haoyu Qiu
5f3aa5fbd0 Improve String.format() documentation
(cherry picked from commit 25c7f567dd97dab4f407a2afd1e1b8f61b6fb3e1)
2022-07-29 16:37:07 +02:00
da1e62e95b Ported: [3.5] Remove documentation that mentions 2D navigation baking
Cherrypick mentions 2D navigation mesh baking which does only exist very hidden in Godot 3.5.
- smix8
5e1063bd0e
2022-07-29 16:36:49 +02:00
648b9fce40 Ported: Add an option to drag'n'drop selected text in TextEdit - ConteZero
a13b3028a2
2022-07-29 16:29:53 +02:00
smix8
38d7f8dac8 Document limits of using meshes to obstruct navigation mesh baking
Recast (the library used for baking) has no concept of a geometry "inside" and this is intentional. ReCast will add navigation mesh to areas as soon as the area inside a source geometry mesh is large enough to fit a navigation mesh polygon with current baking parameters.

(cherry picked from commit 85cdb1144d0ca845df22a879e001e8fa16288224)
2022-07-29 12:18:39 +02:00
Haoyu Qiu
ba696ecc9b Fix code example of String.is_valid_integer() 2022-07-29 12:18:09 +02:00
Haoyu Qiu
4bbbf1816f Make code example in HTTPRequest classref working 2022-07-29 12:17:27 +02:00
89364f1974 Ported: Clarify that MeshInstance surface methods only apply to override materials - salamandars
22881a6923
2022-07-29 12:01:48 +02:00
6101beb960 Ported: Add NavigationAgent desired path distance - smix8
88e42b2915
2022-07-29 11:36:09 +02:00
Rémi Verschelde
afed6d80bd Node: Rename child_exited_tree to child_exiting_tree
The name was confusing as this signal is emitted around the same time as
`tree_exiting` and `NOTIFICATION_EXIT_TREE`, i.e. while the child node is
still in tree.

Fixes #59210.

(cherry picked from commit 3e6de687b8e9f5c24ff78312208eae6195e6ca40)
2022-07-29 11:03:04 +02:00
Hugo Locurcio
76a2ed0900 Document incremental search support in ItemList, PopupMenu and Tree
(cherry picked from commit 466bd7ce39b232447255cadc26e35289469dc55a)
2022-07-29 11:02:14 +02:00
8ca3043a28 Ported: ProjectSettings: Ensure 'editor/' settings aren't nested
Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.
This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
- akien-mga
acd4a01b8c
2022-07-29 10:45:12 +02:00
2e0589f63a Ported: [3.5] Add NavigationAgent2D/3D set_navigation_map() function
Add NavigationAgent2D/3D set_navigation_map() function. Also fixes some bugs from leftover code before the backport update.
- smix8
c6f9627c74
2022-07-29 10:34:10 +02:00
b7d07a4487 Ported: Tweak default crash handler message in exported projects
When an exported project crashes, the crash handler message
shouldn't reference the Godot issue tracker, as not all crashes
are Godot's fault.
Reporting crashes that only occur on exported projects is still allowed,
but it should not be done by people who aren't working on the project
in question.
- Calinou
bec892c010
2022-07-29 10:17:20 +02:00
Theraot
afafef9f2b Updating AStar2D documentation to mention the new bidirectional paramter
(cherry picked from commit b18a018ad23f95b1f3cdedc74c14e09d666dc346)
2022-07-29 09:14:07 +02:00
Aaron Franke
5ce7851cfd Document limitations of negative scales in 2D and 3D
(cherry picked from commit 3398fb77a915d3f6d7a3dc6bf2398840c696365b)
2022-07-29 09:10:25 +02:00