[Bf-blender-cvs] [ee5cec4a501] master: Fix T75122: Annotations: Only visible scene annotations in dopesheet

Antonio Vazquez noreply at git.blender.org
Thu Apr 9 10:57:02 CEST 2020


Commit: ee5cec4a5019853b474b044caa17c7ae34b611d7
Author: Antonio Vazquez
Date:   Thu Apr 9 10:56:48 2020 +0200
Branches: master
https://developer.blender.org/rBee5cec4a5019853b474b044caa17c7ae34b611d7

Fix T75122: Annotations: Only visible scene annotations in dopesheet

The loop of datablocks was using the scene datablock (3D View) only, but all others datablocks were ignored.

Now the loop consider any annotation datablock.

===================================================================

M	source/blender/editors/animation/anim_filter.c

===================================================================

diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 38a19e85661..c054691ca38 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1844,11 +1844,15 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
   ViewLayer *view_layer = (ViewLayer *)ac->view_layer;
   Base *base;
 
-  /* Active scene's GPencil block first - No parent item needed... */
-  if (scene->gpd) {
-    items += animdata_filter_gpencil_data(anim_data, ads, scene->gpd, filter_mode);
+  /* Include all annotation datablocks. */
+  if (((ads->filterflag & ADS_FILTER_ONLYSEL) == 0) ||
+      (ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
+    LISTBASE_FOREACH (bGPdata *, gpd, &ac->bmain->gpencils) {
+      if (gpd->flag & GP_DATA_ANNOTATIONS) {
+        items += animdata_filter_gpencil_data(anim_data, ads, gpd, filter_mode);
+      }
+    }
   }
-
   /* Objects in the scene */
   for (base = view_layer->object_bases.first; base; base = base->next) {
     /* Only consider this object if it has got some GP data (saving on all the other tests) */



More information about the Bf-blender-cvs mailing list