diff options
author | Henrik Dick <weasel> | 2020-12-03 12:42:29 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-12-03 13:20:21 +0300 |
commit | a6c4e39876d8a0765290312f6d8c0175274114cd (patch) | |
tree | 98568a07fb46bb643cee07ea0ac08991f4f4db2e /source/blender/blenkernel/BKE_constraint.h | |
parent | 899dcc5f60667a54d9628fcb5656f7e9db642068 (diff) |
Add Custom Object Space to Constraints
Add Custom Space to the list of space conversions for constraints.
Constraints can use World Space, Local Space, Pose Space, Local with
Parent, and now also Custom Space with a custom object to define the
evaluation space.
The Custom Space option uses the Local Space of an other
object/bone/vertex group. If selected on owner or target it will show a
box for object selection. If an armature is selected, then it will also
show a box for bone selection. If a mesh object is selected it will show
the option for using the local space of a vertex group.
Reviewed By: #animation_rigging, sybren, Severin, angavrilov
Differential Revision: https://developer.blender.org/D7437
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 e5c4535560d..4b9f480e091 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -56,6 +56,8 @@ typedef struct bConstraintOb { float matrix[4][4]; /** original matrix (before constraint solving) */ float startmat[4][4]; + /** space matrix for custom object space */ + float space_obj_world_matrix[4][4]; /** type of owner */ short type; @@ -203,6 +205,7 @@ void BKE_constraints_clear_evalob(struct bConstraintOb *cob); void BKE_constraint_mat_convertspace(struct Object *ob, struct bPoseChannel *pchan, + struct bConstraintOb *cob, float mat[4][4], short from, short to, @@ -221,6 +224,7 @@ void BKE_constraint_targets_for_solving_get(struct Depsgraph *depsgraph, struct bConstraintOb *ob, struct ListBase *targets, float ctime); +void BKE_constraint_custom_object_space_get(float r_mat[4][4], struct bConstraint *con); void BKE_constraints_solve(struct Depsgraph *depsgraph, struct ListBase *conlist, struct bConstraintOb *cob, |