Blender V5.3
paint_image_proj.cc File Reference

Functions to paint images in 2D and 3D. More...

#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include "IMB_imbuf_types.hh"
#include "MEM_guardedalloc.h"
#include "BLI_linklist.hh"
#include "BLI_listbase.hh"
#include "BLI_math_base_safe.hh"
#include "BLI_math_bits.hh"
#include "BLI_math_color_blend.hh"
#include "BLI_math_color_c.hh"
#include "BLI_math_geom_c.hh"
#include "BLI_math_vector.hh"
#include "BLI_memarena.hh"
#include "BLI_rect.hh"
#include "BLI_string.hh"
#include "BLI_string_utf8.hh"
#include "BLI_task_c.hh"
#include "BLI_threads.hh"
#include "BLI_utildefines.hh"
#include "atomic_ops.h"
#include "BLT_translation.hh"
#include "IMB_imbuf.hh"
#include "IMB_interp.hh"
#include "IMB_partial_update.hh"
#include "DNA_brush_types.h"
#include "DNA_customdata_types.h"
#include "DNA_defs.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_node_types.h"
#include "DNA_object_enums.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BKE_attribute.h"
#include "BKE_attribute.hh"
#include "BKE_attribute_legacy_convert.hh"
#include "BKE_brush.hh"
#include "BKE_camera.h"
#include "BKE_colorband.hh"
#include "BKE_colortools.hh"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_global.hh"
#include "BKE_idprop.hh"
#include "BKE_image.hh"
#include "BKE_image_gpu.hh"
#include "BKE_layer.hh"
#include "BKE_library.hh"
#include "BKE_main.hh"
#include "BKE_main_invariants.hh"
#include "BKE_material.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_mapping.hh"
#include "BKE_node.hh"
#include "BKE_node_legacy_types.hh"
#include "BKE_node_runtime.hh"
#include "BKE_object.hh"
#include "BKE_paint.hh"
#include "BKE_paint_types.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "BKE_screen.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "ED_image.hh"
#include "ED_node.hh"
#include "ED_object.hh"
#include "ED_paint.hh"
#include "ED_screen.hh"
#include "ED_sculpt.hh"
#include "ED_uvedit.hh"
#include "ED_view3d.hh"
#include "ED_view3d_offscreen.hh"
#include "GPU_capabilities.hh"
#include "GPU_init_exit.hh"
#include "NOD_defaults.hh"
#include "NOD_shader.h"
#include "UI_interface_layout.hh"
#include "UI_resources.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "RNA_types.hh"
#include "IMB_colormanagement.hh"
#include "../paint_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ProjPaintImage
struct  blender::ProjStrokeHandle
struct  blender::LoopSeamData
struct  blender::ProjPaintState
union  blender::PixelPointer
union  blender::PixelStore
struct  blender::ProjPixel
struct  blender::ProjPixelClone
struct  blender::TileInfo
struct  blender::VertSeam
struct  blender::ProjPaintLayerClone
struct  blender::ProjPaintFaceLookup
struct  blender::ProjPaintFaceCoSS
struct  blender::PrepareImageEntry
struct  blender::PrepareImageState
struct  blender::ProjectHandle

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define PROJ_BUCKET_BRUSH_DIV   4
#define PROJ_BUCKET_RECT_MIN   4
#define PROJ_BUCKET_RECT_MAX   256
#define PROJ_BOUNDBOX_DIV   8
#define PROJ_BOUNDBOX_SQUARED   (PROJ_BOUNDBOX_DIV * PROJ_BOUNDBOX_DIV)
#define PROJ_DEBUG_WINCLIP   1
#define PROJ_FACE_SEAM0   (1 << 0)
#define PROJ_FACE_SEAM1   (1 << 1)
#define PROJ_FACE_SEAM2   (1 << 2)
#define PROJ_FACE_NOSEAM0   (1 << 4)
#define PROJ_FACE_NOSEAM1   (1 << 5)
#define PROJ_FACE_NOSEAM2   (1 << 6)
#define PROJ_FACE_SEAM_INIT0   (1 << 8)
#define PROJ_FACE_SEAM_INIT1   (1 << 9)
#define PROJ_FACE_SEAM_INIT2   (1 << 10)
#define PROJ_FACE_DEGENERATE   (1 << 12)
#define PROJ_FACE_WINDING_INIT   1
#define PROJ_FACE_WINDING_CW   2
#define PROJ_FACE_SCALE_SEAM   0.99f
#define PROJ_SRC_VIEW   1
#define PROJ_SRC_IMAGE_CAM   2
#define PROJ_SRC_IMAGE_VIEW   3
#define PROJ_SRC_VIEW_FILL   4
#define PROJ_VIEW_DATA_ID   "view_data"
#define PROJ_VIEW_DATA_SIZE   (4 * 4 + 4 * 4 + 3)
#define PROJ_BUCKET_NULL   0
#define PROJ_BUCKET_INIT   (1 << 0)
#define PROJ_GEOM_TOLERANCE   0.00075f
#define PROJ_PIXEL_TOLERANCE   0.01f
#define PROJ_VERT_CULL   1
#define TILE_PENDING   POINTER_FROM_INT(-1)
#define PROJ_PAINT_STATE_SHARED_MEMCPY(ps_dst, ps_src)
#define PROJ_PAINT_STATE_SHARED_CLEAR(ps)
#define ISECT_TRUE   1
#define ISECT_TRUE_P1   2
#define ISECT_TRUE_P2   3
#define ISECT_1   (1)
#define ISECT_2   (1 << 1)
#define ISECT_3   (1 << 2)
#define ISECT_4   (1 << 3)
#define ISECT_ALL3   ((1 << 3) - 1)
#define ISECT_ALL4   ((1 << 4) - 1)
Corner triangle accessor functions
#define PS_CORNER_TRI_AS_VERT_INDEX_3(ps, tri)
#define PS_CORNER_TRI_AS_UV_3(uvlayer, face_i, tri)
#define PS_CORNER_TRI_ASSIGN_UV_3(uv_tri, uvlayer, face_i, tri)

Functions

static void blender::partial_redraw_array_init (ImagePaintPartialRedraw *pr)
BLI_INLINE uchar blender::f_to_char (const float val)
static int blender::project_paint_face_paint_tile (Image *ima, const float *uv)
static Material * blender::tex_get_material (const ProjPaintState *ps, int face_i)
static TexPaintSlot * blender::project_paint_face_paint_slot (const ProjPaintState *ps, int tri_index)
static Image * blender::project_paint_face_paint_image (const ProjPaintState *ps, int tri_index)
static TexPaintSlot * blender::project_paint_face_clone_slot (const ProjPaintState *ps, int tri_index)
static Image * blender::project_paint_face_clone_image (const ProjPaintState *ps, int tri_index)
static int blender::project_bucket_offset (const ProjPaintState *ps, const float projCoSS[2])
static int blender::project_bucket_offset_safe (const ProjPaintState *ps, const float projCoSS[2])
static float blender::VecZDepthOrtho (const float pt[2], const float v1[3], const float v2[3], const float v3[3], float w[3])
static float blender::VecZDepthPersp (const float pt[2], const float v1[4], const float v2[4], const float v3[4], float w[3])
static int blender::project_paint_PickFace (const ProjPaintState *ps, const float pt[2], float w[3])
static bool blender::project_paint_PickColor (const ProjPaintState *ps, const float pt[2], float *rgba_fp, uchar *rgba, const bool interp)
static int blender::project_paint_occlude_ptv (const float pt[3], const float v1[4], const float v2[4], const float v3[4], float w[3], const bool is_ortho)
static int blender::project_paint_occlude_ptv_clip (const float pt[3], const float v1[4], const float v2[4], const float v3[4], const float v1_3d[3], const float v2_3d[3], const float v3_3d[3], float w[3], const bool is_ortho, RegionView3D *rv3d)
static bool blender::project_bucket_point_occluded (const ProjPaintState *ps, LinkNode *bucketFace, const int orig_face, const float pixelScreenCo[4])
static int blender::line_isect_y (const float p1[2], const float p2[2], const float y_level, float *x_isect)
static int blender::line_isect_x (const float p1[2], const float p2[2], const float x_level, float *y_isect)
static bool blender::cmp_uv (const float vec2a[2], const float vec2b[2])
static bool blender::pixel_bounds_uv (const float uv_quad[4][2], const int ibuf_x, const int ibuf_y, rcti *r_bounds_px)
static bool blender::pixel_bounds_array (float(*uv)[2], const int ibuf_x, const int ibuf_y, int tot, rcti *r_bounds_px)
static void blender::project_face_winding_init (const ProjPaintState *ps, const int tri_index)
static bool blender::check_seam (const ProjPaintState *ps, const int orig_face, const int orig_i1_fidx, const int orig_i2_fidx, int *other_face, int *orig_fidx)
static VertSeam * blender::find_adjacent_seam (const ProjPaintState *ps, uint loop_index, uint vert_index, VertSeam **r_seam)
static float blender::compute_seam_normal (VertSeam *seam, VertSeam *adj, float r_no[2])
static void blender::uv_image_outset (const ProjPaintState *ps, float(*orig_uv)[2], float(*puv)[2], uint tri_index, const int ibuf_x, const int ibuf_y)
static void blender::insert_seam_vert_array (const ProjPaintState *ps, MemArena *arena, const int tri_index, const int fidx1, const int ibuf_x, const int ibuf_y)
static void blender::project_face_seams_init (const ProjPaintState *ps, MemArena *arena, const int tri_index, const uint vert_index, bool init_all, const int ibuf_x, const int ibuf_y)
static void blender::screen_px_from_ortho (const float uv[2], const float v1co[3], const float v2co[3], const float v3co[3], const float uv1co[2], const float uv2co[2], const float uv3co[2], float pixelScreenCo[4], float w[3])
static void blender::screen_px_from_persp (const float uv[2], const float v1co[4], const float v2co[4], const float v3co[4], const float uv1co[2], const float uv2co[2], const float uv3co[2], float pixelScreenCo[4], float w[3])
static void blender::screen_px_to_vector_persp (int winx, int winy, const float projmat_inv[4][4], const float view_pos[3], const float co_px[2], float r_dir[3])
static float blender::screen_px_line_point_factor_v2_persp (const ProjPaintState *ps, const float p[2], const float v1[3], const float v2[3])
static void blender::project_face_pixel (const float *tri_uv[3], ImBuf *ibuf_other, const float w[3], uchar rgba_ub[4], float rgba_f[4])
static float blender::project_paint_uvpixel_mask (const ProjPaintState *ps, const int tri_index, const float w[3])
static int blender::project_paint_pixel_sizeof (const short brush_type)
static int blender::project_paint_undo_subtiles (const TileInfo *tinf, int tx, int ty)
static ProjPixel * blender::project_paint_uvpixel_init (const ProjPaintState *ps, MemArena *arena, const TileInfo *tinf, int x_px, int y_px, const float mask, const int tri_index, const float pixelScreenCo[4], const float world_spaceCo[3], const float w[3])
static bool blender::line_clip_rect2f (const rctf *cliprect, const rctf *rect, const float l1[2], const float l2[2], float l1_clip[2], float l2_clip[2])
static void blender::scale_tri (float insetCos[3][3], const float *origCos[3], const float inset)
static float blender::len_squared_v2v2_alt (const float v1[2], const float v2_1, const float v2_2)
static bool blender::project_bucket_isect_circle (const float cent[2], const float radius_squared, const rctf *bucket_bounds)
static void blender::rect_to_uvspace_ortho (const rctf *bucket_bounds, const float *v1coSS, const float *v2coSS, const float *v3coSS, const float *uv1co, const float *uv2co, const float *uv3co, float bucket_bounds_uv[4][2], const int flip)
static void blender::rect_to_uvspace_persp (const rctf *bucket_bounds, const float *v1coSS, const float *v2coSS, const float *v3coSS, const float *uv1co, const float *uv2co, const float *uv3co, float bucket_bounds_uv[4][2], const int flip)
static bool blender::IsectPT2Df_limit (const float pt[2], const float v1[2], const float v2[2], const float v3[2], const float limit)
static int blender::float_z_sort_flip (const void *p1, const void *p2)
static int blender::float_z_sort (const void *p1, const void *p2)
static bool blender::line_rect_clip (const rctf *rect, const float l1[4], const float l2[4], const float uv1[2], const float uv2[2], float uv[2], bool is_ortho)
static void blender::project_bucket_clip_face (const bool is_ortho, const bool is_flip_object, const rctf *cliprect, const rctf *bucket_bounds, const float *v1coSS, const float *v2coSS, const float *v3coSS, const float *uv1co, const float *uv2co, const float *uv3co, float bucket_bounds_uv[8][2], int *tot, bool cull)
static bool blender::IsectPoly2Df (const float pt[2], const float uv[][2], const int tot)
static bool blender::IsectPoly2Df_twoside (const float pt[2], const float uv[][2], const int tot)
static void blender::project_paint_face_init (const ProjPaintState *ps, const int thread_index, const int bucket_index, const int tri_index, const int image_index, const rctf *clip_rect, const rctf *bucket_bounds, ImBuf *ibuf)
static void blender::project_paint_bucket_bounds (const ProjPaintState *ps, const float min[2], const float max[2], int bucketMin[2], int bucketMax[2])
static void blender::project_bucket_bounds (const ProjPaintState *ps, const int bucket_x, const int bucket_y, rctf *r_bucket_bounds)
static void blender::project_bucket_init (const ProjPaintState *ps, const int thread_index, const int bucket_index, const rctf *clip_rect, const rctf *bucket_bounds)
static bool blender::project_bucket_face_isect (ProjPaintState *ps, int bucket_x, int bucket_y, const int3 &tri)
static void blender::project_paint_delayed_face_init (ProjPaintState *ps, const int3 &corner_tri, const int tri_index)
static void blender::proj_paint_state_viewport_init (ProjPaintState *ps, const char symmetry_flag)
static void blender::proj_paint_state_screen_coords_init (ProjPaintState *ps, const int diameter)
static void blender::proj_paint_state_cavity_init (ProjPaintState *ps)
static void blender::proj_paint_state_seam_bleed_init (ProjPaintState *ps)
static void blender::proj_paint_state_thread_init (ProjPaintState *ps, const bool reset_threads)
static void blender::proj_paint_state_vert_flags_init (ProjPaintState *ps)
static void blender::project_paint_bleed_add_face_user (const ProjPaintState *ps, MemArena *arena, const int3 &corner_tri, const int tri_index)
static bool blender::proj_paint_state_mesh_eval_init (const bContext *C, ProjPaintState *ps)
static void blender::proj_paint_layer_clone_init (ProjPaintState *ps, ProjPaintLayerClone *layer_clone)
static bool blender::project_paint_clone_face_skip (ProjPaintState *ps, ProjPaintLayerClone *lc, const TexPaintSlot *slot, const int tri_index)
static void blender::proj_paint_face_lookup_init (const ProjPaintState *ps, ProjPaintFaceLookup *face_lookup)
static bool blender::project_paint_check_face_paintable (const ProjPaintState *ps, const ProjPaintFaceLookup *face_lookup, const int tri_i)
static void blender::proj_paint_face_coSS_init (const ProjPaintState *ps, const int3 &corner_tri, ProjPaintFaceCoSS *coSS)
static bool blender::project_paint_flt_max_cull (const ProjPaintState *ps, const ProjPaintFaceCoSS *coSS)
static bool blender::project_paint_winclip (const ProjPaintState *ps, const ProjPaintFaceCoSS *coSS)
static void blender::project_paint_build_proj_ima (ProjPaintState *ps, MemArena *arena, ListBaseT< PrepareImageEntry > *used_images)
static int blender::project_paint_prepare_image_index (ProjPaintState *ps, ListBaseT< PrepareImageEntry > &used_images, Image *tpage, const int tile, PrepareImageState &state)
static void blender::project_paint_prepare_all_faces (ProjPaintState *ps, MemArena *arena, const ProjPaintFaceLookup *face_lookup, ProjPaintLayerClone *layer_clone, const float2 *uv_map_base, const bool is_multi_view)
static void blender::project_paint_begin (const bContext *C, ProjPaintState *ps, const bool is_multi_view, const char symmetry_flag)
static void blender::paint_proj_begin_clone (ProjPaintState *ps, const float mouse[2])
static void blender::project_paint_end (ProjPaintState *ps)
static void blender::partial_redraw_single_init (ImagePaintPartialRedraw *pr)
static bool blender::partial_redraw_array_merge (ImagePaintPartialRedraw *pr, ImagePaintPartialRedraw *pr_other, int tot)
static bool blender::project_image_refresh_tagged (ProjPaintState *ps)
static bool blender::project_bucket_iter_init (ProjPaintState *ps, const float mval_f[2])
static bool blender::project_bucket_iter_next (ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2])
static void blender::do_projectpaint_clone (ProjPaintState *ps, ProjPixel *projPixel, float mask)
static void blender::do_projectpaint_clone_f (ProjPaintState *ps, ProjPixel *projPixel, float mask)
static void blender::do_projectpaint_smear (ProjPaintState *ps, ProjPixel *projPixel, float mask, MemArena *smearArena, LinkNode **smearPixels, const float co[2])
static void blender::do_projectpaint_smear_f (ProjPaintState *ps, ProjPixel *projPixel, float mask, MemArena *smearArena, LinkNode **smearPixels_f, const float co[2])
static void blender::do_projectpaint_soften_f (ProjPaintState *ps, ProjPixel *projPixel, float mask, MemArena *softenArena, LinkNode **softenPixels)
static void blender::do_projectpaint_soften (ProjPaintState *ps, ProjPixel *projPixel, float mask, MemArena *softenArena, LinkNode **softenPixels)
static void blender::do_projectpaint_draw (ProjPaintState *ps, ProjPixel *projPixel, const float texrgb[3], float mask, float dither, int u, int v)
static void blender::do_projectpaint_draw_f (ProjPaintState *ps, ProjPixel *projPixel, const float texrgb[3], float mask)
static void blender::do_projectpaint_mask (ProjPaintState *ps, ProjPixel *projPixel, float mask)
static void blender::do_projectpaint_mask_f (ProjPaintState *ps, ProjPixel *projPixel, float mask)
static void blender::image_paint_partial_redraw_expand (ImagePaintPartialRedraw *cell, const ProjPixel *projPixel)
static void blender::copy_original_alpha_channel (ProjPaintState *ps, ProjPixel *pixel, bool is_floatbuf)
static void blender::do_projectpaint_thread (TaskPool *__restrict, void *ph_v)
static bool blender::project_paint_op (void *state, const float lastpos[2], const float pos[2])
static void blender::paint_proj_stroke_ps (const bContext *, void *ps_handle_p, const float prev_pos[2], const float pos[2], const bool eraser, float pressure, float distance, float size, ProjPaintState *ps)
void blender::paint_proj_stroke (const bContext *C, void *ps_handle_p, const float prev_pos[2], const float pos[2], const bool eraser, float pressure, float distance, float size)
static void blender::project_state_init (bContext *C, Object *ob, ProjPaintState *ps, const BrushStrokeMode mode, const BrushSwitchMode brush_switch_mode)
void * blender::paint_proj_new_stroke (bContext *C, Object *ob, const float mouse[2], const BrushStrokeMode mode, const BrushSwitchMode brush_switch_mode)
void blender::paint_proj_redraw (const bContext *C, void *ps_handle_p, bool final)
void blender::paint_proj_stroke_done (void *ps_handle_p, wmPaintCursor *cursor)
static wmOperatorStatus blender::texture_paint_camera_project_exec (bContext *C, wmOperator *op)
void blender::PAINT_OT_project_image (wmOperatorType *ot)
static bool blender::texture_paint_image_from_view_poll (bContext *C)
static wmOperatorStatus blender::texture_paint_image_from_view_exec (bContext *C, wmOperator *op)
void blender::PAINT_OT_image_from_view (wmOperatorType *ot)
Data Generation for Projective Texturing
void blender::ED_paint_data_warning (ReportList *reports, bool has_uvs, bool has_mat, bool has_tex, bool has_stencil)
bool blender::ED_paint_proj_mesh_data_check (Scene &scene, Object &ob, bool *r_has_uvs, bool *r_has_mat, bool *r_has_tex, bool *r_has_stencil)
Add Simple UVs Operator
static wmOperatorStatus blender::add_simple_uvs_exec (bContext *C, wmOperator *)
static bool blender::add_simple_uvs_poll (bContext *C)
void blender::PAINT_OT_add_simple_uvs (wmOperatorType *ot)

Add Texture Paint Slot Operator

#define IMA_DEF_NAME   N_("Untitled")
enum  {
  blender::LAYER_BASE_COLOR , blender::LAYER_SPECULAR , blender::LAYER_ROUGHNESS , blender::LAYER_METALLIC ,
  blender::LAYER_NORMAL , blender::LAYER_BUMP , blender::LAYER_DISPLACEMENT
}
static const EnumPropertyItem blender::layer_type_items []
static Material * blender::get_or_create_current_material (bContext *C, Object *ob)
static Image * blender::proj_paint_image_create (wmOperator *op, Main *bmain, bool is_data)
static std::optional< std::string > blender::proj_paint_color_attribute_create (wmOperator *op, Object &ob)
static void blender::default_paint_slot_color_get (int layer_type, Material *ma, float color[4])
static bool blender::proj_paint_add_slot (bContext *C, wmOperator *op)
static int blender::get_texture_layer_type (wmOperator *op, const char *prop_name)
static wmOperatorStatus blender::texture_paint_add_texture_paint_slot_exec (bContext *C, wmOperator *op)
static void blender::get_default_texture_layer_name_for_object (Object *ob, int texture_type, char *dst, int dst_maxncpy)
static wmOperatorStatus blender::texture_paint_add_texture_paint_slot_invoke (bContext *C, wmOperator *op, const wmEvent *)
static void blender::texture_paint_add_texture_paint_slot_ui (bContext *C, wmOperator *op)
void blender::PAINT_OT_add_texture_paint_slot (wmOperatorType *ot)

Detailed Description

Functions to paint images in 2D and 3D.

Definition in file paint_image_proj.cc.

Macro Definition Documentation

◆ IMA_DEF_NAME

#define IMA_DEF_NAME   N_("Untitled")

◆ ISECT_1

#define ISECT_1   (1)

Definition at line 2505 of file paint_image_proj.cc.

Referenced by blender::project_bucket_clip_face().

◆ ISECT_2

#define ISECT_2   (1 << 1)

Definition at line 2506 of file paint_image_proj.cc.

Referenced by blender::project_bucket_clip_face().

◆ ISECT_3

#define ISECT_3   (1 << 2)

Definition at line 2507 of file paint_image_proj.cc.

Referenced by blender::project_bucket_clip_face().

◆ ISECT_4

#define ISECT_4   (1 << 3)

Definition at line 2508 of file paint_image_proj.cc.

Referenced by blender::project_bucket_clip_face().

◆ ISECT_ALL3

#define ISECT_ALL3   ((1 << 3) - 1)

Definition at line 2509 of file paint_image_proj.cc.

Referenced by blender::project_bucket_clip_face().

◆ ISECT_ALL4

#define ISECT_ALL4   ((1 << 4) - 1)

Definition at line 2510 of file paint_image_proj.cc.

Referenced by blender::project_bucket_clip_face().

◆ ISECT_TRUE

#define ISECT_TRUE   1

Definition at line 975 of file paint_image_proj.cc.

Referenced by blender::line_isect_x(), and blender::line_isect_y().

◆ ISECT_TRUE_P1

#define ISECT_TRUE_P1   2

Definition at line 976 of file paint_image_proj.cc.

Referenced by blender::line_isect_x(), and blender::line_isect_y().

◆ ISECT_TRUE_P2

#define ISECT_TRUE_P2   3

Definition at line 977 of file paint_image_proj.cc.

Referenced by blender::line_isect_x(), and blender::line_isect_y().

◆ PROJ_BOUNDBOX_DIV

#define PROJ_BOUNDBOX_DIV   8

Definition at line 149 of file paint_image_proj.cc.

Referenced by blender::project_paint_uvpixel_init().

◆ PROJ_BOUNDBOX_SQUARED

◆ PROJ_BUCKET_BRUSH_DIV

#define PROJ_BUCKET_BRUSH_DIV   4

Definition at line 144 of file paint_image_proj.cc.

Referenced by blender::project_paint_begin().

◆ PROJ_BUCKET_INIT

#define PROJ_BUCKET_INIT   (1 << 0)

Definition at line 198 of file paint_image_proj.cc.

Referenced by blender::project_bucket_init().

◆ PROJ_BUCKET_NULL

#define PROJ_BUCKET_NULL   0

Definition at line 197 of file paint_image_proj.cc.

Referenced by blender::do_projectpaint_thread().

◆ PROJ_BUCKET_RECT_MAX

#define PROJ_BUCKET_RECT_MAX   256

Definition at line 147 of file paint_image_proj.cc.

Referenced by blender::project_paint_begin().

◆ PROJ_BUCKET_RECT_MIN

#define PROJ_BUCKET_RECT_MIN   4

Definition at line 146 of file paint_image_proj.cc.

Referenced by blender::project_paint_begin().

◆ PROJ_DEBUG_WINCLIP

#define PROJ_DEBUG_WINCLIP   1

Definition at line 155 of file paint_image_proj.cc.

◆ PROJ_FACE_DEGENERATE

#define PROJ_FACE_DEGENERATE   (1 << 12)

◆ PROJ_FACE_NOSEAM0

#define PROJ_FACE_NOSEAM0   (1 << 4)

Definition at line 167 of file paint_image_proj.cc.

Referenced by blender::project_face_seams_init().

◆ PROJ_FACE_NOSEAM1

#define PROJ_FACE_NOSEAM1   (1 << 5)

Definition at line 168 of file paint_image_proj.cc.

◆ PROJ_FACE_NOSEAM2

#define PROJ_FACE_NOSEAM2   (1 << 6)

Definition at line 169 of file paint_image_proj.cc.

◆ PROJ_FACE_SCALE_SEAM

#define PROJ_FACE_SCALE_SEAM   0.99f

Definition at line 185 of file paint_image_proj.cc.

Referenced by blender::project_paint_face_init().

◆ PROJ_FACE_SEAM0

#define PROJ_FACE_SEAM0   (1 << 0)

◆ PROJ_FACE_SEAM1

#define PROJ_FACE_SEAM1   (1 << 1)

Definition at line 164 of file paint_image_proj.cc.

Referenced by blender::project_paint_face_init().

◆ PROJ_FACE_SEAM2

#define PROJ_FACE_SEAM2   (1 << 2)

Definition at line 165 of file paint_image_proj.cc.

Referenced by blender::project_paint_face_init().

◆ PROJ_FACE_SEAM_INIT0

#define PROJ_FACE_SEAM_INIT0   (1 << 8)

◆ PROJ_FACE_SEAM_INIT1

#define PROJ_FACE_SEAM_INIT1   (1 << 9)

Definition at line 173 of file paint_image_proj.cc.

Referenced by blender::project_paint_face_init().

◆ PROJ_FACE_SEAM_INIT2

#define PROJ_FACE_SEAM_INIT2   (1 << 10)

Definition at line 174 of file paint_image_proj.cc.

Referenced by blender::project_paint_face_init().

◆ PROJ_FACE_WINDING_CW

#define PROJ_FACE_WINDING_CW   2

◆ PROJ_FACE_WINDING_INIT

◆ PROJ_GEOM_TOLERANCE

#define PROJ_GEOM_TOLERANCE   0.00075f

Definition at line 202 of file paint_image_proj.cc.

Referenced by blender::cmp_uv(), and blender::project_bucket_clip_face().

◆ PROJ_PAINT_STATE_SHARED_CLEAR

#define PROJ_PAINT_STATE_SHARED_CLEAR ( ps)
Value:
MEMSET_STRUCT_AFTER(ps, 0, is_shared_user)
#define MEMSET_STRUCT_AFTER(struct_var, value, member)

Definition at line 432 of file paint_image_proj.cc.

Referenced by blender::paint_proj_stroke_done().

◆ PROJ_PAINT_STATE_SHARED_MEMCPY

#define PROJ_PAINT_STATE_SHARED_MEMCPY ( ps_dst,
ps_src )
Value:
MEMCPY_STRUCT_AFTER(ps_dst, ps_src, is_shared_user)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)

This data is owned by ProjStrokeHandle.ps_views[0], all other views re-use the data.

Definition at line 429 of file paint_image_proj.cc.

Referenced by blender::paint_proj_new_stroke().

◆ PROJ_PIXEL_TOLERANCE

◆ PROJ_SRC_IMAGE_CAM

#define PROJ_SRC_IMAGE_CAM   2

◆ PROJ_SRC_IMAGE_VIEW

#define PROJ_SRC_IMAGE_VIEW   3

◆ PROJ_SRC_VIEW

◆ PROJ_SRC_VIEW_FILL

◆ PROJ_VERT_CULL

#define PROJ_VERT_CULL   1

◆ PROJ_VIEW_DATA_ID

◆ PROJ_VIEW_DATA_SIZE

#define PROJ_VIEW_DATA_SIZE   (4 * 4 + 4 * 4 + 3)

Definition at line 195 of file paint_image_proj.cc.

Referenced by blender::texture_paint_camera_project_exec().

◆ PS_CORNER_TRI_AS_UV_3

#define PS_CORNER_TRI_AS_UV_3 ( uvlayer,
face_i,
tri )
Value:
uvlayer[face_i][tri[0]], uvlayer[face_i][tri[1]], uvlayer[face_i][tri[2]],

Definition at line 568 of file paint_image_proj.cc.

Referenced by blender::project_bucket_init(), blender::project_face_winding_init(), and blender::project_paint_uvpixel_init().

◆ PS_CORNER_TRI_AS_VERT_INDEX_3

#define PS_CORNER_TRI_AS_VERT_INDEX_3 ( ps,
tri )

◆ PS_CORNER_TRI_ASSIGN_UV_3

#define PS_CORNER_TRI_ASSIGN_UV_3 ( uv_tri,
uvlayer,
face_i,
tri )
Value:
{ \
(uv_tri)[0] = uvlayer[face_i][tri[0]]; \
(uv_tri)[1] = uvlayer[face_i][tri[1]]; \
(uv_tri)[2] = uvlayer[face_i][tri[2]]; \
} \
((void)0)

Definition at line 571 of file paint_image_proj.cc.

Referenced by blender::check_seam(), blender::insert_seam_vert_array(), blender::project_paint_bleed_add_face_user(), blender::project_paint_face_init(), and blender::project_paint_PickColor().

◆ TILE_PENDING

#define TILE_PENDING   POINTER_FROM_INT(-1)