|
Blender V4.3
|
#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_brush_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_space_types.h"#include "BLI_bitmap.h"#include "BLI_listbase.h"#include "BLI_math_color_blend.h"#include "BLI_stack.h"#include "BLI_task.h"#include "BKE_brush.hh"#include "BKE_colorband.hh"#include "BKE_context.hh"#include "BKE_image.hh"#include "BKE_paint.hh"#include "BKE_report.hh"#include "DEG_depsgraph.hh"#include "ED_paint.hh"#include "ED_screen.hh"#include "IMB_colormanagement.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_view2d.hh"#include "paint_intern.hh"Go to the source code of this file.
Classes | |
| struct | BrushPainterCache |
| struct | BrushPainter |
| struct | ImagePaintRegion |
| struct | ImagePaintTile |
| struct | ImagePaintState |
| struct | Paint2DForeachData |
Enumerations | |
| enum | ImagePaintTileState { PAINT2D_TILE_UNINITIALIZED = 0 , PAINT2D_TILE_MISSING , PAINT2D_TILE_READY } |
Functions | |
| static BrushPainter * | brush_painter_2d_new (Scene *scene, const Paint *paint, Brush *brush, bool invert) |
| static void | brush_painter_2d_require_imbuf (Brush *brush, ImagePaintTile *tile, bool use_float, bool use_color_correction, bool invert) |
| static void | brush_painter_cache_2d_free (BrushPainterCache *cache) |
| static void | brush_imbuf_tex_co (const rctf *mapping, int x, int y, float texco[3]) |
| static ushort * | brush_painter_mask_ibuf_new (BrushPainter *painter, const int size) |
| static void | brush_painter_mask_imbuf_update (BrushPainter *painter, ImagePaintTile *tile, const ushort *tex_mask_old, int origx, int origy, int w, int h, int xt, int yt, const int diameter) |
| static void | brush_painter_mask_imbuf_partial_update (BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const int diameter) |
| static ImBuf * | brush_painter_imbuf_new (BrushPainter *painter, ImagePaintTile *tile, const int size, float pressure, float distance) |
| static void | brush_painter_imbuf_update (BrushPainter *painter, ImagePaintTile *tile, ImBuf *oldtexibuf, int origx, int origy, int w, int h, int xt, int yt) |
| static void | brush_painter_imbuf_partial_update (BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const int diameter) |
| static void | brush_painter_2d_tex_mapping (ImagePaintState *s, ImagePaintTile *tile, const int diameter, const float pos[2], const float mouse[2], int mapmode, rctf *r_mapping) |
| static void | brush_painter_2d_refresh_cache (ImagePaintState *s, BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const float mouse[2], float pressure, float distance, float size) |
| static bool | paint_2d_ensure_tile_canvas (ImagePaintState *s, int i) |
| static void | paint_2d_ibuf_rgb_get (ImBuf *ibuf, int x, int y, float r_rgb[4]) |
| static void | paint_2d_ibuf_rgb_set (ImBuf *ibuf, int x, int y, const bool is_torus, const float rgb[4]) |
| static void | paint_2d_ibuf_tile_convert (ImBuf *ibuf, int *x, int *y, short paint_tile) |
| static float | paint_2d_ibuf_add_if (ImBuf *ibuf, int x, int y, float *outrgb, short paint_tile, float w) |
| static void | paint_2d_lift_soften (ImagePaintState *s, ImagePaintTile *tile, ImBuf *ibuf, ImBuf *ibufb, const int *pos, const short paint_tile) |
| static void | paint_2d_set_region (ImagePaintRegion *region, int destx, int desty, int srcx, int srcy, int width, int height) |
| static int | paint_2d_torus_split_region (ImagePaintRegion region[4], ImBuf *dbuf, ImBuf *sbuf, short paint_tile) |
| static void | paint_2d_lift_smear (ImBuf *ibuf, ImBuf *ibufb, int *pos, short paint_tile) |
| static ImBuf * | paint_2d_lift_clone (ImBuf *ibuf, ImBuf *ibufb, const int *pos) |
| static void | paint_2d_convert_brushco (ImBuf *ibufb, const float pos[2], int ipos[2]) |
| static void | paint_2d_do_making_brush (ImagePaintState *s, ImagePaintTile *tile, ImagePaintRegion *region, ImBuf *frombuf, float mask_max, short blend, int tilex, int tiley, int tilew, int tileh) |
| static void | paint_2d_op_foreach_do (void *__restrict data_v, const int iter, const TaskParallelTLS *__restrict) |
| static int | paint_2d_op (void *state, ImagePaintTile *tile, const float lastpos[2], const float pos[2]) |
| static int | paint_2d_canvas_set (ImagePaintState *s) |
| static void | paint_2d_canvas_free (ImagePaintState *s) |
| static void | paint_2d_transform_mouse (View2D *v2d, const float in[2], float out[2]) |
| static bool | is_inside_tile (const int size[2], const float pos[2], const float brush[2]) |
| static void | paint_2d_uv_to_coord (ImagePaintTile *tile, const float uv[2], float coord[2]) |
| void | paint_2d_stroke (void *ps, const float prev_mval[2], const float mval[2], const bool eraser, float pressure, float distance, float base_size) |
| void * | paint_2d_new_stroke (bContext *C, wmOperator *op, int mode) |
| void | paint_2d_redraw (const bContext *C, void *ps, bool final) |
| void | paint_2d_stroke_done (void *ps) |
| static void | paint_2d_fill_add_pixel_byte (const int x_px, const int y_px, ImBuf *ibuf, BLI_Stack *stack, BLI_bitmap *touched, const float color[4], float threshold_sq) |
| static void | paint_2d_fill_add_pixel_float (const int x_px, const int y_px, ImBuf *ibuf, BLI_Stack *stack, BLI_bitmap *touched, const float color[4], float threshold_sq) |
| static ImageUser * | paint_2d_get_tile_iuser (ImagePaintState *s, int tile_number) |
| void | paint_2d_bucket_fill (const bContext *C, const float color[3], Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps) |
| void | paint_2d_gradient_fill (const bContext *C, Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps) |
| enum ImagePaintTileState |
| Enumerator | |
|---|---|
| PAINT2D_TILE_UNINITIALIZED | |
| PAINT2D_TILE_MISSING | |
| PAINT2D_TILE_READY | |
Definition at line 96 of file paint_image_2d.cc.
Definition at line 201 of file paint_image_2d.cc.
Referenced by brush_painter_imbuf_new(), brush_painter_imbuf_update(), brush_painter_mask_ibuf_new(), and brush_painter_mask_imbuf_update().
|
static |
Definition at line 138 of file paint_image_2d.cc.
References BrushPainter::brush, BrushPainter::cache_invert, BrushPainter::firsttouch, invert(), BrushPainter::paint, BrushPainter::scene, and scene.
Referenced by paint_2d_new_stroke().
|
static |
Definition at line 697 of file paint_image_2d.cc.
References BKE_image_pool_free(), BKE_image_pool_new(), BrushPainter::brush, BRUSH_ANCHORED, BRUSH_GRADIENT_SPACING_CLAMP, BRUSH_GRADIENT_SPACING_REPEAT, MTex::brush_map_mode, brush_painter_2d_tex_mapping(), brush_painter_imbuf_new(), brush_painter_imbuf_partial_update(), brush_painter_mask_ibuf_new(), brush_painter_mask_imbuf_partial_update(), UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, BRUSH_USE_GRADIENT, BrushPainterCache::curve_mask_cache, ELEM, Brush::flag, floorf, Brush::gradient_stroke_mode, BrushPainterCache::ibuf, IMB_freeImBuf(), int, BrushPainterCache::is_maskbrush, BrushPainterCache::is_texbrush, BrushPainterCache::last_mask_rotation, BrushPainterCache::last_pressure, BrushPainterCache::last_tex_rotation, BrushPainterCache::lastdiameter, BrushPainter::mask_mapping, Brush::mask_mtex, Brush::mask_pressure, MEM_SAFE_FREE, Brush::mtex, MTEX_MAP_MODE_RANDOM, MTEX_MAP_MODE_VIEW, paint_curve_mask_cache_update(), BrushPainter::pool, pos, MTex::rot, BrushPainter::scene, BrushPainter::tex_mapping, BrushPainterCache::tex_mask, and tile.
Referenced by paint_2d_stroke().
|
static |
Definition at line 154 of file paint_image_2d.cc.
References BrushPainterCache::ibuf, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_DRAW, IMB_freeImBuf(), BrushPainterCache::invert, invert(), BrushPainterCache::is_maskbrush, BrushPainterCache::is_texbrush, BrushPainterCache::lastdiameter, Brush::mask_mtex, MEM_freeN(), Brush::mtex, MTex::tex, BrushPainterCache::tex_mask, BrushPainterCache::tex_mask_old, tile, BrushPainterCache::use_color_correction, and BrushPainterCache::use_float.
Referenced by paint_2d_stroke().
|
static |
Definition at line 644 of file paint_image_2d.cc.
References ELEM, float, floorf, int, MTEX_MAP_MODE_3D, MTEX_MAP_MODE_RANDOM, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_VIEW, pos, tile, UI_view2d_view_to_region_fl(), KernelWorkTile::x, rctf::xmax, rctf::xmin, KernelWorkTile::y, rctf::ymax, and rctf::ymin.
Referenced by brush_painter_2d_refresh_cache().
|
static |
Definition at line 184 of file paint_image_2d.cc.
References BrushPainterCache::curve_mask_cache, BrushPainterCache::ibuf, IMB_freeImBuf(), MEM_freeN(), paint_curve_mask_cache_free_data(), BrushPainterCache::tex_mask, BrushPainterCache::tex_mask_old, and BrushPainterCache::texibuf.
Referenced by paint_2d_stroke_done().
|
static |
Definition at line 373 of file paint_image_2d.cc.
References BKE_brush_sample_tex_3d(), BrushPainter::brush, brush_imbuf_tex_co(), ImBuf::byte_buffer, copy_v3_v3(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IB_rect, IB_rectfloat, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_DRAW, IMB_allocImBuf(), IMB_colormanagement_display_get_named(), IMB_colormanagement_scene_linear_to_display_v3(), BrushPainterCache::invert, BrushPainterCache::is_texbrush, Brush::mtex, mul_v3_v3(), mul_v3_v3fl(), BrushPainter::paint, paint_brush_color_get(), BrushPainter::pool, rgb_float_to_uchar(), BrushPainter::scene, size(), BrushPainter::tex_mapping, tile, unit_float_to_uchar_clamp, BrushPainterCache::use_color_correction, BrushPainterCache::use_float, x, and y.
Referenced by brush_painter_2d_refresh_cache().
|
static |
Definition at line 580 of file paint_image_2d.cc.
References brush_painter_imbuf_update(), floorf, IB_rect, IB_rectfloat, BrushPainterCache::ibuf, IMB_allocImBuf(), IMB_freeImBuf(), IMB_rectclip(), int, min_ii(), pos, BrushPainterCache::texibuf, tile, BrushPainterCache::use_float, w(), ImBuf::x, and ImBuf::y.
Referenced by brush_painter_2d_refresh_cache().
|
static |
Definition at line 456 of file paint_image_2d.cc.
References b, BKE_brush_sample_tex_3d(), BrushPainter::brush, brush_imbuf_tex_co(), ImBuf::byte_buffer, copy_v3_v3(), copy_v4_v4(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, BrushPainterCache::ibuf, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_DRAW, IMB_colormanagement_display_get_named(), IMB_colormanagement_scene_linear_to_display_v3(), BrushPainterCache::invert, BrushPainterCache::is_texbrush, Brush::mtex, mul_v3_v3(), mul_v3_v3fl(), ot, BrushPainter::paint, paint_brush_color_get(), BrushPainter::pool, rgba_float_to_uchar(), BrushPainter::scene, BrushPainter::tex_mapping, BrushPainterCache::texibuf, tile, BrushPainterCache::use_color_correction, BrushPainterCache::use_float, w(), ImBuf::x, x, and y.
Referenced by brush_painter_imbuf_partial_update().
|
static |
Definition at line 209 of file paint_image_2d.cc.
References BKE_brush_sample_masktex(), BrushPainter::brush, brush_imbuf_tex_co(), mask(), BrushPainter::mask_mapping, MEM_mallocN, BrushPainter::pool, BrushPainter::scene, size(), x, and y.
Referenced by brush_painter_2d_refresh_cache().
|
static |
Update the brush mask image by trying to reuse the cached texture result. This can be considerably faster for brushes that change size due to pressure or textures that stick to the surface where only part of the pixels are new
Definition at line 294 of file paint_image_2d.cc.
References brush_painter_mask_imbuf_update(), floorf, IMB_rectclip(), int, MEM_freeN(), MEM_mallocN, min_ii(), pos, BrushPainterCache::tex_mask, BrushPainterCache::tex_mask_old, BrushPainterCache::tex_mask_old_h, BrushPainterCache::tex_mask_old_w, tile, w(), ImBuf::x, and ImBuf::y.
Referenced by brush_painter_2d_refresh_cache().
|
static |
Definition at line 236 of file paint_image_2d.cc.
References b, BKE_brush_sample_masktex(), BrushPainter::brush, brush_imbuf_tex_co(), BrushPainter::mask_mapping, BrushPainter::pool, BrushPainter::scene, BrushPainterCache::tex_mask, BrushPainterCache::tex_mask_old, BrushPainterCache::tex_mask_old_w, tile, w(), x, and y.
Referenced by brush_painter_mask_imbuf_partial_update().
| void paint_2d_bucket_fill | ( | const bContext * | C, |
| const float | color[3], | ||
| Brush * | br, | ||
| const float | mouse_init[2], | ||
| const float | mouse_final[2], | ||
| void * | ps ) |
This function expects linear space color values.
Definition at line 1791 of file paint_image_2d.cc.
References BKE_brush_alpha_get(), BKE_image_acquire_ibuf(), BKE_image_get_tile_from_pos(), BKE_image_release_ibuf(), BKE_imageuser_default(), Brush::blend, blend_color_mix_byte(), blend_color_mix_float(), BLI_BITMAP_NEW, BLI_BITMAP_SET, BLI_stack_free(), BLI_stack_is_empty(), BLI_stack_new, BLI_stack_pop(), BLI_stack_push(), ImBuf::byte_buffer, copy_v3_v3(), copy_v4_v4(), CTX_wm_region(), CTX_wm_space_image(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ED_imapaint_clear_partial_redraw(), ED_imapaint_dirty_region(), Brush::fill_threshold, ImBuf::float_buffer, SpaceImage::image, image_init(), imapaint_image_update(), IMB_blend_color_byte(), IMB_blend_color_float(), linearrgb_to_srgb_uchar3(), MEM_freeN(), NA_EDITED, NC_IMAGE, paint_2d_fill_add_pixel_byte(), paint_2d_fill_add_pixel_float(), paint_2d_get_tile_iuser(), paint_2d_transform_mouse(), rgba_uchar_to_float(), straight_to_premul_v4(), ImageUser::tile, ARegion::v2d, WM_event_add_notifier(), ImBuf::x, and ImBuf::y.
Referenced by ED_imapaint_bucket_fill(), and blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_bucket_fill().
|
static |
Definition at line 1452 of file paint_image_2d.cc.
References BKE_image_release_ibuf(), and paint_delete_blur_kernel().
Referenced by paint_2d_stroke_done().
|
static |
Definition at line 1423 of file paint_image_2d.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IMAGE_PAINT_BRUSH_TYPE_CLONE, IMB_float_from_rect(), IMB_rect_from_float(), and paint_use_opacity_masking().
Referenced by paint_2d_new_stroke().
Definition at line 1203 of file paint_image_2d.cc.
References floorf, int, pos, ImBuf::x, and ImBuf::y.
Referenced by paint_2d_op().
|
static |
Definition at line 1209 of file paint_image_2d.cc.
References blend, BRUSH_ACCUMULATE, ED_image_paint_tile_find(), ED_image_paint_tile_map_get(), ED_IMAGE_UNDO_TILE_SIZE, IB_DO_NOT_TAKE_OWNERSHIP, IMB_assign_byte_buffer(), IMB_assign_float_buffer(), IMB_initImBuf(), IMB_rectblend(), mask(), and tile.
Referenced by paint_2d_op(), and paint_2d_op_foreach_do().
|
static |
Definition at line 817 of file paint_image_2d.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, PAINT2D_TILE_MISSING, PAINT2D_TILE_READY, sqrtf, ImBuf::x, and ImBuf::y.
Referenced by paint_2d_get_tile_iuser(), and paint_2d_stroke().
|
static |
Definition at line 1722 of file paint_image_2d.cc.
References BLI_BITMAP_SET, BLI_BITMAP_TEST, BLI_stack_push(), ImBuf::byte_buffer, ImBufByteBuffer::data, len_squared_v4v4(), rgba_uchar_to_float(), straight_to_premul_v4(), ImBuf::x, and ImBuf::y.
Referenced by paint_2d_bucket_fill().
|
static |
Definition at line 1751 of file paint_image_2d.cc.
References BLI_BITMAP_SET, BLI_BITMAP_TEST, BLI_stack_push(), ImBufFloatBuffer::data, ImBuf::float_buffer, len_squared_v4v4(), ImBuf::x, and ImBuf::y.
Referenced by paint_2d_bucket_fill().
|
static |
Definition at line 1775 of file paint_image_2d.cc.
References paint_2d_ensure_tile_canvas().
Referenced by paint_2d_bucket_fill(), and paint_2d_gradient_fill().
| void paint_2d_gradient_fill | ( | const bContext * | C, |
| Brush * | br, | ||
| const float | mouse_init[2], | ||
| const float | mouse_final[2], | ||
| void * | ps ) |
Definition at line 2018 of file paint_image_2d.cc.
References BKE_brush_alpha_get(), BKE_colorband_evaluate(), BKE_image_acquire_ibuf(), BKE_image_get_tile_from_pos(), BKE_image_release_ibuf(), Brush::blend, BRUSH_GRADIENT_LINEAR, BRUSH_GRADIENT_RADIAL, ImBuf::byte_buffer, CTX_wm_space_image(), ImBufByteBuffer::data, ImBufFloatBuffer::data, dot_v2v2(), ED_imapaint_clear_partial_redraw(), ED_imapaint_dirty_region(), ImBuf::float_buffer, Brush::gradient, Brush::gradient_fill_mode, SpaceImage::image, image_init(), imapaint_image_update(), IMB_blend_color_byte(), IMB_blend_color_float(), len_squared_v2(), len_v2(), linearrgb_to_srgb_v3_v3(), mul_v3_fl(), NA_EDITED, NC_IMAGE, paint_2d_get_tile_iuser(), paint_2d_transform_mouse(), rgba_float_to_uchar(), sqrtf, sub_v2_v2(), sub_v2_v2v2(), WM_event_add_notifier(), ImBuf::x, and ImBuf::y.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_gradient_fill().
|
static |
Definition at line 927 of file paint_image_2d.cc.
References add_v4_v4(), mul_v4_fl(), paint_2d_ibuf_rgb_get(), paint_2d_ibuf_tile_convert(), w(), x, and y.
Referenced by paint_2d_lift_soften().
Definition at line 867 of file paint_image_2d.cc.
References ImBuf::byte_buffer, copy_v4_v4(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, straight_uchar_to_premul_float(), ImBuf::x, and x.
Referenced by paint_2d_ibuf_add_if(), and paint_2d_lift_soften().
|
static |
Definition at line 878 of file paint_image_2d.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, mul_v3_v3fl(), premul_float_to_straight_uchar(), ImBuf::x, x, and ImBuf::y.
Referenced by paint_2d_lift_soften().
Definition at line 911 of file paint_image_2d.cc.
References PAINT_TILE_X, PAINT_TILE_Y, ImBuf::x, and ImBuf::y.
Referenced by paint_2d_ibuf_add_if(), and paint_2d_lift_soften().
Definition at line 1157 of file paint_image_2d.cc.
References ImBuf::flags, IMB_allocImBuf(), IMB_BLEND_COPY_ALPHA, IMB_BLEND_COPY_RGB, IMB_rectblend(), IMB_rectclip(), ImBuf::planes, pos, w(), ImBuf::x, and ImBuf::y.
Referenced by paint_2d_op().
Definition at line 1128 of file paint_image_2d.cc.
References IMB_BLEND_COPY, IMB_rectblend(), paint_2d_set_region(), paint_2d_torus_split_region(), pos, ImBuf::x, and ImBuf::y.
Referenced by paint_2d_op().
|
static |
Definition at line 950 of file paint_image_2d.cc.
References BKE_brush_alpha_get(), blend_color_add_float(), BRUSH_DIR_IN, copy_v4_v4(), count, fabsf, IMB_colormanagement_get_luminance(), IMB_rectclip(), mask(), mul_v4_fl(), paint_2d_ibuf_add_if(), paint_2d_ibuf_rgb_get(), paint_2d_ibuf_rgb_set(), paint_2d_ibuf_tile_convert(), BlurKernel::pixel_len, pos, BlurKernel::side, sub_v2_v2v2_int(), sub_v3_v3v3(), tile, BlurKernel::wdata, ImBuf::x, x, ImBuf::y, y, and zero_v4().
Referenced by paint_2d_op().
| void * paint_2d_new_stroke | ( | bContext * | C, |
| wmOperator * | op, | ||
| int | mode ) |
Definition at line 1577 of file paint_image_2d.cc.
References BKE_image_acquire_ibuf(), BKE_image_has_packedfile(), BKE_image_release_ibuf(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_report(), Brush::blend, BLI_listbase_count(), Paint::brush, brush_painter_2d_new(), BRUSH_STROKE_INVERT, ImBuf::channels, CTX_data_scene(), CTX_wm_region(), CTX_wm_space_image(), Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_SOFTEN, SpaceImage::iuser, MEM_freeN(), PAINT2D_TILE_READY, paint_2d_canvas_set(), paint_brush_init_tex(), paint_new_blur_kernel(), wmOperator::reports, RPT_WARNING, scene, tile, ARegion::v2d, ImBuf::x, ImBuf::y, and zero_v2().
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_new_stroke().
|
static |
Definition at line 1296 of file paint_image_2d.cc.
References BKE_brush_alpha_get(), blend, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, ED_imapaint_dirty_region(), IMAGE_PAINT_BRUSH_TYPE_CLONE, IMAGE_PAINT_BRUSH_TYPE_SMEAR, IMAGE_PAINT_BRUSH_TYPE_SOFTEN, imapaint_region_tiles(), IMB_BLEND_INTERPOLATE, IMB_freeImBuf(), IMB_rectblend_threaded(), paint_2d_convert_brushco(), paint_2d_do_making_brush(), paint_2d_lift_clone(), paint_2d_lift_smear(), paint_2d_lift_soften(), paint_2d_op_foreach_do(), paint_2d_set_region(), paint_2d_torus_split_region(), PAINT_TILE_X, PAINT_TILE_Y, pos, Paint2DForeachData::s, state, tile, ImBuf::x, and ImBuf::y.
Referenced by paint_2d_stroke().
|
static |
Definition at line 1279 of file paint_image_2d.cc.
References paint_2d_do_making_brush().
Referenced by paint_2d_op().
| void paint_2d_redraw | ( | const bContext * | C, |
| void * | ps, | ||
| bool | final ) |
Definition at line 1668 of file paint_image_2d.cc.
References BKE_image_acquire_ibuf(), BKE_image_free_gputextures(), BKE_image_release_ibuf(), CTX_wm_region(), DEG_id_tag_update(), ED_imapaint_clear_partial_redraw(), ED_region_tag_redraw(), imapaint_image_update(), NA_EDITED, NA_PAINTING, NC_IMAGE, and WM_event_add_notifier().
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_stroke_redraw().
|
static |
Definition at line 1052 of file paint_image_2d.cc.
Referenced by paint_2d_lift_smear(), paint_2d_op(), and paint_2d_torus_split_region().
| void paint_2d_stroke | ( | void * | ps, |
| const float | prev_mval[2], | ||
| const float | mval[2], | ||
| const bool | eraser, | ||
| float | pressure, | ||
| float | distance, | ||
| float | base_size ) |
Definition at line 1482 of file paint_image_2d.cc.
References Brush::blend, BrushPainter::brush, brush_painter_2d_refresh_cache(), brush_painter_2d_require_imbuf(), BrushPainter::cache_invert, copy_v2_v2(), ImBufFloatBuffer::data, BrushPainter::firsttouch, ImBuf::float_buffer, FLT_MAX, IMB_BLEND_ERASE_ALPHA, IMB_COLORMANAGE_IS_DATA, is_inside_tile(), paint_2d_ensure_tile_canvas(), paint_2d_op(), paint_2d_uv_to_coord(), PAINT_TILE_X, PAINT_TILE_Y, size(), sub_v2_v2v2(), tile, and UI_view2d_region_to_view().
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_stroke().
| void paint_2d_stroke_done | ( | void * | ps | ) |
Definition at line 1707 of file paint_image_2d.cc.
References brush_painter_cache_2d_free(), MEM_freeN(), paint_2d_canvas_free(), and paint_brush_exit_tex().
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_stroke_done().
|
static |
Definition at line 1063 of file paint_image_2d.cc.
References IMB_rectclip(), paint_2d_set_region(), PAINT_TILE_X, PAINT_TILE_Y, w(), ImBuf::x, and ImBuf::y.
Referenced by paint_2d_lift_smear(), and paint_2d_op().
Definition at line 1465 of file paint_image_2d.cc.
References UI_view2d_region_to_view().
Referenced by paint_2d_bucket_fill(), and paint_2d_gradient_fill().
|
static |
Definition at line 1476 of file paint_image_2d.cc.
References tile.
Referenced by paint_2d_stroke().