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:
authorJoshua Leung <aligorith@gmail.com>2018-04-30 17:40:45 +0300
committerJoshua Leung <aligorith@gmail.com>2018-04-30 17:40:50 +0300
commit9114ebe85094817cd6fe97381193c28840ed16ed (patch)
tree770650cfb77fdc9f5d4528d6aed10321e8671e69 /source/blender/editors/armature/pose_transform.c
parent09dcb6d60c0086e40861264f9a44d9dc131d8e16 (diff)
Multi-Object Pose Fixes for POSE_OT_armature_apply()
This operator was only partially converted to multi-object editing, as on one hand, it was using the new "objects in mode" iterator, while on the other hand, it was also using the context iterator inside that, making all selected bones across armatures get included.
Diffstat (limited to 'source/blender/editors/armature/pose_transform.c')
-rw-r--r--source/blender/editors/armature/pose_transform.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 030a5b398bb..deed786944b 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -225,13 +225,13 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
{
ViewLayer *view_layer = CTX_data_view_layer(C);
- FOREACH_OBJECT_IN_MODE_BEGIN(view_layer, OB_MODE_POSE, ob)
+ FOREACH_OBJECT_IN_MODE_BEGIN(view_layer, OB_MODE_POSE, ob_iter)
{
/* loop over all selected pchans
*
* TODO, loop over children before parents if multiple bones
* at once are to be predictable*/
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
+ FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN (ob_iter, pchan)
{
float delta_mat[4][4];
@@ -247,12 +247,12 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
BKE_pchan_apply_mat4(pchan, delta_mat, true);
}
- CTX_DATA_END;
+ FOREACH_PCHAN_SELECTED_IN_OBJECT_END;
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob_iter);
}
FOREACH_OBJECT_IN_MODE_END;