diff options
Diffstat (limited to 'source/blender/makesdna')
38 files changed, 1608 insertions, 349 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 8db04b37581..ccf9becbce5 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -46,7 +46,7 @@ struct ID; typedef struct IDPropertyData { void *pointer; ListBase group; - int val, pad; + int val, val2; /*note, we actually fit a double into these two ints*/ } IDPropertyData; typedef struct IDProperty { @@ -77,6 +77,7 @@ typedef struct IDProperty { /* the ID link property type hasn't been implemented yet, this will require some cleanup of blenkernel, most likely.*/ #define IDP_ID 7 +#define IDP_DOUBLE 8 /* add any future new id property types here.*/ @@ -139,7 +140,7 @@ typedef struct PreviewImage { * **/ -#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__) +#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) /* big endian */ #define MAKE_ID2(c, d) ( (c)<<8 | (d) ) #define MOST_SIG_BYTE 0 diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index db6a2bda53c..4a10ecf2368 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -32,11 +32,15 @@ #include "DNA_listBase.h" #include "DNA_ID.h" +#include "DNA_gpencil_types.h" #include "DNA_view2d_types.h" +#include "DNA_userdef_types.h" struct SpaceLink; struct Object; +/* -------------- Poses ----------------- */ + /* PoseChannel stores the results of Actions (ipos) and transform information with respect to the restposition of Armature bones */ typedef struct bPoseChannel { @@ -49,7 +53,7 @@ typedef struct bPoseChannel { short ikflag; /* settings for IK bones */ short selectflag; /* copy of bone flag, so you can work with library armatures */ short protectflag; /* protect channels from being transformed */ - short customCol; /* index of custom color set to use (0=default - used for all old files) */ + short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ int pathlen; /* for drawing paths, the amount of frames */ int pathsf; /* for drawing paths, the start frame number */ @@ -90,17 +94,59 @@ typedef struct bPoseChannel { */ typedef struct bPose { ListBase chanbase; /* list of pose channels */ + short flag, proxy_layer; /* proxy layer: copy from armature, gets synced */ + float ctime; /* local action time of this pose */ float stride_offset[3]; /* applied to object */ float cyclic_offset[3]; /* result of match and cycles, applied in where_is_pose() */ + + + ListBase agroups; /* list of bActionGroups */ + + int active_group; /* index of active group (starts from 1) */ + int pad; } bPose; + +/* ------------- Action ---------------- */ + +/* Action-Channel Group. These are stored as a list per-Action, and are only used to + * group that Action's Action-Channels when displayed in the Action Editor. + * + * Even though all Action-Channels live in a big list per Action, each group they are in also + * holds references to the achans within that list which belong to it. Care must be taken to + * 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 + * to Action-Groups. + */ +typedef struct bActionGroup { + struct bActionGroup *next, *prev; + + ListBase channels; /* Note: this must not be touched by standard listbase functions */ + + int flag; /* settings for this action-group */ + int customCol; /* index of custom color set to use when used for bones (0=default - used for all old files, -1=custom set) */ + char name[32]; /* name of the group */ + + ThemeWireColor cs; /* color set to use when customCol == -1 */ +} bActionGroup; + /* Action Channels belong to Actions. They are linked with an IPO block, and can also own * Constraint Channels in certain situations. + * + * Action-Channels can only belong to one group at a time, but they still live the Action's + * list of achans (to preserve backwards compatability, and also minimise the code + * that would need to be recoded). Grouped achans are stored at the start of the list, according + * to the position of the group in the list, and their position within the group. */ typedef struct bActionChannel { struct bActionChannel *next, *prev; + bActionGroup *grp; /* Action Group this Action Channel belongs to */ + struct Ipo *ipo; /* IPO block this action channel references */ ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */ @@ -114,9 +160,18 @@ typedef struct bActionChannel { */ typedef struct bAction { ID id; + ListBase chanbase; /* Action Channels in this Action */ + ListBase groups; /* Action Groups in the Action */ + ListBase markers; /* TimeMarkers local to this Action for labelling 'poses' */ + + int active_marker; /* Index of active-marker (first marker = 1) */ + int pad; } bAction; + +/* ------------- Action Editor --------------------- */ + /* Action Editor Space. This is defined here instead of in DNA_space_types.h */ typedef struct SpaceAction { struct SpaceLink *next, *prev; @@ -129,12 +184,17 @@ typedef struct SpaceAction { View2D v2d; bAction *action; /* the currently active action */ - short flag, autosnap; /* flag: bitmapped settings; autosnap: automatic keyframe snapping mode */ - short pin, actnr, lock; /* pin: keep showing current action; actnr: used for finding chosen action from menu; lock: lock time to other windows */ + + char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */ + short flag, actnr; /* flag: bitmapped settings; */ + short pin, lock; /* pin: keep showing current action; actnr: used for finding chosen action from menu; lock: lock time to other windows */ short actwidth; /* width of the left-hand side name panel (in pixels?) */ float timeslide; /* for Time-Slide transform mode drawing - current frame? */ } SpaceAction; + +/* -------------- Action Flags -------------- */ + /* Action Channel flags */ typedef enum ACHAN_FLAG { ACHAN_SELECTED = (1<<0), @@ -147,18 +207,52 @@ typedef enum ACHAN_FLAG { ACHAN_MOVED = (1<<31), } ACHAN_FLAG; + +/* Action Group flags */ +typedef enum AGRP_FLAG { + AGRP_SELECTED = (1<<0), + AGRP_ACTIVE = (1<<1), + AGRP_PROTECTED = (1<<2), + AGRP_EXPANDED = (1<<3), + + AGRP_TEMP = (1<<30), + AGRP_MOVED = (1<<31) +} AGRP_FLAG; + +/* ------------ Action Editor Flags -------------- */ + /* SpaceAction flag */ typedef enum SACTION_FLAG { - /* during transform */ + /* during transform (only set for TimeSlide) */ SACTION_MOVING = (1<<0), /* show sliders (if relevant) */ SACTION_SLIDERS = (1<<1), /* draw time in seconds instead of time in frames */ SACTION_DRAWTIME = (1<<2), /* don't filter action channels according to visibility */ - SACTION_NOHIDE = (1<<3) + SACTION_NOHIDE = (1<<3), + /* don't kill overlapping keyframes after transform */ + SACTION_NOTRANSKEYCULL = (1<<4), + /* don't include keyframes that are out of view */ + SACTION_HORIZOPTIMISEON = (1<<5), + /* hack for moving pose-markers (temp flag) */ + SACTION_POSEMARKERS_MOVE = (1<<6), + /* don't draw action channels using group colours (where applicable) */ + SACTION_NODRAWGCOLORS = (1<<7) } SACTION_FLAG; +/* SpaceAction Mode Settings */ +typedef enum SACTCONT_MODES { + /* action (default) */ + SACTCONT_ACTION = 0, + /* editing of shapekey's IPO block */ + SACTCONT_SHAPEKEY, + /* editing of gpencil data */ + SACTCONT_GPENCIL, + /* dopesheet (unimplemented... future idea?) */ + SACTCONT_DOPESHEET +} SACTCONTEXT_MODES; + /* SpaceAction AutoSnap Settings (also used by SpaceNLA) */ typedef enum SACTSNAP_MODES { /* no auto-snap */ @@ -170,6 +264,9 @@ typedef enum SACTSNAP_MODES { /* snap to nearest marker */ SACTSNAP_MARKER, } SACTSNAP_MODES; + + +/* --------- Pose Flags --------------- */ /* Pose->flag */ typedef enum POSE_FLAG { @@ -178,7 +275,11 @@ typedef enum POSE_FLAG { /* prevents any channel from getting overridden by anim from IPO */ POSE_LOCKED = (1<<1), /* clears the POSE_LOCKED flag for the next time the pose is evaluated */ - POSE_DO_UNLOCK = (1<<2) + POSE_DO_UNLOCK = (1<<2), + /* pose has constraints which depend on time (used when depsgraph updates for a new frame) */ + POSE_CONSTRAINTS_TIMEDEPEND = (1<<3), + /* recalculate bone paths */ + POSE_RECALCPATHS = (1<<4), } POSE_FLAG; /* PoseChannel (transform) flags */ diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 53f167a99dc..43dada97d0e 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -35,6 +35,7 @@ struct Object; struct Mesh; struct Scene; struct Group; +struct Text; /* ****************** ACTUATORS ********************* */ @@ -49,8 +50,10 @@ typedef struct bActionActuator { short type, flag; /* Playback type */ int sta, end; /* Start & End frames */ char name[32]; /* For property-driven playback */ - int blendin; /* Number of frames of blending */ - short priority; /* Execution priority */ + char frameProp[32]; /* Set this property to the actions current frame */ + short blendin; /* Number of frames of blending */ + short priority; /* Execution priority */ + short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ short strideaxis; /* Displacement axis */ float stridelength; /* Displacement incurred by cycle */ } bActionActuator; @@ -78,8 +81,10 @@ typedef struct bEditObjectActuator { struct Mesh *me; char name[32]; float linVelocity[3]; /* initial lin. velocity on creation */ - short localflag; /* flag for the lin. vel: apply locally */ - short pad; + float angVelocity[3]; /* initial ang. velocity on creation */ + float pad; + short localflag; /* flag for the lin & ang. vel: apply locally */ + short dyn_operation; } bEditObjectActuator; typedef struct bSceneActuator { @@ -96,7 +101,8 @@ typedef struct bPropertyActuator { } bPropertyActuator; typedef struct bObjectActuator { - int flag, type; + short flag, type, otype; + short damping; float forceloc[3], forcerot[3]; float loc[3], rot[3]; float dloc[3], drot[3]; @@ -107,6 +113,7 @@ typedef struct bIpoActuator { short flag, type; int sta, end; char name[32]; + char frameProp[32]; /* Set this property to the actions current frame */ short pad1, cur, butsta, butend; @@ -121,10 +128,13 @@ typedef struct bCameraActuator { } bCameraActuator ; typedef struct bConstraintActuator { + short type, mode; short flag, damp; - float slow; + short time, rotdamp; + int pad; float minloc[3], maxloc[3]; float minrot[3], maxrot[3]; + char matprop[32]; } bConstraintActuator; typedef struct bGroupActuator { @@ -184,10 +194,35 @@ typedef struct bGameActuator { } bGameActuator; typedef struct bVisibilityActuator { - /** bit 0: Is this object visible? */ + /** bit 0: Is this object visible? + ** bit 1: Apply recursively */ int flag; } bVisibilityActuator; +typedef struct bTwoDFilterActuator{ + char pad[4]; + /* Tells what type of 2D Filter */ + short type; + /* (flag == 0) means 2D filter is activate and + (flag != 0) means 2D filter is inactive */ + short flag; + int int_arg; + /* a float argument */ + float float_arg; + struct Text *text; +}bTwoDFilterActuator; + +typedef struct bParentActuator { + char pad[4]; + int type; + struct Object *ob; +} bParentActuator; + +typedef struct bStateActuator { + int type; /* 0=Set, 1=Add, 2=Rem, 3=Chg */ + unsigned int mask; /* the bits to change */ +} bStateActuator; + typedef struct bActuator { struct bActuator *next, *prev, *mynew; short type; @@ -220,19 +255,19 @@ typedef struct FreeCamera { /* objectactuator->flag */ #define ACT_FORCE_LOCAL 1 #define ACT_TORQUE_LOCAL 2 +#define ACT_SERVO_LIMIT_X 2 #define ACT_DLOC_LOCAL 4 +#define ACT_SERVO_LIMIT_Y 4 #define ACT_DROT_LOCAL 8 +#define ACT_SERVO_LIMIT_Z 8 #define ACT_LIN_VEL_LOCAL 16 #define ACT_ANG_VEL_LOCAL 32 //#define ACT_ADD_LIN_VEL_LOCAL 64 #define ACT_ADD_LIN_VEL 64 -#define ACT_OBJECT_FORCE 0 -#define ACT_OBJECT_TORQUE 1 -#define ACT_OBJECT_DLOC 2 -#define ACT_OBJECT_DROT 3 -#define ACT_OBJECT_LINV 4 -#define ACT_OBJECT_ANGV 5 +/* objectactuator->type */ +#define ACT_OBJECT_NORMAL 0 +#define ACT_OBJECT_SERVO 1 /* actuator->type */ #define ACT_OBJECT 0 @@ -256,11 +291,18 @@ typedef struct FreeCamera { #define ACT_CD 16 #define ACT_GAME 17 #define ACT_VISIBILITY 18 +#define ACT_2DFILTER 19 +#define ACT_PARENT 20 +#define ACT_SHAPEACTION 21 +#define ACT_STATE 22 /* actuator flag */ #define ACT_SHOW 1 #define ACT_DEL 2 #define ACT_NEW 4 +#define ACT_LINKED 8 +#define ACT_VISIBLE 16 +#define ACT_PIN 32 /* link codes */ #define LINK_SENSOR 0 @@ -301,8 +343,9 @@ typedef struct FreeCamera { /* ipoactuator->flag */ #define ACT_IPOFORCE (1 << 0) #define ACT_IPOEND (1 << 1) -#define ACT_IPOFORCE_LOCAL (1 << 2) -#define ACT_IPOCHILD (1 << 4) +#define ACT_IPOLOCAL (1 << 2) +#define ACT_IPOCHILD (1 << 4) +#define ACT_IPOADD (1 << 5) /* ipoactuator->flag for k2k */ #define ACT_K2K_PREV 1 @@ -322,14 +365,38 @@ typedef struct FreeCamera { #define ACT_CONST_ROTX 8 #define ACT_CONST_ROTY 16 #define ACT_CONST_ROTZ 32 +#define ACT_CONST_NORMAL 64 +#define ACT_CONST_MATERIAL 128 +#define ACT_CONST_PERMANENT 256 +#define ACT_CONST_DISTANCE 512 +#define ACT_CONST_LOCAL 1024 +#define ACT_CONST_DOROTFH 2048 + +/* constraint mode */ +#define ACT_CONST_DIRPX 1 +#define ACT_CONST_DIRPY 2 +#define ACT_CONST_DIRPZ 4 +#define ACT_CONST_DIRNX 8 +#define ACT_CONST_DIRNY 16 +#define ACT_CONST_DIRNZ 32 + +/* constraint type */ +#define ACT_CONST_TYPE_LOC 0 +#define ACT_CONST_TYPE_DIST 1 +#define ACT_CONST_TYPE_ORI 2 +#define ACT_CONST_TYPE_FH 3 /* editObjectActuator->type */ #define ACT_EDOB_ADD_OBJECT 0 #define ACT_EDOB_END_OBJECT 1 -#define ACT_EDOB_REPLACE_MESH 2 +#define ACT_EDOB_REPLACE_MESH 2 #define ACT_EDOB_TRACK_TO 3 -#define ACT_EDOB_MAKE_CHILD 4 -#define ACT_EDOB_END_CHILD 5 +#define ACT_EDOB_DYNAMICS 4 + +/* editObjectActuator->localflag */ +#define ACT_EDOB_LOCAL_LINV 2 +#define ACT_EDOB_LOCAL_ANGV 4 + /* editObjectActuator->flag */ #define ACT_TRACK_3D 1 @@ -383,10 +450,35 @@ typedef struct FreeCamera { #define ACT_GAME_START 1 #define ACT_GAME_RESTART 2 #define ACT_GAME_QUIT 3 +#define ACT_GAME_SAVECFG 4 +#define ACT_GAME_LOADCFG 5 /* visibilityact->flag */ /* Set means the object will become invisible */ #define ACT_VISIBILITY_INVISIBLE (1 << 0) - +#define ACT_VISIBILITY_RECURSIVE (1 << 1) + +/* twodfilter->type */ +#define ACT_2DFILTER_ENABLED -2 +#define ACT_2DFILTER_DISABLED -1 +#define ACT_2DFILTER_NOFILTER 0 +#define ACT_2DFILTER_MOTIONBLUR 1 +#define ACT_2DFILTER_BLUR 2 +#define ACT_2DFILTER_SHARPEN 3 +#define ACT_2DFILTER_DILATION 4 +#define ACT_2DFILTER_EROSION 5 +#define ACT_2DFILTER_LAPLACIAN 6 +#define ACT_2DFILTER_SOBEL 7 +#define ACT_2DFILTER_PREWITT 8 +#define ACT_2DFILTER_GRAYSCALE 9 +#define ACT_2DFILTER_SEPIA 10 +#define ACT_2DFILTER_INVERT 11 +#define ACT_2DFILTER_CUSTOMFILTER 12 +#define ACT_2DFILTER_NUMBER_OF_FILTERS 13 + +/* parentactuator->type */ +#define ACT_PARENT_SET 0 +#define ACT_PARENT_REMOVE 1 #endif + diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 21f88c71a6e..93cb9f59860 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -97,7 +97,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 - not yet used... */ + 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) */ } eArmature_Flag; @@ -140,7 +140,7 @@ typedef enum eBone_Flag { BONE_ROOTSEL = (1<<1), BONE_TIPSEL = (1<<2), BONE_TRANSFORM = (1<<3), /* Used instead of BONE_SELECTED during transform */ - BONE_CONNECTED = (1<<4), + BONE_CONNECTED = (1<<4), /* when bone has a parent, connect head of bone to parent's tail*/ /* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */ BONE_HIDDEN_P = (1<<6), /* hidden Bones when drawing PoseChannels */ BONE_DONE = (1<<7), /* For detecting cyclic dependancies */ @@ -148,11 +148,15 @@ typedef enum eBone_Flag { BONE_HINGE = (1<<9), /* No parent rotation or scale */ BONE_HIDDEN_A = (1<<10), /* hidden Bones when drawing Armature Editmode */ BONE_MULT_VG_ENV = (1<<11), /* multiplies vgroup with envelope */ - BONE_NO_DEFORM = (1<<12), + BONE_NO_DEFORM = (1<<12), /* bone doesn't deform geometry */ BONE_UNKEYED = (1<<13), /* set to prevent destruction of its unkeyframed pose (after transform) */ BONE_HINGE_CHILD_TRANSFORM = (1<<14), /* set to prevent hinge child bones from influencing the transform center */ BONE_NO_SCALE = (1<<15), /* No parent scale */ - BONE_HIDDEN_PG = (1<<16) /* hidden bone when drawing PoseChannels (for ghost drawing) */ + BONE_HIDDEN_PG = (1<<16), /* hidden bone when drawing PoseChannels (for ghost drawing) */ + BONE_DRAWWIRE = (1<<17), /* bone should be drawn as OB_WIRE, regardless of draw-types of view+armature */ + BONE_NO_CYCLICOFFSET = (1<<18), /* when no parent, bone will not get cyclic offset */ + BONE_EDITMODE_LOCKED = (1<<19), /* bone transforms are locked in EditMode */ + BONE_TRANSFORM_CHILD = (1<<20), /* Indicates that a parent is also being transformed */ } eBone_Flag; #endif diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 1c272105067..c7196763358 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -33,7 +33,7 @@ #include "DNA_ID.h" #ifndef MAX_MTEX -#define MAX_MTEX 10 +#define MAX_MTEX 18 #endif struct MTex; @@ -58,7 +58,7 @@ typedef struct Brush { float alpha; /* opacity */ short texact, pad; - struct MTex *mtex[10]; + struct MTex *mtex[18]; /* MAX_MTEX */ struct BrushClone clone; } Brush; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h new file mode 100644 index 00000000000..c99dc44cd5e --- /dev/null +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -0,0 +1,95 @@ +/** +* $Id: DNA_cloth_types.h,v 1.1 2007/08/01 02:28:34 daniel Exp $ +* +* ***** 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. +* +* The Original Code is Copyright (C) 2006 by NaN Holding BV. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): Daniel (Genscher) +* +* ***** END GPL LICENSE BLOCK ***** +*/ +#ifndef DNA_CLOTH_TYPES_H +#define DNA_CLOTH_TYPES_H + +/** +* This struct contains all the global data required to run a simulation. +* At the time of this writing, this structure contains data appropriate +* to run a simulation as described in Deformation Constraints in a +* Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot. +* +* I've tried to keep similar, if not exact names for the variables as +* are presented in the paper. Where I've changed the concept slightly, +* as in stepsPerFrame comapred to the time step in the paper, I've used +* variables with different names to minimize confusion. +**/ + +typedef struct ClothSimSettings +{ + struct LinkNode *cache; /* UNUSED atm */ + float mingoal; /* see SB */ + float Cdis; /* Mechanical damping of springs. */ + float Cvi; /* Viscous/fluid damping. */ + float gravity [3]; /* Gravity/external force vector. */ + float dt; /* This is the duration of our time step, computed. */ + float mass; /* The mass of the entire cloth. */ + float structural; /* Structural spring stiffness. */ + float shear; /* Shear spring stiffness. */ + float bending; /* Flexion spring stiffness. */ + float max_bend; /* max bending scaling value, min is "bending" */ + float max_struct; /* max structural scaling value, min is "structural" */ + float max_shear; /* max shear scaling value, UNUSED */ + float avg_spring_len; /* used for normalized springs */ + float timescale; /* parameter how fast cloth runs */ + float maxgoal; /* see SB */ + float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ + float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ + float sim_time_old; + float defgoal; + float goalspring; + float goalfrict; + int stepsPerFrame; /* Number of time steps per frame. */ + int flags; /* flags, see CSIMSETT_FLAGS enum above. */ + int preroll; /* How many frames of simulation to do before we start. */ + int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ + short solver_type; /* which solver should be used? txold */ + short vgroup_bend; /* vertex group for scaling bending stiffness */ + short vgroup_mass; /* optional vertexgroup name for assigning weight.*/ + short vgroup_struct; /* vertex group for scaling structural stiffness */ + short presets; /* used for presets on GUI */ + short pad; + int pad2; +} ClothSimSettings; + + +typedef struct ClothCollSettings +{ + struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ + float epsilon; /* min distance for collisions. */ + float self_friction; /* Fiction/damping with self contact. */ + float friction; /* Friction/damping applied on contact with other object.*/ + float selfepsilon; /* for selfcollision */ + int flags; /* collision flags defined in BKE_cloth.h */ + short self_loop_count; /* How many iterations for the selfcollision loop */ + short loop_count; /* How many iterations for the collision loop. */ +} ClothCollSettings; + + +#endif diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index a4224976f5f..3caa74c9a72 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -69,13 +69,16 @@ typedef struct CurveMapping { CurveMap cm[4]; /* max 4 builtin curves per mapping struct now */ float black[3], white[3]; /* black/white point (black[0] abused for current frame) */ - float bwmul[3], padf; /* black/white point multiply value, for speed */ + float bwmul[3]; /* black/white point multiply value, for speed */ + + float sample[3]; /* sample values, if flag set it draws line and intersection */ } CurveMapping; /* cumapping->flag */ #define CUMA_DO_CLIP 1 #define CUMA_PREMULLED 2 #define CUMA_DRAW_CFRA 4 +#define CUMA_DRAW_SAMPLE 8 #endif diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 1a82ec07f00..fe19cf60f12 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -304,6 +304,19 @@ typedef struct bSizeLimitConstraint { short flag2; } bSizeLimitConstraint; +/* Limit Distance Constraint */ +typedef struct bDistLimitConstraint { + Object *tar; + char subtarget[32]; + + float dist; /* distance (radius of clamping sphere) from target */ + float soft; /* distance from clamping-sphere to start applying 'fade' */ + + short flag; /* settings */ + short mode; /* how to limit in relation to clamping sphere */ + int pad; +} bDistLimitConstraint; + /* ------------------------------------------ */ /* bConstraint->type @@ -325,13 +338,14 @@ typedef enum B_CONSTAINT_TYPES { CONSTRAINT_TYPE_PYTHON, /* Unimplemented no longer :) - Aligorith. Scripts */ CONSTRAINT_TYPE_ACTION, CONSTRAINT_TYPE_LOCKTRACK, /* New Tracking constraint that locks an axis in place - theeth */ - CONSTRAINT_TYPE_DISTANCELIMIT, /* was never properly coded - removed! */ + CONSTRAINT_TYPE_DISTLIMIT, /* limit distance */ CONSTRAINT_TYPE_STRETCHTO, /* claiming this to be mine :) is in tuhopuu bjornmose */ CONSTRAINT_TYPE_MINMAX, /* floor constraint */ CONSTRAINT_TYPE_RIGIDBODYJOINT, /* rigidbody constraint */ CONSTRAINT_TYPE_CLAMPTO, /* clampto constraint */ CONSTRAINT_TYPE_TRANSFORM, /* transformation (loc/rot/size -> loc/rot/size) constraint */ + /* NOTE: everytime a new constraint is added, update this */ NUM_CONSTRAINT_TYPES= CONSTRAINT_TYPE_TRANSFORM } B_CONSTRAINT_TYPES; @@ -349,7 +363,9 @@ typedef enum B_CONSTRAINT_FLAG { /* to indicate that the owner's space should only be changed into ownspace, but not out of it */ CONSTRAINT_SPACEONCE = (1<<6), /* influence ipo is on constraint itself, not in action channel */ - CONSTRAINT_OWN_IPO = (1<<7) + 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) } B_CONSTRAINT_FLAG; /* bConstraint->ownspace/tarspace */ @@ -359,11 +375,13 @@ typedef enum B_CONSTRAINT_SPACETYPES { /* for objects (relative to parent/without parent influence), * for bones (along normals of bone, without parent/restpositions) */ - CONSTRAINT_SPACE_LOCAL, + CONSTRAINT_SPACE_LOCAL, /* = 1 */ /* for posechannels - pose space */ - CONSTRAINT_SPACE_POSE, - /* for posechannels - local with parent */ - CONSTRAINT_SPACE_PARLOCAL, + CONSTRAINT_SPACE_POSE, /* = 2 */ + /* 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! */ } B_CONSTRAINT_SPACETYPES; /* bConstraintChannel.flag */ @@ -445,7 +463,9 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG { /* bKinematicConstraint->flag */ #define CONSTRAINT_IK_TIP 1 #define CONSTRAINT_IK_ROT 2 + /* targetless */ #define CONSTRAINT_IK_AUTO 4 + /* autoik */ #define CONSTRAINT_IK_TEMP 8 #define CONSTRAINT_IK_STRETCH 16 #define CONSTRAINT_IK_POS 32 @@ -473,6 +493,15 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG { #define LIMIT_NOPARENT 0x01 /* for all Limit constraints - allow to be used during transform? */ #define LIMIT_TRANSFORM 0x02 + +/* distance limit constraint */ + /* bDistLimitConstraint->flag */ +#define LIMITDIST_USESOFT (1<<0) + + /* bDistLimitConstraint->mode */ +#define LIMITDIST_INSIDE 0 +#define LIMITDIST_OUTSIDE 1 +#define LIMITDIST_ONSURFACE 2 /* python constraint -> flag */ #define PYCON_USETARGETS 0x01 @@ -491,6 +520,7 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG { /* Rigid-Body Constraint */ #define CONSTRAINT_DRAW_PIVOT 0x40 +#define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80 /* important: these defines need to match up with PHY_DynamicTypes headerfile */ #define CONSTRAINT_RB_BALL 1 diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h index 95c9b0d0cf7..376f95b0145 100644 --- a/source/blender/makesdna/DNA_controller_types.h +++ b/source/blender/makesdna/DNA_controller_types.h @@ -57,7 +57,7 @@ typedef struct bController { struct bSensor **slinks; short val, valo; - int pad5; + unsigned int state_mask; } bController; @@ -66,11 +66,16 @@ typedef struct bController { #define CONT_LOGIC_OR 1 #define CONT_EXPRESSION 2 #define CONT_PYTHON 3 +#define CONT_LOGIC_NAND 4 +#define CONT_LOGIC_NOR 5 +#define CONT_LOGIC_XOR 6 +#define CONT_LOGIC_XNOR 7 /* controller->flag */ #define CONT_SHOW 1 #define CONT_DEL 2 #define CONT_NEW 4 +#define CONT_MASK 8 #endif diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index a4fb8dc1150..f809cac037d 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -68,7 +68,7 @@ typedef struct BevList { # # typedef struct BevPoint { - float x, y, z, alfa, sina, cosa, mat[3][3]; + float x, y, z, alfa, radius, sina, cosa, mat[3][3]; short f1, f2; } BevPoint; @@ -115,7 +115,7 @@ typedef struct Nurb { BezTriple *bezt; short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */ - short pad; + short radius_interp; int charidx; } Nurb; @@ -187,37 +187,6 @@ typedef struct Curve { struct CharInfo curinfo; } Curve; -typedef struct IpoDriver { - struct Object *ob; - short blocktype, adrcode, type, flag; - char name[128]; /* bone or constraint(?), or python expression here */ -} IpoDriver; - -/* temp? we store more bone names in 1 driver... */ -#define DRIVER_NAME_OFFS 32 - -typedef struct IpoCurve { - struct IpoCurve *next, *prev; - - struct BPoint *bp; /* are these even used anywhere? */ - struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple)*totvert. i.e. keyframes */ - - rctf maxrct, totrct; /* bounding boxes */ - - short blocktype, adrcode, vartype; /* blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data */ - short totvert; /* total number of BezTriples (i.e. keyframes) on curve */ - short ipo, extrap; /* interpolation and extrapolation modes */ - short flag, rt; /* flag= settings; rt= ??? */ - float ymin, ymax; /* minimum/maximum y-extents for curve */ - unsigned int bitmask; /* ??? */ - - float slide_min, slide_max; /* minimum/maximum values for sliders (in action editor) */ - float curval; /* value of ipo-curve for current frame */ - - IpoDriver *driver; /* pointer to ipo-driver for this curve */ - -} IpoCurve; - /* **************** CURVE ********************* */ /* texflag */ @@ -273,15 +242,5 @@ typedef struct IpoCurve { #define CU_UNDERLINE 4 #define CU_WRAP 8 /* wordwrap occured here */ -/* *************** driver ****************** */ - -/* driver->type */ -#define IPO_DRIVER_TYPE_NORMAL 0 -#define IPO_DRIVER_TYPE_PYTHON 1 - -/* driver->flag */ -/* invalid flag: currently only used for buggy pydriver expressions: */ -#define IPO_DRIVER_FLAG_INVALID 1 - #endif diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 73a39abac55..6c098e220bb 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -26,6 +26,7 @@ * * ***** END GPL LICENSE BLOCK ***** */ + #ifndef DNA_CUSTOMDATA_TYPES_H #define DNA_CUSTOMDATA_TYPES_H @@ -48,6 +49,7 @@ typedef struct CustomData { CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ int totlayer, maxlayer; /* number of layers, size of layers array */ int totsize, pad; /* in editmode, total size of all data layers */ + void *pool; /* for Bmesh: Memory pool for allocation of blocks*/ } CustomData; /* CustomData.type */ @@ -66,7 +68,11 @@ typedef struct CustomData { #define CD_PROP_STR 12 #define CD_ORIGSPACE 13 /* for modifier stack face location mapping */ #define CD_ORCO 14 -#define CD_NUMTYPES 15 +#define CD_MTEXPOLY 15 +#define CD_MLOOPUV 16 +#define CD_MLOOPCOL 17 +#define CD_TANGENT 18 +#define CD_NUMTYPES 19 /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) @@ -84,6 +90,10 @@ typedef struct CustomData { #define CD_MASK_PROP_STR (1 << CD_PROP_STR) #define CD_MASK_ORIGSPACE (1 << CD_ORIGSPACE) #define CD_MASK_ORCO (1 << CD_ORCO) +#define CD_MASK_MTEXPOLY (1 << CD_MTEXPOLY) +#define CD_MASK_MLOOPUV (1 << CD_MLOOPUV) +#define CD_MASK_MLOOPCOL (1 << CD_MLOOPCOL) +#define CD_MASK_TANGENT (1 << CD_TANGENT) /* CustomData.flag */ diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h new file mode 100644 index 00000000000..70f469b2bb8 --- /dev/null +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -0,0 +1,145 @@ +/** + * $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. + * + * The Original Code is Copyright (C) 2008, Blender Foundation. + * This is a new part of Blender + * + * Contributor(s): Joshua Leung + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef DNA_GPENCIL_TYPES_H +#define DNA_GPENCIL_TYPES_H + +#include "DNA_listBase.h" +#include "DNA_ID.h" + +/* Grease-Pencil Annotations - 'Stroke Point' + * -> Coordinates may either be 2d or 3d depending on settings at the time + * -> Coordinates of point on stroke, in proportions of window size + * (i.e. n/1000). This assumes that the bottom-left corner is (0,0) + */ +typedef struct bGPDspoint { + float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */ + float pressure; /* pressure of input device (from 0 to 1) at this point */ +} bGPDspoint; + +/* Grease-Pencil Annotations - 'Stroke' + * -> A stroke represents a (simplified version) of the curve + * drawn by the user in one 'mousedown'->'mouseup' operation + */ +typedef struct bGPDstroke { + struct bGPDstroke *next, *prev; + + bGPDspoint *points; /* array of data-points for stroke */ + int totpoints; /* number of data-points in array */ + + short thickness; /* thickness of stroke (currently not used) */ + short flag; /* various settings about this stroke */ +} bGPDstroke; + +/* bGPDstroke->flag */ + /* stroke is in 3d-space */ +#define GP_STROKE_3DSPACE (1<<0) + /* stroke is in 2d-space */ +#define GP_STROKE_2DSPACE (1<<1) + /* stroke is in 2d-space (but with special 'image' scaling) */ +#define GP_STROKE_2DIMAGE (1<<2) + /* only for use with stroke-buffer (while drawing eraser) */ +#define GP_STROKE_ERASER (1<<15) + + +/* Grease-Pencil Annotations - 'Frame' + * -> Acts as storage for the 'image' formed by strokes + */ +typedef struct bGPDframe { + struct bGPDframe *next, *prev; + + ListBase strokes; /* list of the simplified 'strokes' that make up the frame's data */ + + int framenum; /* frame number of this frame */ + int flag; /* temp settings */ +} bGPDframe; + +/* bGPDframe->flag */ + /* frame is being painted on */ +#define GP_FRAME_PAINT (1<<0) + /* for editing in Action Editor */ +#define GP_FRAME_SELECT (1<<1) + + +/* Grease-Pencil Annotations - 'Layer' */ +typedef struct bGPDlayer { + struct bGPDlayer *next, *prev; + + ListBase frames; /* list of annotations to display for frames (bGPDframe list) */ + bGPDframe *actframe; /* active frame (should be the frame that is currently being displayed) */ + + int flag; /* settings for layer */ + short thickness; /* current thickness to apply to strokes */ + short gstep; /* max number of frames between active and ghost to show (0=only those on either side) */ + + float color[4]; /* color that should be used to draw all the strokes in this layer */ + + char info[128]; /* optional reference info about this layer (i.e. "director's comments, 12/3") */ +} bGPDlayer; + +/* bGPDlayer->flag */ + /* don't display layer */ +#define GP_LAYER_HIDE (1<<0) + /* protected from further editing */ +#define GP_LAYER_LOCKED (1<<1) + /* layer is 'active' layer being edited */ +#define GP_LAYER_ACTIVE (1<<2) + /* draw points of stroke for debugging purposes */ +#define GP_LAYER_DRAWDEBUG (1<<3) + /* do onionskinning */ +#define GP_LAYER_ONIONSKIN (1<<4) + /* for editing in Action Editor */ +#define GP_LAYER_SELECT (1<<5) + + +/* Grease-Pencil Annotations - 'DataBlock' */ +typedef struct bGPdata { + /* saved Grease-Pencil data */ + ListBase layers; /* bGPDlayers */ + int flag; /* settings for this datablock */ + + /* not-saved stroke buffer data (only used during paint-session) + * - buffer must be initialised before use, but freed after + * whole paint operation is over + */ + short sbuffer_size; /* number of elements currently in cache */ + short sbuffer_sflag; /* flags for stroke that cache represents */ + void *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */ +} bGPdata; + +/* bGPdata->flag */ + /* don't allow painting to occur at all */ +#define GP_DATA_LMBPLOCK (1<<0) + /* show debugging info in viewport (i.e. status print) */ +#define GP_DATA_DISPINFO (1<<1) + /* in Action Editor, show as expanded channel */ +#define GP_DATA_EXPAND (1<<2) + /* is the block overriding all clicks? */ +#define GP_DATA_EDITPAINT (1<<3) + /* new strokes are added in viewport space */ +#define GP_DATA_VIEWALIGN (1<<4) + +#endif /* DNA_GPENCIL_TYPES_H */ diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index 1bb18ca2ca2..0987050261d 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -54,7 +54,7 @@ typedef struct Group { * the objects that show in the group can change depending * on the last used scene */ unsigned int layer; - int pad; + float dupli_ofs[3]; } Group; diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index b1e632661e8..e1d79f0f875 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -37,6 +37,7 @@ struct PackedFile; struct anim; struct ImBuf; struct RenderResult; +struct GPUTexture; /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */ @@ -55,13 +56,15 @@ typedef struct ImageUser { /* iuser->flag */ #define IMA_ANIM_ALWAYS 1 #define IMA_ANIM_REFRESHED 2 +/* #define IMA_DO_PREMUL 4 */ typedef struct Image { ID id; char name[240]; /* file path */ - ListBase ibufs; /* not written in file */ + ListBase ibufs; /* not written in file */ + struct GPUTexture *gputexture; /* not written in file */ /* sources from: */ struct anim *anim; @@ -101,11 +104,12 @@ typedef struct Image { /* flag */ #define IMA_FIELDS 1 #define IMA_STD_FIELD 2 +#define IMA_DO_PREMUL 4 #define IMA_REFLECT 16 #define IMA_NOCOLLECT 32 #define IMA_ANTIALI 64 -#define IMA_DO_PREMUL 128 +#define IMA_OLD_PREMUL 128 /* tpageflag */ #define IMA_TILES 1 diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 3954a500dc7..432399e3581 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -24,7 +24,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): none yet. + * Contributor(s): Joshua Leung * * ***** END GPL LICENSE BLOCK ***** */ @@ -32,10 +32,54 @@ #define DNA_IPO_TYPES_H #include "DNA_listBase.h" +#include "DNA_curve_types.h" #include "DNA_vec_types.h" #include "DNA_ID.h" +/* -------------------------- Type Defines --------------------------- */ + +/* sometimes used - mainly for GE/Ketsji */ +typedef short IPO_Channel; + + +/* --- IPO Curve Driver --- */ + +/* IPO Curve Driver */ +typedef struct IpoDriver { + struct Object *ob; /* target/driver ob */ + short blocktype, adrcode; /* sub-channel to use */ + + short type, flag; /* driver settings */ + char name[128]; /* bone, or python expression here */ +} IpoDriver; + +/* --- IPO Curve --- */ + +/* IPO Curve */ +typedef struct IpoCurve { + struct IpoCurve *next, *prev; + + struct BPoint *bp; /* array of BPoints (sizeof(BPoint)*totvert) - i.e. baked/imported data */ + struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple)*totvert) - i.e. user-editable keyframes */ + + rctf maxrct, totrct; /* bounding boxes */ + + short blocktype, adrcode, vartype; /* blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data */ + short totvert; /* total number of BezTriples (i.e. keyframes) on curve */ + short ipo, extrap; /* interpolation and extrapolation modes */ + short flag, rt; /* flag= settings; rt= ??? */ + float ymin, ymax; /* minimum/maximum y-extents for curve */ + unsigned int bitmask; /* ??? */ + + float slide_min, slide_max; /* minimum/maximum values for sliders (in action editor) */ + float curval; /* value of ipo-curve for current frame */ + + IpoDriver *driver; /* pointer to ipo-driver for this curve */ +} IpoCurve; + +/* --- ID-Datablock --- */ + /* IPO Data-Block */ typedef struct Ipo { ID id; @@ -47,13 +91,9 @@ typedef struct Ipo { short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */ } Ipo; -/* NOTE: IpoCurve struct is defined in DNA_curve_types.h, not in here... */ - -/* sometimes used */ -typedef short IPO_Channel; +/* ----------- adrcodes (for matching ipo-curves to data) ------------- */ /* defines: are these duped or new? */ - #define IPOBUTY 17 #define TOB_IPO 1 @@ -64,7 +104,7 @@ typedef short IPO_Channel; #define IPO_DISPBITS 2 #define IPO_DISPTIME 3 -/* ******************** */ +/* ********** Object (ID_OB) ********** */ #define OB_TOTIPO 30 #define OB_TOTNAM 30 @@ -110,7 +150,7 @@ typedef short IPO_Channel; #define OB_ROT_DIFF 100 -/* ******************** */ +/* ********** Material (ID_MA) ********** */ #define MA_TOTIPO 40 #define MA_TOTNAM 26 @@ -142,16 +182,26 @@ typedef short IPO_Channel; #define MA_FRESTRAI 25 #define MA_ADD 26 -#define MA_MAP1 0x20 -#define MA_MAP2 0x40 -#define MA_MAP3 0x80 -#define MA_MAP4 0x100 -#define MA_MAP5 0x200 -#define MA_MAP6 0x400 -#define MA_MAP7 0x800 -#define MA_MAP8 0x1000 -#define MA_MAP9 0x2000 -#define MA_MAP10 0x4000 +#define MA_MAP1 (1<<5) +#define MA_MAP2 (1<<6) +#define MA_MAP3 (1<<7) +#define MA_MAP4 (1<<8) +#define MA_MAP5 (1<<9) +#define MA_MAP6 (1<<10) +#define MA_MAP7 (1<<11) +#define MA_MAP8 (1<<12) +#define MA_MAP9 (1<<13) +#define MA_MAP10 (1<<14) +#define MA_MAP11 (1<<15) +#define MA_MAP12 (1<<16) +#define MA_MAP13 (1<<17) +#define MA_MAP14 (1<<18) +#define MA_MAP15 (1<<19) +#define MA_MAP16 (1<<20) +#define MA_MAP17 (1<<21) +#define MA_MAP18 (1<<22) + +/* ********** Texture Slots (MTex) ********** */ #define TEX_TOTNAM 14 @@ -171,7 +221,7 @@ typedef short IPO_Channel; #define MAP_VARF 13 #define MAP_DISP 14 -/* ******************** */ +/* ********** Texture (ID_TE) ********** */ #define TE_TOTIPO 26 #define TE_TOTNAM 26 @@ -208,21 +258,21 @@ typedef short IPO_Channel; #define TE_BRIGHT 25 #define TE_CONTRA 26 -/* ******************** */ +/* ******** Sequence (ID_SEQ) ********** */ #define SEQ_TOTIPO 1 #define SEQ_TOTNAM 1 #define SEQ_FAC1 1 -/* ******************** */ +/* ********* Curve (ID_CU) *********** */ #define CU_TOTIPO 1 #define CU_TOTNAM 1 #define CU_SPEED 1 -/* ******************** */ +/* ********* ShapeKey (ID_KE) *********** */ #define KEY_TOTIPO 64 #define KEY_TOTNAM 64 @@ -230,7 +280,7 @@ typedef short IPO_Channel; #define KEY_SPEED 0 #define KEY_NR 1 -/* ******************** */ +/* ********* World (ID_WO) *********** */ #define WO_TOTIPO 29 #define WO_TOTNAM 16 @@ -255,7 +305,7 @@ typedef short IPO_Channel; #define WO_STARDIST 15 #define WO_STARSIZE 16 -/* ******************** */ +/* ********** Lamp (ID_LA) ********** */ #define LA_TOTIPO 21 #define LA_TOTNAM 10 @@ -271,9 +321,8 @@ typedef short IPO_Channel; #define LA_QUAD2 9 #define LA_HALOINT 10 -/* ******************** */ +/* ********* Camera (ID_CA) ************ */ -/* yafray: totipo & totnam +2 because of added curves */ #define CAM_TOTIPO 7 #define CAM_TOTNAM 7 @@ -288,7 +337,7 @@ typedef short IPO_Channel; #define CAM_SHIFT_X 6 #define CAM_SHIFT_Y 7 -/* ******************** */ +/* ********* Sound (ID_SO) *********** */ #define SND_TOTIPO 4 #define SND_TOTNAM 4 @@ -298,9 +347,9 @@ typedef short IPO_Channel; #define SND_PANNING 3 #define SND_ATTEN 4 -/* ******************** */ +/* ******* PoseChannel (ID_PO) ********* */ -#define AC_TOTIPO 10 /* __NLA */ +#define AC_TOTIPO 10 #define AC_TOTNAM 10 #define AC_LOC_X 1 @@ -316,28 +365,18 @@ typedef short IPO_Channel; #define AC_QUAT_Y 27 #define AC_QUAT_Z 28 -/* ******************** */ -#define CO_TOTIPO 2 /* Constraint Ipos */ +/* ******** Constraint (ID_CO) ********** */ + +#define CO_TOTIPO 2 #define CO_TOTNAM 2 #define CO_ENFORCE 1 #define CO_HEADTAIL 2 -/* -#define CO_TIME 2 -#define CO_OFFSET_X 3 -#define CO_OFFSET_Y 4 -#define CO_OFFSET_Z 5 -#define CO_ORIENT_X 6 -#define CO_ORIENT_Y 7 -#define CO_ORIENT_Z 8 -#define CO_ROLL 9 -*/ -/* ******************** */ -/* fluidsim ipos NT */ +/* ****** FluidSim (ID_FLUIDSIM) ****** */ -#define FLUIDSIM_TOTIPO 9 -#define FLUIDSIM_TOTNAM 9 +#define FLUIDSIM_TOTIPO 13 +#define FLUIDSIM_TOTNAM 13 #define FLUIDSIM_VISC 1 #define FLUIDSIM_TIME 2 @@ -352,10 +391,17 @@ typedef short IPO_Channel; #define FLUIDSIM_ACTIVE 9 +#define FLUIDSIM_ATTR_FORCE_STR 10 +#define FLUIDSIM_ATTR_FORCE_RADIUS 11 +#define FLUIDSIM_VEL_FORCE_STR 12 +#define FLUIDSIM_VEL_FORCE_RADIUS 13 + /* ******************** */ /* particle ipos */ -#define PART_TOTIPO 19 -#define PART_TOTNAM 19 + +/* ******* Particle (ID_PA) ******** */ +#define PART_TOTIPO 25 +#define PART_TOTNAM 25 #define PART_EMIT_FREQ 1 #define PART_EMIT_LIFE 2 @@ -381,9 +427,18 @@ typedef short IPO_Channel; #define PART_BB_TILT 19 +#define PART_PD_FSTR 20 +#define PART_PD_FFALL 21 +#define PART_PD_FMAXD 22 + +#define PART_PD2_FSTR 23 +#define PART_PD2_FFALL 24 +#define PART_PD2_FMAXD 25 + + +/* -------------------- Defines: Flags and Types ------------------ */ -/* these are IpoCurve specific */ -/* **************** IPO ********************* */ +/* ----- IPO Curve Defines ------- */ /* icu->vartype */ #define IPO_CHAR 0 @@ -393,6 +448,7 @@ typedef short IPO_Channel; #define IPO_FLOAT 4 #define IPO_DOUBLE 5 #define IPO_FLOAT_DEGR 6 + /* very special case, in keys */ #define IPO_BEZTRIPLE 100 #define IPO_BPOINT 101 @@ -407,7 +463,8 @@ typedef short IPO_Channel; #define IPO_CONST 0 #define IPO_LIN 1 #define IPO_BEZ 2 -#define IPO_MIXED 3 /* not used yet */ + /* not used yet */ +#define IPO_MIXED 3 /* icu->extrap */ #define IPO_HORIZ 0 @@ -425,6 +482,19 @@ typedef short IPO_Channel; #define IPO_PROTECT 64 #define IPO_MUTE 128 +/* ---------- IPO Drivers ----------- */ + +/* offset in driver->name for finding second posechannel for rot-diff */ +#define DRIVER_NAME_OFFS 32 + +/* driver->type */ +#define IPO_DRIVER_TYPE_NORMAL 0 +#define IPO_DRIVER_TYPE_PYTHON 1 + +/* driver->flag */ + /* invalid flag: currently only used for buggy pydriver expressions */ +#define IPO_DRIVER_FLAG_INVALID (1<<0) + #endif diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 2afe78289c1..f8f2255c1a7 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -35,7 +35,7 @@ #include "DNA_scriptlink_types.h" #ifndef MAX_MTEX -#define MAX_MTEX 10 +#define MAX_MTEX 18 #endif struct MTex; @@ -45,20 +45,21 @@ struct CurveMapping; typedef struct Lamp { ID id; - short type, mode; + short type, pad3; + int mode; short colormodel, totex; float r, g, b, k; + float shdwr, shdwg, shdwb, shdwpad; float energy, dist, spotsize, spotblend; float haint; float att1, att2; /* Quad1 and Quad2 attenuation */ - int pad2; struct CurveMapping *curfalloff; short falloff_type; - short pad3; + short pad2; float clipsta, clipend, shadspotsize; float bias, soft; @@ -76,6 +77,23 @@ typedef struct Lamp { /* texact is for buttons */ short texact, shadhalostep; + /* sun/sky */ + short sun_effect_type; + short skyblendtype; + float horizon_brightness; + float spread; + float sun_brightness; + float sun_size; + float backscattered_light; + float sun_intensity; + float atm_turbidity; + float atm_inscattering_factor; + float atm_extinction_factor; + float atm_distance_factor; + float skyblendfac; + float sky_exposure; + short sky_colorspace, pad4; + /* yafray: photonlight params */ int YF_numphotons, YF_numsearch; short YF_phdepth, YF_useqmc, YF_bufsize, YF_pad; @@ -84,7 +102,7 @@ typedef struct Lamp { float YF_glowint, YF_glowofs; short YF_glowtype, YF_pad2; - struct MTex *mtex[10]; + struct MTex *mtex[18]; /* MAX_MTEX */ struct Ipo *ipo; /* preview */ @@ -122,6 +140,17 @@ typedef struct Lamp { /* yafray: lamp shadowbuffer flag, softlight */ /* Since it is used with LOCAL lamp, can't use LA_SHAD */ #define LA_YF_SOFT 16384 +#define LA_LAYER_SHADOW 32768 +#define LA_SHAD_TEX (1<<16) + +/* layer_shadow */ +#define LA_LAYER_SHADOW_BOTH 0 +#define LA_LAYER_SHADOW_CAST 1 +#define LA_LAYER_SHADOW_RECEIVE 2 + +/* sun effect type*/ +#define LA_SUN_EFFECT_SKY 1 +#define LA_SUN_EFFECT_AP 2 /* falloff_type */ #define LA_FALLOFF_CONSTANT 0 @@ -165,6 +194,7 @@ typedef struct Lamp { /* mapto */ #define LAMAP_COL 1 +#define LAMAP_SHAD 2 #endif /* DNA_LAMP_TYPES_H */ diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 701041319e5..aa847050581 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -36,7 +36,7 @@ #include "DNA_listBase.h" #ifndef MAX_MTEX -#define MAX_MTEX 10 +#define MAX_MTEX 18 #endif struct MTex; @@ -76,21 +76,23 @@ typedef struct Material { float aniso_gloss_mir; float dist_mir; short fadeto_mir; - short pad1; + short shade_flag; /* like Cubic interpolation */ int mode, mode_l; /* mode_l is the or-ed result of all layer modes */ short flarec, starc, linec, ringc; float hasize, flaresize, subsize, flareboost; float strand_sta, strand_end, strand_ease, strand_surfnor; - float strand_min, strand_pad; + float strand_min, strand_widthfade; char strand_uvname[32]; - float sbias; /* shadow bias */ + float sbias; /* shadow bias to prevent terminator prob */ + float lbias; /* factor to multiply lampbias with (0.0 = no mult) */ float shad_alpha; /* in use for irregular shadowbuffer */ + int septex; /* for buttons and render*/ char rgbsel, texact, pr_type, use_nodes; - short pr_back, pr_lamp, septex, ml_flag; /* ml_flag is for disable base material */ + short pr_back, pr_lamp, pad4, ml_flag; /* ml_flag is for disable base material */ /* shaders */ short diff_shader, spec_shader; @@ -108,7 +110,7 @@ typedef struct Material { short ramp_show, pad3; float rampfac_col, rampfac_spec; - struct MTex *mtex[10]; + struct MTex *mtex[18]; /* MAX_MTEX */ struct bNodeTree *nodetree; struct Ipo *ipo; struct Group *group; /* light group */ @@ -131,6 +133,8 @@ typedef struct Material { int YF_dsmp, YF_preset, YF_djit; ScriptLink scriptlink; + + ListBase gpumaterial; /* runtime */ } Material; /* **************** MATERIAL ********************* */ @@ -156,6 +160,7 @@ typedef struct Material { #define MA_SHLESS 4 #define MA_WIRE 8 #define MA_VERTEXCOL 16 +#define MA_HALO_SOFT 16 #define MA_HALO 32 #define MA_ZTRA 64 #define MA_VERTEXCOLP 128 @@ -192,12 +197,16 @@ typedef struct Material { #define MA_STR_B_UNITS 0x40000000 #define MA_STR_SURFDIFF 0x80000000 -#define MA_MODE_MASK 0x4fffffff /* all valid mode bits */ +#define MA_MODE_MASK 0x6fffffff /* all valid mode bits */ /* ray mirror fadeout */ #define MA_RAYMIR_FADETOSKY 0 #define MA_RAYMIR_FADETOMAT 1 +/* shade_flag */ +#define MA_CUBIC 1 +#define MA_OBCOLOR 2 + /* diff_shader */ #define MA_DIFF_LAMBERT 0 #define MA_DIFF_ORENNAYAR 1 @@ -311,6 +320,7 @@ typedef struct Material { #define MA_LAMP 6 #define MA_SKY 7 #define MA_HAIR 10 +#define MA_ATMOS 11 /* pr_back */ #define MA_DARK 1 diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 819711a7875..fc686a4cc10 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -42,7 +42,7 @@ typedef struct MFace { typedef struct MEdge { unsigned int v1, v2; - char crease, pad; + char crease, bweight; short flag; } MEdge; @@ -60,7 +60,7 @@ typedef struct MDeformVert { typedef struct MVert { float co[3]; short no[3]; - char flag, mat_nr; + char flag, mat_nr, bweight, pad[3]; } MVert; /* at the moment alpha is abused for vertex painting @@ -69,6 +69,22 @@ typedef struct MCol { char a, r, g, b; } MCol; +/*bmesh custom data stuff*/ +typedef struct MTexPoly{ + struct Image *tpage; + char flag, transp; + short mode,tile,unwrap; +}MTexPoly; + +typedef struct MLoopUV{ + float uv[2]; +}MLoopUV; + +typedef struct MLoopCol{ + char a, r, g, b; + int pad; /*waste!*/ +}MLoopCol; + typedef struct MSticky { float co[2]; } MSticky; @@ -143,7 +159,7 @@ typedef struct Multires { MVert *verts; unsigned char level_count, current, newlvl, edgelvl, pinlvl, renderlvl; - unsigned char use_col, pad; + unsigned char use_col, flag; /* Special level 1 data that cannot be modified from other levels */ CustomData vdata; @@ -213,7 +229,7 @@ typedef struct PartialVisibility { /* mtface->mode */ #define TF_DYNAMIC 1 -#define TF_DEPRECATED 2 +#define TF_ALPHASORT 2 #define TF_TEX 4 #define TF_SHAREDVERT 8 #define TF_LIGHT 16 @@ -229,14 +245,16 @@ typedef struct PartialVisibility { #define TF_SHADOW 8192 #define TF_BMFONT 16384 -/* mtface->transp */ +/* mtface->transp, values 1-4 are used as flags in the GL, WARNING, TF_SUB cant work with this */ #define TF_SOLID 0 #define TF_ADD 1 #define TF_ALPHA 2 +#define TF_CLIP 4 /* clipmap alpha/binary alpha all or nothing! */ /* sub is not available in the user interface anymore */ #define TF_SUB 3 + /* mtface->unwrap */ #define TF_DEPRECATED1 1 #define TF_DEPRECATED2 2 @@ -247,4 +265,7 @@ typedef struct PartialVisibility { #define TF_PIN3 64 #define TF_PIN4 128 +/* multires->flag */ +#define MULTIRES_NO_RENDER 1 + #endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 51f0e961709..ae07434a37f 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -32,6 +32,13 @@ typedef enum ModifierType { eModifierType_ParticleSystem, eModifierType_ParticleInstance, eModifierType_Explode, + eModifierType_Cloth, + eModifierType_Collision, + eModifierType_Bevel, + eModifierType_Shrinkwrap, + eModifierType_Fluidsim, + eModifierType_Mask, + eModifierType_SimpleDeform, NUM_MODIFIER_TYPES } ModifierType; @@ -100,6 +107,24 @@ typedef struct BuildModifierData { int randomize, seed; } BuildModifierData; +/* Mask Modifier */ +typedef struct MaskModifierData { + ModifierData modifier; + + struct Object *ob_arm; /* armature to use to in place of hardcoded vgroup */ + char vgroup[32]; /* name of vertex group to use to mask */ + + int mode; /* using armature or hardcoded vgroup */ + int flag; /* flags for various things */ +} MaskModifierData; + +/* Mask Modifier -> mode */ +#define MOD_MASK_MODE_VGROUP 0 +#define MOD_MASK_MODE_ARM 1 + +/* Mask Modifier -> flag */ +#define MOD_MASK_INV (1<<0) + typedef struct ArrayModifierData { ModifierData modifier; @@ -173,6 +198,7 @@ typedef struct MirrorModifierData { #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 typedef struct EdgeSplitModifierData { ModifierData modifier; @@ -185,6 +211,27 @@ typedef struct EdgeSplitModifierData { #define MOD_EDGESPLIT_FROMANGLE 1<<1 #define MOD_EDGESPLIT_FROMFLAG 1<<2 +typedef struct BevelModifierData { + ModifierData modifier; + + float value; /* the "raw" bevel value (distance/amount to bevel) */ + int res; /* the resolution (as originally coded, it is the number of recursive bevels) */ + int pad; + short flags; /* general option flags */ + short val_flags; /* flags used to interpret the bevel value */ + short lim_flags; /* flags to tell the tool how to limit the bevel */ + short e_flags; /* flags to direct how edge weights are applied to verts */ + float bevel_angle; /* if the BME_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */ + char defgrp_name[32]; /* if the BME_BEVEL_VWEIGHT option is set, this will be the name of the vert group */ +} BevelModifierData; + +typedef struct BMeshModifierData { + ModifierData modifier; + + float pad; + int type; +} BMeshModifierData; + typedef struct DisplaceModifierData { ModifierData modifier; @@ -304,13 +351,14 @@ typedef struct WaveModifierData { short flag, pad; float startx, starty, height, width; - float narrow, speed, damp; + float narrow, speed, damp, falloff; int texmapping, uvlayer_tmp; char uvlayer_name[32]; - + float timeoffs, lifetime; + float pad1; } WaveModifierData; typedef struct ArmatureModifierData { @@ -341,6 +389,35 @@ typedef struct SoftbodyModifierData { ModifierData modifier; } SoftbodyModifierData; +typedef struct ClothModifierData { + ModifierData modifier; + + struct Cloth *clothObject; /* The internal data structure for cloth. */ + struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */ + struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */ + struct PointCache *point_cache; /* definition is in DNA_object_force.h */ +} ClothModifierData; + +typedef struct CollisionModifierData { + ModifierData modifier; + + struct MVert *x; /* position at the beginning of the frame */ + struct MVert *xnew; /* position at the end of the frame */ + struct MVert *xold; /* unsued atm, but was discussed during sprint */ + struct MVert *current_xnew; /* new position at the actual inter-frame step */ + struct MVert *current_x; /* position at the actual inter-frame step */ + struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */ + + struct MFace *mfaces; /* object face data */ + + unsigned int numverts; + unsigned int numfaces; + short absorption; /* used for forces, in % */ + short pad; + float time; /* cfra time of modifier */ + struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */ +} CollisionModifierData; + typedef enum { eBooleanModifierOp_Intersect, eBooleanModifierOp_Union, @@ -436,4 +513,80 @@ typedef struct ExplodeModifierData { float protect; } ExplodeModifierData; +typedef struct FluidsimModifierData { + ModifierData modifier; + + struct FluidsimSettings *fss; /* definition is is DNA_object_fluidsim.h */ + struct PointCache *point_cache; /* definition is in DNA_object_force.h */ +} FluidsimModifierData; + +typedef struct ShrinkwrapModifierData { + ModifierData modifier; + + struct Object *target; /* shrink target */ + struct Object *auxTarget; /* additional shrink target */ + char vgroup_name[32]; /* optional vertexgroup name */ + float keepDist; /* distance offset to keep from mesh/projection point */ + short shrinkType; /* shrink type projection */ + short shrinkOpts; /* shrink options */ + char projAxis; /* axis to project over */ + + /* + * if using projection over vertex normal this controls the + * the level of subsurface that must be done before getting the + * vertex coordinates and normal + */ + char subsurfLevels; + + char pad[6]; + +} ShrinkwrapModifierData; + +/* Shrinkwrap->shrinkType */ +#define MOD_SHRINKWRAP_NEAREST_SURFACE 0 +#define MOD_SHRINKWRAP_PROJECT 1 +#define MOD_SHRINKWRAP_NEAREST_VERTEX 2 + +/* Shrinkwrap->shrinkOpts */ +#define MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR (1<<0) /* allow shrinkwrap to move the vertex in the positive direction of axis */ +#define MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR (1<<1) /* allow shrinkwrap to move the vertex in the negative direction of axis */ + +#define MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (1<<3) /* ignore vertex moves if a vertex ends projected on a front face of the target */ +#define MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (1<<4) /* ignore vertex moves if a vertex ends projected on a back face of the target */ + +#define MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE (1<<5) /* distance is measure to the front face of the target */ + +#define MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS (1<<0) +#define MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS (1<<1) +#define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2) +#define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* projection over normal is used if no axis is selected */ + + +typedef struct SimpleDeformModifierData { + ModifierData modifier; + + struct Object *origin; /* object to control the origin of modifier space coordinates */ + char vgroup_name[32]; /* optional vertexgroup name */ + float factor; /* factors to control simple deforms */ + float limit[2]; /* lower and upper limit */ + + char mode; /* deform function */ + char axis; /* lock axis (for taper and strech) */ + char originOpts; /* originOptions */ + char pad; + +} SimpleDeformModifierData; + +#define MOD_SIMPLEDEFORM_MODE_TWIST 1 +#define MOD_SIMPLEDEFORM_MODE_BEND 2 +#define MOD_SIMPLEDEFORM_MODE_TAPER 3 +#define MOD_SIMPLEDEFORM_MODE_STRETCH 4 + +#define MOD_SIMPLEDEFORM_LOCK_AXIS_X (1<<0) +#define MOD_SIMPLEDEFORM_LOCK_AXIS_Y (1<<1) + +/* indicates whether simple deform should use the local + coordinates or global coordinates of origin */ +#define MOD_SIMPLEDEFORM_ORIGIN_LOCAL (1<<0) + #endif diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 5f20939fc23..eda37d952c1 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -58,7 +58,7 @@ typedef struct bNodeStack { #define NS_OSA_VALUES 2 typedef struct bNodeSocket { - struct bNodeSocket *next, *prev; + struct bNodeSocket *next, *prev, *new_sock; char name[32]; bNodeStack ns; /* custom data for inputs, only UI writes in this */ @@ -92,7 +92,8 @@ typedef struct bNodeSocket { #define SOCK_IN_USE 4 /* unavailable is for dynamic sockets */ #define SOCK_UNAVAIL 8 - + /* flag for selection status */ +#define SOCK_SEL 16 # # typedef struct bNodePreview { @@ -106,6 +107,7 @@ typedef struct bNode { struct bNode *next, *prev, *new_node; char name[32]; + char username[32]; /* custom name defined by user */ short type, flag; short done, level; /* both for dependency and sorting */ short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */ @@ -142,6 +144,8 @@ typedef struct bNode { #define NODE_GROUP_EDIT 128 /* free test flag, undefined */ #define NODE_TEST 256 + /* composite: don't do node but pass on buffer(s) */ +#define NODE_MUTED 512 typedef struct bNodeLink { struct bNodeLink *next, *prev; @@ -158,7 +162,8 @@ typedef struct bNodeTree { ListBase nodes, links; - bNodeStack **stack; /* stack is only while executing, no read/write in file */ + bNodeStack *stack; /* stack is only while executing, no read/write in file */ + struct ListBase *threadstack; /* same as above */ int type, init; /* set init on fileread */ int stacksize; /* amount of elements in stack */ @@ -167,6 +172,10 @@ typedef struct bNodeTree { ListBase alltypes; /* type definitions */ struct bNodeType *owntype; /* for groups or dynamic trees, no read/write */ + /* selected input/output socket */ + bNodeSocket *selin; + bNodeSocket *selout; + /* callbacks */ void (*timecursor)(int nr); void (*stats_draw)(char *str); @@ -191,13 +200,27 @@ typedef struct NodeImageAnim { } NodeImageAnim; typedef struct NodeBlurData { - short sizex, sizey, samples, maxspeed, minspeed, pad1; - float fac; + short sizex, sizey; + short samples, maxspeed, minspeed, relative; + float fac, percentx, percenty; short filtertype; char bokeh, gamma; - int pad2; + short curved; + short pad; + int image_in_width, image_in_height; /* needed for absolute/relative conversions */ } NodeBlurData; +typedef struct NodeDBlurData { + float center_x, center_y, distance, angle, spin, zoom; + short iter; + char wrap, pad; +} NodeDBlurData; + +typedef struct NodeBilateralBlurData { + float sigma_color, sigma_space; + short iter, pad; +} NodeBilateralBlurData; + typedef struct NodeHueSat { float hue, sat, val; } NodeHueSat; @@ -218,6 +241,10 @@ typedef struct NodeTwoXYs { short x1, x2, y1, y2; } NodeTwoXYs; +typedef struct NodeTwoFloats { + float x, y; +} NodeTwoFloats; + typedef struct NodeGeometry { char uvname[32]; char colname[32]; @@ -234,6 +261,10 @@ typedef struct NodeDefocus { float fstop, maxblur, bthresh, scale; } NodeDefocus; +typedef struct NodeScriptDict { + void *dict; /* for PyObject *dict */ + void *node; /* for BPy_Node *node */ +} NodeScriptDict; /* qdn: glare node */ typedef struct NodeGlare { diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 9b1e4fb56cb..2914330a2b0 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -108,7 +108,7 @@ typedef struct FluidsimSettings { float surfaceSmoothing; /* number of surface subdivisions*/ int surfaceSubdivs; - int unusedDNADummy; + int flag; /* GUI flags */ /* particle display - size scaling, and alpha influence */ float particleInfSize, particleInfAlpha; @@ -117,6 +117,18 @@ typedef struct FluidsimSettings { /* save fluidsurface normals in mvert.no, and surface vertex velocities (if available) in mvert.co */ struct MVert *meshSurfNormals; + + /* Fluid control settings */ + float cpsTimeStart; + float cpsTimeEnd; + float cpsQuality; + + float attractforceStrength; + float attractforceRadius; + float velocityforceStrength; + float velocityforceRadius; + + int lastgoodframe; } FluidsimSettings; @@ -128,8 +140,9 @@ typedef struct FluidsimSettings { #define OB_FLUIDSIM_INFLOW 16 #define OB_FLUIDSIM_OUTFLOW 32 #define OB_FLUIDSIM_PARTICLE 64 +#define OB_FLUIDSIM_CONTROL 128 -#define OB_TYPEFLAG_START 0 +#define OB_TYPEFLAG_START 7 #define OB_FSGEO_THIN (1<<(OB_TYPEFLAG_START+1)) #define OB_FSBND_NOSLIP (1<<(OB_TYPEFLAG_START+2)) #define OB_FSBND_PARTSLIP (1<<(OB_TYPEFLAG_START+3)) @@ -145,6 +158,9 @@ typedef struct FluidsimSettings { #define OB_FSPART_NEWPART (1<<3) #define OB_FSPART_FLOAT (1<<4) +// new fluid bit flags for fss->flags - dg +#define OB_FLUIDSIM_REVERSE (1 << 0) + #ifdef __cplusplus } #endif diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index bbd12fee7c2..21c5242a703 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -67,13 +67,75 @@ typedef struct PartDeflect { 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 pad; } PartDeflect; +typedef struct PointCache { + int flag; /* generic flag */ + int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ + int startframe; /* simulation start frame */ + int endframe; /* simulation end frame */ + int editframe; /* frame being edited (runtime only) */ +} PointCache; typedef struct SBVertex { float vec[4]; } SBVertex; +typedef struct BulletSoftBody { + int flag; /* various boolean options */ + float linStiff; /* linear stiffness 0..1 */ + float angStiff; /* angular stiffness 0..1 */ + float volume; /* volume preservation 0..1 */ + + int viterations; /* Velocities solver iterations */ + int piterations; /* Positions solver iterations */ + int diterations; /* Drift solver iterations */ + int citerations; /* Cluster solver iterations */ + + float kSRHR_CL; /* Soft vs rigid hardness [0,1] (cluster only) */ + float kSKHR_CL; /* Soft vs kinetic hardness [0,1] (cluster only) */ + float kSSHR_CL; /* Soft vs soft hardness [0,1] (cluster only) */ + float kSR_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ + + float kSK_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ + float kSS_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ + float kVCF; /* Velocities correction factor (Baumgarte) */ + float kDP; /* Damping coefficient [0,1] */ + + float kDG; /* Drag coefficient [0,+inf] */ + float kLF; /* Lift coefficient [0,+inf] */ + float kPR; /* Pressure coefficient [-inf,+inf] */ + float kVC; /* Volume conversation coefficient [0,+inf] */ + + float kDF; /* Dynamic friction coefficient [0,1] */ + float kMT; /* Pose matching coefficient [0,1] */ + float kCHR; /* Rigid contacts hardness [0,1] */ + float kKHR; /* Kinetic contacts hardness [0,1] */ + + float kSHR; /* Soft contacts hardness [0,1] */ + float kAHR; /* Anchors hardness [0,1] */ + int collisionflags; /* Vertex/Face or Signed Distance Field(SDF) or Clusters, Soft versus Soft or Rigid */ + int numclusteriterations; /* number of iterations to refine collision clusters*/ + +} BulletSoftBody; + +/* BulletSoftBody.flag */ +#define OB_BSB_SHAPE_MATCHING 2 +#define OB_BSB_UNUSED 4 +#define OB_BSB_BENDING_CONSTRAINTS 8 +#define OB_BSB_AERO_VPOINT 16 /* aero model, Vertex normals are oriented toward velocity*/ +#define OB_BSB_AERO_VTWOSIDE 32 /* aero model, Vertex normals are flipped to match velocity */ + +/* BulletSoftBody.collisionflags */ +#define OB_BSB_COL_SDF_RS 2 /* SDF based rigid vs soft */ +#define OB_BSB_COL_CL_RS 4 /* Cluster based rigid vs soft */ +#define OB_BSB_COL_CL_SS 8 /* Cluster based soft vs soft */ +#define OB_BSB_COL_VF_SS 16 /* Vertex/Face based soft vs soft */ + + typedef struct SoftBody { struct ParticleSystem *particles; /* particlesystem softbody */ @@ -81,7 +143,7 @@ typedef struct SoftBody { int totpoint, totspring; struct BodyPoint *bpoint; /* not saved in file */ struct BodySpring *bspring; /* not saved in file */ - float ctime; /* last time calculated */ + float pad; /* part of UI: */ @@ -126,10 +188,15 @@ typedef struct SoftBody { minloops, maxloops, choke, - pad3,pad4,pad5 + solver_ID, + plastic,springpreload ; struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */ + float shearstiff; + float inpush; + + struct PointCache *pointcache; } SoftBody; @@ -141,8 +208,8 @@ typedef struct SoftBody { #define PFIELD_GUIDE 5 #define PFIELD_TEXTURE 6 #define PFIELD_HARMONIC 7 -#define PFIELD_NUCLEAR 8 -#define PFIELD_MDIPOLE 9 +#define PFIELD_CHARGE 8 +#define PFIELD_LENNARDJ 9 /* pd->flag: various settings */ @@ -157,6 +224,7 @@ typedef struct SoftBody { #define PFIELD_USEMIN 256 #define PFIELD_USEMAXR 512 #define PFIELD_USEMINR 1024 +#define PFIELD_TEX_ROOTCO 2048 /* pd->falloff */ #define PFIELD_FALL_SPHERE 0 @@ -170,21 +238,30 @@ typedef struct SoftBody { #define PFIELD_TEX_GRAD 1 #define PFIELD_TEX_CURL 2 +/* pointcache->flag */ +#define PTCACHE_BAKED 1 +#define PTCACHE_OUTDATED 2 +#define PTCACHE_SIMULATION_VALID 4 +#define PTCACHE_BAKING 8 +#define PTCACHE_BAKE_EDIT 16 +#define PTCACHE_BAKE_EDIT_ACTIVE 32 + /* ob->softflag */ #define OB_SB_ENABLE 1 #define OB_SB_GOAL 2 #define OB_SB_EDGES 4 #define OB_SB_QUADS 8 #define OB_SB_POSTDEF 16 -#define OB_SB_REDO 32 -#define OB_SB_BAKESET 64 -#define OB_SB_BAKEDO 128 -#define OB_SB_RESET 256 +// #define OB_SB_REDO 32 +// #define OB_SB_BAKESET 64 +// #define OB_SB_BAKEDO 128 +// #define OB_SB_RESET 256 #define OB_SB_SELF 512 #define OB_SB_FACECOLL 1024 #define OB_SB_EDGECOLL 2048 #define OB_SB_COLLFINAL 4096 -#define OB_SB_PROTECT_CACHE 8192 +//#define OB_SB_PROTECT_CACHE 8192 +#define OB_SB_AERO_ANGLE 16384 /* sb->solverflags */ #define SBSO_MONITOR 1 diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 5120bee742c..b885bbf084e 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -59,6 +59,27 @@ typedef struct bDeformGroup { char name[32]; } bDeformGroup; +/** + * The following illustrates the orientation of the + * bounding box in local space + * + * + * Z Y + * | / + * |/ + * .-----X + * + * + * 2----------6 + * /| /| + * / | / | + * 1----------5 | + * | | | | + * | 3-------|--7 + * | / | / + * |/ |/ + * 0----------4 + */ typedef struct BoundBox { float vec[8][3]; int flag, pad; @@ -81,6 +102,7 @@ typedef struct Object { struct Path *path; struct BoundBox *bb; struct bAction *action; + struct bAction *poselib; struct bPose *pose; void *data; @@ -96,7 +118,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]; + /* float quat[4], dquat[4]; (not used yet) */ 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 */ @@ -115,7 +137,7 @@ typedef struct Object { int dupon, dupoff, dupsta, dupend; - float sf, ctime; + float sf, ctime; /* sf is time-offset, ctime is the objects current time */ /* during realtime */ @@ -134,7 +156,9 @@ typedef struct Object { float formfactor; float rdamping, sizefac; - + float margin; + int pad3; + char dt, dtx; char totcol; /* copy of mesh or curve or meta */ char actcol; /* currently selected material in the user interface */ @@ -147,10 +171,6 @@ typedef struct Object { ListBase sensors; ListBase controllers; ListBase actuators; - - /* now used to store cache particles, - * should be renamed see effect.c (Campbell) */ - void *sumohandle; float bbsize[3]; short index; /* custom index, for renderpasses */ @@ -173,7 +193,9 @@ typedef struct Object { * bit 15: Always ignore activity culling */ int gameflag2; - short softflag; /* softboday settings */ + struct BulletSoftBody *bsoft; /* settings for game engine bullet soft body */ + + short softflag; /* softbody settings */ short recalc; /* dependency flag */ float anisotropicFriction[3]; @@ -192,17 +214,22 @@ typedef struct Object { short shapenr, shapeflag; /* current shape key for menu or pinned, flag for pinning */ float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */ - short recalco, pad4; /* recalco for temp storage of ob->recalc, bad design warning */ + short recalco; /* recalco for temp storage of ob->recalc, bad design warning */ + short body_type; /* for now used to temporarily holds the type of collision object */ struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ struct DerivedMesh *derivedDeform, *derivedFinal; int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ - int pad; + unsigned int state; /* bit masks of game controllers that are active */ + unsigned int init_state; /* bit masks of initial state as recorded by the users */ + int pad2; /*#ifdef WITH_VERSE*/ void *vnode; /* pointer at object VerseNode */ /*#endif*/ + + ListBase gpulamp; /* runtime, for lamps only */ } Object; /* Warning, this is not used anymore because hooks are now modifiers */ @@ -293,6 +320,9 @@ extern Object workob; /* for stride edit */ #define OB_DISABLE_PATH 1024 +#define OB_OFFS_PARENTADD 2048 + + /* (short) trackflag / upflag */ #define OB_POSX 0 #define OB_POSY 1 @@ -365,6 +395,8 @@ extern Object workob; #define BA_FROMSET 128 +#define BA_TRANSFORM_CHILD 256 /* child of a transformed object */ + /* an initial attempt as making selection more specific! */ #define BA_DESELECT 0 #define BA_SELECT 1 @@ -383,6 +415,7 @@ extern Object workob; #define OB_RECALC_TIME 4 #define OB_RECALC 7 + /* ob->gameflag */ #define OB_DYNAMIC 1 #define OB_CHILD 2 @@ -402,11 +435,21 @@ extern Object workob; #define OB_PROP 16384 #define OB_MAINACTOR 32768 +#define OB_COLLISION 65536 +#define OB_SOFT_BODY 0x20000 + /* ob->gameflag2 */ #define OB_NEVER_DO_ACTIVITY_CULLING 1 #define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD) +/* ob->body_type */ +#define OB_BODY_TYPE_NO_COLLISION 0 +#define OB_BODY_TYPE_STATIC 1 +#define OB_BODY_TYPE_DYNAMIC 2 +#define OB_BODY_TYPE_RIGID 3 +#define OB_BODY_TYPE_SOFT 4 + /* ob->scavisflag */ #define OB_VIS_SENS 1 #define OB_VIS_CONT 2 @@ -419,6 +462,9 @@ extern Object workob; #define OB_ADDCONT 512 #define OB_ADDACT 1024 #define OB_SHOWCONT 2048 +#define OB_SETSTBIT 4096 +#define OB_INITSTBIT 8192 +#define OB_DEBUGSTATE 16384 /* ob->restrictflag */ #define OB_RESTRICT_VIEW 1 @@ -441,9 +487,11 @@ extern Object workob; #define OB_LOCK_ROTX 8 #define OB_LOCK_ROTY 16 #define OB_LOCK_ROTZ 32 +#define OB_LOCK_ROT 56 #define OB_LOCK_SCALEX 64 #define OB_LOCK_SCALEY 128 #define OB_LOCK_SCALEZ 256 +#define OB_LOCK_SCALE 448 /* ob->softflag in DNA_object_force.h */ diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 115344bd899..7dd69b2151c 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -66,6 +66,8 @@ typedef struct ParticleData { ParticleKey state; /* normally current global coordinates or */ /* in sticky object space if dead & sticky */ + ParticleKey prev_state; /* previous state */ + HairKey *hair; /* hair vertices */ ParticleKey *keys; /* keyed states */ @@ -125,18 +127,18 @@ typedef struct ParticleSettings { /* general values */ float sta, end, lifetime, randlife; - float timetweak, jitfac, keyed_time; + float timetweak, jitfac, keyed_time, eff_hair, rt; int totpart, userjit, grid_res; /* initial velocity factors */ float normfac, obfac, randfac, partfac, tanfac, tanphase, reactfac; - float rotfac, avefac, phasefac; + float avefac, phasefac, randrotfac, randphasefac; /* physical properties */ float mass, size, randsize, reactshape; /* global physical properties */ float acc[3], dragfac, brownfac, dampfac; /* length */ - float length, abslength, randlength, pad; + float length, abslength, randlength; /* children */ int child_nbr, ren_child_nbr; float parents, childsize, childrandsize; @@ -166,29 +168,30 @@ typedef struct ParticleSettings { struct Object *bb_ob; struct Ipo *ipo; struct PartDeflect *pd; + struct PartDeflect *pd2; } ParticleSettings; -typedef struct ParticleSystem{ +typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in copy_particlesystem */ struct ParticleSystem *next, *prev; - ParticleSettings *part; - - ParticleData *particles; + ParticleSettings *part; /* particle settings */ - ChildParticle *child; + ParticleData *particles; /* (parent) particles */ + ChildParticle *child; /* child particles */ - struct ParticleEdit *edit; + struct ParticleEdit *edit; /* particle editmode (runtime) */ - struct ParticleCacheKey **pathcache; - struct ParticleCacheKey **childcache; + struct ParticleCacheKey **pathcache; /* path cache (runtime) */ + struct ParticleCacheKey **childcache; /* child cache (runtime) */ + ListBase pathcachebufs, childcachebufs; /* buffers for the above */ - struct SoftBody *soft; + struct SoftBody *soft; /* hair softbody */ struct Object *target_ob; struct Object *keyed_ob; struct Object *lattice; - struct ListBase effectors, reactevents; + struct ListBase effectors, reactevents; /* runtime */ float imat[4][4]; /* used for duplicators */ float cfra; @@ -196,13 +199,16 @@ typedef struct ParticleSystem{ int flag, totpart, totchild, totcached, totchildcache, rt; short recalc, target_psys, keyed_psys, totkeyed, softflag, bakespace; - char bb_uvname[3][32]; + char bb_uvname[3][32]; /* billboard uv name */ /* if you change these remember to update array lengths to PSYS_TOT_VG! */ - short vgroup[11], vg_neg, rt3[2]; + short vgroup[12], vg_neg, rt3; /* vertex groups */ /* temporary storage during render */ void *renderdata; + + /* point cache */ + struct PointCache *pointcache; }ParticleSystem; /* general particle maximums */ @@ -218,13 +224,14 @@ typedef struct ParticleSystem{ #define PART_EMITTER 0 #define PART_REACTOR 1 #define PART_HAIR 2 +#define PART_FLUID 3 /* part->flag */ #define PART_REACT_STA_END 1 #define PART_REACT_MULTIPLE 2 #define PART_LOOP 4 -#define PART_LOOP_INSTANT 8 +//#define PART_LOOP_INSTANT 8 #define PART_HAIR_GEOMETRY 16 @@ -255,10 +262,13 @@ typedef struct ParticleSystem{ #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_SELF_EFFECT (1<<22) + /* part->rotfrom */ #define PART_ROT_KEYS 0 /* interpolate directly from keys */ #define PART_ROT_ZINCR 1 /* same as zdir but done incrementally from previous position */ @@ -288,8 +298,6 @@ typedef struct ParticleSystem{ #define PART_KINK_RADIAL 2 #define PART_KINK_WAVE 3 #define PART_KINK_BRAID 4 -#define PART_KINK_ROT 5 -#define PART_KINK_ROLL 6 /* part->draw */ #define PART_DRAW_VEL 1 @@ -352,12 +360,16 @@ typedef struct ParticleSystem{ /* part->rotmode */ #define PART_ROT_NOR 1 #define PART_ROT_VEL 2 -#define PART_ROT_RAND 3 +#define PART_ROT_GLOB_X 3 +#define PART_ROT_GLOB_Y 4 +#define PART_ROT_GLOB_Z 5 +#define PART_ROT_OB_X 6 +#define PART_ROT_OB_Y 7 +#define PART_ROT_OB_Z 8 /* part->avemode */ #define PART_AVE_SPIN 1 #define PART_AVE_RAND 2 -#define PART_AVE_VEL 3 /* part->reactevent */ #define PART_EVENT_DEATH 0 @@ -380,7 +392,7 @@ typedef struct ParticleSystem{ //#define PSYS_BAKING 2 //#define PSYS_BAKE_UI 4 #define PSYS_KEYED_TIME 8 -#define PSYS_ENABLED 16 +#define PSYS_ENABLED 16 /* deprecated */ #define PSYS_FIRST_KEYED 32 #define PSYS_DRAWING 64 //#define PSYS_SOFT_BAKE 128 @@ -388,7 +400,8 @@ typedef struct ParticleSystem{ #define PSYS_HAIR_DONE 512 #define PSYS_KEYED 1024 #define PSYS_EDITED 2048 -#define PSYS_PROTECT_CACHE 4096 +//#define PSYS_PROTECT_CACHE 4096 +#define PSYS_DISABLED 8192 /* pars->flag */ #define PARS_UNEXIST 1 @@ -405,9 +418,10 @@ typedef struct ParticleSystem{ #define PARS_DEAD 1 #define PARS_UNBORN 2 #define PARS_ALIVE 3 +#define PARS_DYING 4 /* psys->vg */ -#define PSYS_TOT_VG 11 +#define PSYS_TOT_VG 12 #define PSYS_VG_DENSITY 0 #define PSYS_VG_VEL 1 @@ -420,6 +434,7 @@ typedef struct ParticleSystem{ #define PSYS_VG_SIZE 8 #define PSYS_VG_TAN 9 #define PSYS_VG_ROT 10 +#define PSYS_VG_EFFECTOR 11 /* part->boidrules */ #define BOID_TOT_RULES 8 diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index eef665bc290..6563f56ed4d 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -98,6 +98,7 @@ typedef struct FFMpegCodecData { int rc_buffer_size; int mux_packet_size; int mux_rate; + IDProperty *properties; } FFMpegCodecData; @@ -117,7 +118,11 @@ typedef struct SceneRenderLayer { struct Group *light_override; unsigned int lay; /* scene->lay itself has priority over this */ + unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */ int layflag; + + int pad; + int passflag; /* pass_xor has to be after passflag */ int pass_xor; } SceneRenderLayer; @@ -131,9 +136,11 @@ typedef struct SceneRenderLayer { #define SCE_LAY_STRAND 32 /* flags between 32 and 0x8000 are set to 1 already, for future options */ -#define SCE_LAY_ALL_Z 0x8000 -#define SCE_LAY_XOR 0x10000 -#define SCE_LAY_DISABLE 0x20000 +#define SCE_LAY_ALL_Z 0x8000 +#define SCE_LAY_XOR 0x10000 +#define SCE_LAY_DISABLE 0x20000 +#define SCE_LAY_ZMASK 0x40000 +#define SCE_LAY_NEG_ZMASK 0x80000 /* srl->passflag */ #define SCE_PASS_COMBINED 1 @@ -150,6 +157,8 @@ typedef struct SceneRenderLayer { #define SCE_PASS_INDEXOB 2048 #define SCE_PASS_UV 4096 #define SCE_PASS_RADIO 8192 +#define SCE_PASS_MIST 16384 + /* note, srl->passflag is treestore element 'nr' in outliner, short still... */ @@ -191,14 +200,6 @@ typedef struct RenderData { */ short ysch; /** - * Adjustment factors for the aspect ratio in the x direction - */ - short xasp; - /** - * Adjustment factors for the aspect ratio in the x direction - */ - short yasp; - /** * The number of part to use in the x direction */ short xparts; @@ -214,10 +215,12 @@ typedef struct RenderData { short bufflag; short quality; + short rpad, rpad1, rpad2; + /** * Flags for render settings. Use bit-masking to access the settings. */ - short scemode; + int scemode; /** * Flags for render settings. Use bit-masking to access the settings. @@ -225,7 +228,7 @@ typedef struct RenderData { int mode; /* render engine, octree resolution */ - short renderer, ocres, rpad[2]; + short renderer, ocres; /** * What to do with the sky/background. Picks sky/premul/key @@ -247,6 +250,15 @@ typedef struct RenderData { /* information on different layers to be rendered */ ListBase layers; short actlay, pad; + + /** + * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45 + */ + float xasp; + /** + * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45 + */ + float yasp; float frs_sec_base; @@ -262,8 +274,8 @@ typedef struct RenderData { /* Bake Render options */ short bake_osa, bake_filter, bake_mode, bake_flag; - short bake_normal_space, bpad; - float bake_maxdist; + short bake_normal_space, bake_quad_split; + float bake_maxdist, bake_biasdist, bake_pad; /* yafray: global panel params. TODO: move elsewhere */ short GIquality, GIcache, GImethod, GIphotons, GIdirect; @@ -271,12 +283,12 @@ typedef struct RenderData { int GIdepth, GIcausdepth, GIpixelspersample; int GIphotoncount, GImixphotons; float GIphotonradius; - int YF_numprocs, YF_raydepth, YF_AApasses, YF_AAsamples; + int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2; float GIshadowquality, GIrefinement, GIpower, GIindirpower; float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold; /* paths to backbufffer, output, ftype */ - char backbuf[160], pic[160], ftype[160]; + char backbuf[160], pic[160]; /* stamps flags. */ int stamp; @@ -288,8 +300,31 @@ typedef struct RenderData { /* foreground/background color. */ float fg_stamp[4]; float bg_stamp[4]; + + /* render simplify */ + int simplify_subsurf; + int simplify_shadowsamples; + float simplify_particles; + float simplify_aosss; + + /* cineon */ + short cineonwhite, cineonblack; + float cineongamma; } RenderData; +/* control render convert and shading engine */ +typedef struct RenderProfile { + struct RenderProfile *next, *prev; + char name[32]; + + short particle_perc; + short subsurf_max; + short shadbufsample_max; + short pad1; + + float ao_error, pad2; + +} RenderProfile; typedef struct GameFraming { float col[3]; @@ -314,7 +349,7 @@ typedef struct ImagePaintSettings { } ImagePaintSettings; typedef struct ParticleBrushData { - short size, strength; /* commong settings */ + short size, strength; /* common settings */ short step, invert; /* for specific brushes only */ } ParticleBrushData; @@ -330,6 +365,12 @@ typedef struct ParticleEditSettings { int draw_timed; } ParticleEditSettings; +typedef struct TransformOrientation { + struct TransformOrientation *next, *prev; + char name[36]; + float mat[3][3]; +} TransformOrientation; + typedef struct ToolSettings { /* Subdivide Settings */ short cornertype; @@ -363,7 +404,7 @@ typedef struct ToolSettings { /* Auto-IK */ short autoik_chainlen; - /* Image Paint (8 byte aligned please!) */ + /* Image Paint (8 byttse aligned please!) */ struct ImagePaintSettings imapaint; /* Particle Editing */ @@ -392,12 +433,20 @@ typedef struct ToolSettings { float skgen_angle_limit; float skgen_correlation_limit; float skgen_symmetry_limit; + float skgen_retarget_angle_weight; + float skgen_retarget_length_weight; + float skgen_retarget_distance_weight; short skgen_options; char skgen_postpro; char skgen_postpro_passes; char skgen_subdivisions[3]; + char skgen_multi_level; + char skgen_optimisation_method; - char pad3[5]; + char tpad[6]; + + /* Alt+RMB option */ + char edge_mode; } ToolSettings; /* Used by all brushes to store their properties, which can be directly set @@ -407,25 +456,31 @@ typedef struct BrushData { short size; char strength, dir; /* Not used for smooth brush */ - char airbrush; char view; + char flag; char pad[2]; } BrushData; struct SculptSession; typedef struct SculptData { + /* Note! all pointers in this struct must be duplicated header_info.c's copy_scene function */ + /* Data stored only from entering sculptmode until exiting sculptmode */ struct SculptSession *session; /* Pointers to all of sculptmodes's textures */ - struct MTex *mtex[10]; + struct MTex *mtex[18]; /* Editable brush shape */ struct CurveMapping *cumap; /* Settings for each brush */ BrushData drawbrush, smoothbrush, pinchbrush, inflatebrush, grabbrush, layerbrush, flattenbrush; + + /* For rotating around a pivot point */ + float pivot[3]; + short brush_type; /* For the Brush Shape */ @@ -444,10 +499,11 @@ typedef struct SculptData /* Symmetry is separate from the other BrushData because the same settings are always used for all brush types */ char symm; - + /* Added to store if the 'Rake' setting has been set */ char rake; - char pad[7]; + char axislock; + char pad[2]; } SculptData; typedef struct Scene { @@ -470,7 +526,9 @@ typedef struct Scene { float editbutsize; /* size of normals */ short selectmode; /* for mesh only! */ short proportional, prop_mode; - short automerge, pad5, pad6, pad7; + short automerge, pad5, pad6; + + short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h */ short use_nodes; @@ -491,9 +549,10 @@ typedef struct Scene { ScriptLink scriptlink; ListBase markers; + ListBase transform_spaces; - short jumpframe, pad1; - short snap_flag, snap_target; + short jumpframe; + short snap_mode, snap_flag, snap_target; /* none of the dependancy graph vars is mean to be saved */ struct DagForest *theDag; @@ -502,6 +561,10 @@ typedef struct Scene { /* Sculptmode data */ struct SculptData sculptdata; + + /* frame step. */ + int frame_step; + int pad; } Scene; @@ -535,10 +598,17 @@ typedef struct Scene { #define R_GAUSS 0x20000 /* fbuf obsolete... */ #define R_FBUF 0x40000 - /* threads obsolete... is there for old files */ + /* threads obsolete... is there for old files, now use for autodetect threads */ #define R_THREADS 0x80000 + /* Use the same flag for autothreads */ +#define R_FIXED_THREADS 0x80000 + #define R_SPEED 0x100000 #define R_SSS 0x200000 +#define R_NO_OVERWRITE 0x400000 /* skip existing files */ +#define R_TOUCH 0x800000 /* touch files before rendering */ +#define R_SIMPLIFY 0x1000000 + /* filtertype */ #define R_FILTER_BOX 0 @@ -554,7 +624,7 @@ typedef struct Scene { #define R_INTERN 0 #define R_YAFRAY 1 -/* scemode */ +/* scemode (int now) */ #define R_DOSEQ 0x0001 #define R_BG_RENDER 0x0002 /* passepartout is camera option now, keep this for backward compatibility */ @@ -569,8 +639,10 @@ typedef struct Scene { #define R_EXR_TILE_FILE 0x0400 #define R_COMP_FREE 0x0800 #define R_NO_IMAGE_LOAD 0x1000 -#define R_NO_TEX 0x2000 +#define R_NO_TEX 0x2000 #define R_STAMP_INFO 0x4000 +#define R_FULL_SAMPLE 0x8000 +#define R_COMP_RERENDER 0x10000 /* r->stamp */ #define R_STAMP_TIME 0x0001 @@ -598,7 +670,7 @@ typedef struct Scene { #define R_TARGA 0 #define R_IRIS 1 #define R_HAMX 2 -#define R_FTYPE 3 +#define R_FTYPE 3 /* ftype is nomore */ #define R_JPEG90 4 #define R_MOVIE 5 #define R_IRIZ 7 @@ -623,12 +695,15 @@ typedef struct Scene { #define R_OPENEXR_HALF 1 #define R_OPENEXR_ZBUF 2 #define R_PREVIEW_JPG 4 +#define R_CINEON_LOG 8 +#define R_TIFF_16BIT 16 /* bake_mode: same as RE_BAKE_xxx defines */ /* bake_flag: */ #define R_BAKE_CLEAR 1 #define R_BAKE_OSA 2 #define R_BAKE_TO_ACTIVE 4 +#define R_BAKE_NORMALIZE 8 /* bake_normal_space */ #define R_BAKE_SPACE_CAMERA 0 @@ -672,10 +747,16 @@ typedef struct Scene { /* scene->snap_flag */ #define SCE_SNAP 1 +#define SCE_SNAP_ROTATE 2 /* scene->snap_target */ #define SCE_SNAP_TARGET_CLOSEST 0 #define SCE_SNAP_TARGET_CENTER 1 #define SCE_SNAP_TARGET_MEDIAN 2 +#define SCE_SNAP_TARGET_ACTIVE 3 +/* scene->snap_mode */ +#define SCE_SNAP_MODE_VERTEX 0 +#define SCE_SNAP_MODE_EDGE 1 +#define SCE_SNAP_MODE_FACE 2 /* sce->selectmode */ #define SCE_SELECT_VERTEX 1 /* for mesh */ @@ -713,6 +794,9 @@ typedef struct Scene { #define FFMPEG_MULTIPLEX_AUDIO 1 #define FFMPEG_AUTOSPLIT_OUTPUT 2 +/* Sculpt brush flags */ +#define SCULPT_BRUSH_AIRBRUSH 1 +#define SCULPT_BRUSH_ANCHORED 2 /* SculptData.flags */ #define SCULPT_INPUT_SMOOTH 1 #define SCULPT_DRAW_FAST 2 @@ -734,11 +818,27 @@ typedef struct Scene { #define SYMM_Y 2 #define SYMM_Z 4 +#define AXISLOCK_X 1 +#define AXISLOCK_Y 2 +#define AXISLOCK_Z 4 + /* toolsettings->imagepaint_flag */ #define IMAGEPAINT_DRAWING 1 #define IMAGEPAINT_DRAW_TOOL 2 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 +/* 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_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */ + +/* toolsettings->edge_mode */ +#define EDGE_MODE_SELECT 0 +#define EDGE_MODE_TAG_SEAM 1 +#define EDGE_MODE_TAG_SHARP 2 +#define EDGE_MODE_TAG_CREASE 3 +#define EDGE_MODE_TAG_BEVEL 4 + /* toolsettings->particle flag */ #define PE_KEEP_LENGTHS 1 #define PE_LOCK_FIRST 2 @@ -771,12 +871,21 @@ typedef struct Scene { #define RETOPO_ELLIPSE 4 /* toolsettings->skgen_options */ -#define SKGEN_FILTER_INTERNAL 1 -#define SKGEN_FILTER_EXTERNAL 2 -#define SKGEN_SYMMETRY 4 -#define SKGEN_CUT_LENGTH 8 -#define SKGEN_CUT_ANGLE 16 -#define SKGEN_CUT_CORRELATION 32 +#define SKGEN_FILTER_INTERNAL (1 << 0) +#define SKGEN_FILTER_EXTERNAL (1 << 1) +#define SKGEN_SYMMETRY (1 << 2) +#define SKGEN_CUT_LENGTH (1 << 3) +#define SKGEN_CUT_ANGLE (1 << 4) +#define SKGEN_CUT_CORRELATION (1 << 5) +#define SKGEN_HARMONIC (1 << 6) +#define SKGEN_STICK_TO_EMBEDDING (1 << 7) +#define SKGEN_ADAPTIVE_DISTANCE (1 << 8) +#define SKGEN_FILTER_SMART (1 << 9) +#define SKGEN_DISP_LENGTH (1 << 10) +#define SKGEN_DISP_WEIGHT (1 << 11) +#define SKGEN_DISP_ORIG (1 << 12) +#define SKGEN_DISP_EMBED (1 << 13) +#define SKGEN_DISP_INDEX (1 << 14) #define SKGEN_SUB_LENGTH 0 #define SKGEN_SUB_ANGLE 1 diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index c5ec847608f..40374f56967 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -6,7 +6,7 @@ * 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. + * 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 @@ -20,7 +20,6 @@ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. * - * * Contributor(s): Blender Foundation * * ***** END GPL LICENSE BLOCK ***** diff --git a/source/blender/makesdna/DNA_scriptlink_types.h b/source/blender/makesdna/DNA_scriptlink_types.h index 85e0f237d69..95e20dd004d 100644 --- a/source/blender/makesdna/DNA_scriptlink_types.h +++ b/source/blender/makesdna/DNA_scriptlink_types.h @@ -58,6 +58,9 @@ typedef struct ScriptLink { * RENDER script links for clean-up actions */ #define SCRIPT_POSTRENDER 32 +#define SCRIPT_OBJECTUPDATE 64 +#define SCRIPT_OBDATAUPDATE 128 + /* **************** SPACE HANDLERS ********************* */ /* these are special scriptlinks that can be assigned to * a given space in a given ScrArea to: diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index 90e2b8f9f41..d8a1ffc6c24 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -82,6 +82,19 @@ typedef struct bPropertySensor { char maxvalue[32]; } bPropertySensor; +typedef struct bActuatorSensor { + int type; + int pad; + char name[32]; +} bActuatorSensor; + +typedef struct bDelaySensor { + short delay; + short duration; + short flag; + short pad; +} bDelaySensor; + typedef struct bCollisionSensor { char name[32]; /* property name */ char materialName[32]; /* material */ @@ -144,18 +157,18 @@ typedef struct bSensor { /* just add here, to avoid align errors... */ short invert; /* Whether or not to invert the output. */ - short freq2; /* The negative pulsing frequency? Not used anymore... */ + short level; /* Whether the sensor is level base (edge by default) */ int pad; } bSensor; typedef struct bJoystickSensor { char name[32]; - short type; - short pad; + char type; + char joyindex; + short flag; int axis; int axisf; int button; - int buttonf; int hat; int hatf; int precision; @@ -197,11 +210,15 @@ typedef struct bJoystickSensor { #define SENS_RAY 9 #define SENS_MESSAGE 10 #define SENS_JOYSTICK 11 +#define SENS_ACTUATOR 12 +#define SENS_DELAY 13 /* sensor->flag */ #define SENS_SHOW 1 #define SENS_DEL 2 #define SENS_NEW 4 #define SENS_NOT 8 +#define SENS_VISIBLE 16 +#define SENS_PIN 32 /* sensor->pulse */ #define SENS_PULSE_CONT 0 @@ -221,6 +238,9 @@ typedef struct bJoystickSensor { * */ /* #define SENS_COLLISION_PROPERTY 0 */ #define SENS_COLLISION_MATERIAL 1 +/* ray specific mode */ +/* X-Ray means that the ray will traverse objects that don't have the property/material */ +#define SENS_RAY_XRAY 2 /* Some stuff for the mouse sensor Type: */ #define BL_SENS_MOUSE_LEFT_BUTTON 1 @@ -232,6 +252,8 @@ typedef struct bJoystickSensor { #define BL_SENS_MOUSE_MOUSEOVER 16 #define BL_SENS_MOUSE_MOUSEOVER_ANY 32 +#define SENS_JOY_ANY_EVENT 1 + #define SENS_JOY_BUTTON 0 #define SENS_JOY_BUTTON_PRESSED 0 #define SENS_JOY_BUTTON_RELEASED 1 @@ -246,5 +268,9 @@ typedef struct bJoystickSensor { #define SENS_JOY_HAT 2 #define SENS_JOY_HAT_DIR 0 + +#define SENS_DELAY_REPEAT 1 +// should match JOYINDEX_MAX in SCA_JoystickDefines.h */ +#define SENS_JOY_MAXINDEX 8 #endif diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index cc1213a02a1..7bad8ec3b44 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -47,19 +47,55 @@ typedef struct StripElem { typedef struct TStripElem { struct ImBuf *ibuf; + struct ImBuf *ibuf_comp; struct TStripElem *se1, *se2, *se3; short ok; - short pad; + short flag; int nr; } TStripElem; +typedef struct StripCrop { + int top; + int bottom; + int left; + int right; +} StripCrop; + +typedef struct StripTransform { + int xofs; + int yofs; +} StripTransform; + +typedef struct StripColorBalance { + float lift[3]; + float gamma[3]; + float gain[3]; + int flag; + int pad; + float exposure; + float saturation; +} StripColorBalance; + +typedef struct StripProxy { + char dir[160]; +} StripProxy; + typedef struct Strip { struct Strip *next, *prev; int rt, len, us, done; + int startstill, endstill; StripElem *stripdata; char dir[160]; int orx, ory; + StripProxy *proxy; + StripCrop *crop; + StripTransform *transform; + StripColorBalance *color_balance; TStripElem *tstripdata; + TStripElem *tstripdata_startstill; + TStripElem *tstripdata_endstill; + struct ImBuf *ibuf_startstill; + struct ImBuf *ibuf_endstill; } Strip; @@ -93,7 +129,7 @@ typedef struct Sequence { void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */ char name[24]; /* name, not set by default and dosnt need to be unique as with ID's */ - short flag, type; /*flags bitmap (see below) and the type of sequence*/ + int flag, type; /*flags bitmap (see below) and the type of sequence*/ int len; /* the length of the contense of this strip - before handles are applied */ int start, startofs, endofs; int startstill, endstill; @@ -102,6 +138,7 @@ typedef struct Sequence { float mul, handsize; /* is sfra needed anymore? - it looks like its only used in one place */ int sfra; /* starting frame according to the timeline of the scene. */ + int anim_preseek; Strip *strip; @@ -125,7 +162,13 @@ typedef struct Sequence { void *effectdata; /* Struct pointer for effect settings */ - int anim_preseek; + int anim_startofs; /* only use part of animation file */ + int anim_endofs; /* is subtle different to startofs / endofs */ + + int blend_mode; + float blend_opacity; + + int scenenr; /* for scene selection */ int pad; } Sequence; @@ -207,6 +250,18 @@ typedef struct SpeedControlVars { #define SEQ_FLAG_DELETE 1024 #define SEQ_FLIPX 2048 #define SEQ_FLIPY 4096 +#define SEQ_MAKE_FLOAT 8192 +#define SEQ_LOCK 16384 +#define SEQ_USE_PROXY 32768 +#define SEQ_USE_TRANSFORM 65536 +#define SEQ_USE_CROP 131072 +#define SEQ_USE_COLOR_BALANCE 262144 +#define SEQ_USE_PROXY_CUSTOM_DIR 524288 +#define SEQ_ACTIVE 1048576 + +#define SEQ_COLOR_BALANCE_INVERSE_GAIN 1 +#define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2 +#define SEQ_COLOR_BALANCE_INVERSE_LIFT 4 /* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */ #define SEQ_IMAGE 0 @@ -232,10 +287,18 @@ typedef struct SpeedControlVars { #define SEQ_TRANSFORM 27 #define SEQ_COLOR 28 #define SEQ_SPEED 29 +#define SEQ_EFFECT_MAX 29 #define STRIPELEM_FAILED 0 #define STRIPELEM_OK 1 -#define STRIPELEM_META 2 + +#define STRIPELEM_PREVIEW_DONE 1 + +#define SEQ_BLEND_REPLACE 0 +/* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical + to the table above. (Only those effects that handle _exactly_ two inputs, + otherwise, you can't really blend, right :) !) +*/ #endif diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index e1b916be814..dc713362d83 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -50,6 +50,7 @@ struct RenderInfo; struct bNodeTree; struct uiBlock; struct FileList; +struct bGPdata; /** * The base structure all the other spaces @@ -140,11 +141,13 @@ typedef struct SpaceSeq { View2D v2d; float xof, yof; /* offset for drawing the image preview */ - short mainb, zoom; + short mainb, pad; short chanshown; - short pad2; + short zebra; int flag; - int pad; + float zoom; + + struct bGPdata *gpd; /* grease-pencil data */ } SpaceSeq; typedef struct SpaceFile { @@ -158,7 +161,7 @@ typedef struct SpaceFile { int totfile; char title[24]; - char dir[160]; + char dir[240]; char file[80]; short type, ofs, flag, sort; @@ -224,19 +227,19 @@ typedef struct SpaceImage { short imanr; 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 selectmode; short imtypenr, lock; - short showspare, pin; + short pin; float zoom; char dt_uv; /* UV draw type */ - char sticky; /* sticky selection type */ - char pad[6]; + char sticky; /* sticky selection type */ + char dt_uvstretch; + char pad[5]; float xof, yof; /* user defined offset, image is centered */ float centx, centy; /* storage for offset while render drawing */ - char *info_str, *info_spare; /* info string for render */ - struct ImBuf *spare; - + struct bGPdata *gpd; /* grease pencil data */ } SpaceImage; typedef struct SpaceNla { @@ -263,24 +266,43 @@ typedef struct SpaceText { struct Text *text; int top, viewlines; - short flags, menunr; - - int font_id; + short flags, menunr; + int font_id; + int lheight; int left; int showlinenrs; - int tabnumber; + int currtab_set; int showsyntax; - int unused_padd; - + int overwrite; float pix_per_line; struct rcti txtscroll, txtbar; + int wordwrap, doplugins; + } SpaceText; +typedef struct Script { + ID id; + + void *py_draw; + void *py_event; + void *py_button; + void *py_browsercallback; + void *py_globaldict; + + int flags, lastspace; + char scriptname[256]; /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */ + 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; int spacetype; @@ -309,6 +331,8 @@ typedef struct SpaceNode { int spacetype; float blockscale; + short blockhandler[8]; + View2D v2d; struct ID *id, *from; /* context, no need to save in file? well... pinning... */ @@ -321,11 +345,13 @@ typedef struct SpaceNode { struct bNodeTree *nodetree, *edittree; int treetype, pad; /* treetype: as same nodetree->type */ + struct bGPdata *gpd; /* grease-pencil data */ } SpaceNode; /* snode->flag */ #define SNODE_DO_PREVIEW 1 #define SNODE_BACKDRAW 2 +#define SNODE_DISPGP 4 typedef struct SpaceImaSel { SpaceLink *next, *prev; @@ -340,7 +366,7 @@ typedef struct SpaceImaSel { /* specific stuff for drawing */ char title[24]; - char dir[160]; + char dir[240]; char file[80]; short type, menu, flag, sort; @@ -404,7 +430,7 @@ typedef struct SpaceImaSel { /* filesel types */ #define FILE_UNIX 8 -#define FILE_BLENDER 8 +#define FILE_BLENDER 8 /* dont display relative paths */ #define FILE_SPECIAL 9 #define FILE_LOADLIB 1 @@ -450,10 +476,14 @@ typedef struct SpaceImaSel { #define SI_SHOW 1 /* SpaceImage->dt_uv */ -#define SI_UVDT_DASH 0 -#define SI_UVDT_BLACK 1 -#define SI_UVDT_WHITE 2 -#define SI_UVDT_OUTLINE 3 +#define SI_UVDT_OUTLINE 0 +#define SI_UVDT_DASH 1 +#define SI_UVDT_BLACK 2 +#define SI_UVDT_WHITE 3 + +/* SpaceImage->dt_uvstretch */ +#define SI_UVDT_STRETCH_ANGLE 0 +#define SI_UVDT_STRETCH_AREA 1 /* SpaceImage->sticky * Note DISABLE should be 0, however would also need to re-arrange icon order, @@ -462,6 +492,12 @@ typedef struct SpaceImaSel { #define SI_STICKY_DISABLE 1 #define SI_STICKY_VERTEX 2 +/* SpaceImage->selectmode */ +#define SI_SELECT_VERTEX 0 +#define SI_SELECT_EDGE 1 /* not implemented */ +#define SI_SELECT_FACE 2 +#define SI_SELECT_ISLAND 3 + /* SpaceImage->flag */ #define SI_BE_SQUARE 1<<0 #define SI_EDITTILE 1<<1 @@ -469,7 +505,7 @@ typedef struct SpaceImaSel { #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 +#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 @@ -486,7 +522,13 @@ typedef struct SpaceImaSel { /* 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_SMOOTH_UV 1<<20 +#define SI_DRAW_STRETCH 1<<21 +#define SI_DISPGP 1<<22 + +/* SpaceIpo->flag */ +#define SIPO_LOCK_VIEW 1<<0 +#define SIPO_NOTRANSKEYCULL 1<<1 /* SpaceText flags (moved from DNA_text_types.h) */ @@ -520,6 +562,7 @@ typedef struct SpaceImaSel { #define OOPS_IM 4096 #define OOPS_AR 8192 #define OOPS_GR 16384 +#define OOPS_CA 32768 /* SpaceOops->outlinevis */ #define SO_ALL_SCENES 0 @@ -532,6 +575,7 @@ typedef struct SpaceImaSel { #define SO_LIBRARIES 7 #define SO_VERSE_SESSION 8 #define SO_VERSE_MS 9 +#define SO_SEQUENCE 10 /* SpaceOops->storeflag */ #define SO_TREESTORE_CLEANUP 1 @@ -578,6 +622,7 @@ typedef struct SpaceImaSel { #define SNLA_ALLKEYED 1 #define SNLA_ACTIVELAYERS 2 #define SNLA_DRAWTIME 4 +#define SNLA_NOTRANSKEYCULL 8 /* time->flag */ /* show timing in frames instead of in seconds */ @@ -595,16 +640,21 @@ typedef struct SpaceImaSel { #define TIME_WITH_SEQ_AUDIO 16 #define TIME_SEQ 32 #define TIME_ALL_IMAGE_WIN 64 +#define TIME_CONTINUE_PHYSICS 128 /* sseq->mainb */ #define SEQ_DRAW_SEQUENCE 0 #define SEQ_DRAW_IMG_IMBUF 1 #define SEQ_DRAW_IMG_WAVEFORM 2 #define SEQ_DRAW_IMG_VECTORSCOPE 3 +#define SEQ_DRAW_IMG_HISTOGRAM 4 /* sseq->flag */ -#define SEQ_DRAWFRAMES 1 +#define SEQ_DRAWFRAMES 1 #define SEQ_MARKER_TRANS 2 +#define SEQ_DRAW_COLOR_SEPERATED 4 +#define SEQ_DRAW_SAFE_MARGINS 8 +#define SEQ_DRAW_GPENCIL 16 /* space types, moved from DNA_screen_types.h */ enum { diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index d1859d22115..48ecccd517a 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -38,25 +38,36 @@ typedef struct TextLine { struct TextLine *next, *prev; char *line; - char *format; - int len, blen; + char *format; /* may be NULL if syntax is off or not yet formatted */ + int len, blen; /* blen unused */ } TextLine; +typedef struct TextMarker { + struct TextMarker *next, *prev; + + 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 */ +} TextMarker; + typedef struct Text { ID id; char *name; - + int flags, nlines; ListBase lines; TextLine *curl, *sell; int curc, selc; + ListBase markers; char *undo_buf; int undo_pos, undo_len; void *compiled; + double mtime; } Text; @@ -74,4 +85,12 @@ typedef struct Text { #define TXT_READONLY 0x0100 #define TXT_FOLLOW 0x0200 /* always follow cursor (console) */ +/* format continuation flags */ +#define TXT_NOCONT 0x00 /* no continuation */ +#define TXT_SNGQUOTSTR 0x01 /* single quotes */ +#define TXT_DBLQUOTSTR 0x02 /* double quotes */ +#define TXT_TRISTR 0x04 /* triplets of quotes: """ or ''' */ +#define TXT_SNGTRISTR 0x05 /*(TXT_TRISTR | TXT_SNGQUOTSTR)*/ +#define TXT_DBLTRISTR 0x06 /*(TXT_TRISTR | TXT_DBLQUOTSTR)*/ + #endif diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index bee341acf2e..111dc08ee02 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -245,6 +245,7 @@ typedef struct TexMapping { #define TEX_CALCALPHA 32 #define TEX_NORMALMAP 2048 #define TEX_GAUSS_MIP 4096 +#define TEX_FILTER_MIN 8192 /* imaflag unused, only for version check */ #define TEX_FIELDS_ 8 @@ -343,11 +344,13 @@ typedef struct TexMapping { #define PROJ_Z 3 /* texflag */ -#define MTEX_RGBTOINT 1 -#define MTEX_STENCIL 2 -#define MTEX_NEGATIVE 4 -#define MTEX_ALPHAMIX 8 -#define MTEX_VIEWSPACE 16 +#define MTEX_RGBTOINT 1 +#define MTEX_STENCIL 2 +#define MTEX_NEGATIVE 4 +#define MTEX_ALPHAMIX 8 +#define MTEX_VIEWSPACE 16 +#define MTEX_DUPLI_MAPTO 32 +#define MTEX_OB_DUPLI_ORIG 64 /* blendtype */ #define MTEX_BLEND 0 @@ -360,6 +363,11 @@ typedef struct TexMapping { #define MTEX_LIGHT 7 #define MTEX_SCREEN 8 #define MTEX_OVERLAY 9 +#define MTEX_BLEND_HUE 10 +#define MTEX_BLEND_SAT 11 +#define MTEX_BLEND_VAL 12 +#define MTEX_BLEND_COLOR 13 +#define MTEX_NUM_BLENDTYPES 14 /* **************** EnvMap ********************* */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 0f04528130e..fbd962f9372 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -61,7 +61,6 @@ typedef struct ThemeUI { char but_drawtype; char pad[3]; char iconfile[80]; // FILE_MAXFILE length - } ThemeUI; /* try to put them all in one, if needed a special struct can be created as well @@ -102,16 +101,28 @@ typedef struct ThemeSpace { char movie[4], image[4], scene[4], audio[4]; // for sequence editor char effect[4], plugin[4], transition[4], meta[4]; char editmesh_active[4]; + + char handle_vertex[4]; + char handle_vertex_select[4]; + char handle_vertex_size; + char hpad[7]; } ThemeSpace; + /* set of colors for use as a custom color set for Objects/Bones wire drawing */ typedef struct ThemeWireColor { - char unselected[3]; - char selected[3]; - char active[3]; - char pad[7]; + char solid[4]; + char select[4]; + char active[4]; + + short flag; + short pad; } ThemeWireColor; +/* flags for ThemeWireColor */ +#define TH_WIRECOLOR_CONSTCOLS (1<<0) +#define TH_WIRECOLOR_TEXTCOLS (1<<1) + /* A theme */ typedef struct bTheme { struct bTheme *next, *prev; @@ -177,7 +188,9 @@ typedef struct UserDef { char fontname[256]; // FILE_MAXDIR+FILE length struct ListBase themes; short undosteps; - short curssize; + short undomemory; + short gp_manhattendist, gp_euclideandist, gp_eraser; + short gp_settings; short tb_leftmouse, tb_rightmouse; struct SolidLight light[3]; short tw_hotspot, tw_flag, tw_handlesize, tw_size; @@ -192,9 +205,15 @@ typedef struct UserDef { short recent_files; /* maximum number of recently used files to remember */ short smooth_viewtx; /* miliseconds to spend spinning the view */ short glreslimit; + short ndof_pan, ndof_rotate; + short curssize, pad; +// char pad[8]; char versemaster[160]; char verseuser[160]; - float glalphaclip, pad; + float glalphaclip; + + short autokey_mode; /* autokeying mode */ + short autokey_flag; /* flags for autokeying */ struct ColorBand coba_weight; /* from texture.h */ } UserDef; @@ -213,7 +232,7 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_DUPLILINK (1 << 6) #define USER_FSCOLLUM (1 << 7) #define USER_MAT_ON_OB (1 << 8) -#define USER_NO_CAPSLOCK (1 << 9) +/*#define USER_NO_CAPSLOCK (1 << 9)*/ /* not used anywhere */ #define USER_VIEWMOVE (1 << 10) #define USER_TOOLTIPS (1 << 11) #define USER_TWOBUTTONMOUSE (1 << 12) @@ -224,8 +243,9 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_CUSTOM_RANGE (1 << 17) #define USER_ADD_EDITMODE (1 << 18) #define USER_ADD_VIEWALIGNED (1 << 19) -#define USER_ADD_VIEWALIGNED (1 << 19) - +#define USER_RELPATHS (1 << 20) +#define USER_DRAGIMMEDIATE (1 << 21) +#define USER_DONT_DOSCRIPTLINKS (1 << 22) /* viewzom */ #define USER_ZOOM_CONT 0 @@ -233,9 +253,8 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_ZOOM_DOLLY 2 /* uiflag */ - -#define USER_KEYINSERTACT (1 << 0) -#define USER_KEYINSERTOBJ (1 << 1) +// old flag for #define USER_KEYINSERTACT (1 << 0) +// old flag for #define USER_KEYINSERTOBJ (1 << 1) #define USER_WHEELZOOMDIR (1 << 2) #define USER_FILTERFILEEXTS (1 << 3) #define USER_DRAWVIEWINFO (1 << 4) @@ -249,16 +268,30 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_LOCKAROUND (1 << 12) #define USER_GLOBALUNDO (1 << 13) #define USER_ORBIT_SELECTION (1 << 14) -#define USER_KEYINSERTAVAI (1 << 15) +// old flag for #define USER_KEYINSERTAVAI (1 << 15) +#define USER_ORBIT_ZBUF (1 << 15) #define USER_HIDE_DOT (1 << 16) #define USER_SHOW_ROTVIEWICON (1 << 17) #define USER_SHOW_VIEWPORTNAME (1 << 18) -#define USER_KEYINSERTNEED (1 << 19) +// old flag for #define USER_KEYINSERTNEED (1 << 19) #define USER_ZOOM_TO_MOUSEPOS (1 << 20) -#define USER_SHOW_FPS (1 << 21) +#define USER_SHOW_FPS (1 << 21) +#define USER_MMB_PASTE (1 << 22) -/* transopts */ +/* Auto-Keying mode */ + /* AUTOKEY_ON is a bitflag */ +#define AUTOKEY_ON 1 + /* AUTOKEY_ON + 2**n... (i.e. AUTOKEY_MODE_NORMAL = AUTOKEY_ON + 2) to preserve setting, even when autokey turned off */ +#define AUTOKEY_MODE_NORMAL 3 +#define AUTOKEY_MODE_EDITKEYS 5 + +/* Auto-Keying flag */ +#define AUTOKEY_FLAG_INSERTAVAIL (1<<0) +#define AUTOKEY_FLAG_INSERTNEEDED (1<<1) +#define AUTOKEY_FLAG_AUTOMATKEY (1<<2) + +/* transopts */ #define USER_TR_TOOLTIPS (1 << 0) #define USER_TR_BUTTONS (1 << 1) #define USER_TR_MENUS (1 << 2) @@ -269,7 +302,6 @@ extern UserDef U; /* from usiblender.c !!!! */ #define CONVERT_TO_UTF8 (1 << 7) /* dupflag */ - #define USER_DUP_MESH (1 << 0) #define USER_DUP_CURVE (1 << 1) #define USER_DUP_SURF (1 << 2) @@ -283,18 +315,20 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_DUP_ACT (1 << 10) /* gameflags */ - -#define USER_VERTEX_ARRAYS 1 +#define USER_DEPRECATED_FLAG 1 #define USER_DISABLE_SOUND 2 #define USER_DISABLE_MIPMAP 4 /* vrml flag */ - #define USER_VRML_LAYERS 1 #define USER_VRML_AUTOSCALE 2 #define USER_VRML_TWOSIDED 4 /* tw_flag (transform widget) */ +/* gp_settings (Grease Pencil Settings) */ +#define GP_PAINT_DOSMOOTH (1<<0) +#define GP_PAINT_DOSIMPLIFY (1<<1) + #endif diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 987a12965fb..f1fa8c19199 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -40,6 +40,7 @@ struct Base; struct BoundBox; struct RenderInfo; struct RetopoViewData; +struct bGPdata; /* This is needed to not let VC choke on near and far... old * proprietary MS extensions... */ @@ -53,9 +54,12 @@ struct RetopoViewData; #include "DNA_listBase.h" #include "DNA_image_types.h" +/* ******************************** */ + /* The near/far thing is a Win EXCEPTION. Thus, leave near/far in the * code, and patch for windows. */ - + +/* Background Picture in 3D-View */ typedef struct BGpic { struct Image *ima; struct ImageUser iuser; @@ -63,6 +67,9 @@ typedef struct BGpic { short xim, yim; } BGpic; +/* ********************************* */ + +/* 3D ViewPort Struct */ typedef struct View3D { struct SpaceLink *next, *prev; int spacetype; @@ -78,13 +85,9 @@ typedef struct View3D { float winmat1[4][4]; // persp(1) storage, for swap matrices float viewmat1[4][4]; - float viewquat[4], dist, zfac, pad0; /* zfac is initgrabz() result */ + float viewquat[4], dist, zfac; /* zfac is initgrabz() result */ + int lay_used; /* used while drawing */ - /** - * 0 - ortho - * 1 - do 3d perspective - * 2 - use the camera - */ short persp; short view; @@ -99,7 +102,7 @@ typedef struct View3D { /** * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID, - * OB_SHADED or OB_TEXTURED */ + * OB_SHADED or OB_TEXTURE */ short drawtype; short localview; int lay, layact; @@ -133,14 +136,22 @@ typedef struct View3D { short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ - short pad3; + short keyflags; /* flags for display of keyframes */ - short pad2; + char ndofmode; /* mode of transform for 6DOF devices -1 not found, 0 normal, 1 fly, 2 ob transform */ + char ndoffilter; /*filter for 6DOF devices 0 normal, 1 dominant */ void *properties_storage; /* Nkey panel stores stuff here, not in file */ + struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */ + /* last view */ + float lviewquat[4]; + short lpersp, lview; + + short pad5, pad6; } View3D; + /* View3D->flag (short) */ #define V3D_MODE (16+32+64+128+256+512) #define V3D_DISPIMAGE 1 @@ -160,12 +171,13 @@ typedef struct View3D { #define V3D_CLIPPING 16384 #define V3D_DRAW_CENTERS 32768 - /* View3d->flag2 (short) */ +#define V3D_MODE2 (32) #define V3D_OPP_DIRECTION_NAME 1 #define V3D_FLYMODE 2 #define V3D_DEPRECATED 4 /* V3D_TRANSFORM_SNAP, moved to a scene setting */ #define V3D_SOLID_TEX 8 +#define V3D_DISPGP 16 /* View3D->around */ #define V3D_CENTER 0 @@ -176,9 +188,9 @@ typedef struct View3D { /* View3d->persp */ -#define V3D_PERSP_ORTHO 0 -#define V3D_PERSP_DO_3D_PERSP 1 -#define V3D_PERSP_USE_THE_CAMERA 2 +#define V3D_ORTHO 0 +#define V3D_PERSP 1 +#define V3D_CAMOB 2 /* View3d->gridflag */ #define V3D_SHOW_FLOOR 1 @@ -196,6 +208,7 @@ typedef struct View3D { #define V3D_MANIP_LOCAL 1 #define V3D_MANIP_NORMAL 2 #define V3D_MANIP_VIEW 3 +#define V3D_MANIP_CUSTOM 4 /* anything of value 4 or higher is custom */ /* View3d->twflag */ /* USE = user setting, DRAW = based on selection */ @@ -206,3 +219,4 @@ typedef struct View3D { #endif + diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 4e313570b2b..ab7e25190ad 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -38,7 +38,7 @@ struct Ipo; struct MTex; #ifndef MAX_MTEX -#define MAX_MTEX 10 +#define MAX_MTEX 18 #endif @@ -101,15 +101,14 @@ typedef struct World { float aodist, aodistfac, aoenergy, aobias; short aomode, aosamp, aomix, aocolor; float ao_adapt_thresh, ao_adapt_speed_fac; - float pad2[2]; - short ao_samp_method; - short pad1[3]; + float ao_approx_error, ao_approx_correction; + short ao_samp_method, ao_gather_method, ao_approx_passes, pad1; float *aosphere, *aotables; struct Ipo *ipo; - struct MTex *mtex[10]; + struct MTex *mtex[18]; /* MAX_MTEX */ /* previews */ struct PreviewImage *preview; @@ -148,12 +147,17 @@ typedef struct World { /* aomode (use distances & random sampling modes) */ #define WO_AODIST 1 #define WO_AORNDSMP 2 +#define WO_AOCACHE 4 /* aocolor */ #define WO_AOPLAIN 0 #define WO_AOSKYCOL 1 #define WO_AOSKYTEX 2 +/* ao_gather_method */ +#define WO_AOGATHER_RAYTRACE 0 +#define WO_AOGATHER_APPROX 1 + /* texco (also in DNA_material_types.h) */ #define TEXCO_ANGMAP 64 #define TEXCO_H_SPHEREMAP 256 diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index d4b222f3644..a85f561da92 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c) +SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mmap_win.c) INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..) diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index 23d6f84942f..b7d55a0ca1a 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -15,31 +15,36 @@ dna = env.Clone() makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ') makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc', - '../../makesdna']) + '../../makesdna']) if env['OURPLATFORM'] == 'linuxcross': - makesdna_tool.Replace(CC='gcc') - makesdna_tool.Replace(AR='ar') - makesdna_tool.Replace(LINK='gcc') + 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 (LIBPATH = '#'+root_build_dir+'/lib') +targetdir = root_build_dir+'/lib' +if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): + targetdir = '#'+targetdir +makesdna_tool.Append (LIBPATH = targetdir) if env['BF_PROFILE']: makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS']) -if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep: - makesdna = makesdna_tool.Program (target = root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc']) -else: - makesdna = makesdna_tool.Program (target = '#'+root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc']) +targetdir = root_build_dir + '/makesdna' + +if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): + targetdir = '#' + targetdir + +makesdna = makesdna_tool.Program (target = targetdir, source = source_files, LIBS=['bf_guardedalloc']) dna_dict = dna.Dictionary() dna.Depends ('dna.c', makesdna) dna.Depends ('dna.c', header_files) if env['OURPLATFORM'] != 'linuxcross': - dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET") + dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET") else: - dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") + dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") obj = ['intern/dna.c', 'intern/dna_genfile.c'] Return ('obj') diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 87f99896654..dd5aa518e24 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -55,6 +55,8 @@ #include "MEM_guardedalloc.h" #include "DNA_sdna_types.h" +#include "BLO_sys_types.h" // for intptr_t support + #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -125,6 +127,8 @@ char *includefiles[] = { "DNA_brush_types.h", "DNA_customdata_types.h", "DNA_particle_types.h", + "DNA_cloth_types.h", + "DNA_gpencil_types.h", // if you add files here, please add them at the end // of makesdna.c (this file) as well "DNA_windowmanager_types.h", @@ -688,18 +692,18 @@ static int calculate_structlens(int firststruct) /* 4-8 aligned/ */ if(sizeof(void *) == 4) { if (len % 4) { - printf("Align pointer error in struct: %s %s\n", types[structtype], cp); + printf("Align pointer error in struct (len4): %s %s\n", types[structtype], cp); dna_error = 1; } } else { if (len % 8) { - printf("Align pointer error in struct: %s %s\n", types[structtype], cp); + printf("Align pointer error in struct (len8): %s %s\n", types[structtype], cp); dna_error = 1; } } if (alphalen % 8) { - printf("Align pointer error in struct: %s %s\n", types[structtype],cp); + printf("Align pointer error in struct (alphalen8): %s %s\n", types[structtype],cp); dna_error = 1; } @@ -748,13 +752,13 @@ static int calculate_structlens(int firststruct) // has_pointer is set or alphalen != len if (has_pointer || alphalen != len) { if (alphalen % 8) { - printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], alphalen%8); + printf("Sizeerror 8 in struct: %s (add %d bytes)\n", types[structtype], alphalen%8); dna_error = 1; } } if(len % 4) { - printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], len%4); + printf("Sizeerror 4 in struct: %s (add %d bytes)\n", types[structtype], len%4); dna_error = 1; } @@ -954,7 +958,7 @@ int make_structDNA(char *baseDirectory, FILE *file) /* calculate size of datablock with strings */ cp= names[nr_names-1]; cp+= strlen(names[nr_names-1]) + 1; /* +1: null-terminator */ - len= (long) (cp - (char*) names[0]); + len= (intptr_t) (cp - (char*) names[0]); len= (len+3) & ~3; dna_write(file, names[0], len); @@ -967,7 +971,7 @@ int make_structDNA(char *baseDirectory, FILE *file) /* calculate datablock size */ cp= types[nr_types-1]; cp+= strlen(types[nr_types-1]) + 1; /* +1: null-terminator */ - len= (long) (cp - (char*) types[0]); + len= (intptr_t) (cp - (char*) types[0]); len= (len+3) & ~3; dna_write(file, types[0], len); @@ -989,7 +993,7 @@ int make_structDNA(char *baseDirectory, FILE *file) /* calc datablock size */ sp= structs[nr_structs-1]; sp+= 2+ 2*( sp[1] ); - len= (long) ((char*) sp - (char*) structs[0]); + len= (intptr_t) ((char*) sp - (char*) structs[0]); len= (len+3) & ~3; dna_write(file, structs[0], len); @@ -1146,6 +1150,7 @@ int main(int argc, char ** argv) #include "DNA_brush_types.h" #include "DNA_customdata_types.h" #include "DNA_particle_types.h" +#include "DNA_cloth_types.h" +#include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" - /* end of list */ |