diff options
Diffstat (limited to 'source/blender/makesdna')
22 files changed, 433 insertions, 196 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 9e5212e159f..0c38421a3f5 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -155,40 +155,37 @@ typedef struct PreviewImage { #endif /* ID from database */ -#define ID_SCE MAKE_ID2('S', 'C') -#define ID_LI MAKE_ID2('L', 'I') -#define ID_OB MAKE_ID2('O', 'B') -#define ID_ME MAKE_ID2('M', 'E') -#define ID_CU MAKE_ID2('C', 'U') -#define ID_MB MAKE_ID2('M', 'B') -#define ID_MA MAKE_ID2('M', 'A') -#define ID_TE MAKE_ID2('T', 'E') -#define ID_IM MAKE_ID2('I', 'M') -#define ID_IK MAKE_ID2('I', 'K') -#define ID_WV MAKE_ID2('W', 'V') -#define ID_LT MAKE_ID2('L', 'T') -#define ID_SE MAKE_ID2('S', 'E') -#define ID_LF MAKE_ID2('L', 'F') -#define ID_LA MAKE_ID2('L', 'A') -#define ID_CA MAKE_ID2('C', 'A') -#define ID_IP MAKE_ID2('I', 'P') -#define ID_KE MAKE_ID2('K', 'E') -#define ID_WO MAKE_ID2('W', 'O') -#define ID_SCR MAKE_ID2('S', 'R') -#define ID_SCRN MAKE_ID2('S', 'N') -#define ID_VF MAKE_ID2('V', 'F') -#define ID_TXT MAKE_ID2('T', 'X') -#define ID_SO MAKE_ID2('S', 'O') -#define ID_GR MAKE_ID2('G', 'R') -#define ID_ID MAKE_ID2('I', 'D') -#define ID_AR MAKE_ID2('A', 'R') -#define ID_AC MAKE_ID2('A', 'C') -#define ID_SCRIPT MAKE_ID2('P', 'Y') -#define ID_NT MAKE_ID2('N', 'T') -#define ID_BR MAKE_ID2('B', 'R') -#define ID_PA MAKE_ID2('P', 'A') -#define ID_GD MAKE_ID2('G', 'D') -#define ID_WM MAKE_ID2('W', 'M') +#define ID_SCE MAKE_ID2('S', 'C') /* Scene */ +#define ID_LI MAKE_ID2('L', 'I') /* Library */ +#define ID_OB MAKE_ID2('O', 'B') /* Object */ +#define ID_ME MAKE_ID2('M', 'E') /* Mesh */ +#define ID_CU MAKE_ID2('C', 'U') /* Curve */ +#define ID_MB MAKE_ID2('M', 'B') /* MetaBall */ +#define ID_MA MAKE_ID2('M', 'A') /* Material */ +#define ID_TE MAKE_ID2('T', 'E') /* Texture */ +#define ID_IM MAKE_ID2('I', 'M') /* Image */ +#define ID_WV MAKE_ID2('W', 'V') /* Wave (unused) */ +#define ID_LT MAKE_ID2('L', 'T') /* Lattice */ +#define ID_LA MAKE_ID2('L', 'A') /* Lamp */ +#define ID_CA MAKE_ID2('C', 'A') /* Camera */ +#define ID_IP MAKE_ID2('I', 'P') /* Ipo (depreciated, replaced by FCurves) */ +#define ID_KE MAKE_ID2('K', 'E') /* Key (shape key) */ +#define ID_WO MAKE_ID2('W', 'O') /* World */ +#define ID_SCR MAKE_ID2('S', 'R') /* Screen */ +#define ID_SCRN MAKE_ID2('S', 'N') /* (depreciated?) */ +#define ID_VF MAKE_ID2('V', 'F') /* VectorFont */ +#define ID_TXT MAKE_ID2('T', 'X') /* Text */ +#define ID_SO MAKE_ID2('S', 'O') /* Sound */ +#define ID_GR MAKE_ID2('G', 'R') /* Group */ +#define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */ +#define ID_AR MAKE_ID2('A', 'R') /* Armature */ +#define ID_AC MAKE_ID2('A', 'C') /* Action */ +#define ID_SCRIPT MAKE_ID2('P', 'Y') /* Script (depreciated) */ +#define ID_NT MAKE_ID2('N', 'T') /* NodeTree */ +#define ID_BR MAKE_ID2('B', 'R') /* Brush */ +#define ID_PA MAKE_ID2('P', 'A') /* ParticleSettings */ +#define ID_GD MAKE_ID2('G', 'D') /* GreasePencil */ +#define ID_WM MAKE_ID2('W', 'M') /* WindowManager */ /* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */ #define ID_SEQ MAKE_ID2('S', 'Q') diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 318204e3dd8..3201a1df6a5 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -146,7 +146,9 @@ typedef struct bPoseChannel { float limitmin[3], limitmax[3]; /* DOF constraint */ float stiffness[3]; /* DOF stiffness */ float ikstretch; - + float ikrotweight; /* weight of joint rotation constraint */ + float iklinweight; /* weight of joint stretch constraint */ + float *path; /* totpath x 3 x float */ struct Object *custom; /* draws custom object instead of this channel */ } bPoseChannel; @@ -166,7 +168,8 @@ typedef enum ePchan_Flag { POSE_CHAIN = 0x0200, POSE_DONE = 0x0400, POSE_KEY = 0x1000, - POSE_STRIDE = 0x2000 + POSE_STRIDE = 0x2000, + POSE_IKTREE = 0x4000, } ePchan_Flag; /* PoseChannel constflag (constraint detection) */ @@ -190,28 +193,34 @@ typedef enum ePchan_IkFlag { BONE_IK_YLIMIT = (1<<4), BONE_IK_ZLIMIT = (1<<5), + BONE_IK_ROTCTL = (1<<6), + BONE_IK_LINCTL = (1<<7), + 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 */ -typedef enum ePchan_RotMode { +/* PoseChannel->rotmode and Object->rotmode */ +typedef enum eRotationModes { /* quaternion rotations (default, and for older Blender versions) */ - PCHAN_ROT_QUAT = 0, + ROT_MODE_QUAT = 0, /* euler rotations - keep in sync with enum in BLI_arithb.h */ - PCHAN_ROT_XYZ = 1, /* Blender 'default' (classic) - must be as 1 to sync with PoseChannel rotmode */ - PCHAN_ROT_XZY, - PCHAN_ROT_YXZ, - PCHAN_ROT_YZX, - PCHAN_ROT_ZXY, - PCHAN_ROT_ZYX, + ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with arithb defines */ + ROT_MODE_XYZ = 1, /* Blender 'default' (classic) - must be as 1 to sync with arithb defines */ + ROT_MODE_XZY, + ROT_MODE_YXZ, + ROT_MODE_YZX, + ROT_MODE_ZXY, + ROT_MODE_ZYX, /* NOTE: space is reserved here for 18 other possible * euler rotation orders not implemented */ + ROT_MODE_MAX, /* sentinel for Py API */ /* axis angle rotations */ - PCHAN_ROT_AXISANGLE = -1 -} ePchan_RotMode; + ROT_MODE_AXISANGLE = -1 +} eRotationModes; /* Pose ------------------------------------ */ @@ -233,7 +242,9 @@ typedef struct bPose { ListBase agroups; /* list of bActionGroups */ int active_group; /* index of active group (starts from 1) */ - int pad; + int iksolver; /* ik solver to use, see ePose_IKSolverType */ + void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */ + void *ikparam; /* IK solver parameters, structure depends on iksolver */ } bPose; @@ -249,8 +260,55 @@ typedef enum ePose_Flags { POSE_CONSTRAINTS_TIMEDEPEND = (1<<3), /* recalculate bone paths */ POSE_RECALCPATHS = (1<<4), + /* 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), } ePose_Flags; +/* IK Solvers ------------------------------------ */ + +/* bPose->iksolver and bPose->ikparam->iksolver */ +typedef enum { + IKSOLVER_LEGACY = 0, + IKSOLVER_ITASC, +} ePose_IKSolverType; + +/* header for all bPose->ikparam structures */ +typedef struct bIKParam { + int iksolver; +} bIKParam; + +/* bPose->ikparam when bPose->iksolver=1 */ +typedef struct bItasc { + int iksolver; + float precision; + short numiter; + short numstep; + float minstep; + float maxstep; + short solver; + short flag; + float feedback; + float maxvel; /* max velocity to SDLS solver */ + float dampmax; /* maximum damping for DLS solver */ + float dampeps; /* threshold of singular value from which the damping start progressively */ +} bItasc; + +/* bItasc->flag */ +typedef enum { + ITASC_AUTO_STEP = (1<<0), + ITASC_INITIAL_REITERATION = (1<<1), + ITASC_REITERATION = (1<<2), + ITASC_SIMULATION = (1<<3), +} eItasc_Flags; + +/* bItasc->solver */ +typedef enum { + ITASC_SOLVER_SDLS = 0, /* selective damped least square, suitable for CopyPose constraint */ + ITASC_SOLVER_DLS /* damped least square with numerical filtering of damping */ +} eItasc_Solver; + /* ************************************************ */ /* Action */ @@ -372,12 +430,13 @@ typedef enum DOPESHEET_FILTERFLAG { ADS_FILTER_NOSCE = (1<<15), ADS_FILTER_NOPART = (1<<16), ADS_FILTER_NOMBA = (1<<17), + ADS_FILTER_NOARM = (1<<18), /* NLA-specific filters */ ADS_FILTER_NLA_NOACT = (1<<20), /* if the AnimData block has no NLA data, don't include to just show Action-line */ /* 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_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM), } DOPESHEET_FILTERFLAG; /* DopeSheet general flags */ @@ -494,5 +553,4 @@ typedef enum ACHAN_FLAG { 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 278da27faf9..58fa38ae159 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -142,7 +142,7 @@ typedef struct bGroupActuator { char name[32]; /* property or groupkey */ short pad[3], cur, butsta, butend;/* not referenced, can remove? */ - struct Group *group; /* only during game */ + /* struct Group *group; not used, remove */ } bGroupActuator; @@ -224,6 +224,15 @@ typedef struct bStateActuator { unsigned int mask; /* the bits to change */ } bStateActuator; +typedef struct bArmatureActuator { + char posechannel[32]; + char constraint[32]; + int type; /* 0=run, 1=enable, 2=disable, 3=set target, 4=set weight */ + float weight; + struct Object *target; + struct Object *subtarget; +} bArmatureActuator; + typedef struct bActuator { struct bActuator *next, *prev, *mynew; short type; @@ -295,6 +304,7 @@ typedef struct FreeCamera { #define ACT_PARENT 20 #define ACT_SHAPEACTION 21 #define ACT_STATE 22 +#define ACT_ARMATURE 23 /* actuator flag */ #define ACT_SHOW 1 @@ -484,6 +494,15 @@ typedef struct FreeCamera { #define ACT_PARENT_COMPOUND 1 #define ACT_PARENT_GHOST 2 +/* armatureactuator->type */ +#define ACT_ARM_RUN 0 +#define ACT_ARM_ENABLE 1 +#define ACT_ARM_DISABLE 2 +#define ACT_ARM_SETTARGET 3 +#define ACT_ARM_SETWEIGHT 4 +/* update this define if more type are addedd */ +#define ACT_ARM_MAXTYPE 4 + #endif diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index f75ed273164..9921878e926 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -632,7 +632,7 @@ typedef enum eKSP_TemplateTypes { KSP_TEMPLATE_CONSTRAINT = (1<<2), /* #con - active only */ KSP_TEMPLATE_NODE = (1<<3), /* #nod - selected node */ - KSP_TEMPLATE_PCHAN_ROT = (1<<16), /* modify rotation paths based on rotation mode of Pose Channel */ + KSP_TEMPLATE_ROT = (1<<16), /* modify rotation paths based on rotation mode of Object or Pose Channel */ } eKSP_TemplateTypes; /* ---------------- */ @@ -763,6 +763,11 @@ typedef enum eAnimData_Flag { /* don't execute drivers */ ADT_DRIVERS_DISABLED = (1<<11), + /* AnimData block is selected in UI */ + ADT_UI_SELECTED = (1<<14), + /* AnimData block is active in UI */ + ADT_UI_ACTIVE = (1<<15), + /* F-Curves from this AnimData block are not visible in the Graph Editor */ ADT_CURVES_NOT_VISIBLE = (1<<16), } eAnimData_Flag; diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index bb60fb107ff..590e7dadcdc 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -31,6 +31,8 @@ #include "DNA_listBase.h" #include "DNA_ID.h" +struct AnimData; + /* this system works on different transformation space levels; 1) Bone Space; with each Bone having own (0,0,0) origin @@ -69,6 +71,7 @@ typedef struct Bone { typedef struct bArmature { ID id; + struct AnimData *adt; ListBase bonebase; ListBase chainbase; ListBase *edbo; /* editbone listbase, we use pointer so we can check state */ @@ -102,7 +105,8 @@ typedef enum eArmature_Flag { 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_GHOST_ONLYSEL = (1<<12) /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ + ARM_GHOST_ONLYSEL = (1<<12), /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ + ARM_DS_EXPAND = (1<<13) } eArmature_Flag; /* armature->drawtype */ diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index a3a1a342584..1bbccd20486 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -56,7 +56,7 @@ typedef struct Brush { short flag, blend; /* general purpose flag, blend mode */ int size; /* brush diameter */ - float innerradius; /* inner radius after which the falloff starts */ + float jitter; /* jitter the position of the brush */ float spacing; /* spacing of paint operations */ int smooth_stroke_radius; /* turning radius (in pixels) for smooth stroke */ float smooth_stroke_factor; /* higher values limit fast changes in the stroke direction */ @@ -76,7 +76,7 @@ typedef struct Brush { #define BRUSH_TORUS 2 #define BRUSH_ALPHA_PRESSURE 4 #define BRUSH_SIZE_PRESSURE 8 -#define BRUSH_RAD_PRESSURE 16 +#define BRUSH_JITTER_PRESSURE 16 /* was BRUSH_RAD_PRESSURE */ #define BRUSH_SPACING_PRESSURE 32 #define BRUSH_FIXED_TEX 64 #define BRUSH_RAKE 128 diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 5cfecf7cc01..9423e871c77 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -79,6 +79,8 @@ typedef struct ClothSimSettings short vgroup_struct; /* vertex group for scaling structural stiffness */ short presets; /* used for presets on GUI */ short pad; + + struct EffectorWeights *effector_weights; } ClothSimSettings; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 70430af3fc8..fccec7a556f 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -66,6 +66,9 @@ typedef struct bConstraint { int pad; struct Ipo *ipo; /* local influence ipo or driver */ // XXX depreceated for 2.5... old animation system hack + /* below are readonly fields that are set at runtime by the solver for use in the GE (only IK atm) */ + float lin_error; /* residual error on constraint expressed in blender unit*/ + float rot_error; /* residual error on constraint expressed in radiant */ } bConstraint; @@ -119,24 +122,34 @@ typedef struct bPythonConstraint { } bPythonConstraint; -/* Inverse-Kinematics (IK) constraint */ +/* inverse-Kinematics (IK) constraint + This constraint supports a variety of mode determine by the type field + according to B_CONSTRAINT_IK_TYPE. + Some fields are used by all types, some are specific to some types + This is indicated in the comments for each field + */ typedef struct bKinematicConstraint { - Object *tar; - short iterations; /* Maximum number of iterations to try */ - short flag; /* Like CONSTRAINT_IK_TIP */ - short rootbone; /* index to rootbone, if zero go all the way to mother bone */ - short max_rootbone; /* for auto-ik, maximum length of chain */ - char subtarget[32]; /* String to specify sub-object target */ - - Object *poletar; /* Pole vector target */ - char polesubtarget[32]; /* Pole vector sub-object target */ - float poleangle; /* Pole vector rest angle */ - - float weight; /* Weight of goal in IK tree */ - float orientweight; /* Amount of rotation a target applies on chain */ - float grabtarget[3]; /* for target-less IK */ + Object *tar; /* All: target object in case constraint needs a target */ + short iterations; /* All: Maximum number of iterations to try */ + short flag; /* All & CopyPose: some options Like CONSTRAINT_IK_TIP */ + short rootbone; /* All: index to rootbone, if zero go all the way to mother bone */ + short max_rootbone; /* CopyPose: for auto-ik, maximum length of chain */ + char subtarget[32]; /* All: String to specify sub-object target */ + Object *poletar; /* All: Pole vector target */ + char polesubtarget[32]; /* All: Pole vector sub-object target */ + float poleangle; /* All: Pole vector rest angle */ + float weight; /* All: Weight of constraint in IK tree */ + float orientweight; /* CopyPose: Amount of rotation a target applies on chain */ + float grabtarget[3]; /* CopyPose: for target-less IK */ + short type; /* subtype of IK constraint: B_CONSTRAINT_IK_TYPE */ + short mode; /* Distance: how to limit in relation to clamping sphere: LIMITDIST_.. */ + float dist; /* Distance: distance (radius of clamping sphere) from target */ } bKinematicConstraint; +typedef enum B_CONSTRAINT_IK_TYPE { + CONSTRAINT_IK_COPYPOSE = 0, /* 'standard' IK constraint: match position and/or orientation of target */ + CONSTRAINT_IK_DISTANCE /* maintain distance with target */ +} B_CONSTRAINT_IK_TYPE; /* Single-target subobject constraints --------------------- */ /* Track To Constraint */ @@ -376,7 +389,9 @@ typedef enum B_CONSTRAINT_FLAG { /* influence ipo is on constraint itself, not in action channel */ CONSTRAINT_OWN_IPO = (1<<7), /* indicates that constraint was added locally (i.e. didn't come from the proxy-lib) */ - CONSTRAINT_PROXY_LOCAL = (1<<8) + CONSTRAINT_PROXY_LOCAL = (1<<8), + /* indicates that constraint is temporarily disabled (only used in GE) */ + CONSTRAINT_OFF = (1<<9) } B_CONSTRAINT_FLAG; /* bConstraint->ownspace/tarspace */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 109a9528de2..6cfeb646cf2 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -310,6 +310,7 @@ typedef enum eBezTriple_Interpolation { /* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */ typedef enum eBezTriple_KeyframeType { BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */ + BEZT_KEYTYPE_EXTREME, /* 'extreme' keyframe */ BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */ } eBezTriple_KeyframeType; diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 55e3c9107e4..a925b60ac33 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -50,26 +50,23 @@ struct Ipo; typedef struct VolumeSettings { float density; float emission; - float absorption; float scattering; + float reflection; float emission_col[3]; - float absorption_col[3]; + float transmission_col[3]; + float reflection_col[3]; + float density_scale; float depth_cutoff; - - short phasefunc_type; - short vpad[3]; - float phasefunc_g; - - float stepsize; - float shade_stepsize; + float asymmetry; short stepsize_type; short shadeflag; short shade_type; short precache_resolution; - + + float stepsize; float ms_diff; float ms_intensity; int ms_steps; @@ -160,9 +157,8 @@ typedef struct Material { float sss_front, sss_back; short sss_flag, sss_preset; - /* yafray: absorption color, dispersion parameters and material preset menu */ - float YF_ar, YF_ag, YF_ab, YF_dscale, YF_dpwr; - int YF_dsmp, YF_preset, YF_djit; + int mapto_textured; /* render-time cache to optimise texture lookups */ + int pad4; ListBase gpumaterial; /* runtime */ } Material; @@ -317,15 +313,17 @@ typedef struct Material { #define MAP_AMB 2048 #define MAP_DISPLACE 4096 #define MAP_WARP 8192 -#define MAP_LAYER 16384 +#define MAP_LAYER 16384 /* unused */ /* volume mapto - reuse definitions for now - a bit naughty! */ -#define MAP_DENSITY 128 -#define MAP_EMISSION 64 -#define MAP_EMISSION_COL 1 -#define MAP_ABSORPTION 512 -#define MAP_ABSORPTION_COL 8 -#define MAP_SCATTERING 16 +#define MAP_DENSITY 128 +#define MAP_EMISSION 64 +#define MAP_EMISSION_COL 1 +#define MAP_SCATTERING 16 +#define MAP_TRANSMISSION_COL 8 +#define MAP_REFLECTION_COL 4 +#define MAP_REFLECTION 32 + /* mapto for halo */ //#define MAP_HA_COL 1 @@ -386,13 +384,5 @@ typedef struct Material { #define MA_VOL_SHADE_MULTIPLE 2 #define MA_VOL_SHADE_SINGLEPLUSMULTIPLE 3 -/* vol_phasefunc_type */ -#define MA_VOL_PH_ISOTROPIC 0 -#define MA_VOL_PH_MIEHAZY 1 -#define MA_VOL_PH_MIEMURKY 2 -#define MA_VOL_PH_RAYLEIGH 3 -#define MA_VOL_PH_HG 4 -#define MA_VOL_PH_SCHLICK 5 - #endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index be7452c4ae1..7c76a5c099d 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1,7 +1,28 @@ /** + * * $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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * ***** END GPL LICENSE BLOCK ***** */ +#include "DNA_listBase.h" + #ifndef DNA_MODIFIER_TYPES_H #define DNA_MODIFIER_TYPES_H @@ -438,9 +459,7 @@ typedef struct CollisionModifierData { unsigned int numverts; unsigned int numfaces; - short absorption; /* used for forces, in % */ - short pad; - float time; /* cfra time of modifier */ + float time, pad; /* cfra time of modifier */ struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */ } CollisionModifierData; @@ -469,8 +488,8 @@ typedef struct BooleanModifierData { int operation, pad; } BooleanModifierData; -#define MOD_MDEF_INVERT_VGROUP (1<<0) -#define MOD_MDEF_DYNAMIC_BIND (1<<1) +#define MOD_MDEF_INVERT_VGROUP (1<<0) +#define MOD_MDEF_DYNAMIC_BIND (1<<1) typedef struct MDefInfluence { int vertex; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index b10de02dbb4..e70221df9ab 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -40,6 +40,7 @@ struct bNodeLink; struct bNodeType; struct bNodeGroup; struct AnimData; +struct uiBlock; #define NODE_MAXSTR 32 @@ -131,6 +132,7 @@ typedef struct bNode { rctf butr; /* optional buttons area */ rctf prvr; /* optional preview area */ bNodePreview *preview; /* optional preview image */ + struct uiBlock *block; /* runtime during drawing */ struct bNodeType *typeinfo; /* lookup of callbacks and defaults */ diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 09288b24c20..da55fb1d47c 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -41,6 +41,7 @@ struct Ipo; struct MVert; typedef struct FluidsimSettings { + struct FluidsimModifierData *fmd; /* for fast RNA access */ /* domain,fluid or obstacle */ short type; /* display advanced options in fluid sim tab (on=1,off=0)*/ diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 986a75f1a96..e7e785e605b 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -35,45 +35,91 @@ extern "C" { #endif #include "DNA_listBase.h" + +/* pd->forcefield: Effector Fields types */ +typedef enum PFieldType { + PFIELD_NULL = 0, /* (this is used for general effector weight) */ + PFIELD_FORCE, /* Force away/towards a point depending on force strength */ + PFIELD_VORTEX, /* Force around the effector normal */ + PFIELD_MAGNET, /* Force from the cross product of effector normal and point velocity */ + PFIELD_WIND, /* Force away and towards a point depending which side of the effector */ + /* normal the point is */ + PFIELD_GUIDE, /* Force along curve for dynamics, a shaping curve for hair paths */ + PFIELD_TEXTURE, /* Force based on texture values calculated at point coordinates */ + PFIELD_HARMONIC, /* Force of a harmonic (damped) oscillator */ + PFIELD_CHARGE, /* Force away/towards a point depending on point charge */ + PFIELD_LENNARDJ, /* Force due to a Lennard-Jones potential */ + PFIELD_BOID, /* Defines predator / goal for boids */ + PFIELD_TURBULENCE, /* Force defined by BLI_gTurbulence */ + PFIELD_DRAG, /* Linear & quadratic drag */ + NUM_PFIELD_TYPES +} PFieldType; typedef struct PartDeflect { - short deflect; /* Deflection flag - does mesh deflect particles*/ - short forcefield; /* Force field type, do the vertices attract / repel particles ? */ - short flag; /* general settings flag */ - short falloff; /* fall-off type*/ + short deflect; /* Deflection flag - does mesh deflect particles */ + short forcefield; /* Force field type, do the vertices attract / repel particles? */ + short flag; /* general settings flag */ + short falloff; /* fall-off type */ + short shape; /* point, plane or surface */ + short tex_mode; /* texture effector */ + short kink, kink_axis; /* for curve guide */ + short zdir, rt; + /* Main effector values */ + float f_strength; /* The strength of the force (+ or - ) */ + float f_damp; /* Damping ratio of the harmonic effector. */ + float f_flow; /* How much force is converted into "air flow", i.e. */ + /* force used as the velocity of surrounding medium. */ + + float f_size; + + /* fall-off */ + float f_power; /* The power law - real gravitation is 2 (square) */ + float maxdist; /* if indicated, use this maximum */ + float mindist; /* if indicated, use this minimum */ + float f_power_r; /* radial fall-off power */ + float maxrad; /* radial versions of above */ + float minrad; + + /* particle collisions */ float pdef_damp; /* Damping factor for particle deflection */ float pdef_rdamp; /* Random element of damping for deflection */ float pdef_perm; /* Chance of particle passing through mesh */ float pdef_frict; /* Friction factor for particle deflection */ float pdef_rfrict; /* Random element of friction for deflection */ - float f_strength; /* The strength of the force (+ or - ) */ - float f_power; /* The power law - real gravitation is 2 (square) */ - float f_dist; - float f_damp; /* The dampening factor, currently only for harmonic force */ - float maxdist; /* if indicated, use this maximum */ - float mindist; /* if indicated, use this minimum */ - float maxrad; /* radial versions of above */ - float minrad; - float f_power_r; /* radial fall-off power*/ + float absorption, pad; /* used for forces */ + /* softbody collisions */ float pdef_sbdamp; /* Damping factor for softbody deflection */ float pdef_sbift; /* inner face thickness for softbody deflection */ float pdef_sboft; /* outer face thickness for softbody deflection */ - /* variables for guide curve */ + /* guide curve, same as for particle child effects */ float clump_fac, clump_pow; float kink_freq, kink_shape, kink_amp, free_end; - float tex_nabla; - short tex_mode, kink, kink_axis, rt2; - struct Tex *tex; /* Texture of the texture effector */ - struct RNG *rng; /* random noise generator for e.g. wind */ - float f_noise; /* noise of force (currently used for wind) */ - int seed; /* wind noise random seed */ + /* texture effector */ + float tex_nabla; /* Used for calculating partial derivatives */ + struct Tex *tex; /* Texture of the texture effector */ + + /* effector noise */ + struct RNG *rng; /* random noise generator for e.g. wind */ + float f_noise; /* noise of force */ + int seed; /* noise random seed */ } PartDeflect; +typedef struct EffectorWeights { + struct Group *group; /* only use effectors from this group of objects */ + + float weight[13]; /* effector type specific weights */ + float global_gravity; + short flag, rt[3]; +} EffectorWeights; + +/* EffectorWeights->flag */ +#define EFF_WEIGHT_DO_HAIR 1 + /* Point cache file data types: * - used as (1<<flag) so poke jahka if you reach the limit of 15 * - to add new data types update: @@ -254,48 +300,51 @@ typedef struct SoftBody { struct PointCache *pointcache; struct ListBase ptcaches; -} SoftBody; + struct EffectorWeights *effector_weights; -/* pd->forcefield: Effector Fields types */ -#define PFIELD_FORCE 1 -#define PFIELD_VORTEX 2 -#define PFIELD_MAGNET 3 -#define PFIELD_WIND 4 -#define PFIELD_GUIDE 5 -#define PFIELD_TEXTURE 6 -#define PFIELD_HARMONIC 7 -#define PFIELD_CHARGE 8 -#define PFIELD_LENNARDJ 9 -#define PFIELD_BOID 10 +} SoftBody; /* pd->flag: various settings */ #define PFIELD_USEMAX 1 #define PDEFLE_DEFORM 2 -#define PFIELD_GUIDE_PATH_ADD 4 -#define PFIELD_PLANAR 8 +#define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */ +#define PFIELD_PLANAR 8 /* used for do_versions */ #define PDEFLE_KILL_PART 16 -#define PFIELD_POSZ 32 +#define PFIELD_POSZ 32 /* used for do_versions */ #define PFIELD_TEX_OBJECT 64 +#define PFIELD_GLOBAL_CO 64 /* used for turbulence */ #define PFIELD_TEX_2D 128 #define PFIELD_USEMIN 256 #define PFIELD_USEMAXR 512 #define PFIELD_USEMINR 1024 #define PFIELD_TEX_ROOTCO 2048 -#define PFIELD_SURFACE 4096 +#define PFIELD_SURFACE (1<<12) /* used for do_versions */ +#define PFIELD_VISIBILITY (1<<13) +#define PFIELD_DO_LOCATION (1<<14) +#define PFIELD_DO_ROTATION (1<<15) /* pd->falloff */ #define PFIELD_FALL_SPHERE 0 #define PFIELD_FALL_TUBE 1 #define PFIELD_FALL_CONE 2 -//reserved for near future -//#define PFIELD_FALL_INSIDE 3 + +/* pd->shape */ +#define PFIELD_SHAPE_POINT 0 +#define PFIELD_SHAPE_PLANE 1 +#define PFIELD_SHAPE_SURFACE 2 +#define PFIELD_SHAPE_POINTS 3 /* pd->tex_mode */ #define PFIELD_TEX_RGB 0 #define PFIELD_TEX_GRAD 1 #define PFIELD_TEX_CURL 2 +/* pd->zdir */ +#define PFIELD_Z_BOTH 0 +#define PFIELD_Z_POS 1 +#define PFIELD_Z_NEG 2 + /* pointcache->flag */ #define PTCACHE_BAKED 1 #define PTCACHE_OUTDATED 2 diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index a89f8e1fb2e..ade22e4ebd4 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -134,7 +134,7 @@ typedef struct Object { float loc[3], dloc[3], orig[3]; float size[3], dsize[3]; float rot[3], drot[3]; - /* float quat[4], dquat[4]; (not used yet) */ + float quat[4], dquat[4]; float obmat[4][4]; float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */ float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */ @@ -176,9 +176,11 @@ typedef struct Object { float max_vel; /* clamp the maximum velocity 0.0 is disabled */ float min_vel; /* clamp the maximum velocity 0.0 is disabled */ float m_contactProcessingThreshold; - + + short rotmode; /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */ + char dt, dtx; - char empty_drawtype, pad1[5]; + char empty_drawtype, pad1[3]; float empty_drawsize; float dupfacesca; /* dupliface scale */ @@ -243,6 +245,7 @@ typedef struct Object { ListBase gpulamp; /* runtime, for lamps only */ ListBase pc_ids; + ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */ } Object; /* Warning, this is not used anymore because hooks are now modifiers */ @@ -263,6 +266,14 @@ typedef struct ObHook { float force; } ObHook; +typedef struct DupliObject { + struct DupliObject *next, *prev; + struct Object *ob; + unsigned int origlay; + int index, no_draw, type, animated; + float mat[4][4], omat[4][4]; + float orco[3], uv[2]; +} DupliObject; /* this work object is defined in object.c */ extern Object workob; @@ -304,6 +315,7 @@ extern Object workob; /* (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_NEG_SCALE 4 #define OB_DUPLI (8+16+256+512+2048) @@ -393,6 +405,7 @@ extern Object workob; #define BA_HAS_RECALC_OB 4 #define BA_HAS_RECALC_DATA 8 + // XXX DEPRECEATED SETTING... #define BA_DO_IPO 32 #define BA_FROMSET 128 @@ -406,7 +419,7 @@ extern Object workob; #define OB_FROMDUPLI 512 #define OB_DONE 1024 -#define OB_RADIO 2048 +#define OB_RADIO 2048 /* deprecated */ #define OB_FROMGROUP 4096 /* ob->recalc (flag bits!) */ diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 6a0a0e1d912..4c620ae527e 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -67,7 +67,7 @@ typedef struct ChildParticle { int pa[4]; /* nearest particles to the child, used for the interpolation */ float w[4]; /* interpolation weights for the above particles */ float fuv[4], foffset; /* face vertex weights and offset */ - float rand[3]; + float rt; } ChildParticle; typedef struct ParticleTarget { @@ -114,6 +114,8 @@ typedef struct ParticleSettings { struct BoidSettings *boids; + struct EffectorWeights *effector_weights; + int flag; short type, from, distr; /* physics modes */ @@ -176,10 +178,8 @@ typedef struct ParticleSettings { /* keyed particles */ int keyed_loops; - float effector_weight[10]; - struct Group *dup_group; - struct Group *eff_group; + struct Group *eff_group; // deprecated struct Object *dup_ob; struct Object *bb_ob; struct Ipo *ipo; // xxx depreceated... old animation system @@ -209,8 +209,6 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in struct Object *lattice; struct Object *parent; /* particles from global space -> parent space */ - struct ListBase effectors, reactevents; /* runtime */ - struct ListBase targets; /* used for keyed and boid physics */ char name[32]; /* particle system name */ @@ -233,14 +231,20 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in struct PointCache *pointcache; struct ListBase ptcaches; + struct ListBase *effectors; + struct KDTree *tree; /* used for interactions with self and other systems */ + + struct ParticleDrawData *pdd; + + float *frand; /* array of 1024 random floats for fast lookups */ }ParticleSystem; /* part->type */ /* hair is allways baked static in object/geometry space */ /* other types (normal particles) are in global space and not static baked */ #define PART_EMITTER 0 -#define PART_REACTOR 1 +//#define PART_REACTOR 1 #define PART_HAIR 2 #define PART_FLUID 3 @@ -266,7 +270,7 @@ 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_KEYED_TIMING (1<<15) +//#define PART_HAIR_GRAVITY (1<<15) //#define PART_ABS_TIME (1<<17) //#define PART_GLOB_TIME (1<<18) @@ -325,7 +329,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PART_DRAW_EMITTER 8 /* render emitter also */ #define PART_DRAW_HEALTH 16 #define PART_ABS_PATH_TIME 32 -//#define PART_DRAW_TRAIL 64 +//#define PART_DRAW_TRAIL 64 /* deprecated */ #define PART_DRAW_BB_LOCK 128 #define PART_DRAW_PARENT 256 #define PART_DRAW_NUM 512 @@ -403,11 +407,13 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PART_CHILD_FACES 2 /* psys->recalc */ -#define PSYS_RECALC_REDO 1 /* only do pathcache etc */ -#define PSYS_RECALC_RESET 2 /* reset everything including pointcache */ -#define PSYS_RECALC_TYPE 4 /* handle system type change */ -#define PSYS_RECALC_CHILD 16 /* only child settings changed */ -#define PSYS_RECALC_PHYS 32 /* physics type changed */ +/* starts from 8 so that the first bits can be ob->recalc */ +#define PSYS_RECALC_REDO 8 /* only do pathcache etc */ +#define PSYS_RECALC_RESET 16 /* reset everything including pointcache */ +#define PSYS_RECALC_TYPE 32 /* handle system type change */ +#define PSYS_RECALC_CHILD 64 /* only child settings changed */ +#define PSYS_RECALC_PHYS 128 /* physics type changed */ +#define PSYS_RECALC 248 /* psys->flag */ #define PSYS_CURRENT 1 @@ -422,17 +428,17 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PSYS_HAIR_DONE 512 #define PSYS_KEYED 1024 #define PSYS_EDITED 2048 -//#define PSYS_PROTECT_CACHE 4096 +//#define PSYS_PROTECT_CACHE 4096 /* deprecated */ #define PSYS_DISABLED 8192 /* pars->flag */ #define PARS_UNEXIST 1 #define PARS_NO_DISP 2 -//#define PARS_STICKY 4 +//#define PARS_STICKY 4 /* deprecated */ #define PARS_REKEY 8 /* pars->alive */ -#define PARS_KILLED 0 +//#define PARS_KILLED 0 /* deprecated */ #define PARS_DEAD 1 #define PARS_UNBORN 2 #define PARS_ALIVE 3 diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 73afc3d1a53..c5691b47157 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -93,6 +93,8 @@ typedef struct FFMpegCodecData { int audio_codec; int video_bitrate; int audio_bitrate; + int audio_mixrate; + float audio_volume; int gop_size; int flags; @@ -106,10 +108,13 @@ typedef struct FFMpegCodecData { typedef struct AudioData { - int mixrate; - float main; /* Main mix in dB */ + int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate + float main; // 2.5: now in FFMpegCodecData: audio_volume + float speed_of_sound; + float doppler_factor; + int distance_model; short flag; - short pad[3]; + short pad; } AudioData; typedef struct SceneRenderLayer { @@ -170,7 +175,6 @@ typedef struct RenderData { struct AviCodecData *avicodecdata; struct QuicktimeCodecData *qtcodecdata; struct FFMpegCodecData ffcodecdata; - struct AudioData audio; /* new in 2.5 */ int cfra, sfra, efra; /* frames as in 'images' */ int psfra, pefra; /* start+end frames of preview range */ @@ -663,6 +667,11 @@ typedef struct UnitSettings { short flag; /* imperial, metric etc */ } UnitSettings; +typedef struct PhysicsSettings { + float gravity[3]; + int flag; +} PhysicsSettings; + typedef struct Scene { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ @@ -697,7 +706,7 @@ typedef struct Scene { /* migrate or replace? depends on some internal things... */ /* no, is on the right place (ton) */ struct RenderData r; - struct AudioData audio; /* DEPRECATED 2.5 */ + struct AudioData audio; ListBase markers; ListBase transform_spaces; @@ -727,6 +736,9 @@ typedef struct Scene { /* Grease Pencil */ struct bGPdata *gpd; + + /* Physics simulation settings */ + struct PhysicsSettings physics_settings; } Scene; @@ -1123,6 +1135,9 @@ typedef enum SculptFlags { #define SK_RETARGET_ROLL_VIEW 1 #define SK_RETARGET_ROLL_JOINT 2 +/* physics_settings->flag */ +#define PHYS_GLOBAL_GRAVITY 1 + /* UnitSettings */ /* UnitSettings->system */ diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index cc998de7eec..a5ba5886ed5 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -126,6 +126,13 @@ typedef struct bRaySensor { int axisflag; } bRaySensor; +typedef struct bArmatureSensor { + char posechannel[32]; + char constraint[32]; + int type; + float value; +} bArmatureSensor; + typedef struct bMessageSensor { /** * (Possible future use) pointer to a single sender object @@ -202,6 +209,15 @@ typedef struct bJoystickSensor { #define SENS_MESG_MESG 0 #define SENS_MESG_PROP 1 +/* bArmatureSensor->type */ +#define SENS_ARM_STATE_CHANGED 0 +#define SENS_ARM_LIN_ERROR_BELOW 1 +#define SENS_ARM_LIN_ERROR_ABOVE 2 +#define SENS_ARM_ROT_ERROR_BELOW 3 +#define SENS_ARM_ROT_ERROR_ABOVE 4 +/* update this when adding new type */ +#define SENS_ARM_MAXTYPE 4 + /* sensor->type */ #define SENS_ALWAYS 0 #define SENS_TOUCH 1 @@ -217,6 +233,7 @@ typedef struct bJoystickSensor { #define SENS_JOYSTICK 11 #define SENS_ACTUATOR 12 #define SENS_DELAY 13 +#define SENS_ARMATURE 14 /* sensor->flag */ #define SENS_SHOW 1 #define SENS_DEL 2 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 6fdc3a7787b..2cd47e340bd 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -153,25 +153,25 @@ typedef struct FileSelectParams { char title[24]; /* title, also used for the text of the execute button */ char dir[240]; /* directory */ char file[80]; /* file */ + char renamefile[80]; - short flag; /* settings for filter, hiding files and display mode */ + 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 */ short display; /* display mode flag */ short filter; /* filter when (flags & FILE_FILTER) is true */ /* XXX - temporary, better move to filelist */ short active_bookmark; - short pad; int active_file; int selstate; + /* short */ /* XXX --- still unused -- */ short f_fp; /* show font preview */ short menu; /* currently selected option in pupmenu */ char fp_str[8]; /* string to use for font preview */ - char *pupmenu; /* allows menu for save options - result stored in menup */ - /* XXX --- end unused -- */ } FileSelectParams; @@ -569,18 +569,19 @@ typedef struct SpaceUserPref { /* buts->mainb new */ -#define BCONTEXT_SCENE 0 -#define BCONTEXT_WORLD 1 -#define BCONTEXT_OBJECT 2 -#define BCONTEXT_DATA 3 -#define BCONTEXT_MATERIAL 4 -#define BCONTEXT_TEXTURE 5 -#define BCONTEXT_PARTICLE 6 -#define BCONTEXT_PHYSICS 7 -#define BCONTEXT_BONE 9 -#define BCONTEXT_MODIFIER 10 -#define BCONTEXT_CONSTRAINT 12 -#define BCONTEXT_TOT 13 +#define BCONTEXT_SCENE 0 +#define BCONTEXT_WORLD 1 +#define BCONTEXT_OBJECT 2 +#define BCONTEXT_DATA 3 +#define BCONTEXT_MATERIAL 4 +#define BCONTEXT_TEXTURE 5 +#define BCONTEXT_PARTICLE 6 +#define BCONTEXT_PHYSICS 7 +#define BCONTEXT_BONE 9 +#define BCONTEXT_MODIFIER 10 +#define BCONTEXT_CONSTRAINT 12 +#define BCONTEXT_BONE_CONSTRAINT 13 +#define BCONTEXT_TOT 14 /* sbuts->flag */ #define SB_PRV_OSA 1 @@ -833,6 +834,7 @@ enum { #define TIME_SEQ 32 #define TIME_ALL_IMAGE_WIN 64 #define TIME_CONTINUE_PHYSICS 128 +#define TIME_NODES 256 /* sseq->mainb */ #define SEQ_DRAW_SEQUENCE 0 diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index c13c0522004..a43e5c7ae13 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -61,9 +61,27 @@ typedef struct MTex { float r, g, b, k; float def_var, rt; - float colfac, norfac, varfac; - float dispfac; - float warpfac; + /* common */ + float colfac, varfac; + + /* material */ + float norfac, dispfac, warpfac; + float colspecfac, mirrfac, alphafac; + float difffac, specfac, emitfac, hardfac; + float raymirrfac, translfac, ambfac; + float colemitfac, colreflfac, coltransfac; + float densfac, scatterfac, reflfac; + + /* particles */ + float timefac, lengthfac, clumpfac; + float kinkfac, roughfac, padensfac; + float lifefac, sizefac, ivelfac, pvelfac; + + /* lamp */ + float shadowfac; + + /* world */ + float zenupfac, zendownfac, blendfac; } MTex; #ifndef DNA_USHORT_FIX @@ -167,7 +185,8 @@ typedef struct VoxelData { int interp_type; short file_format; short flag; - int pad; + short extend; + short pad; struct Object *object; /* for rendering smoke sims */ float int_multiplier; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index e221524eac2..f67a242b469 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -89,9 +89,7 @@ typedef struct RegionView3D { float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */ float pixsize; float ofs[3]; - short camzoom, viewbut; - - int lastmode; /* for modal keymap switching, int because it stores notifier code */ + short camzoom, viewbut, pad[2]; short rflag, viewlock; short persp; @@ -146,7 +144,7 @@ typedef struct View3D { * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID, * OB_SHADED or OB_TEXTURE */ short drawtype; - short localview; + short pad2; short scenelock, around, pad3; short flag, flag2; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 10f83c8b9ec..ea9d0e86c38 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -1,5 +1,5 @@ /** - * $Id: + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -80,6 +80,7 @@ typedef enum ReportType { enum ReportListFlags { RPT_PRINT = 1, RPT_STORE = 2, + RPT_FREE = 4, }; typedef struct Report { struct Report *next, *prev; @@ -161,7 +162,8 @@ typedef struct wmWindow { ListBase timers; ListBase queue; /* all events (ghost level events were handled) */ - ListBase handlers; /* window+screen handlers, overriding all queues */ + ListBase handlers; /* window+screen handlers, handled last */ + ListBase modalhandlers; /* priority handlers, handled first */ ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */ ListBase gesture; /* gesture stuff */ @@ -226,6 +228,7 @@ typedef struct wmOperatorType { /* only used for operators defined with python * use to store pointers to python functions */ void *pyop_data; + int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot); } wmOperatorType; @@ -264,6 +267,9 @@ typedef struct wmKeyMap { short pad; void *items; /* struct EnumPropertyItem for now */ + + /* verify if the keymap is enabled in the current context */ + int (*poll)(struct bContext *); } wmKeyMap; @@ -297,7 +303,6 @@ typedef struct wmOperator { #define OPERATOR_PASS_THROUGH 8 /* wmOperator flag */ -#define OPERATOR_REPORT_FREE 1 /* ************** wmEvent ************************ */ |