diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-02 17:05:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-02 17:14:54 +0300 |
commit | 47239b40419750f0ad8284ba1de1012a638660fb (patch) | |
tree | f30d71f14eba9dc25fb1362f3fd27902ff232da4 /source/blender/editors/gpencil | |
parent | 22855f1a60e381d67872e51ed770f67b8417d024 (diff) |
Cleanup: use depsgraph for scene/layer access
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 5286302ddad..546f5e4208a 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -2012,7 +2012,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op) if (mode == GP_REPROJECT_SURFACE) { struct Depsgraph *graph = CTX_data_depsgraph(C); view3d_region_operator_needs_opengl(CTX_wm_window(C), gsc.ar); - ED_view3d_autodist_init(graph, scene, gsc.ar, CTX_wm_view3d(C), 0); + ED_view3d_autodist_init(graph, gsc.ar, CTX_wm_view3d(C), 0); } // TODO: For deforming geometry workflow, create new frames? diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 6659510c6cc..d794e6b8760 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -641,7 +641,7 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure, view3d_region_operator_needs_opengl(p->win, p->ar); ED_view3d_autodist_init( - p->graph, p->scene, p->ar, v3d, (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 1 : 0); + p->graph, p->ar, v3d, (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 1 : 0); } /* convert screen-coordinates to appropriate coordinates (and store them) */ @@ -1242,7 +1242,7 @@ static void gp_stroke_doeraser(tGPsdata *p) if (p->flags & GP_PAINTFLAG_V3D_ERASER_DEPTH) { View3D *v3d = p->sa->spacedata.first; view3d_region_operator_needs_opengl(p->win, p->ar); - ED_view3d_autodist_init(p->graph, p->scene, p->ar, v3d, 0); + ED_view3d_autodist_init(p->graph, p->ar, v3d, 0); } } @@ -1809,7 +1809,7 @@ static void gp_paint_strokeend(tGPsdata *p) /* need to restore the original projection settings before packing up */ view3d_region_operator_needs_opengl(p->win, p->ar); - ED_view3d_autodist_init(p->graph, p->scene, p->ar, v3d, (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 1 : 0); + ED_view3d_autodist_init(p->graph, p->ar, v3d, (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 1 : 0); } /* check if doing eraser or not */ diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 9ed5cf57eec..05b45a2f2eb 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -529,7 +529,7 @@ void gp_point_conversion_init(bContext *C, GP_SpaceConversion *r_gsc) view3d_operator_needs_opengl(C); view3d_region_operator_needs_opengl(win, ar); - ED_view3d_autodist_init(graph, scene, ar, v3d, 0); + ED_view3d_autodist_init(graph, ar, v3d, 0); /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { |