diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 466432a35ec..3839c0e71e4 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -11,11 +11,13 @@ #include "DNA_key_types.h" #include "DNA_listBase.h" #include "DNA_meshdata_types.h" +#include "DNA_scene_types.h" #include "DNA_vec_types.h" #include "BKE_paint.h" #include "BKE_pbvh.h" #include "BLI_bitmap.h" +#include "BLI_compiler_attrs.h" #include "BLI_compiler_compat.h" #include "BLI_gsqueue.h" #include "BLI_threads.h" @@ -25,12 +27,13 @@ extern "C" { #endif struct AutomaskingCache; +struct Image; +struct ImageUser; struct KeyBlock; struct Object; struct SculptUndoNode; struct bContext; - -enum ePaintSymmetryFlags; +struct PaintModeSettings; /* Updates */ @@ -43,6 +46,7 @@ typedef enum SculptUpdateType { SCULPT_UPDATE_MASK = 1 << 1, SCULPT_UPDATE_VISIBILITY = 1 << 2, SCULPT_UPDATE_COLOR = 1 << 3, + SCULPT_UPDATE_IMAGE = 1 << 4, } SculptUpdateType; typedef struct SculptCursorGeometryInfo { @@ -1626,7 +1630,29 @@ void SCULPT_multiplane_scrape_preview_draw(uint gpuattr, void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); /* Paint Brush. */ -void SCULPT_do_paint_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); +void SCULPT_do_paint_brush(struct PaintModeSettings *paint_mode_settings, + Sculpt *sd, + Object *ob, + PBVHNode **nodes, + int totnode) ATTR_NONNULL(); + +/** + * @brief Get the image canvas for painting on the given object. + * + * @return #true if an image is found. The #r_image and #r_image_user fields are filled with the + * image and image user. Returns false when the image isn't found. In the later case the r_image + * and r_image_user are set to nullptr/NULL. + */ +bool SCULPT_paint_image_canvas_get(struct PaintModeSettings *paint_mode_settings, + struct Object *ob, + struct Image **r_image, + struct ImageUser **r_image_user) ATTR_NONNULL(); +void SCULPT_do_paint_brush_image(struct PaintModeSettings *paint_mode_settings, + Sculpt *sd, + Object *ob, + PBVHNode **nodes, + int totnode) ATTR_NONNULL(); +bool SCULPT_use_image_paint_brush(struct PaintModeSettings *settings, Object *ob) ATTR_NONNULL(); /* Smear Brush. */ void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); |