Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_ops.c
| Show First 20 Lines • Show All 1,337 Lines • ▼ Show 20 Lines | # endif | ||||
| else { | else { | ||||
| but_store->py_dbg_fn[0] = '\0'; | but_store->py_dbg_fn[0] = '\0'; | ||||
| but_store->py_dbg_line_number = -1; | but_store->py_dbg_line_number = -1; | ||||
| } | } | ||||
| BLI_ghash_insert(ui_editsource_info->hash, but, but_store); | BLI_ghash_insert(ui_editsource_info->hash, but, but_store); | ||||
| } | } | ||||
| /** | |||||
| * Remove the editsource data for \a old_but and reinsert it for \a new_but. Use when the button | |||||
| * was reallocated, e.g. to have a new type (#ui_but_change_type()). | |||||
| */ | |||||
| void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but) | void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but) | ||||
| { | { | ||||
| uiEditSourceButStore *but_store = BLI_ghash_lookup(ui_editsource_info->hash, old_but); | uiEditSourceButStore *but_store = BLI_ghash_lookup(ui_editsource_info->hash, old_but); | ||||
| if (but_store) { | if (but_store) { | ||||
| BLI_ghash_remove(ui_editsource_info->hash, old_but, NULL, NULL); | BLI_ghash_remove(ui_editsource_info->hash, old_but, NULL, NULL); | ||||
| BLI_ghash_insert(ui_editsource_info->hash, new_but, but_store); | BLI_ghash_insert(ui_editsource_info->hash, new_but, but_store); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 722 Lines • ▼ Show 20 Lines | #endif | ||||
| WM_operatortype_append(UI_OT_eyedropper_colorramp); | WM_operatortype_append(UI_OT_eyedropper_colorramp); | ||||
| WM_operatortype_append(UI_OT_eyedropper_colorramp_point); | WM_operatortype_append(UI_OT_eyedropper_colorramp_point); | ||||
| WM_operatortype_append(UI_OT_eyedropper_id); | WM_operatortype_append(UI_OT_eyedropper_id); | ||||
| WM_operatortype_append(UI_OT_eyedropper_depth); | WM_operatortype_append(UI_OT_eyedropper_depth); | ||||
| WM_operatortype_append(UI_OT_eyedropper_driver); | WM_operatortype_append(UI_OT_eyedropper_driver); | ||||
| WM_operatortype_append(UI_OT_eyedropper_gpencil_color); | WM_operatortype_append(UI_OT_eyedropper_gpencil_color); | ||||
| } | } | ||||
| /** | |||||
| * \brief User Interface Keymap | |||||
| */ | |||||
| void ED_keymap_ui(wmKeyConfig *keyconf) | void ED_keymap_ui(wmKeyConfig *keyconf) | ||||
| { | { | ||||
| WM_keymap_ensure(keyconf, "User Interface", 0, 0); | WM_keymap_ensure(keyconf, "User Interface", 0, 0); | ||||
| eyedropper_modal_keymap(keyconf); | eyedropper_modal_keymap(keyconf); | ||||
| eyedropper_colorband_modal_keymap(keyconf); | eyedropper_colorband_modal_keymap(keyconf); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||