Commit: cc9372b7e0f848405e37d51587916c4ec7f636a3 Author: Campbell Barton Date: Tue Dec 10 12:59:04 2013 +1100 http://developer.blender.org/rBcc9372b7e0f848405e37d51587916c4ec7f636a3
DNA Deprecation: add DNA_DEPRECATED_GCC_POISON for enum/structs. also fully remove freestyle raycasting_algorithm =================================================================== M source/blender/blenkernel/intern/freestyle.c M source/blender/blenkernel/intern/particle.c M source/blender/blenkernel/intern/smoke.c M source/blender/blenloader/intern/versioning_legacy.c M source/blender/makesdna/DNA_armature_types.h M source/blender/makesdna/DNA_camera_types.h M source/blender/makesdna/DNA_defs.h M source/blender/makesdna/DNA_freestyle_types.h M source/blender/makesdna/DNA_gpencil_types.h M source/blender/makesdna/DNA_image_types.h M source/blender/makesdna/DNA_mesh_types.h M source/blender/makesdna/DNA_meshdata_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_particle_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 M source/blender/makesrna/intern/rna_fluidsim.c M source/blender/makesrna/intern/rna_scene.c =================================================================== diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c index d87c933..3e0668b 100644 --- a/source/blender/blenkernel/intern/freestyle.c +++ b/source/blender/blenkernel/intern/freestyle.c @@ -83,7 +83,6 @@ void BKE_freestyle_config_copy(FreestyleConfig *new_config, FreestyleConfig *con FreestyleModuleConfig *module, *new_module; new_config->mode = config->mode; - new_config->raycasting_algorithm = config->raycasting_algorithm; /* deprecated */ new_config->flags = config->flags; new_config->sphere_radius = config->sphere_radius; new_config->dkr_epsilon = config->dkr_epsilon; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index a76b60f..b5825da 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3525,7 +3525,7 @@ ModifierData *object_add_particle_system(Scene *scene, Object *ob, const char *n BLI_addtail(&ob->modifiers, md); psys->totpart = 0; - psys->flag = PSYS_ENABLED | PSYS_CURRENT; + psys->flag = PSYS_CURRENT; psys->cfra = BKE_scene_frame_get_from_ctime(scene, CFRA + 1); DAG_relations_tag_update(G.main); diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 23f7dd6..b39f31b 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -536,7 +536,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd) smd->domain->time_scale = 1.0; smd->domain->vorticity = 2.0; smd->domain->border_collisions = SM_BORDER_OPEN; // open domain - smd->domain->flags = MOD_SMOKE_DISSOLVE_LOG | MOD_SMOKE_HIGH_SMOOTH; + smd->domain->flags = MOD_SMOKE_DISSOLVE_LOG; smd->domain->highres_sampling = SM_HRES_FULLSAMPLE; smd->domain->strength = 2.0; smd->domain->noise = MOD_SMOKE_NOISEWAVE; diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 067a862..e90a635 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -3079,7 +3079,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) part->id.flag |= (ob->id.flag & LIB_NEED_LINK); psys->totpart = 0; - psys->flag = PSYS_ENABLED|PSYS_CURRENT; + psys->flag = PSYS_CURRENT; BLI_addtail(&ob->particlesystem, psys); diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index e751966..b6d4a8c 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -30,6 +30,7 @@ #ifndef __DNA_ARMATURE_TYPES_H__ #define __DNA_ARMATURE_TYPES_H__ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" @@ -156,6 +157,10 @@ typedef enum eArmature_DeformFlag { 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) typedef enum eArmature_PathFlag { @@ -166,6 +171,10 @@ typedef enum eArmature_PathFlag { 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 */ // XXX deprecated... old animation system (armature only viz) typedef enum eArmature_GhostType { diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 1ece25c..c99494c 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -73,38 +73,50 @@ typedef struct Camera { /* **************** CAMERA ********************* */ /* type */ -#define CAM_PERSP 0 -#define CAM_ORTHO 1 -#define CAM_PANO 2 +enum { + CAM_PERSP = 0, + CAM_ORTHO = 1, + CAM_PANO = 2, +}; /* dtx */ -#define CAM_DTX_CENTER 1 -#define CAM_DTX_CENTER_DIAG 2 -#define CAM_DTX_THIRDS 4 -#define CAM_DTX_GOLDEN 8 -#define CAM_DTX_GOLDEN_TRI_A 16 -#define CAM_DTX_GOLDEN_TRI_B 32 -#define CAM_DTX_HARMONY_TRI_A 64 -#define CAM_DTX_HARMONY_TRI_B 128 +enum { + CAM_DTX_CENTER = (1 << 0), + CAM_DTX_CENTER_DIAG = (1 << 1), + CAM_DTX_THIRDS = (1 << 2), + CAM_DTX_GOLDEN = (1 << 3), + CAM_DTX_GOLDEN_TRI_A = (1 << 4), + CAM_DTX_GOLDEN_TRI_B = (1 << 5), + CAM_DTX_HARMONY_TRI_A = (1 << 6), + CAM_DTX_HARMONY_TRI_B = (1 << 7), +}; /* flag */ -#define CAM_SHOWLIMITS 1 -#define CAM_SHOWMIST 2 -#define CAM_SHOWPASSEPARTOUT 4 -#define CAM_SHOWTITLESAFE 8 -#define CAM_SHOWNAME 16 -#define CAM_ANGLETOGGLE 32 -#define CAM_DS_EXPAND 64 -#define CAM_PANORAMA 128 /* deprecated */ -#define CAM_SHOWSENSOR 256 +enum { + CAM_SHOWLIMITS = (1 << 0), + CAM_SHOWMIST = (1 << 1), + CAM_SHOWPASSEPARTOUT = (1 << 2), + CAM_SHOWTITLESAFE = (1 << 3), + CAM_SHOWNAME = (1 << 4), + CAM_ANGLETOGGLE = (1 << 5), + CAM_DS_EXPAND = (1 << 6), + CAM_PANORAMA = (1 << 7), /* deprecated */ + CAM_SHOWSENSOR = (1 << 8), +}; + +#if (DNA_DEPRECATED_GCC_POISON == 1) +#pragma GCC poison CAM_PANORAMA +#endif /* yafray: dof sampling switch */ /* #define CAM_YF_NO_QMC 512 */ /* deprecated */ /* Sensor fit */ -#define CAMERA_SENSOR_FIT_AUTO 0 -#define CAMERA_SENSOR_FIT_HOR 1 -#define CAMERA_SENSOR_FIT_VERT 2 +enum { + CAMERA_SENSOR_FIT_AUTO = 0, + CAMERA_SENSOR_FIT_HOR = 1, + CAMERA_SENSOR_FIT_VERT = 2, +}; #define DEFAULT_SENSOR_WIDTH 32.0f #define DEFAULT_SENSOR_HEIGHT 18.0f diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h index 842543d..fc9dd8f 100644 --- a/source/blender/makesdna/DNA_defs.h +++ b/source/blender/makesdna/DNA_defs.h @@ -44,6 +44,20 @@ # endif #endif + +/* poison pragma */ +#ifdef DNA_DEPRECATED_ALLOW +# define DNA_DEPRECATED_GCC_POISON 0 +#else + /* enable the pragma if we can */ +# ifdef __GNUC__ +# define DNA_DEPRECATED_GCC_POISON 1 +# else +# define DNA_DEPRECATED_GCC_POISON 0 +# endif +#endif + + /* hrmf, we need a better include then this */ #include "../blenlib/BLI_sys_types.h" /* needed for int64_t only! */ diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index db16fa3..195c7eb 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -32,6 +32,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_listBase.h" #ifdef __cplusplus @@ -126,7 +127,7 @@ typedef struct FreestyleConfig { ListBase modules; int mode; /* scripting, editor */ - int raycasting_algorithm; /* XXX deprecated */ + int raycasting_algorithm DNA_DEPRECATED; int flags; /* suggestive contours, ridges/valleys, material boundaries */ float sphere_radius; float dkr_epsilon; diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index b64fc08..2bf874d 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -147,14 +147,14 @@ typedef struct bGPdata { // XXX many of these flags should be deprecated for more general ideas in 2.5 /* don't allow painting to occur at all */ // XXX is deprecated - not well understood -#define GP_DATA_LMBPLOCK (1<<0) +// #define GP_DATA_LMBPLOCK (1<<0) /* show debugging info in viewport (i.e. status print) */ #define GP_DATA_DISPINFO (1<<1) /* in Action Editor, show as expanded channel */ #define GP_DATA_EXPAND (1<<2) /* is the block overriding all clicks? */ // XXX is deprecated - nasty old concept -#define GP_DATA_EDITPAINT (1<<3) +// #define GP_DATA_EDITPAINT (1<<3) /* new strokes are added in viewport space */ #define GP_DATA_VIEWALIGN (1<<4) /* Project into the screens Z values */ diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index dae520f..6b0299e 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -32,6 +32,7 @@ #ifndef __DNA_IMAGE_TYPES_H__ #define __DNA_IMAGE_TYPES_H__ +#include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_color_types.h" /* for color management */ @@ -122,18 +123,24 @@ typedef struct Image { /* **************** IMAGE ********************* */ /* Image.flag */ -#define IMA_FIELDS 1 -#define IMA_STD_FIELD 2 -#define IMA_DO_PREMUL 4 /* deprecated, should not be used */ -#define IMA_REFLECT 16 -#define IMA_NOCOLLECT 32 -// #define IMA_DONE_TAG 64 // UNUSED -#define IMA_OLD_PREMUL 128 -/*#define IMA_CM_PREDIVIDE 256*/ /* deprecated, should not be used */ -#define IMA_USED_FOR_RENDER 512 -#define IMA_USER_FRAME_IN_RANGE 1024 /* for image user, but these flags are mixed */ -#define IMA_VIEW_AS_RENDER 2048 -#define IMA_IGNORE_ALPHA 4096 +enum { + IMA_FIELDS = (1 << 0), + IMA_STD_FIELD = (1 << 1), + IMA_DO_PREMUL = (1 << 2), /* deprecated, should not be used */ + IMA_REFLECT = (1 << 4), + IMA_NOCOLLECT = (1 << 5), + //IMA_DONE_TAG = (1 << 6), // UNUSED + IMA_OLD_PREMUL = (1 << 7), + // IMA_CM_PREDIVIDE = (1 << 8), /* deprecated, should not be used */ + IMA_USED_FOR_RENDER = (1 << 9), + IMA_USER_FRAME_IN_RANGE = (1 << 10), /* for image user, but these flags are mixed */ + IMA_VIEW_AS_RENDER = (1 << 11), + IMA_IGNORE_ALPHA = (1 << 12), +}; + +#if (DNA_DEPRECATED_GCC_POISON == 1) +#pragma GCC poison IMA_DO_PREMUL +#endif /* Image.tpageflag */ #define IMA_TILES 1 diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 7cdb792..b942197 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -140,6 +140,10 @@ typedef struct TFace { short mode, tile, unwrap; } TFace; +#if (DNA_DEPRECATED_GCC_POISON == 1) +#pragma GCC poison TFace +#endif + /* **************** MESH ********************* */ /* texfl @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs