Commit: 44ec91163374472dc63e17eb1966d659eb9a61f2
Author: Sergey Sharybin
Date:   Mon Nov 14 16:19:11 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB44ec91163374472dc63e17eb1966d659eb9a61f2

Fix T99044: Dopesheet crash when accessing Key menu in Mask mode

The `animdata_filter_mask()` was not respecting the filter flag of
`ANIMFILTER_FCURVESONLY` which lead to cases when animation system
element is effectively cast from `MaskLayer*` to `FCurve*`.

The proposed solution more closely follows the GreasePencil filtering
makes it so when `ANIMFILTER_FCURVESONLY` flag is uses no mask layer
channels will be added.

Differential Revision: https://developer.blender.org/D16498

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

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 3a04873588d..0dd4eab51c3 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -2048,10 +2048,12 @@ static size_t animdata_filter_mask(Main *bmain,
     }
 
     /* add mask animation channels */
-    BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_MASK(mask)) {
-      tmp_items += animdata_filter_mask_data(&tmp_data, mask, filter_mode);
+    if (!(filter_mode & ANIMFILTER_FCURVESONLY)) {
+      BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_MASK(mask)) {
+        tmp_items += animdata_filter_mask_data(&tmp_data, mask, filter_mode);
+      }
+      END_ANIMFILTER_SUBCHANNELS;
     }
-    END_ANIMFILTER_SUBCHANNELS;
 
     /* did we find anything? */
     if (tmp_items) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to