Blender V4.3
blender::ed::sculpt_paint::paint::image Namespace Reference

Classes

class  ImageBufferByte4
 
class  ImageBufferFloat4
 
struct  ImageData
 
class  PaintingKernel
 

Functions

static float3 calc_pixel_position (const Span< float3 > vert_positions, const Span< int3 > vert_tris, const int tri_index, const float2 &barycentric_weight)
 
static void calc_pixel_row_positions (const Span< float3 > vert_positions, const Span< int3 > vert_tris, const Span< UVPrimitivePaintInput > uv_primitives, const PackedPixelRow &pixel_row, const MutableSpan< float3 > positions)
 
static BitVector init_uv_primitives_brush_test (SculptSession &ss, const Span< int3 > vert_tris, const Span< UVPrimitivePaintInput > uv_primitives, const Span< float3 > positions)
 
static void do_paint_pixels (const Scene &scene, const Depsgraph &depsgraph, Object &object, const Paint &paint, const Brush &brush, ImageData image_data, bke::pbvh::Node &node)
 
static void undo_region_tiles (ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th)
 
static void push_undo (const NodeData &node_data, Image &image, ImageUser &image_user, const image::ImageTileWrapper &image_tile, ImBuf &image_buffer, ImBuf **tmpibuf)
 
static void do_push_undo_tile (Image &image, ImageUser &image_user, bke::pbvh::Node &node)
 
Fix non-manifold edge bleeding.
static Vector< image::TileNumbercollect_dirty_tiles (MutableSpan< bke::pbvh::MeshNode > nodes, const IndexMask &node_mask)
 
static void fix_non_manifold_seam_bleeding (bke::pbvh::Tree &pbvh, Image &image, ImageUser &image_user, Span< TileNumber > tile_numbers_to_fix)
 
static void fix_non_manifold_seam_bleeding (Object &ob, Image &image, ImageUser &image_user, MutableSpan< bke::pbvh::MeshNode > nodes, const IndexMask &node_mask)
 

Function Documentation

◆ calc_pixel_position()

static float3 blender::ed::sculpt_paint::paint::image::calc_pixel_position ( const Span< float3 > vert_positions,
const Span< int3 > vert_tris,
const int tri_index,
const float2 & barycentric_weight )
static

Definition at line 125 of file sculpt_paint_image.cc.

References interp_v3_v3v3v3(), result, and verts.

Referenced by calc_pixel_row_positions().

◆ calc_pixel_row_positions()

static void blender::ed::sculpt_paint::paint::image::calc_pixel_row_positions ( const Span< float3 > vert_positions,
const Span< int3 > vert_tris,
const Span< UVPrimitivePaintInput > uv_primitives,
const PackedPixelRow & pixel_row,
const MutableSpan< float3 > positions )
static

◆ collect_dirty_tiles()

static Vector< image::TileNumber > blender::ed::sculpt_paint::paint::image::collect_dirty_tiles ( MutableSpan< bke::pbvh::MeshNode > nodes,
const IndexMask & node_mask )
static

◆ do_paint_pixels()

static void blender::ed::sculpt_paint::paint::image::do_paint_pixels ( const Scene & scene,
const Depsgraph & depsgraph,
Object & object,
const Paint & paint,
const Brush & brush,
ImageData image_data,
bke::pbvh::Node & node )
static

Definition at line 254 of file sculpt_paint_image.cc.

References blender::ed::sculpt_paint::apply_hardness_to_distances(), BKE_brush_color_get(), BKE_brush_secondary_color_get(), BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BLI_hash_int(), blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_strength_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), calc_pixel_row_positions(), copy_v3_v3(), ImBufFloatBuffer::data, blender::bke::pbvh::pixels::data_get(), depsgraph, blender::bke::pbvh::pixels::NodeData::dirty, Brush::falloff_shape, blender::Vector< T, InlineBufferCapacity, Allocator >::fill(), blender::ed::sculpt_paint::filter_distances_with_radius(), blender::bke::pbvh::pixels::NodeData::flags, float, ImBuf::float_buffer, blender::bke::image::ImageTileWrapper::get_tile_number(), hash, blender::ed::sculpt_paint::paint::image::ImageData::image, blender::ed::sculpt_paint::paint::image::ImageData::image_user, blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color(), init_uv_primitives_brush_test(), blender::ed::sculpt_paint::StrokeCache::invert, LISTBASE_FOREACH, blender::bke::pbvh::pixels::node_data_get(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::paint(), blender::bke::object::pbvh_get(), POINTER_AS_UINT, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), ImageUser::tile, tile, blender::bke::pbvh::pixels::NodeData::tiles, Image::tiles, blender::bke::pbvh::pixels::NodeData::uv_primitives, blender::bke::pbvh::vert_positions_eval(), and blender::bke::pbvh::pixels::PBVHData::vert_tris.

Referenced by SCULPT_do_paint_brush_image().

◆ do_push_undo_tile()

static void blender::ed::sculpt_paint::paint::image::do_push_undo_tile ( Image & image,
ImageUser & image_user,
bke::pbvh::Node & node )
static

◆ fix_non_manifold_seam_bleeding() [1/2]

static void blender::ed::sculpt_paint::paint::image::fix_non_manifold_seam_bleeding ( bke::pbvh::Tree & pbvh,
Image & image,
ImageUser & image_user,
Span< TileNumber > tile_numbers_to_fix )
static

◆ fix_non_manifold_seam_bleeding() [2/2]

static void blender::ed::sculpt_paint::paint::image::fix_non_manifold_seam_bleeding ( Object & ob,
Image & image,
ImageUser & image_user,
MutableSpan< bke::pbvh::MeshNode > nodes,
const IndexMask & node_mask )
static

◆ init_uv_primitives_brush_test()

◆ push_undo()

static void blender::ed::sculpt_paint::paint::image::push_undo ( const NodeData & node_data,
Image & image,
ImageUser & image_user,
const image::ImageTileWrapper & image_tile,
ImBuf & image_buffer,
ImBuf ** tmpibuf )
static

◆ undo_region_tiles()

static void blender::ed::sculpt_paint::paint::image::undo_region_tiles ( ImBuf * ibuf,
int x,
int y,
int w,
int h,
int * tx,
int * ty,
int * tw,
int * th )
static

Definition at line 359 of file sculpt_paint_image.cc.

References ED_IMAGE_UNDO_TILE_BITS, IMB_rectclip(), and w().

Referenced by push_undo().