Anim: Separate keying flags #115525

Merged
Christoph Lendenfeld merged 31 commits from ChrisLend/blender:autokey_separate_flags into main 2024-01-19 16:26:19 +01:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 872f653f96 - Show all commits

View File

@ -132,7 +132,7 @@ bool is_autokey_on(const Scene *scene);
bool is_autokey_mode(const Scene *scene, eAutokey_Mode mode);
/** Check if a flag is set for auto-key-framing (per scene takes precedence). */
bool is_autokey_flag(const Scene *scene, eKeyInsert_Flag flag);
bool is_autokey_flag(const Scene *scene, eKeying_Flag flag);
/**
* Auto-keyframing feature - checks for whether anything should be done for the current frame.
nathanvegdahl marked this conversation as resolved Outdated

Should we change this function's name to not reference autokeying? is_autokey_flag makes me think that it's specific to flags that only apply to autokeying. But reading further into the PR it looks like it's used in non-autokeying contexts for non-autokeying-specific flags as well.

But maybe I'm confused.

Should we change this function's name to not reference autokeying? `is_autokey_flag` makes me think that it's specific to flags that only apply to autokeying. But reading further into the PR it looks like it's used in non-autokeying contexts for non-autokeying-specific flags as well. But maybe I'm confused.

That's a good point. I've renamed the function to is_keying_flag
and moved the implementation to keyframing.cc

That's a good point. I've renamed the function to `is_keying_flag` and moved the implementation to `keyframing.cc`

View File

@ -80,7 +80,7 @@ bool is_autokey_mode(const Scene *scene, const eAutokey_Mode mode)
return U.autokey_mode == mode;
}
bool is_autokey_flag(const Scene *scene, const eKeyInsert_Flag flag)
bool is_autokey_flag(const Scene *scene, const eKeying_Flag flag)
{
if (scene) {
return (scene->toolsettings->autokey_flag & flag) || (U.autokey_flag & flag);

View File

@ -1286,7 +1286,7 @@ typedef enum eZoomFrame_Mode {
* Not all of those flags are stored in the user preferences (U.autokey_flag).
* Some are stored on the scene (toolsettings.autokey_flag).
*/
typedef enum eKeyInsert_Flag {
typedef enum eKeying_Flag {
/* Settings used across manual and auto-keying. */
KEYING_FLAG_VISUALKEY = (1 << 2),
KEYING_FLAG_XYZ2RGB = (1 << 3),
@ -1301,7 +1301,7 @@ typedef enum eKeyInsert_Flag {
/* Manual Keying options. */
MANUALKEY_FLAG_INSERTNEEDED = (1 << 11),
} eKeyInsert_Flag;
} eKeying_Flag;
typedef enum eKeyInsertChannels {
USER_ANIM_KEY_CHANNEL_LOCATION = (1 << 0),
@ -1314,7 +1314,7 @@ typedef enum eKeyInsertChannels {
/**
* Animation flags
* #UserDef.animation_flag, used for animation flags that aren't covered by more specific flags
* (like eKeyInsert_Flag).
* (like eKeying_Flag).
*/
typedef enum eUserpref_Anim_Flags {
USER_ANIM_SHOW_CHANNEL_GROUP_COLORS = (1 << 0),