Commit: 56fd63e1ad4f8e8e9ce66220127ecbf80b6e39e1
Author: Bastien Montagne
Date:   Fri Aug 3 10:17:00 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB56fd63e1ad4f8e8e9ce66220127ecbf80b6e39e1

Fix T55791: blender 2.8 crash on redoing 'snap to cursor' with Offset option ON.

Many snap_to operators need a fully evaluated depsgraph to run
properly...

===================================================================

M       source/blender/editors/space_view3d/view3d_snap.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_snap.c 
b/source/blender/editors/space_view3d/view3d_snap.c
index 6cb0db94099..15be77ff6ab 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -221,7 +221,7 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
        ot->poll = ED_operator_region_view3d_active;
 
        /* flags */
-       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA;
 }
 
 /* *************************************************** */
@@ -449,7 +449,7 @@ void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)
        ot->poll = ED_operator_view3d_active;
 
        /* flags */
-       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA;
 
        /* rna */
        RNA_def_boolean(ot->srna, "use_offset", 1, "Offset",
@@ -483,7 +483,7 @@ void VIEW3D_OT_snap_selected_to_active(wmOperatorType *ot)
        ot->poll = ED_operator_view3d_active;
 
        /* flags */
-       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA;
 }
 
 
@@ -712,7 +712,7 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
        ot->poll = ED_operator_view3d_active;
 
        /* flags */
-       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA;
 }
 
 /* ********************************************** */
@@ -794,7 +794,7 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
        ot->poll = ED_operator_view3d_active;
 
        /* flags */
-       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA;
 }
 
 /* **************************************************** */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to