Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2022-06-03 16:28:09 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2022-06-30 12:51:26 +0300
commit4a7e1c920979c016fc8a2de325e39617a3a9b94e (patch)
tree5e4e7beace148280d8419bbcbcfad8d1c1d7b044 /source/blender/editors/armature/armature_add.c
parentc64d1b23df877178671e073a264536bdbfba28bb (diff)
Constraints: rename and refactor custom space initialization.
Rename and simplify the function for initializing the custom space, avoiding the need for the calling code to be aware of the internals of bConstraintOb. This patch should not change any behavior. This was split off from D9732. Differential Revision: https://developer.blender.org/D15252
Diffstat (limited to 'source/blender/editors/armature/armature_add.c')
-rw-r--r--source/blender/editors/armature/armature_add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index dd43e3e6613..2071f056f9e 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -422,7 +422,7 @@ static void updateDuplicateActionConstraintSettings(
float mat[4][4];
bConstraintOb cob = {.depsgraph = NULL, .scene = NULL, .ob = ob, .pchan = pchan};
- BKE_constraint_custom_object_space_get(cob.space_obj_world_matrix, curcon);
+ BKE_constraint_custom_object_space_init(&cob, curcon);
unit_m4(mat);
bPoseChannel *target_pchan = BKE_pose_channel_find_name(ob->pose, act_con->subtarget);
@@ -576,7 +576,7 @@ static void updateDuplicateLocRotConstraintSettings(Object *ob,
unit_m4(local_mat);
bConstraintOb cob = {.depsgraph = NULL, .scene = NULL, .ob = ob, .pchan = pchan};
- BKE_constraint_custom_object_space_get(cob.space_obj_world_matrix, curcon);
+ BKE_constraint_custom_object_space_init(&cob, curcon);
BKE_constraint_mat_convertspace(
ob, pchan, &cob, local_mat, curcon->ownspace, CONSTRAINT_SPACE_LOCAL, false);
@@ -631,7 +631,7 @@ static void updateDuplicateTransformConstraintSettings(Object *ob,
float target_mat[4][4], own_mat[4][4], imat[4][4];
bConstraintOb cob = {.depsgraph = NULL, .scene = NULL, .ob = ob, .pchan = pchan};
- BKE_constraint_custom_object_space_get(cob.space_obj_world_matrix, curcon);
+ BKE_constraint_custom_object_space_init(&cob, curcon);
unit_m4(own_mat);
BKE_constraint_mat_convertspace(