Fix for VIEW3D_OT_snap_selected_to_active
authorDalai Felinto <dfelinto@gmail.com>
Wed, 10 Oct 2018 00:22:31 +0000 (21:22 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 10 Oct 2018 00:28:06 +0000 (21:28 -0300)
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.

source/blender/editors/space_view3d/view3d_snap.c

index 58406470f36f6d6034fe5dde91c3d46d13009aa2..97b9a5c84e055c3cd6e6bd159b1ee0434f84edb0 100644 (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;
                }
        }