diff options
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 70eaa00b82e..9a32a50ca00 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -109,11 +109,11 @@ static void brush_defaults(Brush *brush) /* Datablock add/copy/free/make_local */ -Brush *BKE_brush_add(const char *name) +Brush *BKE_brush_add(Main *bmain, const char *name) { Brush *brush; - brush = BKE_libblock_alloc(&G.main->brush, ID_BR, name); + brush = BKE_libblock_alloc(&bmain->brush, ID_BR, name); /* enable fake user by default */ brush->id.flag |= LIB_FAKEUSER; @@ -419,7 +419,7 @@ int BKE_brush_texture_set_nr(Brush *brush, int nr) idtest = (ID *)BLI_findlink(&G.main->tex, nr - 1); if (idtest == NULL) { /* new tex */ if (id) idtest = (ID *)BKE_texture_copy((Tex *)id); - else idtest = (ID *)add_texture("Tex"); + else idtest = (ID *)add_texture(G.main, "Tex"); idtest->us--; } if (idtest != id) { |