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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-11 12:05:37 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-11 13:15:14 +0300
commit8055ed2741d1da48f2bf84c75ccb37b54cef1ab8 (patch)
treec9ec424a22afda1e40bc635280795b6d35d5f9e1 /source/blender/blenkernel
parent13d238729bed899a9a7e190ba38406846c485230 (diff)
Cleanup: remove some G.main usages...
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_paint.h2
-rw-r--r--source/blender/blenkernel/intern/paint.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 9dbd17bfaab..253a615712c 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -118,7 +118,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);
-void BKE_paint_init(struct Scene *sce, ePaintMode mode, const char col[3]);
+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);
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 4ba9cbf7ea0..b55f9ad6f62 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -498,7 +498,7 @@ eObjectMode BKE_paint_object_mode_from_paint_mode(ePaintMode mode)
}
}
-void BKE_paint_init(Scene *sce, ePaintMode mode, const char col[3])
+void BKE_paint_init(Main *bmain, Scene *sce, ePaintMode mode, const char col[3])
{
UnifiedPaintSettings *ups = &sce->toolsettings->unified_paint_settings;
Brush *brush;
@@ -508,10 +508,10 @@ void BKE_paint_init(Scene *sce, ePaintMode mode, const char col[3])
brush = BKE_paint_brush(paint);
if (brush == NULL) {
eObjectMode ob_mode = BKE_paint_object_mode_from_paint_mode(mode);
- brush = BKE_brush_first_search(G.main, ob_mode);
+ brush = BKE_brush_first_search(bmain, ob_mode);
if (!brush) {
- brush = BKE_brush_add(G.main, "Brush", ob_mode);
+ brush = BKE_brush_add(bmain, "Brush", ob_mode);
id_us_min(&brush->id); /* fake user only */
}
BKE_paint_brush_set(paint, brush);