Blender V5.0
blender::ed::sculpt_paint::paint::image Namespace Reference

Classes

struct  ImageData
class  ImageBufferFloat4
class  ImageBufferByte4
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 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()

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()

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()

◆ do_paint_pixels()

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

Definition at line 250 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, blender::bke::pbvh::pixels::UDIMTilePixels::dirty, blender::Vector< T, InlineBufferCapacity, Allocator >::fill(), blender::ed::sculpt_paint::filter_distances_with_radius(), blender::bke::pbvh::pixels::NodeData::flags, blender::bke::pbvh::pixels::UDIMTilePixels::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::UDIMTilePixels::mark_dirty(), blender::bke::pbvh::pixels::node_data_get(), blender::bke::pbvh::pixels::PackedPixelRow::num_pixels, blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::paint(), blender::bke::object::pbvh_get(), blender::bke::pbvh::pixels::UDIMTilePixels::pixel_rows, 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::UDIMTilePixels::tile_number, blender::bke::pbvh::pixels::NodeData::tiles, Image::tiles, blender::bke::pbvh::pixels::PackedPixelRow::uv_primitive_index, 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()

◆ fix_non_manifold_seam_bleeding() [1/2]

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]

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()

◆ undo_region_tiles()

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 354 of file sculpt_paint_image.cc.

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

Referenced by push_undo().