[Bf-blender-cvs] [2f05c79db37] master: Fix T72182: Fade Layers Option does not work when activating a layer from Dope Sheet or Outliner

Antonio Vazquez noreply at git.blender.org
Thu Dec 5 10:19:59 CET 2019


Commit: 2f05c79db37c053a646cdd059ded90e2743427ed
Author: Antonio Vazquez
Date:   Thu Dec 5 10:19:49 2019 +0100
Branches: master
https://developer.blender.org/rB2f05c79db37c053a646cdd059ded90e2743427ed

Fix T72182: Fade Layers Option does not work when activating a layer from Dope Sheet or Outliner

The layer was activated, but the datablock was not tagged to recalc GPU cache.

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

M	source/blender/editors/animation/anim_channels_edit.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/editors/space_outliner/outliner_select.c

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

diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 0fc137295d0..e0b8d485386 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -3115,6 +3115,8 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
         /* update other layer status */
         BKE_gpencil_layer_setactive(gpd, gpl);
         BKE_gpencil_layer_autolock_set(gpd, false);
+        DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
+        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, gpd);
       }
 
       /* Grease Pencil updates */
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 11f18357f7b..d25bca2dc0e 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -818,6 +818,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
           BLI_uniquename(
               &gpd->layers, gpl, "GP Layer", '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
 
+          DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
           WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, gpd);
           break;
         }
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index c96f2f9956f..51e837db4c2 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -557,6 +557,7 @@ static eOLDrawState tree_element_active_gplayer(bContext *C,
   if (set != OL_SETSEL_NONE) {
     if (gpl) {
       BKE_gpencil_layer_setactive(gpd, gpl);
+      DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
       WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, gpd);
     }
   }



More information about the Bf-blender-cvs mailing list