Blender  V3.3
Public Attributes | List of all members
ProjPaintState Struct Reference

Public Attributes

View3Dv3d
 
RegionView3Drv3d
 
ARegionregion
 
Depsgraphdepsgraph
 
Scenescene
 
int source
 
float paint_color [3]
 
float paint_color_linear [3]
 
float dither
 
Brushbrush
 
short tool
 
short blend
 
short mode
 
float brush_size
 
Objectob
 
float obmat [4][4]
 
float obmat_imat [4][4]
 
Imagestencil_ima
 
Imagecanvas_ima
 
Imageclone_ima
 
float stencil_value
 
MemArenaarena_mt [BLENDER_MAX_THREADS]
 
LinkNode ** bucketRect
 
LinkNode ** bucketFaces
 
ucharbucketFlags
 
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
 
Imagereproject_image
 
ImBufreproject_ibuf
 
bool reproject_ibuf_free_float
 
bool reproject_ibuf_free_uchar
 
int thread_tot
 
int bucketMin [2]
 
int bucketMax [2]
 
int context_bucket_index
 
struct CurveMappingcavity_curve
 
BlurKernelblurkernel
 
bool is_shared_user
 
ProjPaintImageprojImages
 
floatcavities
 
ushortfaceSeamFlags
 
char * faceWindingFlags
 
LoopSeamDataloopSeamData
 
LinkNode ** vertFaces
 
ListBasevertSeams
 
SpinLocktile_lock
 
Meshme_eval
 
int totlooptri_eval
 
int totloop_eval
 
int totpoly_eval
 
int totedge_eval
 
int totvert_eval
 
const MVertmvert_eval
 
const float(* vert_normals )[3]
 
const MEdgemedge_eval
 
const MPolympoly_eval
 
const MLoopmloop_eval
 
const MLoopTrimlooptri_eval
 
const MLoopUVmloopuv_stencil_eval
 
const MLoopUV ** poly_to_loop_uv
 
const MLoopUV ** poly_to_loop_uv_clone
 
Material ** mat_array
 
bool use_colormanagement
 

Detailed Description

Definition at line 240 of file paint_image_proj.c.

Member Data Documentation

◆ arena_mt

MemArena* ProjPaintState::arena_mt[BLENDER_MAX_THREADS]

For multi-threading, the first item is sometimes used for non threaded cases too.

Definition at line 271 of file paint_image_proj.c.

Referenced by proj_paint_state_thread_init(), project_paint_begin(), project_paint_delayed_face_init(), project_paint_end(), project_paint_face_init(), and project_paint_op().

◆ blend

short ProjPaintState::blend

◆ blurkernel

BlurKernel* ProjPaintState::blurkernel

◆ brush

Brush* ProjPaintState::brush

◆ brush_size

float ProjPaintState::brush_size

◆ bucketFaces

LinkNode** ProjPaintState::bucketFaces

bucketRect aligned array linkList of faces overlapping each bucket.

Definition at line 275 of file paint_image_proj.c.

Referenced by project_bucket_init(), project_paint_begin(), project_paint_delayed_face_init(), project_paint_end(), project_paint_face_init(), and project_paint_PickFace().

◆ bucketFlags

uchar* ProjPaintState::bucketFlags

store if the bucks have been initialized.

Definition at line 277 of file paint_image_proj.c.

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

◆ bucketMax

int ProjPaintState::bucketMax[2]

Definition at line 365 of file paint_image_proj.c.

Referenced by project_bucket_iter_init(), and project_bucket_iter_next().

◆ bucketMin

int ProjPaintState::bucketMin[2]

Definition at line 364 of file paint_image_proj.c.

Referenced by project_bucket_iter_init(), and project_bucket_iter_next().

◆ bucketRect

LinkNode** ProjPaintState::bucketRect

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

Definition at line 273 of file paint_image_proj.c.

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

◆ buckets_x

int ProjPaintState::buckets_x

The size of the bucket grid, the grid span's screenMin/screenMax so you can paint outsize the screen or with 2 brushes at once.

Definition at line 283 of file paint_image_proj.c.

Referenced by project_bucket_bounds(), project_bucket_iter_init(), project_bucket_iter_next(), project_bucket_offset(), project_bucket_offset_safe(), project_paint_begin(), project_paint_bucket_bounds(), and project_paint_delayed_face_init().

◆ buckets_y

int ProjPaintState::buckets_y

◆ canvas_ima

Image* ProjPaintState::canvas_ima

◆ cavities

float* ProjPaintState::cavities

cavity amount for vertices.

Definition at line 388 of file paint_image_proj.c.

Referenced by proj_paint_state_cavity_init(), project_paint_end(), and project_paint_uvpixel_mask().

◆ cavity_curve

struct CurveMapping* ProjPaintState::cavity_curve

Definition at line 369 of file paint_image_proj.c.

Referenced by project_paint_uvpixel_mask(), and project_state_init().

◆ clip_end

float ProjPaintState::clip_end

Definition at line 354 of file paint_image_proj.c.

Referenced by proj_paint_state_viewport_init().

◆ clip_start

float ProjPaintState::clip_start

◆ clone_ima

Image* ProjPaintState::clone_ima

◆ cloneOffset

float ProjPaintState::cloneOffset[2]

Definition at line 344 of file paint_image_proj.c.

Referenced by paint_proj_begin_clone(), and project_paint_uvpixel_init().

◆ context_bucket_index

int ProjPaintState::context_bucket_index

must lock threads while accessing these.

Definition at line 367 of file paint_image_proj.c.

Referenced by project_bucket_iter_init(), and project_bucket_iter_next().

◆ depsgraph

Depsgraph* ProjPaintState::depsgraph

Definition at line 244 of file paint_image_proj.c.

Referenced by proj_paint_state_viewport_init(), and project_state_init().

◆ dither

float ProjPaintState::dither

Definition at line 252 of file paint_image_proj.c.

Referenced by do_projectpaint_thread(), and project_state_init().

◆ do_backfacecull

bool ProjPaintState::do_backfacecull

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

Definition at line 314 of file paint_image_proj.c.

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

◆ do_face_sel

bool ProjPaintState::do_face_sel

quick access to (me->editflag & ME_EDIT_PAINT_FACE_SEL)

Definition at line 329 of file paint_image_proj.c.

Referenced by proj_paint_face_lookup_init(), proj_paint_state_mesh_eval_init(), project_paint_begin(), and project_paint_check_face_sel().

◆ do_layer_clone

bool ProjPaintState::do_layer_clone

◆ do_layer_stencil

bool ProjPaintState::do_layer_stencil

◆ do_layer_stencil_inv

bool ProjPaintState::do_layer_stencil_inv

Definition at line 306 of file paint_image_proj.c.

Referenced by project_paint_uvpixel_mask(), and project_state_init().

◆ do_mask_cavity

bool ProjPaintState::do_mask_cavity

◆ do_mask_normal

bool ProjPaintState::do_mask_normal

mask out pixels based on their normals.

Definition at line 316 of file paint_image_proj.c.

Referenced by proj_paint_state_vert_flags_init(), project_paint_prepare_all_faces(), project_paint_uvpixel_mask(), and project_state_init().

◆ do_masking

bool ProjPaintState::do_masking

◆ do_material_slots

bool ProjPaintState::do_material_slots

Definition at line 308 of file paint_image_proj.c.

Referenced by project_paint_clone_face_skip(), and project_state_init().

◆ do_occlude

bool ProjPaintState::do_occlude

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

Definition at line 311 of file paint_image_proj.c.

Referenced by project_paint_face_init(), and project_state_init().

◆ do_stencil_brush

bool ProjPaintState::do_stencil_brush

◆ faceSeamFlags

ushort* ProjPaintState::faceSeamFlags

◆ faceWindingFlags

char* ProjPaintState::faceWindingFlags

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

Definition at line 395 of file paint_image_proj.c.

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

◆ image_tot

int ProjPaintState::image_tot

◆ is_flip_object

bool ProjPaintState::is_flip_object

◆ is_maskbrush

bool ProjPaintState::is_maskbrush

mask brush is applied before masking.

Definition at line 338 of file paint_image_proj.c.

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

◆ is_ortho

bool ProjPaintState::is_ortho

◆ is_shared_user

bool ProjPaintState::is_shared_user

◆ is_texbrush

bool ProjPaintState::is_texbrush

◆ loopSeamData

LoopSeamData* ProjPaintState::loopSeamData

◆ mat_array

Material** ProjPaintState::mat_array

◆ me_eval

Mesh* ProjPaintState::me_eval

◆ medge_eval

const MEdge* ProjPaintState::medge_eval

◆ mloop_eval

const MLoop* ProjPaintState::mloop_eval

◆ mlooptri_eval

const MLoopTri* ProjPaintState::mlooptri_eval

◆ mloopuv_stencil_eval

const MLoopUV* ProjPaintState::mloopuv_stencil_eval

Definition at line 420 of file paint_image_proj.c.

Referenced by project_paint_begin(), and project_paint_uvpixel_mask().

◆ mode

short ProjPaintState::mode

◆ mpoly_eval

const MPoly* ProjPaintState::mpoly_eval

◆ mvert_eval

const MVert* ProjPaintState::mvert_eval

◆ normal_angle

float ProjPaintState::normal_angle

what angle to mask at.

Definition at line 320 of file paint_image_proj.c.

Referenced by project_paint_uvpixel_mask(), and project_state_init().

◆ normal_angle__cos

float ProjPaintState::normal_angle__cos

cos(normal_angle), faster to compare.

Definition at line 322 of file paint_image_proj.c.

Referenced by proj_paint_state_vert_flags_init(), and project_state_init().

◆ normal_angle_inner

float ProjPaintState::normal_angle_inner

Definition at line 323 of file paint_image_proj.c.

Referenced by project_state_init().

◆ normal_angle_inner__cos

float ProjPaintState::normal_angle_inner__cos

Definition at line 324 of file paint_image_proj.c.

Referenced by project_state_init().

◆ normal_angle_range

float ProjPaintState::normal_angle_range

difference between normal_angle and normal_angle_inner, for easy access.

Definition at line 326 of file paint_image_proj.c.

Referenced by project_paint_uvpixel_mask(), and project_state_init().

◆ ob

Object* ProjPaintState::ob

◆ obmat

float ProjPaintState::obmat[4][4]

Definition at line 260 of file paint_image_proj.c.

Referenced by proj_paint_state_viewport_init(), and project_paint_op().

◆ obmat_imat

float ProjPaintState::obmat_imat[4][4]

Definition at line 261 of file paint_image_proj.c.

Referenced by paint_proj_begin_clone(), and proj_paint_state_viewport_init().

◆ paint_color

float ProjPaintState::paint_color[3]

◆ paint_color_linear

float ProjPaintState::paint_color_linear[3]

◆ pixel_sizeof

int ProjPaintState::pixel_sizeof

result of project_paint_pixel_sizeof(), constant per stroke.

Definition at line 287 of file paint_image_proj.c.

Referenced by project_paint_uvpixel_init(), and project_state_init().

◆ poly_to_loop_uv

const MLoopUV** ProjPaintState::poly_to_loop_uv
Note
These UV layers are aligned to mpoly_eval but each pointer references the start of the layer, so a loop indirection is needed as well.

Definition at line 427 of file paint_image_proj.c.

Referenced by check_seam(), insert_seam_vert_array(), proj_paint_state_mesh_eval_init(), project_bucket_init(), project_face_winding_init(), project_paint_bleed_add_face_user(), project_paint_end(), project_paint_face_init(), project_paint_PickColor(), and project_paint_prepare_all_faces().

◆ poly_to_loop_uv_clone

const MLoopUV** ProjPaintState::poly_to_loop_uv_clone

other UV map, use for cloning between layers.

Definition at line 429 of file paint_image_proj.c.

Referenced by proj_paint_layer_clone_init(), project_paint_clone_face_skip(), project_paint_end(), and project_paint_uvpixel_init().

◆ projectMat

float ProjPaintState::projectMat[4][4]

Projection matrix, use for getting screen coords.

Definition at line 347 of file paint_image_proj.c.

Referenced by paint_proj_begin_clone(), proj_paint_state_screen_coords_init(), proj_paint_state_viewport_init(), and project_paint_face_init().

◆ projectMatInv

float ProjPaintState::projectMatInv[4][4]

inverse of projectMat.

Definition at line 349 of file paint_image_proj.c.

Referenced by proj_paint_state_viewport_init(), and screen_px_line_point_factor_v2_persp().

◆ projImages

ProjPaintImage* ProjPaintState::projImages

◆ region

ARegion* ProjPaintState::region

Definition at line 243 of file paint_image_proj.c.

Referenced by proj_paint_state_viewport_init(), and project_state_init().

◆ reproject_ibuf

ImBuf* ProjPaintState::reproject_ibuf

◆ reproject_ibuf_free_float

bool ProjPaintState::reproject_ibuf_free_float

Definition at line 359 of file paint_image_proj.c.

Referenced by project_paint_end(), and project_paint_op().

◆ reproject_ibuf_free_uchar

bool ProjPaintState::reproject_ibuf_free_uchar

Definition at line 360 of file paint_image_proj.c.

Referenced by project_paint_end(), and project_paint_op().

◆ reproject_image

Image* ProjPaintState::reproject_image

◆ rv3d

RegionView3D* ProjPaintState::rv3d

◆ scene

Scene* ProjPaintState::scene

◆ screen_height

float ProjPaintState::screen_height

◆ screen_width

float ProjPaintState::screen_width

Calculated from screenMin & screenMax.

Definition at line 298 of file paint_image_proj.c.

Referenced by project_bucket_bounds(), project_bucket_offset(), project_paint_begin(), and project_paint_bucket_bounds().

◆ screenCoords

float(* ProjPaintState::screenCoords)[4]

◆ screenMax

float ProjPaintState::screenMax[2]

◆ screenMin

float ProjPaintState::screenMin[2]

2D bounds for mesh verts on the screen's plane (screen-space).

Definition at line 295 of file paint_image_proj.c.

Referenced by proj_paint_state_screen_coords_init(), project_bucket_bounds(), project_bucket_offset(), project_paint_begin(), project_paint_bucket_bounds(), and project_paint_winclip().

◆ seam_bleed_px

float ProjPaintState::seam_bleed_px

◆ seam_bleed_px_sq

float ProjPaintState::seam_bleed_px_sq

Definition at line 341 of file paint_image_proj.c.

Referenced by project_paint_face_init(), and project_state_init().

◆ source

int ProjPaintState::source

◆ stencil_ima

Image* ProjPaintState::stencil_ima

◆ stencil_value

float ProjPaintState::stencil_value

◆ thread_tot

int ProjPaintState::thread_tot

◆ tile_lock

SpinLock* ProjPaintState::tile_lock

◆ tool

short ProjPaintState::tool

◆ totedge_eval

int ProjPaintState::totedge_eval

Definition at line 410 of file paint_image_proj.c.

Referenced by proj_paint_state_mesh_eval_init().

◆ totloop_eval

int ProjPaintState::totloop_eval

◆ totlooptri_eval

int ProjPaintState::totlooptri_eval

◆ totpoly_eval

int ProjPaintState::totpoly_eval

◆ totvert_eval

int ProjPaintState::totvert_eval

◆ use_colormanagement

bool ProjPaintState::use_colormanagement

◆ v3d

View3D* ProjPaintState::v3d

◆ vert_normals

const float(* ProjPaintState::vert_normals)[3]

◆ vertFaces

LinkNode** ProjPaintState::vertFaces

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

Definition at line 399 of file paint_image_proj.c.

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

◆ vertFlags

char* ProjPaintState::vertFlags

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

Definition at line 280 of file paint_image_proj.c.

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

◆ vertSeams

ListBase* ProjPaintState::vertSeams

Seams per vert, to find adjacent seams.

Definition at line 401 of file paint_image_proj.c.

Referenced by find_adjacent_seam(), insert_seam_vert_array(), proj_paint_state_seam_bleed_init(), and project_paint_end().

◆ viewDir

float ProjPaintState::viewDir[3]

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

Definition at line 351 of file paint_image_proj.c.

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

◆ viewPos

float ProjPaintState::viewPos[3]

View location in object relative 3D space, so can compare to verts.

Definition at line 353 of file paint_image_proj.c.

Referenced by proj_paint_state_vert_flags_init(), proj_paint_state_viewport_init(), project_paint_uvpixel_mask(), and screen_px_line_point_factor_v2_persp().

◆ winx

int ProjPaintState::winx

◆ winy

int ProjPaintState::winy

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