Commit graph

27 commits

Author SHA1 Message Date
Silc Renew f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
PouleyKetchoupp 39f6ca96a3 Rename Joint2D and Joint3D files for consistency
Now matches the class names to be consistent between 2D and 3D and with
other node types.
2021-10-01 12:00:32 -07:00
TwistedTwigleg 5ffed49907 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
2021-08-14 15:57:00 -04:00
PouleyKetchoupp f9176a39ce Make radius & height in CapsuleShape3D independent
Also changed CapsuleMesh to make settings consistent between render and
physics.
2021-08-11 14:54:53 -07:00
Aaron Franke 9f3ae0adcd
Move code for looking_at to Basis 2021-08-01 12:49:02 -05:00
reduz 6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
kobewi 7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
Aaron Franke 6f472d154b
Rename EditorPropertyTransform to EditorPropertyTransform3D 2021-06-03 21:58:26 -04:00
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Rémi Verschelde 4a1f2dcb74
Merge pull request #47531 from fire/update-skeleton-display
Update Skeleton3D inspector Bone Transforms
2021-04-12 00:19:23 +02:00
Rémi Verschelde d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
K. S. Ernest (iFire) Lee 182accc2e0 Update Skeleton3D inspector Bone Transforms 2021-03-31 09:19:01 -07:00
Aaron Franke 7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector 2021-02-16 18:33:23 -05:00
Rémi Verschelde 887d3ee733
Merge pull request #43875 from addmix/create-physical-skeleton-collider-fix
Create physical skeleton collider orientation fix
2021-01-26 00:35:23 +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
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Rafał Mikrut e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +01:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Addmix 177e62a7e4 Update skeleton_3d_editor_plugin.cpp 2020-11-25 17:35:27 -07:00
Rémi Verschelde 8db8577f10
Merge pull request #39126 from TwistedTwigleg/GSOC_2020_Working_Branch
Skeleton and Skeleton inspector low-level changes
2020-06-16 09:30:22 +02:00
TwistedTwigleg 24905becb2 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.
2020-06-15 17:18:06 -04:00
Sawrr d7a3395332 Unhide Skeleton3D menu button 2020-06-14 16:58:10 -04:00
K. S. Ernest (iFire) Lee f7fdc87789 Custom Skeleton3DEditorPlugin
Co-authored-by: Marios Staikopoulos <marios@staik.net>
2020-05-22 09:54:34 -07:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Renamed from editor/plugins/skeleton_editor_plugin.cpp (Browse further)