[Bf-blender-cvs] [96a3029ab9f] greasepencil-refactor: GPencil: Fix missing mask icon in Dopesheet

Antonio Vazquez noreply at git.blender.org
Thu Dec 19 08:55:50 CET 2019


Commit: 96a3029ab9f0bb977cbc87d0853e542dd7ae5a5d
Author: Antonio Vazquez
Date:   Thu Dec 19 08:55:41 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB96a3029ab9f0bb977cbc87d0853e542dd7ae5a5d

GPencil: Fix missing mask icon in Dopesheet

The new mask icon was not displayed in Dopesheet channel.

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

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

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

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index a3d8695d186..ec56b1d9d24 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -5092,7 +5092,15 @@ void ANIM_channel_draw_widgets(const bContext *C,
           prop = RNA_struct_find_property(&ptr, "mask_layer");
           gp_rna_path = RNA_path_from_ID_to_property(&ptr, prop);
           if (RNA_path_resolve_property(&id_ptr, gp_rna_path, &ptr, &prop)) {
-            icon = (gpl->flag & GP_LAYER_USE_MASK) ? ICON_MOD_MASK : ICON_LAYER_ACTIVE;
+            icon = ICON_LAYER_ACTIVE;
+            if (gpl->flag & GP_LAYER_USE_MASK) {
+              if (gpl->flag & GP_LAYER_MASK_INVERT) {
+                icon = ICON_HOLDOUT_ON;
+              }
+              else {
+                icon = ICON_MOD_MASK;
+              }
+            }
             uiDefAutoButR(block,
                           &ptr,
                           prop,



More information about the Bf-blender-cvs mailing list