Blender V4.3
sculpt_paint_image.cc File Reference
#include "DNA_brush_types.h"
#include "DNA_image_types.h"
#include "DNA_object_types.h"
#include "ED_paint.hh"
#include "BLI_bit_vector.hh"
#include "BLI_math_color_blend.h"
#include "BLI_math_geom.h"
#include "IMB_colormanagement.hh"
#include "IMB_imbuf.hh"
#include "BKE_brush.hh"
#include "BKE_image_wrappers.hh"
#include "BKE_pbvh_api.hh"
#include "BKE_pbvh_pixels.hh"
#include "bmesh.hh"
#include "mesh_brush_common.hh"
#include "sculpt_automask.hh"
#include "sculpt_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::paint::image::ImageData
 
class  blender::ed::sculpt_paint::paint::image::ImageBufferFloat4
 
class  blender::ed::sculpt_paint::paint::image::ImageBufferByte4
 
class  blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >
 

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::paint
 
namespace  blender::ed::sculpt_paint::paint::image
 

Functions

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 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 BitVector blender::ed::sculpt_paint::paint::image::init_uv_primitives_brush_test (SculptSession &ss, const Span< int3 > vert_tris, const Span< UVPrimitivePaintInput > uv_primitives, const Span< float3 > positions)
 
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 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 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 void blender::ed::sculpt_paint::paint::image::do_push_undo_tile (Image &image, ImageUser &image_user, bke::pbvh::Node &node)
 
bool SCULPT_paint_image_canvas_get (PaintModeSettings &paint_mode_settings, Object &ob, Image **r_image, ImageUser **r_image_user)
 Get the image canvas for painting on the given object.
 
bool SCULPT_use_image_paint_brush (PaintModeSettings &settings, Object &ob)
 
void SCULPT_do_paint_brush_image (const Scene &scene, const Depsgraph &depsgraph, PaintModeSettings &paint_mode_settings, const Sculpt &sd, Object &ob, const blender::IndexMask &node_mask)
 
Fix non-manifold edge bleeding.
static Vector< image::TileNumberblender::ed::sculpt_paint::paint::image::collect_dirty_tiles (MutableSpan< bke::pbvh::MeshNode > nodes, const IndexMask &node_mask)
 
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 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)
 

Function Documentation

◆ SCULPT_do_paint_brush_image()

◆ SCULPT_paint_image_canvas_get()

bool SCULPT_paint_image_canvas_get ( PaintModeSettings & paint_mode_settings,
Object & ob,
Image ** r_image,
ImageUser ** r_image_user )

Get the image canvas for painting on the given object.

Returns
true if an image is found. The #r_image and #r_image_user fields are filled with the image and image user. Returns false when the image isn't found. In the later case the r_image and r_image_user are set to NULL.

Definition at line 471 of file sculpt_paint_image.cc.

References blender::ed::sculpt_paint::paint::image::ImageData::image, blender::ed::sculpt_paint::paint::image::ImageData::image_user, and blender::ed::sculpt_paint::paint::image::ImageData::init_active_image().

Referenced by sculpt_needs_pbvh_pixels(), and sculpt_pbvh_update_pixels().

◆ SCULPT_use_image_paint_brush()