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
This commit is contained in:
2010-01-22 04:21:46 +00:00
parent 0db45111ce
commit 96b5658d0c
4 changed files with 13 additions and 4 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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! */

View File

@@ -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);
}