summaryrefslogtreecommitdiff
path: root/scene/3d/skeleton_3d.h
AgeCommit message (Collapse)Author
2022-08-30Clean-up/change some Skeleton3D APISilc Renew
2022-08-22Merge pull request #64339 from YuriSizov/core-multilevel-validate-propertyRémi Verschelde
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-08-18add init bone posesSilc Renew
2022-07-26add position track normalization & post process key value for retargetSilc Renew
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-18Implement global restSilc 'Tokage' Renew
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-10-15get rid set_bone_pose and fix some function in SkeletonEditorSilc 'Tokage' Renew
2021-10-13Remove REST transform influence in skeleton bonesreduz
* 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).
2021-10-12Remove animation 3D transform track, replace by loc/rot/scale tracks.reduz
* `Animation.TYPE_TRANSFORM3D` track is gone. * Added POSITION_3D, ROTATION_3D, SCALE_3D tracks. * GLTF2, Collada, FBX importers will only import the track types found. * Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed. * AnimationPlayer and AnimationTree animate these tracks separately, only when found. * Removed BakeReset code, is useless with these changes. This is the first in a series of commits designed to make the animation system in Godot more useful, which includes: * Better compatibility with Autodesk products * Better reusability of animations across models (including retargeting). * Proper animation compression. * etc. *Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-09Fix missing argument names in bindingsRémi Verschelde
While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-10-07Implemented SkeletonEditorGizmoSilc Renew
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-08-14New and improved IK system for Skeleton3DTwistedTwigleg
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-13Fix some unnecessary includesAaron Franke
2021-08-03Use real_t in 3D nodesAaron Franke
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-04Disable Skeleton3D when compiling without 3DAaron Franke
Make animation code not depend on Skeleton3D or even Node3D
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-05-24Unexpose methods and property for binding children to BonesMarcel Admiraal
2021-05-08Fixes the SkeletonIK twisting issue by using the skeleton global pose ↵TwistedTwigleg
without overrides
2021-04-01Merge pull request #42827 from lyuma/rename_bones_blendshapesRémi Verschelde
Allow renaming bones and blendshapes.
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-15Allow renaming bones and blendshapes.Lyuma
2020-06-15Made low level changes to the Skeleton3D class and Skeleton3D inspector. ↵TwistedTwigleg
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-05-22Custom Skeleton3DEditorPluginK. S. Ernest (iFire) Lee
Co-authored-by: Marios Staikopoulos <marios@staik.net>
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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-04-21Add proper type to most public API uses of ArrayJuan Linietsky
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.