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:
authorMatt Ebb <matt@mke3.net>2010-01-22 07:21:46 +0300
committerMatt Ebb <matt@mke3.net>2010-01-22 07:21:46 +0300
commit96b5658d0cd33b02cb6668670b7706b8897c0460 (patch)
tree2f1ae90734eb57b9001238418a549c3b418d75ae
parent0db45111ce9c504894e0a88dae5f78c03196d233 (diff)
Fix [#20756] Texture painting on 3D tends to forget textures in the new texture menu.
Part of this fix (loading files with brushes/textures) will only apply for new files saved after this commit
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/intern/brush.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c11
-rw-r--r--source/blender/blenloader/intern/writefile.c2
4 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 8e7e698a986..5d264be3adf 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -43,7 +43,7 @@ struct bContext;
struct ReportList;
#define BLENDER_VERSION 250
-#define BLENDER_SUBVERSION 11
+#define BLENDER_SUBVERSION 12
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 99cd6975665..e915784e741 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -89,6 +89,8 @@ Brush *add_brush(const char *name)
brush->flag |= BRUSH_SPACE;
brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
+
+ default_mtex(&brush->mtex);
/* enable fake user by default */
brush->id.flag |= LIB_FAKEUSER;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c8bcc43086e..7ba17ced089 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10373,9 +10373,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- /* put 2.50 compatibility code here until next subversion bump */
-
- if (1) {
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 12))
+ {
Scene *sce;
Object *ob;
Brush *brush;
@@ -10475,6 +10474,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+
+
+ /* put 2.50 compatibility code here until next subversion bump */
+ if (1) {
+ ;
+ }
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 8673d847f73..f8e1523d5ce 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2324,6 +2324,8 @@ static void write_brushes(WriteData *wd, ListBase *idbase)
writestruct(wd, ID_BR, "Brush", 1, brush);
if (brush->id.properties) IDP_WriteProperty(brush->id.properties, wd);
+ writestruct(wd, DATA, "MTex", 1, &brush->mtex);
+
if(brush->curve)
write_curvemapping(wd, brush->curve);
}