Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.cc
| Show First 20 Lines • Show All 1,671 Lines • ▼ Show 20 Lines | uiButTab *tab = (uiButTab *)uiDefButR_prop(block, | ||||
| &template_id->ptr, | &template_id->ptr, | ||||
| template_id->prop, | template_id->prop, | ||||
| 0, | 0, | ||||
| 0.0f, | 0.0f, | ||||
| sizeof(id->name) - 2, | sizeof(id->name) - 2, | ||||
| 0.0f, | 0.0f, | ||||
| 0.0f, | 0.0f, | ||||
| ""); | ""); | ||||
| UI_but_funcN_set(&tab->but, template_ID_set_property_exec_fn, MEM_dupallocN(template_id), id); | UI_but_funcN_set(tab, template_ID_set_property_exec_fn, MEM_dupallocN(template_id), id); | ||||
| UI_but_drag_set_id(&tab->but, id); | UI_but_drag_set_id(tab, id); | ||||
| tab->but.custom_data = (void *)id; | tab->custom_data = (void *)id; | ||||
| tab->menu = mt; | tab->menu = mt; | ||||
| UI_but_drawflag_enable(&tab->but, but_align); | UI_but_drawflag_enable(tab, but_align); | ||||
| } | } | ||||
| BLI_freelistN(&ordered); | BLI_freelistN(&ordered); | ||||
| if (flag & UI_ID_ADD_NEW) { | if (flag & UI_ID_ADD_NEW) { | ||||
| const bool editable = RNA_property_editable(&template_id->ptr, template_id->prop); | const bool editable = RNA_property_editable(&template_id->ptr, template_id->prop); | ||||
| uiBut *but; | uiBut *but; | ||||
| ▲ Show 20 Lines • Show All 3,940 Lines • ▼ Show 20 Lines | case USER_CP_SQUARE_HV: | ||||
| break; | break; | ||||
| case USER_CP_SQUARE_HS: | case USER_CP_SQUARE_HS: | ||||
| hsv_but->gradient_type = UI_GRAD_HS; | hsv_but->gradient_type = UI_GRAD_HS; | ||||
| break; | break; | ||||
| case USER_CP_SQUARE_HV: | case USER_CP_SQUARE_HV: | ||||
| hsv_but->gradient_type = UI_GRAD_HV; | hsv_but->gradient_type = UI_GRAD_HV; | ||||
| break; | break; | ||||
| } | } | ||||
| but = &hsv_but->but; | but = hsv_but; | ||||
| break; | break; | ||||
| /* user default */ | /* user default */ | ||||
| case USER_CP_CIRCLE_HSV: | case USER_CP_CIRCLE_HSV: | ||||
| case USER_CP_CIRCLE_HSL: | case USER_CP_CIRCLE_HSL: | ||||
| default: | default: | ||||
| but = uiDefButR_prop(block, | but = uiDefButR_prop(block, | ||||
| UI_BTYPE_HSVCIRCLE, | UI_BTYPE_HSVCIRCLE, | ||||
| ▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | switch (U.color_picker_type) { | ||||
| softmax, | softmax, | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| ""); | ""); | ||||
| hsv_but->gradient_type = UI_GRAD_V_ALT; | hsv_but->gradient_type = UI_GRAD_V_ALT; | ||||
| break; | break; | ||||
| } | } | ||||
| hsv_but->but.custom_data = cpicker; | hsv_but->custom_data = cpicker; | ||||
| } | } | ||||
| } | } | ||||
| static void ui_template_palette_menu(bContext * /*C*/, uiLayout *layout, void * /*but_p*/) | static void ui_template_palette_menu(bContext * /*C*/, uiLayout *layout, void * /*but_p*/) | ||||
| { | { | ||||
| uiLayout *row; | uiLayout *row; | ||||
| uiItemL(layout, IFACE_("Sort By:"), ICON_NONE); | uiItemL(layout, IFACE_("Sort By:"), ICON_NONE); | ||||
| ▲ Show 20 Lines • Show All 484 Lines • ▼ Show 20 Lines | block = uiLayoutGetBlock(row); | ||||
| nullptr, | nullptr, | ||||
| 0.0f, | 0.0f, | ||||
| 0.0f, | 0.0f, | ||||
| 0.0f, | 0.0f, | ||||
| 0, | 0, | ||||
| nullptr); | nullptr); | ||||
| but_progress->progress = progress; | but_progress->progress = progress; | ||||
| UI_but_func_tooltip_set(&but_progress->but, progress_tooltip_func, tip_arg, MEM_freeN); | UI_but_func_tooltip_set(but_progress, progress_tooltip_func, tip_arg, MEM_freeN); | ||||
| } | } | ||||
| if (!wm->is_interface_locked) { | if (!wm->is_interface_locked) { | ||||
| uiDefIconTextBut(block, | uiDefIconTextBut(block, | ||||
| UI_BTYPE_BUT, | UI_BTYPE_BUT, | ||||
| handle_event, | handle_event, | ||||
| ICON_PANEL_CLOSE, | ICON_PANEL_CLOSE, | ||||
| "", | "", | ||||
| ▲ Show 20 Lines • Show All 729 Lines • Show Last 20 Lines | |||||