Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-05 07:31:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-05 07:31:25 +0300
commit8b31f6fb2169e7163767e382adbef13587305aca (patch)
tree23609feb5da08a39f8009eb4390f69e6205fc2b1 /source/blender/blenkernel/BKE_paint.h
parent8fcc04edce53c5b3b01bf392e1667878ebcce0ef (diff)
Paint: add BKE_paint_ensure to initialize toolsettings
Each mode had its own logic for initializing paint structs, move to a single function. Also remove "BKE_brush_get_gpencil_paint", entering grease pencil mode is responsible for ensuring the data is created.
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r--source/blender/blenkernel/BKE_paint.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 652b794f937..06e4aad68ec 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -61,6 +61,7 @@ struct Tex;
struct ImagePool;
struct UnifiedPaintSettings;
struct Depsgraph;
+struct ToolSettings;
enum eOverlayFlags;
@@ -124,6 +125,7 @@ void BKE_paint_curve_copy_data(
struct PaintCurve *BKE_paint_curve_copy(struct Main *bmain, const struct PaintCurve *pc);
void BKE_paint_curve_make_local(struct Main *bmain, struct PaintCurve *pc, const bool lib_local);
+bool BKE_paint_ensure(const struct ToolSettings *ts, struct Paint **r_paint);
void BKE_paint_init(struct Main *bmain, struct Scene *sce, ePaintMode mode, const char col[3]);
void BKE_paint_free(struct Paint *p);
void BKE_paint_copy(struct Paint *src, struct Paint *tar, const int flag);