From 76f4a4da6ad7b225f6c8adc207ece18e5049f663 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Tue, 4 Jun 2024 14:08:06 +0200 Subject: [PATCH] Fix: use `ENUM_OPERATORS` macro correctly for `eInsertKeyFlags` enum We were passing a sentinel maximum enum value to `ENUM_OPERATOR`, which is incorrect. In particular, this caused the bitwise-not operator to work incorrectly and produce invalid values. Pull Request: https://projects.blender.org/blender/blender/pulls/122711 --- source/blender/makesdna/DNA_anim_types.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 72928668ea1..2f0de3e4cb3 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -1064,10 +1064,8 @@ typedef enum eInsertKeyFlags { INSERTKEY_CYCLE_AWARE = (1 << 9), /** don't create new F-Curves (implied by INSERTKEY_REPLACE) */ INSERTKEY_AVAILABLE = (1 << 10), - /* Keep last. */ - INSERTKEY_MAX, } eInsertKeyFlags; -ENUM_OPERATORS(eInsertKeyFlags, INSERTKEY_MAX); +ENUM_OPERATORS(eInsertKeyFlags, INSERTKEY_AVAILABLE); /* ************************************************ */ /* Animation Data */