diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-12-17 01:42:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-12-17 01:49:23 +0300 |
commit | 96ebdbc90ff93f55e202997334ef3ff811f497fb (patch) | |
tree | f46426f457b80991250e98c1a580fa3b064ff336 /source/blender/makesdna | |
parent | bcd38b398ce19a1757ab1f7f51ef50df8eef8d41 (diff) |
Fix deprecated DNA define checks
Also remove dead code which checked for SPACE_TIME.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_armature_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_camera_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_fluid_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_image_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_particle_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_sound_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 8 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 3 |
15 files changed, 29 insertions, 28 deletions
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 4ead3165715..354344328d3 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -182,7 +182,7 @@ typedef enum eArmature_DeformFlag { ARM_DEF_VGROUP = (1 << 0), ARM_DEF_ENVELOPE = (1 << 1), ARM_DEF_QUATERNION = (1 << 2), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW ARM_DEF_B_BONE_REST = (1 << 3), /* deprecated */ #endif ARM_DEF_INVERT_VGROUP = (1 << 4), @@ -190,7 +190,7 @@ typedef enum eArmature_DeformFlag { /* armature->pathflag */ // XXX deprecated... old animation system (armature only viz) -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW typedef enum eArmature_PathFlag { ARM_PATH_FNUMS = (1 << 0), ARM_PATH_KFRAS = (1 << 1), @@ -228,7 +228,7 @@ typedef enum eBone_Flag { BONE_UNKEYED = (1 << 13), /** set to prevent hinge child bones from influencing the transform center */ BONE_HINGE_CHILD_TRANSFORM = (1 << 14), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW /** No parent scale */ BONE_NO_SCALE = (1 << 15), #endif diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index b78b2f64648..7c7d4bc182e 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -156,7 +156,7 @@ enum { CAM_SHOWNAME = (1 << 4), CAM_ANGLETOGGLE = (1 << 5), CAM_DS_EXPAND = (1 << 6), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW CAM_PANORAMA = (1 << 7), /* deprecated */ #endif CAM_SHOWSENSOR = (1 << 8), diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index d7b392d5133..0baa11c3059 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -755,7 +755,7 @@ typedef enum eCopyRotation_Flags { ROTLIKE_X_INVERT = (1 << 4), ROTLIKE_Y_INVERT = (1 << 5), ROTLIKE_Z_INVERT = (1 << 6), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW ROTLIKE_OFFSET = (1 << 7), #endif } eCopyRotation_Flags; @@ -976,7 +976,7 @@ typedef enum eSplineIK_Flags { CONSTRAINT_SPLINEIK_BOUND = (1 << 0), /* root of chain is not influenced by the constraint */ CONSTRAINT_SPLINEIK_NO_ROOT = (1 << 1), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW /* bones in the chain should not scale to fit the curve */ CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1 << 2), #endif diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 0a6423d569f..f70dc19616b 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -97,7 +97,7 @@ typedef enum CustomDataType { CD_AUTO_FROM_NAME = -1, CD_MVERT = 0, -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW CD_MSTICKY = 1, /* DEPRECATED */ #endif CD_MDEFORMVERT = 2, @@ -113,7 +113,7 @@ typedef enum CustomDataType { CD_PROP_STR = 12, CD_ORIGSPACE = 13, /* for modifier stack face location mapping */ CD_ORCO = 14, /* undeformed vertex coordinates, normalized to 0..1 range */ -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW CD_MTEXPOLY = 15, /* deprecated */ #endif CD_MLOOPUV = 16, diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h index f0957d7c736..34d94258735 100644 --- a/source/blender/makesdna/DNA_fluid_types.h +++ b/source/blender/makesdna/DNA_fluid_types.h @@ -30,7 +30,7 @@ enum { FLUID_DOMAIN_USE_DISSOLVE = (1 << 2), /* Let smoke dissolve. */ FLUID_DOMAIN_USE_DISSOLVE_LOG = (1 << 3), /* Using 1/x for dissolve. */ -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW FLUID_DOMAIN_USE_HIGH_SMOOTH = (1 << 5), /* -- Deprecated -- */ #endif FLUID_DOMAIN_FILE_LOAD = (1 << 6), /* Flag for file load. */ diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index e975d7acd74..1c58d03a1a8 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -184,7 +184,7 @@ typedef struct Image { enum { IMA_FLAG_UNUSED_0 = (1 << 0), /* cleared */ IMA_FLAG_UNUSED_1 = (1 << 1), /* cleared */ -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW IMA_DO_PREMUL = (1 << 2), #endif IMA_FLAG_UNUSED_4 = (1 << 4), /* cleared */ diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 60e0eb2976e..86ea22690ee 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -204,7 +204,7 @@ typedef struct Mesh { } Mesh; /* deprecated by MTFace, only here for file reading */ -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW typedef struct TFace { /** The faces image for the active UVLayer. */ void *tpage; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 4da5f050dc7..0cc80a0112d 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -62,7 +62,7 @@ typedef enum ModifierType { eModifierType_SimpleDeform = 28, eModifierType_Multires = 29, eModifierType_Surface = 30, -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW eModifierType_Smoke = 31, #endif eModifierType_ShapeKey = 32, @@ -1157,7 +1157,7 @@ enum { MOD_SOLIDIFY_EVEN = (1 << 1), MOD_SOLIDIFY_NORMAL_CALC = (1 << 2), MOD_SOLIDIFY_VGROUP_INV = (1 << 3), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW MOD_SOLIDIFY_RIM_MATERIAL = (1 << 4), /* deprecated, used in do_versions */ #endif MOD_SOLIDIFY_FLIP = (1 << 5), @@ -1604,7 +1604,7 @@ typedef struct TriangulateModifierData { /* TriangulateModifierData.flag */ enum { -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW MOD_TRIANGULATE_BEAUTY = (1 << 0), /* deprecated */ #endif MOD_TRIANGULATE_KEEP_CUSTOMLOOP_NORMALS = 1 << 1, diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index d94a05ccb81..22202717b0c 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1284,7 +1284,7 @@ enum { /* subsurface */ enum { -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW SHD_SUBSURFACE_COMPATIBLE = 0, // Deprecated #endif SHD_SUBSURFACE_CUBIC = 1, diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 78f965c327b..8bbbc9fc85d 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -406,7 +406,7 @@ typedef enum eParticleDrawFlag { PART_DRAW_VEL = (1 << 0), PART_DRAW_GLOBAL_OB = (1 << 1), PART_DRAW_SIZE = (1 << 2), -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW /** Render emitter as well. */ PART_DRAW_EMITTER = (1 << 3), /* DEPRECATED */ #endif diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 980fbfa72e0..7cfd19b4bd9 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -101,7 +101,7 @@ typedef struct AviCodecData { typedef enum eFFMpegPreset { FFM_PRESET_NONE, -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW /* Previously used by h.264 to control encoding speed vs. file size. */ FFM_PRESET_ULTRAFAST, /* DEPRECATED */ FFM_PRESET_SUPERFAST, /* DEPRECATED */ @@ -1929,7 +1929,7 @@ enum { R_COLOR_MANAGEMENT_UNUSED_1 = (1 << 1), }; -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW /* RenderData.subimtype flag options for imtype */ enum { R_OPENEXR_HALF = (1 << 0), /*deprecated*/ @@ -2169,7 +2169,7 @@ typedef enum eVGroupSelect { /* FFMpegCodecData.flags */ enum { -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW FFMPEG_MULTIPLEX_AUDIO = (1 << 0), /* deprecated, you can choose none as audiocodec now */ #endif FFMPEG_AUTOSPLIT_OUTPUT = (1 << 1), diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 1c1bb9b9ce1..81548343da0 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -112,7 +112,7 @@ enum { /* bSound->flags */ enum { -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW /* deprecated! used for sound actuator loading */ SOUND_FLAGS_3D = (1 << 3), #endif diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 8261b9e678b..7adba2b7dbe 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1697,7 +1697,7 @@ typedef enum eSpace_Type { SPACE_INFO = 7, SPACE_SEQ = 8, SPACE_TEXT = 9, -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW SPACE_IMASEL = 10, /* Deprecated */ SPACE_SOUND = 11, /* Deprecated */ #endif @@ -1705,11 +1705,11 @@ typedef enum eSpace_Type { SPACE_NLA = 13, /* TODO: fully deprecate */ SPACE_SCRIPT = 14, /* Deprecated */ -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW SPACE_TIME = 15, /* Deprecated */ #endif SPACE_NODE = 16, -#ifdef DNA_DEPRECATED +#ifdef DNA_DEPRECATED_ALLOW SPACE_LOGIC = 17, /* Deprecated */ #endif SPACE_CONSOLE = 18, diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index fb23b39a616..1f92b134e4c 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -1012,10 +1012,10 @@ typedef enum eUserpref_UI_Flag { USER_ZOOM_HORIZ = (1 << 26), /* for CONTINUE and DOLLY zoom */ USER_SPLASH_DISABLE = (1 << 27), USER_HIDE_RECENT = (1 << 28), -#ifdef DNA_DEPRECATED - USER_SHOW_THUMBNAILS = - (1 << 29), /* deprecated - We're just trying if there's much desire for this feature, or if - we can make it go for good. Should be cleared if so - Julian, Oct. 2019 */ +#ifdef DNA_DEPRECATED_ALLOW + /* Deprecated: We're just trying if there's much desire for this feature, + * or if we can make it go for good. Should be cleared if so - Julian, Oct. 2019. */ + USER_SHOW_THUMBNAILS = (1 << 29), #endif USER_SAVE_PROMPT = (1 << 30), USER_HIDE_SYSTEM_BOOKMARKS = (1u << 31), diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 9a5b2290e10..dc32ca7e244 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -903,7 +903,8 @@ static int calculate_struct_sizes(int firststruct, FILE *file_verify, const char /* Write test to verify sizes are accurate. */ fprintf(file_verify, "/* Verify struct sizes and member offsets are as expected by DNA. */\n"); fprintf(file_verify, "#include \"BLI_assert.h\"\n\n"); - fprintf(file_verify, "#define DNA_DEPRECATED\n"); + /* Needed so we can find offsets of deprecated structs. */ + fprintf(file_verify, "#define DNA_DEPRECATED_ALLOW\n"); /* Workaround enum naming collision in static asserts * (ideally this included a unique name/id per file). */ fprintf(file_verify, "#define assert_line_ assert_line_DNA_\n"); |