Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-11-23 19:41:38 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-11-23 20:13:14 +0300
commit9be5b2d23fb46a7da22d16decd044324ed8d4e78 (patch)
treec486399ce5c7c2b46cd9aceca7dfba272d8eb598 /source/blender/editors/gpencil/gpencil_utils.c
parent0d0c79e879fe0c7bf1f1d47968c11578a05db7cf (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/gpencil_utils.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c4
1 files changed, 2 insertions, 2 deletions
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;
}