Blender V2.61 - r43446
|
Go to the source code of this file.
Defines | |
#define | DO_INLINE static inline |
#define | CURVEMAP_SLOPE_NEGATIVE 0 |
#define | CURVEMAP_SLOPE_POSITIVE 1 |
Functions | |
struct CurveMapping * | curvemapping_add (int tot, float minx, float miny, float maxx, float maxy) |
void | curvemapping_free (struct CurveMapping *cumap) |
struct CurveMapping * | curvemapping_copy (struct CurveMapping *cumap) |
void | curvemapping_set_black_white (struct CurveMapping *cumap, const float black[3], const float white[3]) |
void | curvemap_reset (struct CurveMap *cuma, struct rctf *clipr, int preset, int slope) |
void | curvemap_remove (struct CurveMap *cuma, int flag) |
void | curvemap_insert (struct CurveMap *cuma, float x, float y) |
void | curvemap_sethandle (struct CurveMap *cuma, int type) |
void | curvemapping_changed (struct CurveMapping *cumap, int rem_doubles) |
float | curvemap_evaluateF (struct CurveMap *cuma, float value) |
float | curvemapping_evaluateF (struct CurveMapping *cumap, int cur, float value) |
void | curvemapping_evaluate3F (struct CurveMapping *cumap, float vecout[3], const float vecin[3]) |
void | curvemapping_evaluateRGBF (struct CurveMapping *cumap, float vecout[3], const float vecin[3]) |
void | curvemapping_evaluate_premulRGBF (struct CurveMapping *cumap, float vecout[3], const float vecin[3]) |
void | curvemapping_do_ibuf (struct CurveMapping *cumap, struct ImBuf *ibuf) |
void | curvemapping_premultiply (struct CurveMapping *cumap, int restore) |
int | curvemapping_RGBA_does_something (struct CurveMapping *cumap) |
void | curvemapping_initialize (struct CurveMapping *cumap) |
void | curvemapping_table_RGBA (struct CurveMapping *cumap, float **array, int *size) |
void | scopes_update (struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management) |
void | scopes_free (struct Scopes *scopes) |
void | scopes_new (struct Scopes *scopes) |
Definition in file BKE_colortools.h.
#define CURVEMAP_SLOPE_NEGATIVE 0 |
Definition at line 53 of file BKE_colortools.h.
Referenced by brush_curve_preset().
#define CURVEMAP_SLOPE_POSITIVE 1 |
Definition at line 54 of file BKE_colortools.h.
Referenced by BKE_add_pointdensity(), curvemap_buttons_reset(), curvemap_reset(), curvemap_tools_dofunc(), do_versions(), and node_composit_init_huecorrect().
#define DO_INLINE static inline |
Definition at line 45 of file BKE_colortools.h.
float curvemap_evaluateF | ( | struct CurveMap * | cuma, |
float | value | ||
) |
Definition at line 675 of file colortools.c.
References CM_TABLE, curvemap_calc_extend(), i, CurveMap::mintable, CurveMap::range, CurveMap::table, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by curvemapping_do_ibuf(), curvemapping_evaluate_premulRGBF(), curvemapping_evaluateF(), and curvemapping_premultiply().
void curvemap_insert | ( | struct CurveMap * | cuma, |
float | x, | ||
float | y | ||
) |
Definition at line 171 of file colortools.c.
References CUMA_SELECT, CurveMap::curve, CurveMapPoint::flag, MEM_callocN(), MEM_freeN(), CurveMapPoint::shorty, CurveMap::totpoint, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by ui_do_but_CURVE().
void curvemap_remove | ( | struct CurveMap * | cuma, |
int | flag | ||
) |
Definition at line 150 of file colortools.c.
References CurveMap::curve, CurveMapPoint::flag, MEM_freeN(), MEM_mallocN(), and CurveMap::totpoint.
Referenced by curvemap_buttons_delete(), and curvemapping_changed().
Definition at line 200 of file colortools.c.
References CurveMap::curve, CURVE_PRESET_LINE, CURVE_PRESET_MAX, CURVE_PRESET_MID9, CURVE_PRESET_ROOT, CURVE_PRESET_ROUND, CURVE_PRESET_SHARP, CURVE_PRESET_SMOOTH, CURVEMAP_SLOPE_POSITIVE, CurveMapPoint::flag, i, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), NULL, CurveMap::table, CurveMap::totpoint, CurveMapPoint::x, rctf::xmax, rctf::xmin, CurveMapPoint::y, rctf::ymax, and rctf::ymin.
Referenced by BKE_add_pointdensity(), brush_curve_preset(), curvemap_buttons_reset(), curvemap_tools_dofunc(), do_versions(), and node_composit_init_huecorrect().
void curvemap_sethandle | ( | struct CurveMap * | cuma, |
int | type | ||
) |
Definition at line 305 of file colortools.c.
References CUMA_SELECT, CUMA_VECTOR, CurveMap::curve, CurveMapPoint::flag, and CurveMap::totpoint.
Referenced by curvemap_tools_dofunc().
struct CurveMapping* curvemapping_add | ( | int | tot, |
float | minx, | ||
float | miny, | ||
float | maxx, | ||
float | maxy | ||
) | [read] |
Definition at line 59 of file colortools.c.
References BLI_init_rctf(), CurveMapping::bwmul, CurveMapping::changed_timestamp, CurveMapping::clipr, CurveMapping::cm, CUMA_DO_CLIP, CUMA_EXTEND_EXTRAPOLATE, CurveMapping::cur, CurveMapping::curr, CurveMap::curve, CurveMap::flag, CurveMapping::flag, MAX2, MEM_callocN(), MIN2, CurveMap::totpoint, CurveMapping::white, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by add_lamp(), BKE_add_pointdensity(), brush_curve_preset(), do_versions(), image_panel_curves(), initData(), node_composit_init_curve_rgb(), node_composit_init_curve_vec(), node_composit_init_curves_time(), node_composit_init_huecorrect(), node_shader_init_curve_rgb(), node_shader_init_curve_vec(), rgb_init(), time_init(), and warpModifier_do().
void curvemapping_changed | ( | struct CurveMapping * | cumap, |
int | rem_doubles | ||
) |
Definition at line 613 of file colortools.c.
References CurveMapping::changed_timestamp, CurveMapping::clipr, CurveMapping::cm, CUMA_DO_CLIP, CUMA_SELECT, CurveMapping::cur, CurveMap::curve, curvemap_make_table(), curvemap_remove(), CurveMapPoint::flag, CurveMapping::flag, MAX2, MIN2, sort_curvepoints(), sqrtf, thresh, CurveMap::totpoint, CurveMapPoint::x, rctf::xmax, rctf::xmin, CurveMapPoint::y, rctf::ymax, and rctf::ymin.
Referenced by BKE_add_pointdensity(), brush_curve_preset(), curvemap_buttons_delete(), curvemap_buttons_reset(), curvemap_buttons_setclip(), curvemap_tools_dofunc(), do_versions(), ui_do_but_CURVE(), ui_draw_but_CURVE(), and ui_numedit_but_CURVE().
struct CurveMapping* curvemapping_copy | ( | struct CurveMapping * | cumap | ) | [read] |
Definition at line 110 of file colortools.c.
References CurveMapping::cm, CM_TOT, CurveMap::curve, MEM_dupallocN(), NULL, CurveMap::premultable, and CurveMap::table.
Referenced by add_render_lamp(), BKE_copy_pointdensity(), copy_brush(), copy_lamp(), copyData(), image_duplicate(), localize_lamp(), and node_copy_curves().
void curvemapping_do_ibuf | ( | struct CurveMapping * | cumap, |
struct ImBuf * | ibuf | ||
) |
Definition at line 744 of file colortools.c.
References ImBuf::channels, CurveMapping::cm, curvemap_evaluateF(), curvemapping_evaluate_premulRGBF(), curvemapping_premultiply(), imb_addrectImBuf(), IMB_dupImBuf(), IMB_float_from_rect(), IMB_freeImBuf(), IMB_rect_from_float(), NULL, ImBuf::rect, ImBuf::rect_float, SWAP, ImBuf::x, and ImBuf::y.
Referenced by image_sample_apply().
void curvemapping_evaluate3F | ( | struct CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3] | ||
) |
Definition at line 711 of file colortools.c.
References curvemapping_evaluateF().
Referenced by node_shader_exec_curve_vec().
void curvemapping_evaluate_premulRGBF | ( | struct CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3] | ||
) |
Definition at line 728 of file colortools.c.
References CurveMapping::black, CurveMapping::bwmul, CurveMapping::cm, and curvemap_evaluateF().
Referenced by curvemapping_do_ibuf(), do_curves(), do_curves_fac(), and node_composit_exec_curve_vec().
float curvemapping_evaluateF | ( | struct CurveMapping * | cumap, |
int | cur, | ||
float | value | ||
) |
Definition at line 697 of file colortools.c.
References CurveMapping::clipr, CurveMapping::cm, curvemap_evaluateF(), curvemap_make_table(), NULL, and CurveMap::table.
Referenced by accum_density(), brush_curve_strength(), brush_curve_strength_clamp(), curvemapping_evaluate3F(), curvemapping_evaluateRGBF(), do_huecorrect(), do_huecorrect_fac(), lamp_get_visibility(), node_composit_exec_curves_time(), time_colorfn(), warpModifier_do(), and weightvg_do_map().
void curvemapping_evaluateRGBF | ( | struct CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3] | ||
) |
Definition at line 719 of file colortools.c.
References curvemapping_evaluateF().
Referenced by node_composit_exec_curve_rgb(), node_shader_exec_curve_rgb(), and rgb_colorfn().
void curvemapping_free | ( | struct CurveMapping * | cumap | ) |
Definition at line 96 of file colortools.c.
References CurveMapping::cm, CM_TOT, CurveMap::curve, MEM_freeN(), CurveMap::premultable, and CurveMap::table.
Referenced by BKE_free_pointdensitydata(), free_brush(), free_lamp(), freeData(), image_free(), node_free_curves(), and RE_Database_Free().
void curvemapping_initialize | ( | struct CurveMapping * | cumap | ) |
Definition at line 824 of file colortools.c.
References CurveMapping::clipr, CurveMapping::cm, CM_TOT, curvemap_make_table(), NULL, and CurveMap::table.
Referenced by add_lamp(), curvemapping_table_RGBA(), do_versions(), initData(), and ntreeCompositBeginExecTree().
void curvemapping_premultiply | ( | struct CurveMapping * | cumap, |
int | restore | ||
) |
Definition at line 559 of file colortools.c.
References CurveMapping::clipr, CurveMapping::cm, CM_TABLE, CUMA_PREMULLED, curvemap_evaluateF(), curvemap_make_table(), CurveMapping::flag, MEM_freeN(), MEM_mallocN(), NULL, CurveMap::premultable, CurveMap::table, and CurveMapPoint::y.
Referenced by curvemapping_do_ibuf(), ntreeCompositBeginExecTree(), and ntreeCompositEndExecTree().
int curvemapping_RGBA_does_something | ( | struct CurveMapping * | cumap | ) |
Definition at line 800 of file colortools.c.
References CurveMapping::black, CurveMapping::cm, CM_TOT, CurveMap::curve, CurveMap::totpoint, CurveMapping::white, CurveMapPoint::x, and CurveMapPoint::y.
void curvemapping_set_black_white | ( | struct CurveMapping * | cumap, |
const float | black[3], | ||
const float | white[3] | ||
) |
Definition at line 129 of file colortools.c.
References CurveMapping::black, CurveMapping::bwmul, copy_v3_v3(), and CurveMapping::white.
Referenced by curvemap_buttons_reset(), image_sample_apply(), and node_composit_exec_curve_rgb().
void curvemapping_table_RGBA | ( | struct CurveMapping * | cumap, |
float ** | array, | ||
int * | size | ||
) |
Definition at line 836 of file colortools.c.
References CurveMapping::cm, CM_TABLE, curvemapping_initialize(), MEM_callocN(), size(), CurveMap::table, and CurveMapPoint::y.
Referenced by gpu_shader_curve_rgb(), gpu_shader_curve_vec(), and lamp_get_visibility().
void scopes_free | ( | struct Scopes * | scopes | ) |
Definition at line 1071 of file colortools.c.
References MEM_freeN(), NULL, Scopes::vecscope, Scopes::waveform_1, Scopes::waveform_2, and Scopes::waveform_3.
Referenced by image_free().
void scopes_new | ( | struct Scopes * | scopes | ) |
Definition at line 1091 of file colortools.c.
References Scopes::accuracy, Histogram::height, Scopes::hist, HISTO_MODE_RGB, Histogram::mode, NULL, Scopes::ok, Scopes::vecscope, Scopes::vecscope_alpha, Scopes::vecscope_height, Scopes::waveform_1, Scopes::waveform_2, Scopes::waveform_3, Scopes::wavefrm_alpha, and Scopes::wavefrm_height.
Referenced by do_versions(), image_duplicate(), and image_new().
Definition at line 906 of file colortools.c.
References Scopes::accuracy, BLI_YCC_ITU_BT601, BLI_YCC_ITU_BT709, BLI_YCC_JFIF_0_255, ImBuf::channels, Histogram::channels, copy_v3_v3(), Histogram::data_b, Histogram::data_g, Histogram::data_luma, Histogram::data_r, div, ELEM, get_bin_float(), Scopes::hist, INV_255, linearrgb_to_srgb_v3_v3(), MEM_callocN(), MEM_freeN(), Scopes::minmax, NULL, Scopes::ok, ImBuf::rect, ImBuf::rect_float, rgb_to_luma(), rgb_to_ycc(), Scopes::sample_full, Scopes::sample_lines, save_sample_line(), SCOPES_WAVEFRM_LUMA, SCOPES_WAVEFRM_RGB, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709, SCOPES_WAVEFRM_YCC_JPEG, Scopes::vecscope, Scopes::waveform_1, Scopes::waveform_2, Scopes::waveform_3, Scopes::waveform_tot, Scopes::wavefrm_mode, CurveMapPoint::x, ImBuf::x, Histogram::x_resolution, CurveMapPoint::y, ImBuf::y, and Histogram::ymax.
Referenced by image_scope_area_draw().