diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-07-15 20:39:02 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-06 10:56:08 +0300 |
commit | 798cdaeeb6927cb9ca42597fa23845eac04c02b2 (patch) | |
tree | 92e444a0a2268d891cdd90f56299ccb8f1c1bf3b /source/blender/blenkernel/BKE_constraint.h | |
parent | a817613be5ab1545b000e9173a8d3079aaaefa01 (diff) |
Implement an Armature constraint that mimics the modifier.
The main use one can imagine for this is adding tweak controls to
parts of a model that are already deformed by multiple other major
bones. It is natural to expect such locations to deform as if the
tweaks aren't there by default; however currently there is no easy
way to make a bone follow multiple other bones.
This adds a new constraint that implements the math behind the Armature
modifier, with support for explicit weights, bone envelopes, and dual
quaternion blending. It can also access bones from multiple armatures
at the same time (mainly because it's easier to code it that way.)
This also fixes dquat_to_mat4, which wasn't used anywhere before.
Differential Revision: https://developer.blender.org/D3664
Diffstat (limited to 'source/blender/blenkernel/BKE_constraint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_constraint.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index cfc7d8e6065..e7672001a15 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -131,11 +131,15 @@ void BKE_constraints_id_loop(struct ListBase *list, ConstraintIDFunc func, void void BKE_constraint_free_data(struct bConstraint *con); void BKE_constraint_free_data_ex(struct bConstraint *con, bool do_id_user); +bool BKE_constraint_target_uses_bbone(struct bConstraint *con, struct bConstraintTarget *ct); + /* Constraint API function prototypes */ struct bConstraint *BKE_constraints_active_get(struct ListBase *list); void BKE_constraints_active_set(ListBase *list, struct bConstraint *con); struct bConstraint *BKE_constraints_find_name(struct ListBase *list, const char *name); +struct bConstraint *BKE_constraint_find_from_target(struct Object *ob, struct bConstraintTarget *tgt); + struct bConstraint *BKE_constraint_add_for_object(struct Object *ob, const char *name, short type); struct bConstraint *BKE_constraint_add_for_pose(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type); |