Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/include/ED_keyframes_keylist.h')
-rw-r--r--source/blender/editors/include/ED_keyframes_keylist.h55
1 files changed, 37 insertions, 18 deletions
diff --git a/source/blender/editors/include/ED_keyframes_keylist.h b/source/blender/editors/include/ED_keyframes_keylist.h
index be3eac66771..3a9750c1206 100644
--- a/source/blender/editors/include/ED_keyframes_keylist.h
+++ b/source/blender/editors/include/ED_keyframes_keylist.h
@@ -23,6 +23,8 @@
#pragma once
+#include "BLI_range.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -40,6 +42,8 @@ struct bGPDlayer;
/* ****************************** Base Structs ****************************** */
+struct AnimKeylist;
+
/* Information about the stretch of time from current to the next column */
typedef struct ActKeyBlockInfo {
/* Combination of flags from all curves. */
@@ -133,59 +137,74 @@ typedef enum eKeyframeExtremeDrawOpts {
/* ******************************* Methods ****************************** */
+struct AnimKeylist *ED_keylist_create(void);
+void ED_keylist_free(struct AnimKeylist *keylist);
+const struct ActKeyColumn *ED_keylist_find_exact(const struct AnimKeylist *keylist, float cfra);
+const struct ActKeyColumn *ED_keylist_find_next(const struct AnimKeylist *keylist, float cfra);
+const struct ActKeyColumn *ED_keylist_find_prev(const struct AnimKeylist *keylist, float cfra);
+const struct ActKeyColumn *ED_keylist_find_any_between(const struct AnimKeylist *keylist,
+ const Range2f frame_range);
+bool ED_keylist_is_empty(const struct AnimKeylist *keylist);
+const struct ListBase /* ActKeyColumn */ *ED_keylist_listbase(const struct AnimKeylist *keylist);
+bool ED_keylist_frame_range(const struct AnimKeylist *keylist, Range2f *r_frame_range);
+
/* Key-data Generation --------------- */
/* F-Curve */
void fcurve_to_keylist(struct AnimData *adt,
struct FCurve *fcu,
- struct DLRBT_Tree *keys,
- int saction_flag);
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* Action Group */
void agroup_to_keylist(struct AnimData *adt,
struct bActionGroup *agrp,
- struct DLRBT_Tree *keys,
- int saction_flag);
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* Action */
void action_to_keylist(struct AnimData *adt,
struct bAction *act,
- struct DLRBT_Tree *keys,
- int saction_flag);
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* Object */
void ob_to_keylist(struct bDopeSheet *ads,
struct Object *ob,
- struct DLRBT_Tree *keys,
- int saction_flag);
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* Cache File */
void cachefile_to_keylist(struct bDopeSheet *ads,
struct CacheFile *cache_file,
- struct DLRBT_Tree *keys,
- int saction_flag);
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* Scene */
void scene_to_keylist(struct bDopeSheet *ads,
struct Scene *sce,
- struct DLRBT_Tree *keys,
- int saction_flag);
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* DopeSheet Summary */
-void summary_to_keylist(struct bAnimContext *ac, struct DLRBT_Tree *keys, int saction_flag);
+void summary_to_keylist(struct bAnimContext *ac,
+ struct AnimKeylist *keylist,
+ const int saction_flag);
/* Grease Pencil datablock summary */
void gpencil_to_keylist(struct bDopeSheet *ads,
struct bGPdata *gpd,
- struct DLRBT_Tree *keys,
+ struct AnimKeylist *keylist,
const bool active);
/* Grease Pencil Layer */
-void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct DLRBT_Tree *keys);
+void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct AnimKeylist *keylist);
/* Mask */
-void mask_to_keylist(struct bDopeSheet *ads, struct MaskLayer *masklay, struct DLRBT_Tree *keys);
+void mask_to_keylist(struct bDopeSheet *ads,
+ struct MaskLayer *masklay,
+ struct AnimKeylist *keylist);
/* ActKeyColumn API ---------------- */
/* Comparator callback used for ActKeyColumns and cframe float-value pointer */
short compare_ak_cfraPtr(void *node, void *data);
/* Checks if ActKeyColumn has any block data */
-bool actkeyblock_is_valid(ActKeyColumn *ac);
+bool actkeyblock_is_valid(const ActKeyColumn *ac);
/* Checks if ActKeyColumn can be used as a block (i.e. drawn/used to detect "holds") */
-int actkeyblock_get_valid_hold(ActKeyColumn *ac);
+int actkeyblock_get_valid_hold(const ActKeyColumn *ac);
#ifdef __cplusplus
}