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:
-rw-r--r--source/blender/blenkernel/BKE_main.h1
-rw-r--r--source/blender/blenloader/CMakeLists.txt4
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/blenloader/intern/writefile.c10
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h2
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h3
6 files changed, 20 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index 533679cead1..74d4cf88eda 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -51,6 +51,7 @@ typedef struct Main {
char name[240];
short versionfile, subversionfile;
short minversionfile, minsubversionfile;
+ int revision; /* svn revision of binary that saved file */
struct Library *curlib;
ListBase scene;
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index a9a89120b73..e51fb35a4ac 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -50,4 +50,8 @@ set(SRC
intern/readfile.h
)
+if(WITH_BUILDINFO)
+ add_definitions(-DNAN_BUILDINFO)
+endif()
+
blender_add_lib(bf_blenloader "${SRC}" "${INC}")
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 0dfdd46d17b..b4dfcdfb186 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5654,12 +5654,14 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead)
bfd->main->subversionfile= fg->subversion;
bfd->main->minversionfile= fg->minversion;
bfd->main->minsubversionfile= fg->minsubversion;
+ bfd->main->revision= fg->revision;
bfd->winpos= fg->winpos;
bfd->fileflags= fg->fileflags;
bfd->displaymode= fg->displaymode;
bfd->globalf= fg->globalf;
BLI_strncpy(bfd->filename, fg->filename, sizeof(bfd->filename));
+
if(G.fileflags & G_FILE_RECOVER)
BLI_strncpy(fd->relabase, fg->filename, sizeof(fd->relabase));
@@ -6642,7 +6644,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* WATCH IT!!!: pointers from libdata have not been converted */
if(G.f & G_DEBUG)
- printf("read file %s\n Version %d sub %d\n", fd->relabase, main->versionfile, main->subversionfile);
+ printf("read file %s\n Version %d sub %d svn r%d\n", fd->relabase, main->versionfile, main->subversionfile, main->revision);
if(main->versionfile == 100) {
/* tex->extend and tex->imageflag have changed: */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 34825af6c6a..f1e1d13a2d6 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2375,7 +2375,15 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
fg.subversion= BLENDER_SUBVERSION;
fg.minversion= BLENDER_MINVERSION;
fg.minsubversion= BLENDER_MINSUBVERSION;
- fg.pads= 0; /* prevent mem checkers from complaining */
+#ifdef NAN_BUILDINFO
+ {
+ extern char build_rev[];
+ fg.revision= atoi(build_rev);
+ }
+#else
+ fg.revision= 0;
+#endif
+ fg.pads= fg.pad= 0; /* prevent mem checkers from complaining */
writestruct(wd, GLOB, "FileGlobal", 1, &fg);
}
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index e039eed2065..f9d6a70db48 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -541,7 +541,7 @@ typedef enum eUpAxis_Modes {
UP_Z
} eUpAxis_Modes;
-/* Tracking axis (TrackTo, Locked Track, Damped Track) */
+/* Tracking axis (TrackTo, Locked Track, Damped Track) and minmax (floor) constraint */
typedef enum eTrackToAxis_Modes {
TRACK_X = 0,
TRACK_Y,
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index ae539a18963..0c3a9429de6 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -47,7 +47,8 @@ typedef struct FileGlobal {
struct Scene *curscene;
int fileflags;
int globalf;
-
+ int revision; /* svn revision from buildinfo */
+ int pad;
/* file path where this was saved, for recover */
char filename[240]; /* 240 = FILE_MAX */
} FileGlobal;