Fix deprecated DNA define checks

Also remove dead code which checked for SPACE_TIME.
This commit is contained in:
2019-12-17 09:42:12 +11:00
parent bcd38b398c
commit 96ebdbc90f
16 changed files with 29 additions and 45 deletions

View File

@@ -4229,19 +4229,6 @@ static void SCREEN_OT_region_context_menu(wmOperatorType *ot)
* Animation Step.
* \{ */
static int match_area_with_refresh(int spacetype, int refresh)
{
switch (spacetype) {
case SPACE_TIME:
if (refresh & SPACE_TIME) {
return 1;
}
break;
}
return 0;
}
static int match_region_with_redraws(int spacetype,
int regiontype,
int redraws,
@@ -4524,10 +4511,6 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
}
}
}
if (match_area_with_refresh(sa->spacetype, sad->refresh)) {
ED_area_tag_refresh(sa);
}
}
}

View File

@@ -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

View File

@@ -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),

View File

@@ -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

View File

@@ -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,

View File

@@ -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. */

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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,

View File

@@ -1284,7 +1284,7 @@ enum {
/* subsurface */
enum {
#ifdef DNA_DEPRECATED
#ifdef DNA_DEPRECATED_ALLOW
SHD_SUBSURFACE_COMPATIBLE = 0, // Deprecated
#endif
SHD_SUBSURFACE_CUBIC = 1,

View File

@@ -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

View File

@@ -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),

View File

@@ -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

View File

@@ -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,

View File

@@ -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),

View File

@@ -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");