45 #include "RNA_prototypes.h"
131 uiItemR(
col, &spaceptr,
"show_cursor", 0,
"", ICON_NONE);
156 uiItemR(sub, &spaceptr,
"cursor_position_x", 0,
IFACE_(
"Cursor X"), ICON_NONE);
159 uiItemR(sub, &sceneptr,
"frame_current", 0,
IFACE_(
"Cursor X"), ICON_NONE);
162 uiItemR(sub, &spaceptr,
"cursor_position_y", 0,
IFACE_(
"Y"), ICON_NONE);
165 uiItemO(sub,
IFACE_(
"Cursor to Selection"), ICON_NONE,
"GRAPH_OT_frame_jump");
166 uiItemO(sub,
IFACE_(
"Cursor Value to Selection"), ICON_NONE,
"GRAPH_OT_snap_cursor_value");
203 if (acf && acf->
name) {
204 acf->
name(ale, name);
207 strcpy(name,
IFACE_(
"<invalid>"));
224 uiItemR(
col, &fcu_ptr,
"data_path", 0,
"", ICON_RNA);
229 uiItemR(
col, &fcu_ptr,
"color_mode", 0,
"Display Color", ICON_NONE);
232 uiItemR(
col, &fcu_ptr,
"color", 0,
"Color", ICON_NONE);
237 uiItemR(
col, &fcu_ptr,
"auto_smoothing", 0,
"Handle Smoothing", ICON_NONE);
254 *r_bezt = *r_prevbezt =
NULL;
264 *r_bezt = &fcu->
bezt[active_keyframe_index];
266 const int prev_index =
max_ii(active_keyframe_index - 1, 0);
267 *r_prevbezt = &fcu->
bezt[prev_index];
313 const char f1 = bezt->
f1;
314 const char f3 = bezt->
f3;
332 const char f1 = bezt->
f1;
333 const char f3 = bezt->
f3;
358 const int but_max_width = region->
winx;
486 "Type of left handle");
550 "Type of right handle");
596 uiItemL(layout,
TIP_(
"F-Curve only has F-Modifiers"), ICON_NONE);
597 uiItemL(layout,
TIP_(
"See Modifiers panel below"), ICON_INFO);
602 TIP_(
"F-Curve doesn't have any keyframes as it only contains sampled points"),
606 uiItemL(layout,
TIP_(
"No active keyframe on F-Curve"), ICON_NONE);
619 #define B_IPO_DEPCHANGE 10
695 uiItemL(layout,
TIP_(
"It cannot be left blank"), ICON_ERROR);
698 uiItemL(layout,
TIP_(
"It cannot start with a number"), ICON_ERROR);
702 TIP_(
"It cannot start with a special character,"
703 " including '$', '@', '!', '~', '+', '-', '_', '.', or ' '"),
707 uiItemL(layout,
TIP_(
"It cannot contain spaces (e.g. 'a space')"), ICON_ERROR);
710 uiItemL(layout,
TIP_(
"It cannot contain dots (e.g. 'a.dot')"), ICON_ERROR);
714 TIP_(
"It cannot contain special (non-alphabetical/numeric) characters"),
718 uiItemL(layout,
TIP_(
"It cannot be a reserved keyword in Python"), ICON_INFO);
800 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);
840 col, &dtar_ptr,
"bone_target", &tar_ptr,
"bones",
IFACE_(
"Bone"), ICON_BONE_DATA);
858 col, &dtar2_ptr,
"bone_target", &tar_ptr,
"bones",
IFACE_(
"Bone"), ICON_BONE_DATA);
888 col, &dtar_ptr,
"bone_target", &tar_ptr,
"bones",
IFACE_(
"Bone"), ICON_BONE_DATA);
892 uiItemR(sub, &dtar_ptr,
"transform_type", 0,
NULL, ICON_NONE);
899 uiItemR(sub, &dtar_ptr,
"rotation_mode", 0,
IFACE_(
"Mode"), ICON_NONE);
902 uiItemR(sub, &dtar_ptr,
"transform_space", 0,
IFACE_(
"Space"), ICON_NONE);
931 uiItemL(row,
"", ICON_RIGHTARROW);
939 const bool is_popover)
967 uiItemL(row, valBuf, ICON_NONE);
976 bool bpy_data_expr_error = (strstr(driver->
expression,
"bpy.data.") !=
NULL);
977 bool bpy_ctx_expr_error = (strstr(driver->
expression,
"bpy.context.") !=
NULL);
985 uiItemR(
col, &driver_ptr,
"expression", 0,
"", ICON_NONE);
993 uiItemL(
col,
TIP_(
"ERROR: Invalid Python expression"), ICON_CANCEL);
1007 if (bpy_data_expr_error || bpy_ctx_expr_error) {
1008 uiItemL(
col,
TIP_(
"WARNING: Driver expression may not work correctly"), ICON_HELP);
1010 if (bpy_data_expr_error) {
1011 uiItemL(
col,
TIP_(
"TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR);
1013 if (bpy_ctx_expr_error) {
1014 uiItemL(
col,
TIP_(
"TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR);
1024 uiItemL(
col,
TIP_(
"ERROR: Invalid target channel(s)"), ICON_ERROR);
1034 uiItemL(
col,
TIP_(
"ERROR: Driver is useless without any inputs"), ICON_ERROR);
1037 uiItemL(
col,
TIP_(
"TIP: Use F-Curves for procedural animation instead"), ICON_INFO);
1038 uiItemL(
col,
TIP_(
"F-Modifiers can generate curves for those too"), ICON_INFO);
1056 IFACE_(
"Add Input Variable"),
1066 TIP_(
"Add a Driver Variable to keep track of an input used by the driver"));
1072 uiItemO(row,
"", ICON_EYEDROPPER,
"UI_OT_eyedropper_driver");
1079 uiItemO(row,
"", ICON_COPYDOWN,
"GRAPH_OT_driver_variables_copy");
1080 uiItemO(row,
"", ICON_PASTEDOWN,
"GRAPH_OT_driver_variables_paste");
1119 uiItemR(sub, &dvar_ptr,
"name", 0,
"", ICON_NONE);
1138 TIP_(
"Invalid variable name, click here for details"));
1156 TIP_(
"Delete target variable"));
1163 switch (dvar->
type) {
1201 uiItemL(row, valBuf, ICON_NONE);
1217 IFACE_(
"Update Dependencies"),
1227 TIP_(
"Force updates of dependencies - Only use this if drivers are not updating correctly"));
1290 bool driven, special;
1302 if (fcu && fcu->
driver) {
1324 uiItemO(layout,
IFACE_(
"Show in Drivers Editor"), ICON_DRIVER,
"SCREEN_OT_drivers_editor_show");
1335 #define B_FMODIFIER_REDRAW 20
1337 #define GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH"
1379 row, (
bContext *)
C,
"GRAPH_OT_fmodifier_add",
"type",
IFACE_(
"Add Modifier"), ICON_NONE);
1383 uiItemO(row,
"", ICON_COPYDOWN,
"GRAPH_OT_fmodifier_copy");
1384 uiItemO(row,
"", ICON_PASTEDOWN,
"GRAPH_OT_fmodifier_paste");
1403 strcpy(pt->
idname,
"GRAPH_PT_properties");
1404 strcpy(pt->
label,
N_(
"Active F-Curve"));
1412 strcpy(pt->
idname,
"GRAPH_PT_key_properties");
1413 strcpy(pt->
label,
N_(
"Active Keyframe"));
1421 strcpy(pt->
idname,
"GRAPH_PT_driven_property");
1422 strcpy(pt->
label,
N_(
"Driven Property"));
1430 strcpy(pt->
idname,
"GRAPH_PT_drivers");
1431 strcpy(pt->
label,
N_(
"Driver"));
1439 strcpy(pt->
idname,
"GRAPH_PT_drivers_popover");
1440 strcpy(pt->
label,
N_(
"Add/Edit Driver"));
1451 strcpy(pt->
idname,
"GRAPH_PT_modifiers");
1452 strcpy(pt->
label,
N_(
"Modifiers"));
1464 strcpy(pt->
idname,
"GRAPH_PT_view");
1465 strcpy(pt->
label,
N_(
"Show Cursor"));
struct AnimData * BKE_animdata_from_id(const struct ID *id)
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceGraph * CTX_wm_space_graph(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt, eBezTriple_Flag__Alias sel_flag, bool use_handle, bool use_around_local)
struct FCurve * BKE_fcurve_find_by_rna_context_ui(struct bContext *C, const struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, struct AnimData **r_animdata, struct bAction **r_action, bool *r_driven, bool *r_special)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
void sort_time_fcurve(struct FCurve *fcu)
void BKE_fcurve_handles_recalc(struct FCurve *fcu)
int BKE_fcurve_active_keyframe_index(const struct FCurve *fcu)
bool BKE_driver_has_simple_expression(struct ChannelDriver *driver)
struct DriverVar * driver_add_new_variable(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)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
@ DVAR_TYPE_TRANSFORM_CHAN
@ DTAR_ROTMODE_QUATERNION
#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(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.
#define RNA_SUBTYPE_UNIT(subtype)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, 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 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)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *root_ptr, const char *text)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemMenuEnumO(uiLayout *layout, struct bContext *C, const char *opname, const char *propname, const char *name, int icon)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
uiLayout * uiLayoutBox(uiLayout *layout)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void uiItemS(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
uiBut * uiDefButR(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
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 uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon)
uiBut * UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
void UI_but_unit_type_set(uiBut *but, int unit_type)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
const bAnimChannelType * ANIM_channel_get_typeinfo(bAnimListElem *ale)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
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)
struct bAnimListElem * get_active_fcurve_channel(struct bAnimContext *ac)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
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)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
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]
char translation_context[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
void(* name)(bAnimListElem *ale, char *name)
struct ID * fcurve_owner_id
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_paneltype_add(PanelType *pt)