Blender  V2.93
paint_intern.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 struct ARegion;
27 struct Brush;
28 struct ColorManagedDisplay;
29 struct ColorSpace;
30 struct ImagePool;
31 struct MTex;
32 struct Object;
33 struct Paint;
34 struct PaintStroke;
35 struct PointerRNA;
36 struct RegionView3D;
37 struct Scene;
38 struct VPaint;
39 struct ViewContext;
40 struct bContext;
41 struct rcti;
42 struct wmEvent;
43 struct wmKeyConfig;
44 struct wmOperator;
45 struct wmOperatorType;
46 enum ePaintMode;
48 
49 typedef struct CoNo {
50  float co[3];
51  float no[3];
52 } CoNo;
53 
54 /* paint_stroke.c */
55 typedef bool (*StrokeGetLocation)(struct bContext *C, float location[3], const float mouse[2]);
56 typedef bool (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, const float mouse[2]);
57 typedef void (*StrokeUpdateStep)(struct bContext *C,
58  struct PaintStroke *stroke,
59  struct PointerRNA *itemptr);
60 typedef void (*StrokeRedraw)(const struct bContext *C, struct PaintStroke *stroke, bool final);
61 typedef void (*StrokeDone)(const struct bContext *C, struct PaintStroke *stroke);
62 
63 struct PaintStroke *paint_stroke_new(struct bContext *C,
64  struct wmOperator *op,
70  int event_type);
71 void paint_stroke_free(struct bContext *C, struct wmOperator *op);
72 
73 bool paint_space_stroke_enabled(struct Brush *br, enum ePaintMode mode);
74 bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode);
75 bool paint_supports_dynamic_tex_coords(struct Brush *br, enum ePaintMode mode);
76 bool paint_supports_smooth_stroke(struct Brush *br, enum ePaintMode mode);
77 bool paint_supports_texture(enum ePaintMode mode);
79 
80 struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf);
81 int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
82 int paint_stroke_exec(struct bContext *C, struct wmOperator *op);
83 void paint_stroke_cancel(struct bContext *C, struct wmOperator *op);
84 bool paint_stroke_flipped(struct PaintStroke *stroke);
85 bool paint_stroke_inverted(struct PaintStroke *stroke);
86 struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke);
87 void *paint_stroke_mode_data(struct PaintStroke *stroke);
88 float paint_stroke_distance_get(struct PaintStroke *stroke);
89 void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data);
90 bool paint_poll(struct bContext *C);
91 void paint_cursor_start(struct Paint *p, bool (*poll)(struct bContext *C));
93 
94 /* paint_vertex.c */
95 bool weight_paint_poll(struct bContext *C);
97 bool weight_paint_mode_poll(struct bContext *C);
98 bool vertex_paint_poll(struct bContext *C);
100 bool vertex_paint_mode_poll(struct bContext *C);
101 
102 typedef void (*VPaintTransform_Callback)(const float col[3],
103  const void *user_data,
104  float r_col[3]);
105 
109 
110 enum {
113 };
115 
118 
119 unsigned int vpaint_get_current_col(struct Scene *scene, struct VPaint *vp, bool secondary);
120 
121 /* paint_vertex_color_utils.c */
122 unsigned int ED_vpaint_blend_tool(const int tool,
123  const uint col,
124  const uint paintcol,
125  const int alpha_i);
126 bool ED_vpaint_color_transform(struct Object *ob,
127  VPaintTransform_Callback vpaint_tx_fn,
128  const void *user_data);
129 
130 /* paint_vertex_weight_utils.c */
131 float ED_wpaint_blend_tool(const int tool,
132  const float weight,
133  const float paintval,
134  const float alpha);
135 /* Utility for tools to ensure vertex groups exist before they begin. */
138 };
140  int active;
141  int mirror;
142 };
143 bool ED_wpaint_ensure_data(struct bContext *C,
144  struct ReportList *reports,
145  enum eWPaintFlag flag,
146  struct WPaintVGroupIndex *vgroup_index);
147 int ED_wpaint_mirror_vgroup_ensure(struct Object *ob, const int vgroup_active);
148 
149 /* paint_vertex_color_ops.c */
157 
158 /* paint_vertex_weight_ops.c */
162 
163 /* paint_vertex_proj.c */
164 struct VertProjHandle;
166  struct Scene *scene,
167  struct Object *ob,
168  struct CoNo **r_vcosnos);
170  struct VertProjHandle *vp_handle,
171  /* runtime vars */
172  struct ARegion *region,
173  const float mval_fl[2]);
174 void ED_vpaint_proj_handle_free(struct VertProjHandle *vp_handle);
175 
176 /* paint_image.c */
177 typedef struct ImagePaintPartialRedraw {
178  int x1, y1, x2, y2; /* XXX, could use 'rcti' */
179  int enabled;
181 
182 bool image_texture_paint_poll(struct bContext *C);
183 void imapaint_image_update(struct SpaceImage *sima,
184  struct Image *image,
185  struct ImBuf *ibuf,
186  struct ImageUser *iuser,
187  short texpaint);
191  struct ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th);
192 bool get_imapaint_zoom(struct bContext *C, float *zoomx, float *zoomy);
193 void *paint_2d_new_stroke(struct bContext *, struct wmOperator *, int mode);
194 void paint_2d_redraw(const struct bContext *C, void *ps, bool final);
195 void paint_2d_stroke_done(void *ps);
196 void paint_2d_stroke(void *ps,
197  const float prev_mval[2],
198  const float mval[2],
199  const bool eraser,
200  float pressure,
201  float distance,
202  float size);
203 void paint_2d_bucket_fill(const struct bContext *C,
204  const float color[3],
205  struct Brush *br,
206  const float mouse_init[2],
207  const float mouse_final[2],
208  void *ps);
209 void paint_2d_gradient_fill(const struct bContext *C,
210  struct Brush *br,
211  const float mouse_init[2],
212  const float mouse_final[2],
213  void *ps);
214 void *paint_proj_new_stroke(struct bContext *C, struct Object *ob, const float mouse[2], int mode);
215 void paint_proj_stroke(const struct bContext *C,
216  void *ps_handle_p,
217  const float prev_pos[2],
218  const float pos[2],
219  const bool eraser,
220  float pressure,
221  float distance,
222  float size);
223 void paint_proj_redraw(const struct bContext *C, void *ps_handle_p, bool final);
224 void paint_proj_stroke_done(void *ps_handle_p);
225 
226 void paint_brush_color_get(struct Scene *scene,
227  struct Brush *br,
228  bool color_correction,
229  bool invert,
230  float distance,
231  float pressure,
232  float color[3],
233  struct ColorManagedDisplay *display);
234 bool paint_use_opacity_masking(struct Brush *brush);
235 void paint_brush_init_tex(struct Brush *brush);
236 void paint_brush_exit_tex(struct Brush *brush);
237 
247 
248 /* sculpt_uv.c */
250 
251 /* paint_utils.c */
252 
253 /* Convert the object-space axis-aligned bounding box (expressed as
254  * its minimum and maximum corners) into a screen-space rectangle,
255  * returns zero if the result is empty */
256 bool paint_convert_bb_to_rect(struct rcti *rect,
257  const float bb_min[3],
258  const float bb_max[3],
259  const struct ARegion *region,
260  struct RegionView3D *rv3d,
261  struct Object *ob);
262 
263 /* Get four planes in object-space that describe the projection of
264  * screen_rect from screen into object-space (essentially converting a
265  * 2D screens-space bounding box into four 3D planes) */
266 void paint_calc_redraw_planes(float planes[4][4],
267  const struct ARegion *region,
268  struct Object *ob,
269  const struct rcti *screen_rect);
270 
272  const float center[3],
273  float pixel_radius);
275  const struct MTex *mtex, float u, float v, struct ImagePool *pool, int thread);
276 void paint_get_tex_pixel_col(const struct MTex *mtex,
277  float u,
278  float v,
279  float rgba[4],
280  struct ImagePool *pool,
281  int thread,
282  bool convert,
283  struct ColorSpace *colorspace);
284 
285 void paint_sample_color(
286  struct bContext *C, struct ARegion *region, int x, int y, bool texpaint_proj, bool palette);
287 
289 
291 
297 
300 
301 bool vert_paint_poll(struct bContext *C);
302 bool mask_paint_poll(struct bContext *C);
303 bool paint_curve_poll(struct bContext *C);
304 
305 bool facemask_paint_poll(struct bContext *C);
306 void flip_v3_v3(float out[3], const float in[3], const enum ePaintSymmetryFlags symm);
307 void flip_qt_qt(float out[3], const float in[3], const enum ePaintSymmetryFlags symm);
308 
309 /* stroke operator */
310 typedef enum BrushStrokeMode {
315 
316 /* paint_hide.c */
317 
318 typedef enum {
322 
323 typedef enum {
329 
330 void PAINT_OT_hide_show(struct wmOperatorType *ot);
331 
332 /* paint_mask.c */
333 
334 typedef enum {
339 
344 
345 /* paint_curve.c */
346 void PAINTCURVE_OT_new(struct wmOperatorType *ot);
351 void PAINTCURVE_OT_draw(struct wmOperatorType *ot);
353 
354 /* image painting blur kernel */
355 typedef struct {
356  float *wdata; /* actual kernel */
357  int side; /* kernel side */
358  int side_squared; /* data side */
359  int pixel_len; /* pixels around center that kernel is wide */
360 } BlurKernel;
361 
362 enum eBlurKernelType;
363 /* can be extended to other blur kernels later */
364 BlurKernel *paint_new_blur_kernel(struct Brush *br, bool proj);
366 
367 /* paint curve defines */
368 #define PAINT_CURVE_NUM_SEGMENTS 40
ePaintMode
Definition: BKE_paint.h:78
unsigned int uint
Definition: BLI_sys_types.h:83
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
eBlurKernelType
ePaintSymmetryFlags
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
#define C
Definition: RandGen.cpp:39
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
Scene scene
const Depsgraph * depsgraph
void * user_data
static CCL_NAMESPACE_BEGIN const double alpha
uint pos
uint col
uint convert(uint c, uint inbits, uint outbits)
Definition: PixelFormat.h:59
bool paint_use_opacity_masking(struct Brush *brush)
Definition: paint_image.c:350
void PAINT_OT_add_simple_uvs(struct wmOperatorType *ot)
void PAINTCURVE_OT_add_point(struct wmOperatorType *ot)
Definition: paint_curve.c:270
bool vertex_paint_mode_poll(struct bContext *C)
Definition: paint_vertex.c:205
void PAINTCURVE_OT_new(struct wmOperatorType *ot)
Definition: paint_curve.c:172
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)
bool paint_poll(struct bContext *C)
void PAINT_OT_face_select_linked_pick(struct wmOperatorType *ot)
Definition: paint_utils.c:689
void PAINT_OT_mask_line_gesture(struct wmOperatorType *ot)
Definition: paint_mask.c:1685
void PAINTCURVE_OT_select(struct wmOperatorType *ot)
Definition: paint_curve.c:506
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.c:191
void PAINT_OT_face_select_hide(struct wmOperatorType *ot)
Definition: paint_utils.c:792
void PAINT_OT_mask_lasso_gesture(struct wmOperatorType *ot)
Definition: paint_mask.c:1643
void PAINT_OT_grab_clone(struct wmOperatorType *ot)
Definition: paint_image.c:913
void PAINT_OT_add_texture_paint_slot(struct wmOperatorType *ot)
bool paint_supports_jitter(enum ePaintMode mode)
void(* StrokeRedraw)(const struct bContext *C, struct PaintStroke *stroke, bool final)
Definition: paint_intern.h:60
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)
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:652
bool paint_stroke_flipped(struct PaintStroke *stroke)
void * paint_2d_new_stroke(struct bContext *, struct wmOperator *, int mode)
bool paint_supports_texture(enum ePaintMode mode)
void PAINT_OT_mask_box_gesture(struct wmOperatorType *ot)
Definition: paint_mask.c:1664
@ WPAINT_GRADIENT_TYPE_RADIAL
Definition: paint_intern.h:112
@ WPAINT_GRADIENT_TYPE_LINEAR
Definition: paint_intern.h:111
void PAINT_OT_face_select_all(struct wmOperatorType *ot)
Definition: paint_utils.c:713
bool mask_paint_poll(struct bContext *C)
Definition: paint_image.c:1375
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:700
void paint_cursor_start(struct Paint *p, bool(*poll)(struct bContext *C))
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:889
int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
bool vertex_paint_poll_ignore_tool(struct bContext *C)
Definition: paint_vertex.c:233
int ED_wpaint_mirror_vgroup_ensure(struct Object *ob, const int vgroup_active)
float ED_wpaint_blend_tool(const int tool, const float weight, const float paintval, const float alpha)
void PAINT_OT_image_paint(struct wmOperatorType *ot)
Definition: paint_image.c:748
void PAINT_OT_weight_sample_group(struct wmOperatorType *ot)
bool(* StrokeGetLocation)(struct bContext *C, float location[3], const float mouse[2])
Definition: paint_intern.h:55
bool paint_supports_smooth_stroke(struct Brush *br, enum ePaintMode mode)
BrushStrokeMode
Definition: paint_intern.h:310
@ BRUSH_STROKE_SMOOTH
Definition: paint_intern.h:313
@ BRUSH_STROKE_NORMAL
Definition: paint_intern.h:311
@ BRUSH_STROKE_INVERT
Definition: paint_intern.h:312
void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data)
void flip_qt_qt(float out[3], const float in[3], const enum ePaintSymmetryFlags symm)
void SCULPT_OT_uv_sculpt_stroke(struct wmOperatorType *ot)
Definition: sculpt_uv.c:822
void(* StrokeDone)(const struct bContext *C, struct PaintStroke *stroke)
Definition: paint_intern.h:61
void PAINT_OT_vertex_color_brightness_contrast(struct wmOperatorType *ot)
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr)
Definition: paint_image.c:97
void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot)
Definition: paint_mask.c:203
void paint_cursor_delete_textures(void)
Definition: paint_cursor.c:102
bool weight_paint_mode_poll(struct bContext *C)
Definition: paint_vertex.c:238
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)
void PAINT_OT_face_select_reveal(struct wmOperatorType *ot)
Definition: paint_utils.c:816
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_2d_stroke_done(void *ps)
struct ImagePaintPartialRedraw ImagePaintPartialRedraw
bool image_texture_paint_poll(struct bContext *C)
Definition: paint_image.c:1360
void PAINT_OT_vertex_color_smooth(struct wmOperatorType *ot)
void PAINT_OT_vert_select_all(struct wmOperatorType *ot)
Definition: paint_utils.c:736
void paint_brush_exit_tex(struct Brush *brush)
Definition: paint_image.c:425
struct ImagePaintPartialRedraw * get_imapaintpartial(void)
Definition: paint_image.c:92
void PAINT_OT_hide_show(struct wmOperatorType *ot)
Definition: paint_hide.c:421
eWPaintFlag
Definition: paint_intern.h:136
@ WPAINT_ENSURE_MIRROR
Definition: paint_intern.h:137
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)
int paint_stroke_exec(struct bContext *C, struct wmOperator *op)
void paint_2d_stroke(void *ps, const float prev_mval[2], const float mval[2], const bool eraser, float pressure, float distance, float size)
bool vertex_paint_poll(struct bContext *C)
Definition: paint_vertex.c:228
void paint_delete_blur_kernel(BlurKernel *)
Definition: paint_image.c:257
void paint_stroke_free(struct bContext *C, struct wmOperator *op)
Definition: paint_stroke.c:948
PaintMaskFloodMode
Definition: paint_intern.h:334
@ PAINT_MASK_FLOOD_VALUE_INVERSE
Definition: paint_intern.h:336
@ PAINT_MASK_FLOOD_VALUE
Definition: paint_intern.h:335
@ PAINT_MASK_INVERT
Definition: paint_intern.h:337
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius)
Definition: paint_utils.c:151
PartialVisAction
Definition: paint_intern.h:318
@ PARTIALVIS_HIDE
Definition: paint_intern.h:319
@ PARTIALVIS_SHOW
Definition: paint_intern.h:320
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.c:365
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.c:167
void PAINT_OT_vert_select_ungrouped(struct wmOperatorType *ot)
Definition: paint_utils.c:766
bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode)
void PAINT_OT_face_select_linked(struct wmOperatorType *ot)
Definition: paint_utils.c:668
void * paint_stroke_mode_data(struct PaintStroke *stroke)
unsigned int vpaint_get_current_col(struct Scene *scene, struct VPaint *vp, bool secondary)
Definition: paint_vertex.c:273
bool get_imapaint_zoom(struct bContext *C, float *zoomx, float *zoomy)
Definition: paint_image.c:768
void PAINT_OT_weight_gradient(struct wmOperatorType *ot)
bool weight_paint_poll_ignore_tool(bContext *C)
Definition: paint_vertex.c:268
void PAINT_OT_vertex_color_levels(struct wmOperatorType *ot)
struct wmKeyMap * paint_stroke_modal_keymap(struct wmKeyConfig *keyconf)
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 flip_v3_v3(float out[3], const float in[3], const enum ePaintSymmetryFlags symm)
Definition: paint_utils.c:407
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:54
void(* StrokeUpdateStep)(struct bContext *C, struct PaintStroke *stroke, struct PointerRNA *itemptr)
Definition: paint_intern.h:57
void paint_sample_color(struct bContext *C, struct ARegion *region, int x, int y, bool texpaint_proj, bool palette)
Definition: paint_utils.c:453
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.c:109
void paint_proj_stroke_done(void *ps_handle_p)
unsigned int ED_vpaint_blend_tool(const int tool, const uint col, const uint paintcol, const int alpha_i)
bool(* StrokeTestStart)(struct bContext *C, struct wmOperator *op, const float mouse[2])
Definition: paint_intern.h:56
bool vert_paint_poll(struct bContext *C)
Definition: paint_image.c:1370
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)
Definition: paint_vertex.c:263
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:102
void paint_brush_init_tex(struct Brush *brush)
Definition: paint_image.c:409
PartialVisArea
Definition: paint_intern.h:323
@ PARTIALVIS_INSIDE
Definition: paint_intern.h:324
@ PARTIALVIS_OUTSIDE
Definition: paint_intern.h:325
@ PARTIALVIS_ALL
Definition: paint_intern.h:326
@ PARTIALVIS_MASKED
Definition: paint_intern.h:327
bool ED_vpaint_color_transform(struct Object *ob, VPaintTransform_Callback vpaint_tx_fn, const void *user_data)
void paint_proj_stroke(const struct bContext *C, void *ps_handle_p, const float prev_pos[2], const float pos[2], const bool eraser, float pressure, float distance, float size)
void paint_stroke_cancel(struct bContext *C, struct wmOperator *op)
void PAINT_OT_texture_paint_toggle(struct wmOperatorType *ot)
Definition: paint_image.c:1256
void PAINT_OT_sample_color(struct wmOperatorType *ot)
Definition: paint_image.c:1094
void BRUSH_OT_curve_preset(struct wmOperatorType *ot)
Definition: paint_utils.c:636
void paint_stroke_operator_properties(struct wmOperatorType *ot)
Definition: paint_utils.c:210
void PAINTCURVE_OT_delete_point(struct wmOperatorType *ot)
Definition: paint_curve.c:362
void PAINTCURVE_OT_cursor(struct wmOperatorType *ot)
Definition: paint_curve.c:743
void PAINT_OT_brush_colors_flip(struct wmOperatorType *ot)
Definition: paint_image.c:1313
bool facemask_paint_poll(struct bContext *C)
Definition: paint_image.c:1365
float paint_stroke_distance_get(struct PaintStroke *stroke)
float * wdata
Definition: paint_intern.h:356
int side_squared
Definition: paint_intern.h:358
float no[3]
Definition: paint_intern.h:51
float co[3]
Definition: paint_intern.h:50
StrokeGetLocation get_location
Definition: paint_stroke.c:134
StrokeTestStart test_start
Definition: paint_stroke.c:135
StrokeDone done
Definition: paint_stroke.c:138
StrokeRedraw redraw
Definition: paint_stroke.c:137
StrokeUpdateStep update_step
Definition: paint_stroke.c:136
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
Definition: svm_invert.h:19
ccl_device_inline float distance(const float2 &a, const float2 &b)
wmOperatorType * ot
Definition: wm_files.c:3156