Commit Graph

  • 521934ff55 Ported from Godot4: New and improved IK system for Skeleton2D This PR and commit adds a new IK system for 2D with the Skeleton2D node that adds several new IK solvers, a way to control bones in a Skeleton2D node similar to that in Skeleton3D. It also adds additional changes and functionality. This work was sponsored by GSoC 2020 and TwistedTwigleg. Full list of changes: * Adds a SkeletonModifier2D resource * This resource is the base where all IK code is written and executed * Has a function for clamping angles, since it is so commonly used * Modifiers are unique when duplicated so it works with instancing * Adds a SkeletonModifierStack2D resource * This resource manages a series of SkeletonModification2Ds * This is what the Skeleton2D directly interfaces with to make IK possible * Adds SkeletonModifier2D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK * Each modification is in its own file * There is also a SkeletonModifier2D resource that acts as a stack for using multiple stacks together * Adds a PhysicalBone2D node * Works similar to the PhysicalBone3D node, but uses a RigidBody2D node * Changes to Skeleton2D listed below: * Skeleton2D now holds a single SkeletonModificationStack2D for IK * Skeleton2D now has a local_pose_override, which overrides the Bone2D position similar to how the overrides work in Skeleton3D * Changes to Bone2D listed below: * The default_length property has been changed to length. Length is the length of the bone to its child bone node * New bone_angle property, which is the angle the bone has to its first child bone node * Bone2D caches its transform when not modified by IK for IK interpolation purposes * Bone2D draws its own editor gizmo, though this is stated to change in the future * Changes to CanvasItemEditor listed below: * Bone2D gizmo drawing code removed * The 2D IK code is removed. Now Bone2D is the only bone system for 2D * Transform2D now has a looking_at function for rotating to face a position * Two new node notifications: NOTIFICATION_EDITOR_PRE_SAVE and NOTIFICATION_EDITOR_POST_SAVE * These notifications only are called in the editor right before and after saving a scene * Needed for not saving the IK position when executing IK in the editor * Documentation for all the changes listed above. - TwistedTwigleg 8aa3c2f091 Relintai 2022-08-18 18:47:30 +0200
  • 6be9bf5dfe Cleaned up and added the skeleton modification stack implementations to the build. Also smaller fixes. Relintai 2022-08-18 15:41:28 +0200
  • a09d72ea7d Added an another commit to todos. Relintai 2022-08-18 13:58:04 +0200
  • 0a81c2f9dd Fix typo. Relintai 2022-08-18 13:07:31 +0200
  • 28e7e7fb5c Added a few todos. Relintai 2022-08-18 13:04:58 +0200
  • 23610db948 Fix build. Relintai 2022-08-18 13:04:52 +0200
  • 3df74faf8c Removed the old dependency sorting system. Relintai 2022-08-18 12:54:39 +0200
  • 6ff120dc85 Moved the old module dependencies to the new system. Relintai 2022-08-18 12:53:49 +0200
  • 91fe9ed8ca Backported: [Scons] Implement module dependency sorting. Modules can now call: env.module_add_dependencies(name: str, deps: list, optional: bool) To add required or optional dependencies during the "can_build" step. Required dependencies will be checked and the module will be not be enabled when they are missing, printing a warning to notify the user. - Faless 951a1016d3 Relintai 2022-08-18 12:44:45 +0200
  • 4732493761 Backported: SCons: Validate dependencies for linked multimedia modules This is still a bit hacky and eventually we should rework the way we handle optional dependencies (especially with regard to builtin/system libs), but it's a simple first step. - akien-mga 7c74312217 Relintai 2022-08-18 12:25:38 +0200
  • 4c4e19223e Added _theme_ infix to the theme helper methods in Control. Relintai 2022-08-17 20:57:16 +0200
  • f8c50f271b Fix include. Relintai 2022-08-17 18:12:48 +0200
  • 9757c39f05 Moved a few more core classes. Relintai 2022-08-17 17:43:49 +0200
  • 99e94b08c4 Moved base input related classes to core/input. Relintai 2022-08-17 17:02:24 +0200
  • 686663d3e4 Moved around more classes in core. Relintai 2022-08-17 16:01:01 +0200
  • 04feb63860 Moved Engine and projectSettings. Relintai 2022-08-17 15:35:28 +0200
  • be16fe23ad Moved the error macros. Relintai 2022-08-17 15:14:19 +0200
  • 220b2db443 Moved String and related classes under a string folder in core. Relintai 2022-08-17 14:19:55 +0200
  • dc9cc716c7 Moved Object related classes under core/object. Relintai 2022-08-17 13:45:14 +0200
  • 9555ee56b9 Moved Variant related classes under a variant folder in core. Relintai 2022-08-17 13:17:12 +0200
  • 388b88678e Moved container related classes in core under a new containers directory. Relintai 2022-08-17 12:53:49 +0200
  • 0d2fc2e9f2 Moved color to core/math. Relintai 2022-08-17 11:38:15 +0200
  • 9720bfd4ca Added a few things to the todos file. Relintai 2022-08-17 11:38:03 +0200
  • 73709fa1ae Backported from Godot4: Clean up Hash Functions Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better) - reduz 141c375581 Relintai 2022-08-17 10:42:50 +0200
  • d9669b0ed0 Ported form godot4: Reformat structure string operators The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant). -aaronfranke 554c776e08 Relintai 2022-08-16 22:46:24 +0200
  • 3b4b25b5f8 Add working bindings for Projection's get_projection_plane. Relintai 2022-08-16 22:33:56 +0200
  • 9e1588160f Now all Variant math types are structs. Relintai 2022-08-16 22:09:26 +0200
  • e71e3ed897 Now Vector4, Vector4i, Projection, PoolVector4Array, PoolVector4iArray, are built in variant types. Also reordered the Variant's Type enum, renamed _RID in it to RID, fixed a few smaller issues and removed some very old compat code. Relintai 2022-08-16 21:55:56 +0200
  • 8c2e76840c Removed CameraMatrix, and switched to Projection. Relintai 2022-08-16 10:26:35 +0200
  • 904c88c403 Actually fix sign compare warning. Relintai 2022-08-16 01:44:25 +0200
  • 7e5896d81b Bind everything in String. Relintai 2022-08-16 01:41:51 +0200
  • eb43e1dfc9 Fixed an another sign compare warning. Relintai 2022-08-16 01:23:54 +0200
  • b796390962 And an another one. Relintai 2022-08-16 00:14:52 +0200
  • 5f6c223dc4 Fix typo. Relintai 2022-08-16 00:14:08 +0200
  • c5670d501f Fix an another sign compare warning. Relintai 2022-08-16 00:13:07 +0200
  • 87149557b2 Fix sign comparison warning. Relintai 2022-08-15 23:12:44 +0200
  • 220954cf08 Backported most of the improvements to String from Godot4. Relintai 2022-08-15 22:54:03 +0200
  • d08526393e Bind everything in Vector3i. Relintai 2022-08-15 18:31:59 +0200
  • feb5c025cf Bind everything in Vector3. Relintai 2022-08-15 18:22:55 +0200
  • e4aebe1783 Bind everything in Vector2i. Relintai 2022-08-15 17:40:36 +0200
  • 88fbeb4fe4 Bind everything in Vector2. Relintai 2022-08-15 17:20:15 +0200
  • a7b777fd62 Added an another TODO. Relintai 2022-08-15 16:37:43 +0200
  • 608ba7826a Ported improvements to Vector2, Vector2i, Vector3, Vector3i, Vector4, and Vector4i from Godot4. Relintai 2022-08-15 16:13:21 +0200
  • bdd94e5b26 Added an another todo. Relintai 2022-08-15 13:50:05 +0200
  • 4bbe1024b5 Todos. Relintai 2022-08-15 13:44:33 +0200
  • 4cc1e75f69 Backported improvements to Quaternion from Godot4. Also bound all eligible methods. Relintai 2022-08-15 13:00:32 +0200
  • f73af59416 Bound more methods. Relintai 2022-08-15 09:34:29 +0200
  • 007f728438 Bound all eligible transform methods. Relintai 2022-08-15 09:20:47 +0200
  • bdf93bebcc Added a few todos. Relintai 2022-08-15 02:15:23 +0200
  • 5cd44e02d0 Backported the improvements to Transform from Godot4. Relintai 2022-08-14 20:35:11 +0200
  • e9bb723975 Backported some improvements to Transform2D from Godot4. Also bound all eligible methods. Relintai 2022-08-14 19:19:51 +0200
  • e4cad690a3 Renamed elements in Transform2D to columns. Relintai 2022-08-14 15:37:05 +0200
  • d9a8497546 Renamed translate in Transform2D to translate_local. Relintai 2022-08-14 14:59:46 +0200
  • 662c3a7e88 Also did Rect2i. Relintai 2022-08-14 14:00:32 +0200
  • 899ac5cbd8 Backported some improvements to Rect2 from Godot4. Also bound all eligible methods. Relintai 2022-08-14 13:15:22 +0200
  • 7650103ce7 Backported some improvements to Plane from Godot4. Also bound all eligible methods. Relintai 2022-08-14 10:52:57 +0200
  • c7d2307bd5 Backported some of the improvements to Color from Godot4. Also bound all eligible methods. Relintai 2022-08-14 01:08:59 +0200
  • 170a41ca82 Backported improvements to Basis from Godot4. Also bound all eligible methods. Relintai 2022-08-14 00:18:21 +0200
  • d9e094ab9a Renamed elements in Basis to rows. Relintai 2022-08-13 19:07:59 +0200
  • c991043c95 Backported improvements to AABB from Godot 4. Also made sure all eligible methods are bound. Relintai 2022-08-13 18:21:54 +0200
  • 6523457c0f Backported the improvements to the Math class from Godot4. Relintai 2022-08-13 16:49:47 +0200
  • 730bce8587 Renamed Quat to Quaternion for consistency with the other engine math classes. Relintai 2022-08-13 15:22:33 +0200
  • f423b30714 Backported from Godot4: Fix secondary handles in editor gizmos Primary and secondary handles are no longer differentiated by their ids, so a bool was added to tell them apart in all the handle-related methods. Includes a minor fix in CollisionPolygon3DEditor, unrelated to editor gizmos. - JFonS 5ebea2d120 Relintai 2022-08-12 22:21:00 +0200
  • 88da0c8d4f Backported from Godot4: Fix animation player crashing when caching disabled tracks - MinusKube a73882305c Relintai 2022-08-12 18:42:34 +0200
  • 47358bfaab Backported: add viewport.get_camera_2d() Relintai 2022-08-12 18:29:04 +0200
  • f51c08120e Backported from Godot4: improved way of getting method track keys - TokageItLab dedc4710a3 Relintai 2022-08-12 17:48:00 +0200
  • 65f8c774a8 Backported from Godot 4: Fixed value track blend animation without RESET - TokageItLab 0fe723a1ac Relintai 2022-08-12 17:28:51 +0200
  • ec9eb18aaf Backported from Godot4: Make blend animation to use ResetTrack as default value - TokageItLab 860fac4e6f Relintai 2022-08-12 17:16:52 +0200
  • d1fe0ae433 Backported from Godot4: Fix blend animation to solve TRS track bug & blend order inconsistency - TokageItLab b06d253920 Relintai 2022-08-12 16:48:31 +0200
  • a84be665ec Use AnimationPlayer's root property instead of just getting it's parent when exprting a GLTFDocument. Relintai 2022-08-12 13:59:27 +0200
  • 82550d10e3 Also update BoneAttachment handling code. Relintai 2022-08-12 12:58:04 +0200
  • d5158716d9 Update the logic of _convert_animation_track in GLTFDocument. Relintai 2022-08-12 12:57:02 +0200
  • e3918692a3 Backported from Godot 4: Fixed animation insertion in SkeletonEditor - TokageItLab 653e2a550c Relintai 2022-08-12 01:34:45 +0200
  • 2bc7355910 Ported from Godot4: Fixes to editor subgizmos * Fixed subgizmo editing on scaled nodes. * Added more clarifications on the coordinate space of subgizmos. * Given input priority to the transform gizmo over subgizmo selection. - JFonS d7b58ebc9c Relintai 2022-08-12 00:43:53 +0200
  • 4b939998a7 Removed AnimationTreePlayer, as it was deprecated (and also practically unusable). Relintai 2022-08-11 23:01:27 +0200
  • ab86ae7c2c Backported form godot4: Respect disabled animation tracks - reduz 11805ac01d Relintai 2022-08-11 22:50:39 +0200
  • dc3500ec17 Fixed BoneAttachments. Relintai 2022-08-11 22:32:32 +0200
  • 502f8f85c5 Fix infinite recursion issues in Skeleton. Relintai 2022-08-11 22:32:25 +0200
  • 575b830f68 Fixed AnimationTree animating Spatials. Relintai 2022-08-11 22:08:44 +0200
  • 9d9271b518 Removed the SNAME macro, I'll probably keep static counting support for StringNames though. Relintai 2022-08-11 20:22:51 +0200
  • 6825202490 Removed warning. Relintai 2022-08-11 20:11:43 +0200
  • 5e3c3ff4d0 Ported from Godot4: Implement global rest - TokageItLab 4d4ffa3a2c Relintai 2022-08-11 20:10:26 +0200
  • da62c587e8 Ported from Godot4: get rid set_bone_pose and fix some function in SkeletonEditor - TokageItLab 8e9897b6de Relintai 2022-08-11 19:57:23 +0200
  • 36b5334282 Ported from Godot4: Fix for SkeletonModification3Ds to work with the new bone pose changes, fixed global_pose_to_local_pose function - TwistedTwigleg 0cedc04769 Relintai 2022-08-11 19:09:58 +0200
  • 109a0ca81b Ported from Godot4: Remove REST transform influence in skeleton bones * Animations and Skeletons are now pose-only. * Rest transform is kept as reference (when it exists) and for IK * Improves 3D model compatibility (non uniform transforms will properly work, as well as all animations coming from Autodesk products). - reduz 2dc823273e Relintai 2022-08-11 19:06:33 +0200
  • 15a5bea727 Clear surfaces in ImmediateMesh before adding a new one. Relintai 2022-08-11 18:09:33 +0200
  • 4db7bba945 Now ImmediateMesh actually sends the expected data to the VisualServer. Relintai 2022-08-11 17:56:31 +0200
  • 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. Relintai 2022-08-11 17:31:02 +0200
  • d662b2f3c9 Fix unused variable. Relintai 2022-08-11 12:31:24 +0200
  • 1b743e8a6d Fixed comparison of integer expressions of different signedness warnings. Relintai 2022-08-11 12:28:04 +0200
  • dd250bf678 Backported ImmediateMesh from Godot4. Relintai 2022-08-11 12:23:36 +0200
  • aebf3ecc9d Ported some missing changes. Relintai 2022-08-11 11:20:37 +0200
  • 3cbdd9cfa1 Removed Module prefix / infix from the skeleton editor's classes. Also now the module only has one EditorPlugin. Relintai 2022-08-11 10:59:22 +0200
  • 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. Relintai 2022-08-11 02:24:30 +0200
  • 061bdd1f2e Fix shadowed declaration. Relintai 2022-08-11 01:33:57 +0200
  • e3e39a1b2a Now EditorNode3DGizmo::add_mesh accepts a Mesh instead of an ArrayMesh. Relintai 2022-08-11 01:30:54 +0200
  • 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. Relintai 2022-08-11 01:24:29 +0200
  • ed5024d3c3 Moved AnimationPlayerEditor::singleton to private, and added getter method for it. Relintai 2022-08-10 18:53:15 +0200
  • 7e451e0f30 Removed the built in SkeletonSpatialGizmoPlugin. (The skeleton editor module used to remove it anyway.) Relintai 2022-08-10 14:44:15 +0200
  • 07fa703645 Improvements to the skeleton's gizmo. It still has issues though. I'll get back to it later. Relintai 2022-08-10 14:28:26 +0200