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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user