[Bf-blender-cvs] [a0c462ed424] greasepencil-object: Fix problem when hide collection
Antonio Vazquez
noreply at git.blender.org
Tue Dec 12 17:24:22 CET 2017
Commit: a0c462ed4249ac72656340ad4326430028edd6b3
Author: Antonio Vazquez
Date: Tue Dec 12 17:24:03 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rBa0c462ed4249ac72656340ad4326430028edd6b3
Fix problem when hide collection
When hide the collection the strokes were not hidden.
===================================================================
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index df34beeed64..dbed641863b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -27,6 +27,7 @@
#include "DRW_render.h"
#include "BKE_global.h"
+#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_gpencil.h"
@@ -431,6 +432,11 @@ static void GPENCIL_cache_init(void *vedata)
static void GPENCIL_cache_populate(void *vedata, Object *ob)
{
+ /* object must be visisible */
+ if (!BKE_object_is_visible(ob)) {
+ return;
+ }
+
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
More information about the Bf-blender-cvs
mailing list