Fix for VIEW3D_OT_snap_selected_to_active

There is no active bone data in the cowed edit armature.

This was introduced on rBe12df10120a0, back when we hoped the depsgraph
would fullfill all our hopes and dreams.

Before the single-context-editing depsgraph reality came crashing on us.
This commit is contained in:
Dalai Felinto 2018-10-09 21:22:31 -03:00
parent 9f2b3fc80e
commit 8c470e26d2
Notes: blender-bot 2023-02-14 06:00:49 +01:00
Referenced by issue #54646, Multi-Object-Mode: Edit Armature Tools
1 changed files with 2 additions and 4 deletions

View File

@ -768,10 +768,8 @@ static bool snap_calc_active_center(bContext *C, const bool select_only, float r
Object *obedit = CTX_data_edit_object(C);
if (obedit) {
Object *ob_edit_eval = DEG_get_evaluated_object(depsgraph, obedit);
if (ED_object_editmode_calc_active_center(ob_edit_eval, select_only, r_center)) {
mul_m4_v3(ob_edit_eval->obmat, r_center);
if (ED_object_editmode_calc_active_center(obedit, select_only, r_center)) {
mul_m4_v3(obedit->obmat, r_center);
return true;
}
}