Replace magic numbers with deprecated names
authorCampbell Barton <ideasman42@gmail.com>
Fri, 28 Jul 2017 20:25:54 +0000 (06:25 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 28 Jul 2017 20:27:40 +0000 (06:27 +1000)
The names aren't meaningful but means it wont
accidentally use valid names.

Also remove textured-font setting

source/blender/editors/interface/resources.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c

index fdeafedc3288c19630ee216dfb0b30bbef23c43a..4b47d0da13ee96f9fe1725426017b40ddd55eccd 100644 (file)
@@ -2761,17 +2761,17 @@ void init_userdef_do_versions(void)
        if (!USER_VERSION_ATLEAST(278, 6)) {
                /* Clear preference flags for re-use. */
                U.flag &= ~(
-                   (1 << 1) | (1 << 2) | (1 << 3) |
-                   (1 << 6) | (1 << 7) |
-                   (1 << 9) | (1 << 10));
+                   USER_FLAG_DEPRECATED_1 | USER_FLAG_DEPRECATED_2 | USER_FLAG_DEPRECATED_3 |
+                   USER_FLAG_DEPRECATED_6 | USER_FLAG_DEPRECATED_7 |
+                   USER_FLAG_DEPRECATED_9 | USER_FLAG_DEPRECATED_10);
                U.uiflag &= ~(
-                   (1 << 7));
+                   USER_UIFLAG_DEPRECATED_7);
                U.transopts &= ~(
-                   (1 << 2) | (1 << 3) | (1 << 4) |
-                   (1 << 7));
+                   USER_TR_DEPRECATED_2 | USER_TR_DEPRECATED_3 | USER_TR_DEPRECATED_4 |
+                   USER_TR_DEPRECATED_6 | USER_TR_DEPRECATED_7);
                U.gameflags &= ~(
-                   (1 << 0) | (1 << 1) |
-                   (1 << 3) | (1 << 4));
+                   USER_GL_RENDER_DEPRECATED_0 | USER_GL_RENDER_DEPRECATED_1 |
+                   USER_GL_RENDER_DEPRECATED_3 | USER_GL_RENDER_DEPRECATED_4);
 
                U.uiflag |= USER_LOCK_CURSOR_ADJUST;
        }
index 18b3ca4b325991561e438afa4e48d99fdb22e2cc..62c1eb0b91b5cf693da6c6dca1d7fdbcb422cb7b 100644 (file)
@@ -600,12 +600,16 @@ typedef enum eUserPref_Section {
 /* UserDef.flag */
 typedef enum eUserPref_Flag {
        USER_AUTOSAVE                   = (1 << 0),
-       /* 1..3 */
+       USER_FLAG_DEPRECATED_1  = (1 << 1),  /* cleared */
+       USER_FLAG_DEPRECATED_2  = (1 << 2),  /* cleared */
+       USER_FLAG_DEPRECATED_3  = (1 << 3),  /* cleared */
        USER_SCENEGLOBAL                = (1 << 4),
        USER_TRACKBALL                  = (1 << 5),
-       /* 6..7 */
+       USER_FLAG_DEPRECATED_6  = (1 << 6),  /* cleared */
+       USER_FLAG_DEPRECATED_7  = (1 << 7),  /* cleared */
        USER_MAT_ON_OB                  = (1 << 8),
-       /* 9..10 */
+       USER_FLAG_DEPRECATED_9  = (1 << 9),   /* cleared */
+       USER_FLAG_DEPRECATED_10 = (1 << 10),  /* cleared */
        USER_TOOLTIPS                   = (1 << 11),
        USER_TWOBUTTONMOUSE             = (1 << 12),
        USER_NONUMPAD                   = (1 << 13),
@@ -662,7 +666,7 @@ typedef enum eUserpref_UI_Flag {
        USER_DRAWVIEWINFO               = (1 << 4),
        USER_PLAINMENUS                 = (1 << 5),
        USER_LOCK_CURSOR_ADJUST = (1 << 6),
-       /* flag 7 is free  */
+       USER_UIFLAG_DEPRECATED_7        = (1 << 7),  /* cleared */
        USER_ALLWINCODECS               = (1 << 8),
        USER_MENUOPENAUTO               = (1 << 9),
        USER_ZBUF_CURSOR                = (1 << 10),
@@ -735,10 +739,12 @@ typedef enum eAutokey_Flag {
 typedef enum eUserpref_Translation_Flags {
        USER_TR_TOOLTIPS                = (1 << 0),
        USER_TR_IFACE                   = (1 << 1),
-       /* 2..4 */
+       USER_TR_DEPRECATED_2    = (1 << 2),  /* cleared */
+       USER_TR_DEPRECATED_3    = (1 << 3),  /* cleared */
+       USER_TR_DEPRECATED_4    = (1 << 4),  /* cleared */
        USER_DOTRANSLATE                = (1 << 5),
-       USER_USETEXTUREFONT             = (1 << 6),
-       /* 7 */
+       USER_TR_DEPRECATED_6    = (1 << 6),  /* cleared */
+       USER_TR_DEPRECATED_7    = (1 << 7),  /* cleared */
        USER_TR_NEWDATANAME             = (1 << 8),
 } eUserpref_Translation_Flags;
 
@@ -760,7 +766,11 @@ typedef enum eDupli_ID_Flags {
 
 /* UserDef.gameflags */
 typedef enum eOpenGL_RenderingOptions {
-       USER_DISABLE_MIPMAP             = (1 << 2),
+       USER_GL_RENDER_DEPRECATED_0                     = (1 << 0),
+       USER_GL_RENDER_DEPRECATED_1                     = (1 << 1),
+       USER_DISABLE_MIPMAP                                     = (1 << 2),
+       USER_GL_RENDER_DEPRECATED_3                     = (1 << 3),
+       USER_GL_RENDER_DEPRECATED_4                     = (1 << 4),
 } eOpenGL_RenderingOptions;
 
 /* selection method for opengl gpu_select_method */
index 4583a2ca2ccbf153d7fd437ced1699c0899f83f4..f2ed79cb5ff05a0e3769c8d986c784ee891b9482 100644 (file)
@@ -3990,11 +3990,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Translate New Names", "Translate new data names (when adding/creating some)");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
 
-       prop = RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
-       RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts");
-       RNA_def_property_update(prop, 0, "rna_userdef_update");
-
        /* System & OpenGL */
 
        prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);