Blender V4.3
ED_paint.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "DNA_view3d_enums.h"
12
13enum class PaintMode : int8_t;
14struct bContext;
15struct bToolRef;
16struct Depsgraph;
17struct Image;
18struct ImageUser;
19struct ImBuf;
20struct Main;
22struct PaintTileMap;
23struct ReportList;
24struct Scene;
25struct UndoStep;
26struct UndoType;
27struct wmKeyConfig;
28struct wmOperator;
29
30/* `paint_ops.cc` */
31
34void ED_keymap_paint(wmKeyConfig *keyconf);
35
36/* `paint_image.cc` */
37
40 Image *ima, ImBuf *ibuf, ImageUser *iuser, int x, int y, int w, int h, bool find_old);
42 const float color[3],
43 wmOperator *op,
44 const int mouse[2]);
45
46/* `paint_image_proj.cc` */
47
49 ReportList *reports, bool has_uvs, bool has_mat, bool has_tex, bool has_stencil);
55 Object &ob,
56 bool *r_has_uvs,
57 bool *r_has_mat,
58 bool *r_has_tex,
59 bool *r_has_stencil);
60
61/* `image_undo.cc` */
62
67void ED_image_undo_push_begin(const char *name, PaintMode paint_mode);
68void ED_image_undo_push_begin_with_image(const char *name,
69 Image *image,
70 ImBuf *ibuf,
71 ImageUser *iuser);
72
78
81
82void *ED_image_paint_tile_find(PaintTileMap *paint_tile_map,
83 Image *image,
84 ImBuf *ibuf,
85 ImageUser *iuser,
86 int x_tile,
87 int y_tile,
88 unsigned short **r_mask,
89 bool validate);
90void *ED_image_paint_tile_push(PaintTileMap *paint_tile_map,
91 Image *image,
92 ImBuf *ibuf,
93 ImBuf **tmpibuf,
94 ImageUser *iuser,
95 int x_tile,
96 int y_tile,
97 unsigned short **r_mask,
98 bool **r_valid,
99 bool use_thread_lock,
100 bool find_prev);
103
105
106#define ED_IMAGE_UNDO_TILE_BITS 6
107#define ED_IMAGE_UNDO_TILE_SIZE (1 << ED_IMAGE_UNDO_TILE_BITS)
108#define ED_IMAGE_UNDO_TILE_NUMBER(size) \
109 (((size) + ED_IMAGE_UNDO_TILE_SIZE - 1) >> ED_IMAGE_UNDO_TILE_BITS)
110
111/* `paint_curve_undo.cc` */
112
113void ED_paintcurve_undo_push_begin(const char *name);
115
118
119/* `paint_canvas.cc` */
120
123 const PaintModeSettings *settings,
124 Object &ob,
125 eV3DShadingColorType orig_color_type);
126
133
136
137void ED_object_vpaintmode_enter_ex(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob);
139void ED_object_wpaintmode_enter_ex(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob);
141
146
148 Scene &scene,
149 Depsgraph &depsgraph,
150 Object &ob);
152
153void ED_object_texture_paint_mode_exit_ex(Main &bmain, Scene &scene, Object &ob);
PaintMode
Definition BKE_paint.hh:99
eV3DShadingColorType
void * ED_image_paint_tile_find(PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool validate)
void ED_object_texture_paint_mode_enter_ex(Main &bmain, Scene &scene, Depsgraph &depsgraph, Object &ob)
void ED_object_wpaintmode_enter_ex(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
void ED_paintcurve_undosys_type(UndoType *ut)
void * ED_image_paint_tile_push(PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImBuf **tmpibuf, ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool **r_valid, bool use_thread_lock, bool find_prev)
void ED_image_paint_tile_lock_end()
Definition image_undo.cc:70
void ED_image_undo_push_begin(const char *name, PaintMode paint_mode)
void ED_operatortypes_paint()
Definition paint_ops.cc:969
void ED_imapaint_dirty_region(Image *ima, ImBuf *ibuf, ImageUser *iuser, int x, int y, int w, int h, bool find_old)
eV3DShadingColorType ED_paint_shading_color_override(bContext *C, const PaintModeSettings *settings, Object &ob, eV3DShadingColorType orig_color_type)
void ED_object_texture_paint_mode_exit(bContext *C)
void ED_image_undo_push_begin_with_image(const char *name, Image *image, ImBuf *ibuf, ImageUser *iuser)
void ED_object_wpaintmode_exit(bContext *C)
void ED_image_undosys_type(UndoType *ut)
void ED_object_vpaintmode_enter(bContext *C, Depsgraph &depsgraph)
void ED_operatormacros_paint()
Definition paint_ops.cc:953
void ED_image_undo_push_end()
void ED_object_wpaintmode_exit_ex(Object &ob)
void ED_object_texture_paint_mode_enter(bContext *C)
void ED_object_vpaintmode_exit(bContext *C)
void ED_imapaint_bucket_fill(bContext *C, const float color[3], wmOperator *op, const int mouse[2])
PaintTileMap * ED_image_paint_tile_map_get()
void ED_image_paint_brush_type_update_sticky_shading_color(bContext *C, Object *ob)
void ED_object_vpaintmode_exit_ex(Object &ob)
void ED_object_vpaintmode_enter_ex(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
void ED_object_wpaintmode_enter(bContext *C, Depsgraph &depsgraph)
void ED_paintcurve_undo_push_begin(const char *name)
void ED_object_texture_paint_mode_exit_ex(Main &bmain, Scene &scene, Object &ob)
void ED_paint_data_warning(ReportList *reports, bool has_uvs, bool has_mat, bool has_tex, bool has_stencil)
void ED_image_undo_restore(UndoStep *us)
void ED_paintcurve_undo_push_end(bContext *C)
void ED_image_paint_tile_lock_init()
Definition image_undo.cc:65
bool ED_paint_proj_mesh_data_check(Scene &scene, Object &ob, bool *r_has_uvs, bool *r_has_mat, bool *r_has_tex, bool *r_has_stencil)
void ED_imapaint_clear_partial_redraw()
bool ED_image_paint_brush_type_use_canvas(bContext *C, bToolRef *tref)
void ED_keymap_paint(wmKeyConfig *keyconf)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119
const Depsgraph * depsgraph
signed char int8_t
Definition stdint.h:75
struct ReportList * reports