Blender V5.0
interface_template_curve_mapping.cc File Reference
#include "BKE_colortools.hh"
#include "BKE_context.hh"
#include "BKE_library.hh"
#include "BLI_bounds.hh"
#include "BLI_math_base.h"
#include "BLI_rect.h"
#include "BLI_string_ref.hh"
#include "BLT_translation.hh"
#include "ED_screen.hh"
#include "ED_undo.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "UI_interface_layout.hh"
#include "interface_intern.hh"
#include "interface_templates_intern.hh"

Go to the source code of this file.

Functions

static bool curvemap_can_zoom_out (CurveMapping *cumap)
static bool curvemap_can_zoom_in (CurveMapping *cumap)
static void curvemap_zoom (CurveMapping &cumap, const float scale)
static void curvemap_buttons_zoom_in (bContext *C, CurveMapping *cumap)
static void curvemap_buttons_zoom_out (bContext *C, CurveMapping *cumap)
static uiBlockcurvemap_clipping_func (bContext *C, ARegion *region, void *cumap_v)
static uiBlockcurvemap_tools_func (bContext *C, ARegion *region, RNAUpdateCb &cb, bool show_extend, CurveMapSlopeType reset_mode)
static uiBlockcurvemap_tools_posslope_func (bContext *C, ARegion *region, void *cb_v)
static uiBlockcurvemap_tools_negslope_func (bContext *C, ARegion *region, void *cb_v)
static uiBlockcurvemap_brush_tools_func (bContext *C, ARegion *region, void *cb_v)
static uiBlockcurvemap_brush_tools_negslope_func (bContext *C, ARegion *region, void *cb_v)
static void curvemap_buttons_redraw (bContext &C)
static void add_preset_button (uiBlock *block, const float dx, const int icon, std::optional< blender::StringRef > tip, CurveMapping *cumap, const bool neg_slope, const int preset, const RNAUpdateCb &cb)
static void curvemap_buttons_layout (uiLayout *layout, PointerRNA *ptr, char labeltype, bool levels, bool brush, bool neg_slope, bool tone, bool presets, const RNAUpdateCb &cb)
void uiTemplateCurveMapping (uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, int type, bool levels, bool brush, bool neg_slope, bool tone, bool presets)

Function Documentation

◆ add_preset_button()

void add_preset_button ( uiBlock * block,
const float dx,
const int icon,
std::optional< blender::StringRef > tip,
CurveMapping * cumap,
const bool neg_slope,
const int preset,
const RNAUpdateCb & cb )
static

◆ curvemap_brush_tools_func()

uiBlock * curvemap_brush_tools_func ( bContext * C,
ARegion * region,
void * cb_v )
static

Definition at line 304 of file interface_template_curve_mapping.cc.

References C, curvemap_tools_func(), and Positive.

Referenced by curvemap_buttons_layout().

◆ curvemap_brush_tools_negslope_func()

uiBlock * curvemap_brush_tools_negslope_func ( bContext * C,
ARegion * region,
void * cb_v )
static

Definition at line 310 of file interface_template_curve_mapping.cc.

References C, curvemap_tools_func(), and Negative.

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_layout()

void curvemap_buttons_layout ( uiLayout * layout,
PointerRNA * ptr,
char labeltype,
bool levels,
bool brush,
bool neg_slope,
bool tone,
bool presets,
const RNAUpdateCb & cb )
static
Note
Still unsure how this call evolves.
Parameters
labeltypeUsed for defining which curve-channels to show.

Definition at line 347 of file interface_template_curve_mapping.cc.

References uiLayout::active(), add_preset_button(), uiLayout::alignment_set(), BKE_curvemap_handle_set(), BKE_curvemap_remove(), BKE_curvemap_reset(), BKE_curvemapping_changed(), BKE_curvemapping_set_black_white(), CurveMapping::black, uiLayout::block(), BLT_I18NCONTEXT_COLOR, bounds(), But, but_func_argN_copy(), but_func_argN_free(), C, CurveMapping::clipr, CurveMapping::cm, CM_TOT, CTX_IFACE_, CUMA_DO_CLIP, CUMA_HANDLE_AUTO_ANIM, CUMA_HANDLE_VECTOR, CUMA_SELECT, CUMA_USE_WRAPPING, CurveMapping::cur, Curve, CurveMap::curve, CURVE_PRESET_LINE, CURVE_PRESET_MAX, CURVE_PRESET_ROOT, CURVE_PRESET_ROUND, CURVE_PRESET_SHARP, CURVE_PRESET_SMOOTH, CURVE_TONE_FILMLIKE, curvemap_brush_tools_func(), curvemap_brush_tools_negslope_func(), curvemap_buttons_redraw(), curvemap_buttons_zoom_in(), curvemap_buttons_zoom_out(), curvemap_can_zoom_in(), curvemap_can_zoom_out(), curvemap_clipping_func(), curvemap_tools_negslope_func(), curvemap_tools_posslope_func(), uiBut::drawflag, ELEM, blender::ui::Emboss, CurveMapping::flag, CurveMapPoint::flag, uiBut::flag, uiButCurveMapping::gradient_type, HD_AUTO, HD_AUTO_ANIM, HD_VECT, i, IFACE_, blender::ui::Left, max_ii(), Num, Positive, CurveMapping::preset, ptr, blender::ui::Right, rna_update_cb(), Row, uiLayout::row(), SELECT, size(), split(), uiLayout::split(), TIP_, CurveMapping::tone, CurveMap::totpoint, UI_block_emboss_set(), UI_block_funcN_set(), UI_but_disable(), UI_BUT_DISABLED, UI_but_flag_enable(), UI_but_func_set(), UI_but_funcN_set(), UI_BUT_ICON_LEFT, UI_BUT_INACTIVE, UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_GRAD_H, UI_GRAD_NONE, UI_ITEM_R_EXPAND, UI_SELECT_DRAW, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButF(), uiDefButI(), uiDefIconBlockBut(), uiDefIconBut(), CurveMapping::white, uiLayout::width(), CurveMapPoint::x, and CurveMapPoint::y.

Referenced by uiTemplateCurveMapping().

◆ curvemap_buttons_redraw()

void curvemap_buttons_redraw ( bContext & C)
static

Definition at line 316 of file interface_template_curve_mapping.cc.

References C, CTX_wm_region(), and ED_region_tag_redraw().

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_zoom_in()

void curvemap_buttons_zoom_in ( bContext * C,
CurveMapping * cumap )
static

◆ curvemap_buttons_zoom_out()

void curvemap_buttons_zoom_out ( bContext * C,
CurveMapping * cumap )
static

◆ curvemap_can_zoom_in()

◆ curvemap_can_zoom_out()

bool curvemap_can_zoom_out ( CurveMapping * cumap)
static

◆ curvemap_clipping_func()

◆ curvemap_tools_func()

◆ curvemap_tools_negslope_func()

uiBlock * curvemap_tools_negslope_func ( bContext * C,
ARegion * region,
void * cb_v )
static

Definition at line 298 of file interface_template_curve_mapping.cc.

References C, curvemap_tools_func(), and Negative.

Referenced by curvemap_buttons_layout().

◆ curvemap_tools_posslope_func()

uiBlock * curvemap_tools_posslope_func ( bContext * C,
ARegion * region,
void * cb_v )
static

Definition at line 292 of file interface_template_curve_mapping.cc.

References C, curvemap_tools_func(), and Positive.

Referenced by curvemap_buttons_layout().

◆ curvemap_zoom()

◆ uiTemplateCurveMapping()