45#include "RNA_prototypes.hh"
78 if (elem ==
nullptr) {
160 uiItemO(sub,
IFACE_(
"Cursor to Selection"), ICON_NONE,
"GRAPH_OT_frame_jump");
161 uiItemO(sub,
IFACE_(
"Cursor Value to Selection"), ICON_NONE,
"GRAPH_OT_snap_cursor_value");
192 icon = *optional_icon;
206 if (acf && acf->
name) {
207 acf->
name(ale, name);
257 *r_bezt = *r_prevbezt =
nullptr;
267 *r_bezt = &fcu->
bezt[active_keyframe_index];
269 const int prev_index =
max_ii(active_keyframe_index - 1, 0);
270 *r_prevbezt = &fcu->
bezt[prev_index];
314 const char f1 = bezt->
f1;
315 const char f3 = bezt->
f3;
333 const char f1 = bezt->
f1;
334 const char f3 = bezt->
f3;
359 const int but_max_width = region->winx;
394 uiItemL(split,
IFACE_(
"None for Enum/Boolean"), ICON_IPO_CONSTANT);
481 "Type of left handle");
539 "Type of right handle");
581 uiItemL(layout,
RPT_(
"F-Curve only has F-Modifiers"), ICON_NONE);
582 uiItemL(layout,
RPT_(
"See Modifiers panel below"), ICON_INFO);
587 RPT_(
"F-Curve doesn't have any keyframes as it only contains sampled points"),
591 uiItemL(layout,
RPT_(
"No active keyframe on F-Curve"), ICON_NONE);
604#define B_IPO_DEPCHANGE 10
622 fcu->
flag &= ~FCURVE_DISABLED;
623 driver->
flag &= ~DRIVER_FLAG_INVALID;
626 ID *
id =
static_cast<ID *
>(id_v);
632 if (adt !=
nullptr) {
633 if (adt->
action !=
nullptr) {
636 if (adt->
tmpact !=
nullptr) {
680 uiItemL(layout,
RPT_(
"It cannot be left blank"), ICON_ERROR);
683 uiItemL(layout,
RPT_(
"It cannot start with a number"), ICON_ERROR);
687 RPT_(
"It cannot start with a special character,"
688 " including '$', '@', '!', '~', '+', '-', '_', '.', or ' '"),
692 uiItemL(layout,
RPT_(
"It cannot contain spaces (e.g. 'a space')"), ICON_ERROR);
695 uiItemL(layout,
RPT_(
"It cannot contain dots (e.g. 'a.dot')"), ICON_ERROR);
699 RPT_(
"It cannot contain special (non-alphabetical/numeric) characters"),
703 uiItemL(layout,
RPT_(
"It cannot be a reserved keyword in Python"), ICON_INFO);
718 fcu->
flag &= ~FCURVE_DISABLED;
719 driver->
flag &= ~DRIVER_FLAG_INVALID;
802 uiItemPointerR(
col, &dtar_ptr,
"bone_target", &tar_ptr,
"bones",
"", ICON_BONE_DATA);
812 uiItemPointerR(
col, &dtar2_ptr,
"bone_target", &tar_ptr,
"bones",
"", ICON_BONE_DATA);
837 col, &dtar_ptr,
"bone_target", &tar_ptr,
"bones",
IFACE_(
"Bone"), ICON_BONE_DATA);
853 col, &dtar2_ptr,
"bone_target", &tar_ptr,
"bones",
IFACE_(
"Bone"), ICON_BONE_DATA);
880 col, &dtar_ptr,
"bone_target", &tar_ptr,
"bones",
IFACE_(
"Bone"), ICON_BONE_DATA);
952 TIP_(
"Let the driver determine this property's value"));
976 icon = *optional_icon;
989 uiItemL(row, id->name + 2, icon);
992 uiItemL(row,
"", ICON_RIGHTARROW);
1000 const bool is_popover)
1026 uiItemL(row, valBuf, ICON_NONE);
1035 bool bpy_data_expr_error = (strstr(driver->
expression,
"bpy.data.") !=
nullptr);
1036 bool bpy_ctx_expr_error = (strstr(driver->
expression,
"bpy.context.") !=
nullptr);
1053 uiItemL(
col,
RPT_(
"Python restricted for security"), ICON_ERROR);
1057 uiItemL(
col,
RPT_(
"ERROR: Invalid Python expression"), ICON_CANCEL);
1065 if (bpy_data_expr_error || bpy_ctx_expr_error) {
1066 uiItemL(
col,
RPT_(
"WARNING: Driver expression may not work correctly"), ICON_HELP);
1068 if (bpy_data_expr_error) {
1069 uiItemL(
col,
RPT_(
"TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR);
1071 if (bpy_ctx_expr_error) {
1072 uiItemL(
col,
RPT_(
"TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR);
1082 uiItemL(
col,
RPT_(
"ERROR: Invalid target channel(s)"), ICON_ERROR);
1092 uiItemL(
col,
RPT_(
"ERROR: Driver is useless without any inputs"), ICON_ERROR);
1095 uiItemL(
col,
RPT_(
"TIP: Use F-Curves for procedural animation instead"), ICON_INFO);
1096 uiItemL(
col,
RPT_(
"F-Modifiers can generate curves for those too"), ICON_INFO);
1114 IFACE_(
"Add Input Variable"),
1122 TIP_(
"Add a Driver Variable to keep track of an input used by the driver"));
1128 uiItemO(row,
"", ICON_EYEDROPPER,
"UI_OT_eyedropper_driver");
1135 uiItemO(row,
"", ICON_COPYDOWN,
"GRAPH_OT_driver_variables_copy");
1136 uiItemO(row,
"", ICON_PASTEDOWN,
"GRAPH_OT_driver_variables_paste");
1191 TIP_(
"Invalid variable name, click here for details"));
1207 TIP_(
"Delete target variable"));
1214 switch (dvar->type) {
1242 ELEM(dvar->targets[0].transChan,
1255 SNPRINTF(valBuf,
"%.3f", dvar->curval);
1258 uiItemL(row, valBuf, ICON_NONE);
1276 IFACE_(
"Update Dependencies"),
1284 TIP_(
"Force updates of dependencies - Only use this if drivers are not updating correctly"));
1341 uiBut *but =
nullptr;
1347 bool driven, special;
1350 (
bContext *)C, &
ptr, prop, index,
nullptr,
nullptr, &driven, &special);
1359 if (fcu && fcu->
driver) {
1380 uiItemO(layout,
IFACE_(
"Show in Drivers Editor"), ICON_DRIVER,
"SCREEN_OT_drivers_editor_show");
1391#define B_FMODIFIER_REDRAW 20
1393#define GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH"
1438 uiItemO(row,
"", ICON_COPYDOWN,
"GRAPH_OT_fmodifier_copy");
1439 uiItemO(row,
"", ICON_PASTEDOWN,
"GRAPH_OT_fmodifier_paste");
AnimData * BKE_animdata_from_id(const ID *id)
SpaceGraph * CTX_wm_space_graph(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void BKE_nurb_bezt_handle_test(BezTriple *bezt, eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode, bool use_around_local)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
int BKE_fcurve_active_keyframe_index(const FCurve *fcu)
void BKE_fcurve_handles_recalc(FCurve *fcu)
FCurve * BKE_fcurve_find_by_rna_context_ui(bContext *C, const PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_animdata, bAction **r_action, bool *r_driven, bool *r_special)
void sort_time_fcurve(FCurve *fcu)
struct DriverVar * driver_add_new_variable(struct ChannelDriver *driver)
bool BKE_driver_has_simple_expression(struct ChannelDriver *driver)
void driver_free_variable_ex(struct ChannelDriver *driver, struct DriverVar *dvar)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define BLI_STR_UTF8_DEGREE_SIGN
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define BLT_I18NCONTEXT_EDITOR_FILEBROWSER
void DEG_id_tag_update_ex(Main *bmain, ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ DTAR_OPTION_USE_FALLBACK
@ DVAR_TYPE_TRANSFORM_CHAN
@ DTAR_ROTMODE_QUATERNION
@ DTAR_FLAG_FALLBACK_USED
@ DRIVER_FLAG_PYTHON_BLOCKED
#define FCURVE_ACTIVE_KEYFRAME_NONE
@ DVAR_FLAG_INVALID_START_CHAR
@ DVAR_FLAG_INVALID_EMPTY
@ DVAR_FLAG_INVALID_START_NUM
@ DVAR_FLAG_INVALID_HAS_SPACE
@ DVAR_FLAG_INVALID_HAS_DOT
@ DVAR_FLAG_INVALID_HAS_SPECIAL
@ DVAR_FLAG_INVALID_PY_KEYWORD
#define BEZT_ISSEL_ANY(bezt)
Object is a sort of wrapper for general info.
bool ED_operator_graphedit_active(bContext *C)
void ED_undo_push(bContext *C, const char *str)
Read Guarded memory(de)allocation.
StructRNA * ID_code_to_RNA_type(short idcode)
#define RNA_SUBTYPE_UNIT(subtype)
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
void uiLayoutSetActive(uiLayout *layout, bool active)
uiLayout * uiLayoutBox(uiLayout *layout)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
void uiItemMenuEnumO(uiLayout *layout, const bContext *C, const char *opname, const char *propname, const char *name, int icon)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, const char *tip)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void uiItemS(uiLayout *layout)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, const char *tip)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
void uiItemPointerR(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon)
uiBut * UI_region_active_but_prop_get(const ARegion *region, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *root_ptr, const char *text)
uiBut * uiDefButR(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, PointerRNA *ptr, const char *propname, int index, float min, float max, const char *tip)
void UI_but_unit_type_set(uiBut *but, int unit_type)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr)
const bAnimChannelType * ANIM_channel_get_typeinfo(bAnimListElem *ale)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
std::optional< int > getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
void ANIM_modifier_panels_register_graph_only(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBase *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
bAnimListElem * get_active_fcurve_channel(bAnimContext *ac)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
int RNA_struct_ui_icon(const StructRNA *type)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
void(* draw_header)(const bContext *C, Panel *panel)
void(* name)(bAnimListElem *ale, char *name)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_paneltype_add(PanelType *pt)