diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-18 18:24:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-18 18:24:45 +0400 |
commit | 193e77cc673e6836525ab1a0bad0ff5491e04d23 (patch) | |
tree | ef97381949b0b9bfd5156158d001d0e0a6c51248 /source/blender/editors/include | |
parent | e8630bdccf545f6945b0f64db588168e69cc91a7 (diff) |
Fix T40201: Keyframe edits fail to update the viewport
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 10f3f1bef4c..a712a0d7c45 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -115,6 +115,7 @@ typedef struct bAnimListElem { int flag; /* copy of elem's flags for quick access */ int index; /* for un-named data, the index of the data in it's collection */ + short update; /* tag the element for updating (eAnim_Update_Flags) */ short datatype; /* type of motion data to expect */ void *key_data; /* motion data - mostly F-Curves, but can be other types too */ @@ -123,6 +124,15 @@ typedef struct bAnimListElem { struct AnimData *adt; /* source of the animation data attached to ID block (for convenience) */ } bAnimListElem; +typedef enum eAnim_Update_Flags { + ANIM_UPDATE_DEPS = (1 << 0), /* referenced data and dependencies get refreshed */ + ANIM_UPDATE_ORDER = (1 << 1), /* keyframes need to be sorted */ + ANIM_UPDATE_HANDLES = (1 << 2), /* recalculate handles */ +} eAnim_Update_Flags; + +/* used for most tools which change keyframes (flushed by ANIM_animdata_update) */ +#define ANIM_UPDATE_DEFAULT (ANIM_UPDATE_DEPS | ANIM_UPDATE_ORDER | ANIM_UPDATE_HANDLES) +#define ANIM_UPDATE_DEFAULT_NOHANDLES (ANIM_UPDATE_DEFAULT & ~ANIM_UPDATE_HANDLES) /* Some types for easier type-testing * NOTE: need to keep the order of these synchronized with the channels define code @@ -356,6 +366,11 @@ bool ANIM_animdata_get_context(const struct bContext *C, bAnimContext *ac); */ bool ANIM_animdata_context_getdata(bAnimContext *ac); +/* Acts on bAnimListElem eAnim_Update_Flags */ +void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data); + +void ANIM_animdata_freelist(ListBase *anim_data); + /* ************************************************ */ /* ANIMATION CHANNELS LIST */ /* anim_channels_*.c */ |