diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-04 10:05:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-04 10:05:48 +0400 |
commit | 31ff21d735cb2abeb3bee1b2efcfd49801dbb2f6 (patch) | |
tree | 00f4a63f6ee6fedf8ed2eb93046e393519a6b752 /source/blender | |
parent | 3fdc28b736fc6bbdfec9075b0fdd458897786a59 (diff) |
add define for deprecated DNA struct members: DNA_DEPRECATED,
this means use of deprecated struct members gives a warning.
- makesdna.c preprocessor skips this.
- DNA_DEPRECATED_ALLOW is used so readfile.c can do versioning without warnings.
- this exposes some use of deprecated struct members, will deal with this after.
Diffstat (limited to 'source/blender')
28 files changed, 174 insertions, 91 deletions
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index e52b5b89aa0..21c6ad66f16 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -38,6 +38,7 @@ set(SRC_DNA_INC ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_controller_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_curve_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_customdata_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_defs.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_documentation.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_dynamicpaint_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_effect_types.h diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 034f4a96879..622ec093a3f 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -43,7 +43,8 @@ #include <string.h> #include <stddef.h> -#include "MEM_guardedalloc.h" +/* since we have versioning code here */ +#define DNA_DEPRECATED_ALLOW #include "DNA_anim_types.h" #include "DNA_constraint_types.h" @@ -73,6 +74,7 @@ #include "BKE_nla.h" #include "BKE_sequencer.h" +#include "MEM_guardedalloc.h" /* *************************************************** */ /* Old-Data Freeing Tools */ diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index ae0774eb34f..458fb895b64 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -32,6 +32,9 @@ #include "MEM_guardedalloc.h" +/* for reading old multires */ +#define DNA_DEPRECATED_ALLOW + #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a78a70eb403..c80b062463d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -48,6 +48,9 @@ #include "BLI_winstuff.h" #endif +/* allow readfile to use deprecated functionality */ +#define DNA_DEPRECATED_ALLOW + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_actuator_types.h" diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index a77a34e05ec..414d3344511 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -40,6 +40,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "DNA_defs.h" #include "DNA_meta_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index b198231df3a..7dce437e543 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -582,7 +582,7 @@ typedef struct SpaceAction { short blockhandler[8]; - View2D v2d; /* depricated, copied to region */ + View2D v2d DNA_DEPRECATED; /* copied to region */ bAction *action; /* the currently active action */ bDopeSheet ads; /* the currently active context (when not showing action) */ diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 292f920da66..ff04a7fd366 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -31,6 +31,8 @@ * \ingroup DNA */ +#include "DNA_defs.h" + #include "DNA_ID.h" #ifdef __cplusplus @@ -59,7 +61,7 @@ typedef struct Camera { The name was not changed so that no other files need to be modified */ float YF_dofdist; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Object *dof_ob; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index c85ef72d337..4aff540a948 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -33,6 +33,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_listBase.h" @@ -66,7 +67,7 @@ typedef struct bConstraint { float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/ int pad; - struct Ipo *ipo; /* local influence ipo or driver */ // XXX depreceated for 2.5... old animation system hack + struct Ipo *ipo DNA_DEPRECATED; /* local influence ipo or driver */ /* old animation system, deprecated for 2.5 */ /* below are readonly fields that are set at runtime by the solver for use in the GE (only IK atm) */ float lin_error; /* residual error on constraint expressed in blender unit*/ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 236d6dd4732..8214a32e9fb 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_vec_types.h" #include "DNA_ID.h" @@ -174,7 +175,7 @@ typedef struct Curve { EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */ struct Object *bevobj, *taperobj, *textoncurve; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ Path *path; struct Key *key; struct Material **mat; diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h new file mode 100644 index 00000000000..88401d3d2d4 --- /dev/null +++ b/source/blender/makesdna/DNA_defs.h @@ -0,0 +1,45 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Campbell Barton + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef DNA_DEFS_H +#define DNA_DEFS_H + +/** \file DNA_defs.h + * \ingroup DNA + */ + +/* makesdna ignores */ +#ifdef DNA_DEPRECATED_ALLOW + /* allow use of deprecated items */ +# define DNA_DEPRECATED +#else +# ifndef DNA_DEPRECATED +# ifdef __GNUC__ +# define DNA_DEPRECATED __attribute__ ((deprecated)) +# else + /* TODO, msvc & others */ +# define DNA_DEPRECATED +# endif +# endif +#endif + +#endif /* DNA_DEFS_H */ diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index 105aa4280ef..12fb9b92602 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" @@ -62,10 +63,10 @@ typedef struct Key { KeyBlock *refkey; char elemstr[32]; int elemsize; - float curval; + float curval DNA_DEPRECATED; ListBase block; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ ID *from; @@ -93,4 +94,3 @@ typedef struct Key { #define KEYBLOCK_LOCKED (1<<2) #endif - diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 91930f5766e..1c22583b82c 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_ID.h" #ifndef MAX_MTEX @@ -97,7 +98,7 @@ typedef struct Lamp { short sky_colorspace; char pad4[6]; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct MTex *mtex[18]; /* MAX_MTEX */ short pr_texture, use_nodes; char pad6[4]; diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h index f694e611089..baa2f5f911a 100644 --- a/source/blender/makesdna/DNA_lattice_types.h +++ b/source/blender/makesdna/DNA_lattice_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_ID.h" struct AnimData; @@ -60,7 +61,7 @@ typedef struct Lattice { struct BPoint *def; - struct Ipo *ipo; /* XXX: depreceated... old animation system */ + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Key *key; struct MDeformVert *dvert; diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index ea168d953bc..3e1cdd08086 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_listBase.h" @@ -150,7 +151,7 @@ typedef struct Material { struct MTex *mtex[18]; /* MAX_MTEX */ struct bNodeTree *nodetree; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Group *group; /* light group */ struct PreviewImage * preview; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index bb67b46a7e5..b7d9208e595 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" #include "DNA_customdata_types.h" @@ -57,7 +58,7 @@ typedef struct Mesh { struct BoundBox *bb; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Key *key; struct Material **mat; @@ -92,13 +93,13 @@ typedef struct Mesh { short texflag, drawflag; short smoothresh, flag; - short subdiv, subdivr; - char subsurftype; /* only kept for backwards compat, not used anymore */ + short subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED; + char subsurftype DNA_DEPRECATED; /* only kept for backwards compat, not used anymore */ char editflag; short totcol; - struct Multires *mr; /* deprecated multiresolution modeling data, only keep for loading old files */ + struct Multires *mr DNA_DEPRECATED; /* deprecated multiresolution modeling data, only keep for loading old files */ struct PartialVisibility *pv; } Mesh; diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index 12345ede3c4..1ce90e7d526 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -70,7 +70,7 @@ typedef struct MetaBall { ListBase elems; ListBase disp; ListBase *editelems; /* not saved in files, note we use pointer for editmode check */ - struct Ipo *ipo; // XXX... depreceated (old animation system) + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /* material of the mother ball will define the material used of all others */ struct Material **mat; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 4abbbd7146d..5edc0869d9b 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -25,6 +25,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_listBase.h" @@ -238,7 +239,7 @@ typedef struct ArrayModifierData { typedef struct MirrorModifierData { ModifierData modifier; - short axis; /* deprecated, use flag instead */ + short axis DNA_DEPRECATED; /* deprecated, use flag instead */ short flag; float tolerance; struct Object *mirror_ob; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 8f22b1b31cb..845d8a87c5b 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -91,7 +91,7 @@ typedef struct bNodeSocket { /* internal data to retrieve relations and groups */ int own_index; /* group socket identifiers, to find matching pairs after reading files */ - int to_index; /* XXX deprecated, only used for restoring old group node links */ + int to_index DNA_DEPRECATED; /* XXX deprecated, only used for restoring old group node links */ struct bNodeSocket *groupsock; struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index d96b1034614..f5d327f50da 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -32,6 +32,7 @@ * \brief Object is a sort of wrapper for general info. */ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" #include "DNA_action_types.h" /* bAnimVizSettings */ @@ -110,10 +111,10 @@ typedef struct Object { /* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */ /* proxy_from is set in target back to the proxy. */ struct Object *proxy, *proxy_group, *proxy_from; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /* struct Path *path; */ struct BoundBox *bb; - struct bAction *action; // XXX depreceated... old animation system + struct bAction *action DNA_DEPRECATED; // XXX depreceated... old animation system struct bAction *poselib; struct bPose *pose; /* pose data, armature objects only */ void *data; /* pointer to objects data - an 'ID' or NULL */ @@ -123,8 +124,8 @@ typedef struct Object { bAnimVizSettings avs; /* settings for visualisation of object-transform animation */ bMotionPath *mpath; /* motion path cache for this object */ - ListBase constraintChannels; // XXX depreceated... old animation system - ListBase effect; // XXX depreceated... keep for readfile + ListBase constraintChannels DNA_DEPRECATED; // XXX depreceated... old animation system + ListBase effect DNA_DEPRECATED; // XXX depreceated... keep for readfile ListBase disp; /* list of DispList, used by lattice, metaballs curve & surfaces */ ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */ ListBase modifiers; /* list of ModifierData structures */ @@ -141,7 +142,7 @@ typedef struct Object { /* rot en drot have to be together! (transform('r' en 's')) */ float loc[3], dloc[3], orig[3]; float size[3]; /* scale infact */ - float dsize[3]; /* DEPRECATED, 2.60 and older only */ + float dsize[3] DNA_DEPRECATED ; /* DEPRECATED, 2.60 and older only */ float dscale[3]; /* ack!, changing */ float rot[3], drot[3]; /* euler rotation */ float quat[4], dquat[4]; /* quaternion rotation */ @@ -163,7 +164,7 @@ typedef struct Object { int pad6; short flag; /* copy of Base */ - short colbits; /* deprecated */ + short colbits DNA_DEPRECATED; /* deprecated */ short transflag, protectflag; /* transformation settings and transform locks */ short trackflag, upflag; @@ -233,8 +234,8 @@ typedef struct Object { float anisotropicFriction[3]; ListBase constraints; /* object constraints */ - ListBase nlastrips; // XXX depreceated... old animation system - ListBase hooks; // XXX depreceated... old animation system + ListBase nlastrips DNA_DEPRECATED; // XXX depreceated... old animation system + ListBase hooks DNA_DEPRECATED; // XXX depreceated... old animation system ListBase particlesystem; /* particle systems */ struct PartDeflect *pd; /* particle deflector/attractor/collision data */ diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 11a6460b1fc..c56d771d3b3 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -32,6 +32,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_boid_types.h" @@ -225,10 +226,10 @@ typedef struct ParticleSettings { struct Group *dup_group; struct ListBase dupliweights; - struct Group *eff_group; // deprecated + struct Group *eff_group DNA_DEPRECATED; // deprecated struct Object *dup_ob; struct Object *bb_ob; - struct Ipo *ipo; // xxx depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct PartDeflect *pd; struct PartDeflect *pd2; } ParticleSettings; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index faacde9e44f..d8d3f05ce01 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -31,6 +31,8 @@ * \ingroup DNA */ +#include "DNA_defs.h" + // XXX, temp feature - campbell #define DURIAN_CAMERA_SWITCH @@ -331,11 +333,11 @@ typedef struct RenderData { /** For UR edge rendering: give the edges this color */ float edgeR, edgeG, edgeB; - short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5 - short depth, attrib; /* standalone player */ // XXX deprecated since 2.5 + short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED, freqplay DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5 + short depth DNA_DEPRECATED, attrib DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5 int frame_step; /* frames to jump during render/playback */ - short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5 + short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5 short dimensionspreset; /* for the dimensions presets menu */ @@ -360,7 +362,7 @@ typedef struct RenderData { */ short yparts; - short planes, imtype, subimtype, quality; /*deprecated!*/ + short planes DNA_DEPRECATED, imtype DNA_DEPRECATED, subimtype DNA_DEPRECATED, quality DNA_DEPRECATED; /*deprecated!*/ /** * Render to image editor, fullscreen or to new window. @@ -388,7 +390,7 @@ typedef struct RenderData { short raytrace_structure; /* renderer (deprecated) */ - short renderer; + short renderer DNA_DEPRECATED; /* octree resolution */ short ocres; @@ -434,7 +436,7 @@ typedef struct RenderData { /* color management settings - color profiles, gamma correction, etc */ int color_mgt_flag; - /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */ + /** post-production settings. deprecated, but here for upwards compat (initialized to 1) */ float postgamma, posthue, postsat; /* Dither noise intensity */ @@ -473,19 +475,19 @@ typedef struct RenderData { float simplify_aosss; /* cineon */ - short cineonwhite, cineonblack; /*deprecated*/ - float cineongamma; /*deprecated*/ + short cineonwhite DNA_DEPRECATED, cineonblack DNA_DEPRECATED; /*deprecated*/ + float cineongamma DNA_DEPRECATED; /*deprecated*/ /* jpeg2000 */ - short jp2_preset, jp2_depth; /*deprecated*/ + short jp2_preset DNA_DEPRECATED, jp2_depth DNA_DEPRECATED; /*deprecated*/ int rpad3; /* Dome variables */ // XXX deprecated since 2.5 - short domeres, domemode; // XXX deprecated since 2.5 - short domeangle, dometilt; // XXX deprecated since 2.5 - float domeresbuf; // XXX deprecated since 2.5 - float pad2; // XXX deprecated since 2.5 - struct Text *dometext; // XXX deprecated since 2.5 + short domeres DNA_DEPRECATED, domemode DNA_DEPRECATED; // XXX deprecated since 2.5 + short domeangle DNA_DEPRECATED, dometilt DNA_DEPRECATED; // XXX deprecated since 2.5 + float domeresbuf DNA_DEPRECATED; // XXX deprecated since 2.5 + float pad2; + struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5 /* render engine */ char engine[32]; @@ -744,7 +746,7 @@ typedef struct VPaint { #define VP_NORMALS 8 #define VP_SPRAY 16 -// #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X) +// #define VP_MIRROR_X 32 // deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X) #define VP_ONLYVGROUP 128 @@ -956,7 +958,7 @@ typedef struct Scene { ListBase keyingsets; /* KeyingSets for the given frame */ /* Game Settings */ - struct GameFraming framing; // XXX deprecated since 2.5 + struct GameFraming framing DNA_DEPRECATED; // XXX deprecated since 2.5 struct GameData gm; /* Units */ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 399ae0208bd..ce01f100239 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -32,6 +32,7 @@ * \author nzc */ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -142,7 +143,7 @@ typedef struct Sequence { Strip *strip; - struct Ipo *ipo; // xxx depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Scene *scene; struct Object *scene_camera; /* override scene camera */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 01bb6a5235e..649b849ea5e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -32,6 +32,7 @@ * \author nzc */ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_color_types.h" /* for Histogram */ #include "DNA_vec_types.h" @@ -76,17 +77,17 @@ typedef struct SpaceLink { struct SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; /* XXX depricate this */ - short blockhandler[8]; /* XXX depricate this */ + float blockscale DNA_DEPRECATED; /* XXX make deprecated */ + short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */ } SpaceLink; typedef struct SpaceInfo { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; /* XXX depricate this */ + short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */ char rpt_mask; char pad[7]; @@ -107,10 +108,10 @@ typedef struct SpaceIpo { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; - View2D v2d; /* deprecated, copied to region */ + short blockhandler[8] DNA_DEPRECATED; + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */ @@ -128,13 +129,13 @@ typedef struct SpaceButs { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; struct RenderInfo *ri; - View2D v2d; /* deprecated, copied to region */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ short mainb, mainbo, mainbuser; /* context tabs */ short re_align, align; /* align for panels */ @@ -153,19 +154,19 @@ typedef struct SpaceSeq { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; - View2D v2d; /* deprecated, copied to region */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - float xof, yof; /* deprecated: offset for drawing the image preview */ + float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */ short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */ short render_size; short chanshown; short zebra; int flag; - float zoom; /* deprecated, handled by View2D now */ + float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */ int view; /* see SEQ_VIEW_* below */ int pad; @@ -232,11 +233,11 @@ typedef struct SpaceOops { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; - View2D v2d; /* deprecated, copied to region */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ ListBase tree; struct TreeStore *treestore; @@ -283,25 +284,25 @@ typedef struct SpaceNla { struct SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; short autosnap; /* this uses the same settings as autosnap for Action Editor */ short flag; int pad; struct bDopeSheet *ads; - View2D v2d; /* deprecated, copied to region */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ } SpaceNla; typedef struct SpaceText { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; struct Text *text; @@ -352,7 +353,7 @@ typedef struct SpaceScript { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; struct Script *script; short flags, menunr; @@ -372,14 +373,16 @@ typedef struct SpaceTime { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - View2D v2d; /* deprecated, copied to region */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ ListBase caches; int cache_display, pad; - int flag, redraws; /* redraws is deprecated... moved to screen */ + int flag; + + int redraws DNA_DEPRECATED; /* redraws is deprecated... moved to screen */ } SpaceTime; @@ -387,11 +390,11 @@ typedef struct SpaceNode { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; - View2D v2d; /* deprecated, copied to region */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ struct ID *id, *from; /* context, no need to save in file? well... pinning... */ short flag, menunr; /* menunr: browse id block in header */ @@ -433,9 +436,9 @@ typedef struct SpaceLogic { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; + float blockscale DNA_DEPRECATED; - short blockhandler[8]; + short blockhandler[8] DNA_DEPRECATED; short flag, scaflag; int pad; @@ -467,9 +470,9 @@ typedef struct SpaceConsole { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; // XXX are these needed? + float blockscale DNA_DEPRECATED; // XXX are these needed? - short blockhandler[8]; // XXX are these needed? + short blockhandler[8] DNA_DEPRECATED; // XXX are these needed? /* space vars */ int lheight, pad; diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 6a4a9970b40..cb545d2ee73 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -33,6 +33,7 @@ * \author nzc */ +#include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_image_types.h" /* ImageUser */ @@ -263,7 +264,7 @@ typedef struct Tex { struct ImageUser iuser; struct bNodeTree *nodetree; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Image *ima; struct PluginTex *plugin; struct ColorBand *coba; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 6c359f2c040..4f6c7e22f5e 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -356,7 +356,7 @@ typedef struct UserDef { struct ListBase themes; struct ListBase uifonts; struct ListBase uistyles; - struct ListBase keymaps; /* deprecated in favor of user_keymaps */ + struct ListBase keymaps DNA_DEPRECATED; /* deprecated in favor of user_keymaps */ struct ListBase user_keymaps; struct ListBase addons; char keyconfigstr[64]; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 50136fdcc99..51ee8f63df5 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -55,6 +55,7 @@ struct wmTimer; #define far clipend #endif +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_image_types.h" #include "DNA_movieclip_types.h" @@ -150,8 +151,9 @@ typedef struct View3D { int spacetype; float blockscale; short blockhandler[8]; - - float viewquat[4], dist; /* XXX depricated */ + + float viewquat[4] DNA_DEPRECATED; + float dist DNA_DEPRECATED; float bundle_size; /* size of bundles in reconstructed data */ short bundle_drawtype; /* display style for bundle */ @@ -160,13 +162,13 @@ typedef struct View3D { unsigned int lay_used; /* used while drawing */ - short persp; /* XXX depricated */ - short view; /* XXX depricated */ + short persp DNA_DEPRECATED; + short view DNA_DEPRECATED; struct Object *camera, *ob_centre; struct ListBase bgpicbase; - struct BGpic *bgpic; /* deprecated, use bgpicbase, only kept for do_versions(...) */ + struct BGpic *bgpic DNA_DEPRECATED; /* deprecated, use bgpicbase, only kept for do_versions(...) */ struct View3D *localvd; /* allocated backup of its self while in localview */ @@ -185,7 +187,7 @@ typedef struct View3D { float lens, grid; float near, far; - float ofs[3]; /* XXX deprecated */ + float ofs[3] DNA_DEPRECATED; /* XXX deprecated */ float cursor[3]; short modeselect; @@ -208,8 +210,8 @@ typedef struct View3D { void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */ - /* XXX depricated? */ - struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */ + /* XXX deprecated? */ + struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */ } View3D; diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 0c455022db4..1e8a4574120 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -31,6 +31,7 @@ * \ingroup DNA */ +#include "DNA_defs.h" #include "DNA_ID.h" struct AnimData; @@ -96,7 +97,7 @@ typedef struct World { float misi, miststa, mistdist, misthi; - float starr, starg, starb, stark; /* Deprecated */ + float starr DNA_DEPRECATED, starg DNA_DEPRECATED, starb DNA_DEPRECATED, stark DNA_DEPRECATED; /* Deprecated */ float starsize, starmindist; float stardist, starcolnoise; @@ -119,7 +120,7 @@ typedef struct World { float *aosphere, *aotables; - struct Ipo *ipo; // XXX depreceated... old animation system + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct MTex *mtex[18]; /* MAX_MTEX */ short pr_texture, use_nodes, pad[2]; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index b9bd2c073bf..11ab9b1efcf 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -475,6 +475,13 @@ static int preprocess_include(char *maindata, int len) if(comment); else if( cp[0]==' ' && cp[1]==' ' ); else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers with a space */ + + /* skip special keywords */ + else if (strncmp("DNA_DEPRECATED", cp, 14)==0) { + /* single values are skipped already, so decrement 1 less */ + a -= 13; + cp += 13; + } else { md[0]= cp[0]; md++; |