Animation: Move Snapping to Scene #109015

Merged
Christoph Lendenfeld merged 35 commits from ChrisLend/blender:frame_snapping into main 2023-09-05 10:07:02 +02:00
5 changed files with 8 additions and 15 deletions
Showing only changes of commit 6c4058d36e - Show all commits

View File

@ -61,7 +61,6 @@ static SpaceLink *action_create(const ScrArea *area, const Scene *scene)
saction = MEM_cnew<SpaceAction>("initaction");
saction->spacetype = SPACE_ACTION;
saction->autosnap = SACTSNAP_FRAME;
saction->mode = SACTCONT_DOPESHEET;
saction->mode_prev = SACTCONT_DOPESHEET;
saction->flag = SACTION_SHOW_INTERPOLATION | SACTION_SHOW_MARKERS;

View File

@ -61,8 +61,6 @@ static SpaceLink *graph_create(const ScrArea * /*area*/, const Scene *scene)
sipo = static_cast<SpaceGraph *>(MEM_callocN(sizeof(SpaceGraph), "init graphedit"));
sipo->spacetype = SPACE_GRAPH;
sipo->autosnap = SACTSNAP_FRAME;
/* allocate DopeSheet data for Graph Editor */
sipo->ads = static_cast<bDopeSheet *>(MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet"));
sipo->ads->source = (ID *)scene;

View File

@ -56,7 +56,6 @@ static SpaceLink *nla_create(const ScrArea *area, const Scene *scene)
snla->ads->source = (ID *)(scene);
/* set auto-snapping settings */
snla->autosnap = SACTSNAP_FRAME;
snla->flag = SNLA_SHOW_MARKERS;
/* header */

View File

@ -852,8 +852,8 @@ typedef struct SpaceAction {
char mode;
/* Storage for sub-space types. */
char mode_prev;
/** Automatic keyframe snapping mode. */
char autosnap;
/* Snapping now lives on the Scene. */
char autosnap DNA_DEPRECATED;
/** (eTimeline_Cache_Flag). */
char cache_display;
char _pad1[6];
@ -916,7 +916,7 @@ typedef enum eAnimEdit_Context {
SACTCONT_TIMELINE = 6,
} eAnimEdit_Context;
/* SpaceAction AutoSnap Settings (also used by other Animation Editors) */
/* Old snapping enum that is only needed because of the versioning code. */
typedef enum eAnimEdit_AutoSnap {
/* snap to 1.0 frame/second intervals */
SACTSNAP_STEP = 1,
@ -928,7 +928,7 @@ typedef enum eAnimEdit_AutoSnap {
SACTSNAP_SECOND = 4,
/* snap to 1.0 second increments */
SACTSNAP_TSTEP = 5,
} eAnimEdit_AutoSnap;
} eAnimEdit_AutoSnap DNA_DEPRECATED;
/* SAction->cache_display */
typedef enum eTimeline_Cache_Flag {

View File

@ -473,11 +473,8 @@ typedef struct SpaceGraph {
/** Mode for the Graph editor (eGraphEdit_Mode). */
short mode;
/**
* Time-transform auto-snapping settings for Graph editor
* (eAnimEdit_AutoSnap in DNA_action_types.h).
*/
short autosnap;
/* Snapping now lives on the Scene. */
short autosnap DNA_DEPRECATED;

👍 for pointing to the new location.

:+1: for pointing to the new location.
/** Settings for Graph editor (eGraphEdit_Flag). */
int flag;
@ -563,8 +560,8 @@ typedef struct SpaceNla {
char _pad0[6];
/* End 'SpaceLink' header. */
/** This uses the same settings as autosnap for Action Editor. */
short autosnap;
/* Snapping now lives on the Scene. */
short autosnap DNA_DEPRECATED;
short flag;
char _pad[4];