[Bf-blender-cvs] [18ae259] master: Cleanup: unused Global flags.

Campbell Barton noreply at git.blender.org
Mon Jan 19 15:07:57 CET 2015


Commit: 18ae259cc4b60a670f4bf5cbd621bbe420c0c24b
Author: Campbell Barton
Date:   Tue Jan 20 01:07:12 2015 +1100
Branches: master
https://developer.blender.org/rB18ae259cc4b60a670f4bf5cbd621bbe420c0c24b

Cleanup: unused Global flags.

===================================================================

M	source/blender/blenkernel/BKE_global.h
M	source/blender/blenkernel/intern/blender.c
M	source/blender/blenloader/BLO_readfile.h
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/makesdna/DNA_fileglobal_types.h
M	source/blender/makesdna/DNA_userdef_types.h

===================================================================

diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index a7aa4c6..e70689b 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -70,7 +70,6 @@ typedef struct Global {
 	bool factory_startup;
 
 	short moving;
-	short winpos, displaymode;  /* used to be in Render */
 
 	/* to indicate render is busy, prevent renderwindow events etc */
 	bool is_rendering;
@@ -90,9 +89,6 @@ typedef struct Global {
 	/* this variable is written to / read from FileGlobal->fileflags */
 	int fileflags;
 
-	/* save the allowed windowstate of blender when using -W or -w (GHOST_TWindowState) */
-	int windowstate;
-
 	/* message to use when autoexec fails */
 	char autoexec_fail[200];
 } Global;
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index be72fe2..78b937c 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -146,10 +146,6 @@ void initglobals(void)
 	else
 		BLI_snprintf(versionstr, sizeof(versionstr), "v%d.%02d", BLENDER_VERSION / 100, BLENDER_VERSION % 100);
 
-#ifdef _WIN32
-	G.windowstate = 0;
-#endif
-
 #ifndef WITH_PYTHON_SECURITY /* default */
 	G.f |= G_SCRIPT_AUTOEXEC;
 #else
@@ -291,8 +287,6 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
 		CTX_data_scene_set(C, curscene);
 	}
 	else {
-		G.winpos = bfd->winpos;
-		G.displaymode = bfd->displaymode;
 		G.fileflags = bfd->fileflags;
 		CTX_wm_manager_set(C, G.main->wm.first);
 		CTX_wm_screen_set(C, bfd->curscreen);
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 4b7b9ce..7a6107a 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -61,9 +61,7 @@ typedef struct BlendFileData {
 	struct Main *main;
 	struct UserDef *user;
 
-	int winpos;
 	int fileflags;
-	int displaymode;
 	int globalf;
 	char filename[1024];    /* 1024 = FILE_MAX */
 	
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7e10bff..44b441d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7571,9 +7571,7 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead)
 	bfd->main->build_commit_timestamp = fg->build_commit_timestamp;
 	BLI_strncpy(bfd->main->build_hash, fg->build_hash, sizeof(bfd->main->build_hash));
 	
-	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));
 	
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index b32460d..adb37aa 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3433,7 +3433,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
 	char subvstr[8];
 	
 	/* prevent mem checkers from complaining */
-	fg.pads= 0;
+	memset(fg.pad, 0, sizeof(fg.pad));
 	memset(fg.filename, 0, sizeof(fg.filename));
 	memset(fg.build_hash, 0, sizeof(fg.build_hash));
 
@@ -3442,8 +3442,6 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
 	/* XXX still remap G */
 	fg.curscreen= screen;
 	fg.curscene= screen ? screen->scene : NULL;
-	fg.displaymode= G.displaymode;
-	fg.winpos= G.winpos;
 
 	/* prevent to save this, is not good convention, and feature with concerns... */
 	fg.fileflags= (fileflags & ~G_FILE_FLAGS_RUNTIME);
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index 040b55d..fc7959c 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -41,9 +41,9 @@ struct Scene;
  */
 typedef struct FileGlobal {
 	char subvstr[4];		/* needs to be here, for human fileformat recognition */
-	short subversion, pads;
+	short subversion;
 	short minversion, minsubversion;
-	short displaymode, winpos;
+	char pad[6];
 	struct bScreen *curscreen;
 	struct Scene *curscene;
 	int fileflags;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 11807ba..c7f4033 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -461,7 +461,7 @@ typedef struct UserDef {
 
 	int scrollback; /* console scrollback limit */
 	int dpi;		/* range 48-128? */
-	short encoding;
+	char pad2[2];
 	short transopts;
 	short menuthreshold1, menuthreshold2;




More information about the Bf-blender-cvs mailing list