diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-11-23 19:41:38 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-23 20:13:14 +0300 |
commit | 9be5b2d23fb46a7da22d16decd044324ed8d4e78 (patch) | |
tree | c486399ce5c7c2b46cd9aceca7dfba272d8eb598 /source/blender/editors/gpencil | |
parent | 0d0c79e879fe0c7bf1f1d47968c11578a05db7cf (diff) |
Pass viewport to BASE_ related tests, for viewport view/select restrictions
Note: functions like select all are still not respecting that.
I will fix this as part of the local view commit though.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 2b2e3772e4d..7f67caf91ca 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -1726,7 +1726,7 @@ void ED_gpencil_draw_view3d( /* check that we have grease-pencil stuff to draw */ // XXX: This is the only place that still uses this function - bGPdata *gpd = ED_gpencil_data_get_active_v3d(view_layer); + bGPdata *gpd = ED_gpencil_data_get_active_v3d(view_layer, v3d); 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 a0c31b64666..aff026955d1 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -264,7 +264,7 @@ bool ED_gpencil_data_owner_is_annotation(PointerRNA *owner_ptr) /* -------------------------------------------------------- */ // XXX: this should be removed... We really shouldn't duplicate logic like this! -bGPdata *ED_gpencil_data_get_active_v3d(ViewLayer *view_layer) +bGPdata *ED_gpencil_data_get_active_v3d(ViewLayer *view_layer, View3D *v3d) { Base *base = view_layer->basact; bGPdata *gpd = NULL; @@ -272,7 +272,7 @@ bGPdata *ED_gpencil_data_get_active_v3d(ViewLayer *view_layer) /* 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(base)) { + if (base && TESTBASE(v3d, base)) { if (base->object->type == OB_GPENCIL) gpd = base->object->data; } |