[Bf-blender-cvs] [66f1c3b] master: DNA: replace GCC poison with ifdef for enums

Campbell Barton noreply at git.blender.org
Fri Jul 10 08:04:07 CEST 2015


Commit: 66f1c3b882d59ea2b6600dfe9464c7c81e8c8483
Author: Campbell Barton
Date:   Fri Jul 10 15:58:08 2015 +1000
Branches: master
https://developer.blender.org/rB66f1c3b882d59ea2b6600dfe9464c7c81e8c8483

DNA: replace GCC poison with ifdef for enums

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

M	source/blender/makesdna/DNA_armature_types.h
M	source/blender/makesdna/DNA_camera_types.h
M	source/blender/makesdna/DNA_image_types.h
M	source/blender/makesdna/DNA_mesh_types.h
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesdna/DNA_node_types.h
M	source/blender/makesdna/DNA_object_types.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesdna/DNA_sequence_types.h
M	source/blender/makesdna/DNA_smoke_types.h
M	source/blender/makesdna/DNA_sound_types.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesdna/DNA_world_types.h

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

diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 6b7e70f..b995e69 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -153,16 +153,15 @@ typedef enum eArmature_DeformFlag {
 	ARM_DEF_VGROUP			= (1<<0),
 	ARM_DEF_ENVELOPE		= (1<<1),
 	ARM_DEF_QUATERNION		= (1<<2),
+#ifdef DNA_DEPRECATED
 	ARM_DEF_B_BONE_REST		= (1<<3),	/* deprecated */
+#endif
 	ARM_DEF_INVERT_VGROUP	= (1<<4)
 } eArmature_DeformFlag;
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison ARM_DEF_B_BONE_REST
-#endif
-
 /* armature->pathflag */
 // XXX deprecated... old animation system (armature only viz)
+#ifdef DNA_DEPRECATED
 typedef enum eArmature_PathFlag {
 	ARM_PATH_FNUMS		= (1<<0),
 	ARM_PATH_KFRAS		= (1<<1),
@@ -170,9 +169,6 @@ typedef enum eArmature_PathFlag {
 	ARM_PATH_ACFRA		= (1<<3),
 	ARM_PATH_KFNOS		= (1<<4)
 } eArmature_PathFlag;
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison ARM_PATH_FNUMS ARM_PATH_KFRAS ARM_PATH_HEADS ARM_PATH_ACFRA ARM_PATH_KFNOS
 #endif
 
 /* armature->ghosttype */
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 6a9942a..c45322b 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -114,15 +114,13 @@ enum {
 	CAM_SHOWNAME            = (1 << 4),
 	CAM_ANGLETOGGLE         = (1 << 5),
 	CAM_DS_EXPAND           = (1 << 6),
+#ifdef DNA_DEPRECATED
 	CAM_PANORAMA            = (1 << 7), /* deprecated */
+#endif
 	CAM_SHOWSENSOR          = (1 << 8),
 	CAM_SHOW_SAFE_CENTER    = (1 << 9),
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison CAM_PANORAMA
-#endif
-
 /* yafray: dof sampling switch */
 /* #define CAM_YF_NO_QMC	512 */ /* deprecated */
 
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 0e2a41a..6088dcc 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -157,7 +157,9 @@ typedef struct Image {
 enum {
 	IMA_FIELDS              = (1 << 0),
 	IMA_STD_FIELD           = (1 << 1),
+#ifdef DNA_DEPRECATED
 	IMA_DO_PREMUL           = (1 << 2),  /* deprecated, should not be used */
+#endif
 	IMA_REFLECT             = (1 << 4),
 	IMA_NOCOLLECT           = (1 << 5),
 	//IMA_DONE_TAG          = (1 << 6),  // UNUSED
@@ -173,10 +175,6 @@ enum {
 	IMA_IS_MULTIVIEW        = (1 << 16), /* similar to stereo, but a more general case */
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison IMA_DO_PREMUL
-#endif
-
 /* Image.tpageflag */
 #define IMA_TILES			1
 #define IMA_TWINANIM		2
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 3799de0..39e5692 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -130,6 +130,7 @@ typedef struct Mesh {
 } Mesh;
 
 /* deprecated by MTFace, only here for file reading */
+#ifdef DNA_DEPRECATED
 typedef struct TFace {
 	void *tpage;	/* the faces image for the active UVLayer */
 	float uv[4][2];
@@ -137,9 +138,6 @@ typedef struct TFace {
 	char flag, transp;
 	short mode, tile, unwrap;
 } TFace;
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison TFace
 #endif
 
 /* **************** MESH ********************* */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 322df66..4db21b2 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -875,15 +875,13 @@ enum {
 	MOD_SOLIDIFY_EVEN           = (1 << 1),
 	MOD_SOLIDIFY_NORMAL_CALC    = (1 << 2),
 	MOD_SOLIDIFY_VGROUP_INV     = (1 << 3),
+#ifdef DNA_DEPRECATED
 	MOD_SOLIDIFY_RIM_MATERIAL   = (1 << 4),  /* deprecated, used in do_versions */
+#endif
 	MOD_SOLIDIFY_FLIP           = (1 << 5),
 	MOD_SOLIDIFY_NOSHELL        = (1 << 6),
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison MOD_SOLIDIFY_RIM_MATERIAL
-#endif
-
 typedef struct ScrewModifierData {
 	ModifierData modifier;
 
@@ -1252,12 +1250,10 @@ typedef struct TriangulateModifierData {
 	int pad;
 } TriangulateModifierData;
 
+#ifdef DNA_DEPRECATED
 enum {
 	MOD_TRIANGULATE_BEAUTY = (1 << 0), /* deprecated */
 };
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison MOD_TRIANGULATE_BEAUTY
 #endif
 
 /* Triangulate methods - NGons */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index bce1392..f17bf5a 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1024,15 +1024,13 @@ enum {
 
 /* subsurface */
 enum {
+#ifdef DNA_DEPRECATED
 	SHD_SUBSURFACE_COMPATIBLE		= 0, // Deprecated
+#endif
 	SHD_SUBSURFACE_CUBIC			= 1,
 	SHD_SUBSURFACE_GAUSSIAN			= 2,
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SHD_SUBSURFACE_COMPATIBLE
-#endif
-
 /* blur node */
 #define CMP_NODE_BLUR_ASPECT_NONE		0
 #define CMP_NODE_BLUR_ASPECT_Y			1
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index a9276fb..60547ab 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -381,8 +381,10 @@ enum {
 enum {
 	PARTYPE       = (1 << 4) - 1,
 	PAROBJECT     = 0,
-	PARCURVE      = 1,  /* Deprecated. */
-	PARKEY        = 2,  /* XXX Unused, deprecated? */
+#ifdef DNA_DEPRECATED
+	PARCURVE      = 1,
+#endif
+	// PARKEY        = 2,  /* UNUSED */
 
 	PARSKEL       = 4,
 	PARVERT1      = 5,
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 47fd1a4..a0b0cbe 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -873,15 +873,13 @@ typedef struct GameData {
 
 /* GameData.matmode */
 enum {
+#ifdef DNA_DEPRECATED
 	GAME_MAT_TEXFACE    = 0, /* deprecated */
+#endif
 	GAME_MAT_MULTITEX   = 1,
 	GAME_MAT_GLSL       = 2,
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison GAME_MAT_TEXFACE
-#endif
-
 /* GameData.lodflag */
 #define SCE_LOD_USE_HYST		(1 << 0)
 
@@ -1578,12 +1576,7 @@ enum {
 	/*R_COLOR_MANAGEMENT_PREDIVIDE    = (1 << 1)*/  /* deprecated, shouldn't be used */
 };
 
-#if 0  /* TODO */
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison R_COLOR_MANAGEMENT
-#endif
-#endif
-
+#ifdef DNA_DEPRECATED
 /* subimtype, flag options for imtype */
 enum {
 	R_OPENEXR_HALF	= 1,  /*deprecated*/
@@ -1598,10 +1591,6 @@ enum {
 	R_JPEG2K_CINE_PRESET	=     256,                                   /*deprecated*/
 	R_JPEG2K_CINE_48FPS		=     512,                                   /*deprecated*/
 };
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison R_OPENEXR_HALF R_OPENEXR_ZBUF R_PREVIEW_JPG R_CINEON_LOG R_TIFF_16BIT
-#pragma GCC poison R_JPEG2K_12BIT R_JPEG2K_16BIT R_JPEG2K_YCC R_JPEG2K_CINE_PRESET R_JPEG2K_CINE_48FPS
 #endif
 
 /* bake_mode: same as RE_BAKE_xxx defines */
@@ -1807,16 +1796,13 @@ typedef enum eVGroupSelect {
 #define AUDIO_VOLUME_ANIMATED     (1<<3)
 
 enum {
+#ifdef DNA_DEPRECATED
 	FFMPEG_MULTIPLEX_AUDIO  = 1,  /* deprecated, you can choose none as audiocodec now */
+#endif
 	FFMPEG_AUTOSPLIT_OUTPUT = 2,
 	FFMPEG_LOSSLESS_OUTPUT  = 4,
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison FFMPEG_MULTIPLEX_AUDIO
-#endif
-
-
 /* Paint.flags */
 typedef enum {
 	PAINT_SHOW_BRUSH = (1 << 0),
@@ -1839,10 +1825,12 @@ typedef enum SymmetryFlags {
 /* Sculpt.flags */
 /* These can eventually be moved to paint flags? */
 typedef enum SculptFlags {
+#ifdef DNA_DEPRECATED
 	/* deprecated, part of paint struct symmetry_flags now */
 	SCULPT_SYMM_X = (1 << 0),
 	SCULPT_SYMM_Y = (1 << 1),
 	SCULPT_SYMM_Z = (1 << 2),
+#endif
 
 	SCULPT_LOCK_X = (1 << 3),
 	SCULPT_LOCK_Y = (1 << 4),
@@ -1873,11 +1861,6 @@ typedef enum ImagePaintMode {
 	IMAGEPAINT_MODE_IMAGE,    /* select texture paint image directly */
 } ImagePaintMode;
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SCULPT_SYMM_X SCULPT_SYMM_Y SCULPT_SYMM_Z SCULPT_SYMMETRY_FEATHER
-#endif
-
-
 /* ImagePaintSettings.flag */
 #define IMAGEPAINT_DRAWING				1
 // #define IMAGEPAINT_DRAW_TOOL			2 // deprecated
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 7cf4d9f..377da2a 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -368,7 +368,9 @@ enum {
 	SEQ_OVERLAP                 = (1 << 3),
 	SEQ_FILTERY                 = (1 << 4),
 	SEQ_MUTE                    = (1 << 5),
+#ifdef DNA_DEPRECATED
 	SEQ_MAKE_PREMUL             = (1 << 6), /* deprecated, used for compatibility code only */
+#endif
 	SEQ_REVERSE_FRAMES          = (1 << 7),
 	SEQ_IPO_FRAME_LOCKED        = (1 << 8),
 	SEQ_EFFECT_NOT_LOADED       = (1 << 9),
@@ -406,10 +408,6 @@ enum {
 	SEQ_STORAGE_PROXY_CUSTOM_DIR    = (1 << 2), /* store proxy in custom file */
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SEQ_MAKE_PREMUL
-#endif
-
 /* convenience define for all selection flags */
 #define SEQ_ALLSEL  (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL)
 
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 25c98b4..5e01167 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -38,15 +38,13 @@ enum {
 	MOD_SMOKE_DISSOLVE = (1 << 2),  /* let smoke dissolve */
 	MOD_SMOKE_DISSOLVE_LOG = (1 << 3),  /* using 1/x for dissolve */
 
+#ifdef DNA_DEPRECATED
 	MOD_SMOKE_HIGH_SMOOTH = (1 << 5),  /* -- Deprecated -- */
+#endif
 	MOD_SMOKE_FILE_LOAD = (1 << 6),  /* flag for file load */
 	MOD_SMOKE_ADAPTIVE_DOMAIN = (1 << 7),
 };
 
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison MOD_SMOKE_HIGH_SMOOTH
-#endif
-
 /* noise */
 #define MOD_SMOKE_NOISEWAVE (1<<0)
 #define MOD_SMOKE_NOISEFFT (1<<1)
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index 811d78d..aefe1a7 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -117,16 +117,14 @@ enum {
 };
 
 enum {
+#ifdef DN

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list