diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-09 18:11:20 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-09 18:23:41 +0300 |
commit | c35f1d05eaa13348d4f33cdb44f6fb62f68e1ba3 (patch) | |
tree | 698066b5eade15949b0453796c4d9fc466df42ac /source/blender/editors/gpencil | |
parent | 09d26cab0bdde16529debd3e0271252012ba69eb (diff) |
Farewell Scene->basact
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 9 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 1b6261a6bef..5d38ab2340a 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -1669,14 +1669,19 @@ void ED_gpencil_draw_view2d(const bContext *C, bool onlyv2d) /* draw grease-pencil sketches to specified 3d-view assuming that matrices are already set correctly * Note: this gets called twice - first time with only3d=true to draw 3d-strokes, * second time with only3d=false for screen-aligned strokes */ -void ED_gpencil_draw_view3d(wmWindowManager *wm, Scene *scene, View3D *v3d, ARegion *ar, bool only3d) +void ED_gpencil_draw_view3d(wmWindowManager *wm, + Scene *scene, + SceneLayer *scene_layer, + View3D *v3d, + ARegion *ar, + bool only3d) { int dflag = 0; RegionView3D *rv3d = ar->regiondata; int offsx, offsy, winx, winy; /* check that we have grease-pencil stuff to draw */ - bGPdata *gpd = ED_gpencil_data_get_active_v3d(scene, v3d); + bGPdata *gpd = ED_gpencil_data_get_active_v3d(scene, scene_layer); if (gpd == NULL) return; /* when rendering to the offscreen buffer we don't want to diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 4023a343b22..dfefd1aa745 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -204,15 +204,15 @@ bGPdata *ED_gpencil_data_get_active(const bContext *C) /* -------------------------------------------------------- */ // XXX: this should be removed... We really shouldn't duplicate logic like this! -bGPdata *ED_gpencil_data_get_active_v3d(Scene *scene, View3D *v3d) +bGPdata *ED_gpencil_data_get_active_v3d(Scene *scene, SceneLayer *scene_layer) { - BaseLegacy *base = scene->basact; + Base *base = scene_layer->basact; bGPdata *gpd = NULL; /* We have to make sure active object is actually visible and selected, else we must use default scene gpd, * to be consistent with ED_gpencil_data_get_active's behavior. */ - if (base && TESTBASE(v3d, base)) { + if (base && TESTBASE_NEW(base)) { gpd = base->object->gpd; } return gpd ? gpd : scene->gpd; |