Merge remote-tracking branch 'origin/master' into blender2.8
[blender.git] / source / blender / editors / gpencil / gpencil_edit.c
index 726215255aa2ec5636e7b431a6d8e6db0b3f471b..22a3224e5639561737c8e5c431cb9723f3f76a11 100644 (file)
@@ -79,6 +79,8 @@
 #include "ED_view3d.h"
 #include "ED_space_api.h"
 
+#include "DEG_depsgraph.h"
+
 #include "gpencil_intern.h"
 
 /* ************************************************ */
@@ -2108,8 +2110,12 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
        
        /* init autodist for geometry projection */
        if (mode == GP_REPROJECT_SURFACE) {
+               EvaluationContext eval_ctx;
+               CTX_data_eval_ctx(C, &eval_ctx);
+
+               struct Depsgraph *graph = CTX_data_depsgraph(C);
                view3d_region_operator_needs_opengl(CTX_wm_window(C), gsc.ar);
-               ED_view3d_autodist_init(scene, gsc.ar, CTX_wm_view3d(C), 0);
+               ED_view3d_autodist_init(&eval_ctx, graph, gsc.ar, CTX_wm_view3d(C), 0);
        }
        
        // TODO: For deforming geometry workflow, create new frames?