[Bf-blender-cvs] [9521d71] id-remap: Merge branch 'master' into id-remap
Bastien Montagne
noreply at git.blender.org
Mon Nov 2 19:22:24 CET 2015
Commit: 9521d7173559e8a3980930893ce6e0ce05fcdaa8
Author: Bastien Montagne
Date: Mon Nov 2 19:22:14 2015 +0100
Branches: id-remap
https://developer.blender.org/rB9521d7173559e8a3980930893ce6e0ce05fcdaa8
Merge branch 'master' into id-remap
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/brush.c
index e944c0b,95b65f5..f1a729d
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@@ -214,11 -219,25 +214,26 @@@ void BKE_brush_free(Brush *brush
curvemapping_free(brush->curve);
- if (brush->gradient)
- MEM_freeN(brush->gradient);
+ MEM_SAFE_FREE(brush->gradient);
+
+ BKE_previewimg_free(&(brush->preview));
}
+ /**
+ * \note Currently users don't remove brushes from the UI (as is done for scene, text... etc)
+ * This is only used by RNA, which can remove brushes.
+ */
+ void BKE_brush_unlink(Main *bmain, Brush *brush)
+ {
+ Brush *brush_iter;
+
+ for (brush_iter = bmain->brush.first; brush_iter; brush_iter = brush_iter->id.next) {
+ if (brush_iter->toggle_brush == brush) {
+ brush_iter->toggle_brush = NULL;
+ }
+ }
+ }
+
static void extern_local_brush(Brush *brush)
{
id_lib_extern((ID *)brush->mtex.tex);
diff --cc source/blender/editors/space_outliner/outliner_tools.c
index 7758f2f,253430a..b442f7c
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@@ -218,8 -215,9 +218,9 @@@ static void unlink_texture_cb(bContext
}
}
- static void unlink_group_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te),
- TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
+ static void unlink_group_cb(
+ bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te),
- TreeStoreElem *tsep, TreeStoreElem *tselem)
++ TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
{
Group *group = (Group *)tselem->id;
More information about the Bf-blender-cvs
mailing list