[Bf-blender-cvs] [18e0c5ea5b9] master: Cleanup: deprecated flags to named DNA flags

Campbell Barton noreply at git.blender.org
Fri Mar 15 01:27:56 CET 2019


Commit: 18e0c5ea5b97effb9f6af28a8b069feb7be6ed86
Author: Campbell Barton
Date:   Fri Mar 15 10:42:39 2019 +1100
Branches: master
https://developer.blender.org/rB18e0c5ea5b97effb9f6af28a8b069feb7be6ed86

Cleanup: deprecated flags to named DNA flags

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

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/makesdna/DNA_text_types.h

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 98277bab2a3..9adab610530 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2869,8 +2869,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 		}
 
 		LISTBASE_FOREACH (Text *, text, &bmain->texts) {
-			enum { TXT_READONLY = 1 << 8, TXT_FOLLOW = 1 << 9};
-			text->flags &= ~(TXT_READONLY | TXT_FOLLOW);
+			text->flags &= ~(TXT_FLAG_DEPRECATED_8 | TXT_FLAG_DEPRECATED_9);
 		}
 	}
 
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h
index 34b49e29b38..4d0b849e72b 100644
--- a/source/blender/makesdna/DNA_text_types.h
+++ b/source/blender/makesdna/DNA_text_types.h
@@ -59,10 +59,18 @@ typedef struct Text {
 #define TXT_MAX_UNDO	(TXT_INIT_UNDO*TXT_INIT_UNDO)
 
 /* text flags */
-#define TXT_ISDIRTY             (1 << 0)
-#define TXT_ISMEM               (1 << 2)
-#define TXT_ISEXT               (1 << 3)
-#define TXT_ISSCRIPT            (1 << 4) /* used by space handler scriptlinks */
-#define TXT_TABSTOSPACES        (1 << 10) /* use space instead of tabs */
+enum {
+	TXT_ISDIRTY             = 1 << 0,
+	TXT_ISMEM               = 1 << 2,
+	TXT_ISEXT               = 1 << 3,
+	/** Used by space handler scriptlinks. */
+	TXT_ISSCRIPT            = 1 << 4,
+
+	TXT_FLAG_DEPRECATED_8   = 1 << 8,  /* cleared */
+	TXT_FLAG_DEPRECATED_9   = 1 << 9,  /* cleared */
+
+	/** Use space instead of tabs. */
+	TXT_TABSTOSPACES        = 1 << 10,
+};
 
 #endif  /* __DNA_TEXT_TYPES_H__ */



More information about the Bf-blender-cvs mailing list