diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-13 23:39:11 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-13 23:39:11 +0300 |
commit | 320bc5360cf5ba46c26b70657283915fb7a9d4eb (patch) | |
tree | 9614b776a44596ac3ee23ed6148ce46136b47026 /source/blender/editors/include/ED_anim_api.h | |
parent | 2d88c64b61125d975455d13ecff3e6601742a378 (diff) |
Use panel custom data
Very unstable, and the delete button doesn't work. It's probably
best to just expose graph_panel_context and the equivalent NLA function.
Diffstat (limited to 'source/blender/editors/include/ED_anim_api.h')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 7a5f65a94d0..fc56509e5e2 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -35,6 +35,7 @@ struct ListBase; struct ARegion; struct ARegionType; struct Main; +struct PanelType; struct ReportList; struct ScrArea; struct SpaceLink; @@ -673,18 +674,35 @@ void ANIM_draw_framerange(struct Scene *scene, struct View2D *v2d); /* F-MODIFIER TOOLS */ /* ------------- UI Panel Drawing -------------- */ - -void ANIM_fmodifier_panels(const struct bContext *C, ListBase *fmodifiers); - -void ANIM_fmodifier_type_panel_id(int type, char *r_idname); - -void ANIM_fcm_generator_panel_register(struct ARegionType *region_type); -void ANIM_fcm_fn_generator_panel_register(struct ARegionType *region_type); -void ANIM_fcm_cycles_panel_register(struct ARegionType *region_type); -void ANIM_fcm_noise_panel_register(struct ARegionType *region_type); -void ANIM_fcm_envelope_panel_register(struct ARegionType *region_type); -void ANIM_fcm_limits_panel_register(struct ARegionType *region_type); -void ANIM_fcm_stepped_panel_register(struct ARegionType *region_type); +typedef bool (*PanelTypePollFn)(const struct bContext *C, struct PanelType *pt); +typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname); + +void ANIM_fmodifier_panels(const struct bContext *C, + struct ID *owner_id, + ListBase *fmodifiers, + uiListPanelIDFromDataFunc panel_id_fn); + +void ANIM_fcm_generator_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); +void ANIM_fcm_fn_generator_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); +void ANIM_fcm_cycles_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); +void ANIM_fcm_noise_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); +void ANIM_fcm_envelope_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); +void ANIM_fcm_limits_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); +void ANIM_fcm_stepped_panel_register(struct ARegionType *region_type, + const char *id_prefix, + PanelTypePollFn poll_fn); /* ------------- Copy/Paste Buffer -------------- */ |