61 #define USE_KEYMAP_ADD_HACK
74 if (member_id ==
NULL) {
79 const char *member_id_data_path = member_id;
82 member_id_data_path =
BLI_sprintfN(
"%s.%s", member_id, data_path);
87 const char *final_data_path =
BLI_sprintfN(
"%s.%s", member_id_data_path, prop_id);
89 if (member_id != member_id_data_path) {
117 if (*r_prop ==
NULL) {
120 return "WM_OT_context_toggle";
125 if (*r_prop ==
NULL) {
128 return "WM_OT_context_menu_enum";
146 char shortcut_str[128];
150 if (idname ==
NULL) {
156 C, idname, but->
opcontext, prop,
true, shortcut_str,
sizeof(shortcut_str))) {
184 U.runtime.is_dirty =
true;
209 block, 6 *
U.dpi_fac, (
const int[2]){-100 * U.dpi_fac, 36 * U.dpi_fac});
216 #ifdef USE_KEYMAP_ADD_HACK
233 const int kmi_id = kmi->
id;
240 U.runtime.is_dirty =
true;
265 block, 6 *
U.dpi_fac, (
const int[2]){-100 * U.dpi_fac, 36 * U.dpi_fac});
267 #ifdef USE_KEYMAP_ADD_HACK
281 #ifdef USE_KEYMAP_ADD_HACK
286 int kmi_id = WM_key_event_operator_id(
C, idname, but->
opcontext, prop,
true, &km);
318 U.runtime.is_dirty =
true;
348 const char *member_id_data_path = member_id;
350 member_id_data_path =
BLI_sprintfN(
"%s.%s", member_id, data_path);
358 if (member_id != member_id_data_path) {
375 char drawstr[
sizeof(but->
drawstr)];
386 if (drawstr[0] ==
'\0') {
393 const char *expr_imports[] = {
"bpy",
"bl_ui",
NULL};
396 "bl_ui.space_toolsystem_common.item_from_id("
398 "bpy.context.space_data.type, "
401 char *expr_result =
NULL;
423 const char *member_id_data_path = member_id;
425 member_id_data_path =
BLI_sprintfN(
"%s.%s", member_id, data_path);
433 if (member_id != member_id_data_path) {
446 U.runtime.is_dirty =
true;
454 U.runtime.is_dirty =
true;
555 const bool is_array_component = (is_array && but->
rnaindex != -1);
556 const bool is_whole_array = (is_array && but->
rnaindex == -1);
569 if (is_array_component) {
573 "ANIM_OT_keyframe_insert_button",
579 "ANIM_OT_keyframe_insert_button",
585 "ANIM_OT_keyframe_delete_button",
591 "ANIM_OT_keyframe_delete_button",
599 "ANIM_OT_keyframe_insert_button",
605 "ANIM_OT_keyframe_delete_button",
617 if (is_array_component) {
621 "ANIM_OT_keyframe_insert_button",
627 "ANIM_OT_keyframe_insert_button",
635 "ANIM_OT_keyframe_insert_button",
642 if (is_array_component) {
646 "ANIM_OT_keyframe_clear_button",
652 "ANIM_OT_keyframe_clear_button",
660 "ANIM_OT_keyframe_clear_button",
670 if (is_array_component) {
674 "ANIM_OT_driver_button_remove",
680 "ANIM_OT_driver_button_remove",
688 "ANIM_OT_driver_button_remove",
693 if (!is_whole_array) {
697 "ANIM_OT_copy_driver_button");
702 "ANIM_OT_paste_driver_button");
708 "ANIM_OT_driver_button_edit");
714 "SCREEN_OT_drivers_editor_show");
725 "ANIM_OT_driver_button_add");
727 if (!is_whole_array) {
732 "ANIM_OT_paste_driver_button");
739 "SCREEN_OT_drivers_editor_show");
747 if (is_array_component) {
751 "ANIM_OT_keyingset_button_add",
757 "ANIM_OT_keyingset_button_add",
763 "ANIM_OT_keyingset_button_remove");
769 "ANIM_OT_keyingset_button_add",
775 "ANIM_OT_keyingset_button_remove");
779 if (is_overridable) {
786 if (is_array_component) {
794 "Single Override Type",
805 "UI_OT_override_remove_button",
811 "UI_OT_override_remove_button",
818 "UI_OT_override_type_set_button",
830 "UI_OT_override_remove_button",
836 if (is_array_component) {
843 "Define Single Override",
853 "UI_OT_override_type_set_button",
872 if (is_array_component) {
876 "UI_OT_reset_default_button",
882 "UI_OT_reset_default_button",
890 "UI_OT_reset_default_button",
899 "UI_OT_assign_default_button");
904 if (is_array_component) {
908 "UI_OT_copy_to_selected_button",
914 "UI_OT_copy_to_selected_button",
922 "UI_OT_copy_to_selected_button",
930 "UI_OT_copy_data_path_button");
934 "UI_OT_copy_data_path_button",
943 "UI_OT_copy_as_driver_button");
981 "UI_OT_jump_to_target_button");
990 bool item_found =
false;
994 for (
int um_index = 0; um_index < um_array_len; um_index++) {
1041 "Add to a user defined context menu (stored in the user preferences)");
1051 if (idname !=
NULL) {
1098 IFACE_(
"Non-Keyboard Shortcut"),
1108 TIP_(
"Only keyboard shortcuts can be edited that way, "
1109 "please use User Preferences otherwise"));
1168 "WM_OT_doc_view_manual_ui_context");
1185 uiItemO(layout,
NULL, ICON_NONE,
"UI_OT_copy_python_command_button");
1198 "UI_OT_edittranslation_init",
1219 IFACE_(
"Navigation Bar"),
1254 const bool any_item_visible = has_panel_category;
1256 if (!any_item_visible) {
1269 if (has_panel_category) {
1275 IFACE_(
"Shift Left Mouse"));
1276 uiItemR(layout, &
ptr,
"use_pin", 0, tmpstr, ICON_NONE);
struct bAddon * BKE_addon_find(struct ListBase *addon_list, const char *module)
void CTX_store_set(bContext *C, bContextStore *store)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
bContextStore * CTX_store_get(bContext *C)
struct IDProperty * IDP_NewString(const char *st, const char *name, int maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void IDP_FreeProperty(struct IDProperty *prop)
bool IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
struct IDProperty * IDP_New(const char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
struct IDProperty * IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen)
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define UNUSED_VARS_NDEBUG(...)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
bool BPY_run_string_as_string(struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, char **r_value)
struct bUserMenu * ED_screen_user_menu_ensure(struct bContext *C)
bUserMenu ** ED_screen_user_menus_find(const struct bContext *C, uint *r_len)
void ED_screen_user_menu_item_add_operator(struct ListBase *lb, const char *ui_name, const struct wmOperatorType *ot, const struct IDProperty *prop, short opcontext)
struct bUserMenuItem_Prop * ED_screen_user_menu_item_find_prop(struct ListBase *lb, const char *context_data_path, const char *prop_id, int prop_index)
void ED_screens_footer_tools_menu_create(struct bContext *C, struct uiLayout *layout, void *arg)
struct bUserMenuItem_Menu * ED_screen_user_menu_item_find_menu(struct ListBase *lb, const struct MenuType *mt)
void ED_screens_header_tools_menu_create(struct bContext *C, struct uiLayout *layout, void *arg)
void ED_screen_user_menu_item_remove(struct ListBase *lb, struct bUserMenuItem *umi)
struct bUserMenuItem_Op * ED_screen_user_menu_item_find_operator(struct ListBase *lb, const struct wmOperatorType *ot, struct IDProperty *prop, short opcontext)
void ED_screens_navigation_bar_tools_menu_create(struct bContext *C, struct uiLayout *layout, void *arg)
void ED_screen_user_menu_item_add_prop(ListBase *lb, const char *ui_name, const char *context_data_path, const char *prop_id, int prop_index)
void ED_screen_user_menu_item_add_menu(struct ListBase *lb, const char *ui_name, const struct MenuType *mt)
_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.
@ RNA_OVERRIDE_STATUS_OVERRIDABLE
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
bool UI_but_online_manual_id(const uiBut *but, char *r_str, size_t maxlength) ATTR_WARN_UNUSED_RESULT
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)
struct bContextStore * uiLayoutGetContextStore(uiLayout *layout)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
const struct uiStyle * UI_style_get_dpi(void)
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
void UI_menutype_draw(struct bContext *C, struct MenuType *mt, struct uiLayout *layout)
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
void uiItemL(uiLayout *layout, const char *name, int icon)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void uiItemS(uiLayout *layout)
void uiItemFullO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
void UI_popup_block_invoke(struct bContext *C, uiBlockCreateFunc func, void *arg, void(*arg_free)(void *arg))
void UI_popup_block_ex(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg, struct wmOperator *op)
@ UI_BLOCK_MOVEMOUSE_QUIT
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const struct uiStyle *style)
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)
struct MenuType * UI_but_menutype_get(uiBut *but)
bool UI_panel_category_is_visible(const struct ARegion *region)
uiBut * uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
int uiLayoutGetWidth(uiLayout *layout)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void UI_block_direction_set(uiBlock *block, char direction)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
void UI_block_flag_enable(uiBlock *block, int flag)
bool UI_but_is_tool(const uiBut *but)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_but_string_info_get(struct bContext *C, uiBut *but,...) ATTR_SENTINEL(0)
bool UI_popup_menu_end_or_cancel(struct bContext *C, struct uiPopupMenu *head)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
bool ED_asset_can_make_single_from_context(const bContext *C)
return(oflags[bm->toolflag_index].f &oflag) !=0
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
bool ANIM_driver_can_paste(void)
void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip)
bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
bool ui_jump_to_target_button_poll(struct bContext *C)
void ui_rna_collection_search_update_fn(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
void(* MEM_freeN)(void *vmemh)
bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
PropertyType RNA_property_type(PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_is_idprop(const PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
char * RNA_path_from_ID_to_struct(PointerRNA *ptr)
eRNAOverrideStatus RNA_property_override_library_status(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, const int index)
struct AssetMetaData * asset_data
struct PanelType * parent
struct bContextStore * context
struct PointerRNA * opptr
struct wmOperatorType * optype
char drawstr[UI_MAX_DRAW_STR]
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
#define EVT_TYPE_MASK_HOTKEY_INCLUDE
#define ISKEYBOARD(event_type)
#define EVT_TYPE_MASK_HOTKEY_EXCLUDE
#define EVT_TYPE_MASK_ALL
wmKeyMapItem * WM_keymap_item_find_id(wmKeyMap *keymap, int id)
void WM_keyconfig_update(wmWindowManager *wm)
wmKeyMapItem * WM_keymap_add_item(wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier)
bool WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
char * WM_key_event_operator_string(const bContext *C, const char *opname, int opcontext, IDProperty *properties, const bool is_strict, char *result, const int result_len)
void WM_keymap_item_properties_reset(wmKeyMapItem *kmi, struct IDProperty *properties)
wmKeyMapItem * WM_key_event_operator(const bContext *C, const char *opname, int opcontext, IDProperty *properties, const short include_mask, const short exclude_mask, wmKeyMap **r_keymap)
wmKeyMap * WM_keymap_guess_opname(const bContext *C, const char *opname)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
const char * WM_context_member_from_ptr(bContext *C, const PointerRNA *ptr)