36 #include "RNA_prototypes.h"
83 if (r_owner_id !=
NULL) {
126 if (current_index == new_index) {
159 const char *id_prefix)
170 panel_type->
draw = draw;
171 panel_type->
poll = poll;
207 panel_type->
draw = draw;
208 panel_type->
poll = poll;
213 panel_type->
parent = parent;
229 #define UI_FLT_MAX 10000.0f
232 #define B_FMODIFIER_REDRAW 20
261 uiItemR(row,
ptr,
"use_influence", 0,
"", ICON_NONE);
265 uiItemR(sub,
ptr,
"influence", 0,
"", ICON_NONE);
347 TIP_(
"Delete Modifier"));
373 uiItemR(layout,
ptr,
"mode", 0,
"", ICON_NONE);
384 switch (
data->mode) {
393 for (
int i = 0; i <
data->arraysize; i++) {
415 for (
int i = 2; i <
data->arraysize - 1; i += 2) {
429 const char *id_prefix,
456 uiItemR(layout,
ptr,
"function_type", 0,
"", ICON_NONE);
474 const char *id_prefix,
518 const char *id_prefix,
561 const char *id_prefix,
617 if (i < env->totvert) {
650 env->
data + (index + 1),
693 IFACE_(
"Add Control Point"),
703 TIP_(
"Add a new control-point to the envelope on the current frame"));
710 for (
int i = 0; i < env->totvert; i++, fed++) {
718 uiItemR(row, &ctrl_ptr,
"frame", 0,
NULL, ICON_NONE);
735 TIP_(
"Delete envelope control point"));
744 const char *id_prefix,
777 uiItemR(row,
ptr,
"use_min_x", 0,
"", ICON_NONE);
783 uiItemR(row,
ptr,
"use_min_y", 0,
"", ICON_NONE);
791 uiItemR(row,
ptr,
"use_max_x", 0,
"", ICON_NONE);
797 uiItemR(row,
ptr,
"use_max_y", 0,
"", ICON_NONE);
806 const char *id_prefix,
843 uiItemR(row,
ptr,
"use_frame_start", 0,
"", ICON_NONE);
846 uiItemR(sub,
ptr,
"frame_start", 0,
"", ICON_NONE);
850 uiItemR(row,
ptr,
"use_frame_end", 0,
"", ICON_NONE);
853 uiItemR(sub,
ptr,
"frame_end", 0,
"", ICON_NONE);
859 const char *id_prefix,
891 for (
int i = 0; fcm; i++, fcm = fcm->
next) {
893 panel_id_fn(fcm, panel_idname);
922 const char *modifier_panel_prefix,
934 const char *modifier_panel_prefix,
995 if (modifiers ==
NULL) {
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceGraph * CTX_wm_space_graph(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct FModifier * copy_fmodifier(const struct FModifier *src)
int BKE_fcm_envelope_find_index(struct FCM_EnvelopeData *array, float frame, int arraylen, bool *r_exists)
void copy_fmodifiers(ListBase *dst, const ListBase *src)
const FModifierTypeInfo * fmodifier_get_typeinfo(const struct FModifier *fcm)
struct FModifier * find_active_fmodifier(ListBase *modifiers)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
@ FMI_REQUIRES_ORIGINAL_DATA
bool remove_fmodifier(ListBase *modifiers, struct FModifier *fcm)
void BKE_fcurve_handles_recalc(struct FCurve *fcu)
void free_fmodifiers(ListBase *modifiers)
bool BKE_fcurve_is_cyclic(struct FCurve *fcu)
@ PANEL_TYPE_DEFAULT_CLOSED
@ PANEL_TYPE_HEADER_EXPAND
#define LISTBASE_FOREACH(type, var, list)
struct LinkData * BLI_genericNodeN(void *data)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
void DEG_id_tag_update(struct ID *id, int flag)
@ FMODIFIER_TYPE_FN_GENERATOR
@ FMODIFIER_TYPE_GENERATOR
@ FMODIFIER_TYPE_ENVELOPE
@ FCM_GENERATOR_POLYNOMIAL_FACTORISED
@ FCM_GENERATOR_POLYNOMIAL
@ FMODIFIER_FLAG_USEINFLUENCE
@ FMODIFIER_FLAG_RANGERESTRICT
bool(* PanelTypePollFn)(const struct bContext *C, struct PanelType *pt)
struct NlaStrip * ANIM_nla_context_strip(const struct bContext *C)
void(* uiListPanelIDFromDataFunc)(void *data_link, char *r_idname)
struct FCurve * ANIM_graph_context_fcurve(const struct bContext *C)
void ED_undo_push(struct bContext *C, const char *str)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetActive(uiLayout *layout, bool active)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
uiBut * uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
void uiItemL(uiLayout *layout, const char *name, int icon)
struct PointerRNA * UI_panel_custom_data_get(const struct Panel *panel)
void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data)
struct Panel * UI_panel_add_instanced(const struct bContext *C, struct ARegion *region, struct ListBase *panels, const char *panel_idname, struct PointerRNA *custom_data)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiItemS(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region)
bool UI_panel_list_matches_data(struct ARegion *region, struct ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
void UI_block_align_begin(uiBlock *block)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon)
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2)
SyclQueue void void size_t num_bytes void
#define B_FMODIFIER_REDRAW
static void delete_fmodifier_cb(bContext *C, void *ctx_v, void *fcm_v)
static void panel_register_noise(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *curve)
static void fmodifier_frame_range_draw(const bContext *C, Panel *panel)
static void fmodifier_panel_header(const bContext *C, Panel *panel)
static void cycles_panel_draw(const bContext *C, Panel *panel)
static void set_fmodifier_expand_flag(const bContext *UNUSED(C), Panel *panel, short expand_flag)
void ANIM_fmodifiers_copybuf_free(void)
static void panel_register_stepped(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void fmodifier_frame_range_header_draw(const bContext *C, Panel *panel)
static PanelType * fmodifier_panel_register(ARegionType *region_type, eFModifier_Types type, PanelDrawFn draw, PanelTypePollFn poll, const char *id_prefix)
static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(arg))
static void fmodifier_reorder(bContext *C, Panel *panel, int new_index)
static PointerRNA * fmodifier_get_pointers(const bContext *C, const Panel *panel, ID **r_owner_id)
static void generator_panel_draw(const bContext *C, Panel *panel)
struct FModifierDeleteContext FModifierDeleteContext
static void fn_generator_panel_draw(const bContext *C, Panel *panel)
static void fmod_envelope_deletepoint_cb(bContext *UNUSED(C), void *fcm_dv, void *ind_v)
static void panel_register_cycles(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void noise_panel_draw(const bContext *C, Panel *panel)
static ListBase fmodifier_copypaste_buf
void ANIM_modifier_panels_register_graph_only(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
static void fmodifier_influence_draw(uiLayout *layout, PointerRNA *ptr)
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
void(* PanelDrawFn)(const bContext *, struct Panel *)
static void panel_register_limits(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static ListBase * fmodifier_list_space_specific(const bContext *C)
static void panel_register_envelope(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static short get_fmodifier_expand_flag(const bContext *UNUSED(C), Panel *panel)
static void panel_register_generator(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void limits_panel_draw(const bContext *C, Panel *panel)
static void envelope_panel_draw(const bContext *C, Panel *panel)
static PanelType * fmodifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelTypePollFn poll, PanelType *parent)
bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active)
static void stepped_panel_draw(const bContext *C, Panel *panel)
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBase *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
static void panel_register_fn_generator(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool active
all scheduled work for the GPU.
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
short(* get_list_data_expand_flag)(const struct bContext *C, struct Panel *pa)
void(* draw)(const struct bContext *C, struct Panel *panel)
bool(* poll)(const struct bContext *C, struct PanelType *pt)
void(* draw_header)(const struct bContext *C, struct Panel *panel)
char idname[BKE_ST_MAXNAME]
void(* set_list_data_expand_flag)(const struct bContext *C, struct Panel *pa, short expand_flag)
void(* reorder)(struct bContext *C, struct Panel *pa, int new_index)
char translation_context[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
struct PanelType * parent
char label[BKE_ST_MAXNAME]
char parent_id[BKE_ST_MAXNAME]
void WM_report(eReportType type, const char *message)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)