Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
paint_intern.h File Reference
#include "BKE_paint.h"
#include "BLI_compiler_compat.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "DNA_scene_types.h"

Go to the source code of this file.

Classes

struct  CoNo
 
struct  WPaintVGroupIndex
 
struct  ImagePaintPartialRedraw
 
struct  CurveMaskCache
 Caching structure for curve mask. More...
 
struct  BlurKernel
 

Macros

#define PAINT_CURVE_NUM_SEGMENTS   40
 

Typedefs

typedef struct CoNo CoNo
 
typedef bool(* StrokeGetLocation) (struct bContext *C, float location[3], const float mouse[2], bool force_original)
 
typedef bool(* StrokeTestStart) (struct bContext *C, struct wmOperator *op, const float mouse[2])
 
typedef void(* StrokeUpdateStep) (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke, struct PointerRNA *itemptr)
 
typedef void(* StrokeRedraw) (const struct bContext *C, struct PaintStroke *stroke, bool final)
 
typedef void(* StrokeDone) (const struct bContext *C, struct PaintStroke *stroke)
 
typedef void(* VPaintTransform_Callback) (const float col[3], const void *user_data, float r_col[3])
 
typedef struct ImagePaintPartialRedraw ImagePaintPartialRedraw
 
typedef struct CurveMaskCache CurveMaskCache
 Caching structure for curve mask. More...
 
typedef enum BrushStrokeMode BrushStrokeMode
 

Enumerations

enum  { WPAINT_GRADIENT_TYPE_LINEAR , WPAINT_GRADIENT_TYPE_RADIAL }
 
enum  eWPaintFlag { WPAINT_ENSURE_MIRROR = (1 << 0) }
 
enum  BrushStrokeMode { BRUSH_STROKE_NORMAL , BRUSH_STROKE_INVERT , BRUSH_STROKE_SMOOTH }
 
enum  PartialVisAction { PARTIALVIS_HIDE , PARTIALVIS_SHOW }
 
enum  PartialVisArea { PARTIALVIS_INSIDE , PARTIALVIS_OUTSIDE , PARTIALVIS_ALL , PARTIALVIS_MASKED }
 
enum  PaintMaskFloodMode { PAINT_MASK_FLOOD_VALUE , PAINT_MASK_FLOOD_VALUE_INVERSE , PAINT_MASK_INVERT }
 

Functions

struct PaintStrokepaint_stroke_new (struct bContext *C, struct wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
 
void paint_stroke_free (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
 
bool paint_space_stroke_enabled (struct Brush *br, enum ePaintMode mode)
 
bool paint_supports_dynamic_size (struct Brush *br, enum ePaintMode mode)
 
bool paint_supports_dynamic_tex_coords (struct Brush *br, enum ePaintMode mode)
 
bool paint_supports_smooth_stroke (struct Brush *br, enum ePaintMode mode)
 
bool paint_supports_texture (enum ePaintMode mode)
 
bool paint_supports_jitter (enum ePaintMode mode)
 
struct wmKeyMappaint_stroke_modal_keymap (struct wmKeyConfig *keyconf)
 
int paint_stroke_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event, struct PaintStroke **stroke_p)
 
int paint_stroke_exec (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
 
void paint_stroke_cancel (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
 
bool paint_stroke_flipped (struct PaintStroke *stroke)
 
bool paint_stroke_inverted (struct PaintStroke *stroke)
 
struct ViewContextpaint_stroke_view_context (struct PaintStroke *stroke)
 
voidpaint_stroke_mode_data (struct PaintStroke *stroke)
 
float paint_stroke_distance_get (struct PaintStroke *stroke)
 
void paint_stroke_set_mode_data (struct PaintStroke *stroke, void *mode_data)
 
bool PAINT_brush_tool_poll (struct bContext *C)
 
void paint_cursor_delete_textures (void)
 
bool weight_paint_poll (struct bContext *C)
 
bool weight_paint_poll_ignore_tool (bContext *C)
 
bool weight_paint_mode_poll (struct bContext *C)
 
bool vertex_paint_poll (struct bContext *C)
 
bool vertex_paint_poll_ignore_tool (struct bContext *C)
 
bool vertex_paint_mode_poll (struct bContext *C)
 
void PAINT_OT_weight_paint_toggle (struct wmOperatorType *ot)
 
void PAINT_OT_weight_paint (struct wmOperatorType *ot)
 
void PAINT_OT_weight_set (struct wmOperatorType *ot)
 
void PAINT_OT_weight_gradient (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_paint_toggle (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_paint (struct wmOperatorType *ot)
 
unsigned int vpaint_get_current_color (struct Scene *scene, struct VPaint *vp, bool secondary)
 
unsigned int ED_vpaint_blend_tool (int tool, uint col, uint paintcol, int alpha_i)
 
float ED_wpaint_blend_tool (int tool, float weight, float paintval, float alpha)
 
bool ED_wpaint_ensure_data (struct bContext *C, struct ReportList *reports, enum eWPaintFlag flag, struct WPaintVGroupIndex *vgroup_index)
 
int ED_wpaint_mirror_vgroup_ensure (struct Object *ob, int vgroup_active)
 
void PAINT_OT_vertex_color_set (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_color_from_weight (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_color_smooth (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_color_brightness_contrast (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_color_hsv (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_color_invert (struct wmOperatorType *ot)
 
void PAINT_OT_vertex_color_levels (struct wmOperatorType *ot)
 
void PAINT_OT_weight_from_bones (struct wmOperatorType *ot)
 
void PAINT_OT_weight_sample (struct wmOperatorType *ot)
 
void PAINT_OT_weight_sample_group (struct wmOperatorType *ot)
 
struct VertProjHandleED_vpaint_proj_handle_create (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct CoNo **r_vcosnos)
 
void ED_vpaint_proj_handle_update (struct Depsgraph *depsgraph, struct VertProjHandle *vp_handle, struct ARegion *region, const float mval_fl[2])
 
void ED_vpaint_proj_handle_free (struct VertProjHandle *vp_handle)
 
bool image_texture_paint_poll (struct bContext *C)
 
void imapaint_image_update (struct SpaceImage *sima, struct Image *image, struct ImBuf *ibuf, struct ImageUser *iuser, short texpaint)
 
struct ImagePaintPartialRedrawget_imapaintpartial (void)
 
void set_imapaintpartial (struct ImagePaintPartialRedraw *ippr)
 
void imapaint_region_tiles (struct ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th)
 
bool get_imapaint_zoom (struct bContext *C, float *zoomx, float *zoomy)
 
voidpaint_2d_new_stroke (struct bContext *, struct wmOperator *, int mode)
 
void paint_2d_redraw (const struct bContext *C, void *ps, bool final)
 
void paint_2d_stroke_done (void *ps)
 
void paint_2d_stroke (void *ps, const float prev_mval[2], const float mval[2], bool eraser, float pressure, float distance, float size)
 
void paint_2d_bucket_fill (const struct bContext *C, const float color[3], struct Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
 
void paint_2d_gradient_fill (const struct bContext *C, struct Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
 
voidpaint_proj_new_stroke (struct bContext *C, struct Object *ob, const float mouse[2], int mode)
 
void paint_proj_stroke (const struct bContext *C, void *ps_handle_p, const float prev_pos[2], const float pos[2], bool eraser, float pressure, float distance, float size)
 
void paint_proj_redraw (const struct bContext *C, void *ps_handle_p, bool final)
 
void paint_proj_stroke_done (void *ps_handle_p)
 
void paint_brush_color_get (struct Scene *scene, struct Brush *br, bool color_correction, bool invert, float distance, float pressure, float color[3], struct ColorManagedDisplay *display)
 
bool paint_use_opacity_masking (struct Brush *brush)
 
void paint_brush_init_tex (struct Brush *brush)
 
void paint_brush_exit_tex (struct Brush *brush)
 
bool image_paint_poll (struct bContext *C)
 
void PAINT_OT_grab_clone (struct wmOperatorType *ot)
 
void PAINT_OT_sample_color (struct wmOperatorType *ot)
 
void PAINT_OT_brush_colors_flip (struct wmOperatorType *ot)
 
void PAINT_OT_texture_paint_toggle (struct wmOperatorType *ot)
 
void PAINT_OT_project_image (struct wmOperatorType *ot)
 
void PAINT_OT_image_from_view (struct wmOperatorType *ot)
 
void PAINT_OT_add_texture_paint_slot (struct wmOperatorType *ot)
 
void PAINT_OT_image_paint (struct wmOperatorType *ot)
 
void PAINT_OT_add_simple_uvs (struct wmOperatorType *ot)
 
void paint_curve_mask_cache_free_data (CurveMaskCache *curve_mask_cache)
 
void paint_curve_mask_cache_update (CurveMaskCache *curve_mask_cache, const struct Brush *brush, int diameter, float radius, const float cursor_position[2])
 
void SCULPT_OT_uv_sculpt_stroke (struct wmOperatorType *ot)
 
bool paint_convert_bb_to_rect (struct rcti *rect, const float bb_min[3], const float bb_max[3], const struct ARegion *region, struct RegionView3D *rv3d, struct Object *ob)
 
void paint_calc_redraw_planes (float planes[4][4], const struct ARegion *region, struct Object *ob, const struct rcti *screen_rect)
 
float paint_calc_object_space_radius (struct ViewContext *vc, const float center[3], float pixel_radius)
 
float paint_get_tex_pixel (const struct MTex *mtex, float u, float v, struct ImagePool *pool, int thread)
 
void paint_get_tex_pixel_col (const struct MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool, int thread, bool convert, struct ColorSpace *colorspace)
 
void paint_sample_color (struct bContext *C, struct ARegion *region, int x, int y, bool texpaint_proj, bool palette)
 
void paint_stroke_operator_properties (struct wmOperatorType *ot)
 
void BRUSH_OT_curve_preset (struct wmOperatorType *ot)
 
void PAINT_OT_face_select_linked (struct wmOperatorType *ot)
 
void PAINT_OT_face_select_linked_pick (struct wmOperatorType *ot)
 
void PAINT_OT_face_select_all (struct wmOperatorType *ot)
 
void PAINT_OT_face_select_hide (struct wmOperatorType *ot)
 
void PAINT_OT_face_vert_reveal (struct wmOperatorType *ot)
 
void PAINT_OT_vert_select_all (struct wmOperatorType *ot)
 
void PAINT_OT_vert_select_ungrouped (struct wmOperatorType *ot)
 
void PAINT_OT_vert_select_hide (struct wmOperatorType *ot)
 
bool vert_paint_poll (struct bContext *C)
 
bool mask_paint_poll (struct bContext *C)
 
bool paint_curve_poll (struct bContext *C)
 
bool facemask_paint_poll (struct bContext *C)
 
BLI_INLINE void flip_v3_v3 (float out[3], const float in[3], const ePaintSymmetryFlags symm)
 
BLI_INLINE void flip_qt_qt (float out[4], const float in[4], const ePaintSymmetryFlags symm)
 
BLI_INLINE void flip_v3 (float v[3], const ePaintSymmetryFlags symm)
 
BLI_INLINE void flip_qt (float quat[4], const ePaintSymmetryFlags symm)
 
void PAINT_OT_hide_show (struct wmOperatorType *ot)
 
void PAINT_OT_mask_flood_fill (struct wmOperatorType *ot)
 
void PAINT_OT_mask_lasso_gesture (struct wmOperatorType *ot)
 
void PAINT_OT_mask_box_gesture (struct wmOperatorType *ot)
 
void PAINT_OT_mask_line_gesture (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_new (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_add_point (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_delete_point (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_select (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_slide (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_draw (struct wmOperatorType *ot)
 
void PAINTCURVE_OT_cursor (struct wmOperatorType *ot)
 
BlurKernelpaint_new_blur_kernel (struct Brush *br, bool proj)
 
void paint_delete_blur_kernel (BlurKernel *)
 

Macro Definition Documentation

◆ PAINT_CURVE_NUM_SEGMENTS

#define PAINT_CURVE_NUM_SEGMENTS   40

Definition at line 510 of file paint_intern.h.

Typedef Documentation

◆ BrushStrokeMode

◆ CoNo

typedef struct CoNo CoNo

◆ CurveMaskCache

Caching structure for curve mask.

When 2d painting images the curve mask is used as an input.

◆ ImagePaintPartialRedraw

◆ StrokeDone

typedef void(* StrokeDone) (const struct bContext *C, struct PaintStroke *stroke)

Definition at line 59 of file paint_intern.h.

◆ StrokeGetLocation

typedef bool(* StrokeGetLocation) (struct bContext *C, float location[3], const float mouse[2], bool force_original)

Definition at line 49 of file paint_intern.h.

◆ StrokeRedraw

typedef void(* StrokeRedraw) (const struct bContext *C, struct PaintStroke *stroke, bool final)

Definition at line 58 of file paint_intern.h.

◆ StrokeTestStart

typedef bool(* StrokeTestStart) (struct bContext *C, struct wmOperator *op, const float mouse[2])

Definition at line 53 of file paint_intern.h.

◆ StrokeUpdateStep

typedef void(* StrokeUpdateStep) (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke, struct PointerRNA *itemptr)

Definition at line 54 of file paint_intern.h.

◆ VPaintTransform_Callback

typedef void(* VPaintTransform_Callback) (const float col[3], const void *user_data, float r_col[3])

Definition at line 121 of file paint_intern.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WPAINT_GRADIENT_TYPE_LINEAR 
WPAINT_GRADIENT_TYPE_RADIAL 

Definition at line 129 of file paint_intern.h.

◆ BrushStrokeMode

Enumerator
BRUSH_STROKE_NORMAL 
BRUSH_STROKE_INVERT 
BRUSH_STROKE_SMOOTH 

Definition at line 448 of file paint_intern.h.

◆ eWPaintFlag

Enumerator
WPAINT_ENSURE_MIRROR 

Definition at line 157 of file paint_intern.h.

◆ PaintMaskFloodMode

Enumerator
PAINT_MASK_FLOOD_VALUE 
PAINT_MASK_FLOOD_VALUE_INVERSE 
PAINT_MASK_INVERT 

Definition at line 472 of file paint_intern.h.

◆ PartialVisAction

Enumerator
PARTIALVIS_HIDE 
PARTIALVIS_SHOW 

Definition at line 456 of file paint_intern.h.

◆ PartialVisArea

Enumerator
PARTIALVIS_INSIDE 
PARTIALVIS_OUTSIDE 
PARTIALVIS_ALL 
PARTIALVIS_MASKED 

Definition at line 461 of file paint_intern.h.

Function Documentation

◆ BRUSH_OT_curve_preset()

void BRUSH_OT_curve_preset ( struct wmOperatorType ot)

◆ ED_vpaint_blend_tool()

unsigned int ED_vpaint_blend_tool ( int  tool,
uint  col,
uint  paintcol,
int  alpha_i 
)
Note
weight-paint has an equivalent function: ED_wpaint_blend_tool

◆ ED_vpaint_proj_handle_create()

struct VertProjHandle* ED_vpaint_proj_handle_create ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
struct CoNo **  r_vcosnos 
)

◆ ED_vpaint_proj_handle_free()

void ED_vpaint_proj_handle_free ( struct VertProjHandle vp_handle)

◆ ED_vpaint_proj_handle_update()

void ED_vpaint_proj_handle_update ( struct Depsgraph depsgraph,
struct VertProjHandle vp_handle,
struct ARegion region,
const float  mval_fl[2] 
)

◆ ED_wpaint_blend_tool()

float ED_wpaint_blend_tool ( int  tool,
float  weight,
float  paintval,
float  alpha 
)

◆ ED_wpaint_ensure_data()

bool ED_wpaint_ensure_data ( struct bContext C,
struct ReportList reports,
enum eWPaintFlag  flag,
struct WPaintVGroupIndex vgroup_index 
)

◆ ED_wpaint_mirror_vgroup_ensure()

int ED_wpaint_mirror_vgroup_ensure ( struct Object ob,
int  vgroup_active 
)

◆ facemask_paint_poll()

bool facemask_paint_poll ( struct bContext C)

◆ flip_qt()

BLI_INLINE void flip_qt ( float  quat[4],
const ePaintSymmetryFlags  symm 
)

Definition at line 442 of file paint_intern.h.

References flip_qt_qt().

Referenced by SCULPT_flip_quat_by_symm_area().

◆ flip_qt_qt()

BLI_INLINE void flip_qt_qt ( float  out[4],
const float  in[4],
const ePaintSymmetryFlags  symm 
)

◆ flip_v3()

BLI_INLINE void flip_v3 ( float  v[3],
const ePaintSymmetryFlags  symm 
)

◆ flip_v3_v3()

BLI_INLINE void flip_v3_v3 ( float  out[3],
const float  in[3],
const ePaintSymmetryFlags  symm 
)

◆ get_imapaint_zoom()

bool get_imapaint_zoom ( struct bContext C,
float zoomx,
float zoomy 
)

◆ get_imapaintpartial()

struct ImagePaintPartialRedraw* get_imapaintpartial ( void  )

Definition at line 79 of file paint_image.cc.

References imapaintpartial.

◆ image_paint_poll()

bool image_paint_poll ( struct bContext C)

◆ image_texture_paint_poll()

bool image_texture_paint_poll ( struct bContext C)

Definition at line 993 of file paint_image.cc.

References C, ED_image_tools_paint_poll(), and texture_paint_poll().

Referenced by ED_keymap_paint().

◆ imapaint_image_update()

void imapaint_image_update ( struct SpaceImage sima,
struct Image image,
struct ImBuf ibuf,
struct ImageUser iuser,
short  texpaint 
)

◆ imapaint_region_tiles()

void imapaint_region_tiles ( struct ImBuf ibuf,
int  x,
int  y,
int  w,
int  h,
int *  tx,
int *  ty,
int *  tw,
int *  th 
)

Definition at line 96 of file paint_image.cc.

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

Referenced by ED_imapaint_dirty_region(), and paint_2d_op().

◆ mask_paint_poll()

bool mask_paint_poll ( struct bContext C)

Definition at line 1008 of file paint_image.cc.

References BKE_paint_select_elem_test(), C, and CTX_data_active_object().

Referenced by PAINT_OT_weight_set().

◆ paint_2d_bucket_fill()

void paint_2d_bucket_fill ( const struct bContext C,
const float  color[3],
struct Brush br,
const float  mouse_init[2],
const float  mouse_final[2],
void ps 
)

This function expects linear space color values.

◆ paint_2d_gradient_fill()

void paint_2d_gradient_fill ( const struct bContext C,
struct Brush br,
const float  mouse_init[2],
const float  mouse_final[2],
void ps 
)

◆ paint_2d_new_stroke()

void* paint_2d_new_stroke ( struct bContext C,
struct wmOperator op,
int  mode 
)

◆ paint_2d_redraw()

void paint_2d_redraw ( const struct bContext C,
void ps,
bool  final 
)

◆ paint_2d_stroke()

void paint_2d_stroke ( void ps,
const float  prev_mval[2],
const float  mval[2],
bool  eraser,
float  pressure,
float  distance,
float  size 
)

◆ paint_2d_stroke_done()

void paint_2d_stroke_done ( void ps)

◆ paint_brush_color_get()

void paint_brush_color_get ( struct Scene scene,
struct Brush br,
bool  color_correction,
bool  invert,
float  distance,
float  pressure,
float  color[3],
struct ColorManagedDisplay display 
)

◆ paint_brush_exit_tex()

void paint_brush_exit_tex ( struct Brush brush)

◆ paint_brush_init_tex()

void paint_brush_init_tex ( struct Brush brush)

◆ PAINT_brush_tool_poll()

bool PAINT_brush_tool_poll ( struct bContext C)

◆ paint_calc_object_space_radius()

float paint_calc_object_space_radius ( struct ViewContext vc,
const float  center[3],
float  pixel_radius 
)

◆ paint_calc_redraw_planes()

void paint_calc_redraw_planes ( float  planes[4][4],
const struct ARegion region,
struct Object ob,
const struct rcti screen_rect 
)

Get four planes in object-space that describe the projection of screen_rect from screen into object-space (essentially converting a 2D screens-space bounding box into four 3D planes).

Referenced by ED_sculpt_redraw_planes_get().

◆ paint_convert_bb_to_rect()

bool paint_convert_bb_to_rect ( struct rcti rect,
const float  bb_min[3],
const float  bb_max[3],
const struct ARegion region,
struct RegionView3D rv3d,
struct Object ob 
)

Convert the object-space axis-aligned bounding box (expressed as its minimum and maximum corners) into a screen-space rectangle, returns zero if the result is empty.

Referenced by SCULPT_get_redraw_rect().

◆ paint_cursor_delete_textures()

void paint_cursor_delete_textures ( void  )

◆ paint_curve_mask_cache_free_data()

void paint_curve_mask_cache_free_data ( CurveMaskCache curve_mask_cache)

◆ paint_curve_mask_cache_update()

void paint_curve_mask_cache_update ( CurveMaskCache curve_mask_cache,
const struct Brush brush,
int  diameter,
float  radius,
const float  cursor_position[2] 
)

◆ paint_curve_poll()

bool paint_curve_poll ( struct bContext C)

◆ paint_delete_blur_kernel()

void paint_delete_blur_kernel ( BlurKernel kernel)

Definition at line 240 of file paint_image.cc.

References kernel, and MEM_freeN.

Referenced by paint_2d_canvas_free(), paint_new_blur_kernel(), and project_paint_end().

◆ paint_get_tex_pixel()

float paint_get_tex_pixel ( const struct MTex mtex,
float  u,
float  v,
struct ImagePool pool,
int  thread 
)

◆ paint_get_tex_pixel_col()

void paint_get_tex_pixel_col ( const struct MTex mtex,
float  u,
float  v,
float  rgba[4],
struct ImagePool pool,
int  thread,
bool  convert,
struct ColorSpace colorspace 
)

Referenced by load_tex_task_cb_ex().

◆ paint_new_blur_kernel()

BlurKernel* paint_new_blur_kernel ( struct Brush br,
bool  proj 
)

Paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging. Can be extended to other blur kernels later,

Definition at line 171 of file paint_image.cc.

References Brush::blur_kernel_radius, Brush::blur_mode, exp(), kernel, KERNEL_BOX, KERNEL_GAUSSIAN, MEM_mallocN, paint_delete_blur_kernel(), and type.

Referenced by paint_2d_new_stroke(), and project_state_init().

◆ PAINT_OT_add_simple_uvs()

void PAINT_OT_add_simple_uvs ( struct wmOperatorType ot)

◆ PAINT_OT_add_texture_paint_slot()

void PAINT_OT_add_texture_paint_slot ( struct wmOperatorType ot)

◆ PAINT_OT_brush_colors_flip()

void PAINT_OT_brush_colors_flip ( struct wmOperatorType ot)

◆ PAINT_OT_face_select_all()

void PAINT_OT_face_select_all ( struct wmOperatorType ot)

◆ PAINT_OT_face_select_hide()

void PAINT_OT_face_select_hide ( struct wmOperatorType ot)

◆ PAINT_OT_face_select_linked()

void PAINT_OT_face_select_linked ( struct wmOperatorType ot)

◆ PAINT_OT_face_select_linked_pick()

void PAINT_OT_face_select_linked_pick ( struct wmOperatorType ot)

◆ PAINT_OT_face_vert_reveal()

void PAINT_OT_face_vert_reveal ( struct wmOperatorType ot)

◆ PAINT_OT_grab_clone()

void PAINT_OT_grab_clone ( struct wmOperatorType ot)

◆ PAINT_OT_hide_show()

void PAINT_OT_hide_show ( struct wmOperatorType ot)

◆ PAINT_OT_image_from_view()

void PAINT_OT_image_from_view ( struct wmOperatorType ot)

◆ PAINT_OT_image_paint()

void PAINT_OT_image_paint ( struct wmOperatorType ot)

◆ PAINT_OT_mask_box_gesture()

void PAINT_OT_mask_box_gesture ( struct wmOperatorType ot)

◆ PAINT_OT_mask_flood_fill()

void PAINT_OT_mask_flood_fill ( struct wmOperatorType ot)

◆ PAINT_OT_mask_lasso_gesture()

void PAINT_OT_mask_lasso_gesture ( struct wmOperatorType ot)

◆ PAINT_OT_mask_line_gesture()

void PAINT_OT_mask_line_gesture ( struct wmOperatorType ot)

◆ PAINT_OT_project_image()

void PAINT_OT_project_image ( struct wmOperatorType ot)

◆ PAINT_OT_sample_color()

void PAINT_OT_sample_color ( struct wmOperatorType ot)

◆ PAINT_OT_texture_paint_toggle()

void PAINT_OT_texture_paint_toggle ( struct wmOperatorType ot)

◆ PAINT_OT_vert_select_all()

void PAINT_OT_vert_select_all ( struct wmOperatorType ot)

◆ PAINT_OT_vert_select_hide()

void PAINT_OT_vert_select_hide ( struct wmOperatorType ot)

◆ PAINT_OT_vert_select_ungrouped()

void PAINT_OT_vert_select_ungrouped ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_brightness_contrast()

void PAINT_OT_vertex_color_brightness_contrast ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_from_weight()

void PAINT_OT_vertex_color_from_weight ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_hsv()

void PAINT_OT_vertex_color_hsv ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_invert()

void PAINT_OT_vertex_color_invert ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_levels()

void PAINT_OT_vertex_color_levels ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_set()

void PAINT_OT_vertex_color_set ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_color_smooth()

void PAINT_OT_vertex_color_smooth ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_paint()

void PAINT_OT_vertex_paint ( struct wmOperatorType ot)

◆ PAINT_OT_vertex_paint_toggle()

void PAINT_OT_vertex_paint_toggle ( struct wmOperatorType ot)

◆ PAINT_OT_weight_from_bones()

void PAINT_OT_weight_from_bones ( struct wmOperatorType ot)

◆ PAINT_OT_weight_gradient()

void PAINT_OT_weight_gradient ( struct wmOperatorType ot)

◆ PAINT_OT_weight_paint()

void PAINT_OT_weight_paint ( struct wmOperatorType ot)

◆ PAINT_OT_weight_paint_toggle()

void PAINT_OT_weight_paint_toggle ( struct wmOperatorType ot)

◆ PAINT_OT_weight_sample()

void PAINT_OT_weight_sample ( struct wmOperatorType ot)

◆ PAINT_OT_weight_sample_group()

void PAINT_OT_weight_sample_group ( struct wmOperatorType ot)

◆ PAINT_OT_weight_set()

void PAINT_OT_weight_set ( struct wmOperatorType ot)

◆ paint_proj_new_stroke()

void* paint_proj_new_stroke ( struct bContext C,
struct Object ob,
const float  mouse[2],
int  mode 
)

◆ paint_proj_redraw()

void paint_proj_redraw ( const struct bContext C,
void ps_handle_p,
bool  final 
)

◆ paint_proj_stroke()

void paint_proj_stroke ( const struct bContext C,
void ps_handle_p,
const float  prev_pos[2],
const float  pos[2],
bool  eraser,
float  pressure,
float  distance,
float  size 
)

◆ paint_proj_stroke_done()

void paint_proj_stroke_done ( void ps_handle_p)

◆ paint_sample_color()

void paint_sample_color ( struct bContext C,
struct ARegion region,
int  x,
int  y,
bool  texpaint_proj,
bool  palette 
)

Used for both 3D view and image window.

Definition at line 374 of file paint_utils.c.

References Palette::active_color, bilinear_interpolation_color_wrap(), BKE_brush_color_set(), BKE_image_acquire_ibuf(), BKE_image_get_tile_from_pos(), BKE_image_release_ibuf(), BKE_imageuser_default(), BKE_object_material_get(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paint_palette(), BKE_paint_palette_set(), BKE_palette_add(), BKE_palette_color_add(), BKE_texpaint_slot_refresh_cache(), BLI_listbase_count(), C, ImagePaintSettings::canvas, CD_MASK_BAREMESH, CD_MASK_ORIGINDEX, CD_MLOOPUV, CLAMP, color, Palette::colors, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), CustomData_has_layer(), Object::data, DEG_get_evaluated_object(), depsgraph, ED_space_image_color_sample(), ED_view3d_viewcontext_init(), fmodf, ImageUser::framenr, GPU_DATA_FLOAT, GPU_frontbuffer_read_pixels(), TexPaintSlot::ima, IMA_SRC_TILED, image(), IMAGEPAINT_MODE_MATERIAL, ToolSettings::imapaint, imapaint_pick_face(), imapaint_pick_uv(), interp(), TexPaintSlot::interp, ImagePaintSettings::interp, linearrgb_to_srgb_v3_v3(), MPoly::mat_nr, mesh_get_eval_final(), ImagePaintSettings::mode, nearest_interpolation_color_wrap(), NULL, OBACT, Material::paint_active_slot, CustomData_MeshMasks::pmask, ImBuf::rect, ImBuf::rect_float, rgb_uchar_to_float(), usdtokens::rgba(), scene, SHD_INTERP_CLOSEST, SHD_INTERP_LINEAR, straight_to_premul_v4(), Material::texpaintslot, ImageUser::tile, Scene::toolsettings, Mesh::totpoly, v, view3d_operator_needs_opengl(), ARegion::winrct, ARegion::winx, ARegion::winy, x, ImBuf::x, rcti::xmin, y, ImBuf::y, and rcti::ymin.

Referenced by sample_color_exec(), sample_color_invoke(), and sample_color_modal().

◆ paint_space_stroke_enabled()

bool paint_space_stroke_enabled ( struct Brush br,
enum ePaintMode  mode 
)

◆ paint_stroke_cancel()

void paint_stroke_cancel ( struct bContext C,
struct wmOperator op,
struct PaintStroke stroke 
)

◆ paint_stroke_distance_get()

float paint_stroke_distance_get ( struct PaintStroke stroke)

◆ paint_stroke_exec()

int paint_stroke_exec ( struct bContext C,
struct wmOperator op,
struct PaintStroke stroke 
)

◆ paint_stroke_flipped()

bool paint_stroke_flipped ( struct PaintStroke stroke)

Definition at line 1656 of file paint_stroke.c.

References PaintStroke::pen_flip.

◆ paint_stroke_free()

void paint_stroke_free ( struct bContext C,
struct wmOperator op,
struct PaintStroke stroke 
)

◆ paint_stroke_inverted()

bool paint_stroke_inverted ( struct PaintStroke stroke)

◆ paint_stroke_modal()

int paint_stroke_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event,
struct PaintStroke **  stroke_p 
)

◆ paint_stroke_modal_keymap()

struct wmKeyMap* paint_stroke_modal_keymap ( struct wmKeyConfig keyconf)

Called in paint_ops.c, on each regeneration of key-maps.

Definition at line 1131 of file paint_stroke.c.

References wmKeyMap::modal_items, EnumPropertyItem::name, PAINT_STROKE_MODAL_CANCEL, WM_modalkeymap_ensure(), and WM_modalkeymap_find().

Referenced by ED_keymap_paint().

◆ paint_stroke_mode_data()

void* paint_stroke_mode_data ( struct PaintStroke stroke)

◆ paint_stroke_new()

struct PaintStroke* paint_stroke_new ( struct bContext C,
struct wmOperator op,
StrokeGetLocation  get_location,
StrokeTestStart  test_start,
StrokeUpdateStep  update_step,
StrokeRedraw  redraw,
StrokeDone  done,
int  event_type 
)

Definition at line 874 of file paint_stroke.c.

References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BKE_brush_size_get(), BKE_curvemapping_init(), BKE_image_pool_acquire_ibuf(), BKE_image_pool_release_ibuf(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paint_set_overlay_override(), BKE_paintmode_get_active_from_context(), PaintStroke::brush, BRUSH_CURVE, BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, C, Paint::cavity_curve, UnifiedPaintSettings::colorspace, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region_view3d(), Brush::curve, depsgraph, UnifiedPaintSettings::do_linear_conversion, PaintStroke::done, ED_view3d_viewcontext_init(), PaintStroke::event_type, Brush::flag, Paint::flags, get_imapaint_zoom(), PaintStroke::get_location, Tex::ima, Tex::iuser, max_ff(), MEM_callocN, Brush::mtex, mul_v3_fl(), NULL, PaintStroke::original, UnifiedPaintSettings::overlap_factor, Brush::overlay_flags, paint_tool_raycast_original(), PAINT_USE_CAVITY_MASK, wmOperator::ptr, ImBuf::rect_colorspace, ImBuf::rect_float, PaintStroke::redraw, RegionView3D::rflag, RNA_enum_get(), RNA_enum_set(), RV3D_PAINTING, UnifiedPaintSettings::start_pixel_radius, UnifiedPaintSettings::stroke_active, PaintStroke::stroke_mode, PaintStroke::test_start, MTex::tex, TEX_IMAGE, Tex::type, ToolSettings::unified_paint_settings, PaintStroke::update_step, PaintStroke::ups, PaintStroke::vc, and PaintStroke::zoom_2d.

Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().

◆ paint_stroke_operator_properties()

void paint_stroke_operator_properties ( struct wmOperatorType ot)

◆ paint_stroke_set_mode_data()

void paint_stroke_set_mode_data ( struct PaintStroke stroke,
void mode_data 
)

◆ paint_stroke_view_context()

struct ViewContext* paint_stroke_view_context ( struct PaintStroke stroke)

Definition at line 1646 of file paint_stroke.c.

References PaintStroke::vc.

Referenced by sculpt_update_cache_invariants(), and vwpaint_update_cache_invariants().

◆ paint_supports_dynamic_size()

bool paint_supports_dynamic_size ( struct Brush br,
enum ePaintMode  mode 
)

◆ paint_supports_dynamic_tex_coords()

bool paint_supports_dynamic_tex_coords ( struct Brush br,
enum ePaintMode  mode 
)

Return true if the brush size can change during paint (normally used for pressure).

Definition at line 1111 of file paint_stroke.c.

References BRUSH_ANCHORED, Brush::flag, PAINT_MODE_SCULPT, and sculpt_is_grab_tool().

Referenced by paint_brush_update().

◆ paint_supports_jitter()

bool paint_supports_jitter ( enum ePaintMode  mode)

◆ paint_supports_smooth_stroke()

bool paint_supports_smooth_stroke ( struct Brush br,
enum ePaintMode  mode 
)

◆ paint_supports_texture()

bool paint_supports_texture ( enum ePaintMode  mode)

◆ paint_use_opacity_masking()

bool paint_use_opacity_masking ( struct Brush brush)

◆ PAINTCURVE_OT_add_point()

void PAINTCURVE_OT_add_point ( struct wmOperatorType ot)

◆ PAINTCURVE_OT_cursor()

void PAINTCURVE_OT_cursor ( struct wmOperatorType ot)

◆ PAINTCURVE_OT_delete_point()

void PAINTCURVE_OT_delete_point ( struct wmOperatorType ot)

◆ PAINTCURVE_OT_draw()

void PAINTCURVE_OT_draw ( struct wmOperatorType ot)

◆ PAINTCURVE_OT_new()

void PAINTCURVE_OT_new ( struct wmOperatorType ot)

◆ PAINTCURVE_OT_select()

void PAINTCURVE_OT_select ( struct wmOperatorType ot)

◆ PAINTCURVE_OT_slide()

void PAINTCURVE_OT_slide ( struct wmOperatorType ot)

◆ SCULPT_OT_uv_sculpt_stroke()

void SCULPT_OT_uv_sculpt_stroke ( struct wmOperatorType ot)

◆ set_imapaintpartial()

void set_imapaintpartial ( struct ImagePaintPartialRedraw ippr)

Definition at line 84 of file paint_image.cc.

References imapaintpartial.

Referenced by project_image_refresh_tagged().

◆ vert_paint_poll()

bool vert_paint_poll ( struct bContext C)

◆ vertex_paint_mode_poll()

bool vertex_paint_mode_poll ( struct bContext C)

◆ vertex_paint_poll()

bool vertex_paint_poll ( struct bContext C)

Definition at line 269 of file paint_vertex.cc.

References C, and vertex_paint_poll_ex().

Referenced by ed_vwpaintmode_enter_generic(), and PAINT_OT_vertex_paint().

◆ vertex_paint_poll_ignore_tool()

bool vertex_paint_poll_ignore_tool ( struct bContext C)

Definition at line 274 of file paint_vertex.cc.

References C, and vertex_paint_poll_ex().

Referenced by sample_color_poll().

◆ vpaint_get_current_color()

unsigned int vpaint_get_current_color ( struct Scene scene,
struct VPaint vp,
bool  secondary 
)

Definition at line 328 of file paint_vertex.cc.

References col, color2uint(), and scene.

◆ weight_paint_mode_poll()

bool weight_paint_mode_poll ( struct bContext C)

◆ weight_paint_poll()

bool weight_paint_poll ( struct bContext C)

Definition at line 304 of file paint_vertex.cc.

References C, and weight_paint_poll_ex().

Referenced by ed_vwpaintmode_enter_generic(), and PAINT_OT_weight_paint().

◆ weight_paint_poll_ignore_tool()

bool weight_paint_poll_ignore_tool ( bContext C)

Definition at line 309 of file paint_vertex.cc.

References C, and weight_paint_poll_ex().

Referenced by PAINT_OT_weight_gradient().