Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 4,036 Lines • ▼ Show 20 Lines | static uiBlock *curvemap_tools_negslope_func(bContext *C, ARegion *ar, void *cumap_v) | ||||
| return curvemap_tools_func(C, ar, cumap_v, true, UICURVE_FUNC_RESET_NEG); | return curvemap_tools_func(C, ar, cumap_v, true, UICURVE_FUNC_RESET_NEG); | ||||
| } | } | ||||
| static uiBlock *curvemap_brush_tools_func(bContext *C, ARegion *ar, void *cumap_v) | static uiBlock *curvemap_brush_tools_func(bContext *C, ARegion *ar, void *cumap_v) | ||||
| { | { | ||||
| return curvemap_tools_func(C, ar, cumap_v, false, UICURVE_FUNC_RESET_NEG); | return curvemap_tools_func(C, ar, cumap_v, false, UICURVE_FUNC_RESET_NEG); | ||||
| } | } | ||||
| static uiBlock *curvemap_brush_tools_negslope_func(bContext *C, ARegion *ar, void *cumap_v) | |||||
| { | |||||
| return curvemap_tools_func(C, ar, cumap_v, false, UICURVE_FUNC_RESET_POS); | |||||
| } | |||||
| static void curvemap_buttons_redraw(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) | static void curvemap_buttons_redraw(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) | ||||
| { | { | ||||
| ED_region_tag_redraw(CTX_wm_region(C)); | ED_region_tag_redraw(CTX_wm_region(C)); | ||||
| } | } | ||||
| static void curvemap_buttons_update(bContext *C, void *arg1_v, void *cumap_v) | static void curvemap_buttons_update(bContext *C, void *arg1_v, void *cumap_v) | ||||
| { | { | ||||
| CurveMapping *cumap = cumap_v; | CurveMapping *cumap = cumap_v; | ||||
| ▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | bt = uiDefIconBut(block, | ||||
| NULL, | NULL, | ||||
| 0.0, | 0.0, | ||||
| 0.0, | 0.0, | ||||
| 0.0, | 0.0, | ||||
| 0.0, | 0.0, | ||||
| TIP_("Zoom out")); | TIP_("Zoom out")); | ||||
| UI_but_func_set(bt, curvemap_buttons_zoom_out, cumap, NULL); | UI_but_func_set(bt, curvemap_buttons_zoom_out, cumap, NULL); | ||||
| if (brush) { | if (brush && neg_slope) { | ||||
| bt = uiDefIconBlockBut(block, | |||||
| curvemap_brush_tools_negslope_func, | |||||
| cumap, | |||||
| 0, | |||||
| ICON_DOWNARROW_HLT, | |||||
| 0, | |||||
| 0, | |||||
| dx, | |||||
| dx, | |||||
| TIP_("Tools")); | |||||
| } | |||||
| else if (brush) { | |||||
| bt = uiDefIconBlockBut(block, | bt = uiDefIconBlockBut(block, | ||||
| curvemap_brush_tools_func, | curvemap_brush_tools_func, | ||||
| cumap, | cumap, | ||||
| 0, | 0, | ||||
| ICON_DOWNARROW_HLT, | ICON_DOWNARROW_HLT, | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| dx, | dx, | ||||
| ▲ Show 20 Lines • Show All 2,528 Lines • Show Last 20 Lines | |||||