Blender  V3.3
paint_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "BKE_paint.h"
11 
12 #include "BLI_compiler_compat.h"
13 #include "BLI_math.h"
14 #include "BLI_rect.h"
15 
16 #include "DNA_scene_types.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 struct ARegion;
23 struct Brush;
24 struct ColorManagedDisplay;
25 struct ColorSpace;
26 struct ImagePool;
27 struct MTex;
28 struct Object;
29 struct Paint;
30 struct PaintStroke;
31 struct PointerRNA;
32 struct RegionView3D;
33 struct Scene;
34 struct VPaint;
35 struct ViewContext;
36 struct bContext;
37 struct wmEvent;
38 struct wmKeyConfig;
39 struct wmOperator;
40 struct wmOperatorType;
41 
42 typedef struct CoNo {
43  float co[3];
44  float no[3];
45 } CoNo;
46 
47 /* paint_stroke.c */
48 
49 typedef bool (*StrokeGetLocation)(struct bContext *C,
50  float location[3],
51  const float mouse[2],
52  bool force_original);
53 typedef bool (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, const float mouse[2]);
54 typedef void (*StrokeUpdateStep)(struct bContext *C,
55  struct wmOperator *op,
56  struct PaintStroke *stroke,
57  struct PointerRNA *itemptr);
58 typedef void (*StrokeRedraw)(const struct bContext *C, struct PaintStroke *stroke, bool final);
59 typedef void (*StrokeDone)(const struct bContext *C, struct PaintStroke *stroke);
60 
61 struct PaintStroke *paint_stroke_new(struct bContext *C,
62  struct wmOperator *op,
68  int event_type);
69 void paint_stroke_free(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke);
70 
74 bool paint_space_stroke_enabled(struct Brush *br, enum ePaintMode mode);
78 bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode);
82 bool paint_supports_dynamic_tex_coords(struct Brush *br, enum ePaintMode mode);
83 bool paint_supports_smooth_stroke(struct Brush *br, enum ePaintMode mode);
84 bool paint_supports_texture(enum ePaintMode mode);
86 
90 struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf);
92  struct wmOperator *op,
93  const struct wmEvent *event,
94  struct PaintStroke **stroke_p);
95 int paint_stroke_exec(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke);
96 void paint_stroke_cancel(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke);
97 bool paint_stroke_flipped(struct PaintStroke *stroke);
98 bool paint_stroke_inverted(struct PaintStroke *stroke);
99 struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke);
100 void *paint_stroke_mode_data(struct PaintStroke *stroke);
101 float paint_stroke_distance_get(struct PaintStroke *stroke);
102 void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data);
103 bool PAINT_brush_tool_poll(struct bContext *C);
108 
109 /* paint_vertex.c */
110 
111 bool weight_paint_poll(struct bContext *C);
113 bool weight_paint_mode_poll(struct bContext *C);
114 bool vertex_paint_poll(struct bContext *C);
119 bool vertex_paint_mode_poll(struct bContext *C);
120 
121 typedef void (*VPaintTransform_Callback)(const float col[3],
122  const void *user_data,
123  float r_col[3]);
124 
128 
129 enum {
132 };
134 
137 
138 unsigned int vpaint_get_current_color(struct Scene *scene, struct VPaint *vp, bool secondary);
139 
143 unsigned int ED_vpaint_blend_tool(int tool, uint col, uint paintcol, int alpha_i);
144 
145 /* paint_vertex_weight_utils.c */
146 
155 float ED_wpaint_blend_tool(int tool, float weight, float paintval, float alpha);
156 /* Utility for tools to ensure vertex groups exist before they begin. */
159 };
161  int active;
162  int mirror;
163 };
167 bool ED_wpaint_ensure_data(struct bContext *C,
168  struct ReportList *reports,
169  enum eWPaintFlag flag,
170  struct WPaintVGroupIndex *vgroup_index);
172 int ED_wpaint_mirror_vgroup_ensure(struct Object *ob, int vgroup_active);
173 
174 /* paint_vertex_color_ops.c */
175 
183 
184 /* paint_vertex_weight_ops.c */
185 
189 
190 /* paint_vertex_proj.c */
191 
192 struct VertProjHandle;
194  struct Scene *scene,
195  struct Object *ob,
196  struct CoNo **r_vcosnos);
198  struct VertProjHandle *vp_handle,
199  /* runtime vars */
200  struct ARegion *region,
201  const float mval_fl[2]);
202 void ED_vpaint_proj_handle_free(struct VertProjHandle *vp_handle);
203 
204 /* paint_image.c */
205 
206 typedef struct ImagePaintPartialRedraw {
209 
210 bool image_texture_paint_poll(struct bContext *C);
211 void imapaint_image_update(struct SpaceImage *sima,
212  struct Image *image,
213  struct ImBuf *ibuf,
214  struct ImageUser *iuser,
215  short texpaint);
219  struct ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th);
220 bool get_imapaint_zoom(struct bContext *C, float *zoomx, float *zoomy);
221 void *paint_2d_new_stroke(struct bContext *, struct wmOperator *, int mode);
222 void paint_2d_redraw(const struct bContext *C, void *ps, bool final);
223 void paint_2d_stroke_done(void *ps);
224 void paint_2d_stroke(void *ps,
225  const float prev_mval[2],
226  const float mval[2],
227  bool eraser,
228  float pressure,
229  float distance,
230  float size);
234 void paint_2d_bucket_fill(const struct bContext *C,
235  const float color[3],
236  struct Brush *br,
237  const float mouse_init[2],
238  const float mouse_final[2],
239  void *ps);
240 void paint_2d_gradient_fill(const struct bContext *C,
241  struct Brush *br,
242  const float mouse_init[2],
243  const float mouse_final[2],
244  void *ps);
245 void *paint_proj_new_stroke(struct bContext *C, struct Object *ob, const float mouse[2], int mode);
246 void paint_proj_stroke(const struct bContext *C,
247  void *ps_handle_p,
248  const float prev_pos[2],
249  const float pos[2],
250  bool eraser,
251  float pressure,
252  float distance,
253  float size);
254 void paint_proj_redraw(const struct bContext *C, void *ps_handle_p, bool final);
255 void paint_proj_stroke_done(void *ps_handle_p);
256 
257 void paint_brush_color_get(struct Scene *scene,
258  struct Brush *br,
259  bool color_correction,
260  bool invert,
261  float distance,
262  float pressure,
263  float color[3],
264  struct ColorManagedDisplay *display);
265 bool paint_use_opacity_masking(struct Brush *brush);
266 void paint_brush_init_tex(struct Brush *brush);
267 void paint_brush_exit_tex(struct Brush *brush);
269 
279 
280 /* paint_image_2d_curve_mask.cc */
281 
287 typedef struct CurveMaskCache {
294 
299 
306 
312 
313 void paint_curve_mask_cache_free_data(CurveMaskCache *curve_mask_cache);
315  const struct Brush *brush,
316  int diameter,
317  float radius,
318  const float cursor_position[2]);
319 
320 /* sculpt_uv.c */
321 
323 
324 /* paint_utils.c */
325 
331 bool paint_convert_bb_to_rect(struct rcti *rect,
332  const float bb_min[3],
333  const float bb_max[3],
334  const struct ARegion *region,
335  struct RegionView3D *rv3d,
336  struct Object *ob);
337 
343 void paint_calc_redraw_planes(float planes[4][4],
344  const struct ARegion *region,
345  struct Object *ob,
346  const struct rcti *screen_rect);
347 
349  const float center[3],
350  float pixel_radius);
352  const struct MTex *mtex, float u, float v, struct ImagePool *pool, int thread);
353 void paint_get_tex_pixel_col(const struct MTex *mtex,
354  float u,
355  float v,
356  float rgba[4],
357  struct ImagePool *pool,
358  int thread,
359  bool convert,
360  struct ColorSpace *colorspace);
361 
365 void paint_sample_color(
366  struct bContext *C, struct ARegion *region, int x, int y, bool texpaint_proj, bool palette);
367 
369 
371 
376 
378 
382 
383 bool vert_paint_poll(struct bContext *C);
384 bool mask_paint_poll(struct bContext *C);
385 bool paint_curve_poll(struct bContext *C);
386 
387 bool facemask_paint_poll(struct bContext *C);
392 BLI_INLINE void flip_v3_v3(float out[3], const float in[3], const ePaintSymmetryFlags symm)
393 {
394  if (symm & PAINT_SYMM_X) {
395  out[0] = -in[0];
396  }
397  else {
398  out[0] = in[0];
399  }
400  if (symm & PAINT_SYMM_Y) {
401  out[1] = -in[1];
402  }
403  else {
404  out[1] = in[1];
405  }
406  if (symm & PAINT_SYMM_Z) {
407  out[2] = -in[2];
408  }
409  else {
410  out[2] = in[2];
411  }
412 }
413 
414 BLI_INLINE void flip_qt_qt(float out[4], const float in[4], const ePaintSymmetryFlags symm)
415 {
416  float axis[3], angle;
417 
418  quat_to_axis_angle(axis, &angle, in);
419  normalize_v3(axis);
420 
421  if (symm & PAINT_SYMM_X) {
422  axis[0] *= -1.0f;
423  angle *= -1.0f;
424  }
425  if (symm & PAINT_SYMM_Y) {
426  axis[1] *= -1.0f;
427  angle *= -1.0f;
428  }
429  if (symm & PAINT_SYMM_Z) {
430  axis[2] *= -1.0f;
431  angle *= -1.0f;
432  }
433 
435 }
436 
437 BLI_INLINE void flip_v3(float v[3], const ePaintSymmetryFlags symm)
438 {
439  flip_v3_v3(v, v, symm);
440 }
441 
442 BLI_INLINE void flip_qt(float quat[4], const ePaintSymmetryFlags symm)
443 {
444  flip_qt_qt(quat, quat, symm);
445 }
446 
447 /* stroke operator */
448 typedef enum BrushStrokeMode {
453 
454 /* paint_hide.c */
455 
456 typedef enum {
460 
461 typedef enum {
467 
468 void PAINT_OT_hide_show(struct wmOperatorType *ot);
469 
470 /* paint_mask.c */
471 
472 typedef enum {
477 
482 
483 /* paint_curve.c */
484 
485 void PAINTCURVE_OT_new(struct wmOperatorType *ot);
490 void PAINTCURVE_OT_draw(struct wmOperatorType *ot);
492 
493 /* image painting blur kernel */
494 typedef struct {
495  float *wdata; /* actual kernel */
496  int side; /* kernel side */
497  int side_squared; /* data side */
498  int pixel_len; /* pixels around center that kernel is wide */
499 } BlurKernel;
500 
501 enum eBlurKernelType;
506 BlurKernel *paint_new_blur_kernel(struct Brush *br, bool proj);
508 
509 /* paint curve defines */
510 #define PAINT_CURVE_NUM_SEGMENTS 40
511 
512 #ifdef __cplusplus
513 }
514 #endif
ePaintMode
Definition: BKE_paint.h:67
#define BLI_INLINE
void axis_angle_normalized_to_quat(float r[4], const float axis[3], float angle)
void quat_to_axis_angle(float axis[3], float *angle, const float q[4])
MINLINE float normalize_v3(float r[3])
unsigned int uint
Definition: BLI_sys_types.h:67
unsigned short ushort
Definition: BLI_sys_types.h:68
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
eBlurKernelType
ePaintSymmetryFlags
@ PAINT_SYMM_Y
@ PAINT_SYMM_X
@ PAINT_SYMM_Z
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define C
Definition: RandGen.cpp:25
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
Definition: thread.h:34
Scene scene
const Depsgraph * depsgraph
void * user_data
SyclQueue void void size_t num_bytes void
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
uint pos
uint col
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
Definition: invert.h:8
uint convert(uint c, uint inbits, uint outbits)
Definition: PixelFormat.h:45
T distance(const T &a, const T &b)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
bool paint_use_opacity_masking(struct Brush *brush)
Definition: paint_image.cc:317
void paint_stroke_cancel(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
void PAINT_OT_add_simple_uvs(struct wmOperatorType *ot)
void PAINTCURVE_OT_add_point(struct wmOperatorType *ot)
Definition: paint_curve.c:256
float ED_wpaint_blend_tool(int tool, float weight, float paintval, float alpha)
bool vertex_paint_mode_poll(struct bContext *C)
void PAINTCURVE_OT_new(struct wmOperatorType *ot)
Definition: paint_curve.c:158
void PAINT_OT_vertex_color_set(struct wmOperatorType *ot)
void paint_2d_redraw(const struct bContext *C, void *ps, bool final)
void PAINT_OT_weight_from_bones(struct wmOperatorType *ot)
void PAINT_OT_face_select_linked_pick(struct wmOperatorType *ot)
Definition: paint_utils.c:634
void PAINT_OT_mask_line_gesture(struct wmOperatorType *ot)
Definition: paint_mask.c:1693
void PAINTCURVE_OT_select(struct wmOperatorType *ot)
Definition: paint_curve.c:492
void PAINT_OT_project_image(struct wmOperatorType *ot)
void PAINT_OT_weight_set(struct wmOperatorType *ot)
BlurKernel * paint_new_blur_kernel(struct Brush *br, bool proj)
Definition: paint_image.cc:171
void PAINT_OT_face_select_hide(struct wmOperatorType *ot)
Definition: paint_utils.c:737
void PAINT_OT_mask_lasso_gesture(struct wmOperatorType *ot)
Definition: paint_mask.c:1651
void PAINT_OT_grab_clone(struct wmOperatorType *ot)
Definition: paint_image.cc:545
void PAINT_OT_add_texture_paint_slot(struct wmOperatorType *ot)
@ WPAINT_GRADIENT_TYPE_RADIAL
Definition: paint_intern.h:131
@ WPAINT_GRADIENT_TYPE_LINEAR
Definition: paint_intern.h:130
bool paint_supports_jitter(enum ePaintMode mode)
void(* StrokeRedraw)(const struct bContext *C, struct PaintStroke *stroke, bool final)
Definition: paint_intern.h:58
void paint_proj_redraw(const struct bContext *C, void *ps_handle_p, bool final)
void PAINT_OT_weight_paint_toggle(struct wmOperatorType *ot)
void PAINT_OT_vertex_color_hsv(struct wmOperatorType *ot)
unsigned int ED_vpaint_blend_tool(int tool, uint col, uint paintcol, int alpha_i)
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 PAINTCURVE_OT_slide(struct wmOperatorType *ot)
Definition: paint_curve.c:638
bool paint_stroke_flipped(struct PaintStroke *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)
int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event, struct PaintStroke **stroke_p)
void * paint_2d_new_stroke(struct bContext *, struct wmOperator *, int mode)
void paint_2d_stroke(void *ps, const float prev_mval[2], const float mval[2], bool eraser, float pressure, float distance, float size)
bool paint_supports_texture(enum ePaintMode mode)
void PAINT_OT_mask_box_gesture(struct wmOperatorType *ot)
Definition: paint_mask.c:1672
void PAINT_OT_face_select_all(struct wmOperatorType *ot)
Definition: paint_utils.c:658
int paint_stroke_exec(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
bool mask_paint_poll(struct bContext *C)
bool ED_wpaint_ensure_data(struct bContext *C, struct ReportList *reports, enum eWPaintFlag flag, struct WPaintVGroupIndex *vgroup_index)
void PAINTCURVE_OT_draw(struct wmOperatorType *ot)
Definition: paint_curve.c:689
void(* StrokeUpdateStep)(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke, struct PointerRNA *itemptr)
Definition: paint_intern.h:54
void paint_2d_gradient_fill(const struct bContext *C, struct Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
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: paint_stroke.c:874
bool vertex_paint_poll_ignore_tool(struct bContext *C)
void PAINT_OT_image_paint(struct wmOperatorType *ot)
void PAINT_OT_weight_sample_group(struct wmOperatorType *ot)
bool paint_supports_smooth_stroke(struct Brush *br, enum ePaintMode mode)
BrushStrokeMode
Definition: paint_intern.h:448
@ BRUSH_STROKE_SMOOTH
Definition: paint_intern.h:451
@ BRUSH_STROKE_NORMAL
Definition: paint_intern.h:449
@ BRUSH_STROKE_INVERT
Definition: paint_intern.h:450
void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data)
void SCULPT_OT_uv_sculpt_stroke(struct wmOperatorType *ot)
Definition: sculpt_uv.c:786
void(* StrokeDone)(const struct bContext *C, struct PaintStroke *stroke)
Definition: paint_intern.h:59
void PAINT_OT_vertex_color_brightness_contrast(struct wmOperatorType *ot)
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr)
Definition: paint_image.cc:84
void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot)
Definition: paint_mask.c:187
void paint_cursor_delete_textures(void)
Definition: paint_cursor.c:88
bool weight_paint_mode_poll(struct bContext *C)
void PAINT_OT_weight_paint(struct wmOperatorType *ot)
void * paint_proj_new_stroke(struct bContext *C, struct Object *ob, const float mouse[2], int mode)
struct CoNo CoNo
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_OT_vertex_paint(struct wmOperatorType *ot)
void PAINT_OT_face_vert_reveal(struct wmOperatorType *ot)
Definition: paint_utils.c:800
void paint_2d_stroke_done(void *ps)
struct ImagePaintPartialRedraw ImagePaintPartialRedraw
bool image_texture_paint_poll(struct bContext *C)
Definition: paint_image.cc:993
void PAINT_OT_vertex_color_smooth(struct wmOperatorType *ot)
void PAINT_OT_vert_select_all(struct wmOperatorType *ot)
Definition: paint_utils.c:681
void paint_curve_mask_cache_free_data(CurveMaskCache *curve_mask_cache)
void paint_brush_exit_tex(struct Brush *brush)
Definition: paint_image.cc:390
BLI_INLINE void flip_v3(float v[3], const ePaintSymmetryFlags symm)
Definition: paint_intern.h:437
struct ImagePaintPartialRedraw * get_imapaintpartial(void)
Definition: paint_image.cc:79
void PAINT_OT_hide_show(struct wmOperatorType *ot)
Definition: paint_hide.c:405
eWPaintFlag
Definition: paint_intern.h:157
@ WPAINT_ENSURE_MIRROR
Definition: paint_intern.h:158
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_OT_vert_select_hide(struct wmOperatorType *ot)
Definition: paint_utils.c:761
bool vertex_paint_poll(struct bContext *C)
void paint_delete_blur_kernel(BlurKernel *)
Definition: paint_image.cc:240
PaintMaskFloodMode
Definition: paint_intern.h:472
@ PAINT_MASK_FLOOD_VALUE_INVERSE
Definition: paint_intern.h:474
@ PAINT_MASK_FLOOD_VALUE
Definition: paint_intern.h:473
@ PAINT_MASK_INVERT
Definition: paint_intern.h:475
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius)
Definition: paint_utils.c:130
PartialVisAction
Definition: paint_intern.h:456
@ PARTIALVIS_HIDE
Definition: paint_intern.h:457
@ PARTIALVIS_SHOW
Definition: paint_intern.h:458
void paint_stroke_free(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
BLI_INLINE void flip_qt(float quat[4], const ePaintSymmetryFlags symm)
Definition: paint_intern.h:442
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)
Definition: paint_image.cc:332
void ED_vpaint_proj_handle_free(struct VertProjHandle *vp_handle)
void paint_calc_redraw_planes(float planes[4][4], const struct ARegion *region, struct Object *ob, const struct rcti *screen_rect)
struct VertProjHandle * ED_vpaint_proj_handle_create(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct CoNo **r_vcosnos)
void imapaint_image_update(struct SpaceImage *sima, struct Image *image, struct ImBuf *ibuf, struct ImageUser *iuser, short texpaint)
Definition: paint_image.cc:144
void PAINT_OT_vert_select_ungrouped(struct wmOperatorType *ot)
Definition: paint_utils.c:711
bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode)
void PAINT_OT_face_select_linked(struct wmOperatorType *ot)
Definition: paint_utils.c:613
void * paint_stroke_mode_data(struct PaintStroke *stroke)
BLI_INLINE void flip_qt_qt(float out[4], const float in[4], const ePaintSymmetryFlags symm)
Definition: paint_intern.h:414
bool get_imapaint_zoom(struct bContext *C, float *zoomx, float *zoomy)
Definition: paint_image.cc:404
void PAINT_OT_weight_gradient(struct wmOperatorType *ot)
bool weight_paint_poll_ignore_tool(bContext *C)
void PAINT_OT_vertex_color_levels(struct wmOperatorType *ot)
struct wmKeyMap * paint_stroke_modal_keymap(struct wmKeyConfig *keyconf)
int ED_wpaint_mirror_vgroup_ensure(struct Object *ob, int vgroup_active)
bool image_paint_poll(struct bContext *C)
bool(* StrokeGetLocation)(struct bContext *C, float location[3], const float mouse[2], bool force_original)
Definition: paint_intern.h:49
void PAINT_OT_vertex_paint_toggle(struct wmOperatorType *ot)
void PAINT_OT_vertex_color_invert(struct wmOperatorType *ot)
bool paint_stroke_inverted(struct PaintStroke *stroke)
float paint_get_tex_pixel(const struct MTex *mtex, float u, float v, struct ImagePool *pool, int thread)
void PAINT_OT_weight_sample(struct wmOperatorType *ot)
void ED_vpaint_proj_handle_update(struct Depsgraph *depsgraph, struct VertProjHandle *vp_handle, struct ARegion *region, const float mval_fl[2])
bool paint_curve_poll(struct bContext *C)
Definition: paint_curve.c:40
void paint_sample_color(struct bContext *C, struct ARegion *region, int x, int y, bool texpaint_proj, bool palette)
Definition: paint_utils.c:374
void imapaint_region_tiles(struct ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th)
Definition: paint_image.cc:96
void paint_proj_stroke_done(void *ps_handle_p)
bool(* StrokeTestStart)(struct bContext *C, struct wmOperator *op, const float mouse[2])
Definition: paint_intern.h:53
bool vert_paint_poll(struct bContext *C)
bool paint_supports_dynamic_tex_coords(struct Brush *br, enum ePaintMode mode)
void PAINT_OT_vertex_color_from_weight(struct wmOperatorType *ot)
void PAINT_OT_image_from_view(struct wmOperatorType *ot)
bool weight_paint_poll(struct bContext *C)
struct ViewContext * paint_stroke_view_context(struct PaintStroke *stroke)
bool paint_space_stroke_enabled(struct Brush *br, enum ePaintMode mode)
void(* VPaintTransform_Callback)(const float col[3], const void *user_data, float r_col[3])
Definition: paint_intern.h:121
void paint_brush_init_tex(struct Brush *brush)
Definition: paint_image.cc:374
PartialVisArea
Definition: paint_intern.h:461
@ PARTIALVIS_INSIDE
Definition: paint_intern.h:462
@ PARTIALVIS_OUTSIDE
Definition: paint_intern.h:463
@ PARTIALVIS_ALL
Definition: paint_intern.h:464
@ PARTIALVIS_MASKED
Definition: paint_intern.h:465
bool PAINT_brush_tool_poll(struct bContext *C)
void PAINT_OT_texture_paint_toggle(struct wmOperatorType *ot)
Definition: paint_image.cc:889
void PAINT_OT_sample_color(struct wmOperatorType *ot)
Definition: paint_image.cc:726
void paint_curve_mask_cache_update(CurveMaskCache *curve_mask_cache, const struct Brush *brush, int diameter, float radius, const float cursor_position[2])
void BRUSH_OT_curve_preset(struct wmOperatorType *ot)
Definition: paint_utils.c:580
void paint_stroke_operator_properties(struct wmOperatorType *ot)
Definition: paint_utils.c:188
void PAINTCURVE_OT_delete_point(struct wmOperatorType *ot)
Definition: paint_curve.c:348
void PAINTCURVE_OT_cursor(struct wmOperatorType *ot)
Definition: paint_curve.c:732
void PAINT_OT_brush_colors_flip(struct wmOperatorType *ot)
Definition: paint_image.cc:946
bool facemask_paint_poll(struct bContext *C)
Definition: paint_image.cc:998
BLI_INLINE void flip_v3_v3(float out[3], const float in[3], const ePaintSymmetryFlags symm)
Definition: paint_intern.h:392
float paint_stroke_distance_get(struct PaintStroke *stroke)
unsigned int vpaint_get_current_color(struct Scene *scene, struct VPaint *vp, bool secondary)
struct CurveMaskCache CurveMaskCache
Caching structure for curve mask.
float * wdata
Definition: paint_intern.h:495
int side_squared
Definition: paint_intern.h:497
float no[3]
Definition: paint_intern.h:44
float co[3]
Definition: paint_intern.h:43
Caching structure for curve mask.
Definition: paint_intern.h:287
ushort * curve_mask
Curve mask that can be passed as curve_mask parameter when.
Definition: paint_intern.h:310
float * sampled_curve
sampled version of the brush curve-mapping.
Definition: paint_intern.h:298
int last_curve_timestamp
Last CurveMapping.changed_timestamp being read.
Definition: paint_intern.h:293
size_t curve_mask_size
Size in bytes of the curve_mask field.
Definition: paint_intern.h:305
StrokeGetLocation get_location
Definition: paint_stroke.c:120
StrokeTestStart test_start
Definition: paint_stroke.c:121
StrokeDone done
Definition: paint_stroke.c:124
StrokeRedraw redraw
Definition: paint_stroke.c:123
StrokeUpdateStep update_step
Definition: paint_stroke.c:122
wmOperatorType * ot
Definition: wm_files.c:3479