diff options
author | Joseph Eagar <joeedh@gmail.com> | 2011-02-27 09:19:40 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2011-02-27 09:19:40 +0300 |
commit | f01261d040be27337db9f9996d648a279c89b7c4 (patch) | |
tree | c448230939b3c90d53ce8852dd00925d6052e3a4 /source/blender/makesdna | |
parent | dcaeda5c4e3a0687251b8511de4f2e8b85ef75c0 (diff) | |
parent | 2198cfdb2deec8b2e85e242c74a032f43d0b26ca (diff) |
merge with/from trunk at r35190
Diffstat (limited to 'source/blender/makesdna')
64 files changed, 1063 insertions, 776 deletions
diff --git a/source/blender/makesdna/CMakeLists.txt b/source/blender/makesdna/CMakeLists.txt index cb61082000d..e02b33b92c1 100644 --- a/source/blender/makesdna/CMakeLists.txt +++ b/source/blender/makesdna/CMakeLists.txt @@ -24,4 +24,4 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(intern) +add_subdirectory(intern) diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 49c2df42810..267283ee47a 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -1,8 +1,4 @@ -/** - * blenlib/DNA_ID.h (mar-2001 nzc) - * - * ID and Library types, which are fundamental for sdna, - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -33,6 +29,11 @@ #ifndef DNA_ID_H #define DNA_ID_H +/** \file DNA_ID.h + * \ingroup DNA + * \brief ID and Library types, which are fundamental for sdna. + */ + #include "DNA_listBase.h" #ifdef __cplusplus @@ -127,8 +128,9 @@ typedef struct Library { #define PREVIEW_MIPMAP_LARGE 1 typedef struct PreviewImage { + /* All values of 2 are really PREVIEW_MIPMAPS */ unsigned int w[2]; - unsigned int h[2]; + unsigned int h[2]; short changed[2]; short changed_timestamp[2]; unsigned int * rect[2]; @@ -199,6 +201,11 @@ typedef struct PreviewImage { #define ID_REAL_USERS(id) (((ID *)id)->us - ((((ID *)id)->flag & LIB_FAKEUSER) ? 1:0)) +#ifdef GS +#undef GS +#endif +#define GS(a) (*((short *)(a))) + /* id->flag: set frist 8 bits always at zero while reading */ #define LIB_LOCAL 0 #define LIB_EXTERN 1 @@ -215,6 +222,8 @@ typedef struct PreviewImage { #define LIB_DOIT 1024 /* tag existing data before linking so we know what is new */ #define LIB_PRE_EXISTING 2048 +/* runtime */ +#define LIB_ID_RECALC 4096 #ifdef __cplusplus } diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index f7bbf9235ab..1618da90392 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -27,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file DNA_action_types.h + * \ingroup DNA + */ + #ifndef DNA_ACTION_TYPES_H #define DNA_ACTION_TYPES_H @@ -56,7 +60,7 @@ typedef struct bMotionPathVert { /* bMotionPathVert->flag */ typedef enum eMotionPathVert_Flag { /* vert is selected */ - MOTIONPATH_VERT_SEL = (1<<0), + MOTIONPATH_VERT_SEL = (1<<0) } eMotionPathVert_Flag; /* ........ */ @@ -79,7 +83,7 @@ typedef enum eMotionPath_Flag { /* (for bones) path represents the head of the bone */ MOTIONPATH_FLAG_BHEAD = (1<<0), /* motion path is being edited */ - MOTIONPATH_FLAG_EDIT = (1<<1), + MOTIONPATH_FLAG_EDIT = (1<<1) } eMotionPath_Flag; /* Visualisation General --------------------------- */ @@ -114,7 +118,7 @@ typedef struct bAnimVizSettings { /* bAnimVizSettings->recalc */ typedef enum eAnimViz_RecalcFlags { /* motionpaths need recalculating */ - ANIMVIZ_RECALC_PATHS = (1<<0), + ANIMVIZ_RECALC_PATHS = (1<<0) } eAnimViz_RecalcFlags; @@ -127,13 +131,13 @@ typedef enum eOnionSkin_Types { /* show ghosts within the specified frame range */ GHOST_TYPE_RANGE, /* show ghosts on keyframes within the specified range only */ - GHOST_TYPE_KEYS, + GHOST_TYPE_KEYS } eOnionSkin_Types; /* bAnimVizSettings->ghost_flag */ typedef enum eOnionSkin_Flag { /* only show selected bones in ghosts */ - GHOST_FLAG_ONLYSEL = (1<<0), + GHOST_FLAG_ONLYSEL = (1<<0) } eOnionSkin_Flag; @@ -142,7 +146,7 @@ typedef enum eMotionPaths_Types { /* show the paths along their entire ranges */ MOTIONPATH_TYPE_RANGE = 0, /* only show the parts of the paths around the current frame */ - MOTIONPATH_TYPE_ACFRA, + MOTIONPATH_TYPE_ACFRA } eMotionPath_Types; /* bAnimVizSettings->path_viewflag */ @@ -154,7 +158,7 @@ typedef enum eMotionPaths_ViewFlag { /* show keyframe/frame numbers */ MOTIONPATH_VIEW_KFNOS = (1<<2), /* find keyframes in whole action (instead of just in matching group name) */ - MOTIONPATH_VIEW_KFACT = (1<<3), + MOTIONPATH_VIEW_KFACT = (1<<3) } eMotionPath_ViewFlag; /* bAnimVizSettings->path_bakeflag */ @@ -164,7 +168,7 @@ typedef enum eMotionPaths_BakeFlag { /* for bones - calculate head-points for curves instead of tips */ MOTIONPATH_BAKE_HEADS = (1<<1), /* motion paths exist for AnimVizSettings instance - set when calc for first time, and unset when clearing */ - MOTIONPATH_BAKE_HAS_PATHS = (1<<2), + MOTIONPATH_BAKE_HAS_PATHS = (1<<2) } eMotionPath_BakeFlag; /* ************************************************ */ @@ -188,7 +192,7 @@ typedef struct bPoseChannel { short flag; /* dynamic, for detecting transform changes */ short constflag; /* for quick detecting which constraints affect this channel */ short ikflag; /* settings for IK bones */ - short selectflag; /* copy of bone flag, so you can work with library armatures */ + short selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ short protectflag; /* protect channels from being transformed */ short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ @@ -203,12 +207,10 @@ typedef struct bPoseChannel { struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */ struct ListBase iktree; /* only while evaluating pose */ - /* only while deform, stores precalculated b_bone deform mats, - dual quaternions */ - void *b_bone_mats; - void *dual_quat; - void *b_bone_dual_quats; - + bMotionPath *mpath; /* motion path cache for this bone */ + struct Object *custom; /* draws custom object instead of default bone shape */ + struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. needed in rare cases for advanced rigs, since the alternative is highly complicated - campbell */ + /* transforms - written in by actions or transform */ float loc[3]; float size[3]; @@ -234,9 +236,6 @@ typedef struct bPoseChannel { float iklinweight; /* weight of joint stretch constraint */ float *path; /* totpath x 3 x float */ // XXX depreceated... old animation system (armature only viz) - bMotionPath *mpath; /* motion path cache for this bone */ - struct Object *custom; /* draws custom object instead of default bone shape */ - struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. needed in rare cases for advanced rigs, since the alternative is highly complicated - campbell */ } bPoseChannel; @@ -265,7 +264,7 @@ typedef enum ePchan_Flag { /* has Spline IK */ POSE_HAS_IKS = (1<<14), /* spline IK solving */ - POSE_IKSPLINE = (1<<15), + POSE_IKSPLINE = (1<<15) } ePchan_Flag; /* PoseChannel constflag (constraint detection) */ @@ -278,7 +277,7 @@ typedef enum ePchan_ConstFlag { /* only for drawing Posemode too */ PCHAN_HAS_STRIDE = (1<<4), /* spline IK */ - PCHAN_HAS_SPLINEIK = (1<<5), + PCHAN_HAS_SPLINEIK = (1<<5) } ePchan_ConstFlag; /* PoseChannel->ikflag */ @@ -296,7 +295,7 @@ typedef enum ePchan_IkFlag { BONE_IK_NO_XDOF_TEMP = (1<<10), BONE_IK_NO_YDOF_TEMP = (1<<11), - BONE_IK_NO_ZDOF_TEMP = (1<<12), + BONE_IK_NO_ZDOF_TEMP = (1<<12) } ePchan_IkFlag; /* PoseChannel->rotmode and Object->rotmode */ @@ -314,9 +313,11 @@ typedef enum eRotationModes { /* NOTE: space is reserved here for 18 other possible * euler rotation orders not implemented */ - ROT_MODE_MAX, /* sentinel for Py API */ /* axis angle rotations */ - ROT_MODE_AXISANGLE = -1 + ROT_MODE_AXISANGLE = -1, + + ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */ + ROT_MODE_MAX = ROT_MODE_ZYX } eRotationModes; /* Pose ------------------------------------ */ @@ -330,7 +331,9 @@ typedef struct bPose { ListBase chanbase; /* list of pose channels, PoseBones in RNA */ struct GHash *chanhash; /* ghash for quicker string lookups */ - short flag, proxy_layer; /* proxy layer: copy from armature, gets synced */ + short flag, pad; + unsigned int proxy_layer; /* proxy layer: copy from armature, gets synced */ + int pad1; float ctime; /* local action time of this pose */ float stride_offset[3]; /* applied to object */ @@ -364,7 +367,7 @@ typedef enum ePose_Flags { /* set by armature_rebuild_pose to give a chance to the IK solver to rebuild IK tree */ POSE_WAS_REBUILT = (1<<5), /* set by game_copy_pose to indicate that this pose is used in the game engine */ - POSE_GAME_ENGINE = (1<<6), + POSE_GAME_ENGINE = (1<<6) } ePose_Flags; /* IK Solvers ------------------------------------ */ @@ -372,7 +375,7 @@ typedef enum ePose_Flags { /* bPose->iksolver and bPose->ikparam->iksolver */ typedef enum ePose_IKSolverType { IKSOLVER_LEGACY = 0, - IKSOLVER_ITASC, + IKSOLVER_ITASC } ePose_IKSolverType; /* header for all bPose->ikparam structures */ @@ -401,7 +404,7 @@ typedef enum eItasc_Flags { ITASC_AUTO_STEP = (1<<0), ITASC_INITIAL_REITERATION = (1<<1), ITASC_REITERATION = (1<<2), - ITASC_SIMULATION = (1<<3), + ITASC_SIMULATION = (1<<3) } eItasc_Flags; /* bItasc->solver */ @@ -425,7 +428,7 @@ typedef enum eItasc_Solver { * ensure that action-groups never end up being the sole 'owner' of a channel. * * This is also exploited for bone-groups. Bone-Groups are stored per bPose, and are used - * primarily to colour bones in the 3d-view. There are other benefits too, but those are mostly related + * primarily to color bones in the 3d-view. There are other benefits too, but those are mostly related * to Action-Groups. */ typedef struct bActionGroup { @@ -496,7 +499,7 @@ typedef enum eAction_Flags { /* flags for evaluation/editing */ ACT_MUTED = (1<<9), ACT_PROTECTED = (1<<10), - ACT_DISABLED = (1<<11), + ACT_DISABLED = (1<<11) } eAction_Flags; @@ -533,7 +536,7 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_NOSHAPEKEYS = (1<<6), ADS_FILTER_NOMESH = (1<<7), ADS_FILTER_NOOBJ = (1<<8), /* for animdata on object level, if we only want to concentrate on materials/etc. */ - // NOTE: there are a few more spaces for datablock filtering here... + ADS_FILTER_NOLAT = (1<<9), ADS_FILTER_NOCAM = (1<<10), ADS_FILTER_NOMAT = (1<<11), ADS_FILTER_NOLAM = (1<<12), @@ -553,12 +556,12 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_INCL_HIDDEN = (1<<26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */ /* combination filters (some only used at runtime) */ - ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM), + ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM) } eDopeSheet_FilterFlag; /* DopeSheet general flags */ typedef enum eDopeSheet_Flag { - ADS_FLAG_SUMMARY_COLLAPSED = (1<<0), /* when summary is shown, it is collapsed, so all other channels get hidden */ + ADS_FLAG_SUMMARY_COLLAPSED = (1<<0) /* when summary is shown, it is collapsed, so all other channels get hidden */ } eDopeSheet_Flag; @@ -596,9 +599,9 @@ typedef enum eSAction_Flag { SACTION_NOTRANSKEYCULL = (1<<4), /* don't include keyframes that are out of view */ //SACTION_HORIZOPTIMISEON = (1<<5), // XXX depreceated... old irrelevant trick - /* hack for moving pose-markers (temp flag) */ - SACTION_POSEMARKERS_MOVE = (1<<6), - /* don't draw action channels using group colours (where applicable) */ + /* show pose-markers (local to action) in Action Editor mode */ + SACTION_POSEMARKERS_SHOW = (1<<6), + /* don't draw action channels using group colors (where applicable) */ SACTION_NODRAWGCOLORS = (1<<7), // XXX depreceated... irrelevant for current groups implementation /* don't draw current frame number beside frame indicator */ SACTION_NODRAWCFRANUM = (1<<8), @@ -607,7 +610,7 @@ typedef enum eSAction_Flag { /* don't perform realtime updates */ SACTION_NOREALTIMEUPDATES = (1<<10), /* move markers as well as keyframes */ - SACTION_MARKERS_MOVE = (1<<11), + SACTION_MARKERS_MOVE = (1<<11) } eSAction_Flag; /* SpaceAction Mode Settings */ @@ -619,7 +622,7 @@ typedef enum eAnimEdit_Context { /* editing of gpencil data */ SACTCONT_GPENCIL, /* dopesheet (default) */ - SACTCONT_DOPESHEET, + SACTCONT_DOPESHEET } eAnimEdit_Context; /* SpaceAction AutoSnap Settings (also used by other Animation Editors) */ @@ -631,7 +634,7 @@ typedef enum eAnimEdit_AutoSnap { /* snap to actual frames/seconds (nla-action time) */ SACTSNAP_FRAME, /* snap to nearest marker */ - SACTSNAP_MARKER, + SACTSNAP_MARKER } eAnimEdit_AutoSnap; @@ -670,7 +673,7 @@ typedef enum ACHAN_FLAG { ACHAN_EXPANDED = (1<<4), ACHAN_SHOWIPO = (1<<5), ACHAN_SHOWCONS = (1<<6), - ACHAN_MOVED = (1<<31), + ACHAN_MOVED = (1<<31) } ACHAN_FLAG; #endif diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 76bb9a5f96f..683d8142cc9 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_actuator_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file DNA_actuator_types.h + * \ingroup DNA + */ + #ifndef DNA_ACTUATOR_TYPES_H #define DNA_ACTUATOR_TYPES_H @@ -48,7 +51,7 @@ typedef struct bAddObjectActuator { typedef struct bActionActuator { struct bAction *act; /* Pointer to action */ short type, flag; /* Playback type */ // not in use - int sta, end; /* Start & End frames */ + float sta, end; /* Start & End frames */ char name[32]; /* For property-driven playback */ char frameProp[32]; /* Set this property to the actions current frame */ short blendin; /* Number of frames of blending */ @@ -112,14 +115,14 @@ typedef struct bObjectActuator { short damping; float forceloc[3], forcerot[3]; float pad[3], pad1[3]; - float dloc[3], drot[3]; + float dloc[3], drot[3]; /* angle in radians */ float linearvelocity[3], angularvelocity[3]; struct Object *reference; } bObjectActuator; typedef struct bIpoActuator { short flag, type; - int sta, end; + float sta, end; char name[32]; char frameProp[32]; /* Set this property to the actions current frame */ @@ -227,14 +230,14 @@ typedef struct bActuator { struct bActuator *next, *prev, *mynew; short type; /** - * Tells what type of actuator data <data> holds. + * Tells what type of actuator data \ref data holds. */ short flag; short otype, go; char name[32]; /** - * Data must point to an object actuator type struct. + * data must point to an object actuator type struct. */ void *data; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 8c2fc7db390..31e02ff1877 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,10 @@ #ifndef DNA_ANIM_TYPES_H #define DNA_ANIM_TYPES_H +/** \file DNA_anim_types.h + * \ingroup DNA + */ + #ifdef __cplusplus extern "C" { #endif @@ -88,7 +92,7 @@ typedef enum eFModifier_Flags { /* modifier is active one (in UI) for editing purposes */ FMODIFIER_FLAG_ACTIVE = (1<<2), /* user wants modifier to be skipped */ - FMODIFIER_FLAG_MUTED = (1<<3), + FMODIFIER_FLAG_MUTED = (1<<3) } eFModifier_Flags; /* --- */ @@ -109,7 +113,7 @@ typedef struct FMod_Generator { /* generator modes */ typedef enum eFMod_Generator_Modes { FCM_GENERATOR_POLYNOMIAL = 0, - FCM_GENERATOR_POLYNOMIAL_FACTORISED, + FCM_GENERATOR_POLYNOMIAL_FACTORISED } eFMod_Generator_Modes; @@ -118,7 +122,7 @@ typedef enum eFMod_Generator_Modes { */ typedef enum eFMod_Generator_Flags { /* generator works in conjunction with other modifiers (i.e. doesn't replace those before it) */ - FCM_GENERATOR_ADDITIVE = (1<<0), + FCM_GENERATOR_ADDITIVE = (1<<0) } eFMod_Generator_Flags; @@ -149,7 +153,7 @@ typedef enum eFMod_Generator_Functions { FCM_GENERATOR_FN_TAN, FCM_GENERATOR_FN_SQRT, FCM_GENERATOR_FN_LN, - FCM_GENERATOR_FN_SINC, + FCM_GENERATOR_FN_SINC } eFMod_Generator_Functions; @@ -186,7 +190,7 @@ typedef enum eFMod_Cycling_Modes { FCM_EXTRAPOLATE_NONE = 0, /* don't do anything */ FCM_EXTRAPOLATE_CYCLIC, /* repeat keyframe range as-is */ FCM_EXTRAPOLATE_CYCLIC_OFFSET, /* repeat keyframe range, but with offset based on gradient between values */ - FCM_EXTRAPOLATE_MIRROR, /* alternate between forward and reverse playback of keyframe range */ + FCM_EXTRAPOLATE_MIRROR /* alternate between forward and reverse playback of keyframe range */ } eFMod_Cycling_Modes; @@ -209,7 +213,7 @@ typedef enum eFMod_Limit_Flags { FCM_LIMIT_XMIN = (1<<0), FCM_LIMIT_XMAX = (1<<1), FCM_LIMIT_YMIN = (1<<2), - FCM_LIMIT_YMAX = (1<<3), + FCM_LIMIT_YMAX = (1<<3) } eFMod_Limit_Flags; @@ -229,7 +233,7 @@ typedef enum eFMod_Noise_Modifications { FCM_NOISE_MODIF_REPLACE = 0, /* Modify existing curve, matching it's shape */ FCM_NOISE_MODIF_ADD, /* Add noise to the curve */ FCM_NOISE_MODIF_SUBTRACT, /* Subtract noise from the curve */ - FCM_NOISE_MODIF_MULTIPLY, /* Multiply the curve by noise */ + FCM_NOISE_MODIF_MULTIPLY /* Multiply the curve by noise */ } eFMod_Noise_Modifications; @@ -379,7 +383,7 @@ typedef enum eDriver_Types { /* smallest value */ DRIVER_TYPE_MIN, /* largest value */ - DRIVER_TYPE_MAX, + DRIVER_TYPE_MAX } eDriver_Types; /* driver flags */ @@ -396,7 +400,7 @@ typedef enum eDriver_Flags { /* the names are cached so they dont need have python unicode versions created each time */ DRIVER_FLAG_RENAMEVAR = (1<<4), /* intermediate values of driver should be shown in the UI for debugging purposes */ - DRIVER_FLAG_SHOWDEBUG = (1<<5), + DRIVER_FLAG_SHOWDEBUG = (1<<5) } eDriver_Flags; /* F-Curves -------------------------------------- */ @@ -465,19 +469,22 @@ typedef enum eFCurve_Flags { FCURVE_INT_VALUES = (1<<11), /* curve can only have certain discrete-number values (no interpolation at all, for enums/booleans) */ FCURVE_DISCRETE_VALUES = (1<<12), + + /* temporary tag for editing */ + FCURVE_TAGGED = (1<<15) } eFCurve_Flags; /* extrapolation modes (only simple value 'extending') */ typedef enum eFCurve_Extend { FCURVE_EXTRAPOLATE_CONSTANT = 0, /* just extend min/max keyframe value */ - FCURVE_EXTRAPOLATE_LINEAR, /* just extend gradient of segment between first segment keyframes */ + FCURVE_EXTRAPOLATE_LINEAR /* just extend gradient of segment between first segment keyframes */ } eFCurve_Extend; /* curve coloring modes */ typedef enum eFCurve_Coloring { FCURVE_COLOR_AUTO_RAINBOW = 0, /* automatically determine color using rainbow (calculated at drawtime) */ FCURVE_COLOR_AUTO_RGB, /* automatically determine color using XYZ (array index) <-> RGB */ - FCURVE_COLOR_CUSTOM, /* custom color */ + FCURVE_COLOR_CUSTOM /* custom color */ } eFCurve_Coloring; /* ************************************************ */ @@ -572,7 +579,7 @@ typedef enum eNlaStrip_Blend_Mode { NLASTRIP_MODE_REPLACE = 0, NLASTRIP_MODE_ADD, NLASTRIP_MODE_SUBTRACT, - NLASTRIP_MODE_MULTIPLY, + NLASTRIP_MODE_MULTIPLY } eNlaStrip_Blend_Mode; /* NLA Strip Extrpolation Mode */ @@ -582,7 +589,7 @@ typedef enum eNlaStrip_Extrapolate_Mode { /* only hold+extend last frame */ NLASTRIP_EXTEND_HOLD_FORWARD, /* don't contribute at all */ - NLASTRIP_EXTEND_NOTHING, + NLASTRIP_EXTEND_NOTHING } eNlaStrip_Extrapolate_Mode; /* NLA Strip Settings */ @@ -619,7 +626,7 @@ typedef enum eNlaStrip_Flag { /* temporary editing flags */ /* NLA-Strip is really just a temporary meta used to facilitate easier transform code */ NLASTRIP_FLAG_TEMP_META = (1<<30), - NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31), + NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31) } eNlaStrip_Flag; /* NLA Strip Type */ @@ -629,7 +636,7 @@ typedef enum eNlaStrip_Type { /* 'transition' - blends between the adjacent strips */ NLASTRIP_TYPE_TRANSITION, /* 'meta' - a strip which acts as a container for a few others */ - NLASTRIP_TYPE_META, + NLASTRIP_TYPE_META } eNlaStrip_Type; /* NLA Tracks ------------------------------------- */ @@ -666,7 +673,7 @@ typedef enum eNlaTrack_Flag { NLATRACK_PROTECTED = (1<<4), /* track is not allowed to execute, usually as result of tweaking being enabled (internal flag) */ - NLATRACK_DISABLED = (1<<10), + NLATRACK_DISABLED = (1<<10) } eNlaTrack_Flag; @@ -702,7 +709,7 @@ typedef struct KS_Path { /* KS_Path->flag */ typedef enum eKSP_Settings { /* entire array (not just the specified index) gets keyframed */ - KSP_FLAG_WHOLE_ARRAY = (1<<0), + KSP_FLAG_WHOLE_ARRAY = (1<<0) } eKSP_Settings; /* KS_Path->groupmode */ @@ -716,26 +723,9 @@ typedef enum eKSP_Grouping { /* path should be grouped using name of inner-most context item from templates * - this is most useful for relative KeyingSets only */ - KSP_GROUP_TEMPLATE_ITEM, + KSP_GROUP_TEMPLATE_ITEM } eKSP_Grouping; -/* KS_Path->templates (Template Flags) - * - * Templates in paths are used to substitute information from the - * active context into relavent places in the path strings. This - * enum here defines the flags which define which templates are - * required by a path before it can be used - */ -typedef enum eKSP_TemplateTypes { - KSP_TEMPLATE_OBJECT = (1<<0), /* #obj - selected object */ - KSP_TEMPLATE_PCHAN = (1<<1), /* #pch - selected posechannel */ - KSP_TEMPLATE_CONSTRAINT = (1<<2), /* #con - active only */ - KSP_TEMPLATE_NODE = (1<<3), /* #nod - selected node */ - KSP_TEMPLATE_MODIFIER = (1<<4), /* #mod - active only */ - - KSP_TEMPLATE_ROT = (1<<16), /* modify rotation paths based on rotation mode of Object or Pose Channel */ -} eKSP_TemplateTypes; - /* ---------------- */ /* KeyingSet definition (ks) @@ -767,7 +757,7 @@ typedef enum eKS_Settings { /* keyingset cannot be removed (and doesn't need to be freed) */ KEYINGSET_BUILTIN = (1<<0), /* keyingset does not depend on context info (i.e. paths are absolute) */ - KEYINGSET_ABSOLUTE = (1<<1), + KEYINGSET_ABSOLUTE = (1<<1) } eKS_Settings; /* Flags for use by keyframe creation/deletion calls */ @@ -777,7 +767,7 @@ typedef enum eInsertKeyFlags { INSERTKEY_FAST = (1<<2), /* don't recalculate handles,etc. after adding key */ INSERTKEY_FASTR = (1<<3), /* don't realloc mem (or increase count, as array has already been set out) */ INSERTKEY_REPLACE = (1<<4), /* only replace an existing keyframe (this overrides INSERTKEY_NEEDED) */ - INSERTKEY_XYZ2RGB = (1<<5), /* transform F-Curves should have XYZ->RGB color mode */ + INSERTKEY_XYZ2RGB = (1<<5) /* transform F-Curves should have XYZ->RGB color mode */ } eInsertKeyFlags; /* ************************************************ */ @@ -874,14 +864,14 @@ typedef enum eAnimData_Flag { ADT_UI_ACTIVE = (1<<15), /* F-Curves from this AnimData block are not visible in the Graph Editor */ - ADT_CURVES_NOT_VISIBLE = (1<<16), + ADT_CURVES_NOT_VISIBLE = (1<<16) } eAnimData_Flag; /* Animation Data recalculation settings (to be set by depsgraph) */ typedef enum eAnimData_Recalc { ADT_RECALC_DRIVERS = (1<<0), ADT_RECALC_ANIM = (1<<1), - ADT_RECALC_ALL = (ADT_RECALC_DRIVERS|ADT_RECALC_ANIM), + ADT_RECALC_ALL = (ADT_RECALC_DRIVERS|ADT_RECALC_ANIM) } eAnimData_Recalc; /* Base Struct for Anim ------------------------------------- */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index f7533ff9bde..3547101612f 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,10 @@ #ifndef DNA_ARMATURE_TYPES_H #define DNA_ARMATURE_TYPES_H +/** \file DNA_armature_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_ID.h" @@ -57,8 +61,9 @@ typedef struct Bone { int flag; float arm_head[3]; - float arm_tail[3]; /* head/tail and roll in Armature Space (rest pos) */ + float arm_tail[3]; /* head/tail in Armature Space (rest pos) */ float arm_mat[4][4]; /* matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest pos*/ + float arm_roll; /* roll in Armature Space (rest pos) */ float dist, weight; /* dist, weight: for non-deformgroup deforms */ float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */ @@ -68,7 +73,7 @@ typedef struct Bone { float size[3]; /* patch for upward compat, UNUSED! */ int layer; /* layers that bone appears on */ short segments; /* for B-bones */ - short pad[3]; + short pad[1]; } Bone; typedef struct bArmature { @@ -79,6 +84,12 @@ typedef struct bArmature { ListBase chainbase; ListBase *edbo; /* editbone listbase, we use pointer so we can check state */ + /* active bones should work like active object where possible + * - active and selection are unrelated + * - active & hidden is not allowed + * - from the user perspective active == last selected + * - active should be ignored when not visible (hidden layer) */ + Bone *act_bone; /* active bone (when not in editmode) */ void *act_edbone; /* active editbone (in editmode) */ @@ -89,9 +100,8 @@ typedef struct bArmature { short deformflag; short pathflag; - int pad; - - int layer, layer_protected; /* for buttons to work, both variables in this order together */ + unsigned int layer_used; /* for UI, to show which layers are there */ + unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */ // XXX depreceated... old animaton system (armature only viz) --- short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */ @@ -116,7 +126,7 @@ typedef enum eArmature_Flag { ARM_MIRROR_EDIT = (1<<8), ARM_AUTO_IK = (1<<9), ARM_NO_CUSTOM = (1<<10), /* made option negative, for backwards compat */ - ARM_COL_CUSTOM = (1<<11), /* draw custom colours */ + ARM_COL_CUSTOM = (1<<11), /* draw custom colors */ ARM_GHOST_ONLYSEL = (1<<12), /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ // XXX depreceated ARM_DS_EXPAND = (1<<13) } eArmature_Flag; @@ -180,7 +190,9 @@ typedef enum eBone_Flag { BONE_EDITMODE_LOCKED = (1<<19), /* bone transforms are locked in EditMode */ BONE_TRANSFORM_CHILD = (1<<20), /* Indicates that a parent is also being transformed */ BONE_UNSELECTABLE = (1<<21), /* bone cannot be selected */ - BONE_NO_LOCAL_LOCATION = (1<<22), /* bone location is in armature space */ + BONE_NO_LOCAL_LOCATION = (1<<22) /* bone location is in armature space */ } eBone_Flag; +#define MAXBONENAME 32 + #endif diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index 8584b5f99e9..8ce6b0cc2bb 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -1,6 +1,4 @@ -/* DNA_particle_types.h - * - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -32,6 +30,10 @@ #ifndef DNA_BOID_TYPES_H #define DNA_BOID_TYPES_H +/** \file DNA_boid_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" typedef enum BoidRuleType { @@ -104,6 +106,8 @@ typedef enum BoidMode { eBoidMode_Liftoff, NUM_BOID_MODES } BoidMode; + + typedef struct BoidData { float health, acc[3]; short state_id, mode; @@ -187,8 +191,8 @@ typedef struct BoidState { typedef struct BoidSettings { int options, last_state_id; - float landing_smoothness, rt; - float banking, height; + float landing_smoothness, height; + float banking, pitch; float health, aggression; float strength, accuracy, range; diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 1492319fe22..3d143dc3d0f 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +30,11 @@ #ifndef DNA_BRUSH_TYPES_H #define DNA_BRUSH_TYPES_H +/** \file DNA_brush_types.h + * \ingroup DNA + */ + + #include "DNA_ID.h" #include "DNA_texture_types.h" /* for MTex */ @@ -80,13 +85,14 @@ typedef struct Brush { char sculpt_tool; /* active sculpt tool */ char vertexpaint_tool; /* active vertex/weight paint tool/blend mode */ char imagepaint_tool; /* active image paint tool */ - char pad3; + char pad3[5]; float autosmooth_factor; float crease_pinch_factor; float plane_trim; + float height; /* affectable height of brush (layer height for layer tool, i.e.) */ float texture_sample_bias; int texture_overlay_alpha; @@ -127,6 +133,10 @@ typedef struct Brush { #define BRUSH_FRONTFACE (1<<27) #define BRUSH_CUSTOM_ICON (1<<28) +/* temporary flag which sets up autmatically for correct + brush drawing when inverted modal operator is running */ +#define BRUSH_INVERTED (1<<29) + /* Brush.sculpt_tool */ #define SCULPT_TOOL_DRAW 1 #define SCULPT_TOOL_SMOOTH 2 diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 3a9c7b22cde..4ebd7318ea8 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_camera_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_CAMERA_TYPES_H #define DNA_CAMERA_TYPES_H +/** \file DNA_camera_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #ifdef __cplusplus @@ -78,7 +80,7 @@ typedef struct Camera { #define CAM_PANORAMA 128 /* yafray: dof sampling switch */ -#define CAM_YF_NO_QMC 512 +/* #define CAM_YF_NO_QMC 512 */ /* depreceated */ #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 9b9f0ede526..1f78366287f 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +29,10 @@ #ifndef DNA_CLOTH_TYPES_H #define DNA_CLOTH_TYPES_H +/** \file DNA_cloth_types.h + * \ingroup DNA + */ + /** * This struct contains all the global data required to run a simulation. * At the time of this writing, this structure contains data appropriate diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index 3c1ef478626..8a556c4b87a 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -1,5 +1,4 @@ -/** - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +29,10 @@ #ifndef DNA_COLOR_TYPES_H #define DNA_COLOR_TYPES_H +/** \file DNA_color_types.h + * \ingroup DNA + */ + #include "DNA_vec_types.h" /* general defines for kernel functions */ diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index dbd9be14c0e..1d752fce4ef 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +31,10 @@ #ifndef DNA_CONSTRAINT_TYPES_H #define DNA_CONSTRAINT_TYPES_H +/** \file DNA_constraint_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #include "DNA_listBase.h" @@ -94,7 +98,7 @@ typedef struct bConstraintTarget { /* bConstraintTarget -> flag */ typedef enum B_CONSTRAINT_TARGET_FLAG { - CONSTRAINT_TAR_TEMP = (1<<0), /* temporary target-struct that needs to be freed after use */ + CONSTRAINT_TAR_TEMP = (1<<0) /* temporary target-struct that needs to be freed after use */ } B_CONSTRAINT_TARGET_FLAG; /* bConstraintTarget/bConstraintOb -> type */ @@ -476,7 +480,7 @@ typedef enum eBConstraint_SpaceTypes { /* for posechannels - local with parent */ CONSTRAINT_SPACE_PARLOCAL, /* = 3 */ /* for files from between 2.43-2.46 (should have been parlocal) */ - CONSTRAINT_SPACE_INVALID, /* = 4. do not exchange for anything! */ + CONSTRAINT_SPACE_INVALID /* = 4. do not exchange for anything! */ } eBConstraint_SpaceTypes; /* bConstraintChannel.flag */ @@ -496,7 +500,7 @@ typedef enum eCopyRotation_Flags { ROTLIKE_X_INVERT = (1<<4), ROTLIKE_Y_INVERT = (1<<5), ROTLIKE_Z_INVERT = (1<<6), - ROTLIKE_OFFSET = (1<<7), + ROTLIKE_OFFSET = (1<<7) } eCopyRotation_Flags; /* bLocateLikeConstraint.flag */ @@ -509,7 +513,7 @@ typedef enum eCopyLocation_Flags { LOCLIKE_X_INVERT = (1<<4), LOCLIKE_Y_INVERT = (1<<5), LOCLIKE_Z_INVERT = (1<<6), - LOCLIKE_OFFSET = (1<<7), + LOCLIKE_OFFSET = (1<<7) } eCopyLocation_Flags; /* bSizeLikeConstraint.flag */ @@ -517,50 +521,50 @@ typedef enum eCopyScale_Flags { SIZELIKE_X = (1<<0), SIZELIKE_Y = (1<<1), SIZELIKE_Z = (1<<2), - SIZELIKE_OFFSET = (1<<3), + SIZELIKE_OFFSET = (1<<3) } eCopyScale_Flags; /* bSameVolumeConstraint.flag */ typedef enum eSameVolume_Modes { SAMEVOL_X = 0, SAMEVOL_Y, - SAMEVOL_Z, + SAMEVOL_Z } eSameVolume_Modes; /* Locked-Axis Values (Locked Track) */ typedef enum eLockAxis_Modes { LOCK_X = 0, LOCK_Y, - LOCK_Z, + LOCK_Z } eLockAxis_Modes; /* Up-Axis Values (TrackTo and Locked Track) */ typedef enum eUpAxis_Modes { UP_X = 0, UP_Y, - UP_Z, + UP_Z } eUpAxis_Modes; -/* Tracking axis (TrackTo, Locked Track, Damped Track) */ +/* Tracking axis (TrackTo, Locked Track, Damped Track) and minmax (floor) constraint */ typedef enum eTrackToAxis_Modes { TRACK_X = 0, TRACK_Y, TRACK_Z, TRACK_nX, TRACK_nY, - TRACK_nZ, + TRACK_nZ } eTrackToAxis_Modes; /* FollowPath flags */ typedef enum eFollowPath_Flags { FOLLOWPATH_FOLLOW = (1<<0), FOLLOWPATH_STATIC = (1<<1), - FOLLOWPATH_RADIUS = (1<<2), + FOLLOWPATH_RADIUS = (1<<2) } eFollowPath_Flags; /* bTrackToConstraint->flags */ typedef enum eTrackTo_Flags { - TARGET_Z_UP = (1<<0), + TARGET_Z_UP = (1<<0) } eTrackTo_Flags; /* Strech To Constraint -> volmode */ @@ -568,14 +572,14 @@ typedef enum eStretchTo_VolMode { VOLUME_XZ = 0, VOLUME_X, VOLUME_Z, - NO_VOLUME, + NO_VOLUME } eStretchTo_VolMode; /* Stretch To Constraint -> plane mode */ typedef enum eStretchTo_PlaneMode { PLANE_X = 0, PLANE_Y, - PLANE_Z, + PLANE_Z } eStretchTo_PlaneMode; /* Clamp-To Constraint ->flag */ @@ -583,12 +587,12 @@ typedef enum eClampTo_Modes { CLAMPTO_AUTO = 0, CLAMPTO_X, CLAMPTO_Y, - CLAMPTO_Z, + CLAMPTO_Z } eClampTo_Modes; /* ClampTo Constraint ->flag2 */ typedef enum eClampTo_Flags { - CLAMPTO_CYCLIC = (1<<0), + CLAMPTO_CYCLIC = (1<<0) } eClampTo_Flags; /* bKinematicConstraint->flag */ @@ -611,7 +615,7 @@ typedef enum eKinematic_Flags { CONSTRAINT_IK_NO_ROT_Y = (1<<12), CONSTRAINT_IK_NO_ROT_Z = (1<<13), /* axis relative to target */ - CONSTRAINT_IK_TARGETAXIS = (1<<14), + CONSTRAINT_IK_TARGETAXIS = (1<<14) } eKinematic_Flags; /* bSplineIKConstraint->flag */ @@ -625,7 +629,7 @@ typedef enum eSplineIK_Flags { /* evenly distribute the bones along the path regardless of length */ CONSTRAINT_SPLINEIK_EVENSPLITS = (1<<3), /* don't adjust the x and z scaling of the bones by the curve radius */ - CONSTRAINT_SPLINEIK_NO_CURVERAD = (1<<4), + CONSTRAINT_SPLINEIK_NO_CURVERAD = (1<<4) } eSplineIK_Flags; /* bSplineIKConstraint->xzScaleMode */ @@ -635,14 +639,14 @@ typedef enum eSplineIK_XZScaleModes { /* bones in the chain should take their x/z scales from the original scaling */ CONSTRAINT_SPLINEIK_XZS_ORIGINAL, /* x/z scales are the inverse of the y-scale */ - CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC, + CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC } eSplineIK_XZScaleModes; /* MinMax (floor) flags */ typedef enum eFloor_Flags { MINMAX_STICKY = (1<<0), MINMAX_STUCK = (1<<1), - MINMAX_USEROT = (1<<2), + MINMAX_USEROT = (1<<2) } eFloor_Flags; /* transform limiting constraints -> flag2 */ @@ -650,7 +654,7 @@ typedef enum eTransformLimits_Flags2 { /* not used anymore - for older Limit Location constraints only */ LIMIT_NOPARENT = (1<<0), /* for all Limit constraints - allow to be used during transform? */ - LIMIT_TRANSFORM = (1<<1), + LIMIT_TRANSFORM = (1<<1) } eTransformLimits_Flags2; /* transform limiting constraints -> flag (own flags) */ @@ -660,33 +664,33 @@ typedef enum eTransformLimits_Flags { LIMIT_YMIN = (1<<2), LIMIT_YMAX = (1<<3), LIMIT_ZMIN = (1<<4), - LIMIT_ZMAX = (1<<5), + LIMIT_ZMAX = (1<<5) } eTransformLimits_Flags; /* limit rotation constraint -> flag (own flags) */ typedef enum eRotLimit_Flags { LIMIT_XROT = (1<<0), LIMIT_YROT = (1<<1), - LIMIT_ZROT = (1<<2), + LIMIT_ZROT = (1<<2) } eRotLimit_Flags; /* distance limit constraint */ /* bDistLimitConstraint->flag */ typedef enum eDistLimit_Flag { - LIMITDIST_USESOFT = (1<<0), + LIMITDIST_USESOFT = (1<<0) } eDistLimit_Flag; /* bDistLimitConstraint->mode */ typedef enum eDistLimit_Modes { LIMITDIST_INSIDE = 0, LIMITDIST_OUTSIDE, - LIMITDIST_ONSURFACE, + LIMITDIST_ONSURFACE } eDistLimit_Modes; /* python constraint -> flag */ typedef enum ePyConstraint_Flags { PYCON_USETARGETS = (1<<0), - PYCON_SCRIPTERROR = (1<<1), + PYCON_SCRIPTERROR = (1<<1) } ePyConstraint_Flags; /* ChildOf Constraint -> flag */ @@ -700,6 +704,7 @@ typedef enum eChildOf_Flags { CHILDOF_SIZEX = (1<<6), CHILDOF_SIZEY = (1<<7), CHILDOF_SIZEZ = (1<<8), + CHILDOF_ALL = 511 } eChildOf_Flags; /* Pivot Constraint */ @@ -720,7 +725,7 @@ typedef enum ePivotConstraint_Axis { /* consider +ve y-axis rotations */ PIVOTCON_AXIS_Y, /* consider +ve z-axis rotations */ - PIVOTCON_AXIS_Z, + PIVOTCON_AXIS_Z } ePivotConstraint_Axis; /* settings for Pivot Constraint in general */ @@ -728,7 +733,7 @@ typedef enum ePivotConstraint_Flag { /* offset is to be interpreted as being a fixed-point in space */ PIVOTCON_FLAG_OFFSET_ABS = (1<<0), /* rotation-based activation uses negative rotation to drive result */ - PIVOTCON_FLAG_ROTACT_NEG = (1<<1), + PIVOTCON_FLAG_ROTACT_NEG = (1<<1) } ePivotConstraint_Flag; /* Rigid-Body Constraint */ diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h index fcd5587b14b..e48386e5c4e 100644 --- a/source/blender/makesdna/DNA_controller_types.h +++ b/source/blender/makesdna/DNA_controller_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_controller_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_CONTROLLER_TYPES_H #define DNA_CONTROLLER_TYPES_H +/** \file DNA_controller_types.h + * \ingroup DNA + */ + struct bActuator; struct Text; struct bSensor; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 8537b703c69..b51612037fc 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -1,8 +1,4 @@ -/** - * blenlib/DNA_curve_types.h (mar-2001 nzc) - * - * Curve stuff. - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -33,6 +29,10 @@ #ifndef DNA_CURVE_TYPES_H #define DNA_CURVE_TYPES_H +/** \file DNA_curve_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_vec_types.h" #include "DNA_ID.h" @@ -63,8 +63,8 @@ typedef struct PathPoint { # # typedef struct Path { - int len; struct PathPoint *data; + int len; float totdist; } Path; @@ -141,7 +141,7 @@ typedef struct Nurb { typedef struct CharInfo { short kern; - short mat_nr; + short mat_nr; /* index start at 1, unlike mesh & nurbs */ char flag; char pad; short pad2; @@ -171,7 +171,7 @@ typedef struct Curve { struct BoundBox *bb; ListBase nurb; /* actual data, called splines in rna */ - ListBase disp; + ListBase disp; /* undeformed display list, used mostly for texture space calculation */ EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */ @@ -189,11 +189,11 @@ typedef struct Curve { float rot[3]; short texflag, pad1; /* keep a short because of give_obdata_texspace() */ - - short drawflag, twist_mode, pad[2]; + short drawflag, twist_mode; float twist_smooth, smallcaps_scale; - short pathlen, totcol; + int pathlen; + short pad, totcol; short flag, bevresol; float width, ext1, ext2; @@ -314,14 +314,14 @@ typedef enum eBezTriple_Handle { HD_AUTO, HD_VECT, HD_ALIGN, - HD_AUTO_ANIM, /* not real handle type, but is just used as dummy item for anim code */ + HD_AUTO_ANIM /* not real handle type, but is just used as dummy item for anim code */ } eBezTriple_Handle; /* interpolation modes (used only for BezTriple->ipo) */ typedef enum eBezTriple_Interpolation { BEZT_IPO_CONST = 0, /* constant interpolation */ BEZT_IPO_LIN, /* linear interpolation */ - BEZT_IPO_BEZ, /* bezier interpolation */ + BEZT_IPO_BEZ /* bezier interpolation */ } eBezTriple_Interpolation; /* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */ @@ -329,6 +329,7 @@ typedef enum eBezTriple_KeyframeType { BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */ BEZT_KEYTYPE_EXTREME, /* 'extreme' keyframe */ BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */ + BEZT_KEYTYPE_JITTER, /* 'jitter' keyframe (for adding 'filler' secondary motion) */ } eBezTriple_KeyframeType; /* checks if the given BezTriple is selected */ diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 8d5d34fbe9b..eec2c8259ef 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,10 +27,18 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file DNA_customdata_types.h + * \ingroup DNA + */ + #ifndef DNA_CUSTOMDATA_TYPES_H #define DNA_CUSTOMDATA_TYPES_H -/* descriptor and storage for a custom data layer */ +#ifdef __cplusplus +extern "C" { +#endif + +/** descriptor and storage for a custom data layer */ typedef struct CustomDataLayer { int type; /* type of data in layer */ int offset; /* in editmode, offset of layer in block */ @@ -48,7 +56,7 @@ typedef struct CustomDataExternal { char filename[240]; /* FILE_MAX */ } CustomDataExternal; -/* structure which stores custom element data associated with mesh elements +/** structure which stores custom element data associated with mesh elements * (vertices, edges or faces). The custom data is organised into a series of * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */ typedef struct CustomData { @@ -146,4 +154,8 @@ typedef struct CustomData { #define MAX_MTFACE 8 #define MAX_MCOL 8 +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h index a911b92c313..2e5eb3778c4 100644 --- a/source/blender/makesdna/DNA_documentation.h +++ b/source/blender/makesdna/DNA_documentation.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,29 +25,32 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** + */ + +/** + * \page makesdna makesdna + * \ingroup DNA * - * @mainpage DNA- Makesdna modules - * - * @section about About the DNA module + * \section aboutdna About the DNA module * * The DNA module holds all type definitions that are serialized in a * blender file. There is an executable that scans all files, looking - * for struct-s to serialize (hence sdna: Struct DNA). From this + * for struct-s to serialize (hence sdna: Struct \ref DNA). From this * information, it builds a file with numbers that encode the format, * the names of variables, and the plce to look for them. * - * @section issues Known issues with DNA + * \section dnaissues Known issues with DNA * * - Function pointers: * * Because of historical reasons, some function pointers were * untyped. The parser/dna generator has been modified to explicitly * handle these special cases. Most pointers have been given proper - * proto's by now. DNA_space_types.h::Spacefile::returnfuncmay still + * proto's by now. DNA_space_types.h::Spacefile::returnfunc may still * be badly defined. The reason for this is that it is called with * different types of arguments. It takes a char* at this moment... * - * - Path to the header files + * - %Path to the header files * * Also because of historical reasons, there is a path prefix to the * headers that need to be scanned. This is the BASE_HEADER @@ -55,15 +58,14 @@ * have to change this (Not very flexible, but it is hardly ever * changed. Sorry.). * - * @section dependencies Dependencies + * \section dnadependencies Dependencies * * DNA has no external dependencies (except for a few system * includes). - * - **/ + * \section dnanote NOTE -/* PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN + PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN intern/dna_genfile.c (ton) diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index ee0b791a274..f87698a3d64 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_effect_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_EFFECT_TYPES_H #define DNA_EFFECT_TYPES_H +/** \file DNA_effect_types.h + * \ingroup DNA + */ + /* don't forget, new effects also in writefile.c for dna!!! */ #define PAF_MAXMULT 4 diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index ae539a18963..9aa3e1eb3c1 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_fileglobal_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_FILEGLOBAL_TYPES_H #define DNA_FILEGLOBAL_TYPES_H +/** \file DNA_fileglobal_types.h + * \ingroup DNA + */ + struct bScreen; struct Scene; @@ -47,7 +49,8 @@ typedef struct FileGlobal { struct Scene *curscene; int fileflags; int globalf; - + int revision; /* svn revision from buildinfo */ + int pad; /* file path where this was saved, for recover */ char filename[240]; /* 240 = FILE_MAX */ } FileGlobal; diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index 75d21644267..e8ed6580206 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -25,12 +25,16 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * blenloader genfile private function prototypes */ #ifndef GENFILE_H #define GENFILE_H +/** \file DNA_genfile.h + * \ingroup DNA + * \brief blenloader genfile private function prototypes + */ + struct SDNA; extern unsigned char DNAstr[]; /* DNA.c */ @@ -45,7 +49,7 @@ char *DNA_struct_get_compareflags(struct SDNA *sdna, struct SDNA *newsdna); void *DNA_struct_reconstruct(struct SDNA *newsdna, struct SDNA *oldsdna, char *compflags, int oldSDNAnr, int blocks, void *data); int DNA_elem_array_size(const char *astr, int len); -int DNA_elem_offset(struct SDNA *sdna, char *stype, char *vartype, char *name); +int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name); #endif diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 25378173929..ffccc08048e 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,10 @@ #ifndef DNA_GPENCIL_TYPES_H #define DNA_GPENCIL_TYPES_H +/** \file DNA_gpencil_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index 61a527dd351..106b85a5372 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -1,4 +1,4 @@ -/** +/* * blenlib/DNA_group_types.h (mar-2001 nzc) * * $Id$ @@ -31,6 +31,10 @@ #ifndef DNA_GROUP_TYPES_H #define DNA_GROUP_TYPES_H +/** \file DNA_group_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_ID.h" @@ -40,8 +44,8 @@ typedef struct GroupObject { struct GroupObject *next, *prev; struct Object *ob; void *lampren; /* used while render */ - int recalc; /* copy of ob->recalc, used to set animated groups OK */ - int pad; + short recalc; /* copy of ob->recalc, used to set animated groups OK */ + char pad[6]; } GroupObject; diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index d1aa3c00ac4..99ed2319415 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_image_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_IMAGE_TYPES_H #define DNA_IMAGE_TYPES_H +/** \file DNA_image_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" struct PackedFile; @@ -44,16 +46,20 @@ struct GPUTexture; /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */ /* should be used in conjunction with an ID * to Image. */ typedef struct ImageUser { + struct Scene *scene; /* to retrieve render result */ + int framenr; /* movies, sequences: current to display */ int frames; /* total amount of frames to use */ int offset, sfra; /* offset within movie, start frame in global time */ - short fie_ima, cycl; /* fields/image in movie, cyclic flag */ - short flag, ok; - + char fie_ima, cycl; /* fields/image in movie, cyclic flag */ + char ok, pad; + short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */ - short menunr; /* localized menu entry, for handling browse event */ + + short flag; - struct Scene *scene; /* to retrieve render result */ + int pad2; + } ImageUser; /* iuser->flag */ diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index b7e15808ff0..5dba9154a3a 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_ipo_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,15 +27,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -/* ============================================== - * ATTENTION: - * - * The contents of this file are now officially depreceated. They were used for the 'old' animation system, - * which has (as of 2.50) been replaced with a completely new system by Joshua Leung (aligorith). All defines, - * etc. are only still maintained to provide backwards compatability for old files... - * - * ============================================= - */ +/** \file DNA_ipo_types.h + * \ingroup DNA + * \deprecated + * The contents of this file are now officially depreceated. They were used for the 'old' animation system, + * which has (as of 2.50) been replaced with a completely new system by Joshua Leung (aligorith). All defines, + * etc. are only still maintained to provide backwards compatability for old files. + */ #ifndef DNA_IPO_TYPES_H #define DNA_IPO_TYPES_H @@ -421,10 +417,10 @@ typedef struct Ipo { #define PART_TOTNAM 25 #define PART_EMIT_FREQ 1 -#define PART_EMIT_LIFE 2 +/* #define PART_EMIT_LIFE 2 */ /*UNUSED*/ #define PART_EMIT_VEL 3 #define PART_EMIT_AVE 4 -#define PART_EMIT_SIZE 5 +/* #define PART_EMIT_SIZE 5 */ /*UNUSED*/ #define PART_AVE 6 #define PART_SIZE 7 diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index a9783d3465e..71b631e3d5e 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_key_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_KEY_TYPES_H #define DNA_KEY_TYPES_H +/** \file DNA_key_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 5231108a756..9377b5d8a09 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_lamp_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_LAMP_TYPES_H #define DNA_LAMP_TYPES_H +/** \file DNA_lamp_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #ifndef MAX_MTEX @@ -140,7 +142,7 @@ typedef struct Lamp { #define LA_SHAD_RAY 8192 /* yafray: lamp shadowbuffer flag, softlight */ /* Since it is used with LOCAL lamp, can't use LA_SHAD */ -#define LA_YF_SOFT 16384 +/* #define LA_YF_SOFT 16384 */ /* no longer used */ #define LA_LAYER_SHADOW 32768 #define LA_SHAD_TEX (1<<16) #define LA_SHOW_CONE (1<<17) diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h index 94fc9fefb66..662ef9e8a45 100644 --- a/source/blender/makesdna/DNA_lattice_types.h +++ b/source/blender/makesdna/DNA_lattice_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,8 +29,13 @@ #ifndef DNA_LATTICE_TYPES_H #define DNA_LATTICE_TYPES_H +/** \file DNA_lattice_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" +struct AnimData; struct BPoint; struct Ipo; struct Key; @@ -46,17 +51,18 @@ typedef struct EditLatt { typedef struct Lattice { ID id; + struct AnimData *adt; short pntsu, pntsv, pntsw, flag; short opntsu, opntsv, opntsw, pad2; - char typeu, typev, typew, type; + char typeu, typev, typew, pad3; int pad; float fu, fv, fw, du, dv, dw; struct BPoint *def; - struct Ipo *ipo; + struct Ipo *ipo; /* XXX: depreceated... old animation system */ struct Key *key; struct MDeformVert *dvert; @@ -75,5 +81,7 @@ typedef struct Lattice { #define LT_GRID 1 #define LT_OUTSIDE 2 +#define LT_DS_EXPAND 4 + #endif diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index afeb79037f5..f52325c0e7b 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -1,6 +1,4 @@ -/** - * blenlib/BLI_listBase.h mar 2001 Nzc - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,14 +26,18 @@ * * ***** END GPL LICENSE BLOCK ***** * - * These structs are the foundation for all linked lists in the - * library system. * */ #ifndef DNA_LISTBASE_H #define DNA_LISTBASE_H +/** \file DNA_listBase.h + * \ingroup DNA + * \brief These structs are the foundation for all linked lists in the + * library system. + */ + #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index f8eb6e76693..860da1d80a4 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_material_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_MATERIAL_TYPES_H #define DNA_MATERIAL_TYPES_H +/** \file DNA_material_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #include "DNA_listBase.h" @@ -300,6 +302,7 @@ typedef struct Material { #define TEXCO_TANGENT 4096 /* still stored in vertex->accum, 1 D */ #define TEXCO_STRAND 8192 +#define TEXCO_PARTICLE 8192 /* strand is used for normal materials, particle for halo materials */ #define TEXCO_STRESS 16384 #define TEXCO_SPEED 32768 diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 82a03cb4e1b..ec30a01c8e2 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +29,10 @@ #ifndef DNA_MESH_TYPES_H #define DNA_MESH_TYPES_H +/** \file DNA_mesh_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_ID.h" #include "DNA_customdata_types.h" @@ -170,9 +174,9 @@ typedef struct TFace { #define ME_DRAWSHARP (1 << 8) #define ME_DRAWBWEIGHTS (1 << 9) -#define ME_DRAW_EDGELEN (1 << 10) -#define ME_DRAW_FACEAREA (1 << 11) -#define ME_DRAW_EDGEANG (1 << 12) +#define ME_DRAWEXTRA_EDGELEN (1 << 10) +#define ME_DRAWEXTRA_FACEAREA (1 << 11) +#define ME_DRAWEXTRA_FACEANG (1 << 12) #define ME_DRAW_PINS (1 << 13) diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 1cfbd9d8d51..6acbaf3cc45 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +29,10 @@ #ifndef DNA_MESHDATA_TYPES_H #define DNA_MESHDATA_TYPES_H +/** \file DNA_meshdata_types.h + * \ingroup DNA + */ + #include "DNA_customdata_types.h" #include "DNA_listBase.h" @@ -62,8 +66,7 @@ typedef struct MDeformVert { typedef struct MVert { float co[3]; short no[3]; - short mat_nr; - char flag, bweight, pad[2]; + char flag, bweight; } MVert; /* tesselation vertex color data. diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index feadf7cd510..53f563341b3 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_meta_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_META_TYPES_H #define DNA_META_TYPES_H +/** \file DNA_meta_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_ID.h" @@ -48,7 +50,7 @@ typedef struct MetaElem { short type, flag, selcol1, selcol2; float x, y, z; /* Position of center of MetaElem */ - float quat[4]; /* Rotation of MetaElem */ + float quat[4]; /* Rotation of MetaElem (MUST be kept normalized) */ float expx; /* dimension parameters, used for some types like cubes */ float expy; float expz; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 27f9c9cd5f3..28840d55efc 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1,5 +1,4 @@ -/** - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -21,11 +20,16 @@ * ***** END GPL LICENSE BLOCK ***** */ -#include "DNA_listBase.h" - #ifndef DNA_MODIFIER_TYPES_H #define DNA_MODIFIER_TYPES_H +/** \file DNA_modifier_types.h + * \ingroup DNA + */ + +#include "DNA_listBase.h" + + #define MODSTACK_DEBUG 1 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */ @@ -79,6 +83,7 @@ typedef enum ModifierMode { eModifierMode_OnCage = (1<<3), eModifierMode_Expanded = (1<<4), eModifierMode_Virtual = (1<<5), + eModifierMode_ApplyOnSpline = (1<<6), eModifierMode_DisableTemporary = (1 << 31) } ModifierMode; @@ -209,30 +214,32 @@ typedef struct ArrayModifierData { #define MOD_ARR_FITCURVE 2 /* ArrayModifierData->offset_type */ -#define MOD_ARR_OFF_CONST 1<<0 -#define MOD_ARR_OFF_RELATIVE 1<<1 -#define MOD_ARR_OFF_OBJ 1<<2 +#define MOD_ARR_OFF_CONST (1<<0) +#define MOD_ARR_OFF_RELATIVE (1<<1) +#define MOD_ARR_OFF_OBJ (1<<2) /* ArrayModifierData->flags */ -#define MOD_ARR_MERGE 1<<0 -#define MOD_ARR_MERGEFINAL 1<<1 +#define MOD_ARR_MERGE (1<<0) +#define MOD_ARR_MERGEFINAL (1<<1) typedef struct MirrorModifierData { ModifierData modifier; - short axis, flag; + short axis; /* deprecated, use flag instead */ + short flag; float tolerance; struct Object *mirror_ob; } MirrorModifierData; /* MirrorModifierData->flag */ -#define MOD_MIR_CLIPPING 1<<0 -#define MOD_MIR_MIRROR_U 1<<1 -#define MOD_MIR_MIRROR_V 1<<2 -#define MOD_MIR_AXIS_X 1<<3 -#define MOD_MIR_AXIS_Y 1<<4 -#define MOD_MIR_AXIS_Z 1<<5 -#define MOD_MIR_VGROUP 1<<6 +#define MOD_MIR_CLIPPING (1<<0) +#define MOD_MIR_MIRROR_U (1<<1) +#define MOD_MIR_MIRROR_V (1<<2) +#define MOD_MIR_AXIS_X (1<<3) +#define MOD_MIR_AXIS_Y (1<<4) +#define MOD_MIR_AXIS_Z (1<<5) +#define MOD_MIR_VGROUP (1<<6) +#define MOD_MIR_NO_MERGE (1<<7) typedef struct EdgeSplitModifierData { ModifierData modifier; @@ -242,8 +249,8 @@ typedef struct EdgeSplitModifierData { } EdgeSplitModifierData; /* EdgeSplitModifierData->flags */ -#define MOD_EDGESPLIT_FROMANGLE 1<<1 -#define MOD_EDGESPLIT_FROMFLAG 1<<2 +#define MOD_EDGESPLIT_FROMANGLE (1<<1) +#define MOD_EDGESPLIT_FROMFLAG (1<<2) typedef struct BevelModifierData { ModifierData modifier; @@ -330,7 +337,7 @@ typedef struct UVProjectModifierData { #define MOD_UVPROJECT_MAXPROJECTORS 10 /* UVProjectModifierData->flags */ -#define MOD_UVPROJECT_OVERRIDEIMAGE 1<<0 +#define MOD_UVPROJECT_OVERRIDEIMAGE (1<<0) typedef struct DecimateModifierData { ModifierData modifier; @@ -383,13 +390,13 @@ enum { }; /* WaveModifierData.flag */ -#define MOD_WAVE_X 1<<1 -#define MOD_WAVE_Y 1<<2 -#define MOD_WAVE_CYCL 1<<3 -#define MOD_WAVE_NORM 1<<4 -#define MOD_WAVE_NORM_X 1<<5 -#define MOD_WAVE_NORM_Y 1<<6 -#define MOD_WAVE_NORM_Z 1<<7 +#define MOD_WAVE_X (1<<1) +#define MOD_WAVE_Y (1<<2) +#define MOD_WAVE_CYCL (1<<3) +#define MOD_WAVE_NORM (1<<4) +#define MOD_WAVE_NORM_X (1<<5) +#define MOD_WAVE_NORM_Y (1<<6) +#define MOD_WAVE_NORM_Z (1<<7) typedef struct WaveModifierData { ModifierData modifier; @@ -547,12 +554,9 @@ typedef struct MeshDeformModifierData { } MeshDeformModifierData; typedef enum { - eParticleSystemFlag_Loaded = (1<<0), - eParticleSystemFlag_Pars = (1<<1), - eParticleSystemFlag_FromCurve = (1<<2), - eParticleSystemFlag_DM_changed = (1<<3), - eParticleSystemFlag_Disabled = (1<<4), - eParticleSystemFlag_psys_updated = (1<<5), + eParticleSystemFlag_Pars = (1<<0), + eParticleSystemFlag_psys_updated = (1<<1), + eParticleSystemFlag_file_loaded = (1<<2), } ParticleSystemModifierFlag; typedef struct ParticleSystemModifierData { @@ -584,7 +588,7 @@ typedef struct ParticleInstanceModifierData { typedef enum { eExplodeFlag_CalcFaces = (1<<0), eExplodeFlag_PaSize = (1<<1), - eExplodeFlag_EdgeSplit = (1<<2), + eExplodeFlag_EdgeCut = (1<<2), eExplodeFlag_Unborn = (1<<3), eExplodeFlag_Alive = (1<<4), eExplodeFlag_Dead = (1<<5), @@ -595,6 +599,7 @@ typedef struct ExplodeModifierData { int *facepa; short flag, vgroup; float protect; + char uvname[32]; } ExplodeModifierData; typedef struct MultiresModifierData { diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index 519d8ca8163..c64dda2afd0 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +30,10 @@ #ifndef DNA_NLA_TYPES_H #define DNA_NLA_TYPES_H +/** \file DNA_nla_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" struct bAction; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index fe422bfa689..803e5418bcc 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +30,10 @@ #ifndef DNA_NODE_TYPES_H #define DNA_NODE_TYPES_H +/** \file DNA_node_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #include "DNA_vec_types.h" #include "DNA_listBase.h" @@ -66,21 +70,29 @@ typedef struct bNodeSocket { char name[32]; bNodeStack ns; /* custom data for inputs, only UI writes in this */ - short type, flag; /* type is copy from socket type struct */ - short limit, stack_index; /* limit for dependency sort, stack_index for exec */ - short intern; /* intern = tag for group nodes */ - short stack_index_ext; /* for groups, to find the caller stack index */ - int pad1; + short type, flag; + short limit; /* max. number of links */ + + /* stack data info (only during execution!) */ + short stack_type; /* type of stack reference */ + /* XXX only one of stack_ptr or stack_index is used (depending on stack_type). + * could store the index in the pointer with SET_INT_IN_POINTER (a bit ugly). + * (union won't work here, not supported by DNA) + */ + struct bNodeStack *stack_ptr; /* constant input value */ + short stack_index; /* local stack index or external input number */ + short pad1; float locx, locy; /* internal data to retrieve relations and groups */ - int own_index, to_index; /* group socket identifiers, to find matching pairs after reading files */ + int own_index; /* group socket identifiers, to find matching pairs after reading files */ + struct bNodeSocket *groupsock; + int to_index; /* XXX deprecated, only used for restoring old group node links */ + int pad2; - struct bNodeSocket *tosock; /* group-node sockets point to the internal group counterpart sockets, set after read file */ struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */ - } bNodeSocket; /* sock->type */ @@ -95,11 +107,16 @@ typedef struct bNodeSocket { #define SOCK_IN_USE 4 /* unavailable is for dynamic sockets */ #define SOCK_UNAVAIL 8 -# -# + +/* sock->stack_type */ +#define SOCK_STACK_LOCAL 1 /* part of the local tree stack */ +#define SOCK_STACK_EXTERN 2 /* use input stack pointer */ +#define SOCK_STACK_CONST 3 /* use pointer to constant input value */ + typedef struct bNodePreview { unsigned char *rect; short xsize, ysize; + int pad; } bNodePreview; @@ -149,7 +166,7 @@ typedef struct bNode { #define NODE_TEST 256 /* composite: don't do node but pass on buffer(s) */ #define NODE_MUTED 512 -#define NODE_CUSTOM_NAME 1024 +#define NODE_CUSTOM_NAME 1024 /* deprecated! */ typedef struct bNodeLink { struct bNodeLink *next, *prev; @@ -181,7 +198,7 @@ typedef struct bNodeTree { int flag, pad; ListBase alltypes; /* type definitions */ - struct bNodeType *owntype; /* for groups or dynamic trees, no read/write */ + ListBase inputs, outputs; /* external sockets for group nodes */ int pad2[2]; @@ -203,7 +220,11 @@ typedef struct bNodeTree { #define NTREE_EXEC_INIT 2 /* ntree->flag */ -#define NTREE_DS_EXPAND 1 /* for animation editors */ +#define NTREE_DS_EXPAND 1 /* for animation editors */ +/* XXX not nice, but needed as a temporary flag + * for group updates after library linking. + */ +#define NTREE_DO_VERSIONS 1024 /* data structs, for node->storage */ @@ -216,12 +237,11 @@ typedef struct NodeImageAnim { typedef struct NodeBlurData { short sizex, sizey; - short samples, maxspeed, minspeed, relative; + short samples, maxspeed, minspeed, relative, aspect; + short curved; float fac, percentx, percenty; short filtertype; char bokeh, gamma; - short curved; - short pad; int image_in_width, image_in_height; /* needed for absolute/relative conversions */ } NodeBlurData; @@ -336,4 +356,8 @@ typedef struct TexNodeOutput { #define CMP_NODE_CHANNEL_MATTE_CS_YUV 3 #define CMP_NODE_CHANNEL_MATTE_CS_YCC 4 +#define CMP_NODE_BLUR_ASPECT_NONE 0 +#define CMP_NODE_BLUR_ASPECT_Y 1 +#define CMP_NODE_BLUR_ASPECT_X 2 + #endif diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 700021eaceb..e8360b99d69 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -1,4 +1,4 @@ -/** +/* * * $Id$ * @@ -30,6 +30,10 @@ #ifndef DNA_OBJECT_FLUIDSIM_H #define DNA_OBJECT_FLUIDSIM_H +/** \file DNA_object_fluidsim.h + * \ingroup DNA + */ + #include "DNA_ID.h" #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 63a6b8fbe4a..37568a22f54 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -1,4 +1,4 @@ -/** +/* * * $Id$ * @@ -30,6 +30,10 @@ #ifndef DNA_OBJECT_FORCE_H #define DNA_OBJECT_FORCE_H +/** \file DNA_object_force.h + * \ingroup DNA + */ + #ifdef __cplusplus extern "C" { #endif @@ -129,7 +133,9 @@ typedef struct EffectorWeights { */ #define BPHYS_DATA_INDEX 0 #define BPHYS_DATA_LOCATION 1 +#define BPHYS_DATA_SMOKE_LOW 1 #define BPHYS_DATA_VELOCITY 2 +#define BPHYS_DATA_SMOKE_HIGH 2 #define BPHYS_DATA_ROTATION 3 #define BPHYS_DATA_AVELOCITY 4 /* used for particles */ #define BPHYS_DATA_XCONST 4 /* used for cloth */ @@ -139,20 +145,41 @@ typedef struct EffectorWeights { #define BPHYS_TOT_DATA 8 +#define BPHYS_EXTRA_FLUID_SPRINGS 1 + +typedef struct PTCacheExtra { + struct PTCacheExtra *next, *prev; + unsigned int type, totdata; + void *data; +} PTCacheExtra; + typedef struct PTCacheMem { struct PTCacheMem *next, *prev; - int frame, totpoint; + unsigned int frame, totpoint; unsigned int data_types, flag; - int *index_array; /* quick access to stored points with index */ void *data[8]; /* BPHYS_TOT_DATA */ void *cur[8]; /* BPHYS_TOT_DATA */ + + struct ListBase extradata; } PTCacheMem; typedef struct PointCache { struct PointCache *next, *prev; int flag; /* generic flag */ - int step; /* frames between cached frames */ + + int step; /* The number of frames between cached frames. + * This should probably be an upper bound for a per point adaptive step in the future, + * buf for now it's the same for all points. Without adaptivity this can effect the perceived + * simulation quite a bit though. If for example particles are colliding with a horizontal + * plane (with high damping) they quickly come to a stop on the plane, however there are still + * forces acting on the particle (gravity and collisions), so the particle velocity isn't necessarily + * zero for the whole duration of the frame even if the particle seems stationary. If all simulation + * frames aren't cached (step > 1) these velocities are interpolated into movement for the non-cached + * frames. The result will look like the point is oscillating around the collision location. So for + * now cache step should be set to 1 for accurate reproduction of collisions. + */ + int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ int startframe; /* simulation start frame */ int endframe; /* simulation end frame */ @@ -161,12 +188,15 @@ typedef struct PointCache { /* for external cache files */ int totpoint; /* number of cached points */ - int index, rt; /* modifier stack index */ + int index; /* modifier stack index */ + short compression, rt; char name[64]; char prev_name[64]; char info[64]; char path[240]; /* file path */ + char *cached_frames; /* array of length endframe-startframe+1 with flags to indicate cached frames */ + /* can be later used for other per frame flags too if needed */ struct ListBase mem_cache; struct PTCacheEdit *edit; @@ -313,7 +343,7 @@ typedef struct SoftBody { /* pd->flag: various settings */ #define PFIELD_USEMAX 1 -#define PDEFLE_DEFORM 2 +/*#define PDEFLE_DEFORM 2*/ /*UNUSED*/ #define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */ #define PFIELD_PLANAR 8 /* used for do_versions */ #define PDEFLE_KILL_PART 16 @@ -367,10 +397,16 @@ typedef struct SoftBody { #define PTCACHE_READ_INFO 1024 /* dont use the filename of the blendfile the data is linked from (write a local cache) */ #define PTCACHE_IGNORE_LIBPATH 2048 +/* high resolution cache is saved for smoke for backwards compatibility, so set this flag to know it's a "fake" cache */ +#define PTCACHE_FAKE_SMOKE (1<<12) /* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */ #define PTCACHE_REDO_NEEDED 258 +#define PTCACHE_COMPRESS_NO 0 +#define PTCACHE_COMPRESS_LZO 1 +#define PTCACHE_COMPRESS_LZMA 2 + /* ob->softflag */ #define OB_SB_ENABLE 1 /* deprecated, use modifier */ #define OB_SB_GOAL 2 diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 1d3a2c1059c..5b4fc2e554f 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -1,8 +1,4 @@ -/** - * blenlib/DNA_object_types.h (mar-2001 nzc) - * - * Object is a sort of wrapper for general info. - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -33,6 +29,11 @@ #ifndef DNA_OBJECT_TYPES_H #define DNA_OBJECT_TYPES_H +/** \file DNA_object_types.h + * \ingroup DNA + * \brief Object is a sort of wrapper for general info. + */ + #include "DNA_listBase.h" #include "DNA_ID.h" #include "DNA_action_types.h" /* bAnimVizSettings */ @@ -198,7 +199,7 @@ typedef struct Object { float bbsize[3]; short index; /* custom index, for renderpasses */ unsigned short actdef; /* current deformation group, note: index starts at 1 */ - float col[4]; /* object color, adjusted via IPO's only */ + float col[4]; /* object color */ /** * Settings for game objects * bit 0: Object has dynamic behaviour @@ -320,16 +321,15 @@ extern Object workob; #define PARSLOW 16 /* (short) transflag */ -#define OB_OFFS_LOCAL 1 - // XXX OB_QUAT was never used, but is now depreceated in favour of standard rotation handling... -#define OB_QUAT 2 +/*#define OB_OFFS_LOCAL 1*/ /*UNUSED*/ +/* #define OB_QUAT 2 */ /* never used, free flag */ #define OB_NEG_SCALE 4 #define OB_DUPLI (8+16+256+512+2048) #define OB_DUPLIFRAMES 8 #define OB_DUPLIVERTS 16 #define OB_DUPLIROT 32 #define OB_DUPLINOSPEED 64 -#define OB_POWERTRACK 128 +/*#define OB_POWERTRACK 128*/ /*UNUSED*/ #define OB_DUPLIGROUP 256 #define OB_DUPLIFACES 512 #define OB_DUPLIFACES_SCALE 1024 @@ -342,9 +342,9 @@ extern Object workob; #define OB_DRAWKEY 1 #define OB_DRAWKEYSEL 2 #define OB_OFFS_OB 4 -#define OB_OFFS_MAT 8 -#define OB_OFFS_VKEY 16 -#define OB_OFFS_PATH 32 +/* #define OB_OFFS_MAT 8 */ /*UNUSED*/ +/* #define OB_OFFS_VKEY 16 */ /*UNUSED*/ +/* #define OB_OFFS_PATH 32 */ /*UNUSED*/ #define OB_OFFS_PARENT 64 #define OB_OFFS_PARTICLE 128 /* get ipo from from action or not? */ @@ -401,7 +401,8 @@ extern Object workob; #define OB_BOUND_CONE 3 #define OB_BOUND_POLYH 4 #define OB_BOUND_POLYT 5 -#define OB_BOUND_DYN_MESH 6 +/* #define OB_BOUND_DYN_MESH 6 */ /*UNUSED*/ +#define OB_BOUND_CAPSULE 7 #define OB_BOUND_CAPSULE 7 @@ -416,7 +417,7 @@ extern Object workob; /* NOTE: this was used as a proper setting in past, so nullify before using */ #define BA_TEMP_TAG 32 -#define BA_FROMSET 128 +/* #define BA_FROMSET 128 */ /*UNUSED*/ #define BA_TRANSFORM_CHILD 256 /* child of a transformed object */ #define BA_TRANSFORM_PARENT 8192 /* parent of a transformed object */ @@ -437,7 +438,8 @@ extern Object workob; #define OB_RECALC_DATA 2 /* time flag is set when time changes need recalc, so baked systems can ignore it */ #define OB_RECALC_TIME 4 -#define OB_RECALC_ALL 7 + /* only use for matching any flag, NOT as an argument since more flags may be added. */ +#define OB_RECALC_ALL (OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME) /* controller state */ #define OB_MAX_STATES 30 @@ -475,7 +477,7 @@ extern Object workob; #define OB_LOCK_RIGID_BODY_Y_ROT_AXIS 64 #define OB_LOCK_RIGID_BODY_Z_ROT_AXIS 128 -#define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD) +/* #define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD) */ /* ob->body_type */ #define OB_BODY_TYPE_NO_COLLISION 0 @@ -557,6 +559,9 @@ typedef enum ObjectMode { OB_MODE_POSE = 64 } ObjectMode; +/* any mode where the brush system is used */ +#define OB_MODE_ALL_PAINT (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) + #define MAX_DUPLI_RECUR 8 #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index d30351b6c34..c44f10efde8 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +29,10 @@ #ifndef DNA_OUTLINER_TYPES_H #define DNA_OUTLINER_TYPES_H +/** \file DNA_outliner_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" struct ID; diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h index 73f55ca186c..de7218ec704 100644 --- a/source/blender/makesdna/DNA_packedFile_types.h +++ b/source/blender/makesdna/DNA_packedFile_types.h @@ -1,7 +1,4 @@ -/* DNA_packedFile_types.h - * - * 12-oct-2000 nzc - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -33,6 +30,12 @@ #ifndef DNA_PACKEDFILE_TYPES_H #define DNA_PACKEDFILE_TYPES_H +/** \file DNA_packedFile_types.h + * \ingroup DNA + * \author nzc + * \since 12-oct-2000 nzc + */ + typedef struct PackedFile { int size; int seek; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 105fa6d5289..ae97b023e58 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -1,6 +1,4 @@ -/* DNA_particle_types.h - * - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -32,6 +30,10 @@ #ifndef DNA_PARTICLE_TYPES_H #define DNA_PARTICLE_TYPES_H +/** \file DNA_particle_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #include "DNA_boid_types.h" @@ -61,6 +63,11 @@ typedef struct BoidParticle { float rt; } BoidParticle; +typedef struct ParticleSpring { + float rest_length; + unsigned int particle_index[2], delete_flag; +}ParticleSpring; + /* Child particles are created around or between parent particles */ typedef struct ChildParticle { int num, parent; /* num is face index on the final derived mesh */ @@ -116,12 +123,17 @@ typedef struct ParticleData { typedef struct SPHFluidSettings { /*Particle Fluid*/ - float spring_k, radius, rest_length; + float spring_k, radius, rest_length, plasticity_constant, yield_ratio; float viscosity_omega, viscosity_beta; float stiffness_k, stiffness_knear, rest_density; float buoyancy; + int flag, pad; } SPHFluidSettings; +/* fluid->flag */ +#define SPH_VISCOELASTIC_SPRINGS 1 +#define SPH_CURRENT_REST_LENGTH 2 + typedef struct ParticleSettings { ID id; struct AnimData *adt; @@ -132,7 +144,7 @@ typedef struct ParticleSettings { struct EffectorWeights *effector_weights; int flag; - short type, from, distr; + short type, from, distr, texact; /* physics modes */ short phystype, rotmode, avemode, reactevent; short draw, draw_as, draw_size, childtype; @@ -145,7 +157,7 @@ typedef struct ParticleSettings { short adapt_angle, adapt_pix; short disp, omat, interpolation, rotfrom, integrator; - short kink, kink_axis; + short kink, kink_axis, rt2; /* billboards */ short bb_align, bb_uv_split, bb_anim, bb_split_offset; @@ -158,15 +170,15 @@ typedef struct ParticleSettings { /* general values */ float sta, end, lifetime, randlife; - float timetweak, jitfac, eff_hair; - int totpart, userjit, grid_res; + float timetweak, jitfac, eff_hair, grid_rand; + int totpart, userjit, grid_res, effector_amount; /* initial velocity factors */ float normfac, obfac, randfac, partfac, tanfac, tanphase, reactfac; - float ob_vel[3], rt; + float ob_vel[3]; float avefac, phasefac, randrotfac, randphasefac; /* physical properties */ - float mass, size, randsize, reactshape; + float mass, size, randsize; /* global physical properties */ float acc[3], dragfac, brownfac, dampfac; /* length */ @@ -178,13 +190,17 @@ typedef struct ParticleSettings { /* clumping */ float clumpfac, clumppow; /* kink */ - float kink_amp, kink_freq, kink_shape; + float kink_amp, kink_freq, kink_shape, kink_flat; + float kink_amp_clump; /* rough */ float rough1, rough1_size; float rough2, rough2_size, rough2_thres; float rough_end, rough_end_shape; /* length */ float clength, clength_thres; + /* parting */ + float parting_fac; + float parting_min, parting_max; /* branching */ float branch_thres; /* drawing stuff */ @@ -194,6 +210,8 @@ typedef struct ParticleSettings { /* keyed particles */ int keyed_loops; + struct MTex *mtex[18]; /* MAX_MTEX */ + struct Group *dup_group; struct ListBase dupliweights; struct Group *eff_group; // deprecated @@ -232,8 +250,8 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in float imat[4][4]; /* used for duplicators */ float cfra, tree_frame; - int seed, rt; - int flag, totpart, totchild, totcached, totchildcache; + int seed, child_seed; + int flag, totpart, totunexist, totchild, totcached, totchildcache, rt; short recalc, target_psys, totkeyed, bakespace; char bb_uvname[3][32]; /* billboard uv name */ @@ -250,6 +268,9 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in struct ListBase *effectors; + ParticleSpring *fluid_springs; + int tot_fluidsprings, alloc_fluidsprings; + struct KDTree *tree; /* used for interactions with self and other systems */ struct ParticleDrawData *pdd; @@ -273,7 +294,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in /* for dopesheet */ #define PART_DS_EXPAND 8 -#define PART_HAIR_GEOMETRY 16 +#define PART_HAIR_REGROW 16 /* regrow hair for each frame */ #define PART_UNBORN 32 /*show unborn particles*/ #define PART_DIED 64 /*show died particles*/ @@ -287,25 +308,25 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PART_ROT_DYN (1<<14) /* dynamic rotation */ #define PART_SIZEMASS (1<<16) -//#define PART_HAIR_GRAVITY (1<<15) +#define PART_HIDE_ADVANCED_HAIR (1<<15) //#define PART_ABS_TIME (1<<17) //#define PART_GLOB_TIME (1<<18) #define PART_BOIDS_2D (1<<19) -#define PART_BRANCHING (1<<20) -#define PART_ANIM_BRANCHING (1<<21) -#define PART_SYMM_BRANCHING (1<<24) +//#define PART_BRANCHING (1<<20) +//#define PART_ANIM_BRANCHING (1<<21) #define PART_HAIR_BSPLINE 1024 +#define PART_GRID_HEXAGONAL (1<<24) #define PART_GRID_INVERT (1<<26) -#define PART_CHILD_EFFECT (1<<27) -#define PART_CHILD_SEAMS (1<<28) -#define PART_CHILD_RENDER (1<<29) -#define PART_CHILD_GUIDE (1<<30) +#define PART_CHILD_EFFECT (1<<27) +#define PART_CHILD_LONG_HAIR (1<<28) +/* #define PART_CHILD_RENDER (1<<29) */ /*UNUSED*/ +#define PART_CHILD_GUIDE (1<<30) #define PART_SELF_EFFECT (1<<22) @@ -371,10 +392,9 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in /* part->bb_anim */ #define PART_BB_ANIM_NONE 0 -#define PART_BB_ANIM_TIME 1 +#define PART_BB_ANIM_AGE 1 #define PART_BB_ANIM_ANGLE 2 -#define PART_BB_ANIM_OFF_TIME 3 -#define PART_BB_ANIM_OFF_ANGLE 4 +#define PART_BB_ANIM_FRAME 3 /* part->bb_split_offset */ #define PART_BB_OFF_NONE 0 @@ -442,7 +462,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PSYS_ENABLED 16 /* deprecated */ #define PSYS_HAIR_UPDATED 32 /* signal for updating hair particle mode */ #define PSYS_DRAWING 64 -//#define PSYS_SOFT_BAKE 128 +#define PSYS_USE_IMAT 128 #define PSYS_DELETE 256 /* remove particlesystem as soon as possible */ #define PSYS_HAIR_DONE 512 #define PSYS_KEYED 1024 @@ -491,4 +511,25 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PTARGET_MODE_FRIEND 1 #define PTARGET_MODE_ENEMY 2 +/* mapto */ +/* init */ +#define PAMAP_INIT 15 +#define PAMAP_TIME (1<<0) /* emission time */ +#define PAMAP_LIFE (1<<1) /* life time */ +#define PAMAP_DENS (1<<2) /* density */ +#define PAMAP_SIZE (1<<3) /* physical size */ +/* reset */ +#define PAMAP_IVEL (1<<5) /* initial velocity */ +/* physics */ +#define PAMAP_PHYSICS 3136 +#define PAMAP_FIELD (1<<6) /* force fields */ +#define PAMAP_GRAVITY (1<<10) +#define PAMAP_DAMP (1<<11) +/* children */ +#define PAMAP_CHILD 912 +#define PAMAP_CLUMP (1<<7) +#define PAMAP_KINK (1<<8) +#define PAMAP_ROUGH (1<<9) +#define PAMAP_LENGTH (1<<4) + #endif diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h index e0da4e89f0f..04f0a6e60c6 100644 --- a/source/blender/makesdna/DNA_property_types.h +++ b/source/blender/makesdna/DNA_property_types.h @@ -1,8 +1,5 @@ -/** - * blenlib/DNA_property_types.h (mar-2001 nzc) +/* * - * Renderrecipe and scene decription. The fact that there is a - * hierarchy here is a bit strange, and not desirable. * * $Id$ * @@ -34,6 +31,14 @@ #ifndef DNA_PROPERTY_TYPES_H #define DNA_PROPERTY_TYPES_H +/** \file DNA_property_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + * \attention Renderrecipe and scene decription. The fact that there is a + * hierarchy here is a bit strange, and not desirable. + */ + /* ********************* PROPERTY ************************ */ typedef struct bProperty { diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index cc5d256615e..e3057e862b8 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +29,10 @@ #ifndef DNA_SCENE_TYPES_H #define DNA_SCENE_TYPES_H +/** \file DNA_scene_types.h + * \ingroup DNA + */ + // XXX, temp feature #define DURIAN_CAMERA_SWITCH @@ -221,8 +225,8 @@ typedef struct RenderData { float edgeR, edgeG, edgeB; short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5 - short depth, attrib, rt2; /* standalone player */ // XXX deprecated since 2.5 - short frame_step; /* frames to jump during render/playback */ + short depth, attrib; /* 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 @@ -453,7 +457,7 @@ typedef struct GameData { /* stereo/dome mode */ struct GameDome dome; - short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!! + short stereoflag, stereomode, xsch, ysch; //xsch and ysch used for backwards compat. float eyeseparation, pad1; } GameData; @@ -492,6 +496,7 @@ typedef struct GameData { #define GAME_GLSL_NO_EXTRA_TEX (1 << 11) #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12) #define GAME_ENABLE_ANIMATION_RECORD (1 << 13) +#define GAME_SHOW_MOUSE (1 << 14) /* GameData.matmode */ #define GAME_MAT_TEXFACE 0 @@ -657,8 +662,11 @@ typedef struct ToolSettings { short uvcalc_mapalign; short uvcalc_flag; short uv_flag, uv_selectmode; - short uv_pad[2]; - + short uv_pad; + + /* Grease Pencil */ + short gpencil_flags; + /* Auto-IK */ short autoik_chainlen; @@ -743,8 +751,10 @@ typedef struct bStats { typedef struct UnitSettings { /* Display/Editing unit options for each scene */ float scale_length; /* maybe have other unit conversions? */ - short system; - short flag; /* imperial, metric etc */ + char system; /* imperial, metric etc */ + char system_rotation; /* not implimented as a propper unit system yet */ + short flag; + } UnitSettings; typedef struct PhysicsSettings { @@ -760,7 +770,6 @@ typedef struct Scene { struct World *world; struct Scene *set; - struct Image *ima; ListBase base; struct Base *basact; /* active base */ @@ -772,7 +781,7 @@ typedef struct Scene { unsigned int lay; /* bitflags for layer visibility */ int layact; /* active layer */ - int pad1; + unsigned int customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */ short flag; /* various settings */ @@ -804,7 +813,7 @@ typedef struct Scene { short dagisvalid, dagflags; short recalc; /* recalc = counterpart of ob->recalc */ - short jumpframe; + short pad6; int pad5; /* User-Defined KeyingSets */ @@ -828,12 +837,6 @@ typedef struct Scene { /* **************** RENDERDATA ********************* */ -/* bufflag */ -#define R_BACKBUF 1 -#define R_BACKBUFANIM 2 -#define R_FRONTBUF 4 -#define R_FRONTBUFANIM 8 - /* flag */ /* use preview range */ #define SCER_PRV_RANGE (1<<0) @@ -851,7 +854,7 @@ typedef struct Scene { #define R_BORDER 0x0200 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */ #define R_CROP 0x0800 -#define R_COSMO 0x1000 +/*#define R_COSMO 0x1000 deprecated */ #define R_ODDFIELD 0x2000 #define R_MBLUR 0x4000 /* unified was here */ @@ -859,7 +862,7 @@ typedef struct Scene { /* R_GAUSS is obsolete, but used to retrieve setting from old files */ #define R_GAUSS 0x20000 /* fbuf obsolete... */ -#define R_FBUF 0x40000 +/*#define R_FBUF 0x40000*/ /* threads obsolete... is there for old files, now use for autodetect threads */ #define R_THREADS 0x80000 /* Use the same flag for autothreads */ @@ -880,7 +883,8 @@ typedef struct Scene { #define R_OUTPUT_SCREEN 0 #define R_OUTPUT_AREA 1 #define R_OUTPUT_WINDOW 2 -#define R_OUTPUT_FORKED 3 +#define R_OUTPUT_NONE 3 +/*#define R_OUTPUT_FORKED 4*/ /* filtertype */ #define R_FILTER_BOX 0 @@ -924,10 +928,10 @@ typedef struct Scene { #define R_COMP_FREE 0x0800 #define R_NO_IMAGE_LOAD 0x1000 #define R_NO_TEX 0x2000 -#define R_STAMP_INFO 0x4000 /* deprecated */ +#define R_NO_FRAME_UPDATE 0x4000 #define R_FULL_SAMPLE 0x8000 -#define R_DEPRECATED 0x10000 -#define R_RECURS_PROTECTION 0x20000 +/* #define R_DEPRECATED 0x10000 */ +/* #define R_RECURS_PROTECTION 0x20000 */ #define R_TEXNODE_PREVIEW 0x40000 /* r->stamp */ @@ -942,7 +946,8 @@ typedef struct Scene { #define R_STAMP_FILENAME 0x0100 #define R_STAMP_SEQSTRIP 0x0200 #define R_STAMP_RENDERTIME 0x0400 -#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME) +#define R_STAMP_CAMERALENS 0x0800 +#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME|R_STAMP_CAMERALENS) /* alphamode */ #define R_ADDSKY 0 @@ -963,7 +968,7 @@ typedef struct Scene { /* #define R_HAMX 2 */ /* hamx is nomore */ /* #define R_FTYPE 3 */ /* ftype is nomore */ #define R_JPEG90 4 -#define R_MOVIE 5 +/*#define R_MOVIE 5*/ /* movie is nomore */ #define R_IRIZ 7 #define R_RAWTGA 14 #define R_AVIRAW 15 @@ -1038,17 +1043,17 @@ typedef struct Scene { #define TESTBASELIB_BGMODE(v3d, scene, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) #define BASE_EDITABLE_BGMODE(v3d, scene, base) (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0) +#define BASE_VISIBLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & OB_RESTRICT_VIEW)==0) #define FIRSTBASE scene->base.first #define LASTBASE scene->base.last #define BASACT (scene->basact) -#define OBACT (BASACT? BASACT->object: 0) +#define OBACT (BASACT? BASACT->object: NULL) #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;} #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;} #define CFRA (scene->r.cfra) #define SUBFRA (scene->r.subframe) -#define F_CFRA ((float)(scene->r.cfra)) #define SFRA (scene->r.sfra) #define EFRA (scene->r.efra) #define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE) @@ -1157,8 +1162,9 @@ typedef enum SculptFlags { /* ImagePaintSettings.flag */ #define IMAGEPAINT_DRAWING 1 -#define IMAGEPAINT_DRAW_TOOL 2 -#define IMAGEPAINT_DRAW_TOOL_DRAWING 4 +// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated +// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated + /* projection painting only */ #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */ #define IMAGEPAINT_PROJECT_XRAY 16 @@ -1170,7 +1176,7 @@ typedef enum SculptFlags { /* toolsettings->uvcalc_flag */ #define UVCALC_FILLHOLES 1 -#define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */ +/*#define UVCALC_NO_ASPECT_CORRECT 2*/ /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */ #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */ /* toolsettings->uv_flag */ @@ -1190,13 +1196,16 @@ typedef enum SculptFlags { #define EDGE_MODE_TAG_CREASE 3 #define EDGE_MODE_TAG_BEVEL 4 +/* toolsettings->gpencil_flags */ +#define GP_TOOL_FLAG_PAINTSESSIONS_ON (1<<0) + /* toolsettings->particle flag */ #define PE_KEEP_LENGTHS 1 #define PE_LOCK_FIRST 2 #define PE_DEFLECT_EMITTER 4 #define PE_INTERPOLATE_ADDED 8 #define PE_DRAW_PART 16 -#define PE_X_MIRROR 64 /* deprecated */ +/* #define PE_X_MIRROR 64 */ /* deprecated */ #define PE_FADE_TIME 128 #define PE_AUTO_VELOCITY 256 @@ -1225,10 +1234,10 @@ typedef enum SculptFlags { #define RETOPO 1 #define RETOPO_PAINT 2 -/* toolsettings->retopo_paint_tool */ -#define RETOPO_PEN 1 -#define RETOPO_LINE 2 -#define RETOPO_ELLIPSE 4 +/* toolsettings->retopo_paint_tool */ /*UNUSED*/ +/* #define RETOPO_PEN 1 */ +/* #define RETOPO_LINE 2 */ +/* #define RETOPO_ELLIPSE 4 */ /* toolsettings->skgen_options */ #define SKGEN_FILTER_INTERNAL (1 << 0) diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index a811fd9c014..381046daedc 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,10 @@ #ifndef DNA_SCREEN_TYPES_H #define DNA_SCREEN_TYPES_H +/** \file DNA_screen_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_view2d_types.h" #include "DNA_vec_types.h" @@ -54,7 +58,11 @@ typedef struct bScreen { struct Scene *scene; struct Scene *newscene; /* temporary when switching */ - short full; /* fade out? */ + int redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */ + int pad1; + + short full; /* temp screen for image render display or fileselect */ + short temp; /* temp screen in a temp window, don't save (like user prefs) */ short winid; /* winid from WM, starts with 1 */ short do_draw; /* notifier for drawing edges */ short do_refresh; /* notifier for scale screen, changed screen, etc */ @@ -66,7 +74,7 @@ typedef struct bScreen { short mainwin; /* screensize subwindow, for screenedges and global menus */ short subwinactive; /* active subwindow */ - int pad2; + short pad; struct wmTimer *animtimer; /* if set, screen has timer handler added in window */ void *context; /* context callback */ @@ -187,20 +195,20 @@ typedef struct ARegion { #define HEADERDOWN 1 #define HEADERTOP 2 -#define SCREENNORMAL 0 -#define SCREENFULL 1 -#define SCREENAUTOPLAY 2 -#define SCREENTEMP 3 +/* screen->full */ +#define SCREENNORMAL 0 +#define SCREENFULL 1 +#define SCREENFULLTEMP 2 /* Panel->snap - for snapping to screen edges */ #define PNL_SNAP_NONE 0 -#define PNL_SNAP_TOP 1 -#define PNL_SNAP_RIGHT 2 -#define PNL_SNAP_BOTTOM 4 -#define PNL_SNAP_LEFT 8 +/* #define PNL_SNAP_TOP 1 */ +/* #define PNL_SNAP_RIGHT 2 */ +#define PNL_SNAP_BOTTOM 4 +/* #define PNL_SNAP_LEFT 8 */ -#define PNL_SNAP_DIST 9.0 +/* #define PNL_SNAP_DIST 9.0 */ /* paneltype flag */ #define PNL_DEFAULT_CLOSED 1 @@ -214,6 +222,7 @@ typedef struct ARegion { #define SCREEN_HANDLER_VERSE 3 /* regiontype, first two are the default set */ +/* Do NOT change order, append on end. Types are hardcoded needed */ enum { RGN_TYPE_WINDOW = 0, RGN_TYPE_HEADER, diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index f2bdfeff9dd..e5f924b5fa6 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_sdna.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +28,10 @@ */ #ifndef DNA_SDNA_H #define DNA_SDNA_H +/** + * \file DNA_sdna_types.h + * \ingroup DNA + */ # # @@ -38,7 +40,7 @@ typedef struct SDNA { int datalen; /* length of data */ int nr_names; /* total number of struct members */ - char **names; /* struct member names */ + const char **names; /* struct member names */ int pointerlen; /* size of a pointer in bytes */ diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index d7256b5b9e0..fb7a3e70c7c 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_sensor_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +28,12 @@ */ #ifndef DNA_SENSOR_TYPES_H #define DNA_SENSOR_TYPES_H +/** \file DNA_sensor_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + * + */ struct Object; struct Material; @@ -207,6 +211,14 @@ typedef struct bJoystickSensor { #define SENS_RAY_NEG_Z_AXIS 5 //#define SENS_RAY_NEGATIVE_AXIS 1 +/* bRadarSensor->axis */ +#define SENS_RADAR_X_AXIS 0 +#define SENS_RADAR_Y_AXIS 1 +#define SENS_RADAR_Z_AXIS 2 +#define SENS_RADAR_NEG_X_AXIS 3 +#define SENS_RADAR_NEG_Y_AXIS 4 +#define SENS_RADAR_NEG_Z_AXIS 5 + /* bMessageSensor->type */ #define SENS_MESG_MESG 0 #define SENS_MESG_PROP 1 diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index d51dec97351..22f0c23ea9b 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_sequence_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +28,11 @@ */ #ifndef DNA_SEQUENCE_TYPES_H #define DNA_SEQUENCE_TYPES_H +/** \file DNA_sequence_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + */ #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -42,6 +45,7 @@ struct bSound; typedef struct StripElem { char name[80]; + int orig_width, orig_height; } StripElem; typedef struct StripCrop { @@ -81,7 +85,6 @@ typedef struct Strip { int startstill, endstill; StripElem *stripdata; char dir[160]; - int orx, ory; StripProxy *proxy; StripCrop *crop; StripTransform *transform; @@ -232,6 +235,8 @@ typedef struct SpeedControlVars { int lastValidFrame; } SpeedControlVars; +#define SELECT 1 + /* Editor->over_flag */ #define SEQ_EDIT_OVERLAY_SHOW 1 #define SEQ_EDIT_OVERLAY_ABS 2 diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index b8be51b378f..168481d3b29 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,12 +29,17 @@ #ifndef DNA_SMOKE_TYPES_H #define DNA_SMOKE_TYPES_H +/** \file DNA_smoke_types.h + * \ingroup DNA + */ + /* flags */ #define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */ #define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */ #define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */ #define MOD_SMOKE_HIGH_SMOOTH (1<<5) /* smoothens high res emission*/ +#define MOD_SMOKE_FILE_LOAD (1<<6) /* flag for file load */ /* noise */ #define MOD_SMOKE_NOISEWAVE (1<<0) @@ -86,6 +91,8 @@ typedef struct SmokeDomainSettings { int v3dnum; int cache_comp; int cache_high_comp; + + /* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */ struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */ struct ListBase ptcaches[2]; struct EffectorWeights *effector_weights; diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index c10d306565b..3e5f82a8052 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_sound_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +28,11 @@ */ #ifndef DNA_SOUND_TYPES_H #define DNA_SOUND_TYPES_H +/** \file DNA_sound_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + */ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index bf64bc27b48..a23aed505ae 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_space_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +28,11 @@ */ #ifndef DNA_SPACE_TYPES_H #define DNA_SPACE_TYPES_H +/** \file DNA_space_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + */ #include "DNA_listBase.h" #include "DNA_color_types.h" /* for Histogram */ @@ -84,11 +87,20 @@ typedef struct SpaceInfo { short blockhandler[8]; /* XXX depricate this */ - struct bScreen *screen; /* browse screen */ - struct Scene *scene; /* browse scene */ + char rpt_mask; + char pad[7]; } SpaceInfo; +/* SpaceInfo.rpt_mask */ +enum { + INFO_RPT_DEBUG = 1<<0, + INFO_RPT_INFO = 1<<1, + INFO_RPT_OP = 1<<2, + INFO_RPT_WARN = 1<<3, + INFO_RPT_ERR = 1<<4, +}; + /* 'Graph' Editor (formerly known as the IPO Editor) */ typedef struct SpaceIpo { SpaceLink *next, *prev; @@ -126,7 +138,8 @@ typedef struct SpaceButs { short mainb, mainbo, mainbuser; /* context tabs */ short re_align, align; /* align for panels */ short preview; /* preview is signal to refresh */ - char flag, pad[3]; + short texture_context; /* texture context selector (material, world, brush)*/ + char flag, pad; void *path; /* runtime */ int pathflag, dataicon; /* runtime */ @@ -157,12 +170,14 @@ typedef struct SpaceSeq { } SpaceSeq; typedef struct FileSelectParams { - char title[24]; /* title, also used for the text of the execute button */ + char title[32]; /* title, also used for the text of the execute button */ char dir[240]; /* directory */ char file[80]; /* file */ char renamefile[80]; char renameedit[80]; /* annoying but the first is only used for initialization */ + char filter_glob[64]; /* list of filetypes to filter */ + short type; /* XXXXX for now store type here, should be moved to the operator */ short flag; /* settings for filter, hiding dots files,... */ short sort; /* sort order */ @@ -229,9 +244,8 @@ typedef struct SpaceOops { /* search stuff */ char search_string[32]; struct TreeStoreElem search_tse; - int search_flags, do_; - - short flag, outlinevis, storeflag, pad; + + short flag, outlinevis, storeflag, search_flags; } SpaceOops; typedef struct SpaceImage { @@ -239,34 +253,30 @@ typedef struct SpaceImage { ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; - short blockhandler[8]; - + int flag; + struct Image *image; struct ImageUser iuser; + struct CurveMapping *cumap; - struct CurveMapping *cumap; - short menunr, imanr, pad2; + struct Scopes scopes; /* histogram waveform and vectorscope */ + struct Histogram sample_line_hist; /* sample line histogram */ + + struct bGPdata *gpd; /* grease pencil data */ + + float cursor[2]; /* UV editor 2d cursor */ + float xof, yof; /* user defined offset, image is centered */ + float zoom; /* user defined zoom level */ + float centx, centy; /* storage for offset while render drawing */ + short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */ - int flag; - short imtypenr, lock; - short pin, pad3; + short imtypenr; + short lock; + short pin; char dt_uv; /* UV draw type */ char sticky; /* sticky selection type */ char dt_uvstretch; char around; - float cursor[2]; /* UV editor 2d cursor */ - - float xof, yof; /* user defined offset, image is centered */ - float zoom, pad4; /* user defined zoom level */ - float centx, centy; /* storage for offset while render drawing */ - - struct bGPdata *gpd; /* grease pencil data */ - - struct Scopes scopes; /* histogram waveform and vectorscope */ - - struct Histogram sample_line_hist; /* sample line histogram */ - } SpaceImage; typedef struct SpaceNla { @@ -316,6 +326,11 @@ typedef struct SpaceText { char findstr[256]; /* ST_MAX_FIND_STR */ char replacestr[256]; /* ST_MAX_FIND_STR */ + + short margin_column; /* column number to show right margin at */ + char pad[6]; + + void *drawcache; /* cache for faster drawing */ } SpaceText; typedef struct Script { @@ -332,9 +347,6 @@ typedef struct Script { char scriptarg[256]; } Script; #define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0; -#define SCRIPT_RUNNING 0x01 -#define SCRIPT_GUI 0x02 -#define SCRIPT_FILESEL 0x04 typedef struct SpaceScript { SpaceLink *next, *prev; @@ -349,15 +361,11 @@ typedef struct SpaceScript { void *but_refs; } SpaceScript; +# /* Only store the data array in the cache to avoid constant reallocation. */ +# /* No need to store when saved. */ typedef struct SpaceTimeCache { struct SpaceTimeCache *next, *prev; - int type; - int flag; - float *array; - int len; - int startframe, endframe; - int ok; } SpaceTimeCache; typedef struct SpaceTime { @@ -371,7 +379,7 @@ typedef struct SpaceTime { ListBase caches; int cache_display, pad; - int flag, redraws; + int flag, redraws; /* redraws is deprecated... moved to screen */ } SpaceTime; @@ -395,8 +403,9 @@ typedef struct SpaceNode { float mx, my; /* mousepos for drawing socketless link */ struct bNodeTree *nodetree, *edittree; - int treetype; /* treetype: as same nodetree->type */ - short texfrom, pad; /* texfrom object, world or brush */ + int treetype; /* treetype: as same nodetree->type */ + short texfrom; /* texfrom object, world or brush */ + short recalc; /* currently on 0/1, for auto compo */ struct bGPdata *gpd; /* grease-pencil data */ } SpaceNode; @@ -404,6 +413,9 @@ typedef struct SpaceNode { /* snode->flag */ #define SNODE_BACKDRAW 2 #define SNODE_DISPGP 4 +#define SNODE_USE_ALPHA 8 +#define SNODE_SHOW_ALPHA 16 +#define SNODE_AUTO_RENDER 32 /* snode->texfrom */ #define SNODE_TEX_OBJECT 0 @@ -505,21 +517,6 @@ enum { CONSOLE_LINE_ERROR }; -/* SpaceConsole.rpt_mask */ -enum { - CONSOLE_TYPE_PYTHON=0, - CONSOLE_TYPE_REPORT, -}; - -/* SpaceConsole.type see BKE_report.h */ -enum { - CONSOLE_RPT_DEBUG = 1<<0, - CONSOLE_RPT_INFO = 1<<1, - CONSOLE_RPT_OP = 1<<2, - CONSOLE_RPT_WARN = 1<<3, - CONSOLE_RPT_ERR = 1<<4, -}; - typedef struct SpaceConsole { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ @@ -529,9 +526,7 @@ typedef struct SpaceConsole { short blockhandler[8]; // XXX are these needed? /* space vars */ - int type; /* console/report/..? */ - int rpt_mask; /* which reports to display */ - int flag, lheight; + int lheight, pad; ListBase scrollback; /* ConsoleLine; output */ ListBase history; /* ConsoleLine; command history, current edited line is the first */ @@ -639,10 +634,16 @@ typedef struct SpaceSound { /* sbuts->flag */ #define SB_PRV_OSA 1 #define SB_PIN_CONTEXT 2 -#define SB_WORLD_TEX 4 -#define SB_BRUSH_TEX 8 +//#define SB_WORLD_TEX 4 //not used anymore +//#define SB_BRUSH_TEX 8 //not used anymore #define SB_SHADING_CONTEXT 16 +/* sbuts->texture_context */ +#define SB_TEXC_MAT_OR_LAMP 0 +#define SB_TEXC_WORLD 1 +#define SB_TEXC_BRUSH 2 +#define SB_TEXC_PARTICLES 3 + /* sbuts->align */ #define BUT_FREE 0 #define BUT_HORIZONTAL 1 @@ -714,7 +715,7 @@ enum FileSortTypeE { #define EDITING (1<<0) #define ACTIVEFILE (1<<1) #define BLENDERFILE (1<<2) -#define PSXFILE (1<<3) +#define BLENDERFILE_BACKUP (1<<3) #define IMAGEFILE (1<<4) #define MOVIEFILE (1<<5) #define PYSCRIPTFILE (1<<6) @@ -725,6 +726,7 @@ enum FileSortTypeE { #define FOLDERFILE (1<<11) /* represents folders for filtering */ #define BTXFILE (1<<12) #define COLLADAFILE (1<<13) +#define OPERATORFILE (1<<14) /* from filter_glob operator property */ /* SpaceImage->dt_uv */ #define SI_UVDT_OUTLINE 0 @@ -744,35 +746,35 @@ enum FileSortTypeE { #define SI_STICKY_VERTEX 2 /* SpaceImage->flag */ -#define SI_BE_SQUARE 1<<0 -#define SI_EDITTILE 1<<1 -#define SI_CLIP_UV 1<<2 -#define SI_DRAWTOOL 1<<3 -#define SI_DEPRECATED1 1<<4 /* stick UVs to others in the same location */ -#define SI_DRAWSHADOW 1<<5 -#define SI_SELACTFACE 1<<6 /* deprecated */ -#define SI_DEPRECATED2 1<<7 -#define SI_DEPRECATED3 1<<8 /* stick UV selection to mesh vertex (UVs wont always be touching) */ -#define SI_COORDFLOATS 1<<9 -#define SI_PIXELSNAP 1<<10 -#define SI_LIVE_UNWRAP 1<<11 -#define SI_USE_ALPHA 1<<12 -#define SI_SHOW_ALPHA 1<<13 -#define SI_SHOW_ZBUF 1<<14 +#define SI_BE_SQUARE (1<<0) +#define SI_EDITTILE (1<<1) +#define SI_CLIP_UV (1<<2) +#define SI_DRAWTOOL (1<<3) +#define SI_DEPRECATED1 (1<<4) /* stick UVs to others in the same location */ +#define SI_DRAWSHADOW (1<<5) +#define SI_SELACTFACE (1<<6) /* deprecated */ +#define SI_DEPRECATED2 (1<<7) +#define SI_DEPRECATED3 (1<<8) /* stick UV selection to mesh vertex (UVs wont always be touching) */ +#define SI_COORDFLOATS (1<<9) +#define SI_PIXELSNAP (1<<10) +#define SI_LIVE_UNWRAP (1<<11) +#define SI_USE_ALPHA (1<<12) +#define SI_SHOW_ALPHA (1<<13) +#define SI_SHOW_ZBUF (1<<14) /* next two for render window dislay */ -#define SI_PREVSPACE 1<<15 -#define SI_FULLWINDOW 1<<16 -#define SI_DEPRECATED4 1<<17 -#define SI_DEPRECATED5 1<<18 +#define SI_PREVSPACE (1<<15) +#define SI_FULLWINDOW (1<<16) +#define SI_DEPRECATED4 (1<<17) +#define SI_DEPRECATED5 (1<<18) /* this means that the image is drawn until it reaches the view edge, * in the image view, its unrelated to the 'tile' mode for texface */ -#define SI_DRAW_TILE 1<<19 -#define SI_SMOOTH_UV 1<<20 -#define SI_DRAW_STRETCH 1<<21 -#define SI_DISPGP 1<<22 -#define SI_DRAW_OTHER 1<<23 +#define SI_DRAW_TILE (1<<19) +#define SI_SMOOTH_UV (1<<20) +#define SI_DRAW_STRETCH (1<<21) +#define SI_DISPGP (1<<22) +#define SI_DRAW_OTHER (1<<23) -#define SI_COLOR_CORRECTION 1<<24 +#define SI_COLOR_CORRECTION (1<<24) /* SpaceIpo->flag (Graph Editor Settings) */ /* OLD DEPRECEATED SETTING */ @@ -800,6 +802,8 @@ enum FileSortTypeE { #define SIPO_TEMP_NEEDCHANSYNC (1<<10) /* don't perform realtime updates */ #define SIPO_NOREALTIMEUPDATES (1<<11) + /* don't draw curves with AA ("beauty-draw") for performance */ +#define SIPO_BEAUTYDRAW_OFF (1<<12) /* SpaceIpo->mode (Graph Editor Mode) */ enum { @@ -816,6 +820,7 @@ enum { // execution (see BPY_main.c) #define ST_FIND_WRAP 0x0020 #define ST_FIND_ALL 0x0040 +#define ST_SHOW_MARGIN 0x0080 /* stext->findstr/replacestr */ @@ -857,12 +862,6 @@ enum { #define B_IMASELHOME 451 #define B_IMASELREMOVEBIP 452 -#define C_BACK 0xBAAAAA -#define C_DARK 0x665656 -#define C_DERK 0x766666 -#define C_HI 0xCBBBBB -#define C_LO 0x544444 - /* nla->flag */ /* flags (1<<0), (1<<1), and (1<<3) are depreceated flags from old blenders */ /* draw timing in seconds instead of frames */ @@ -882,7 +881,7 @@ enum { /* only keyframes from active/selected channels get shown */ #define TIME_ONLYACTSEL 4 -/* time->redraws */ +/* time->redraws (now screen->redraws_flag) */ #define TIME_REGION 1 #define TIME_ALL_3D_WIN 2 #define TIME_ALL_ANIM_WIN 4 @@ -930,6 +929,7 @@ enum { /* space types, moved from DNA_screen_types.h */ +/* Do NOT change order, append on end. types are hardcoded needed */ enum { SPACE_EMPTY, SPACE_VIEW3D, diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index d89d15fa302..f805ced5dac 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_text_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +28,11 @@ */ #ifndef DNA_TEXT_TYPES_H #define DNA_TEXT_TYPES_H +/** \file DNA_text_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + */ #include "DNA_listBase.h" #include "DNA_ID.h" @@ -48,7 +51,7 @@ typedef struct TextMarker { int lineno, start, end, pad1; /* line number and start/end character indices */ int group, flags; /* see BKE_text.h for flag defines */ - char color[4], pad[4]; /* draw color of the marker */ + unsigned char color[4], pad[4]; /* draw color of the marker */ } TextMarker; typedef struct Text { diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index e9e058cbbd6..572a2282d45 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_texture_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,9 +29,19 @@ #ifndef DNA_TEXTURE_TYPES_H #define DNA_TEXTURE_TYPES_H +/** \file DNA_texture_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + */ + #include "DNA_ID.h" #include "DNA_image_types.h" /* ImageUser */ +#ifdef __cplusplus +extern "C" { +#endif + struct AnimData; struct Ipo; struct PluginTex; @@ -73,9 +81,9 @@ typedef struct MTex { float densfac, scatterfac, reflfac; /* particles */ - float timefac, lengthfac, clumpfac; - float kinkfac, roughfac, padensfac; - float lifefac, sizefac, ivelfac, pvelfac; + float timefac, lengthfac, clumpfac, dampfac; + float kinkfac, roughfac, padensfac, gravityfac; + float lifefac, sizefac, ivelfac, fieldfac; /* lamp */ float shadowfac; @@ -220,7 +228,7 @@ typedef struct Tex { float vn_mexp; short vn_distm, vn_coltype; - short noisedepth, noisetype; + short noisedepth, noisetype; /* noisedepth MUST be <= 30 else we get floating point exceptions */ /* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */ short noisebasis, noisebasis2; @@ -450,7 +458,11 @@ typedef struct TexMapping { #define MTEX_VIEWSPACE 16 #define MTEX_DUPLI_MAPTO 32 #define MTEX_OB_DUPLI_ORIG 64 -#define MTEX_NEW_BUMP 128 +#define MTEX_COMPAT_BUMP 128 +#define MTEX_3TAP_BUMP 256 +#define MTEX_5TAP_BUMP 512 +#define MTEX_BUMP_OBJECTSPACE 1024 +#define MTEX_BUMP_TEXTURESPACE 2048 /* blendtype */ #define MTEX_BLEND 0 @@ -548,11 +560,17 @@ typedef struct TexMapping { #define TEX_VD_RAW_16BIT 2 #define TEX_VD_IMAGE_SEQUENCE 3 #define TEX_VD_SMOKE 4 +/* for voxels which use VoxelData->source_path */ +#define TEX_VD_IS_SOURCE_PATH(_format) (ELEM3(_format, TEX_VD_BLENDERVOXEL, TEX_VD_RAW_8BIT, TEX_VD_RAW_16BIT)) /* smoke data types */ #define TEX_VD_SMOKEDENSITY 0 #define TEX_VD_SMOKEHEAT 1 #define TEX_VD_SMOKEVEL 2 +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 153b6acd525..d66f612155a 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -1,6 +1,4 @@ -/** - * blenkernel/DNA_userdef_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,10 +29,20 @@ #ifndef DNA_USERDEF_TYPES_H #define DNA_USERDEF_TYPES_H +/** \file DNA_userdef_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + * + */ #include "DNA_listBase.h" #include "DNA_texture_types.h" /* ColorBand */ +#ifdef __cplusplus +extern "C" { +#endif + /* themes; defines in BIF_resource.h */ struct ColorBand; @@ -45,7 +53,7 @@ struct ColorBand; /* default uifont_id offered by Blender */ #define UIFONT_DEFAULT 0 -#define UIFONT_BITMAP 1 +/*#define UIFONT_BITMAP 1*/ /*UNUSED*/ /* free slots */ #define UIFONT_CUSTOM1 2 #define UIFONT_CUSTOM2 3 @@ -84,6 +92,7 @@ typedef struct uiFontStyle { /* this is fed to the layout engine and widget code */ + typedef struct uiStyle { struct uiStyle *next, *prev; @@ -154,13 +163,13 @@ typedef struct ThemeSpace { /* main window colors */ char back[4]; char title[4]; - char text[4]; + char text[4]; char text_hi[4]; /* header colors */ char header[4]; char header_title[4]; - char header_text[4]; + char header_text[4]; char header_text_hi[4]; /* button/tool regions */ @@ -172,7 +181,7 @@ typedef struct ThemeSpace { /* listview regions */ char list[4]; char list_title[4]; - char list_text[4]; + char list_text[4]; char list_text_hi[4]; /* float panel */ @@ -195,6 +204,7 @@ typedef struct ThemeSpace { char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4]; char face[4], face_select[4]; // solid faces char face_dot[4]; // selected color + char extra_edge_len[4], extra_face_angle[4], extra_face_area[4], pad3[4]; char normal[4]; char vertex_normal[4]; char bone_solid[4], bone_pose[4]; @@ -347,7 +357,7 @@ typedef struct UserDef { short tw_hotspot, tw_flag, tw_handlesize, tw_size; short textimeout,texcollectrate; short wmdrawmethod; /* removed wmpad */ - short pad2; + short dragthreshold; int memcachelimit; int prefetchframes; short frameserverport; @@ -375,6 +385,9 @@ typedef struct UserDef { short autokey_mode; /* autokeying mode */ short autokey_flag; /* flags for autokeying */ + + short text_render, pad9; /*options for text rendering*/ + float pad10; struct ColorBand coba_weight; /* from texture.h */ @@ -399,16 +412,16 @@ extern UserDef U; /* from blenkernel blender.c */ /* flag */ #define USER_AUTOSAVE (1 << 0) -#define USER_AUTOGRABGRID (1 << 1) /* deprecated */ -#define USER_AUTOROTGRID (1 << 2) /* deprecated */ -#define USER_AUTOSIZEGRID (1 << 3) /* deprecated */ +/*#define USER_AUTOGRABGRID (1 << 1) deprecated */ +/*#define USER_AUTOROTGRID (1 << 2) deprecated */ +/*#define USER_AUTOSIZEGRID (1 << 3) deprecated */ #define USER_SCENEGLOBAL (1 << 4) #define USER_TRACKBALL (1 << 5) -#define USER_DUPLILINK (1 << 6) -#define USER_FSCOLLUM (1 << 7) +/*#define USER_DUPLILINK (1 << 6) deprecated */ +/*#define USER_FSCOLLUM (1 << 7) deprecated */ #define USER_MAT_ON_OB (1 << 8) /*#define USER_NO_CAPSLOCK (1 << 9)*/ /* not used anywhere */ -#define USER_VIEWMOVE (1 << 10) +/*#define USER_VIEWMOVE (1 << 10)*/ /* not used anywhere */ #define USER_TOOLTIPS (1 << 11) #define USER_TWOBUTTONMOUSE (1 << 12) #define USER_NONUMPAD (1 << 13) @@ -424,6 +437,7 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_FILENOUI (1 << 23) #define USER_NONEGFRAMES (1 << 24) #define USER_TXT_TABSTOSPACES_DISABLE (1 << 25) +#define USER_TOOLTIPS_PYTHON (1 << 26) /* helper macro for checking frame clamping */ #define FRAMENUMBER_MIN_CLAMP(cfra) \ @@ -445,10 +459,10 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_DRAWVIEWINFO (1 << 4) #define USER_PLAINMENUS (1 << 5) // old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase // old flag for hide pulldown was here -#define USER_FLIPFULLSCREEN (1 << 7) +/*#define USER_FLIPFULLSCREEN (1 << 7)*/ /* deprecated */ #define USER_ALLWINCODECS (1 << 8) #define USER_MENUOPENAUTO (1 << 9) -#define USER_PANELPINNED (1 << 10) /* deprecated */ +/*#define USER_PANELPINNED (1 << 10) deprecated */ #define USER_AUTOPERSP (1 << 11) #define USER_LOCKAROUND (1 << 12) #define USER_GLOBALUNDO (1 << 13) @@ -467,6 +481,8 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_ZOOM_INVERT (1 << 25) #define USER_ZOOM_DOLLY_HORIZ (1 << 26) #define USER_SPLASH_DISABLE (1 << 27) +#define USER_HIDE_RECENT (1 << 28) +#define USER_SHOW_THUMBNAILS (1 << 29) /* Auto-Keying mode */ /* AUTOKEY_ON is a bitflag */ @@ -483,20 +499,20 @@ extern UserDef U; /* from blenkernel blender.c */ #define AUTOKEY_FLAG_INSERTNEEDED (1<<1) #define AUTOKEY_FLAG_AUTOMATKEY (1<<2) #define AUTOKEY_FLAG_XYZ2RGB (1<<3) - /* U.autokey_flag (strictly autokeying only) */ + +/* toolsettings->autokey_flag */ #define AUTOKEY_FLAG_ONLYKEYINGSET (1<<6) - /* toolsettings->autokey_flag */ #define ANIMRECORD_FLAG_WITHNLA (1<<10) /* transopts */ #define USER_TR_TOOLTIPS (1 << 0) #define USER_TR_BUTTONS (1 << 1) #define USER_TR_MENUS (1 << 2) -#define USER_TR_FILESELECT (1 << 3) -#define USER_TR_TEXTEDIT (1 << 4) +/*#define USER_TR_FILESELECT (1 << 3) deprecated*/ +/*#define USER_TR_TEXTEDIT (1 << 4) deprecated*/ #define USER_DOTRANSLATE (1 << 5) #define USER_USETEXTUREFONT (1 << 6) -#define CONVERT_TO_UTF8 (1 << 7) +/*#define CONVERT_TO_UTF8 (1 << 7) deprecated*/ /* dupflag */ #define USER_DUP_MESH (1 << 0) @@ -513,7 +529,7 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_DUP_PSYS (1 << 11) /* gameflags */ -#define USER_DEPRECATED_FLAG 1 +// #define USER_DEPRECATED_FLAG 1 // #define USER_DISABLE_SOUND 2 deprecated, don't use without checking for // backwards compatibilty in do_versions! #define USER_DISABLE_MIPMAP 4 @@ -527,6 +543,9 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_DRAW_AUTOMATIC 3 #define USER_DRAW_OVERLAP_FLIP 4 +/* text draw options*/ +#define USER_TEXT_DISABLE_AA (1 << 0) + /* tw_flag (transform widget) */ /* gp_settings (Grease Pencil Settings) */ @@ -561,4 +580,8 @@ extern UserDef U; /* from blenkernel blender.c */ #define TH_OLDSKOOL 3 #define TH_SHADED 4 +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h index 5d6f1039ed5..2d7804c3d1d 100644 --- a/source/blender/makesdna/DNA_vec_types.h +++ b/source/blender/makesdna/DNA_vec_types.h @@ -1,6 +1,4 @@ -/** - * vec_types.h dec 2000 Nzc - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -32,18 +30,26 @@ #ifndef DNA_VEC_TYPES_H #define DNA_VEC_TYPES_H +/** \file DNA_vec_types.h + * \ingroup DNA + * \since dec-2000 + * \author nzc + */ /* types */ + +/** vector of two shorts. */ typedef struct vec2s { short x, y; } vec2s; +/** vector of two floats. */ typedef struct vec2f { float x, y; } vec2f; /* not used at the moment */ -#if 0 +/* typedef struct vec2i { int x, y; } vec2i; @@ -75,13 +81,15 @@ typedef struct vec4f { typedef struct vec4d { double x, y, z, w; } vec4d; -#endif +*/ +/** integer rectangle. */ typedef struct rcti { int xmin, xmax; int ymin, ymax; } rcti; +/** float rectangle. */ typedef struct rctf { float xmin, xmax; float ymin, ymax; diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h index 8a96d8574c2..ec576055b55 100644 --- a/source/blender/makesdna/DNA_vfont_types.h +++ b/source/blender/makesdna/DNA_vfont_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_vfont_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,12 @@ #ifndef DNA_VFONT_TYPES_H #define DNA_VFONT_TYPES_H +/** \file DNA_vfont_types.h + * \ingroup DNA + * \since mar-2001 + * \author nzc + */ + #include "DNA_ID.h" struct PackedFile; @@ -46,7 +50,7 @@ typedef struct VFont { } VFont; /* *************** FONT ****************** */ - +#define FO_EDIT 0 #define FO_CURS 1 #define FO_CURSUP 2 #define FO_CURSDOWN 3 @@ -55,5 +59,6 @@ typedef struct VFont { #define FO_PAGEDOWN 9 #define FO_SELCHANGE 10 +#define FO_BUILTIN_NAME "<builtin>" #endif diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 75ad1e644d1..ac1d3409153 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_view2d_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_VIEW2D_TYPES_H #define DNA_VIEW2D_TYPES_H +/** \file DNA_view2d_types.h + * \ingroup DNA + */ + #include "DNA_vec_types.h" /* ---------------------------------- */ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 520fc56162c..3ffef475e1b 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_view3d_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_VIEW3D_TYPES_H #define DNA_VIEW3D_TYPES_H +/** \file DNA_view3d_types.h + * \ingroup DNA + */ + struct ViewDepths; struct Object; struct Image; @@ -89,14 +91,16 @@ typedef struct RegionView3D { /* transform widget matrix */ float twmat[4][4]; - - float viewquat[4], dist, zfac; /* zfac is initgrabz() result */ - float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */ - float pixsize; - float ofs[3]; - short camzoom, viewbut; + + float viewquat[4]; /* view rotation, must be kept normalized */ + float dist; /* distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs' */ + float zfac; /* initgrabz() result */ + float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */ + float pixsize; /* runtime only */ + float ofs[3]; /* view center & orbit pivot, negative of worldspace location */ + short camzoom; short twdrawflag; - short pad; + int pad; short rflag, viewlock; short persp; @@ -120,7 +124,7 @@ typedef struct RegionView3D { /* last view */ float lviewquat[4]; - short lpersp, lview; + short lpersp, lview; /* lpersp can never be set to 'RV3D_CAMOB' */ float gridview; float twangle[3]; @@ -139,7 +143,7 @@ typedef struct View3D { float viewquat[4], dist, pad1; /* XXX depricated */ - int lay_used; /* used while drawing */ + unsigned int lay_used; /* used while drawing */ short persp; /* XXX depricated */ short view; /* XXX depricated */ @@ -153,13 +157,14 @@ typedef struct View3D { char ob_centre_bone[32]; /* optional string for armature bone to define center */ - int lay, layact; + unsigned int lay; + int layact; /** * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID, * OB_SHADED or OB_TEXTURE */ short drawtype; - short pad2; + short ob_centre_cursor; /* optional bool for 3d cursor to define center */ short scenelock, around, pad3; short flag, flag2; @@ -167,7 +172,7 @@ typedef struct View3D { float lens, grid; float gridview; /* XXX deprecated, now in RegionView3D */ - float padf, near, far; + float near, far; float ofs[3]; /* XXX deprecated */ float cursor[3]; @@ -181,9 +186,6 @@ typedef struct View3D { short twtype, twmode, twflag; short twdrawflag; /* XXX deprecated */ - /* customdata flags from modes */ - unsigned int customdata_mask; - /* afterdraw, for xray & transparent */ struct ListBase afterdraw_transp; struct ListBase afterdraw_xray; @@ -202,20 +204,13 @@ typedef struct View3D { } View3D; -/* XXX this needs cleaning */ /* View3D->flag (short) */ -#define V3D_MODE (16+32+64+128+256+512) -#define V3D_DISPIMAGE 1 +/*#define V3D_DISPIMAGE 1*/ /*UNUSED*/ #define V3D_DISPBGPICS 2 #define V3D_HIDE_HELPLINES 4 #define V3D_INVALID_BACKBUF 8 -#define V3D_EDITMODE 16 -#define V3D_VERTEXPAINT 32 -#define V3D_FACESELECT 64 -#define V3D_POSEMODE 128 -#define V3D_TEXTUREPAINT 256 -#define V3D_WEIGHTPAINT 512 + #define V3D_ALIGN 1024 #define V3D_SELECT_OUTLINE 2048 #define V3D_ZBUF_SELECT 4096 @@ -228,7 +223,6 @@ typedef struct View3D { #define RV3D_CAMOB 2 /* RegionView3d->rflag */ -#define RV3D_FLYMODE 2 #define RV3D_CLIPPING 4 #define RV3D_NAVIGATING 8 #define RV3D_GPULIGHT_UPDATE 16 @@ -293,12 +287,15 @@ typedef struct View3D { /* USE = user setting, DRAW = based on selection */ #define V3D_USE_MANIPULATOR 1 #define V3D_DRAW_MANIPULATOR 2 -#define V3D_CALC_MANIPULATOR 4 +/* #define V3D_CALC_MANIPULATOR 4 */ /*UNUSED*/ /* BGPic->flag */ /* may want to use 1 for select ?*/ #define V3D_BGPIC_EXPANDED 2 +#define RV3D_CAMZOOM_MIN -30 +#define RV3D_CAMZOOM_MAX 600 + #endif diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 07aef5a5328..1325272d94f 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,10 @@ #ifndef DNA_WINDOWMANAGER_TYPES_H #define DNA_WINDOWMANAGER_TYPES_H +/** \file DNA_windowmanager_types.h + * \ingroup DNA + */ + #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -81,16 +85,20 @@ typedef enum ReportType { enum ReportListFlags { RPT_PRINT = 1, RPT_STORE = 2, - RPT_FREE = 4, + RPT_FREE = 4 }; +# +# typedef struct Report { struct Report *next, *prev; short type; /* ReportType */ short flag; int len; /* strlen(message), saves some time calculating the word wrap */ - char *typestr; - char *message; + const char *typestr; + const char *message; } Report; + +/* saved in the wm, dont remove */ typedef struct ReportList { ListBase list; int printlevel; /* ReportType */ @@ -100,6 +108,8 @@ typedef struct ReportList { } ReportList; /* timer customdata to control reports display */ +# +# typedef struct ReportTimerInfo { float col[3]; float greyscale; @@ -140,8 +150,8 @@ typedef struct wmWindowManager { } wmWindowManager; /* wmWindowManager.initialized */ -#define WM_INIT_WINDOW 1<<0 -#define WM_INIT_KEYMAP 1<<1 +#define WM_INIT_WINDOW (1<<0) +#define WM_INIT_KEYMAP (1<<1) /* the savable part, rest of data is local in ghostwinlay */ typedef struct wmWindow { @@ -163,9 +173,10 @@ typedef struct wmWindow { short monitor; /* multiscreen... no idea how to store yet */ short active; /* set to 1 if an active window, for quick rejects */ short cursor; /* current mouse cursor type */ - short lastcursor; /* for temp waitcursor */ + short lastcursor; /* previous cursor when setting modal one */ + short modalcursor; /* the current modal cursor */ short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */ - short pad2[2]; + short pad2; struct wmEvent *eventstate; /* storage for event system */ @@ -223,7 +234,7 @@ typedef struct wmKeyMapItem { /* runtime */ short maptype; /* keymap editor */ - short id; /* unique identifier */ + short id; /* unique identifier. Positive for kmi that override builtins, negative otherwise */ short pad; struct PointerRNA *ptr; /* rna pointer to access properties */ } wmKeyMapItem; @@ -308,7 +319,7 @@ typedef struct wmOperator { typedef enum wmRadialControlMode { WM_RADIALCONTROL_SIZE, WM_RADIALCONTROL_STRENGTH, - WM_RADIALCONTROL_ANGLE, + WM_RADIALCONTROL_ANGLE } wmRadialControlMode; #endif /* DNA_WINDOWMANAGER_TYPES_H */ diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 42c80f4b8b5..71d907f1c12 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -1,6 +1,4 @@ -/** - * blenlib/DNA_world_types.h (mar-2001 nzc) - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +29,10 @@ #ifndef DNA_WORLD_TYPES_H #define DNA_WORLD_TYPES_H +/** \file DNA_world_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" struct AnimData; @@ -140,7 +142,7 @@ typedef struct World { /* mode */ #define WO_MIST 1 #define WO_STARS 2 -#define WO_DOF 4 +/*#define WO_DOF 4*/ #define WO_ACTIVITY_CULLING 8 #define WO_ENV_LIGHT 16 #define WO_DBVT_CULLING 32 diff --git a/source/blender/makesdna/Makefile b/source/blender/makesdna/Makefile deleted file mode 100644 index f83a6288e8d..00000000000 --- a/source/blender/makesdna/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# $Id$ -# -# ***** 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. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# -# This module does not build normal .o's, but a DNA.c file, to be -# compiled with the rest of the sources. To speed things up a little, -# the compilation is done here. -# -# Bounces make to subdirectories. - -SOURCEDIR = source/blender/makesdna -DIRS = intern - -include nan_subdirs.mk diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 0eb42373d6d..bb95e2c0fbc 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -1,3 +1,4 @@ +# -*- mode: cmake; indent-tabs-mode: t; -*- # $Id$ # ***** BEGIN GPL LICENSE BLOCK ***** # @@ -24,22 +25,45 @@ # # ***** END GPL LICENSE BLOCK ***** -INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..) -FILE(GLOB INC_FILES ../*.h) +# message(STATUS "Configuring makesdna") + +blender_include_dirs( + ../../../../intern/guardedalloc + ../../blenloader + .. +) # Build makesdna executable -SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mmap_win.c) -ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES}) +set(SRC + makesdna.c + ../../../../intern/guardedalloc/intern/mallocn.c +) + +if(WIN32 AND NOT UNIX) + list(APPEND SRC + ../../../../intern/guardedalloc/intern/mmap_win.c + ) +endif() + +# SRC_DNA_INC is defined in the parent dir + +add_executable(makesdna ${SRC} ${SRC_DNA_INC}) # Output dna.c -ADD_CUSTOM_COMMAND( +add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/ DEPENDS makesdna ) # Build bf_dna library -SET(SRC dna_genfile.c dna.c) -BLENDERLIB(bf_dna "${SRC}" "${INC}") +set(INC +) + +set(SRC + dna_genfile.c + dna.c + ${SRC_DNA_INC} +) -MESSAGE(STATUS "Configuring makesdna") +blender_add_lib(bf_dna "${SRC}" "${INC}") diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile deleted file mode 100644 index 55b0c42acda..00000000000 --- a/source/blender/makesdna/intern/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# $Id$ -# -# ***** 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. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = dna -DIR = $(OCGDIR)/blender/makesdna -CSRCS = DNA.c $(wildcard dna_*.c) - -include nan_compile.mk - -CFLAGS += $(LEVEL_1_C_WARNINGS) - -CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include -CPPFLAGS += -I../../blenlib -CPPFLAGS += -I.. - -ifeq ($(OS),windows) - # Windows needs these extra libs because of winstuff... It is not - # _really_ needed, but it is the easiest fix for now. If you have - # some spare time, try to trace down the exact dep. Then again, you - # could also spend that time making the sdna system more robust. - ifneq ($(FREE_WINDOWS),true) - WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib - WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib - WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib - WINLIBS += /link /nodefaultlib:libc - else - LDFLAGS += -mwindows -mno-cygwin - endif -endif - -ifeq ($(OS), darwin) - LDFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS) -endif - -clean:: - @$(RM) $(DIR)/makesdna* $(DIR)/DNA.c - @$(RM) $(DIR)/debug/makesdna* $(DIR)/debug/DNA.c - -# TODO include right .mk for ldflags - -# A small note: we do not use the debug version of the alloc lib. That -# is done quite intentionally. If there is a bug in that lib, it needs -# to be fixed by the module maintainer. -DNAOBJS = $(filter-out %DNA.o, $(OBJS)) - -$(DIR)/$(DEBUG_DIR)makesdna: $(DNAOBJS) $(DIR)/$(DEBUG_DIR)makesdna.o $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a - $(CC) $(LDFLAGS) -o $@ $^ - -$(DIR)/$(DEBUG_DIR)DNA.c: $(DIR)/$(DEBUG_DIR)makesdna - ifeq ($(OS),windows) - $(SRCHOME)/tools/cygwin/cl_wrapper.pl - $(DIR)/$(DEBUG_DIR)makesdna \ - $(DIR)/$(DEBUG_DIR)DNA.c - else - $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(DEBUG_DIR)DNA.c - endif - -$(DIR)/$(DEBUG_DIR)makesdna.o: makesdna.c $(wildcard ../*.h) - $(CC) -c $(CFLAGS) $(CPPFLAGS) makesdna.c -o $@ - diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index ac897eaed14..23a71ae104e 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -3,7 +3,7 @@ import sys import os def normpath(path): - return os.path.abspath(os.path.normpath(path)) + return os.path.abspath(os.path.normpath(path)) Import ('env') cflags = '' @@ -18,21 +18,25 @@ dna = env.Clone() makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ') makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc', +<<<<<<< .working '../../makesdna', '../', '../../bmesh']) +======= + '../../makesdna', '../../blenloader']) +>>>>>>> .merge-right.r35190 if env['OURPLATFORM'] == 'linuxcross': - USE_WINE = True # when cross compiling on linux 64bit this is useful + USE_WINE = True # when cross compiling on linux 64bit this is useful else: - USE_WINE = False + USE_WINE = False if not USE_WINE: - if env['OURPLATFORM'] == 'linuxcross': - makesdna_tool.Replace(CC='gcc') - makesdna_tool.Replace(AR='ar') - makesdna_tool.Replace(LINK='gcc') + if env['OURPLATFORM'] == 'linuxcross': + makesdna_tool.Replace(CC='gcc') + makesdna_tool.Replace(AR='ar') + makesdna_tool.Replace(LINK='gcc') if sys.platform != 'cygwin': - makesdna_tool.Append (CCFLAGS = cflags) + makesdna_tool.Append (CCFLAGS = cflags) makesdna_tool.Append (CPPDEFINES = defines) makesdna_tool.Append( CFLAGS = env['CFLAGS']) makesdna_tool.Append( CCFLAGS = env['CCFLAGS']) @@ -40,15 +44,15 @@ makesdna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS']) targetdir = normpath(root_build_dir+'/lib') if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - targetdir = '#'+targetdir + targetdir = '#'+targetdir makesdna_tool.Append (LIBPATH = targetdir) if env['BF_PROFILE']: - makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_LINKFLAGS']) + makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_LINKFLAGS']) targetdir = normpath(root_build_dir + '/makesdna') if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - targetdir = '#' + targetdir + targetdir = '#' + targetdir #root_build_dir = "#" makesdna = makesdna_tool.Program (target = targetdir, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_blenlib']) @@ -60,11 +64,12 @@ dna.Depends ('dna.c', header_files) ap = os.path.abspath if env['OURPLATFORM'] != 'linuxcross': - if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): - dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") - else: - dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): + dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") + else: + dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") else: +<<<<<<< .working if USE_WINE: dna.Command ('dna.c', '', 'wine ' + ap(root_build_dir+os.sep+"makesdna $TARGET")) else: @@ -72,6 +77,12 @@ else: dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") else: dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET") +======= + if USE_WINE: + dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET") + else: + dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") +>>>>>>> .merge-right.r35190 obj = ['intern/dna.c', 'intern/dna_genfile.c'] Return ('obj') diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index fd98fd4ef08..3b6aafaffa0 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -31,6 +31,11 @@ * DNA handling */ +/** \file blender/makesdna/intern/dna_genfile.c + * \ingroup DNA + */ + + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -43,7 +48,7 @@ /* gcc 4.1 on mingw was complaining that __int64 was already defined actually is saw the line below as typedef long long long long... -Anyhow, since its already defined, its safe to do an ifndef here- Cambpell*/ +Anyhow, since its already defined, its safe to do an ifndef here- Campbell */ #ifdef FREE_WINDOWS #ifndef __int64 typedef long long __int64; @@ -196,7 +201,7 @@ void DNA_sdna_free(SDNA *sdna) MEM_freeN(sdna); } -static int ispointer(char *name) +static int ispointer(const char *name) { /* check if pointer or function pointer */ return (name[0]=='*' || (name[0]=='(' && name[1]=='*')); @@ -206,7 +211,7 @@ static int elementsize(SDNA *sdna, short type, short name) /* call with numbers from struct-array */ { int mul, namelen, len; - char *cp; + const char *cp; cp= sdna->names[name]; len= 0; @@ -251,7 +256,7 @@ static void printstruct(SDNA *sdna, short strnr) } #endif -static short *findstruct_name(SDNA *sdna, char *str) +static short *findstruct_name(SDNA *sdna, const char *str) { int a; short *sp=0; @@ -502,7 +507,7 @@ static void recurs_test_compflags(SDNA *sdna, char *compflags, int structnr) { int a, b, typenr, elems; short *sp; - char *cp; + const char *cp; /* check all structs, test if it's inside another struct */ sp= sdna->structs[structnr]; @@ -546,7 +551,7 @@ char *DNA_struct_get_compareflags(SDNA *sdna, SDNA *newsdna) */ int a, b; short *spold, *spcur; - char *str1, *str2; + const char *str1, *str2; char *compflags; if(sdna->nr_structs==0) { @@ -627,7 +632,7 @@ char *DNA_struct_get_compareflags(SDNA *sdna, SDNA *newsdna) return compflags; } -static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char *olddata) +static void cast_elem(char *ctype, char *otype, const char *name, char *curdata, char *olddata) { double val = 0.0; int arrlen, curlen=1, oldlen=1, ctypenr, otypenr; @@ -721,7 +726,7 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char } } -static void cast_pointer(int curlen, int oldlen, char *name, char *curdata, char *olddata) +static void cast_pointer(int curlen, int oldlen, const char *name, char *curdata, char *olddata) { #ifdef WIN32 __int64 lval; @@ -764,7 +769,7 @@ static void cast_pointer(int curlen, int oldlen, char *name, char *curdata, char } } -static int elem_strcmp(char *name, char *oname) +static int elem_strcmp(const char *name, const char *oname) { int a=0; @@ -780,10 +785,10 @@ static int elem_strcmp(char *name, char *oname) return 0; } -static char *find_elem(SDNA *sdna, char *type, char *name, short *old, char *olddata, short **sppo) +static char *find_elem(SDNA *sdna, const char *type, const char *name, short *old, char *olddata, short **sppo) { int a, elemcount, len; - char *otype, *oname; + const char *otype, *oname; /* without arraypart, so names can differ: return old namenr and type */ @@ -811,7 +816,7 @@ static char *find_elem(SDNA *sdna, char *type, char *name, short *old, char *old return 0; } -static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, char *name, char *curdata, short *old, char *olddata) +static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, const char *name, char *curdata, short *old, char *olddata) { /* rules: test for NAME: - name equal: @@ -823,7 +828,8 @@ static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, char *nam can I force this?) */ int a, elemcount, len, array, oldsize, cursize, mul; - char *otype, *oname, *cp; + char *otype; + const char *oname, *cp; /* is 'name' an array? */ cp= name; @@ -868,6 +874,10 @@ static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, char *nam mul= len/oldsize; mul*= (cursize < oldsize)? cursize: oldsize; memcpy(curdata, olddata, mul); + + /* terminate strings */ + if(oldsize > cursize && strcmp(type, "char")==0) + curdata[mul-1]= 0; } else { if(cursize>oldsize) cast_elem(type, otype, oname, curdata, olddata); @@ -888,7 +898,8 @@ static void reconstruct_struct(SDNA *newsdna, SDNA *oldsdna, char *compflags, in */ int a, elemcount, elen, eleno, mul, mulo, firststructtypenr; short *spo, *spc, *sppo; - char *name, *nameo, *type, *cpo, *cpc; + char *type, *cpo, *cpc; + const char *name, *nameo; if(oldSDNAnr== -1) return; if(curSDNAnr== -1) return; @@ -965,7 +976,8 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data) */ int a, mul, elemcount, elen, elena, firststructtypenr; short *spo, *spc, skip; - char *name, *type, *cpo, *cur, cval; + char *type, *cpo, *cur, cval; + const char *name; if(oldSDNAnr== -1) return; firststructtypenr= *(oldsdna->structs[0]); @@ -1095,7 +1107,7 @@ void *DNA_struct_reconstruct(SDNA *newsdna, SDNA *oldsdna, char *compflags, int return cur; } -int DNA_elem_offset(SDNA *sdna, char *stype, char *vartype, char *name) +int DNA_elem_offset(SDNA *sdna, const char *stype, const char *vartype, const char *name) { int SDNAnr= DNA_struct_find_nr(sdna, stype); diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 7a2d659755a..711d7a08687 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,9 +25,13 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file makesdna.c + * \brief Struct muncher for making SDNA. + * \ingroup DNA * - * Struct muncher for making SDNA - * + * \section aboutmakesdnac About makesdna tool * Originally by Ton, some mods by Frank, and some cleaning and * extension by Nzc. * @@ -42,7 +46,7 @@ * and the offsets for reaching a particular one. * * There is a facility to get verbose output from sdna. Search for - * debugSDNA. This int can be set to 0 (no output) to some int. Higher + * \ref debugSDNA. This int can be set to 0 (no output) to some int. Higher * numbers give more output. * */ @@ -62,7 +66,7 @@ /* Included the path relative from /source/blender/ here, so we can move */ /* headers around with more freedom. */ -char *includefiles[] = { +const char *includefiles[] = { // if you add files here, please add them at the end // of makesdna.c (this file) as well @@ -145,7 +149,8 @@ short **structs, *structdata; /* at sp= structs[a] is the first address of a str sp[0] is type number sp[1] is amount of elements sp[2] sp[3] is typenr, namenr (etc) */ -/* +/** + * Variable to control debug output of makesdna. * debugSDNA: * - 0 = no output, except errors * - 1 = detail actions @@ -160,12 +165,15 @@ int additional_slen_offset; /* ************************************************************************** */ /** - * Add type <str> to struct indexed by <len>, if it was not yet found. + * Add type \c str to struct indexed by \c len, if it was not yet found. + * \param str char + * \param len int */ -int add_type(char *str, int len); +int add_type(const char *str, int len); /** - * Add variable <str> to + * Add variable \c str to + * \param str */ int add_name(char *str); @@ -214,7 +222,7 @@ void printStructLenghts(void); /* ************************* MAKEN DNA ********************** */ -int add_type(char *str, int len) +int add_type(const char *str, int len) { int nr; char *cp; @@ -244,7 +252,7 @@ int add_type(char *str, int len) if(nr_types>=maxnr) { printf("too many types\n"); - return nr_types-1;; + return nr_types-1; } nr_types++; @@ -269,7 +277,7 @@ int add_name(char *str) additional_slen_offset = 0; - if((str[0]==0) /* || (str[1]==0) */) return -1; + if(str[0]==0 /* || (str[1]==0) */) return -1; if (str[0] == '(' && str[1] == '*') { /* we handle function pointer and special array cases here, e.g. @@ -281,7 +289,6 @@ int add_name(char *str) if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer or multidim array pointer found\n"); /* functionpointer: transform the type (sometimes) */ i = 0; - j = 0; while (str[i] != ')') { buf[i] = str[i]; @@ -421,7 +428,11 @@ int preprocess_include(char *maindata, int len) int a, newlen, comment = 0; char *cp, *temp, *md; - temp= MEM_mallocN(len, "preprocess_include"); + /* note: len + 1, last character is a dummy to prevent + * comparisons using uninitialized memory */ + temp= MEM_mallocN(len + 1, "preprocess_include"); + temp[len]= ' '; + memcpy(temp, maindata, len); // remove all c++ comments @@ -1056,6 +1067,7 @@ int make_structDNA(char *baseDirectory, FILE *file) MEM_freeN(names); MEM_freeN(types); MEM_freeN(typelens); + MEM_freeN(alphalens); MEM_freeN(structs); if (debugSDNA > -1) printf("done.\n"); |