|
Blender
V2.59
|
#include <math.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_brush_types.h"#include "DNA_color_types.h"#include "DNA_scene_types.h"#include "DNA_object_types.h"#include "DNA_windowmanager_types.h"#include "WM_types.h"#include "RNA_access.h"#include "BLI_math.h"#include "BLI_blenlib.h"#include "BLI_rand.h"#include "BLI_utildefines.h"#include "BKE_brush.h"#include "BKE_colortools.h"#include "BKE_global.h"#include "BKE_image.h"#include "BKE_library.h"#include "BKE_main.h"#include "BKE_paint.h"#include "BKE_texture.h"#include "BKE_icons.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "RE_render_ext.h"#include "RE_shader_ext.h"Go to the source code of this file.
Classes | |
| struct | BrushPainterCache |
| struct | BrushPainter |
Defines | |
| #define | BR_TEST(field, t) |
| #define | BR_TEST_FLAG(_f) |
Typedefs | |
| typedef struct BrushPainterCache | BrushPainterCache |
Functions | |
| static void | brush_set_defaults (Brush *brush) |
| Brush * | add_brush (const char *name) |
| Brush * | copy_brush (Brush *brush) |
| void | free_brush (Brush *brush) |
| static void | extern_local_brush (Brush *brush) |
| void | make_local_brush (Brush *brush) |
| void | brush_debug_print_state (Brush *br) |
| void | brush_reset_sculpt (Brush *br) |
| void | brush_curve_preset (Brush *b, int preset) |
| int | brush_texture_set_nr (Brush *brush, int nr) |
| int | brush_texture_delete (Brush *brush) |
| int | brush_clone_image_set_nr (Brush *brush, int nr) |
| int | brush_clone_image_delete (Brush *brush) |
| void | brush_sample_tex (Brush *brush, float *xy, float *rgba, const int thread) |
| void | brush_imbuf_new (Brush *brush, short flt, short texfall, int bufsize, ImBuf **outbuf, int use_color_correction) |
| BrushPainter * | brush_painter_new (Brush *brush) |
| void | brush_painter_require_imbuf (BrushPainter *painter, short flt, short texonly, int size) |
| void | brush_painter_free (BrushPainter *painter) |
| static void | brush_painter_do_partial (BrushPainter *painter, ImBuf *oldtexibuf, int x, int y, int w, int h, int xt, int yt, float *pos) |
| static void | brush_painter_fixed_tex_partial_update (BrushPainter *painter, float *pos) |
| static void | brush_painter_refresh_cache (BrushPainter *painter, float *pos, int use_color_correction) |
| void | brush_painter_break_stroke (BrushPainter *painter) |
| static void | brush_apply_pressure (BrushPainter *painter, Brush *brush, float pressure) |
| void | brush_jitter_pos (Brush *brush, float *pos, float *jitterpos) |
| int | brush_painter_paint (BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user, int use_color_correction) |
| float | brush_curve_strength_clamp (Brush *br, float p, const float len) |
| float | brush_curve_strength (Brush *br, float p, const float len) |
| unsigned int * | brush_gen_texture_cache (Brush *br, int half_side) |
| struct ImBuf * | brush_gen_radial_control_imbuf (Brush *br) |
| static void | set_unified_settings (Brush *brush, short flag, int value) |
| static short | unified_settings (Brush *brush) |
| static void | set_unified_size (Brush *brush, int value) |
| static int | unified_size (Brush *brush) |
| static void | set_unified_alpha (Brush *brush, float value) |
| static float | unified_alpha (Brush *brush) |
| static void | set_unified_unprojected_radius (Brush *brush, float value) |
| static float | unified_unprojected_radius (Brush *brush) |
| void | brush_set_size (Brush *brush, int size) |
| int | brush_size (Brush *brush) |
| void | brush_set_use_locked_size (Brush *brush, int value) |
| int | brush_use_locked_size (Brush *brush) |
| void | brush_set_use_size_pressure (Brush *brush, int value) |
| int | brush_use_size_pressure (Brush *brush) |
| void | brush_set_use_alpha_pressure (Brush *brush, int value) |
| int | brush_use_alpha_pressure (Brush *brush) |
| void | brush_set_unprojected_radius (Brush *brush, float unprojected_radius) |
| float | brush_unprojected_radius (Brush *brush) |
| void | brush_set_alpha (Brush *brush, float alpha) |
| float | brush_alpha (Brush *brush) |
Definition in file brush.c.
| #define BR_TEST | ( | field, | |
| t | |||
| ) |
if(br->field != def.field) \ printf("br->" #field " = %" #t ";\n", br->field)
Referenced by brush_debug_print_state().
| #define BR_TEST_FLAG | ( | _f | ) |
if((br->flag & _f) && !(def.flag & _f)) \ printf("br->flag |= " #_f ";\n"); \ else if(!(br->flag & _f) && (def.flag & _f)) \ printf("br->flag &= ~" #_f ";\n")
Referenced by brush_debug_print_state().
| typedef struct BrushPainterCache BrushPainterCache |
| Brush* add_brush | ( | const char * | name | ) | [read] |
Definition at line 125 of file brush.c.
References alloc_libblock(), Main::brush, brush_curve_preset(), brush_set_defaults(), CURVE_PRESET_SMOOTH, ID::flag, G, Brush::id, ID_BR, LIB_FAKEUSER, Global::main, Brush::sculpt_tool, and SCULPT_TOOL_DRAW.
Referenced by brush_add_exec(), and paint_init().
| float brush_alpha | ( | Brush * | brush | ) |
Definition at line 1469 of file brush.c.
References Brush::alpha, SCULPT_PAINT_USE_UNIFIED_ALPHA, unified_alpha(), and unified_settings().
Referenced by brush_imbuf_new(), brush_painter_new(), brush_painter_refresh_cache(), brush_strength(), calc_vp_alpha_dl(), do_crease_brush(), do_projectpaint_thread(), paint_draw_cursor(), vpaint_blend(), and wpaint_blend().
| static void brush_apply_pressure | ( | BrushPainter * | painter, |
| Brush * | brush, | ||
| float | pressure | ||
| ) | [static] |
Definition at line 917 of file brush.c.
References BRUSH_JITTER_PRESSURE, brush_set_alpha(), brush_set_size(), BRUSH_SPACING_PRESSURE, brush_use_alpha_pressure(), brush_use_size_pressure(), Brush::flag, Brush::jitter, MAX2, Brush::spacing, BrushPainter::startalpha, BrushPainter::startjitter, BrushPainter::startsize, and BrushPainter::startspacing.
Referenced by brush_painter_paint().
| int brush_clone_image_delete | ( | Brush * | brush | ) |
Definition at line 477 of file brush.c.
References Brush::clone, Image::id, BrushClone::image, NULL, and ID::us.
Referenced by brush_clone_image_set_nr().
| int brush_clone_image_set_nr | ( | Brush * | brush, |
| int | nr | ||
| ) |
Definition at line 459 of file brush.c.
References BLI_findlink(), brush_clone_image_delete(), Brush::clone, G, Image::id, id_us_plus(), BrushClone::image, Main::image, Global::main, and BrushClone::offset.
| void brush_curve_preset | ( | Brush * | b, |
| int | preset | ||
| ) |
Definition at line 412 of file brush.c.
References CurveMapping::clipr, CurveMapping::cm, CUMA_EXTEND_EXTRAPOLATE, Brush::curve, curvemap_reset(), CURVEMAP_SLOPE_NEGATIVE, curvemapping_add(), curvemapping_changed(), CurveMap::flag, NULL, and CurveMapping::preset.
Referenced by add_brush(), brush_curve_preset_exec(), brush_reset_sculpt(), and direct_link_brush().
| float brush_curve_strength | ( | Brush * | br, |
| float | p, | ||
| const float | len | ||
| ) |
Definition at line 1125 of file brush.c.
References Brush::curve, and curvemapping_evaluateF().
Referenced by brush_imbuf_new(), load_tex(), overlapped_curve(), and tex_strength().
| float brush_curve_strength_clamp | ( | Brush * | br, |
| float | p, | ||
| const float | len | ||
| ) |
Definition at line 1113 of file brush.c.
References Brush::curve, curvemapping_evaluateF(), and p.
Referenced by brush_gen_radial_control_imbuf(), brush_imbuf_new(), calc_vp_alpha_dl(), and do_projectpaint_thread().
| void brush_debug_print_state | ( | Brush * | br | ) |
Definition at line 244 of file brush.c.
References blend(), BR_TEST, BR_TEST_FLAG, BRUSH_ACCUMULATE, BRUSH_ADAPTIVE_SPACE, BRUSH_AIRBRUSH, BRUSH_ALPHA_PRESSURE, BRUSH_ANCHORED, BRUSH_CUSTOM_ICON, BRUSH_DIR_IN, BRUSH_EDGE_TO_EDGE, BRUSH_FIXED_TEX, BRUSH_FRONTFACE, BRUSH_INVERSE_SMOOTH_PRESSURE, BRUSH_JITTER_PRESSURE, BRUSH_LOCK_ALPHA, BRUSH_LOCK_SIZE, BRUSH_OFFSET_PRESSURE, BRUSH_ORIGINAL_NORMAL, BRUSH_PERSISTENT, BRUSH_PLANE_TRIM, BRUSH_RAKE, BRUSH_RANDOM_ROTATION, BRUSH_RESTORE_MESH, brush_set_defaults(), BRUSH_SIZE_PRESSURE, BRUSH_SMOOTH_STROKE, BRUSH_SPACE, BRUSH_SPACE_ATTEN, BRUSH_SPACING_PRESSURE, BRUSH_TEXTURE_OVERLAY, BRUSH_TORUS, simple_enum_gen::d, NULL, plane_trim(), and size().
Definition at line 1182 of file brush.c.
References brush_curve_strength_clamp(), brush_gen_texture_cache(), i, MEM_callocN(), MEM_freeN(), pow(), ImBuf::rect_float, sqrt(), ImBuf::x, and ImBuf::y.
Referenced by radial_control_set_tex().
| unsigned int* brush_gen_texture_cache | ( | Brush * | br, |
| int | half_side | ||
| ) |
Definition at line 1136 of file brush.c.
References BKE_image_get_ibuf(), co, Tex::ima, MEM_callocN(), Brush::mtex, multitex_ext(), NULL, TexResult::tb, MTex::tex, TEX_RGB, TexResult::tg, TexResult::tin, and TexResult::tr.
Referenced by brush_gen_radial_control_imbuf(), and sculpt_update_tex().
| void brush_imbuf_new | ( | Brush * | brush, |
| short | flt, | ||
| short | texfall, | ||
| int | bufsize, | ||
| ImBuf ** | outbuf, | ||
| int | use_color_correction | ||
| ) |
Definition at line 522 of file brush.c.
References brush_alpha(), brush_curve_strength(), brush_curve_strength_clamp(), brush_sample_tex(), brush_size(), copy_v3_v3(), FTOCHAR, IB_rect, IB_rectfloat, IMB_allocImBuf(), mul_v3_v3v3(), ImBuf::rect, ImBuf::rect_float, Brush::rgb, sqrt(), srgb_to_linearrgb_v3_v3(), VECCOPY, ImBuf::x, and ImBuf::y.
Referenced by brush_painter_refresh_cache().
| void brush_jitter_pos | ( | Brush * | brush, |
| float * | pos, | ||
| float * | jitterpos | ||
| ) |
Definition at line 929 of file brush.c.
References BLI_frand(), BRUSH_ANCHORED, BRUSH_RESTORE_MESH, brush_size(), Brush::flag, Brush::jitter, len_v2(), and VECCOPY2D.
Referenced by brush_painter_paint(), and paint_brush_stroke_add_step().
| void brush_painter_break_stroke | ( | BrushPainter * | painter | ) |
Definition at line 912 of file brush.c.
References BrushPainter::firsttouch.
Referenced by imapaint_paint_stroke().
| static void brush_painter_do_partial | ( | BrushPainter * | painter, |
| ImBuf * | oldtexibuf, | ||
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| int | xt, | ||
| int | yt, | ||
| float * | pos | ||
| ) | [static] |
Definition at line 720 of file brush.c.
References BrushPainter::brush, brush_sample_tex(), brush_size(), BrushPainter::cache, BrushPainterCache::flt, FTOCHAR, BrushPainterCache::ibuf, BrushPainterCache::maskibuf, MIN2, NULL, ImBuf::rect, ImBuf::rect_float, BrushPainter::startpaintpos, BrushPainterCache::texibuf, VECCOPY, simple_enum_gen::w, ImBuf::x, and ImBuf::y.
Referenced by brush_painter_fixed_tex_partial_update().
| static void brush_painter_fixed_tex_partial_update | ( | BrushPainter * | painter, |
| float * | pos | ||
| ) | [static] |
Definition at line 812 of file brush.c.
References BrushPainter::brush, brush_painter_do_partial(), brush_size(), BrushPainter::cache, BrushPainterCache::flt, IB_rect, IB_rectfloat, BrushPainterCache::ibuf, IMB_allocImBuf(), IMB_freeImBuf(), IMB_rectclip(), BrushPainter::lastpaintpos, NULL, BrushPainterCache::texibuf, simple_enum_gen::w, ImBuf::x, and ImBuf::y.
Referenced by brush_painter_refresh_cache().
| void brush_painter_free | ( | BrushPainter * | painter | ) |
Definition at line 705 of file brush.c.
References BrushPainter::brush, brush_set_alpha(), brush_set_size(), BrushPainter::cache, BrushPainterCache::ibuf, IMB_freeImBuf(), Brush::jitter, BrushPainterCache::maskibuf, MEM_freeN(), Brush::spacing, BrushPainter::startalpha, BrushPainter::startjitter, BrushPainter::startsize, BrushPainter::startspacing, and BrushPainterCache::texibuf.
Referenced by paint_exit().
| BrushPainter* brush_painter_new | ( | Brush * | brush | ) |
Definition at line 667 of file brush.c.
References BrushPainter::brush, brush_alpha(), brush_size(), BrushPainter::cache, BrushPainter::firsttouch, Brush::jitter, BrushPainterCache::lastsize, MEM_callocN(), Brush::spacing, BrushPainter::startalpha, BrushPainter::startjitter, BrushPainter::startsize, and BrushPainter::startspacing.
Referenced by texture_paint_init().
| int brush_painter_paint | ( | BrushPainter * | painter, |
| BrushFunc | func, | ||
| float * | pos, | ||
| double | time, | ||
| float | pressure, | ||
| void * | user, | ||
| int | use_color_correction | ||
| ) |
Definition at line 956 of file brush.c.
References BrushPainter::accumdistance, BrushPainter::accumtime, BrushPainter::brush, BRUSH_AIRBRUSH, brush_apply_pressure(), brush_jitter_pos(), brush_painter_refresh_cache(), brush_set_alpha(), brush_set_size(), brush_size(), BRUSH_SPACE, BrushPainter::cache, BrushPainterCache::enabled, BrushPainter::firsttouch, Brush::flag, BrushPainterCache::ibuf, Brush::jitter, BrushPainter::lastmousepos, BrushPainter::lastpaintpos, BrushPainter::lastpressure, BrushPainter::lasttime, MAX2, normalize_v2(), Brush::rate, Brush::spacing, BrushPainter::startalpha, BrushPainter::startjitter, BrushPainter::startpaintpos, BrushPainter::startsize, BrushPainter::startspacing, and sub_v2_v2v2().
Referenced by imapaint_paint_sub_stroke(), and project_paint_sub_stroke().
| static void brush_painter_refresh_cache | ( | BrushPainter * | painter, |
| float * | pos, | ||
| int | use_color_correction | ||
| ) | [static] |
Definition at line 866 of file brush.c.
References BrushPainter::brush, brush_alpha(), BRUSH_FIXED_TEX, brush_imbuf_new(), brush_painter_fixed_tex_partial_update(), brush_size(), BrushPainter::cache, Brush::flag, BrushPainterCache::flt, BrushPainterCache::ibuf, if(), IMB_freeImBuf(), Brush::jitter, BrushPainterCache::lastalpha, BrushPainterCache::lastjitter, BrushPainter::lastpaintpos, BrushPainterCache::lastsize, BrushPainterCache::maskibuf, Brush::mtex, NULL, size(), BrushPainterCache::size, and MTex::tex.
Referenced by brush_painter_paint().
| void brush_painter_require_imbuf | ( | BrushPainter * | painter, |
| short | flt, | ||
| short | texonly, | ||
| int | size | ||
| ) |
Definition at line 683 of file brush.c.
References BrushPainter::cache, BrushPainterCache::enabled, BrushPainterCache::flt, BrushPainterCache::ibuf, IMB_freeImBuf(), BrushPainterCache::lastsize, BrushPainterCache::maskibuf, NULL, size(), BrushPainterCache::size, BrushPainterCache::texibuf, and BrushPainterCache::texonly.
Referenced by imapaint_paint_sub_stroke().
| void brush_reset_sculpt | ( | Brush * | br | ) |
Definition at line 331 of file brush.c.
References Brush::add_col, Brush::alpha, BRUSH_ALPHA_PRESSURE, brush_curve_preset(), BRUSH_DIR_IN, BRUSH_FRONTFACE, brush_set_defaults(), BRUSH_SPACE, BRUSH_SPACE_ATTEN, CURVE_PRESET_SMOOTH, Brush::flag, Brush::sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_CREASE, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PINCH, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, Brush::size, Brush::spacing, and Brush::sub_col.
Referenced by brush_reset_exec().
| void brush_sample_tex | ( | Brush * | brush, |
| float * | xy, | ||
| float * | rgba, | ||
| const int | thread | ||
| ) |
Definition at line 489 of file brush.c.
References brush_size(), co, externtex(), Brush::mtex, and MTex::tex.
Referenced by brush_imbuf_new(), brush_painter_do_partial(), and do_projectpaint_thread().
| void brush_set_alpha | ( | Brush * | brush, |
| float | alpha | ||
| ) |
Definition at line 1459 of file brush.c.
References Brush::alpha, SCULPT_PAINT_USE_UNIFIED_ALPHA, set_unified_alpha(), and unified_settings().
Referenced by brush_apply_pressure(), brush_painter_free(), and brush_painter_paint().
| static void brush_set_defaults | ( | Brush * | brush | ) | [static] |
Definition at line 71 of file brush.c.
References Brush::add_col, BrushClone::alpha, Brush::alpha, Brush::autosmooth_factor, Brush::blend, BRUSH_ALPHA_PRESSURE, BRUSH_SPACE, BRUSH_SPACE_ATTEN, Brush::clone, Brush::crease_pinch_factor, default_mtex(), Brush::flag, Brush::jitter, Brush::mtex, Brush::normal_weight, Brush::ob_mode, OB_MODE_ALL_PAINT, Brush::plane_offset, Brush::plane_trim, Brush::rate, Brush::rgb, SCULPT_DISP_DIR_AREA, Brush::sculpt_plane, Brush::size, Brush::smooth_stroke_factor, Brush::smooth_stroke_radius, Brush::spacing, Brush::sub_col, Brush::texture_overlay_alpha, and Brush::texture_sample_bias.
Referenced by add_brush(), brush_debug_print_state(), and brush_reset_sculpt().
| void brush_set_size | ( | Brush * | brush, |
| int | size | ||
| ) |
Definition at line 1369 of file brush.c.
References SCULPT_PAINT_USE_UNIFIED_SIZE, set_unified_size(), size(), Brush::size, and unified_settings().
Referenced by brush_apply_pressure(), brush_painter_free(), brush_painter_paint(), brush_scale_size_exec(), paint_draw_cursor(), paint_exit(), texture_paint_camera_project_exec(), and texture_paint_init().
| void brush_set_unprojected_radius | ( | Brush * | brush, |
| float | unprojected_radius | ||
| ) |
Definition at line 1444 of file brush.c.
References SCULPT_PAINT_USE_UNIFIED_SIZE, set_unified_unprojected_radius(), unified_settings(), and Brush::unprojected_radius.
Referenced by brush_scale_size_exec(), paint_cursor_on_hit(), and sculpt_update_cache_variants().
| void brush_set_use_alpha_pressure | ( | Brush * | brush, |
| int | value | ||
| ) |
Definition at line 1424 of file brush.c.
References BRUSH_ALPHA_PRESSURE, Brush::flag, SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE, SCULPT_PAINT_USE_UNIFIED_ALPHA, set_unified_settings(), and unified_settings().
| void brush_set_use_locked_size | ( | Brush * | brush, |
| int | value | ||
| ) |
Definition at line 1384 of file brush.c.
References BRUSH_LOCK_SIZE, Brush::flag, SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE, SCULPT_PAINT_USE_UNIFIED_SIZE, set_unified_settings(), and unified_settings().
| void brush_set_use_size_pressure | ( | Brush * | brush, |
| int | value | ||
| ) |
Definition at line 1404 of file brush.c.
References BRUSH_SIZE_PRESSURE, Brush::flag, SCULPT_PAINT_UNIFIED_SIZE_PRESSURE, SCULPT_PAINT_USE_UNIFIED_SIZE, set_unified_settings(), and unified_settings().
| int brush_size | ( | Brush * | brush | ) |
Definition at line 1379 of file brush.c.
References SCULPT_PAINT_USE_UNIFIED_SIZE, Brush::size, unified_settings(), and unified_size().
Referenced by brush_drawcursor(), brush_imbuf_new(), brush_jitter_pos(), brush_painter_do_partial(), brush_painter_fixed_tex_partial_update(), brush_painter_new(), brush_painter_paint(), brush_painter_refresh_cache(), brush_sample_tex(), brush_scale_size_exec(), calc_vp_alpha_dl(), do_projectpaint_thread(), load_tex(), make_snap(), paint_cursor_on_hit(), paint_draw_alpha_overlay(), paint_draw_cursor(), paint_space_stroke(), project_bucket_iter_init(), project_bucket_iter_next(), project_paint_begin(), same_snap(), sculpt_get_brush_geometry(), sculpt_update_cache_variants(), sculpt_update_tex(), tex_strength(), texture_paint_camera_project_exec(), texture_paint_init(), vpaint_stroke_update_step(), and wpaint_stroke_update_step().
| int brush_texture_delete | ( | Brush * | brush | ) |
Definition at line 451 of file brush.c.
References Tex::id, Brush::mtex, MTex::tex, and ID::us.
Referenced by brush_texture_set_nr().
| int brush_texture_set_nr | ( | Brush * | brush, |
| int | nr | ||
| ) |
Definition at line 427 of file brush.c.
References add_texture(), BLI_findlink(), brush_texture_delete(), copy_texture(), G, id_us_plus(), Global::main, Brush::mtex, NULL, MTex::tex, Main::tex, and ID::us.
| float brush_unprojected_radius | ( | Brush * | brush | ) |
Definition at line 1454 of file brush.c.
References SCULPT_PAINT_USE_UNIFIED_SIZE, unified_settings(), unified_unprojected_radius(), and Brush::unprojected_radius.
Referenced by brush_scale_size_exec(), sculpt_get_brush_geometry(), and sculpt_update_cache_variants().
| int brush_use_alpha_pressure | ( | Brush * | brush | ) |
Definition at line 1439 of file brush.c.
References BRUSH_ALPHA_PRESSURE, Brush::flag, SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE, SCULPT_PAINT_USE_UNIFIED_ALPHA, and unified_settings().
Referenced by brush_apply_pressure(), brush_strength(), calc_vp_alpha_dl(), paint_apply_event(), and paint_cursor_on_hit().
| int brush_use_locked_size | ( | Brush * | brush | ) |
Definition at line 1399 of file brush.c.
References BRUSH_LOCK_SIZE, Brush::flag, SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE, SCULPT_PAINT_USE_UNIFIED_SIZE, and unified_settings().
Referenced by paint_cursor_on_hit(), paint_draw_cursor(), and sculpt_update_cache_variants().
| int brush_use_size_pressure | ( | Brush * | brush | ) |
Definition at line 1419 of file brush.c.
References BRUSH_SIZE_PRESSURE, Brush::flag, SCULPT_PAINT_UNIFIED_SIZE_PRESSURE, SCULPT_PAINT_USE_UNIFIED_SIZE, and unified_settings().
Referenced by brush_apply_pressure(), calc_vp_alpha_dl(), paint_apply_event(), paint_cursor_on_hit(), paint_draw_alpha_overlay(), paint_space_stroke(), sculpt_restore_mesh(), and sculpt_update_cache_variants().
Definition at line 144 of file brush.c.
References copy_libblock(), Brush::curve, curvemapping_copy(), ID::flag, Brush::icon_imbuf, Brush::id, id_us_plus(), IMB_dupImBuf(), LIB_FAKEUSER, Brush::mtex, NULL, Brush::preview, MTex::tex, and ID::us.
Referenced by brush_add_exec(), id_copy(), and make_local_brush().
| static void extern_local_brush | ( | Brush * | brush | ) | [static] |
Definition at line 183 of file brush.c.
References id_lib_extern(), Brush::mtex, and MTex::tex.
Referenced by make_local_brush().
| void free_brush | ( | Brush * | brush | ) |
Definition at line 170 of file brush.c.
References BKE_previewimg_free(), Brush::curve, curvemapping_free(), Brush::icon_imbuf, Tex::id, IMB_freeImBuf(), Brush::mtex, Brush::preview, MTex::tex, and ID::us.
Referenced by free_libblock().
| void make_local_brush | ( | Brush * | brush | ) |
Definition at line 188 of file brush.c.
References Main::brush, Brush::clone, copy_brush(), ELEM, extern_local_brush(), ListBase::first, ID::flag, G, Brush::id, Image::id, Scene::id, BrushClone::image, ToolSettings::imapaint, ID::lib, LIB_FAKEUSER, LIB_LOCAL, Global::main, new_id(), ID::next, NULL, ImagePaintSettings::paint, paint_brush(), paint_brush_set(), Main::scene, bContext::scene, Scene::toolsettings, and ID::us.
Referenced by id_make_local().
| static void set_unified_alpha | ( | Brush * | brush, |
| float | value | ||
| ) | [static] |
Definition at line 1302 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_unified_alpha, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_set_alpha().
| static void set_unified_settings | ( | Brush * | brush, |
| short | flag, | ||
| int | value | ||
| ) | [static] |
Definition at line 1218 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_settings, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_set_use_alpha_pressure(), brush_set_use_locked_size(), and brush_set_use_size_pressure().
| static void set_unified_size | ( | Brush * | brush, |
| int | value | ||
| ) | [static] |
Definition at line 1268 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_unified_size, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_set_size().
| static void set_unified_unprojected_radius | ( | Brush * | brush, |
| float | value | ||
| ) | [static] |
Definition at line 1336 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_unified_unprojected_radius, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_set_unprojected_radius().
| static float unified_alpha | ( | Brush * | brush | ) | [static] |
Definition at line 1318 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_unified_alpha, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_alpha().
| static short unified_settings | ( | Brush * | brush | ) | [static] |
Definition at line 1237 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_settings, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_alpha(), brush_set_alpha(), brush_set_size(), brush_set_unprojected_radius(), brush_set_use_alpha_pressure(), brush_set_use_locked_size(), brush_set_use_size_pressure(), brush_size(), brush_unprojected_radius(), brush_use_alpha_pressure(), brush_use_locked_size(), and brush_use_size_pressure().
| static int unified_size | ( | Brush * | brush | ) | [static] |
Definition at line 1284 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_unified_size, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_size().
| static float unified_unprojected_radius | ( | Brush * | brush | ) | [static] |
Definition at line 1352 of file brush.c.
References ELEM4, ListBase::first, G, Scene::id, ToolSettings::imapaint, Global::main, ID::next, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush(), Main::scene, ToolSettings::sculpt, ToolSettings::sculpt_paint_unified_unprojected_radius, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by brush_unprojected_radius().