diff options
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/armature_select.c | 3 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_undo.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_select.c | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index dc7f0bdaf81..e490f21f16d 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -1103,7 +1103,8 @@ bool ED_armature_edit_select_pick_bone(bContext *C, arm->act_edbone = ebone; } - if (view_layer->basact != basact) { + BKE_view_layer_synced_ensure(scene, view_layer); + if (BKE_view_layer_active_base_get(view_layer) != basact) { ED_object_base_activate(C, basact); } diff --git a/source/blender/editors/armature/editarmature_undo.c b/source/blender/editors/armature/editarmature_undo.c index 079225ded59..379ad4f5376 100644 --- a/source/blender/editors/armature/editarmature_undo.c +++ b/source/blender/editors/armature/editarmature_undo.c @@ -97,7 +97,9 @@ static void undoarm_free_data(UndoArmature *uarm) static Object *editarm_object_from_context(bContext *C) { + Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); + BKE_view_layer_synced_ensure(scene, view_layer); Object *obedit = BKE_view_layer_edit_object_get(view_layer); if (obedit && obedit->type == OB_ARMATURE) { bArmature *arm = obedit->data; diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index 9c4590d69b4..6a31c7f1496 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -121,7 +121,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) } } -bool ED_armature_pose_select_pick_bone(const Scene *UNUSED(scene), +bool ED_armature_pose_select_pick_bone(const Scene *scene, ViewLayer *view_layer, View3D *v3d, Object *ob, @@ -159,6 +159,7 @@ bool ED_armature_pose_select_pick_bone(const Scene *UNUSED(scene), } if (found) { + BKE_view_layer_synced_ensure(scene, view_layer); Object *ob_act = BKE_view_layer_active_object_get(view_layer); BLI_assert(BKE_view_layer_edit_object_get(view_layer) == NULL); @@ -268,11 +269,12 @@ bool ED_armature_pose_select_pick_with_buffer(const Scene *scene, return ED_armature_pose_select_pick_bone(scene, view_layer, v3d, ob, nearBone, params); } -void ED_armature_pose_select_in_wpaint_mode(const Scene *UNUSED(scene), +void ED_armature_pose_select_in_wpaint_mode(const Scene *scene, ViewLayer *view_layer, Base *base_select) { BLI_assert(base_select && (base_select->object->type == OB_ARMATURE)); + BKE_view_layer_synced_ensure(scene, view_layer); Object *ob_active = BKE_view_layer_active_object_get(view_layer); BLI_assert(ob_active && (ob_active->mode & OB_MODE_ALL_WEIGHT_PAINT)); |