Commit Graph

21 Commits

Author SHA1 Message Date
73fa94274b Fixed the bone editor's bone tree. 2022-08-10 12:51:20 +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
cf918406ae Renamed Skeleton's skeleton_updated signal to pose_updated to make the following backports that much easier. 2022-08-09 22:31:17 +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
3b0c27d89c Fixed the skeleton editor. 2022-08-09 18:32:39 +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
cc4dc1e5a8 Backported: Fix create skeleton bone position - Blackiris - 480543f681 2022-03-24 10:43:53 +01:00
8dbfe124f7 Moved my module specific docs under a new central folder. 2022-03-20 12:30:04 +01:00
d740ef5d18 Finished cleaning up includes for the classes under the editor folder. I skipped removing a few that needed more changes to the headers / cpp files for now. 2022-03-19 04:08:34 +01:00
7fd581f987 An another set of header include cleanups for the classes in the engine directory. 2022-03-19 03:10:01 +01:00
bca78798ef Header include cleanups for the classes in the editor folder. 2022-03-19 02:25:58 +01:00
4d7df62b8e Clang format all files. 2022-03-18 19:00:13 +01:00
1bc3c2594c Same change to classes under modules. 2022-03-17 22:33:22 +01:00
052027dce4 Moved more includes to cpp files. 2022-03-17 10:26:23 +01:00
c621049e61 Moved more includes to cpp files. 2022-03-17 09:07:18 +01:00
f105eba923 Moved more includes from headers to cpp files. 2022-03-16 20:40:41 +01:00
1e6a70c77a Fix uninitialized variable warnings. 2022-03-16 10:15:33 +01:00
e85cef1745 Run godot's formatting script. 2022-03-16 09:02:48 +01:00
a9a83271db Removed the default skeleton editor, and made my port the default. Also removed the remover. 2022-03-16 00:36:02 +01:00
49f8e8c398 Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00