69 float mouse_end[2]) = 0;
76 float mouse_end[2]) = 0;
84 const float UNUSED(mouse[2]),
117 float mouse_start[2],
118 float mouse_end[2])
override
128 float mouse_start[2],
129 float mouse_end[2])
override
177 float mouse_start[2],
178 float mouse_end[2])
override
180 paint_fill(
C,
scene, brush, stroke, stroke_handle, mouse_start, mouse_end);
188 float mouse_start[2],
189 float mouse_end[2])
override
191 paint_fill(
C,
scene, brush, stroke, stroke_handle, mouse_start, mouse_end);
200 float mouse_start[2],
300 bool uvs, mat,
tex, stencil;
307 pop->
mode = MEM_new<ProjectionPaintMode>(
"ProjectionPaintMode");
310 pop->
mode = MEM_new<ImagePaintMode>(
"ImagePaintMode");
416 if (pop->s.warnmultifile) {
419 "Image requires 4 color channels to paint: %s",
420 pop->s.warnmultifile);
422 if (pop->s.warnpackedfile) {
425 "Packed MultiLayer files cannot be painted: %s",
426 pop->s.warnpackedfile);
518 ot->
idname =
"PAINT_OT_image_paint";
void BKE_brush_alpha_set(struct Scene *scene, struct Brush *brush, float alpha)
const float * BKE_brush_secondary_color_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_alpha_get(const struct Scene *scene, const struct Brush *brush)
const float * BKE_brush_color_get(const struct Scene *scene, const struct Brush *brush)
int BKE_brush_size_get(const struct Scene *scene, const struct Brush *brush)
bool BKE_brush_use_alpha_pressure(const struct Brush *brush)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
struct Brush * BKE_paint_brush(struct Paint *paint)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
MINLINE float max_ff(float a, float b)
MINLINE void srgb_to_linearrgb_v3_v3(float linear[3], const float srgb[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
struct Depsgraph Depsgraph
#define OBACT(_view_layer)
#define IMAGEPAINT_DRAWING
#define OPERATOR_RETVAL_CHECK(ret)
bool ED_image_tools_paint_poll(struct bContext *C)
void ED_paint_data_warning(struct ReportList *reports, bool uvs, bool mat, bool tex, bool stencil)
void ED_image_undo_push_begin(const char *name, int paint_mode)
void ED_image_undo_restore(struct UndoStep *us)
void ED_image_undo_push_end(void)
bool ED_paint_proj_mesh_data_check(struct Scene *scene, struct Object *ob, bool *uvs, bool *mat, bool *tex, bool *stencil)
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
_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
@ GPU_SHADER_2D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
Read Guarded memory(de)allocation.
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
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
virtual void paint_stroke_redraw(const bContext *C, void *stroke_handle, bool final)=0
virtual void paint_stroke_done(void *stroke_handle)=0
virtual void paint_gradient_fill(const bContext *C, const Scene *scene, Brush *brush, struct PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2])=0
virtual void paint_stroke(bContext *C, void *stroke_handle, float prev_mouse[2], float mouse[2], int eraser, float pressure, float distance, float size)=0
virtual void paint_bucket_fill(const bContext *C, const Scene *scene, Brush *brush, struct PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2])=0
virtual void * paint_new_stroke(bContext *C, wmOperator *op, Object *ob, const float mouse[2], int mode)=0
virtual ~AbstractPaintMode()=default
void paint_gradient_fill(const bContext *C, const Scene *UNUSED(scene), Brush *brush, struct PaintStroke *UNUSED(stroke), void *stroke_handle, float mouse_start[2], float mouse_end[2]) override
void paint_stroke_done(void *stroke_handle) override
void paint_bucket_fill(const bContext *C, const Scene *scene, Brush *brush, struct PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override
void * paint_new_stroke(bContext *C, wmOperator *op, Object *UNUSED(ob), const float UNUSED(mouse[2]), int mode) override
void paint_stroke_redraw(const bContext *C, void *stroke_handle, bool final) override
void paint_stroke(bContext *UNUSED(C), void *stroke_handle, float prev_mouse[2], float mouse[2], int eraser, float pressure, float distance, float size) override
void paint_stroke_done(void *stroke_handle) override
void paint_gradient_fill(const bContext *C, const Scene *scene, Brush *brush, struct PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override
void paint_stroke_redraw(const bContext *C, void *stroke_handle, bool final) override
void * paint_new_stroke(bContext *C, wmOperator *UNUSED(op), Object *ob, const float mouse[2], int mode) override
void paint_stroke(bContext *C, void *stroke_handle, float prev_mouse[2], float mouse[2], int eraser, float pressure, float distance, float size) override
void paint_bucket_fill(const bContext *C, const Scene *scene, Brush *brush, struct PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override
const Depsgraph * depsgraph
static void gradient_draw_line(bContext *UNUSED(C), int x, int y, void *customdata)
static bool paint_stroke_test_start(bContext *C, wmOperator *op, const float mouse[2])
static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
static void paint_stroke_update_step(bContext *C, wmOperator *UNUSED(op), struct PaintStroke *stroke, PointerRNA *itemptr)
static int paint_exec(bContext *C, wmOperator *op)
static PaintOperation * texture_paint_init(bContext *C, wmOperator *op, const float mouse[2])
static int paint_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void paint_cancel(bContext *C, wmOperator *op)
static void paint_stroke_redraw(const bContext *C, struct PaintStroke *stroke, bool final)
static int paint_modal(bContext *C, wmOperator *op, const wmEvent *event)
T distance(const T &a, const T &b)
void paint_2d_bucket_fill(const bContext *C, const float color[3], Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
void paint_2d_gradient_fill(const bContext *C, Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
void paint_2d_stroke_done(void *ps)
void paint_2d_stroke(void *ps, const float prev_mval[2], const float mval[2], const bool eraser, float pressure, float distance, float base_size)
void * paint_2d_new_stroke(bContext *C, wmOperator *op, int mode)
void paint_2d_redraw(const bContext *C, void *ps, bool final)
void PAINT_OT_image_paint(wmOperatorType *ot)
void * paint_proj_new_stroke(bContext *C, Object *ob, const float mouse[2], int mode)
void 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)
void paint_proj_redraw(const bContext *C, void *ps_handle_p, bool final)
void paint_proj_stroke_done(void *ps_handle_p)
void paint_stroke_cancel(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
bool paint_stroke_flipped(struct PaintStroke *stroke)
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)
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)
void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data)
void paint_stroke_free(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
void * paint_stroke_mode_data(struct PaintStroke *stroke)
bool paint_stroke_inverted(struct PaintStroke *stroke)
void paint_stroke_operator_properties(struct wmOperatorType *ot)
float paint_stroke_distance_get(struct PaintStroke *stroke)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
struct ToolSettings * toolsettings
struct UndoStep * step_init
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
struct UndoStack * undo_stack
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_paint_cursor_end(wmPaintCursor *handle)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, bool(*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata)