Blender V5.3
blender::ProjPaintState Struct Reference

Public Attributes

View3D * v3d
RegionView3D * rv3d
ARegion * region
Depsgraph * depsgraph
Scene * scene
int source
float paint_color_linear [3]
float dither
Paint * paint
Brush * brush
short brush_type
short blend
BrushStrokeMode mode
BrushSwitchMode brush_switch_mode
float brush_size
Object * ob
float obmat [4][4]
float obmat_imat [4][4]
Image * stencil_ima
Image * canvas_ima
Image * clone_ima
float stencil_value
MemArena * arena_mt [BLENDER_MAX_THREADS]
LinkNode ** bucketRect
LinkNode ** bucketFaces
uchar * bucketFlags
char * vertFlags
int buckets_x
int buckets_y
int pixel_sizeof
int image_tot
float(* screenCoords )[4]
float screenMin [2]
float screenMax [2]
float screen_width
float screen_height
int winx
int winy
bool do_layer_clone
bool do_layer_stencil
bool do_layer_stencil_inv
bool do_stencil_brush
bool do_material_slots
bool do_occlude
bool do_backfacecull
bool do_mask_normal
bool do_mask_cavity
float normal_angle
float normal_angle__cos
float normal_angle_inner
float normal_angle_inner__cos
float normal_angle_range
bool do_face_sel
bool is_ortho
bool is_flip_object
bool do_masking
bool is_texbrush
bool is_maskbrush
float seam_bleed_px
float seam_bleed_px_sq
float cloneOffset [2]
float projectMat [4][4]
float projectMatInv [4][4]
float viewDir [3]
float viewPos [3]
float clip_start
float clip_end
Image * reproject_image
ImBuf * reproject_ibuf
bool reproject_ibuf_free_float
bool reproject_ibuf_free_uchar
int thread_tot
int bucketMin [2]
int bucketMax [2]
int context_bucket_index
CurveMapping * cavity_curve
BlurKernel * blurkernel
bool is_shared_user
ProjPaintImage * projImages
float * cavities
ushort * faceSeamFlags
char * faceWindingFlags
LoopSeamData * loopSeamData
LinkNode ** vertFaces
ListBaseT< VertSeam > * vertSeams
SpinLock * tile_lock
Mesh * mesh_eval
int totloop_eval
int faces_num_eval
int totvert_eval
Span< float3 > vert_positions_eval
Span< float3 > vert_normals
Span< int2 > edges_eval
OffsetIndices< int > faces_eval
Span< int > corner_verts_eval
std::optional< bool > select_poly_single
const bool * select_poly_eval
std::optional< bool > hide_poly_single
const bool * hide_poly_eval
std::optional< int > material_index_single
const int * material_indices
Span< float3 > corner_normals_eval
Span< int3 > corner_tris_eval
Span< int > corner_tri_faces_eval
const float2 * uv_map_stencil_eval
const float2 ** poly_to_loop_uv
std::optional< float2 > poly_to_loop_uv_single
const float2 ** poly_to_loop_uv_clone
Material ** mat_array

Detailed Description

Definition at line 281 of file paint_image_proj.cc.

Member Data Documentation

◆ arena_mt

MemArena* blender::ProjPaintState::arena_mt[BLENDER_MAX_THREADS]

◆ blend

◆ blurkernel

◆ brush

◆ brush_size

◆ brush_switch_mode

BrushSwitchMode blender::ProjPaintState::brush_switch_mode

Definition at line 304 of file paint_image_proj.cc.

Referenced by blender::project_state_init().

◆ brush_type

short blender::ProjPaintState::brush_type

Based on #Brush::image_brush_type but may be overridden by mode (BrushStrokeMode). So check this value instead of brush->image_brush_type.

Definition at line 301 of file paint_image_proj.cc.

Referenced by blender::do_projectpaint_thread(), blender::paint_proj_begin_clone(), blender::paint_proj_new_stroke(), blender::paint_proj_stroke_ps(), blender::project_paint_uvpixel_init(), blender::project_state_init(), and blender::texture_paint_camera_project_exec().

◆ bucketFaces

LinkNode** blender::ProjPaintState::bucketFaces

◆ bucketFlags

uchar* blender::ProjPaintState::bucketFlags

store if the bucks have been initialized.

Definition at line 326 of file paint_image_proj.cc.

Referenced by blender::do_projectpaint_thread(), blender::project_bucket_init(), blender::project_paint_begin(), and blender::project_paint_end().

◆ bucketMax

int blender::ProjPaintState::bucketMax[2]

◆ bucketMin

int blender::ProjPaintState::bucketMin[2]

◆ bucketRect

LinkNode** blender::ProjPaintState::bucketRect

screen sized 2D array, each pixel has a linked list of ProjPixel's

Definition at line 322 of file paint_image_proj.cc.

Referenced by blender::do_projectpaint_thread(), blender::project_paint_begin(), blender::project_paint_end(), and blender::project_paint_face_init().

◆ buckets_x

int blender::ProjPaintState::buckets_x

◆ buckets_y

◆ canvas_ima

◆ cavities

float* blender::ProjPaintState::cavities

◆ cavity_curve

CurveMapping* blender::ProjPaintState::cavity_curve

◆ clip_end

float blender::ProjPaintState::clip_end

Definition at line 404 of file paint_image_proj.cc.

Referenced by blender::proj_paint_state_viewport_init().

◆ clip_start

float blender::ProjPaintState::clip_start

◆ clone_ima

Image* blender::ProjPaintState::clone_ima

◆ cloneOffset

float blender::ProjPaintState::cloneOffset[2]

◆ context_bucket_index

int blender::ProjPaintState::context_bucket_index

must lock threads while accessing these.

Definition at line 417 of file paint_image_proj.cc.

Referenced by blender::project_bucket_iter_init(), and blender::project_bucket_iter_next().

◆ corner_normals_eval

Span<float3> blender::ProjPaintState::corner_normals_eval

◆ corner_tri_faces_eval

◆ corner_tris_eval

◆ corner_verts_eval

◆ depsgraph

Depsgraph* blender::ProjPaintState::depsgraph

◆ dither

float blender::ProjPaintState::dither

◆ do_backfacecull

bool blender::ProjPaintState::do_backfacecull

ignore faces with normals pointing away, skips a lot of ray-casts if your normals are correctly flipped.

Definition at line 364 of file paint_image_proj.cc.

Referenced by blender::proj_paint_state_vert_flags_init(), blender::project_paint_face_init(), blender::project_paint_prepare_all_faces(), blender::project_paint_uvpixel_mask(), and blender::project_state_init().

◆ do_face_sel

bool blender::ProjPaintState::do_face_sel

quick access to (me->editflag & ME_EDIT_PAINT_FACE_SEL)

Definition at line 379 of file paint_image_proj.cc.

Referenced by blender::proj_paint_face_lookup_init(), blender::project_paint_begin(), and blender::project_paint_check_face_paintable().

◆ do_layer_clone

◆ do_layer_stencil

bool blender::ProjPaintState::do_layer_stencil

◆ do_layer_stencil_inv

bool blender::ProjPaintState::do_layer_stencil_inv

◆ do_mask_cavity

bool blender::ProjPaintState::do_mask_cavity

◆ do_mask_normal

bool blender::ProjPaintState::do_mask_normal

◆ do_masking

◆ do_material_slots

bool blender::ProjPaintState::do_material_slots

◆ do_occlude

bool blender::ProjPaintState::do_occlude

Use ray-traced occlusion? - otherwise will paint right through to the back.

Definition at line 361 of file paint_image_proj.cc.

Referenced by blender::project_paint_face_init(), and blender::project_state_init().

◆ do_stencil_brush

◆ edges_eval

Span<int2> blender::ProjPaintState::edges_eval

◆ faces_eval

OffsetIndices<int> blender::ProjPaintState::faces_eval

◆ faces_num_eval

int blender::ProjPaintState::faces_num_eval

◆ faceSeamFlags

◆ faceWindingFlags

char* blender::ProjPaintState::faceWindingFlags

save the winding of the face in uv space, helps as an extra validation step for seam detection.

Definition at line 445 of file paint_image_proj.cc.

Referenced by blender::check_seam(), blender::insert_seam_vert_array(), blender::proj_paint_state_seam_bleed_init(), blender::project_face_seams_init(), blender::project_face_winding_init(), and blender::project_paint_end().

◆ hide_poly_eval

const bool* blender::ProjPaintState::hide_poly_eval

◆ hide_poly_single

std::optional<bool> blender::ProjPaintState::hide_poly_single

◆ image_tot

◆ is_flip_object

◆ is_maskbrush

bool blender::ProjPaintState::is_maskbrush

mask brush is applied before masking.

Definition at line 388 of file paint_image_proj.cc.

Referenced by blender::do_projectpaint_thread(), blender::project_state_init(), and blender::texture_paint_camera_project_exec().

◆ is_ortho

◆ is_shared_user

◆ is_texbrush

◆ loopSeamData

LoopSeamData* blender::ProjPaintState::loopSeamData

◆ mat_array

Material** blender::ProjPaintState::mat_array

◆ material_index_single

std::optional<int> blender::ProjPaintState::material_index_single

◆ material_indices

const int* blender::ProjPaintState::material_indices

◆ mesh_eval

◆ mode

◆ normal_angle

float blender::ProjPaintState::normal_angle

what angle to mask at.

Definition at line 370 of file paint_image_proj.cc.

Referenced by blender::project_paint_uvpixel_mask(), and blender::project_state_init().

◆ normal_angle__cos

float blender::ProjPaintState::normal_angle__cos

cos(normal_angle), faster to compare.

Definition at line 372 of file paint_image_proj.cc.

Referenced by blender::proj_paint_state_vert_flags_init(), and blender::project_state_init().

◆ normal_angle_inner

float blender::ProjPaintState::normal_angle_inner

Definition at line 373 of file paint_image_proj.cc.

Referenced by blender::project_state_init().

◆ normal_angle_inner__cos

float blender::ProjPaintState::normal_angle_inner__cos

Definition at line 374 of file paint_image_proj.cc.

Referenced by blender::project_state_init().

◆ normal_angle_range

float blender::ProjPaintState::normal_angle_range

difference between normal_angle and normal_angle_inner, for easy access.

Definition at line 376 of file paint_image_proj.cc.

Referenced by blender::project_paint_uvpixel_mask(), and blender::project_state_init().

◆ ob

◆ obmat

float blender::ProjPaintState::obmat[4][4]

◆ obmat_imat

float blender::ProjPaintState::obmat_imat[4][4]

◆ paint

◆ paint_color_linear

float blender::ProjPaintState::paint_color_linear[3]

◆ pixel_sizeof

int blender::ProjPaintState::pixel_sizeof

result of project_paint_pixel_sizeof(), constant per stroke.

Definition at line 336 of file paint_image_proj.cc.

Referenced by blender::project_paint_uvpixel_init(), and blender::project_state_init().

◆ poly_to_loop_uv

const float2** blender::ProjPaintState::poly_to_loop_uv

◆ poly_to_loop_uv_clone

const float2** blender::ProjPaintState::poly_to_loop_uv_clone

◆ poly_to_loop_uv_single

◆ projectMat

float blender::ProjPaintState::projectMat[4][4]

◆ projectMatInv

float blender::ProjPaintState::projectMatInv[4][4]

inverse of projectMat.

Definition at line 399 of file paint_image_proj.cc.

Referenced by blender::proj_paint_state_viewport_init(), and blender::screen_px_line_point_factor_v2_persp().

◆ projImages

◆ region

ARegion* blender::ProjPaintState::region

◆ reproject_ibuf

◆ reproject_ibuf_free_float

bool blender::ProjPaintState::reproject_ibuf_free_float

Definition at line 409 of file paint_image_proj.cc.

Referenced by blender::project_paint_end(), and blender::project_paint_op().

◆ reproject_ibuf_free_uchar

bool blender::ProjPaintState::reproject_ibuf_free_uchar

Definition at line 410 of file paint_image_proj.cc.

Referenced by blender::project_paint_end(), and blender::project_paint_op().

◆ reproject_image

Image* blender::ProjPaintState::reproject_image

◆ rv3d

◆ scene

◆ screen_height

◆ screen_width

float blender::ProjPaintState::screen_width

◆ screenCoords

◆ screenMax

float blender::ProjPaintState::screenMax[2]

◆ screenMin

float blender::ProjPaintState::screenMin[2]

◆ seam_bleed_px

◆ seam_bleed_px_sq

float blender::ProjPaintState::seam_bleed_px_sq

◆ select_poly_eval

const bool* blender::ProjPaintState::select_poly_eval

◆ select_poly_single

std::optional<bool> blender::ProjPaintState::select_poly_single

◆ source

◆ stencil_ima

◆ stencil_value

float blender::ProjPaintState::stencil_value

◆ thread_tot

◆ tile_lock

SpinLock* blender::ProjPaintState::tile_lock

◆ totloop_eval

int blender::ProjPaintState::totloop_eval

◆ totvert_eval

◆ uv_map_stencil_eval

const float2* blender::ProjPaintState::uv_map_stencil_eval

◆ v3d

◆ vert_normals

◆ vert_positions_eval

◆ vertFaces

LinkNode** blender::ProjPaintState::vertFaces

Only needed for when seam_bleed_px is enabled, use to find UV seams.

Definition at line 449 of file paint_image_proj.cc.

Referenced by blender::check_seam(), blender::proj_paint_state_seam_bleed_init(), blender::project_face_seams_init(), blender::project_paint_bleed_add_face_user(), and blender::project_paint_end().

◆ vertFlags

char* blender::ProjPaintState::vertFlags

store options per vert, now only store if the vert is pointing away from the view.

Definition at line 329 of file paint_image_proj.cc.

Referenced by blender::proj_paint_state_vert_flags_init(), blender::project_paint_end(), and blender::project_paint_prepare_all_faces().

◆ vertSeams

ListBaseT<VertSeam>* blender::ProjPaintState::vertSeams

◆ viewDir

float blender::ProjPaintState::viewDir[3]

View vector, use for do_backfacecull and for ray casting with an ortho viewport.

Definition at line 401 of file paint_image_proj.cc.

Referenced by blender::proj_paint_state_vert_flags_init(), blender::proj_paint_state_viewport_init(), and blender::project_paint_uvpixel_mask().

◆ viewPos

float blender::ProjPaintState::viewPos[3]

◆ winx

◆ winy


The documentation for this struct was generated from the following file: