diff options
author | Jean-Luc Peurière <jlp@nerim.net> | 2008-03-14 02:54:02 +0300 |
---|---|---|
committer | Jean-Luc Peurière <jlp@nerim.net> | 2008-03-14 02:54:02 +0300 |
commit | a68a7f42b02ad0260220d94f36ab61c772db071a (patch) | |
tree | 620b763cd24fbfc1259f00ccb005217914af0c6f /source/blender/makesdna | |
parent | 526d0bec4722900a86d81ff0f5d71504b2b4ad8c (diff) | |
parent | 15215493bf9d1d08e650109e6eb6189fc76e289e (diff) |
resolved conflict state with HEAD r14096
blenderbuttons still bad
not let this compile
Diffstat (limited to 'source/blender/makesdna')
38 files changed, 2360 insertions, 577 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 14e39faf2c6..57aec75700f 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -65,7 +65,7 @@ typedef struct IDProperty { /*totallen is total length of allocated array/string, including a buffer. Note that the buffering is mild; the code comes from python's list implementation.*/ int totallen; /*strings and arrays are both buffered, though the buffer isn't - saved. at least it won't be when I write that code. :)*/ + saved.*/ } IDProperty; #define MAX_IDPROP_NAME 32 @@ -75,21 +75,12 @@ typedef struct IDProperty { #define IDP_STRING 0 #define IDP_INT 1 #define IDP_FLOAT 2 -#define IDP_VECTOR 3 -#define IDP_MATRIX 4 #define IDP_ARRAY 5 #define IDP_GROUP 6 +/*the ID link property type hasn't been implemented yet, this will require + some cleanup of blenkernel, most likely.*/ #define IDP_ID 7 -/*special types for vector, matrices and arrays - these arn't quite completely implemented, and - may be removed.*/ -#define IDP_MATRIX4X4 9 -#define IDP_MATRIX3X3 10 -#define IDP_VECTOR2D 11 -#define IDP_VECTOR3D 12 -#define IDP_VECTOR4D 13 -#define IDP_FILE 14 /*add any future new id property types here.*/ /* watch it: Sequence has identical beginning. */ @@ -129,6 +120,18 @@ typedef struct Library { struct Library *parent; /* for outliner, showing dependency */ } Library; +#define PREVIEW_MIPMAPS 2 +#define PREVIEW_MIPMAP_ZERO 0 +#define PREVIEW_MIPMAP_LARGE 1 + +typedef struct PreviewImage { + unsigned int w[2]; + unsigned int h[2]; + short changed[2]; + short pad0, pad1; + unsigned int * rect[2]; +} PreviewImage; + /** * Defines for working with IDs. * @@ -180,6 +183,7 @@ typedef struct Library { #define ID_SCRIPT MAKE_ID2('P', 'Y') #define ID_NT MAKE_ID2('N', 'T') #define ID_BR MAKE_ID2('B', 'R') +#define ID_PA MAKE_ID2('P', 'A') /* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */ #define ID_SEQ MAKE_ID2('S', 'Q') diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 259167b6e6e..d1951e67661 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -33,17 +33,18 @@ #include "DNA_listBase.h" #include "DNA_ID.h" #include "DNA_view2d_types.h" +#include "DNA_userdef_types.h" struct SpaceLink; -struct ListBase; struct Object; +/* -------------- Poses ----------------- */ + /* PoseChannel stores the results of Actions (ipos) and transform information with respect to the restposition of Armature bones */ - typedef struct bPoseChannel { struct bPoseChannel *next, *prev; - ListBase constraints; + ListBase constraints;/* Constraints that act on this PoseChannel */ char name[32]; /* Channels need longer names than normal blender objects */ short flag; /* dynamic, for detecting transform changes */ @@ -51,7 +52,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 pad2; + 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 */ @@ -61,7 +62,12 @@ typedef struct bPoseChannel { struct bPoseChannel *parent; /* set on read file or rebuild pose */ struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */ struct ListBase iktree; /* only while evaluating pose */ - void *b_bone_mats; /* only while deform, stores precalculated b_bone deform mats */ + + /* only while deform, stores precalculated b_bone deform mats, + dual quaternions */ + void *b_bone_mats; + void *dual_quat; + void *b_bone_dual_quats; float loc[3]; /* written in by actions or transform */ float size[3]; @@ -69,6 +75,7 @@ typedef struct bPoseChannel { float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */ float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat */ + float constinv[4][4]; /* inverse result of constraints. doesn't include effect of restposition, parent, and local transform*/ float pose_head[3]; /* actually pose_mat[3] */ float pose_tail[3]; /* also used for drawing help lines... */ @@ -79,33 +86,92 @@ typedef struct bPoseChannel { float *path; /* totpath x 3 x float */ struct Object *custom; /* draws custom object instead of this channel */ - } bPoseChannel; - -typedef struct bPose{ - ListBase chanbase; +/* Pose-Object. It is only found under ob->pose. It is not library data, even + * though there is a define for it (hack for the outliner). + */ +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; - struct Ipo *ipo; - ListBase constraintChannels; + 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) */ - int flag; - char name[32]; /* Channel name */ + int flag; /* settings accessed via bitmapping */ + char name[32]; /* channel name */ int reserved1; } bActionChannel; +/* Action. A recyclable block that contains a series of Action Channels (ipo), which define + * a clip of reusable animation for use in the NLA. + */ typedef struct bAction { ID id; - ListBase chanbase; /* Action Channels in this action */ + + 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; int spacetype; @@ -115,35 +181,85 @@ typedef struct SpaceAction { short blockhandler[8]; View2D v2d; - bAction *action; - short flag, autosnap; - short pin, actnr, lock, actwidth; - float timeslide; + + 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 */ + 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 */ -#define ACHAN_SELECTED 0x00000001 -#define ACHAN_HILIGHTED 0x00000002 -#define ACHAN_HIDDEN 0x00000004 -#define ACHAN_PROTECTED 0x00000008 -#define ACHAN_EXPANDED 0x00000010 -#define ACHAN_SHOWIPO 0x00000020 -#define ACHAN_SHOWCONS 0x00000040 -#define ACHAN_MOVED 0x80000000 +typedef enum ACHAN_FLAG { + ACHAN_SELECTED = (1<<0), + ACHAN_HILIGHTED = (1<<1), + ACHAN_HIDDEN = (1<<2), + ACHAN_PROTECTED = (1<<3), + ACHAN_EXPANDED = (1<<4), + ACHAN_SHOWIPO = (1<<5), + ACHAN_SHOWCONS = (1<<6), + 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 */ -#define SACTION_MOVING 1 /* during transform */ -#define SACTION_SLIDERS 2 /* show sliders (if relevant) - limited to shape keys for now */ +typedef enum SACTION_FLAG { + /* 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), + /* 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) +} SACTION_FLAG; -/* SpaceAction AutoSnap Settings */ -#define SACTSNAP_OFF 0 /* no auto-snap */ -#define SACTSNAP_STEP 1 /* snap to 1.0 frame intervals */ -#define SACTSNAP_FRAME 2 /* snap to actual frames (nla-action time) */ +/* SpaceAction AutoSnap Settings (also used by SpaceNLA) */ +typedef enum SACTSNAP_MODES { + /* no auto-snap */ + SACTSNAP_OFF = 0, + /* snap to 1.0 frame/second intervals */ + SACTSNAP_STEP, + /* snap to actual frames/seconds (nla-action time) */ + SACTSNAP_FRAME, + /* snap to nearest marker */ + SACTSNAP_MARKER, +} SACTSNAP_MODES; + + +/* --------- Pose Flags --------------- */ /* Pose->flag */ -#define POSE_RECALC 1 -#define POSE_LOCKED 2 -#define POSE_DO_UNLOCK 4 +typedef enum POSE_FLAG { + /* results in armature_rebuild_pose being called */ + POSE_RECALC = (1<<0), + /* 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_FLAG; /* PoseChannel (transform) flags */ enum { @@ -163,22 +279,30 @@ enum { }; /* PoseChannel constflag (constraint detection) */ -#define PCHAN_HAS_IK 1 -#define PCHAN_HAS_CONST 2 - /* only used for drawing Posemode, not stored in channel */ -#define PCHAN_HAS_ACTION 4 -#define PCHAN_HAS_TARGET 8 - /* only for drawing Posemode too */ -#define PCHAN_HAS_STRIDE 16 +typedef enum PCHAN_CONSTFLAG { + PCHAN_HAS_IK = (1<<0), + PCHAN_HAS_CONST = (1<<1), + /* only used for drawing Posemode, not stored in channel */ + PCHAN_HAS_ACTION = (1<<2), + PCHAN_HAS_TARGET = (1<<3), + /* only for drawing Posemode too */ + PCHAN_HAS_STRIDE = (1<<4) +} PCHAN_CONSTFLAG; /* PoseChannel->ikflag */ -#define BONE_IK_NO_XDOF 1 -#define BONE_IK_NO_YDOF 2 -#define BONE_IK_NO_ZDOF 4 +typedef enum PCHAN_IKFLAG { + BONE_IK_NO_XDOF = (1<<0), + BONE_IK_NO_YDOF = (1<<1), + BONE_IK_NO_ZDOF = (1<<2), -#define BONE_IK_XLIMIT 8 -#define BONE_IK_YLIMIT 16 -#define BONE_IK_ZLIMIT 32 + BONE_IK_XLIMIT = (1<<3), + BONE_IK_YLIMIT = (1<<4), + BONE_IK_ZLIMIT = (1<<5), + + BONE_IK_NO_XDOF_TEMP = (1<<10), + BONE_IK_NO_YDOF_TEMP = (1<<11), + BONE_IK_NO_ZDOF_TEMP = (1<<12) +} PCHAN_IKFLAG; #endif diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 0531e70bb97..0d324b7d5d3 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -38,6 +38,7 @@ struct Object; struct Mesh; struct Scene; struct Group; +struct Text; /* ****************** ACTUATORS ********************* */ @@ -191,6 +192,19 @@ typedef struct bVisibilityActuator { 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 bActuator { struct bActuator *next, *prev, *mynew; short type; @@ -259,6 +273,7 @@ typedef struct FreeCamera { #define ACT_CD 16 #define ACT_GAME 17 #define ACT_VISIBILITY 18 +#define ACT_2DFILTER 19 /* actuator flag */ #define ACT_SHOW 1 @@ -391,5 +406,23 @@ typedef struct FreeCamera { /* Set means the object will become invisible */ #define ACT_VISIBILITY_INVISIBLE (1 << 0) +/* 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 #endif + diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index b3235fc71f3..fcc847a1b30 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -68,7 +68,7 @@ typedef struct Bone { float size[3]; /* patch for upward compat, UNUSED! */ short layer; short segments; /* for B-bones */ -}Bone; +} Bone; typedef struct bArmature { ID id; @@ -79,71 +79,84 @@ typedef struct bArmature { short deformflag; short pathflag; short layer, layer_protected; /* for buttons to work, both variables in this order together */ - short ghostep, ghostsize; /*number of frames to ghosts to show, and step between them */ + short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */ short ghosttype, pathsize; /* ghost drawing options and number of frames between points of path */ int ghostsf, ghostef; /* start and end frames of ghost-drawing range */ - int pathsf, pathef; /* start and end frames of path-calculation range for all bones */ -}bArmature; + int pathsf, pathef; /* start and end frames of path-calculation range for all bones */ + int pathbc, pathac; /* number of frames before/after current frame of path-calculation for all bones */ +} bArmature; /* armature->flag */ /* dont use bit 7, was saved in files to disable stuff */ - -/* armature->flag */ -#define ARM_RESTPOS 0x001 - /* XRAY is here only for backwards converting */ -#define ARM_DRAWXRAY 0x002 -#define ARM_DRAWAXES 0x004 -#define ARM_DRAWNAMES 0x008 -#define ARM_POSEMODE 0x010 -#define ARM_EDITMODE 0x020 -#define ARM_DELAYDEFORM 0x040 -#define ARM_DONT_USE 0x080 -#define ARM_MIRROR_EDIT 0x100 -#define ARM_AUTO_IK 0x200 - /* made option negative, for backwards compat */ -#define ARM_NO_CUSTOM 0x400 -#define ARM_COL_CUSTOM 0x800 +typedef enum eArmature_Flag { + ARM_RESTPOS = (1<<0), + ARM_DRAWXRAY = (1<<1), /* XRAY is here only for backwards converting */ + ARM_DRAWAXES = (1<<2), + ARM_DRAWNAMES = (1<<3), + ARM_POSEMODE = (1<<4), + ARM_EDITMODE = (1<<5), + ARM_DELAYDEFORM = (1<<6), + ARM_DONT_USE = (1<<7), + ARM_MIRROR_EDIT = (1<<8), + ARM_AUTO_IK = (1<<9), + ARM_NO_CUSTOM = (1<<10), /* made option negative, for backwards compat */ + ARM_COL_CUSTOM = (1<<11), /* draw custom colours */ + ARM_GHOST_ONLYSEL = (1<<12) /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ +} eArmature_Flag; /* armature->drawtype */ -#define ARM_OCTA 0 -#define ARM_LINE 1 -#define ARM_B_BONE 2 -#define ARM_ENVELOPE 3 +typedef enum eArmature_Drawtype { + ARM_OCTA = 0, + ARM_LINE, + ARM_B_BONE, + ARM_ENVELOPE +} eArmature_Drawtype; /* armature->deformflag */ -#define ARM_DEF_VGROUP 1 -#define ARM_DEF_ENVELOPE 2 +typedef enum eArmature_DeformFlag { + ARM_DEF_VGROUP = (1<<0), + ARM_DEF_ENVELOPE = (1<<1), + ARM_DEF_QUATERNION = (1<<2), + ARM_DEF_B_BONE_REST = (1<<3), + ARM_DEF_INVERT_VGROUP = (1<<4) +} eArmature_DeformFlag; /* armature->pathflag */ -#define ARM_PATH_FNUMS 0x001 -#define ARM_PATH_KFRAS 0x002 -#define ARM_PATH_HEADS 0x004 +typedef enum eArmature_PathFlag { + ARM_PATH_FNUMS = (1<<0), + ARM_PATH_KFRAS = (1<<1), + ARM_PATH_HEADS = (1<<2), + ARM_PATH_ACFRA = (1<<3), + ARM_PATH_KFNOS = (1<<4) +} eArmature_PathFlag; /* armature->ghosttype */ -#define ARM_GHOST_CUR 0 -#define ARM_GHOST_RANGE 1 +typedef enum eArmature_GhostType { + ARM_GHOST_CUR = 0, + ARM_GHOST_RANGE, + ARM_GHOST_KEYS +} eArmature_GhostType; /* bone->flag */ -#define BONE_SELECTED 1 -#define BONE_ROOTSEL 2 -#define BONE_TIPSEL 4 - /* Used instead of BONE_SELECTED during transform */ -#define BONE_TRANSFORM 8 -#define BONE_CONNECTED 16 - /* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */ - /* hidden Bones when drawing Posechannels */ -#define BONE_HIDDEN_P 64 - /* For detecting cyclic dependancies */ -#define BONE_DONE 128 - /* active is on mouse clicks only */ -#define BONE_ACTIVE 256 - /* No parent rotation or scale */ -#define BONE_HINGE 512 - /* hidden Bones when drawing Armature Editmode */ -#define BONE_HIDDEN_A 1024 - /* multiplies vgroup with envelope */ -#define BONE_MULT_VG_ENV 2048 -#define BONE_NO_DEFORM 4096 - +typedef enum eBone_Flag { + BONE_SELECTED = (1<<0), + BONE_ROOTSEL = (1<<1), + BONE_TIPSEL = (1<<2), + BONE_TRANSFORM = (1<<3), /* Used instead of BONE_SELECTED during transform */ + BONE_CONNECTED = (1<<4), + /* 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 */ + BONE_ACTIVE = (1<<8), /* active is on mouse clicks only */ + 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_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_DRAWWIRE = (1<<17) /* bone should be drawn as OB_WIRE, regardless of draw-types of view+armature */ +} eBone_Flag; #endif diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index f25d8fd6412..4cb8ec25ebc 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -42,6 +42,7 @@ extern "C" { #endif struct Ipo; +struct Object; typedef struct Camera { ID id; @@ -62,6 +63,7 @@ typedef struct Camera { struct Ipo *ipo; ScriptLink scriptlink; + struct Object *dof_ob; } Camera; /* **************** CAMERA ********************* */ diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h new file mode 100644 index 00000000000..4ba1f4f02e8 --- /dev/null +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -0,0 +1,135 @@ +/** +* $Id: DNA_cloth_types.h,v 1.1 2007/08/01 02:28:34 daniel Exp $ +* +* ***** BEGIN GPL/BL DUAL 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. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* 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/BL DUAL 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 SimulationSettings +{ + short vgroup_mass; /* optional vertexgroup name for assigning weight.*/ + short vgroup_struct; /* vertex group for scaling structural stiffness */ + float mingoal; /* see SB */ + int preroll; /* How many frames of simulation to do before we start. */ + float Cdis; /* Mechanical damping of springs. */ + float Cvi; /* Viscous/fluid damping. */ + int stepsPerFrame; /* Number of time steps per frame. */ + float gravity [3]; /* Gravity/external force vector. */ + float ufluid [3]; /* Velocity vector of the fluid. */ + 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 sim_time; + int flags; /* flags, see CSIMSETT_FLAGS enum above. */ + short solver_type; /* which solver should be used? txold */ + short vgroup_bend; /* vertex group for scaling bending stiffness */ + 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; + struct LinkNode *cache; /* UNUSED atm */ + float defgoal; + int goalfrict; + float goalspring; + int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ + int lastframe; /* frame on which simulation stops */ + int firstframe; /* frame on which simulation starts */ + int lastcachedframe; + int editedframe; /* which frame is in buffer */ + int autoprotect; /* starting from this frame, cache gets protected */ + 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 */ + int firstcachedframe; + float avg_spring_len; /* used for normalized springs */ + short presets; /* used for presets on GUI */ + short pad; + int pad2; +} +SimulationSettings; + + +typedef struct CollisionSettings +{ + float epsilon; /* min distance for collisions. */ + float self_friction; /* Fiction/damping with self contact. */ + float friction; /* Friction/damping applied on contact with other object.*/ + short self_loop_count; /* How many iterations for the selfcollision loop */ + short loop_count; /* How many iterations for the collision loop. */ + struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ + int flags; /* collision flags defined in BKE_cloth.h */ + float selfepsilon; /* for selfcollision */ +} +CollisionSettings; + + +/** +* This structure describes a cloth object against which the +* simulation can run. +* +* The m and n members of this structure represent the assumed +* rectangular ordered grid for which the original paper is written. +* At some point they need to disappear and we need to determine out +* own connectivity of the mesh based on the actual edges in the mesh. +* +**/ +typedef struct Cloth +{ + struct ClothVertex *verts; /* The vertices that represent this cloth. */ + struct LinkNode *springs; /* The springs connecting the mesh. */ + unsigned int numverts; /* The number of verts == m * n. */ + unsigned int numsprings; /* The count of springs. */ + unsigned int numfaces; + unsigned char old_solver_type; /* unused, only 1 solver here */ + unsigned char pad2; + short pad3; + struct BVH *tree; /* collision tree for this cloth object */ + struct MFace *mfaces; + struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ + struct Implicit_Data *implicitEM; /* our implicit solver connects to this pointer */ + struct EdgeHash *edgehash; /* used for selfcollisions */ +} +Cloth; + +#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 74307454187..2bcf2412588 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -25,7 +25,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): none yet. + * Contributor(s): 2007, Joshua Leung, major recode * * ***** END GPL/BL DUAL LICENSE BLOCK ***** * Constraint DNA data @@ -36,44 +36,113 @@ #include "DNA_ID.h" #include "DNA_ipo_types.h" +#include "DNA_listBase.h" #include "DNA_object_types.h" struct Action; +struct Text; +struct Ipo; /* channels reside in Object or Action (ListBase) constraintChannels */ -typedef struct bConstraintChannel{ +typedef struct bConstraintChannel { struct bConstraintChannel *next, *prev; Ipo *ipo; short flag; char name[30]; } bConstraintChannel; -typedef struct bConstraint{ +/* A Constraint */ +typedef struct bConstraint { struct bConstraint *next, *prev; + void *data; /* Constraint data (a valid constraint type) */ short type; /* Constraint type */ - short flag; /* Flag */ - short reserved1; - char name[30]; /* Constraint name */ - - float enforce; + short flag; /* Flag - General Settings */ + + char ownspace; /* Space that owner should be evaluated in */ + char tarspace; /* Space that target should be evaluated in (only used if 1 target) */ + + char name[30]; /* Constraint name */ + + float enforce; /* Amount of influence exherted by constraint (0.0-1.0) */ + float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/ + int pad; + struct Ipo *ipo; /* local influence ipo or driver */ } bConstraint; -/* Single-target subobject constraints */ -typedef struct bKinematicConstraint{ + +/* Multiple-target constraints --------------------- */ + +/* This struct defines a constraint target. + * It is used during constraint solving regardless of how many targets the + * constraint has. + */ +typedef struct bConstraintTarget { + struct bConstraintTarget *next, *prev; + + Object *tar; /* object to use as target */ + char subtarget[32]; /* subtarget - pchan or vgroup name */ + + float matrix[4][4]; /* matrix used during constraint solving - should be cleared before each use */ + + short space; /* space that target should be evaluated in (overrides bConstraint->tarspace) */ + short flag; /* runtime settings (for editor, etc.) */ + short type; /* type of target (B_CONSTRAINT_OB_TYPE) */ + short pad; +} bConstraintTarget; + +/* bConstraintTarget -> flag */ +typedef enum B_CONSTRAINT_TARGET_FLAG { + CONSTRAINT_TAR_TEMP = (1<<0), /* temporary target-struct that needs to be freed after use */ +} B_CONSTRAINT_TARGET_FLAG; + +/* bConstraintTarget/bConstraintOb -> type */ +typedef enum B_CONSTRAINT_OB_TYPE { + CONSTRAINT_OBTYPE_OBJECT = 1, /* string is "" */ + CONSTRAINT_OBTYPE_BONE, /* string is bone-name */ + CONSTRAINT_OBTYPE_VERT, /* string is vertex-group name */ + CONSTRAINT_OBTYPE_CV /* string is vertex-group name - is not available until curves get vgroups */ +} B_CONSTRAINT_OB_TYPE; + + + +/* Python Script Constraint */ +typedef struct bPythonConstraint { + struct Text *text; /* text-buffer (containing script) to execute */ + IDProperty *prop; /* 'id-properties' used to store custom properties for constraint */ + + int flag; /* general settings/state indicators accessed by bitmapping */ + int tarnum; /* number of targets - usually only 1-3 are needed */ + + ListBase targets; /* a list of targets that this constraint has (bConstraintTarget-s) */ + + Object *tar; /* target from previous implementation (version-patch sets this to NULL on file-load) */ + char subtarget[32]; /* subtarger from previous implentation (version-patch sets this to "" on file-load) */ +} bPythonConstraint; + + +/* Inverse-Kinematics (IK) constraint */ +typedef struct bKinematicConstraint { Object *tar; short iterations; /* Maximum number of iterations to try */ short flag; /* Like CONSTRAINT_IK_TIP */ - int rootbone; /* index to rootbone, if zero go all the way to mother bone */ + short rootbone; /* index to rootbone, if zero go all the way to mother bone */ + short max_rootbone; /* for auto-ik, maximum length of chain */ char subtarget[32]; /* String to specify sub-object target */ + Object *poletar; /* Pole vector target */ + char polesubtarget[32]; /* Pole vector sub-object target */ + float poleangle; /* Pole vector rest angle */ + float weight; /* Weight of goal in IK tree */ float orientweight; /* Amount of rotation a target applies on chain */ float grabtarget[3]; /* for target-less IK */ - int pad; } bKinematicConstraint; -typedef struct bTrackToConstraint{ + +/* Single-target subobject constraints --------------------- */ +/* Track To Constraint */ +typedef struct bTrackToConstraint { Object *tar; int reserved1; /* I'll be using reserved1 and reserved2 as Track and Up flags, not sure if that's what they were intented for anyway. Not sure either if it would create backward incompatibility if I were to rename them. - theeth*/ int reserved2; @@ -82,52 +151,57 @@ typedef struct bTrackToConstraint{ char subtarget[32]; } bTrackToConstraint; -typedef struct bRotateLikeConstraint{ +/* Copy Rotation Constraint */ +typedef struct bRotateLikeConstraint { Object *tar; int flag; int reserved1; char subtarget[32]; } bRotateLikeConstraint; -typedef struct bLocateLikeConstraint{ +/* Copy Location Constraint */ +typedef struct bLocateLikeConstraint { Object *tar; int flag; int reserved1; char subtarget[32]; } bLocateLikeConstraint; -typedef struct bMinMaxConstraint{ +/* Floor Constraint */ +typedef struct bMinMaxConstraint { Object *tar; int minmaxflag; - float offset; - int flag; - short sticky, stuck, pad1, pad2; /* for backward compatability */ - float cache[3]; + float offset; + int flag; + short sticky, stuck, pad1, pad2; /* for backward compatability */ + float cache[3]; char subtarget[32]; } bMinMaxConstraint; -typedef struct bSizeLikeConstraint{ +/* Copy Scale Constraint */ +typedef struct bSizeLikeConstraint { Object *tar; int flag; int reserved1; char subtarget[32]; } bSizeLikeConstraint; -typedef struct bActionConstraint{ +/* Action Constraint */ +typedef struct bActionConstraint { Object *tar; - short type; - short local; - int start; - int end; + short type; /* what transform 'channel' drives the result */ + short local; /* was used in versions prior to the Constraints recode */ + int start; + int end; float min; float max; - int pad; + int pad; struct bAction *act; char subtarget[32]; } bActionConstraint; /* Locked Axis Tracking constraint */ -typedef struct bLockTrackConstraint{ +typedef struct bLockTrackConstraint { Object *tar; int trackflag; int lockflag; @@ -135,7 +209,7 @@ typedef struct bLockTrackConstraint{ } bLockTrackConstraint; /* Follow Path constraints */ -typedef struct bFollowPathConstraint{ +typedef struct bFollowPathConstraint { Object *tar; /* Must be path object */ float offset; /* Offset in time on the path (in frame) */ int followflag; @@ -143,26 +217,8 @@ typedef struct bFollowPathConstraint{ int upflag; } bFollowPathConstraint; -/* Distance Limiting constraints */ -typedef struct bDistanceLimitConstraint{ - Object *tar; - char subtarget[32]; - float pad1; - float pad2; - float distance; - float offset[3]; -} bDistanceLimitConstraint; - - -/* Zero-target constraints */ -typedef struct bRotationConstraint{ - float xmin, xmax; - float ymin, ymax; - float zmin, zmax; -} bRotationConstraint; - /* Stretch to constraint */ -typedef struct bStretchToConstraint{ +typedef struct bStretchToConstraint { Object *tar; int volmode; int plane; @@ -171,33 +227,8 @@ typedef struct bStretchToConstraint{ char subtarget[32]; } bStretchToConstraint; -/* transform limiting constraints - zero target */ -typedef struct bLocLimitConstraint{ - float xmin, xmax; - float ymin, ymax; - float zmin, zmax; - short flag; - short flag2; -} bLocLimitConstraint; - -typedef struct bRotLimitConstraint{ - float xmin, xmax; - float ymin, ymax; - float zmin, zmax; - short flag; - short pad1; -} bRotLimitConstraint; - -typedef struct bSizeLimitConstraint{ - float xmin, xmax; - float ymin, ymax; - float zmin, zmax; - short flag; - short pad1; -} bSizeLimitConstraint; - /* Rigid Body constraint */ -typedef struct bRigidBodyJointConstraint{ +typedef struct bRigidBodyJointConstraint { Object *tar; Object *child; int type; @@ -216,49 +247,151 @@ typedef struct bRigidBodyJointConstraint{ short pad2; } bRigidBodyJointConstraint; -/* ClampTo Constraint */ +/* Clamp-To Constraint */ typedef struct bClampToConstraint { Object *tar; /* 'target' must be a curve */ int flag; /* which axis/plane to compare owner's location on */ - int pad; + int flag2; /* for legacy reasons, this is flag2. used for any extra settings */ } bClampToConstraint; -/* bConstraint.type */ -#define CONSTRAINT_TYPE_NULL 0 -#define CONSTRAINT_TYPE_CHILDOF 1 /* Unimplemented */ -#define CONSTRAINT_TYPE_TRACKTO 2 -#define CONSTRAINT_TYPE_KINEMATIC 3 -#define CONSTRAINT_TYPE_FOLLOWPATH 4 -#define CONSTRAINT_TYPE_ROTLIMIT 5 /* Unimplemented no longer :) - Aligorith */ -#define CONSTRAINT_TYPE_LOCLIMIT 6 /* Unimplemented no longer :) - Aligorith */ -#define CONSTRAINT_TYPE_SIZELIMIT 7 /* Unimplemented no longer :) - Aligorith */ -#define CONSTRAINT_TYPE_ROTLIKE 8 -#define CONSTRAINT_TYPE_LOCLIKE 9 -#define CONSTRAINT_TYPE_SIZELIKE 10 -#define CONSTRAINT_TYPE_PYTHON 11 /* Unimplemented */ -#define CONSTRAINT_TYPE_ACTION 12 -#define CONSTRAINT_TYPE_LOCKTRACK 13 /* New Tracking constraint that locks an axis in place - theeth */ -#define CONSTRAINT_TYPE_DISTANCELIMIT 14 -#define CONSTRAINT_TYPE_STRETCHTO 15 /* claiming this to be mine :) is in tuhopuu bjornmose */ -#define CONSTRAINT_TYPE_MINMAX 16 /* floor constraint */ -#define CONSTRAINT_TYPE_RIGIDBODYJOINT 17 /* rigidbody constraint */ -#define CONSTRAINT_TYPE_CLAMPTO 18 /* clampto constraint */ - -/* bConstraint.flag */ +/* Child Of Constraint */ +typedef struct bChildOfConstraint { + Object *tar; /* object which will act as parent (or target comes from) */ + int flag; /* settings */ + int pad; + float invmat[4][4]; /* parent-inverse matrix to use */ + char subtarget[32]; /* string to specify a subobject target */ +} bChildOfConstraint; + +/* Generic Transform->Transform Constraint */ +typedef struct bTransformConstraint { + Object *tar; /* target (i.e. 'driver' object/bone) */ + char subtarget[32]; + + short from, to; /* can be loc(0) , rot(1), or size(2) */ + char map[3]; /* defines which target-axis deform is copied by each owner-axis */ + char expo; /* extrapolate motion? if 0, confine to ranges */ + + float from_min[3]; /* from_min/max defines range of target transform */ + float from_max[3]; /* to map on to to_min/max range. */ + + float to_min[3]; /* range of motion on owner caused by target */ + float to_max[3]; +} bTransformConstraint; + +/* transform limiting constraints - zero target ---------------------------- */ +/* Limit Location Constraint */ +typedef struct bLocLimitConstraint { + float xmin, xmax; + float ymin, ymax; + float zmin, zmax; + short flag; + short flag2; +} bLocLimitConstraint; + +/* Limit Rotation Constraint */ +typedef struct bRotLimitConstraint { + float xmin, xmax; + float ymin, ymax; + float zmin, zmax; + short flag; + short flag2; +} bRotLimitConstraint; + +/* Limit Scaling Constraint */ +typedef struct bSizeLimitConstraint { + float xmin, xmax; + float ymin, ymax; + float zmin, zmax; + short flag; + 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 + * - Do not ever change the order of these, or else files could get + * broken as their correct value cannot be resolved + */ +typedef enum B_CONSTAINT_TYPES { + CONSTRAINT_TYPE_NULL = 0, /* Invalid/legacy constraint */ + CONSTRAINT_TYPE_CHILDOF, /* Unimplemented non longer :) - during constraints recode, Aligorith */ + CONSTRAINT_TYPE_TRACKTO, + CONSTRAINT_TYPE_KINEMATIC, + CONSTRAINT_TYPE_FOLLOWPATH, + CONSTRAINT_TYPE_ROTLIMIT, /* Unimplemented no longer :) - Aligorith */ + CONSTRAINT_TYPE_LOCLIMIT, /* Unimplemented no longer :) - Aligorith */ + CONSTRAINT_TYPE_SIZELIMIT, /* Unimplemented no longer :) - Aligorith */ + CONSTRAINT_TYPE_ROTLIKE, + CONSTRAINT_TYPE_LOCLIKE, + CONSTRAINT_TYPE_SIZELIKE, + 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_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; + +/* bConstraint->flag */ +/* flags 0x2 (1<<1) and 0x8 (1<<3) were used in past */ +/* flag 0x20 (1<<5) was used to indicate that a constraint was evaluated using a 'local' hack for posebones only */ +typedef enum B_CONSTRAINT_FLAG { /* expand for UI */ -#define CONSTRAINT_EXPAND 0x01 + CONSTRAINT_EXPAND = (1<<0), /* pre-check for illegal object name or bone name */ -#define CONSTRAINT_DISABLE 0x04 - /* flags 0x2 and 0x8 were used in past, skip this */ - /* to indicate which Ipo should be shown, maybe for 3d access later too */ -#define CONSTRAINT_ACTIVE 0x10 - /* only for Pose, evaluates constraints in posechannel local space */ -#define CONSTRAINT_LOCAL 0x20 - + CONSTRAINT_DISABLE = (1<<2), + /* to indicate which Ipo should be shown, maybe for 3d access later too */ + CONSTRAINT_ACTIVE = (1<<4), + /* 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), + /* 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 */ +typedef enum B_CONSTRAINT_SPACETYPES { + /* default for all - worldspace */ + CONSTRAINT_SPACE_WORLD = 0, + /* for objects (relative to parent/without parent influence), + * for bones (along normals of bone, without parent/restpositions) + */ + CONSTRAINT_SPACE_LOCAL, + /* for posechannels - pose space */ + CONSTRAINT_SPACE_POSE, + /* for posechannels - local with parent */ + CONSTRAINT_SPACE_PARLOCAL, +} B_CONSTRAINT_SPACETYPES; /* bConstraintChannel.flag */ -#define CONSTRAINT_CHANNEL_SELECT 0x01 -#define CONSTRAINT_CHANNEL_PROTECTED 0x02 +typedef enum B_CONSTRAINTCHANNEL_FLAG { + CONSTRAINT_CHANNEL_SELECT = (1<<0), + CONSTRAINT_CHANNEL_PROTECTED = (1<<1) +} B_CONSTRAINTCHANNEL_FLAG; + +/* -------------------------------------- */ /** * The flags for ROTLIKE, LOCLIKE and SIZELIKE should be kept identical @@ -278,6 +411,7 @@ typedef struct bClampToConstraint { #define LOCLIKE_X 0x01 #define LOCLIKE_Y 0x02 #define LOCLIKE_Z 0x04 + /* LOCLIKE_TIP is a depreceated option... use headtail=1.0f instead */ #define LOCLIKE_TIP 0x08 #define LOCLIKE_X_INVERT 0x10 #define LOCLIKE_Y_INVERT 0x20 @@ -318,11 +452,15 @@ typedef struct bClampToConstraint { #define PLANE_Y 0x01 #define PLANE_Z 0x02 +/* Clamp-To Constraint ->flag */ #define CLAMPTO_AUTO 0 #define CLAMPTO_X 1 #define CLAMPTO_Y 2 #define CLAMPTO_Z 3 +/* ClampTo Constraint ->flag2 */ +#define CLAMPTO_CYCLIC 1 + /* bKinematicConstraint->flag */ #define CONSTRAINT_IK_TIP 1 #define CONSTRAINT_IK_ROT 2 @@ -330,6 +468,8 @@ typedef struct bClampToConstraint { #define CONSTRAINT_IK_TEMP 8 #define CONSTRAINT_IK_STRETCH 16 #define CONSTRAINT_IK_POS 32 +#define CONSTRAINT_IK_SETANGLE 64 +#define CONSTRAINT_IK_GETANGLE 128 /* MinMax (floor) flags */ #define MINMAX_STICKY 0x01 @@ -348,13 +488,42 @@ typedef struct bClampToConstraint { #define LIMIT_YROT 0x02 #define LIMIT_ZROT 0x04 + /* not used anymore - for older Limit Location constraints only */ #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 +#define PYCON_SCRIPTERROR 0x02 + +/* ChildOf Constraint -> flag */ +#define CHILDOF_LOCX 0x001 +#define CHILDOF_LOCY 0x002 +#define CHILDOF_LOCZ 0x004 +#define CHILDOF_ROTX 0x008 +#define CHILDOF_ROTY 0x010 +#define CHILDOF_ROTZ 0x020 +#define CHILDOF_SIZEX 0x040 +#define CHILDOF_SIZEY 0x080 +#define CHILDOF_SIZEZ 0x100 + +/* Rigid-Body Constraint */ #define CONSTRAINT_DRAW_PIVOT 0x40 /* important: these defines need to match up with PHY_DynamicTypes headerfile */ #define CONSTRAINT_RB_BALL 1 #define CONSTRAINT_RB_HINGE 2 +#define CONSTRAINT_RB_CONETWIST 4 #define CONSTRAINT_RB_VEHICLE 11 #define CONSTRAINT_RB_GENERIC6DOF 12 diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 5439c65aa81..807fc2add07 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -75,7 +75,8 @@ typedef struct BevPoint { short f1, f2; } BevPoint; -/* note; alfa location in struct is abused by Key system */ +/* Keyframes on IPO curves and Points on Bezier Curves/Paths are generally BezTriples */ +/* note: alfa location in struct is abused by Key system */ /* vec in BezTriple looks like this: vec[0][0]=x location of handle 1 vec[0][1]=y location of handle 1 @@ -90,15 +91,15 @@ typedef struct BevPoint { typedef struct BezTriple { float vec[3][3]; float alfa, weight, radius; /* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */ - short h1, h2; - char f1, f2, f3, hide; + short h1, h2; /* h1, h2: the handle type of the two handles */ + char f1, f2, f3, hide; /* f1, f2, f3: used for selection status, hide: used to indicate whether BezTriple is hidden */ } BezTriple; /* note; alfa location in struct is abused by Key system */ typedef struct BPoint { float vec[4]; float alfa, weight; /* alfa: tilt in 3D View, weight: used for softbody goal weight */ - short f1, hide; + short f1, hide; /* f1: selection status, hide: is point hidden or not */ float radius, pad; /* user-set radius per point for bevelling etc */ } BPoint; @@ -115,9 +116,11 @@ typedef struct Nurb { float *knotsu, *knotsv; BPoint *bp; BezTriple *bezt; + + short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */ + short pad; int charidx; - int pad; } Nurb; typedef struct CharInfo { @@ -190,9 +193,12 @@ typedef struct Curve { typedef struct IpoDriver { struct Object *ob; short blocktype, adrcode, type, flag; - char name[128]; /* bone or constraint(?), or python expression here */ + 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; diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index b9f6ab0e60b..09af11fa64b 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -64,7 +64,12 @@ typedef struct CustomData { #define CD_ORIGINDEX 7 #define CD_NORMAL 8 #define CD_FLAGS 9 -#define CD_NUMTYPES 10 +#define CD_PROP_FLT 10 +#define CD_PROP_INT 11 +#define CD_PROP_STR 12 +#define CD_ORIGSPACE 13 /* for modifier stack face location mapping */ +#define CD_ORCO 14 +#define CD_NUMTYPES 15 /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) @@ -77,6 +82,12 @@ typedef struct CustomData { #define CD_MASK_ORIGINDEX (1 << CD_ORIGINDEX) #define CD_MASK_NORMAL (1 << CD_NORMAL) #define CD_MASK_FLAGS (1 << CD_FLAGS) +#define CD_MASK_PROP_FLT (1 << CD_PROP_FLT) +#define CD_MASK_PROP_INT (1 << CD_PROP_INT) +#define CD_MASK_PROP_STR (1 << CD_PROP_STR) +#define CD_MASK_ORIGSPACE (1 << CD_ORIGSPACE) +#define CD_MASK_ORCO (1 << CD_ORCO) + /* CustomData.flag */ diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index 34764fac47d..3a074dd63bc 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -52,6 +52,10 @@ typedef struct Group { ID id; ListBase gobject; /* GroupObject */ + + /* Bad design, since layers stored in the scenes 'Base' + * the objects that show in the group can change depending + * on the last used scene */ unsigned int layer; int pad; } Group; diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index a18493ea189..ef79f2e941f 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -41,11 +41,6 @@ struct anim; struct ImBuf; struct RenderResult; -typedef struct PreviewImage { - unsigned int w; - unsigned int h; - unsigned int * rect; -} PreviewImage; /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */ /* should be used in conjunction with an ID * to Image. */ @@ -63,11 +58,12 @@ 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]; + char name[240]; /* file path */ ListBase ibufs; /* not written in file */ @@ -95,6 +91,9 @@ typedef struct Image { short gen_x, gen_y, gen_type; /* for generated images */ + /* display aspect - for UV editing images resized for faster openGL display */ + float aspx, aspy; + /*#ifdef WITH_VERSE*/ void *vnode; /* pointer at verse bitmap node */ /*#endif*/ @@ -106,11 +105,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_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 441a3fc43fc..8ec412a3534 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -39,18 +39,20 @@ #include "DNA_ID.h" +/* IPO Data-Block */ typedef struct Ipo { ID id; - ListBase curve; - rctf cur; - short blocktype, showkey; - int pad; - + ListBase curve; /* A list of IpoCurve structs in a linked list. */ + rctf cur; /* Rect defining extents of keyframes? */ + + short blocktype, showkey; /* blocktype: self-explanatory; showkey: either 0 or 1 (show vertical yellow lines for editing) */ + short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */ } Ipo; -/* sometimes used */ +/* NOTE: IpoCurve struct is defined in DNA_curve_types.h, not in here... */ +/* sometimes used */ typedef short IPO_Channel; /* defines: are these duped or new? */ @@ -67,8 +69,8 @@ typedef short IPO_Channel; /* ******************** */ -#define OB_TOTIPO 29 -#define OB_TOTNAM 29 +#define OB_TOTIPO 30 +#define OB_TOTNAM 30 #define OB_LOC_X 1 #define OB_LOC_Y 2 @@ -105,7 +107,10 @@ typedef short IPO_Channel; #define OB_PD_SDAMP 27 #define OB_PD_RDAMP 28 #define OB_PD_PERM 29 +#define OB_PD_FMAXD 30 +/* exception: driver channel, for bone driver only */ +#define OB_ROT_DIFF 100 /* ******************** */ @@ -315,10 +320,11 @@ typedef short IPO_Channel; #define AC_QUAT_Z 28 /* ******************** */ -#define CO_TOTIPO 1 /* Constraint Ipos */ -#define CO_TOTNAM 1 +#define CO_TOTIPO 2 /* Constraint Ipos */ +#define CO_TOTNAM 2 #define CO_ENFORCE 1 +#define CO_HEADTAIL 2 /* #define CO_TIME 2 #define CO_OFFSET_X 3 @@ -349,6 +355,35 @@ typedef short IPO_Channel; #define FLUIDSIM_ACTIVE 9 +/* ******************** */ +/* particle ipos */ +#define PART_TOTIPO 19 +#define PART_TOTNAM 19 + +#define PART_EMIT_FREQ 1 +#define PART_EMIT_LIFE 2 +#define PART_EMIT_VEL 3 +#define PART_EMIT_AVE 4 +#define PART_EMIT_SIZE 5 + +#define PART_AVE 6 +#define PART_SIZE 7 +#define PART_DRAG 8 +#define PART_BROWN 9 +#define PART_DAMP 10 +#define PART_LENGTH 11 +#define PART_CLUMP 12 + +#define PART_GRAV_X 13 +#define PART_GRAV_Y 14 +#define PART_GRAV_Z 15 + +#define PART_KINK_AMP 16 +#define PART_KINK_FREQ 17 +#define PART_KINK_SHAPE 18 + +#define PART_BB_TILT 19 + /* these are IpoCurve specific */ /* **************** IPO ********************* */ @@ -391,6 +426,9 @@ typedef short IPO_Channel; #define IPO_AUTO_HORIZ 16 #define IPO_ACTIVE 32 #define IPO_PROTECT 64 +#define IPO_MUTE 128 #endif + + diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index 3292e07f80e..87c09fb0ee4 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -44,8 +44,8 @@ typedef struct KeyBlock { float pos; float curval; - short type, adrcode; - int totelem; + short type, adrcode, relative, flag; /* relative == 0 means first key is reference */ + int totelem, pad2; void *data; float *weights; @@ -87,5 +87,8 @@ typedef struct Key { #define KEY_CARDINAL 1 #define KEY_BSPLINE 2 +/* keyblock->flag */ +#define KEYBLOCK_MUTE 1 + #endif diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 22696c48878..f8cc2378cb1 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -43,6 +43,7 @@ struct MTex; struct Ipo; +struct CurveMapping; typedef struct Lamp { ID id; @@ -54,16 +55,26 @@ typedef struct Lamp { float energy, dist, spotsize, spotblend; float haint; - float att1, att2; + + + float att1, att2; /* Quad1 and Quad2 attenuation */ + int pad2; + struct CurveMapping *curfalloff; + short falloff_type; + short pad3; float clipsta, clipend, shadspotsize; float bias, soft; short bufsize, samp, buffers, filtertype; char bufflag, buftype; - short ray_samp, ray_sampy, ray_sampz, ray_samp_type; + short ray_samp, ray_sampy, ray_sampz; + short ray_samp_type; short area_shape; float area_size, area_sizey, area_sizez; + float adapt_thresh; + short ray_samp_method; + short pad1; /* texact is for buttons */ short texact, shadhalostep; @@ -79,6 +90,9 @@ typedef struct Lamp { struct MTex *mtex[10]; struct Ipo *ipo; + /* preview */ + struct PreviewImage *preview; + ScriptLink scriptlink; } Lamp; @@ -97,7 +111,7 @@ typedef struct Lamp { #define LA_SHAD_BUF 1 #define LA_HALO 2 #define LA_LAYER 4 -#define LA_QUAD 8 +#define LA_QUAD 8 /* no longer used */ #define LA_NEG 16 #define LA_ONLYSHADOW 32 #define LA_SPHERE 64 @@ -112,6 +126,14 @@ typedef struct Lamp { /* Since it is used with LOCAL lamp, can't use LA_SHAD */ #define LA_YF_SOFT 16384 +/* falloff_type */ +#define LA_FALLOFF_CONSTANT 0 +#define LA_FALLOFF_INVLINEAR 1 +#define LA_FALLOFF_INVSQUARE 2 +#define LA_FALLOFF_CURVE 3 +#define LA_FALLOFF_SLIDERS 4 + + /* buftype, no flag */ #define LA_SHADBUF_REGULAR 0 #define LA_SHADBUF_IRREGULAR 1 @@ -132,6 +154,12 @@ typedef struct Lamp { #define LA_AREA_CUBE 2 #define LA_AREA_BOX 3 +/* ray_samp_method */ +#define LA_SAMP_CONSTANT 0 +#define LA_SAMP_HALTON 1 +#define LA_SAMP_HAMMERSLEY 2 + + /* ray_samp_type */ #define LA_SAMP_ROUND 1 #define LA_SAMP_UMBRA 2 diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 10a1b59fb01..e81cb886d6f 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -43,11 +43,20 @@ extern "C" { #endif +/* generic - all structs which are used in linked-lists used this */ typedef struct Link { struct Link *next,*prev; } Link; + +/* use this when it is not worth defining a custom one... */ +typedef struct LinkData +{ + struct LinkData *next, *prev; + void *data; +} LinkData; + /* never change the size of this! genfile.c detects pointerlen with it */ typedef struct ListBase { diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 0fad110d64b..a4c6120374a 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -73,13 +73,25 @@ typedef struct Material { short har; char seed1, seed2; + float gloss_mir, gloss_tra; + short samp_gloss_mir, samp_gloss_tra; + float adapt_thresh_mir, adapt_thresh_tra; + float aniso_gloss_mir; + float dist_mir; + short fadeto_mir; + 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; + float strand_sta, strand_end, strand_ease, strand_surfnor; + float strand_min, strand_widthfade; + char strand_uvname[32]; - float sbias; /* shadow bias */ - float shad_alpha, padf; /* in use for irregular shadowbuffer */ + 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 */ + float padf; /* free padding, take me! */ /* for buttons and render*/ char rgbsel, texact, pr_type, use_nodes; @@ -105,12 +117,14 @@ typedef struct Material { struct bNodeTree *nodetree; struct Ipo *ipo; struct Group *group; /* light group */ - + struct PreviewImage * preview; + /* dynamic properties */ float friction, fh, reflect; float fhdist, xyfrict; short dynamode, pad2; + /* subsurface scattering */ float sss_radius[3], sss_col[3]; float sss_error, sss_scale, sss_ior; float sss_colfac, sss_texfac; @@ -179,8 +193,18 @@ typedef struct Material { /* qdn: a bit clumsy this, tangents needed for normal maps separated from shading */ #define MA_NORMAP_TANG 0x8000000 #define MA_GROUP_NOLAY 0x10000000 +#define MA_FACETEXTURE_ALPHA 0x20000000 +#define MA_STR_B_UNITS 0x40000000 +#define MA_STR_SURFDIFF 0x80000000 + +#define MA_MODE_MASK 0x6fffffff /* all valid mode bits */ -#define MA_MODE_MASK 0x1fffffff /* all valid mode bits */ +/* ray mirror fadeout */ +#define MA_RAYMIR_FADETOSKY 0 +#define MA_RAYMIR_FADETOMAT 1 + +/* shade_flag */ +#define MA_CUBIC 1 /* diff_shader */ #define MA_DIFF_LAMBERT 0 @@ -260,6 +284,31 @@ typedef struct Material { #define MAP_WARP 8192 #define MAP_LAYER 16384 +/* mapto for halo */ +//#define MAP_HA_COL 1 +//#define MAP_HA_ALPHA 128 +//#define MAP_HA_HAR 256 +//#define MAP_HA_SIZE 2 +//#define MAP_HA_ADD 64 + +/* pmapto */ +/* init */ +#define MAP_PA_INIT 31 +#define MAP_PA_TIME 1 +#define MAP_PA_LIFE 2 +#define MAP_PA_DENS 4 +#define MAP_PA_SIZE 8 +#define MAP_PA_LENGTH 16 +/* reset */ +#define MAP_PA_IVEL 32 +/* physics */ +#define MAP_PA_PVEL 64 +/* path cache */ +#define MAP_PA_CACHE 912 +#define MAP_PA_CLUMP 128 +#define MAP_PA_KINK 256 +#define MAP_PA_ROUGH 512 + /* pr_type */ #define MA_FLAT 0 #define MA_SPHERE 1 diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 5f2a77b8349..59f3a64ba5e 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -61,23 +61,27 @@ typedef struct Mesh { struct Key *key; struct Material **mat; - struct MFace *mface; - struct MTFace *mtface; + struct MFace *mface; /* array of mesh object mode faces */ + struct MTFace *mtface; /* store face UV's and texture here */ struct TFace *tface; /* depecrated, use mtface */ - struct MVert *mvert; - struct MEdge *medge; + struct MVert *mvert; /* array of verts */ + struct MEdge *medge; /* array of edges */ struct MDeformVert *dvert; /* __NLA */ - struct MCol *mcol; + struct MCol *mcol; /* array of colors, this must be the number of faces * 4 */ struct MSticky *msticky; struct Mesh *texcomesh; struct MSelect *mselect; - - struct OcInfo *oc; /* not written in file */ - void *sumohandle; struct CustomData vdata, edata, fdata; - int totvert, totedge, totface, totselect, pad2; + int totvert, totedge, totface, totselect; + + /* the last selected vertex/edge/face are used for the active face however + * this means the active face must always be selected, this is to keep track + * of the last selected face and is similar to the old active face flag where + * the face does not need to be selected, -1 is inactive */ + int act_face; + int texflag; /* texture space, copied as one block in editobject.c */ @@ -91,7 +95,7 @@ typedef struct Mesh { short subdiv, subdivr; short totcol; - short subsurftype; + short subsurftype; /* only kept for backwards compat, not used anymore */ struct Multires *mr; /* Multiresolution modeling data */ struct PartialVisibility *pv; @@ -103,7 +107,7 @@ typedef struct Mesh { /* deprecated by MTFace, only here for file reading */ typedef struct TFace { - void *tpage; + void *tpage; /* the faces image for the active UVLayer */ float uv[4][2]; unsigned int col[4]; char flag, transp; diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index af9c1ae629d..7970ccd073c 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -45,7 +45,7 @@ typedef struct MFace { typedef struct MEdge { unsigned int v1, v2; - char crease, pad; + char crease, bweight; short flag; } MEdge; @@ -63,11 +63,13 @@ 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 + * and not used for transperency, note that red and blue are swapped */ typedef struct MCol { - char a, r, g, b; + char a, r, g, b; } MCol; typedef struct MSticky { @@ -86,6 +88,21 @@ typedef struct MTFace { short mode, tile, unwrap; } MTFace; +/*Custom Data Properties*/ +typedef struct MFloatProperty{ + float f; +} MFloatProperty; +typedef struct MIntProperty{ + int i; +} MIntProperty; +typedef struct MStringProperty{ + char s[256]; +} MStringProperty; + +typedef struct OrigSpaceFace { + float uv[4][2]; +} OrigSpaceFace; + /* Multiresolution modeling */ typedef struct MultiresCol { float a, r, g, b; @@ -97,7 +114,6 @@ typedef struct MultiresColFace { typedef struct MultiresFace { unsigned int v[4]; unsigned int mid; - unsigned int childrenstart; char flag, mat_nr, pad[2]; } MultiresFace; typedef struct MultiresEdge { @@ -112,6 +128,9 @@ typedef struct MultiresLevel { MultiresFace *faces; MultiresColFace *colfaces; MultiresEdge *edges; + + /* Temporary connectivity data */ + char *edge_boundary_states; struct ListBase *vert_edge_map; struct ListBase *vert_face_map; struct MultiresMapNode *map_mem; @@ -127,7 +146,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; @@ -188,7 +207,7 @@ typedef struct PartialVisibility { /* mtface->flag */ #define TF_SELECT 1 /* use MFace hide flag (after 2.43), should be able to reuse after 2.44 */ -#define TF_ACTIVE 2 +#define TF_ACTIVE 2 /* deprecated! */ #define TF_SEL1 4 #define TF_SEL2 8 #define TF_SEL3 16 @@ -217,6 +236,8 @@ typedef struct PartialVisibility { #define TF_SOLID 0 #define TF_ADD 1 #define TF_ALPHA 2 + +/* sub is not available in the user interface anymore */ #define TF_SUB 3 /* mtface->unwrap */ @@ -229,4 +250,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 2d296ad10fa..dd1d8eb01b3 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -28,6 +28,13 @@ typedef enum ModifierType { eModifierType_UVProject, eModifierType_Smooth, eModifierType_Cast, + eModifierType_MeshDeform, + eModifierType_ParticleSystem, + eModifierType_ParticleInstance, + eModifierType_Explode, + eModifierType_Cloth, + eModifierType_Collision, + eModifierType_Bevel, NUM_MODIFIER_TYPES } ModifierType; @@ -38,6 +45,7 @@ typedef enum ModifierMode { eModifierMode_OnCage = (1<<3), eModifierMode_Expanded = (1<<4), eModifierMode_Virtual = (1<<5), + eModifierMode_DisableTemporary = (1 << 31) } ModifierMode; typedef struct ModifierData { @@ -158,6 +166,7 @@ typedef struct MirrorModifierData { short axis, flag; float tolerance; + struct Object *mirror_ob; } MirrorModifierData; /* MirrorModifierData->flag */ @@ -179,6 +188,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; @@ -310,9 +340,10 @@ typedef struct WaveModifierData { typedef struct ArmatureModifierData { ModifierData modifier; - short deformflag, pad1; /* deformflag replaces armature->deformflag */ + short deformflag, multi; /* deformflag replaces armature->deformflag */ int pad2; struct Object *object; + float *prevCos; /* stored input of previous modifier, for vertexgroup blending */ char defgrp_name[32]; } ArmatureModifierData; @@ -334,6 +365,33 @@ typedef struct SoftbodyModifierData { ModifierData modifier; } SoftbodyModifierData; +typedef struct ClothModifierData { + ModifierData modifier; + + struct Cloth *clothObject; /* The internal data structure for cloth. */ + struct SimulationSettings *sim_parms; /* definition is in DNA_cloth_types.h */ + struct CollisionSettings *coll_parms; /* definition is in DNA_cloth_types.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; /* position at the actual inter-frame step */ + + struct MFace *mfaces; /* object face data */ + + unsigned int numverts; + unsigned int numfaces; + int pad; + float time; + struct BVH *tree; /* collision tree for this cloth object */ +} CollisionModifierData; + typedef enum { eBooleanModifierOp_Intersect, eBooleanModifierOp_Union, @@ -346,4 +404,87 @@ typedef struct BooleanModifierData { int operation, pad; } BooleanModifierData; +#define MOD_MDEF_INVERT_VGROUP (1<<0) +#define MOD_MDEF_DYNAMIC_BIND (1<<1) + +typedef struct MDefInfluence { + int vertex; + float weight; +} MDefInfluence; + +typedef struct MDefCell { + int offset; + int totinfluence; +} MDefCell; + +typedef struct MeshDeformModifierData { + ModifierData modifier; + + struct Object *object; /* mesh object */ + char defgrp_name[32]; /* optional vertexgroup name */ + + short gridsize, needbind; + short flag, pad; + + /* variables filled in when bound */ + float *bindweights, *bindcos; /* computed binding weights */ + int totvert, totcagevert; /* total vertices in mesh and cage */ + MDefCell *dyngrid; /* grid with dynamic binding cell points */ + MDefInfluence *dyninfluences; /* dynamic binding vertex influences */ + int *dynverts, *pad2; /* is this vertex bound or not? */ + int dyngridsize; /* size of the dynamic bind grid */ + int totinfluence; /* total number of vertex influences */ + float dyncellmin[3]; /* offset of the dynamic bind grid */ + float dyncellwidth; /* width of dynamic bind cell */ + float bindmat[4][4]; /* matrix of cage at binding time */ +} MeshDeformModifierData; + +typedef enum { + eParticleSystemFlag_Loaded = (1<<0), + eParticleSystemFlag_Pars = (1<<1), + eParticleSystemFlag_FromCurve = (1<<2), + eParticleSystemFlag_DM_changed = (1<<3), + eParticleSystemFlag_Disabled = (1<<4), + eParticleSystemFlag_psys_updated = (1<<5), +} ParticleSystemModifierFlag; + +typedef struct ParticleSystemModifierData { + ModifierData modifier; + struct ParticleSystem *psys; + struct DerivedMesh *dm; + int totdmvert, totdmedge, totdmface; + short flag, rt; +} ParticleSystemModifierData; + +typedef enum { + eParticleInstanceFlag_Parents = (1<<0), + eParticleInstanceFlag_Children = (1<<1), + eParticleInstanceFlag_Path = (1<<2), + eParticleInstanceFlag_Unborn = (1<<3), + eParticleInstanceFlag_Alive = (1<<4), + eParticleInstanceFlag_Dead = (1<<5), +} ParticleInstanceModifierFlag; + +typedef struct ParticleInstanceModifierData { + ModifierData modifier; + struct Object *ob; + short psys, flag, rt[2]; +} ParticleInstanceModifierData; + +typedef enum { + eExplodeFlag_CalcFaces = (1<<0), + //eExplodeFlag_PaSize = (1<<1), + eExplodeFlag_EdgeSplit = (1<<2), + eExplodeFlag_Unborn = (1<<3), + eExplodeFlag_Alive = (1<<4), + eExplodeFlag_Dead = (1<<5), +} ExplodeModifierFlag; + +typedef struct ExplodeModifierData { + ModifierData modifier; + int *facepa; + short flag, vgroup; + float protect; +} ExplodeModifierData; + #endif diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index 914e6337474..e9a0a3d0602 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -54,6 +54,7 @@ typedef struct bActionModifier { struct Object *ob; } bActionModifier; +/* NLA-Modifier Types */ #define ACTSTRIP_MOD_DEFORM 0 #define ACTSTRIP_MOD_NOISE 1 #define ACTSTRIP_MOD_OOMPH 2 @@ -64,40 +65,43 @@ typedef struct bActionStrip { short stride_axis; /* axis 0=x, 1=y, 2=z */ short curmod; /* current modifier for buttons */ - struct Ipo *ipo; /* Blending ipo */ + struct Ipo *ipo; /* Blending ipo - was used for some old NAN era experiments. Non-functional currently. */ struct bAction *act; /* The action referenced by this strip */ struct Object *object; /* For groups, the actual object being nla'ed */ float start, end; /* The range of frames covered by this strip */ float actstart, actend; /* The range of frames taken from the action */ - float actoffs, padf; /* Offset within action, for cycles and striding */ + float actoffs; /* Offset within action, for cycles and striding */ float stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */ float repeat; /* The number of times to repeat the action range */ + float scale; /* The amount the action range is scaled by */ - float blendin, blendout; + float blendin, blendout; /* The number of frames on either end of the strip's length to fade in/out */ char stridechannel[32]; /* Instead of stridelen, it uses an action channel */ char offs_bone[32]; /* if repeat, use this bone/channel for defining offset */ - struct ListBase modifiers; /* modifier stack */ - + ListBase modifiers; /* modifier stack */ } bActionStrip; +/* strip->mode (these defines aren't really used, but are here for reference) */ #define ACTSTRIPMODE_BLEND 0 #define ACTSTRIPMODE_ADD 1 /* strip->flag */ -#define ACTSTRIP_SELECT 0x01 -#define ACTSTRIP_USESTRIDE 0x02 -#define ACTSTRIP_BLENDTONEXT 0x04 -#define ACTSTRIP_HOLDLASTFRAME 0x08 -#define ACTSTRIP_ACTIVE 0x10 -#define ACTSTRIP_LOCK_ACTION 0x20 -#define ACTSTRIP_MUTE 0x40 -#define ACTSTRIP_REVERSE 0x80 -#define ACTSTRIP_CYCLIC_USEX 0x100 -#define ACTSTRIP_CYCLIC_USEY 0x200 -#define ACTSTRIP_CYCLIC_USEZ 0x400 -#define ACTSTRIP_AUTO_BLENDS 0x800 +typedef enum eActStrip_Flag { + ACTSTRIP_SELECT = (1<<0), + ACTSTRIP_USESTRIDE = (1<<1), + ACTSTRIP_BLENDTONEXT = (1<<2), /* Not implemented. Is not used anywhere */ + ACTSTRIP_HOLDLASTFRAME = (1<<3), + ACTSTRIP_ACTIVE = (1<<4), + ACTSTRIP_LOCK_ACTION = (1<<5), + ACTSTRIP_MUTE = (1<<6), + ACTSTRIP_REVERSE = (1<<7), /* This has yet to be implemented. To indicate that a strip should be played backwards */ + ACTSTRIP_CYCLIC_USEX = (1<<8), + ACTSTRIP_CYCLIC_USEY = (1<<9), + ACTSTRIP_CYCLIC_USEZ = (1<<10), + ACTSTRIP_AUTO_BLENDS = (1<<11) +} eActStrip_Flag; #endif diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 63ead419766..f74e858c0e4 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; @@ -167,6 +171,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 +199,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; @@ -214,6 +236,14 @@ typedef struct NodeChroma { float key[4]; } NodeChroma; +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]; @@ -230,4 +260,28 @@ 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 { + char quality, type, iter; + char angle, angle_ofs, size, pad[2]; + float colmod, mix, threshold, fade; +} NodeGlare; + +/* qdn: tonemap node */ +typedef struct NodeTonemap { + float key, offset, gamma; + float f, m, a, c; + int type; +} NodeTonemap; + +/* qdn: lens distortion node */ +typedef struct NodeLensDist { + short jit, proj, fit, pad; +} NodeLensDist; + #endif diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index a821e209ef0..cdee50cfef4 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -41,19 +41,35 @@ typedef struct PartDeflect { short deflect; /* Deflection flag - does mesh deflect particles*/ short forcefield; /* Force field type, do the vertices attract / repel particles ? */ short flag; /* general settings flag */ - short pad; + short falloff; /* fall-off type*/ float pdef_damp; /* Damping factor for particle deflection */ float pdef_rdamp; /* Random element of damping for deflection */ float pdef_perm; /* Chance of particle passing through mesh */ + float pdef_frict; /* Friction factor for particle deflection */ + float pdef_rfrict; /* Random element of friction for deflection */ float f_strength; /* The strength of the force (+ or - ) */ float f_power; /* The power law - real gravitation is 2 (square) */ + float f_dist; + float f_damp; /* The dampening factor, currently only for harmonic force */ float maxdist; /* if indicated, use this maximum */ + float mindist; /* if indicated, use this minimum */ + float maxrad; /* radial versions of above */ + float minrad; + float f_power_r; /* radial fall-off power*/ float pdef_sbdamp; /* Damping factor for softbody deflection */ float pdef_sbift; /* inner face thickness for softbody deflection */ float pdef_sboft; /* outer face thickness for softbody deflection */ + + /* variables for guide curve */ + float clump_fac, clump_pow; + float kink_freq, kink_shape, kink_amp, free_end; + + float tex_nabla; + short tex_mode, kink, kink_axis, rt2; + struct Tex *tex; /* Texture of the texture effector */ } PartDeflect; @@ -62,6 +78,8 @@ typedef struct SBVertex { } SBVertex; typedef struct SoftBody { + struct ParticleSystem *particles; /* particlesystem softbody */ + /* dynamic data */ int totpoint, totspring; struct BodyPoint *bpoint; /* not saved in file */ @@ -96,8 +114,10 @@ typedef struct SoftBody { int interval; short local, solverflags; /* local==1: use local coords for baking */ + /* -- these must be kept for backwards compatibility -- */ SBVertex **keys; /* array of size totpointkey */ int totpointkey, totkey; /* if totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys */ + /* ---------------------------------------------------- */ float secondspring; /* self collision*/ @@ -109,10 +129,13 @@ typedef struct SoftBody { minloops, maxloops, choke, - pad3,pad4,pad5 + solver_ID, + plastic,pad5 ; struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */ + float shearstiff; + float inpush; } SoftBody; @@ -122,11 +145,37 @@ typedef struct SoftBody { #define PFIELD_MAGNET 3 #define PFIELD_WIND 4 #define PFIELD_GUIDE 5 +#define PFIELD_TEXTURE 6 +#define PFIELD_HARMONIC 7 +#define PFIELD_NUCLEAR 8 +#define PFIELD_MDIPOLE 9 + /* pd->flag: various settings */ #define PFIELD_USEMAX 1 #define PDEFLE_DEFORM 2 #define PFIELD_GUIDE_PATH_ADD 4 +#define PFIELD_PLANAR 8 +#define PDEFLE_KILL_PART 16 +#define PFIELD_POSZ 32 +#define PFIELD_TEX_OBJECT 64 +#define PFIELD_TEX_2D 128 +#define PFIELD_USEMIN 256 +#define PFIELD_USEMAXR 512 +#define PFIELD_USEMINR 1024 +#define PFIELD_TEX_ROOTCO 2048 + +/* pd->falloff */ +#define PFIELD_FALL_SPHERE 0 +#define PFIELD_FALL_TUBE 1 +#define PFIELD_FALL_CONE 2 +//reserved for near future +//#define PFIELD_FALL_INSIDE 3 + +/* pd->tex_mode */ +#define PFIELD_TEX_RGB 0 +#define PFIELD_TEX_GRAD 1 +#define PFIELD_TEX_CURL 2 /* ob->softflag */ #define OB_SB_ENABLE 1 @@ -142,10 +191,20 @@ typedef struct SoftBody { #define OB_SB_FACECOLL 1024 #define OB_SB_EDGECOLL 2048 #define OB_SB_COLLFINAL 4096 +#define OB_SB_PROTECT_CACHE 8192 +#define OB_SB_AERO_ANGLE 16384 +/* sb->solverflags */ #define SBSO_MONITOR 1 #define SBSO_OLDERR 2 +/* sb->sbc_mode */ +#define SBC_MODE_MANUAL 0 +#define SBC_MODE_AVG 1 +#define SBC_MODE_MIN 2 +#define SBC_MODE_MAX 3 +#define SBC_MODE_AVGMINMAX 4 + #ifdef __cplusplus } #endif diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 228b9bcc90e..f3a0dfdfdc7 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -54,6 +54,7 @@ struct bConstraintChannel; struct PartDeflect; struct SoftBody; struct FluidsimSettings; +struct ParticleSystem; struct DerivedMesh; typedef struct bDeformGroup { @@ -69,20 +70,6 @@ typedef struct BoundBox { /* boundbox flag */ #define OB_BB_DISABLED 1 -/* OcInfo and LBuf structs are for the Enji gameengine */ - -typedef struct OcInfo { - float dvec[3]; - float size[3]; -} OcInfo; - -typedef struct LBuf { - short tot, max; - int pad; - struct Object **ob; -} LBuf; - - typedef struct Object { ID id; @@ -97,12 +84,12 @@ typedef struct Object { struct Path *path; struct BoundBox *bb; struct bAction *action; + struct bAction *poselib; struct bPose *pose; void *data; ListBase constraintChannels; ListBase effect; - ListBase network; ListBase disp; ListBase defbase; ListBase modifiers; /* list of ModifierData structures */ @@ -115,7 +102,8 @@ typedef struct Object { float rot[3], drot[3]; float quat[4], dquat[4]; float obmat[4][4]; - float parentinv[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 */ float imat[4][4]; /* for during render, old game engine, temporally: ipokeys of transform */ unsigned int lay; /* copy of Base */ @@ -131,7 +119,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 */ @@ -153,9 +141,10 @@ typedef struct Object { char dt, dtx; char totcol; /* copy of mesh or curve or meta */ - char actcol; - char empty_drawtype, pad1[7]; + char actcol; /* currently selected material in the user interface */ + char empty_drawtype, pad1[3]; float empty_drawsize; + float dupfacesca; /* dupliface scale */ ScriptLink scriptlink; ListBase prop; @@ -163,12 +152,14 @@ typedef struct Object { ListBase controllers; ListBase actuators; - void *sumohandle; + /* now used to store cache particles, + * should be renamed see effect.c (Campbell) */ + void *sumohandle; float bbsize[3]; short index; /* custom index, for renderpasses */ unsigned short actdef; /* current deformation group */ - float col[4]; + float col[4]; /* object color, adjusted via IPO's only */ /** * Settings for game objects * bit 0: Object has dynamic behaviour @@ -193,6 +184,7 @@ typedef struct Object { ListBase constraints; ListBase nlastrips; ListBase hooks; + ListBase particlesystem; /* particle systems */ struct PartDeflect *pd; /* particle deflector/attractor/collision data */ struct SoftBody *soft; /* if exists, saved in file */ @@ -204,10 +196,10 @@ 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 */ - int pad4; + short recalco, pad4; /* recalco for temp storage of ob->recalc, bad design warning */ 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; @@ -217,6 +209,7 @@ typedef struct Object { /*#endif*/ } Object; +/* Warning, this is not used anymore because hooks are now modifiers */ typedef struct ObHook { struct ObHook *next, *prev; @@ -277,7 +270,7 @@ extern Object workob; #define OB_OFFS_LOCAL 1 #define OB_QUAT 2 #define OB_NEG_SCALE 4 -#define OB_DUPLI (8+16+256+512) +#define OB_DUPLI (8+16+256+512+2048) #define OB_DUPLIFRAMES 8 #define OB_DUPLIVERTS 16 #define OB_DUPLIROT 32 @@ -286,6 +279,8 @@ extern Object workob; #define OB_DUPLIGROUP 256 #define OB_DUPLIFACES 512 #define OB_DUPLIFACES_SCALE 1024 +#define OB_DUPLIPARTS 2048 +#define OB_RENDER_DUPLI 4096 /* (short) ipoflag */ #define OB_DRAWKEY 1 @@ -302,6 +297,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 @@ -319,6 +317,18 @@ extern Object workob; #define OB_SHADED 4 #define OB_TEXTURE 5 +/* this condition has been made more complex since editmode can draw textures */ +#define CHECK_OB_DRAWTEXTURE(vd, dt) \ + ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) || \ + (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX)) + +#define CHECK_OB_DRAWFACEDOT(sce, vd, dt) \ + ( (sce->selectmode & SCE_SELECT_FACE) && \ + (vd->drawtype<=OB_SOLID) && \ + (((vd->drawtype==OB_SOLID) && (dt>=OB_SOLID) && (vd->flag2 & V3D_SOLID_TEX) && (vd->flag & V3D_ZBUF_SELECT)) == 0) \ + ) + + /* dtx: flags, char! */ #define OB_AXIS 2 #define OB_TEXSPACE 4 @@ -336,6 +346,9 @@ extern Object workob; #define OB_PLAINAXES 2 #define OB_CIRCLE 3 #define OB_SINGLE_ARROW 4 +#define OB_CUBE 5 +#define OB_EMPTY_SPHERE 6 +#define OB_EMPTY_CONE 7 /* boundtype */ #define OB_BOUND_BOX 0 @@ -447,3 +460,4 @@ extern Object workob; #endif + diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h new file mode 100644 index 00000000000..18dba7f398d --- /dev/null +++ b/source/blender/makesdna/DNA_particle_types.h @@ -0,0 +1,449 @@ +/* DNA_particle_types.h + * + * + * $Id: DNA_particle_types.h $ + * + * ***** BEGIN GPL/BL DUAL 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. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * 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) 2007 by Janne Karhu. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ + +#ifndef DNA_PARTICLE_TYPES_H +#define DNA_PARTICLE_TYPES_H + +#include "DNA_ID.h" + +typedef struct HairKey { + float co[3]; /* location of hair vertex */ + float time; /* time along hair, default 0-100 */ + float weight; /* softbody weight */ + short editflag; /* saved particled edit mode flags */ + short pad; +} HairKey; + +typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */ + float co[3]; /* location */ + float vel[3]; /* velocity */ + float rot[4]; /* rotation quaternion */ + float ave[3]; /* angular velocity */ + float time; /* when this key happens */ +} ParticleKey; + +/* Child particles are created around or between parent particles */ +typedef struct ChildParticle { + int num, parent; /* num is face index on the final derived mesh */ + int pa[4]; /* nearest particles to the child, used for the interpolation */ + float w[4]; /* interpolation weights for the above particles */ + float fuv[4], foffset; /* face vertex weights and offset */ + float rand[3]; +} ChildParticle; + +/* Everything that's non dynamic for a particle: */ +typedef struct ParticleData { + struct Object *stick_ob;/* object that particle sticks to when dead */ + + ParticleKey state; /* normally current global coordinates or */ + /* in sticky object space if dead & sticky */ + + HairKey *hair; /* hair vertices */ + + ParticleKey *keys; /* keyed states */ + + float i_rot[4],r_rot[4];/* initial & random values (i_rot should be removed as it's not used anymore)*/ + float r_ave[3],r_ve[3]; + + float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/ + /* face normal for volume emission */ + + float time, lifetime; /* dietime is not nescessarily time+lifetime as */ + float dietime; /* particles can die unnaturally (collision) */ + + float bank; /* banking angle for boids */ + + float size, sizemul; /* size and multiplier so that we can update size when ever */ + + int num; /* index to vert/edge/face */ + int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */ + int pad; + + int totkey; + int bpi; /* softbody body point start index */ + + short flag; + short alive; /* the life state of a particle */ + short loop; /* how many times particle life has looped */ + short rt2; +} ParticleData; + +typedef struct ParticleSettings { + ID id; + + int flag; + short type, from, distr; + /* physics modes */ + short phystype, rotmode, avemode, reactevent; + short draw, draw_as, draw_size, childtype; + /* number of path segments, power of 2 except */ + short draw_step, ren_step; + short hair_step, keys_step; + + /* adaptive path rendering */ + short adapt_angle, adapt_pix; + + short disp, omat, interpolation, rotfrom, integrator; + short kink, kink_axis, nbetween, boidneighbours; + + /* billboards */ + short bb_align, bb_uv_split, bb_anim, bb_split_offset; + float bb_tilt, bb_rand_tilt, bb_offset[2]; + + /* simplification */ + short simplify_flag, simplify_refsize; + float simplify_rate, simplify_transition; + float simplify_viewport; + + /* general values */ + float sta, end, lifetime, randlife; + 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 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; + /* children */ + int child_nbr, ren_child_nbr; + float parents, childsize, childrandsize; + float childrad, childflat, childspread; + /* clumping */ + float clumpfac, clumppow; + /* kink */ + float kink_amp, kink_freq, kink_shape; + /* rough */ + float rough1, rough1_size; + float rough2, rough2_size, rough2_thres; + float rough_end, rough_end_shape; + /* branching */ + float branch_thres; + /* drawing stuff */ + float draw_line[2]; + + /* boids */ + float max_vel, max_lat_acc, max_tan_acc; + float average_vel, banking, max_bank, groundz; + float boidfac[8]; + char boidrule[8]; + + struct Group *dup_group; + struct Group *eff_group; + struct Object *dup_ob; + struct Object *bb_ob; + struct Ipo *ipo; + struct PartDeflect *pd; +} ParticleSettings; + +typedef struct ParticleSystem{ + struct ParticleSystem *next, *prev; + + ParticleSettings *part; + + ParticleData *particles; + + ChildParticle *child; + + struct ParticleEdit *edit; + + struct ParticleCacheKey **pathcache; + struct ParticleCacheKey **childcache; + + struct SoftBody *soft; + + struct Object *target_ob; + struct Object *keyed_ob; + struct Object *lattice; + + struct ListBase effectors, reactevents; + + float imat[4][4]; /* used for duplicators */ + float cfra; + int seed; + int flag, totpart, totchild, totcached, totchildcache, rt; + short recalc, target_psys, keyed_psys, totkeyed, softflag, bakespace; + + char bb_uvname[3][32]; + + /* if you change these remember to update array lengths to PSYS_TOT_VG! */ + short vgroup[11], vg_neg, rt3[2]; + + /* temporary storage during render */ + void *renderdata; +}ParticleSystem; + +/* general particle maximums */ +/* no special why's, just seem reasonable */ +/* changing these (atleast upwards) should not cause any major problems */ +#define MAX_PARTS 100000 /* real particles/system */ +#define MAX_PART_CHILDREN 10000 /* child particles/real particles */ +#define MAX_BOIDNEIGHBOURS 10 /* neigbours considered/boid */ + +/* part->type */ +/* hair is allways baked static in object/geometry space */ +/* other types (normal particles) are in global space and not static baked */ +#define PART_EMITTER 0 +#define PART_REACTOR 1 +#define PART_HAIR 2 + +/* part->flag */ +#define PART_REACT_STA_END 1 +#define PART_REACT_MULTIPLE 2 + +#define PART_LOOP 4 +//#define PART_LOOP_INSTANT 8 + +#define PART_HAIR_GEOMETRY 16 + +#define PART_UNBORN 32 /*show unborn particles*/ +#define PART_DIED 64 /*show died particles*/ + +#define PART_TRAND 128 +#define PART_EDISTR 256 /* particle/face from face areas */ + +#define PART_STICKY 512 /*collided particles can stick to collider*/ +#define PART_DIE_ON_COL (1<<12) +#define PART_SIZE_DEFL (1<<13) /* swept sphere deflections */ +#define PART_ROT_DYN (1<<14) /* dynamic rotation */ +#define PART_SIZEMASS (1<<16) + +#define PART_ABS_LENGTH (1<<15) + +#define PART_ABS_TIME (1<<17) +#define PART_GLOB_TIME (1<<18) + +#define PART_BOIDS_2D (1<<19) + +#define PART_BRANCHING (1<<20) +#define PART_ANIM_BRANCHING (1<<21) +#define PART_SYMM_BRANCHING (1<<24) + +#define PART_HAIR_BSPLINE 1024 + +#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) + +/* 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 */ +#define PART_ROT_IINCR 2 /* same as idir but done incrementally from previous position */ + +/* part->from */ +#define PART_FROM_VERT 0 +#define PART_FROM_FACE 1 +#define PART_FROM_VOLUME 2 +#define PART_FROM_PARTICLE 3 +#define PART_FROM_CHILD 4 + +/* part->distr */ +#define PART_DISTR_JIT 0 +#define PART_DISTR_RAND 1 +#define PART_DISTR_GRID 2 + +/* part->phystype */ +#define PART_PHYS_NO 0 +#define PART_PHYS_NEWTON 1 +#define PART_PHYS_KEYED 2 +#define PART_PHYS_BOIDS 3 + +/* part->kink */ +#define PART_KINK_NO 0 +#define PART_KINK_CURL 1 +#define PART_KINK_RADIAL 2 +#define PART_KINK_WAVE 3 +#define PART_KINK_BRAID 4 + +/* part->draw */ +#define PART_DRAW_VEL 1 +#define PART_DRAW_ANG 2 +#define PART_DRAW_SIZE 4 +#define PART_DRAW_EMITTER 8 /* render emitter also */ +#define PART_DRAW_KEYS 16 +#define PART_DRAW_ADAPT 32 +#define PART_DRAW_COS 64 +#define PART_DRAW_BB_LOCK 128 +#define PART_DRAW_PARENT 256 +#define PART_DRAW_NUM 512 +#define PART_DRAW_RAND_GR 1024 +#define PART_DRAW_REN_ADAPT 2048 +#define PART_DRAW_VEL_LENGTH (1<<12) +#define PART_DRAW_MAT_COL (1<<13) +#define PART_DRAW_WHOLE_GR (1<<14) +#define PART_DRAW_REN_STRAND (1<<15) + +/* part->simplify_flag */ +#define PART_SIMPLIFY_ENABLE 1 +#define PART_SIMPLIFY_VIEWPORT 2 + +/* part->bb_align */ +#define PART_BB_X 0 +#define PART_BB_Y 1 +#define PART_BB_Z 2 +#define PART_BB_VIEW 3 +#define PART_BB_VEL 4 + +/* part->bb_anim */ +#define PART_BB_ANIM_NONE 0 +#define PART_BB_ANIM_TIME 1 +#define PART_BB_ANIM_ANGLE 2 +#define PART_BB_ANIM_OFF_TIME 3 +#define PART_BB_ANIM_OFF_ANGLE 4 + +/* part->bb_split_offset */ +#define PART_BB_OFF_NONE 0 +#define PART_BB_OFF_LINEAR 1 +#define PART_BB_OFF_RANDOM 2 + +/* part->draw as */ +#define PART_DRAW_NOT 0 +#define PART_DRAW_DOT 1 +#define PART_DRAW_CIRC 2 +#define PART_DRAW_CROSS 3 +#define PART_DRAW_AXIS 4 +#define PART_DRAW_LINE 5 +#define PART_DRAW_PATH 6 +#define PART_DRAW_OB 7 +#define PART_DRAW_GR 8 +#define PART_DRAW_BB 9 + +/* part->integrator */ +#define PART_INT_EULER 0 +#define PART_INT_MIDPOINT 1 +#define PART_INT_RK4 2 + +/* part->rotmode */ +#define PART_ROT_NOR 1 +#define PART_ROT_VEL 2 +#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 + +/* part->reactevent */ +#define PART_EVENT_DEATH 0 +#define PART_EVENT_COLLIDE 1 +#define PART_EVENT_NEAR 2 + +/* part->childtype */ +#define PART_CHILD_PARTICLES 1 +#define PART_CHILD_FACES 2 + +/* psys->recalc */ +#define PSYS_INIT 1 +#define PSYS_DISTR 2 +#define PSYS_ALLOC 4 +#define PSYS_TYPE 8 +#define PSYS_RECALC_HAIR 16 + +/* psys->flag */ +#define PSYS_CURRENT 1 +//#define PSYS_BAKING 2 +//#define PSYS_BAKE_UI 4 +#define PSYS_KEYED_TIME 8 +#define PSYS_ENABLED 16 +#define PSYS_FIRST_KEYED 32 +#define PSYS_DRAWING 64 +//#define PSYS_SOFT_BAKE 128 +#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */ +#define PSYS_HAIR_DONE 512 +#define PSYS_KEYED 1024 +#define PSYS_EDITED 2048 +#define PSYS_PROTECT_CACHE 4096 + +/* pars->flag */ +#define PARS_UNEXIST 1 +#define PARS_NO_DISP 2 +#define PARS_STICKY 4 +#define PARS_TRANSFORM 8 +#define PARS_HIDE 16 +#define PARS_TAG 32 +#define PARS_REKEY 64 +#define PARS_EDIT_RECALC 128 + +/* pars->alive */ +#define PARS_KILLED 0 +#define PARS_DEAD 1 +#define PARS_UNBORN 2 +#define PARS_ALIVE 3 + +/* psys->vg */ +#define PSYS_TOT_VG 12 + +#define PSYS_VG_DENSITY 0 +#define PSYS_VG_VEL 1 +#define PSYS_VG_LENGTH 2 +#define PSYS_VG_CLUMP 3 +#define PSYS_VG_KINK 4 +#define PSYS_VG_ROUGH1 5 +#define PSYS_VG_ROUGH2 6 +#define PSYS_VG_ROUGHE 7 +#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 + +#define BOID_COLLIDE 0 +#define BOID_AVOID 1 +#define BOID_CROWD 2 +#define BOID_CENTER 3 +#define BOID_AV_VEL 4 +#define BOID_VEL_MATCH 5 +#define BOID_GOAL 6 +#define BOID_LEVEL 7 + + +//#define PSYS_INTER_CUBIC 0 +//#define PSYS_INTER_LINEAR 1 +//#define PSYS_INTER_CARDINAL 2 +//#define PSYS_INTER_BSPLINE 3 + +#endif diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 250c600fcaf..869f1cb426d 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -120,7 +120,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; @@ -134,9 +138,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 @@ -153,6 +159,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... */ @@ -240,9 +248,9 @@ typedef struct RenderData { * The number of samples to use per pixel. */ short osa; - - short frs_sec, edgeint; + short frs_sec, edgeint; + /* safety, border and display rect */ rctf safety, border; rcti disprect; @@ -250,7 +258,8 @@ typedef struct RenderData { /* information on different layers to be rendered */ ListBase layers; short actlay, pad; - int pad2; + + float frs_sec_base; /** * Value used to define filter size for all filter options */ @@ -264,6 +273,8 @@ typedef struct RenderData { /* Bake Render options */ short bake_osa, bake_filter, bake_mode, bake_flag; + short bake_normal_space, bpad; + float bake_maxdist, bake_biasdist, bake_pad; /* yafray: global panel params. TODO: move elsewhere */ short GIquality, GIcache, GImethod, GIphotons, GIdirect; @@ -271,15 +282,48 @@ 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; + short stamp_font_id, pad3; /* select one of blenders bitmap fonts */ + + /* stamp info user data. */ + char stamp_udata[160]; + /* 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]; @@ -297,11 +341,34 @@ typedef struct TimeMarker { unsigned int flag; } TimeMarker; -struct ImagePaintSettings { +typedef struct ImagePaintSettings { struct Brush *brush; short flag, tool; int pad3; -}; +} ImagePaintSettings; + +typedef struct ParticleBrushData { + short size, strength; /* common settings */ + short step, invert; /* for specific brushes only */ +} ParticleBrushData; + +typedef struct ParticleEditSettings { + short flag; + short totrekey; + short totaddkey; + short brushtype; + + ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */ + + float emitterdist; + int draw_timed; +} ParticleEditSettings; + +typedef struct TransformOrientation { + struct TransformOrientation *next, *prev; + char name[36]; + float mat[3][3]; +} TransformOrientation; typedef struct ToolSettings { /* Subdivide Settings */ @@ -333,10 +400,14 @@ typedef struct ToolSettings { short uvcalc_mapalign; short uvcalc_flag; - short pad2; - - /* Image Paint (8 byte aligned please!) */ + /* Auto-IK */ + short autoik_chainlen; + + /* Image Paint (8 byttse aligned please!) */ struct ImagePaintSettings imapaint; + + /* Particle Editing */ + struct ParticleEditSettings particle; /* Select Group Threshold */ float select_thresh; @@ -352,7 +423,21 @@ typedef struct ToolSettings { /* Multires */ char multires_subdiv_type; - char pad4[2]; + /* Skeleton generation */ + short skgen_resolution; + float skgen_threshold_internal; + float skgen_threshold_external; + float skgen_length_ratio; + float skgen_length_limit; + float skgen_angle_limit; + float skgen_correlation_limit; + float skgen_symmetry_limit; + short skgen_options; + char skgen_postpro; + char skgen_postpro_passes; + char skgen_subdivisions[3]; + + char pad3[5]; } ToolSettings; /* Used by all brushes to store their properties, which can be directly set @@ -362,20 +447,25 @@ 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]; + /* Editable brush shape */ + struct CurveMapping *cumap; + /* Settings for each brush */ BrushData drawbrush, smoothbrush, pinchbrush, inflatebrush, grabbrush, layerbrush, flattenbrush; short brush_type; @@ -388,8 +478,7 @@ typedef struct SculptData char texsep; char averaging; - - char draw_flag; + char flags; /* Control tablet input */ char tablet_size, tablet_strength; @@ -397,6 +486,10 @@ 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]; } SculptData; typedef struct Scene { @@ -417,15 +510,16 @@ typedef struct Scene { /* editmode stuff */ float editbutsize; /* size of normals */ - short selectmode; + short selectmode; /* for mesh only! */ short proportional, prop_mode; + short automerge, pad5, pad6, pad7; short use_nodes; + struct bNodeTree *nodetree; - void *ed; + void *ed; /* sequence editor data is allocated here */ struct Radio *radio; - void *sumohandle; struct GameFraming framing; @@ -439,9 +533,10 @@ typedef struct Scene { ScriptLink scriptlink; ListBase markers; + ListBase transform_spaces; - short jumpframe; - short pad1, pad2, pad3; + short jumpframe, pad1; + short snap_flag, snap_target; /* none of the dependancy graph vars is mean to be saved */ struct DagForest *theDag; @@ -483,10 +578,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 @@ -496,6 +598,7 @@ typedef struct Scene { #define R_FILTER_CATROM 4 #define R_FILTER_GAUSS 5 #define R_FILTER_MITCH 6 +#define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */ /* yafray: renderer flag (not only exclusive to yafray) */ #define R_INTERN 0 @@ -516,8 +619,21 @@ 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 + +/* r->stamp */ +#define R_STAMP_TIME 0x0001 +#define R_STAMP_FRAME 0x0002 +#define R_STAMP_DATE 0x0004 +#define R_STAMP_CAMERA 0x0008 +#define R_STAMP_SCENE 0x0010 +#define R_STAMP_NOTE 0x0020 +#define R_STAMP_DRAW 0x0040 /* draw in the image */ +#define R_STAMP_MARKER 0x0080 +#define R_STAMP_FILENAME 0x0100 +#define R_STAMP_SEQSTRIP 0x0200 /* alphamode */ #define R_ADDSKY 0 @@ -533,7 +649,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 @@ -552,16 +668,27 @@ typedef struct Scene { #define R_CINEON 26 #define R_DPX 27 #define R_MULTILAYER 28 +#define R_DDS 29 /* subimtype, flag options for imtype */ #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_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 +#define R_BAKE_SPACE_WORLD 1 +#define R_BAKE_SPACE_OBJECT 2 +#define R_BAKE_SPACE_TANGENT 3 /* **************** SCENE ********************* */ #define RAD_PHASE_PATCHES 1 @@ -569,14 +696,24 @@ typedef struct Scene { /* base->flag is in DNA_object_types.h */ -/* sce->flag */ -#define SCE_ADDSCENAME 1 +/* scene->snap_flag */ +#define SCE_SNAP 1 +/* 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 /* sce->selectmode */ -#define SCE_SELECT_VERTEX 1 +#define SCE_SELECT_VERTEX 1 /* for mesh */ #define SCE_SELECT_EDGE 2 #define SCE_SELECT_FACE 4 +/* sce->selectmode for particles */ +#define SCE_SELECT_PATH 1 +#define SCE_SELECT_POINT 2 +#define SCE_SELECT_END 4 + /* sce->recalc (now in use by previewrender) */ #define SCE_PRV_CHANGED 1 @@ -603,21 +740,25 @@ 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 +#define SCULPT_DRAW_BRUSH 4 /* SculptData.brushtype */ -#define DRAW_BRUSH 1 -#define SMOOTH_BRUSH 2 -#define PINCH_BRUSH 3 +#define DRAW_BRUSH 1 +#define SMOOTH_BRUSH 2 +#define PINCH_BRUSH 3 #define INFLATE_BRUSH 4 -#define GRAB_BRUSH 5 -#define LAYER_BRUSH 6 +#define GRAB_BRUSH 5 +#define LAYER_BRUSH 6 #define FLATTEN_BRUSH 7 /* SculptData.texrept */ #define SCULPTREPT_DRAG 1 #define SCULPTREPT_TILE 2 #define SCULPTREPT_3D 3 -/* SculptData.draw_flag */ -#define SCULPTDRAW_FAST 1 -#define SCULPTDRAW_BRUSH 2 #define SYMM_X 1 #define SYMM_Y 2 @@ -628,6 +769,28 @@ typedef struct Scene { #define IMAGEPAINT_DRAW_TOOL 2 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 +/* toolsettings->particle flag */ +#define PE_KEEP_LENGTHS 1 +#define PE_LOCK_FIRST 2 +#define PE_DEFLECT_EMITTER 4 +#define PE_INTERPOLATE_ADDED 8 +#define PE_SHOW_CHILD 16 +#define PE_SHOW_TIME 32 +#define PE_X_MIRROR 64 + +/* toolsetting->particle brushtype */ +#define PE_BRUSH_NONE -1 +#define PE_BRUSH_COMB 0 +#define PE_BRUSH_CUT 1 +#define PE_BRUSH_LENGTH 2 +#define PE_BRUSH_PUFF 3 +#define PE_BRUSH_ADD 4 +#define PE_BRUSH_WEIGHT 5 +#define PE_BRUSH_SMOOTH 6 + +/* this must equal ParticleEditSettings.brush array size */ +#define PE_TOT_BRUSH 7 + /* toolsettings->retopo_mode */ #define RETOPO 1 #define RETOPO_PAINT 2 @@ -637,6 +800,24 @@ typedef struct Scene { #define RETOPO_LINE 2 #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_SUB_LENGTH 0 +#define SKGEN_SUB_ANGLE 1 +#define SKGEN_SUB_CORRELATION 2 +#define SKGEN_SUB_TOTAL 3 + +/* toolsettings->skgen_postpro */ +#define SKGEN_SMOOTH 0 +#define SKGEN_AVERAGE 1 +#define SKGEN_SHARPEN 2 + #ifdef __cplusplus } #endif diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index cf3c2eaa168..65374983af5 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -147,7 +147,9 @@ typedef struct ScrArea { #define VERT_SCROLL 3 #define T_SCROLL 4 #define B_SCROLL 8 -#define HOR_SCROLL 12 +#define HOR_SCROLL 12 +#define B_SCROLLO 16 /* special hack for outliner hscroll - prevent hanging */ +#define HOR_SCROLLO 20 /* in older versions of blender */ /* Panel->snap - for snapping to screen edges */ #define PNL_SNAP_NONE 0 diff --git a/source/blender/makesdna/DNA_scriptlink_types.h b/source/blender/makesdna/DNA_scriptlink_types.h index 8a08d3f12c1..a21c67fc5e8 100644 --- a/source/blender/makesdna/DNA_scriptlink_types.h +++ b/source/blender/makesdna/DNA_scriptlink_types.h @@ -61,6 +61,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_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 5bb9f61f71e..8dad33c411b 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -46,19 +46,59 @@ struct Scene; typedef struct StripElem { char name[80]; +} StripElem; + +typedef struct TStripElem { struct ImBuf *ibuf; - struct StripElem *se1, *se2, *se3; + struct ImBuf *ibuf_comp; + struct TStripElem *se1, *se2, *se3; short ok; - short pad; + short flag; int nr; -} StripElem; +} 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; @@ -87,22 +127,23 @@ typedef struct PluginSeq { /* WATCH IT: first part identical to ID (for use in ipo's) */ typedef struct Sequence { + struct Sequence *next, *prev; + void *tmp; /* tmp var for copying, and tagging for linked selection */ + 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 */ - struct Sequence *next, *prev, *newseq; - void *lib; - char name[24]; - - short flag, type; /*flags bitmap (see below) and the type of sequence*/ - int len; + 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; - int machine, depth; + int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ int startdisp, enddisp; /*starting and ending points in the sequence*/ float mul, handsize; - int sfra; /* starting frame according to the timeline of the scene */ + /* 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; - StripElem *curelem; struct Ipo *ipo; struct Scene *scene; @@ -114,8 +155,7 @@ typedef struct Sequence { /* pointers for effects: */ struct Sequence *seq1, *seq2, *seq3; - /* meta */ - ListBase seqbase; + ListBase seqbase; /* list of strips for metastrips */ struct bSound *sound; /* the linked "bSound" object */ struct hdaudio *hdaudio; /* external hdaudio object */ @@ -125,7 +165,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; @@ -170,6 +216,8 @@ typedef struct TransformVars { float yFin; float rotIni; float rotFin; + int percent; + int interpolation; } TransformVars; typedef struct SolidColorVars { @@ -182,7 +230,7 @@ typedef struct SpeedControlVars { float globalSpeed; int flags; int length; - int pad; + int lastValidFrame; } SpeedControlVars; /* SpeedControlVars->flags */ @@ -203,6 +251,19 @@ typedef struct SpeedControlVars { #define SEQ_IPO_FRAME_LOCKED 256 #define SEQ_EFFECT_NOT_LOADED 512 #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_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 @@ -228,7 +289,19 @@ 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 53a64fa574f..fbc30f5efcc 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -52,6 +52,7 @@ struct BlendHandle; struct RenderInfo; struct bNodeTree; struct uiBlock; +struct FileList; /** * The base structure all the other spaces @@ -93,7 +94,7 @@ typedef struct SpaceIpo { /* the ipo context we need to store */ struct Ipo *ipo; struct ID *from; - char actname[32], constname[32]; + char actname[32], constname[32], bonename[32]; short totipo, pin; short butofs, channel; @@ -147,11 +148,11 @@ 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; } SpaceSeq; typedef struct SpaceFile { @@ -170,8 +171,10 @@ typedef struct SpaceFile { char file[80]; short type, ofs, flag, sort; - short maxnamelen, collums; - + short maxnamelen, collums, f_fp, pad1; + int pad2; + char fp_str[8]; + struct BlendHandle *libfiledata; unsigned short retval; /* event */ @@ -229,20 +232,23 @@ typedef struct SpaceImage { struct CurveMapping *cumap; short mode, menunr; - short imanr, curtile; + 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 imtypenr, lock; - short showspare, pad2; + short pin, pad2; float zoom; + char dt_uv; /* UV draw type */ + 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; } SpaceImage; -typedef struct SpaceNla{ +typedef struct SpaceNla { struct SpaceLink *next, *prev; int spacetype; float blockscale; @@ -251,7 +257,8 @@ typedef struct SpaceNla{ short blockhandler[8]; short menunr, lock; - int flag; + short autosnap; /* this uses the same settings as autosnap for Action Editor */ + short flag; View2D v2d; } SpaceNla; @@ -285,6 +292,24 @@ typedef struct SpaceText { } 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; @@ -292,9 +317,10 @@ typedef struct SpaceScript { struct ScrArea *area; struct Script *script; - int pad2; short flags, menunr; - + int pad1; + + void *but_refs; } SpaceScript; typedef struct SpaceTime { @@ -333,89 +359,63 @@ typedef struct SpaceNode { #define SNODE_DO_PREVIEW 1 #define SNODE_BACKDRAW 2 -# -# -typedef struct OneSelectableIma { - int header; - int ibuf_type; - struct ImBuf *pict; - struct OneSelectableIma *next; - struct OneSelectableIma *prev; - - short cmap, image, draw_me, rt; - short sx, sy, ex, ey, dw, dh; - short selectable, selected; - int mtime, disksize; - char file_name[64]; - - short orgx, orgy, orgd, anim; /* same as ibuf->x...*/ - char dummy[4]; /* 128 */ - - char pict_rect[3968]; /* 4096 (RECT = 64 * 62) */ - -} OneSelectableIma; - -# -# -typedef struct ImaDir { - struct ImaDir *next, *prev; - int selected, hilite; - int type, size; - int mtime; - char name[100]; -} ImaDir; - typedef struct SpaceImaSel { SpaceLink *next, *prev; int spacetype; float blockscale; struct ScrArea *area; - char title[28]; - - int fase; - short mode, subfase; - short mouse_move_redraw, imafase; - short mx, my; - - short dirsli, dirsli_lines; - short dirsli_sx, dirsli_ey , dirsli_ex, dirsli_h; - short imasli, fileselmenuitem; - short imasli_sx, imasli_ey , imasli_ex, imasli_h; - - short dssx, dssy, dsex, dsey; - short desx, desy, deex, deey; - short fssx, fssy, fsex, fsey; - short dsdh, fsdh; - short fesx, fesy, feex, feey; - short infsx, infsy, infex, infey; - short dnsx, dnsy, dnw, dnh; - short fnsx, fnsy, fnw, fnh; - - - char fole[128], dor[128]; - char file[128], dir[128]; - ImaDir *firstdir, *firstfile; - int topdir, totaldirs, hilite; - int topfile, totalfiles; - - float image_slider; - float slider_height; - float slider_space; - short topima, totalima; - short curimax, curimay; - OneSelectableIma *first_sel_ima; - OneSelectableIma *hilite_ima; - short total_selected, ima_redraw; - int pad2; + short blockhandler[8]; + + View2D v2d; + + struct FileList *files; + + /* specific stuff for drawing */ + char title[24]; + char dir[160]; + char file[80]; + + short type, menu, flag, sort; + + void *curfont; + int active_file; + + int numtilesx; + int numtilesy; + + int selstate; + + struct rcti viewrect; + struct rcti bookmarkrect; + + float scrollpos; /* current position of scrollhandle */ + float scrollheight; /* height of the scrollhandle */ + float scrollarea; /* scroll region, scrollpos is from 0 to scrollarea */ + + float aspect; + unsigned short retval; /* event */ + + short ipotype; + + short filter; + short active_bookmark; + short pad, pad1; + + /* view settings */ + short prv_w; + short prv_h; + + /* one day we'll add unions to dna */ + void (*returnfunc)(char *); + void (*returnfunc_event)(unsigned short); + void (*returnfunc_args)(char *, void *, void *); - struct ImBuf *cmap; + void *arg1, *arg2; + short *menup; /* pointer to menu result or ID browsing */ + char *pupmenu; /* optional menu in header */ - /* Also fucked. Needs to change so things compile, but breaks sdna - * ... */ -/* void (*returnfunc)(void); */ - void (*returnfunc)(char*); - void *arg1; + struct ImBuf *img; } SpaceImaSel; @@ -437,13 +437,14 @@ 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 #define FILE_MAIN 2 +#define FILE_LOADFONT 3 -/* sfile->flag */ +/* sfile->flag and simasel->flag */ #define FILE_SHOWSHORT 1 #define FILE_STRINGCODE 2 #define FILE_LINK 4 @@ -452,6 +453,8 @@ typedef struct SpaceImaSel { #define FILE_ACTIVELAY 32 #define FILE_ATCURSOR 64 #define FILE_SYNCPOSE 128 +#define FILE_FILTER 256 +#define FILE_BOOKMARKS 512 /* sfile->sort */ #define FILE_SORTALPHA 0 @@ -468,6 +471,9 @@ typedef struct SpaceImaSel { #define PYSCRIPTFILE 64 #define FTFONTFILE 128 #define SOUNDFILE 256 +#define TEXTFILE 512 +#define MOVIEFILE_ICON 1024 /* movie file that preview can't load */ +#define FOLDERFILE 2048 /* represents folders for filtering */ #define SCROLLH 16 /* height scrollbar */ #define SCROLLB 16 /* width scrollbar */ @@ -476,25 +482,49 @@ typedef struct SpaceImaSel { #define SI_TEXTURE 0 #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 + +/* 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, + * also, sticky loc is the default mode so this means we dont need to 'do_versons' */ +#define SI_STICKY_LOC 0 +#define SI_STICKY_DISABLE 1 +#define SI_STICKY_VERTEX 2 + /* SpaceImage->flag */ -#define SI_BE_SQUARE 1 -#define SI_EDITTILE 2 -#define SI_CLIP_UV 4 -#define SI_DRAWTOOL 8 -#define SI_STICKYUVS 16 -#define SI_DRAWSHADOW 32 -#define SI_SELACTFACE 64 -#define SI_DEPRECATED 128 -#define SI_LOCALSTICKY 256 -#define SI_COORDFLOATS 512 -#define SI_PIXELSNAP 1024 -#define SI_LIVE_UNWRAP 2048 -#define SI_USE_ALPHA 0x1000 -#define SI_SHOW_ALPHA 0x2000 -#define SI_SHOW_ZBUF 0x4000 +#define SI_BE_SQUARE 1<<0 +#define SI_EDITTILE 1<<1 +#define SI_CLIP_UV 1<<2 +#define SI_DRAWTOOL 1<<3 +#define SI_DEPRECATED1 1<<4 /* stick UVs to others in the same location */ +#define SI_DRAWSHADOW 1<<5 +#define SI_SELACTFACE 1<<6 +#define SI_DEPRECATED2 1<<7 +#define SI_DEPRECATED3 1<<8 /* stick UV selection to mesh vertex (UVs wont always be touching) */ +#define SI_COORDFLOATS 1<<9 +#define SI_PIXELSNAP 1<<10 +#define SI_LIVE_UNWRAP 1<<11 +#define SI_USE_ALPHA 1<<12 +#define SI_SHOW_ALPHA 1<<13 +#define SI_SHOW_ZBUF 1<<14 /* next two for render window dislay */ -#define SI_PREVSPACE 0x8000 -#define SI_FULLWINDOW 0x10000 +#define SI_PREVSPACE 1<<15 +#define SI_FULLWINDOW 1<<16 +#define SI_SYNC_UVSEL 1<<17 +#define SI_LOCAL_UV 1<<18 + /* this means that the image is drawn until it reaches the view edge, + * in the image view, its unrelated to the 'tile' mode for texface */ +#define SI_DRAW_TILE 1<<19 +#define SI_SMOOTH_UV 1<<20 +#define SI_DRAW_STRETCH 1<<21 /* SpaceText flags (moved from DNA_text_types.h) */ @@ -527,6 +557,7 @@ typedef struct SpaceImaSel { #define OOPS_LI 2048 #define OOPS_IM 4096 #define OOPS_AR 8192 +#define OOPS_GR 16384 /* SpaceOops->outlinevis */ #define SO_ALL_SCENES 0 @@ -584,10 +615,15 @@ typedef struct SpaceImaSel { /* nla->flag */ #define SNLA_ALLKEYED 1 #define SNLA_ACTIVELAYERS 2 +#define SNLA_DRAWTIME 4 /* time->flag */ + /* show timing in frames instead of in seconds */ #define TIME_DRAWFRAMES 1 + /* temporary flag set when scrubbing time */ #define TIME_CFRA_NUM 2 + /* only keyframes from active/selected channels get shown */ +#define TIME_ONLYACTSEL 4 /* time->redraws */ #define TIME_LEFTMOST_3D_WIN 1 @@ -603,9 +639,13 @@ typedef struct SpaceImaSel { #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 /* space types, moved from DNA_screen_types.h */ enum { diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index a5a2e36125f..bc2b0521d4f 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -44,6 +44,7 @@ struct EnvMap; struct Object; struct Tex; struct Image; +struct PreviewImage; struct ImBuf; typedef struct MTex { @@ -56,9 +57,10 @@ typedef struct MTex { char projx, projy, projz, mapping; float ofs[3], size[3]; - short texflag, colormodel; + short texflag, colormodel, pmapto, pmaptoneg; + short normapspace, pad[3]; float r, g, b, k; - float def_var; + float def_var, rt; float colfac, norfac, varfac; float dispfac; @@ -106,6 +108,7 @@ typedef struct CBData { } CBData; /* 32 = MAXCOLORBAND */ +/* note that this has to remain a single struct, for UserDef */ typedef struct ColorBand { short flag, tot, cur, ipotype; CBData data[32]; @@ -155,7 +158,7 @@ typedef struct Tex { float cropxmin, cropymin, cropxmax, cropymax; short xrepeat, yrepeat; short extend; - + /* variables disabled, moved to struct iuser */ short fie_ima; int len; @@ -171,7 +174,7 @@ typedef struct Tex { struct PluginTex *plugin; struct ColorBand *coba; struct EnvMap *env; - + struct PreviewImage * preview; } Tex; @@ -245,6 +248,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 @@ -264,6 +268,7 @@ typedef struct TexMapping { #define TEX_PRV_NOR 64 #define TEX_REPEAT_XMIR 128 #define TEX_REPEAT_YMIR 256 +#define TEX_FLAG_MASK ( TEX_COLORBAND | TEX_FLIPBLEND | TEX_NEGALPHA | TEX_CHECKER_ODD | TEX_CHECKER_EVEN | TEX_PRV_ALPHA | TEX_PRV_NOR | TEX_REPEAT_XMIR | TEX_REPEAT_YMIR ) /* extend (starts with 1 because of backward comp.) */ #define TEX_EXTEND 1 @@ -287,6 +292,10 @@ typedef struct TexMapping { #define TEX_BANDNOISE 2 #define TEX_RINGNOISE 3 +/* tex->stype in texture.c - cloud types */ +#define TEX_DEFAULT 0 +#define TEX_COLOR 1 + /* tex->stype in texture.c - marble types */ #define TEX_SOFT 0 #define TEX_SHARP 1 @@ -301,6 +310,23 @@ typedef struct TexMapping { #define TEX_HALO 5 #define TEX_RAD 6 +/* tex->stype in texture.c - stucci types */ +#define TEX_PLASTIC 0 +#define TEX_WALLIN 1 +#define TEX_WALLOUT 2 + +/* tex->stype in texture.c - voronoi types */ +#define TEX_INTENSITY 0 +#define TEX_COL1 1 +#define TEX_COL2 2 +#define TEX_COL3 3 + +/* mtex->normapspace */ +#define MTEX_NSPACE_CAMERA 0 +#define MTEX_NSPACE_WORLD 1 +#define MTEX_NSPACE_OBJECT 2 +#define MTEX_NSPACE_TANGENT 3 + /* wrap */ #define MTEX_FLAT 0 #define MTEX_CUBE 1 @@ -321,11 +347,12 @@ 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 /* blendtype */ #define MTEX_BLEND 0 @@ -338,6 +365,10 @@ 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 /* **************** EnvMap ********************* */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 7567ab6921c..07072104fbc 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -36,11 +36,12 @@ #define DNA_USERDEF_TYPES_H #include "DNA_listBase.h" +#include "DNA_texture_types.h" /* themes; defines in BIF_resource.h */ +struct ColorBand; -// global, button colors - +/* global, button colors */ typedef struct ThemeUI { char outline[4]; char neutral[4]; @@ -63,11 +64,11 @@ 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 -// for example later on, when we introduce wire colors for ob types or so... +/* try to put them all in one, if needed a special struct can be created as well + * for example later on, when we introduce wire colors for ob types or so... + */ typedef struct ThemeSpace { char back[4]; char text[4]; @@ -92,6 +93,7 @@ typedef struct ThemeSpace { char normal[4]; char bone_solid[4], bone_pose[4]; char strip[4], strip_select[4]; + char cframe[4], pad[4]; char vertex_size, facedot_size; char bpad[2]; @@ -101,17 +103,32 @@ 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 bpad1[4]; - + char editmesh_active[4]; } ThemeSpace; +/* set of colors for use as a custom color set for Objects/Bones wire drawing */ +typedef struct ThemeWireColor { + char solid[4]; + char select[4]; + char active[4]; + + short flag; + short pad; +} ThemeWireColor; + +/* flags for ThemeWireColor */ +#define TH_WIRECOLOR_CONSTCOLS (1<<0) + +/* A theme */ typedef struct bTheme { struct bTheme *next, *prev; char name[32]; + /* Interface Elements (buttons, menus, icons) */ ThemeUI tui; + /* Individual Spacetypes */ ThemeSpace tbuts; ThemeSpace tv3d; ThemeSpace tfile; @@ -127,9 +144,12 @@ typedef struct bTheme { ThemeSpace toops; ThemeSpace ttime; ThemeSpace tnode; + + /* 20 sets of bone colors for this theme */ + ThemeWireColor tarm[20]; + /*ThemeWireColor tobj[20];*/ unsigned char bpad[4], bpad1[4]; - } bTheme; typedef struct SolidLight { @@ -171,19 +191,26 @@ typedef struct UserDef { short tw_hotspot, tw_flag, tw_handlesize, tw_size; int textimeout, texcollectrate; int memcachelimit; + int prefetchframes; short frameserverport; short pad_rot_angle; /*control the rotation step of the view when PAD2,PAD4,PAD6&PAD8 is use*/ short obcenter_dia; short rvisize; /* rotating view icon size */ short rvibright; /* rotating view icon brightness */ - char versemaster[160]; - char verseuser[160]; 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 pads[4]; // char pad[8]; + char versemaster[160]; + char verseuser[160]; + float glalphaclip; + + short autokey_mode; /* autokeying mode */ + short autokey_flag; /* flags for autokeying */ + + struct ColorBand coba_weight; /* from texture.h */ } UserDef; extern UserDef U; /* from usiblender.c !!!! */ @@ -191,22 +218,28 @@ extern UserDef U; /* from usiblender.c !!!! */ /* ***************** USERDEF ****************** */ /* flag */ -#define USER_AUTOSAVE 1 -#define USER_AUTOGRABGRID 2 -#define USER_AUTOROTGRID 4 -#define USER_AUTOSIZEGRID 8 -#define USER_SCENEGLOBAL 16 -#define USER_TRACKBALL 32 -#define USER_DUPLILINK 64 -#define USER_FSCOLLUM 128 -#define USER_MAT_ON_OB 256 -#define USER_NO_CAPSLOCK 512 -#define USER_VIEWMOVE 1024 -#define USER_TOOLTIPS 2048 -#define USER_TWOBUTTONMOUSE 4096 -#define USER_NONUMPAD 8192 -#define USER_LMOUSESELECT 16384 -#define USER_FILECOMPRESS 32768 +#define USER_AUTOSAVE (1 << 0) +#define USER_AUTOGRABGRID (1 << 1) +#define USER_AUTOROTGRID (1 << 2) +#define USER_AUTOSIZEGRID (1 << 3) +#define USER_SCENEGLOBAL (1 << 4) +#define USER_TRACKBALL (1 << 5) +#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_VIEWMOVE (1 << 10) +#define USER_TOOLTIPS (1 << 11) +#define USER_TWOBUTTONMOUSE (1 << 12) +#define USER_NONUMPAD (1 << 13) +#define USER_LMOUSESELECT (1 << 14) +#define USER_FILECOMPRESS (1 << 15) +#define USER_SAVE_PREVIEWS (1 << 16) +#define USER_CUSTOM_RANGE (1 << 17) +#define USER_ADD_EDITMODE (1 << 18) +#define USER_ADD_VIEWALIGNED (1 << 19) +#define USER_RELPATHS (1 << 20) +#define USER_DRAGIMMEDIATE (1 << 21) /* viewzom */ #define USER_ZOOM_CONT 0 @@ -214,60 +247,76 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_ZOOM_DOLLY 2 /* uiflag */ - -#define USER_KEYINSERTACT 1 -#define USER_KEYINSERTOBJ 2 -#define USER_WHEELZOOMDIR 4 -#define USER_FILTERFILEEXTS 8 -#define USER_DRAWVIEWINFO 16 -#define USER_PLAINMENUS 32 // old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase +// 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) +#define USER_PLAINMENUS (1 << 5) // old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase // old flag for hide pulldown was here -#define USER_FLIPFULLSCREEN 128 -#define USER_ALLWINCODECS 256 -#define USER_MENUOPENAUTO 512 -#define USER_PANELPINNED 1024 -#define USER_AUTOPERSP 2048 -#define USER_LOCKAROUND 4096 -#define USER_GLOBALUNDO 8192 -#define USER_ORBIT_SELECTION 16384 -#define USER_KEYINSERTAVAI 32768 -#define USER_HIDE_DOT 65536 -#define USER_SHOW_ROTVIEWICON 131072 -#define USER_SHOW_VIEWPORTNAME 262144 -#define USER_KEYINSERTNEED 524288 +#define USER_FLIPFULLSCREEN (1 << 7) +#define USER_ALLWINCODECS (1 << 8) +#define USER_MENUOPENAUTO (1 << 9) +#define USER_PANELPINNED (1 << 10) +#define USER_AUTOPERSP (1 << 11) +#define USER_LOCKAROUND (1 << 12) +#define USER_GLOBALUNDO (1 << 13) +#define USER_ORBIT_SELECTION (1 << 14) +// old flag for #define USER_KEYINSERTAVAI (1 << 15) +#define USER_HIDE_DOT (1 << 16) +#define USER_SHOW_ROTVIEWICON (1 << 17) +#define USER_SHOW_VIEWPORTNAME (1 << 18) +// old flag for #define USER_KEYINSERTNEED (1 << 19) +#define USER_ZOOM_TO_MOUSEPOS (1 << 20) +#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 -#define USER_TR_TOOLTIPS 1 -#define USER_TR_BUTTONS 2 -#define USER_TR_MENUS 4 -#define USER_TR_FILESELECT 8 -#define USER_TR_TEXTEDIT 16 -#define USER_DOTRANSLATE 32 -#define USER_USETEXTUREFONT 64 +/* Auto-Keying flag */ +#define AUTOKEY_FLAG_INSERTAVAIL (1<<0) +#define AUTOKEY_FLAG_INSERTNEEDED (1<<1) +#define AUTOKEY_FLAG_AUTOMATKEY (1<<2) -/* dupflag */ +/* Auto-Keying macros */ +#define IS_AUTOKEY_ON (U.autokey_mode & AUTOKEY_ON) +#define IS_AUTOKEY_MODE(mode) (U.autokey_mode == AUTOKEY_MODE_##mode) +#define IS_AUTOKEY_FLAG(flag) (U.autokey_flag == AUTOKEY_FLAG_##flag) -#define USER_DUP_MESH 1 -#define USER_DUP_CURVE 2 -#define USER_DUP_SURF 4 -#define USER_DUP_FONT 8 -#define USER_DUP_MBALL 16 -#define USER_DUP_LAMP 32 -#define USER_DUP_IPO 64 -#define USER_DUP_MAT 128 -#define USER_DUP_TEX 256 -#define USER_DUP_ARM 512 -#define USER_DUP_ACT 1024 +/* transopts */ +#define USER_TR_TOOLTIPS (1 << 0) +#define USER_TR_BUTTONS (1 << 1) +#define USER_TR_MENUS (1 << 2) +#define USER_TR_FILESELECT (1 << 3) +#define USER_TR_TEXTEDIT (1 << 4) +#define USER_DOTRANSLATE (1 << 5) +#define USER_USETEXTUREFONT (1 << 6) +#define CONVERT_TO_UTF8 (1 << 7) -/* gameflags */ +/* dupflag */ +#define USER_DUP_MESH (1 << 0) +#define USER_DUP_CURVE (1 << 1) +#define USER_DUP_SURF (1 << 2) +#define USER_DUP_FONT (1 << 3) +#define USER_DUP_MBALL (1 << 4) +#define USER_DUP_LAMP (1 << 5) +#define USER_DUP_IPO (1 << 6) +#define USER_DUP_MAT (1 << 7) +#define USER_DUP_TEX (1 << 8) +#define USER_DUP_ARM (1 << 9) +#define USER_DUP_ACT (1 << 10) +/* gameflags */ #define USER_VERTEX_ARRAYS 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 diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index cfd6f682e71..3ed82ddc793 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -45,6 +45,10 @@ typedef struct View2D { short keepaspect, keepzoom; short oldwinx, oldwiny; int flag; + + float cursor[2]; /* only used in the UV view for now*/ + short around; + char pad[6]; } View2D; /* v2d->keepzoom */ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 72140e5e46e..180cbd2af37 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -137,7 +137,7 @@ typedef struct View3D { short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ - short snap_target; + short pad3; 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 */ @@ -165,16 +165,12 @@ typedef struct View3D { #define V3D_CLIPPING 16384 #define V3D_DRAW_CENTERS 32768 + /* View3d->flag2 (short) */ #define V3D_OPP_DIRECTION_NAME 1 #define V3D_FLYMODE 2 -#define V3D_TRANSFORM_SNAP 4 - -/* View3d->snap_target */ -#define V3D_SNAP_TARGET_CLOSEST 0 -#define V3D_SNAP_TARGET_CENTER 1 -#define V3D_SNAP_TARGET_MEDIAN 2 - +#define V3D_DEPRECATED 4 /* V3D_TRANSFORM_SNAP, moved to a scene setting */ +#define V3D_SOLID_TEX 8 /* View3D->around */ #define V3D_CENTER 0 @@ -205,6 +201,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 */ diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 03b6871b8e0..e7a8d839227 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -55,6 +55,7 @@ typedef struct World { short colormodel, totex; short texact, mistype; + /* TODO - hork, zenk and ambk are not used, should remove at some point (Campbell) */ float horr, horg, horb, hork; float zenr, zeng, zenb, zenk; float ambr, ambg, ambb, ambk; @@ -102,11 +103,19 @@ typedef struct World { /* ambient occlusion */ float aodist, aodistfac, aoenergy, aobias; short aomode, aosamp, aomix, aocolor; + float ao_adapt_thresh, ao_adapt_speed_fac; + 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]; + /* previews */ + struct PreviewImage *preview; + ScriptLink scriptlink; } World; @@ -133,15 +142,25 @@ typedef struct World { #define WO_AOSUB 1 #define WO_AOADDSUB 2 +/* ao_samp_method - methods for sampling the AO hemi */ +#define WO_AOSAMP_CONSTANT 0 +#define WO_AOSAMP_HALTON 1 +#define WO_AOSAMP_HAMMERSLEY 2 + /* 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/Makefile b/source/blender/makesdna/intern/Makefile index 84d854064d7..bd498961e7a 100644 --- a/source/blender/makesdna/intern/Makefile +++ b/source/blender/makesdna/intern/Makefile @@ -38,10 +38,6 @@ ALLTARGETS = $(OBJS) $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(SHARED_DIR)$(DEBUG_DIR include nan_compile.mk -ifneq ($(OS),irix) - CFLAGS += -funsigned-char -endif - CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I$(OPENGL_HEADERS) diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index fe712afbeeb..872fd515f1d 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -25,6 +25,8 @@ if sys.platform != 'cygwin': makesdna_tool.Append (CCFLAGS = cflags) makesdna_tool.Append (CPPDEFINES = defines) makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib') +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']) diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 4d437861751..ecf2a8e73b0 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -127,6 +127,8 @@ char *includefiles[] = { "DNA_color_types.h", "DNA_brush_types.h", "DNA_customdata_types.h", + "DNA_particle_types.h", + "DNA_cloth_types.h", // if you add files here, please add them at the end // of makesdna.c (this file) as well @@ -714,8 +716,10 @@ static int calculate_structlens(int firststruct) /* struct alignment */ if(type >= firststruct) { - if(sizeof(void *)==8 && (len % 8) ) + if(sizeof(void *)==8 && (len % 8) ) { printf("Align struct error: %s %s\n", types[structtype],cp); + dna_error = 1; + } } /* 2-4 aligned/ */ @@ -1144,4 +1148,6 @@ int main(int argc, char ** argv) #include "DNA_color_types.h" #include "DNA_brush_types.h" #include "DNA_customdata_types.h" +#include "DNA_particle_types.h" +#include "DNA_cloth_types.h" /* end of list */ |