Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2007-11-07 01:29:20 +0300
committerMartin Poirier <theeth@yahoo.com>2007-11-07 01:29:20 +0300
commit0de103c1cdf1e4c40cfad4e233a42a6d1165953d (patch)
treea57039fa592cf0f5af3738a9624d0b0ccbf20ec0 /source/blender/makesdna
Filling in branch from trunk
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/CMakeLists.txt30
-rw-r--r--source/blender/makesdna/DNA_ID.h229
-rw-r--r--source/blender/makesdna/DNA_action_types.h225
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h395
-rw-r--r--source/blender/makesdna/DNA_armature_types.h154
-rw-r--r--source/blender/makesdna/DNA_brush_types.h91
-rw-r--r--source/blender/makesdna/DNA_camera_types.h91
-rw-r--r--source/blender/makesdna/DNA_color_types.h81
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h493
-rw-r--r--source/blender/makesdna/DNA_controller_types.h79
-rw-r--r--source/blender/makesdna/DNA_curve_types.h290
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h102
-rw-r--r--source/blender/makesdna/DNA_documentation.h79
-rw-r--r--source/blender/makesdna/DNA_effect_types.h144
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h60
-rw-r--r--source/blender/makesdna/DNA_group_types.h65
-rw-r--r--source/blender/makesdna/DNA_image_types.h124
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h401
-rw-r--r--source/blender/makesdna/DNA_key_types.h91
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h174
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h67
-rw-r--r--source/blender/makesdna/DNA_listBase.h64
-rw-r--r--source/blender/makesdna/DNA_material_types.h294
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h139
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h250
-rw-r--r--source/blender/makesdna/DNA_meta_types.h120
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h366
-rw-r--r--source/blender/makesdna/DNA_nla_types.h105
-rw-r--r--source/blender/makesdna/DNA_node_types.h257
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h157
-rw-r--r--source/blender/makesdna/DNA_object_force.h154
-rw-r--r--source/blender/makesdna/DNA_object_types.h442
-rw-r--r--source/blender/makesdna/DNA_oops_types.h86
-rw-r--r--source/blender/makesdna/DNA_packedFile_types.h65
-rw-r--r--source/blender/makesdna/DNA_property_types.h68
-rw-r--r--source/blender/makesdna/DNA_radio_types.h53
-rw-r--r--source/blender/makesdna/DNA_scene_types.h672
-rw-r--r--source/blender/makesdna/DNA_screen_types.h171
-rw-r--r--source/blender/makesdna/DNA_scriptlink_types.h77
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h83
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h253
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h239
-rw-r--r--source/blender/makesdna/DNA_sound_types.h183
-rw-r--r--source/blender/makesdna/DNA_space_types.h649
-rw-r--r--source/blender/makesdna/DNA_text_types.h80
-rw-r--r--source/blender/makesdna/DNA_texture_types.h377
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h288
-rw-r--r--source/blender/makesdna/DNA_vec_types.h91
-rw-r--r--source/blender/makesdna/DNA_vfont_types.h63
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h67
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h212
-rw-r--r--source/blender/makesdna/DNA_wave_types.h53
-rw-r--r--source/blender/makesdna/DNA_world_types.h181
-rw-r--r--source/blender/makesdna/Makefile42
-rw-r--r--source/blender/makesdna/SConscript11
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt37
-rw-r--r--source/blender/makesdna/intern/Makefile86
-rw-r--r--source/blender/makesdna/intern/SConscript41
-rw-r--r--source/blender/makesdna/intern/makesdna.c1149
59 files changed, 11190 insertions, 0 deletions
diff --git a/source/blender/makesdna/CMakeLists.txt b/source/blender/makesdna/CMakeLists.txt
new file mode 100644
index 00000000000..0311c5f0e5a
--- /dev/null
+++ b/source/blender/makesdna/CMakeLists.txt
@@ -0,0 +1,30 @@
+# $Id$
+# ***** 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, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Jacques Beaurain.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+
+SUBDIRS(intern)
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
new file mode 100644
index 00000000000..d939d0dc879
--- /dev/null
+++ b/source/blender/makesdna/DNA_ID.h
@@ -0,0 +1,229 @@
+/**
+ * blenlib/DNA_ID.h (mar-2001 nzc)
+ *
+ * ID and Library types, which are fundamental for sdna,
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_ID_H
+#define DNA_ID_H
+
+#include "DNA_listBase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Library;
+struct FileData;
+struct ID;
+
+typedef struct IDPropertyData {
+ void *pointer;
+ ListBase group;
+ int val, pad;
+} IDPropertyData;
+
+typedef struct IDProperty {
+ struct IDProperty *next, *prev;
+ char name[32];
+ char type, subtype;
+ short flag;
+ int saved; /*saved is used to indicate if this struct has been saved yet.
+ seemed like a good idea as a pad var was needed anyway :)*/
+ IDPropertyData data; /* note, alignment for 64 bits */
+ int len; /* array length, also (this is important!) string length + 1.
+ the idea is to be able to reuse array realloc functions on strings.*/
+ /*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.*/
+} IDProperty;
+
+#define MAX_IDPROP_NAME 32
+#define DEFAULT_ALLOC_FOR_NULL_STRINGS 64
+
+/*->type*/
+#define IDP_STRING 0
+#define IDP_INT 1
+#define IDP_FLOAT 2
+#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
+
+/*add any future new id property types here.*/
+
+/* watch it: Sequence has identical beginning. */
+/**
+ * ID is the first thing included in all serializable types. It
+ * provides a common handle to place all data in double-linked lists.
+ * */
+
+/* There's a nasty circular dependency here.... void* to the rescue! I
+ * really wonder why this is needed. */
+typedef struct ID {
+ void *next, *prev;
+ struct ID *newid;
+ struct Library *lib;
+ char name[24];
+ short us;
+ /**
+ * LIB_... flags report on status of the datablock this ID belongs
+ * to.
+ */
+ short flag;
+ int icon_id;
+ IDProperty *properties;
+} ID;
+
+/**
+ * For each library file used, a Library struct is added to Main
+ * WARNING: readfile.c, expand_doit() reads this struct without DNA check!
+ */
+typedef struct Library {
+ ID id;
+ ID *idblock;
+ struct FileData *filedata;
+ char name[240]; /* reveiled in the UI, can store relative path */
+ char filename[240]; /* expanded name, not relative, used while reading */
+ int tot, pad; /* tot, idblock and filedata are only fo read and write */
+ 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.
+ *
+ * The tags represent types! This is a dirty way of enabling RTTI. The
+ * sig_byte end endian defines aren't really used much.
+ *
+ **/
+
+#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
+/* big endian */
+#define MAKE_ID2(c, d) ( (c)<<8 | (d) )
+#define MOST_SIG_BYTE 0
+#define BBIG_ENDIAN
+#else
+/* little endian */
+#define MAKE_ID2(c, d) ( (d)<<8 | (c) )
+#define MOST_SIG_BYTE 1
+#define BLITTLE_ENDIAN
+#endif
+
+/* ID from database */
+#define ID_SCE MAKE_ID2('S', 'C')
+#define ID_LI MAKE_ID2('L', 'I')
+#define ID_OB MAKE_ID2('O', 'B')
+#define ID_ME MAKE_ID2('M', 'E')
+#define ID_CU MAKE_ID2('C', 'U')
+#define ID_MB MAKE_ID2('M', 'B')
+#define ID_MA MAKE_ID2('M', 'A')
+#define ID_TE MAKE_ID2('T', 'E')
+#define ID_IM MAKE_ID2('I', 'M')
+#define ID_IK MAKE_ID2('I', 'K')
+#define ID_WV MAKE_ID2('W', 'V')
+#define ID_LT MAKE_ID2('L', 'T')
+#define ID_SE MAKE_ID2('S', 'E')
+#define ID_LF MAKE_ID2('L', 'F')
+#define ID_LA MAKE_ID2('L', 'A')
+#define ID_CA MAKE_ID2('C', 'A')
+#define ID_IP MAKE_ID2('I', 'P')
+#define ID_KE MAKE_ID2('K', 'E')
+#define ID_WO MAKE_ID2('W', 'O')
+#define ID_SCR MAKE_ID2('S', 'R')
+#define ID_VF MAKE_ID2('V', 'F')
+#define ID_TXT MAKE_ID2('T', 'X')
+#define ID_SO MAKE_ID2('S', 'O')
+#define ID_GR MAKE_ID2('G', 'R')
+#define ID_ID MAKE_ID2('I', 'D')
+#define ID_AR MAKE_ID2('A', 'R')
+#define ID_AC MAKE_ID2('A', 'C')
+#define ID_SCRIPT MAKE_ID2('P', 'Y')
+#define ID_NT MAKE_ID2('N', 'T')
+#define ID_BR MAKE_ID2('B', 'R')
+
+ /* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */
+#define ID_SEQ MAKE_ID2('S', 'Q')
+ /* constraint */
+#define ID_CO MAKE_ID2('C', 'O')
+ /* pose (action channel, used to be ID_AC in code, so we keep code for backwards compat) */
+#define ID_PO MAKE_ID2('A', 'C')
+ /* used in outliner... */
+#define ID_NLA MAKE_ID2('N', 'L')
+ /* fluidsim Ipo */
+#define ID_FLUIDSIM MAKE_ID2('F', 'S')
+
+
+/*#ifdef WITH_VERSE*/
+#define ID_VS MAKE_ID2('V', 'S') /* fake id for VerseSession, needed for outliner */
+#define ID_VN MAKE_ID2('V', 'N') /* fake id for VerseNode, needed for outliner */
+#define ID_MS MAKE_ID2('M', 'S') /* fake id for VerseServer root entry, needed for outliner */
+#define ID_SS MAKE_ID2('S', 'S') /* fake id for VerseServer entry, needed for ountliner */
+/*#endif*/
+
+
+/* id->flag: set frist 8 bits always at zero while reading */
+#define LIB_LOCAL 0
+#define LIB_EXTERN 1
+#define LIB_INDIRECT 2
+#define LIB_TEST 8
+#define LIB_TESTEXT 9
+#define LIB_TESTIND 10
+#define LIB_READ 16
+#define LIB_NEEDLINK 32
+
+#define LIB_NEW 256
+#define LIB_FAKEUSER 512
+/* free test flag */
+#define LIB_DOIT 1024
+/* */
+#define LIB_APPEND_TAG 2048
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
new file mode 100644
index 00000000000..3c5ef7c94e6
--- /dev/null
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -0,0 +1,225 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * Contributor(s): Original design: Reevan McKay
+ * Contributor(s): Full recode, Ton Roosendaal, Crete 2005
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+
+#ifndef DNA_ACTION_TYPES_H
+#define DNA_ACTION_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+#include "DNA_view2d_types.h"
+
+struct SpaceLink;
+struct Object;
+
+/* 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;/* Constraints that act on this PoseChannel */
+ char name[32]; /* Channels need longer names than normal blender objects */
+
+ short flag; /* dynamic, for detecting transform changes */
+ short constflag; /* for quick detecting which constraints affect this channel */
+ short ikflag; /* settings for IK bones */
+ short selectflag; /* copy of bone flag, so you can work with library armatures */
+ short protectflag; /* protect channels from being transformed */
+ short pad2;
+
+ int pathlen; /* for drawing paths, the amount of frames */
+ int pathsf; /* for drawing paths, the start frame number */
+ int pathef; /* for drawing paths, the end frame number */
+
+ struct Bone *bone; /* set on read file or rebuild pose */
+ 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 */
+
+ /* 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];
+ float quat[4];
+
+ 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... */
+
+ float limitmin[3], limitmax[3]; /* DOF constraint */
+ float stiffness[3]; /* DOF stiffness */
+ float ikstretch;
+
+ float *path; /* totpath x 3 x float */
+ struct Object *custom; /* draws custom object instead of this channel */
+
+} bPoseChannel;
+
+/* 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() */
+} bPose;
+
+/* Action Channels belong to Actions. They are linked with an IPO block, and can also own
+ * Constraint Channels in certain situations.
+ */
+typedef struct bActionChannel {
+ struct bActionChannel *next, *prev;
+ struct Ipo *ipo; /* IPO block this action channel references */
+ ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */
+
+ 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 */
+} bAction;
+
+/* Action Editor Space. This is defined here instead of in DNA_space_types.h */
+typedef struct SpaceAction {
+ struct SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ View2D v2d;
+
+ bAction *action; /* the currently active action */
+ short flag, autosnap; /* flag: bitmapped settings; autosnap: automatic keyframe snapping mode */
+ short pin, actnr, lock; /* pin: keep showing current action; actnr: used for finding chosen action from menu; lock: lock time to other windows */
+ short actwidth; /* width of the left-hand side name panel (in pixels?) */
+ float timeslide; /* for Time-Slide transform mode drawing - current frame? */
+} SpaceAction;
+
+/* Action Channel flags */
+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;
+
+/* SpaceAction flag */
+typedef enum SACTION_FLAG {
+ /* during transform */
+ 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)
+} SACTION_FLAG;
+
+/* 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->flag */
+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 {
+ POSE_LOC = 0x0001,
+ POSE_ROT = 0x0002,
+ POSE_SIZE = 0x0004,
+ POSE_IK_MAT = 0x0008,
+ POSE_UNUSED2 = 0x0010,
+ POSE_UNUSED3 = 0x0020,
+ POSE_UNUSED4 = 0x0040,
+ POSE_UNUSED5 = 0x0080,
+ POSE_HAS_IK = 0x0100,
+ POSE_CHAIN = 0x0200,
+ POSE_DONE = 0x0400,
+ POSE_KEY = 0x1000,
+ POSE_STRIDE = 0x2000
+};
+
+/* PoseChannel constflag (constraint detection) */
+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 */
+typedef enum PCHAN_IKFLAG {
+ BONE_IK_NO_XDOF = (1<<0),
+ BONE_IK_NO_YDOF = (1<<1),
+ BONE_IK_NO_ZDOF = (1<<2),
+
+ BONE_IK_XLIMIT = (1<<3),
+ BONE_IK_YLIMIT = (1<<4),
+ BONE_IK_ZLIMIT = (1<<5)
+} PCHAN_IKFLAG;
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
new file mode 100644
index 00000000000..0531e70bb97
--- /dev/null
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -0,0 +1,395 @@
+/**
+ * blenlib/DNA_actuator_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_ACTUATOR_TYPES_H
+#define DNA_ACTUATOR_TYPES_H
+
+struct Object;
+struct Mesh;
+struct Scene;
+struct Group;
+
+/* ****************** ACTUATORS ********************* */
+
+/* unused now, moved to editobjectactuator in 2.02. Still needed for dna */
+typedef struct bAddObjectActuator {
+ int time, pad;
+ struct Object *ob;
+} bAddObjectActuator;
+
+typedef struct bActionActuator {
+ struct bAction *act; /* Pointer to action */
+ short type, flag; /* Playback type */
+ int sta, end; /* Start & End frames */
+ char name[32]; /* For property-driven playback */
+ int blendin; /* Number of frames of blending */
+ short priority; /* Execution priority */
+ short strideaxis; /* Displacement axis */
+ float stridelength; /* Displacement incurred by cycle */
+} bActionActuator;
+
+typedef struct bSoundActuator {
+ short flag, sndnr;
+ int sta, end;
+ short pad1[2];
+ struct bSound *sound;
+ short type, makecopy;
+ short copymade, pad2[1];
+} bSoundActuator;
+
+typedef struct bCDActuator {
+ short flag, sndnr;
+ int sta, end;
+ short type, track;
+ float volume;
+} bCDActuator;
+
+typedef struct bEditObjectActuator {
+ int time;
+ short type, flag;
+ struct Object *ob;
+ struct Mesh *me;
+ char name[32];
+ float linVelocity[3]; /* initial lin. velocity on creation */
+ short localflag; /* flag for the lin. vel: apply locally */
+ short pad;
+} bEditObjectActuator;
+
+typedef struct bSceneActuator {
+ short type, flag;
+ int pad;
+ struct Scene *scene;
+ struct Object *camera;
+} bSceneActuator;
+
+typedef struct bPropertyActuator {
+ int flag, type;
+ char name[32], value[32];
+ struct Object *ob;
+} bPropertyActuator;
+
+typedef struct bObjectActuator {
+ int flag, type;
+ float forceloc[3], forcerot[3];
+ float loc[3], rot[3];
+ float dloc[3], drot[3];
+ float linearvelocity[3], angularvelocity[3];
+} bObjectActuator;
+
+typedef struct bIpoActuator {
+ short flag, type;
+ int sta, end;
+ char name[32];
+
+ short pad1, cur, butsta, butend;
+
+} bIpoActuator;
+
+typedef struct bCameraActuator {
+ struct Object *ob;
+ float height, min, max;
+ float fac;
+ short flag, axis;
+ float visifac;
+} bCameraActuator ;
+
+typedef struct bConstraintActuator {
+ short flag, damp;
+ float slow;
+ float minloc[3], maxloc[3];
+ float minrot[3], maxrot[3];
+} bConstraintActuator;
+
+typedef struct bGroupActuator {
+ short flag, type;
+ int sta, end;
+ char name[32]; /* property or groupkey */
+
+ short pad[3], cur, butsta, butend;/* not referenced, can remove? */
+ struct Group *group; /* only during game */
+
+} bGroupActuator;
+
+/* I added a few extra fields here, to facilitate conversions */
+typedef struct bRandomActuator {
+ int seed;
+ int distribution;
+ int int_arg_1;
+ int int_arg_2;
+ float float_arg_1;
+ float float_arg_2;
+ char propname[32];
+} bRandomActuator;
+
+typedef struct bMessageActuator {
+ /**
+ * Send to all objects with this propertyname. Empty to broadcast.
+ */
+ char toPropName[32];
+
+ /**
+ * (Possible future use) pointer to a single destination object.
+ */
+ struct Object *toObject;
+
+ /**
+ * Message Subject to send.
+ */
+ char subject[32];
+
+ /**
+ * bodyType is either 'User defined text' or PropName
+ */
+ short bodyType, pad1;
+ int pad2;
+
+ /**
+ * Either User Defined Text or our PropName to send value of
+ */
+ char body[32];
+} bMessageActuator;
+
+typedef struct bGameActuator {
+ short flag, type;
+ int sta, end;
+ char filename[64];
+ char loadaniname[64];
+} bGameActuator;
+
+typedef struct bVisibilityActuator {
+ /** bit 0: Is this object visible? */
+ int flag;
+} bVisibilityActuator;
+
+typedef struct bActuator {
+ struct bActuator *next, *prev, *mynew;
+ short type;
+ /**
+ * Tells what type of actuator data <data> holds.
+ */
+ short flag;
+ short otype, go;
+ char name[32];
+
+ /**
+ * Data must point to an object actuator type struct.
+ */
+ void *data;
+
+ /**
+ * For ipo's and props: to find out which object the actuator
+ * belongs to */
+ struct Object *ob;
+
+} bActuator;
+
+typedef struct FreeCamera {
+ float mass, accelleration;
+ float maxspeed, maxrotspeed, maxtiltspeed;
+ int flag;
+ float rotdamp, tiltdamp, speeddamp, pad;
+} FreeCamera;
+
+/* objectactuator->flag */
+#define ACT_FORCE_LOCAL 1
+#define ACT_TORQUE_LOCAL 2
+#define ACT_DLOC_LOCAL 4
+#define ACT_DROT_LOCAL 8
+#define ACT_LIN_VEL_LOCAL 16
+#define ACT_ANG_VEL_LOCAL 32
+//#define ACT_ADD_LIN_VEL_LOCAL 64
+#define ACT_ADD_LIN_VEL 64
+
+#define ACT_OBJECT_FORCE 0
+#define ACT_OBJECT_TORQUE 1
+#define ACT_OBJECT_DLOC 2
+#define ACT_OBJECT_DROT 3
+#define ACT_OBJECT_LINV 4
+#define ACT_OBJECT_ANGV 5
+
+/* actuator->type */
+#define ACT_OBJECT 0
+#define ACT_IPO 1
+#define ACT_LAMP 2
+#define ACT_CAMERA 3
+#define ACT_MATERIAL 4
+#define ACT_SOUND 5
+#define ACT_PROPERTY 6
+ /* these two obsolete since 2.02 */
+#define ACT_ADD_OBJECT 7
+#define ACT_END_OBJECT 8
+
+#define ACT_CONSTRAINT 9
+#define ACT_EDIT_OBJECT 10
+#define ACT_SCENE 11
+#define ACT_GROUP 12
+#define ACT_RANDOM 13
+#define ACT_MESSAGE 14
+#define ACT_ACTION 15 /* __ NLA */
+#define ACT_CD 16
+#define ACT_GAME 17
+#define ACT_VISIBILITY 18
+
+/* actuator flag */
+#define ACT_SHOW 1
+#define ACT_DEL 2
+#define ACT_NEW 4
+
+/* link codes */
+#define LINK_SENSOR 0
+#define LINK_CONTROLLER 1
+#define LINK_ACTUATOR 2
+
+/* keyboardsensor->type */
+#define SENS_ALL_KEYS 1
+
+/* actionactuator->type */
+#define ACT_ACTION_PLAY 0
+#define ACT_ACTION_PINGPONG 1
+#define ACT_ACTION_FLIPPER 2
+#define ACT_ACTION_LOOP_STOP 3
+#define ACT_ACTION_LOOP_END 4
+#define ACT_ACTION_KEY2KEY 5
+#define ACT_ACTION_FROM_PROP 6
+#define ACT_ACTION_MOTION 7
+
+/* ipoactuator->type */
+#define ACT_IPO_PLAY 0
+#define ACT_IPO_PINGPONG 1
+#define ACT_IPO_FLIPPER 2
+#define ACT_IPO_LOOP_STOP 3
+#define ACT_IPO_LOOP_END 4
+#define ACT_IPO_KEY2KEY 5
+#define ACT_IPO_FROM_PROP 6
+
+/* groupactuator->type */
+#define ACT_GROUP_PLAY 0
+#define ACT_GROUP_PINGPONG 1
+#define ACT_GROUP_FLIPPER 2
+#define ACT_GROUP_LOOP_STOP 3
+#define ACT_GROUP_LOOP_END 4
+#define ACT_GROUP_FROM_PROP 5
+#define ACT_GROUP_SET 6
+
+/* ipoactuator->flag */
+#define ACT_IPOFORCE (1 << 0)
+#define ACT_IPOEND (1 << 1)
+#define ACT_IPOFORCE_LOCAL (1 << 2)
+#define ACT_IPOCHILD (1 << 4)
+
+/* ipoactuator->flag for k2k */
+#define ACT_K2K_PREV 1
+#define ACT_K2K_CYCLIC 2
+#define ACT_K2K_PINGPONG 4
+#define ACT_K2K_HOLD 8
+
+/* property actuator->type */
+#define ACT_PROP_ASSIGN 0
+#define ACT_PROP_ADD 1
+#define ACT_PROP_COPY 2
+
+/* constraint flag */
+#define ACT_CONST_LOCX 1
+#define ACT_CONST_LOCY 2
+#define ACT_CONST_LOCZ 4
+#define ACT_CONST_ROTX 8
+#define ACT_CONST_ROTY 16
+#define ACT_CONST_ROTZ 32
+
+/* editObjectActuator->type */
+#define ACT_EDOB_ADD_OBJECT 0
+#define ACT_EDOB_END_OBJECT 1
+#define ACT_EDOB_REPLACE_MESH 2
+#define ACT_EDOB_TRACK_TO 3
+#define ACT_EDOB_MAKE_CHILD 4
+#define ACT_EDOB_END_CHILD 5
+
+/* editObjectActuator->flag */
+#define ACT_TRACK_3D 1
+
+/* SceneActuator->type */
+#define ACT_SCENE_RESTART 0
+#define ACT_SCENE_SET 1
+#define ACT_SCENE_CAMERA 2
+#define ACT_SCENE_ADD_FRONT 3
+#define ACT_SCENE_ADD_BACK 4
+#define ACT_SCENE_REMOVE 5
+#define ACT_SCENE_SUSPEND 6
+#define ACT_SCENE_RESUME 7
+
+
+/* randomAct->distribution */
+#define ACT_RANDOM_BOOL_CONST 0
+#define ACT_RANDOM_BOOL_UNIFORM 1
+#define ACT_RANDOM_BOOL_BERNOUILLI 2
+#define ACT_RANDOM_INT_CONST 3
+#define ACT_RANDOM_INT_UNIFORM 4
+#define ACT_RANDOM_INT_POISSON 5
+#define ACT_RANDOM_FLOAT_CONST 6
+#define ACT_RANDOM_FLOAT_UNIFORM 7
+#define ACT_RANDOM_FLOAT_NORMAL 8
+#define ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL 9
+
+/* SoundActuator->type */
+#define ACT_SND_PLAY_STOP_SOUND 0
+#define ACT_SND_PLAY_END_SOUND 1
+#define ACT_SND_LOOP_STOP_SOUND 2
+#define ACT_SND_LOOP_END_SOUND 3
+#define ACT_SND_LOOP_BIDIRECTIONAL_SOUND 4
+#define ACT_SND_LOOP_BIDIRECTIONAL_STOP_SOUND 5
+
+/* messageactuator->type */
+#define ACT_MESG_MESG 0
+#define ACT_MESG_PROP 1
+
+/* cdactuator->type */
+#define ACT_CD_PLAY_ALL 0
+#define ACT_CD_PLAY_TRACK 1
+#define ACT_CD_LOOP_TRACK 2
+#define ACT_CD_VOLUME 3
+#define ACT_CD_STOP 4
+#define ACT_CD_PAUSE 5
+#define ACT_CD_RESUME 6
+
+/* gameactuator->type */
+#define ACT_GAME_LOAD 0
+#define ACT_GAME_START 1
+#define ACT_GAME_RESTART 2
+#define ACT_GAME_QUIT 3
+
+/* visibilityact->flag */
+/* Set means the object will become invisible */
+#define ACT_VISIBILITY_INVISIBLE (1 << 0)
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
new file mode 100644
index 00000000000..9f64a31c90c
--- /dev/null
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -0,0 +1,154 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * Contributor(s): Full recode, Ton Roosendaal, Crete 2005
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_ARMATURE_TYPES_H
+#define DNA_ARMATURE_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+/* this system works on different transformation space levels;
+
+1) Bone Space; with each Bone having own (0,0,0) origin
+2) Armature Space; the rest position, in Object space, Bones Spaces are applied hierarchical
+3) Pose Space; the animation position, in Object space
+4) World Space; Object matrix applied to Pose or Armature space
+
+*/
+
+typedef struct Bone {
+ struct Bone *next, *prev; /* Next/prev elements within this list */
+ struct Bone *parent; /* Parent (ik parent if appropriate flag is set */
+ ListBase childbase; /* Children */
+ char name[32]; /* Name of the bone - must be unique within the armature */
+
+ float roll; /* roll is input for editmode, length calculated */
+ float head[3];
+ float tail[3]; /* head/tail and roll in Bone Space */
+ float bone_mat[3][3]; /* rotation derived from head/tail/roll */
+
+ int flag;
+
+ float arm_head[3];
+ float arm_tail[3]; /* head/tail and roll in Armature Space (rest pos) */
+ float arm_mat[4][4]; /* matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest pos*/
+
+ float dist, weight; /* dist, weight: for non-deformgroup deforms */
+ float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */
+ float ease1, ease2; /* length of bezier handles */
+ float rad_head, rad_tail; /* radius for head/tail sphere, defining deform as well, parent->rad_tip overrides rad_head*/
+
+ float size[3]; /* patch for upward compat, UNUSED! */
+ short layer;
+ short segments; /* for B-bones */
+}Bone;
+
+typedef struct bArmature {
+ ID id;
+ ListBase bonebase;
+ ListBase chainbase;
+ int flag;
+ int drawtype;
+ 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 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;
+
+/* 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
+
+/* armature->drawtype */
+#define ARM_OCTA 0
+#define ARM_LINE 1
+#define ARM_B_BONE 2
+#define ARM_ENVELOPE 3
+
+/* armature->deformflag */
+#define ARM_DEF_VGROUP 1
+#define ARM_DEF_ENVELOPE 2
+#define ARM_DEF_QUATERNION 4
+#define ARM_DEF_B_BONE_REST 8
+
+/* armature->pathflag */
+#define ARM_PATH_FNUMS 0x001
+#define ARM_PATH_KFRAS 0x002
+#define ARM_PATH_HEADS 0x004
+
+/* armature->ghosttype */
+#define ARM_GHOST_CUR 0
+#define ARM_GHOST_RANGE 1
+
+/* 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
+ /* set to prevent destruction of its unkeyframed pose (after transform) */
+#define BONE_UNKEYED 8192
+ /* set to prevent hinge child bones from influencing the transform center */
+#define BONE_HINGE_CHILD_TRANSFORM 16384
+
+#endif
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
new file mode 100644
index 00000000000..1c272105067
--- /dev/null
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -0,0 +1,91 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_BRUSH_TYPES_H
+#define DNA_BRUSH_TYPES_H
+
+#include "DNA_ID.h"
+
+#ifndef MAX_MTEX
+#define MAX_MTEX 10
+#endif
+
+struct MTex;
+struct Image;
+
+typedef struct BrushClone {
+ struct Image *image; /* image for clone tool */
+ float offset[2]; /* offset of clone image from canvas */
+ float alpha, pad; /* transparency for drawing of clone image */
+} BrushClone;
+
+typedef struct Brush {
+ ID id;
+
+ short flag, blend; /* general purpose flag, blend mode */
+ int size; /* brush diameter */
+ float innerradius; /* inner radius after which the falloff starts */
+ float spacing; /* spacing of paint operations */
+ float rate; /* paint operations / second (airbrush) */
+
+ float rgb[3]; /* color */
+ float alpha; /* opacity */
+
+ short texact, pad;
+ struct MTex *mtex[10];
+
+ struct BrushClone clone;
+} Brush;
+
+/* Brush.flag */
+#define BRUSH_AIRBRUSH 1
+#define BRUSH_TORUS 2
+#define BRUSH_ALPHA_PRESSURE 4
+#define BRUSH_SIZE_PRESSURE 8
+#define BRUSH_RAD_PRESSURE 16
+#define BRUSH_SPACING_PRESSURE 32
+#define BRUSH_FIXED_TEX 64
+
+/* Brush.blend */
+#define BRUSH_BLEND_MIX 0
+#define BRUSH_BLEND_ADD 1
+#define BRUSH_BLEND_SUB 2
+#define BRUSH_BLEND_MUL 3
+#define BRUSH_BLEND_LIGHTEN 4
+#define BRUSH_BLEND_DARKEN 5
+#define BRUSH_BLEND_ERASE_ALPHA 6
+#define BRUSH_BLEND_ADD_ALPHA 7
+
+#define PAINT_TOOL_DRAW 0
+#define PAINT_TOOL_SOFTEN 1
+#define PAINT_TOOL_SMEAR 2
+#define PAINT_TOOL_CLONE 3
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
new file mode 100644
index 00000000000..4cb8ec25ebc
--- /dev/null
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -0,0 +1,91 @@
+/**
+ * blenlib/DNA_camera_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CAMERA_TYPES_H
+#define DNA_CAMERA_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Ipo;
+struct Object;
+
+typedef struct Camera {
+ ID id;
+
+ short type, flag;
+ float passepartalpha, angle;
+ float clipsta, clipend;
+ float lens, ortho_scale, drawsize;
+ float shiftx, shifty;
+
+ /* yafray: dof params */
+ /* qdn: yafray var 'YF_dofdist' now enabled for defocus composit node as well.
+ The name was not changed so that no other files need to be modified */
+ float YF_dofdist, YF_aperture;
+ short YF_bkhtype, YF_bkhbias;
+ float YF_bkhrot;
+
+ struct Ipo *ipo;
+
+ ScriptLink scriptlink;
+ struct Object *dof_ob;
+} Camera;
+
+/* **************** CAMERA ********************* */
+
+/* type */
+#define CAM_PERSP 0
+#define CAM_ORTHO 1
+
+/* flag */
+#define CAM_SHOWLIMITS 1
+#define CAM_SHOWMIST 2
+#define CAM_SHOWPASSEPARTOUT 4
+#define CAM_SHOWTITLESAFE 8
+#define CAM_SHOWNAME 16
+#define CAM_ANGLETOGGLE 32
+
+/* yafray: dof sampling switch */
+#define CAM_YF_NO_QMC 512
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
new file mode 100644
index 00000000000..a4224976f5f
--- /dev/null
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -0,0 +1,81 @@
+/**
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_COLOR_TYPES_H
+#define DNA_COLOR_TYPES_H
+
+#include "DNA_vec_types.h"
+
+/* general defines for kernel functions */
+#define CM_RESOL 32
+#define CM_TABLE 256
+#define CM_TABLEDIV (1.0f/256.0f)
+
+#define CM_TOT 4
+
+typedef struct CurveMapPoint {
+ float x, y;
+ short flag, shorty; /* shorty for result lookup */
+} CurveMapPoint;
+
+/* curvepoint->flag */
+#define CUMA_SELECT 1
+#define CUMA_VECTOR 2
+
+typedef struct CurveMap {
+ short totpoint, flag;
+
+ float range; /* quick multiply value for reading table */
+ float mintable, maxtable; /* the x-axis range for the table */
+ float ext_in[2], ext_out[2]; /* for extrapolated curves, the direction vector */
+ CurveMapPoint *curve; /* actual curve */
+ CurveMapPoint *table; /* display and evaluate table */
+ CurveMapPoint *premultable; /* for RGB curves, premulled table */
+} CurveMap;
+
+/* cuma->flag */
+#define CUMA_EXTEND_EXTRAPOLATE 1
+
+typedef struct CurveMapping {
+ int flag, cur; /* cur; for buttons, to show active curve */
+
+ rctf curr, clipr; /* current rect, clip rect (is default rect too) */
+
+ 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 */
+} CurveMapping;
+
+/* cumapping->flag */
+#define CUMA_DO_CLIP 1
+#define CUMA_PREMULLED 2
+#define CUMA_DRAW_CFRA 4
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
new file mode 100644
index 00000000000..431ef56e1c4
--- /dev/null
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -0,0 +1,493 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): 2007, Joshua Leung, major recode
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ * Constraint DNA data
+ */
+
+#ifndef DNA_CONSTRAINT_TYPES_H
+#define DNA_CONSTRAINT_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_ipo_types.h"
+#include "DNA_listBase.h"
+#include "DNA_object_types.h"
+
+struct Action;
+struct Text;
+
+/* channels reside in Object or Action (ListBase) constraintChannels */
+typedef struct bConstraintChannel {
+ struct bConstraintChannel *next, *prev;
+ Ipo *ipo;
+ short flag;
+ char name[30];
+} bConstraintChannel;
+
+/* A Constraint */
+typedef struct bConstraint {
+ struct bConstraint *next, *prev;
+
+ void *data; /* Constraint data (a valid constraint type) */
+ short type; /* Constraint type */
+ 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) */
+} bConstraint;
+
+
+/* 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;
+
+/* Single-target subobject constraints --------------------- */
+/* 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 */
+ 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 */
+} bKinematicConstraint;
+
+/* 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;
+ int flags;
+ int pad;
+ char subtarget[32];
+} bTrackToConstraint;
+
+/* Copy Rotation Constraint */
+typedef struct bRotateLikeConstraint {
+ Object *tar;
+ int flag;
+ int reserved1;
+ char subtarget[32];
+} bRotateLikeConstraint;
+
+/* Copy Location Constraint */
+typedef struct bLocateLikeConstraint {
+ Object *tar;
+ int flag;
+ int reserved1;
+ char subtarget[32];
+} bLocateLikeConstraint;
+
+/* Floor Constraint */
+typedef struct bMinMaxConstraint {
+ Object *tar;
+ int minmaxflag;
+ float offset;
+ int flag;
+ short sticky, stuck, pad1, pad2; /* for backward compatability */
+ float cache[3];
+ char subtarget[32];
+} bMinMaxConstraint;
+
+/* Copy Scale Constraint */
+typedef struct bSizeLikeConstraint {
+ Object *tar;
+ int flag;
+ int reserved1;
+ char subtarget[32];
+} bSizeLikeConstraint;
+
+/* Action Constraint */
+typedef struct bActionConstraint {
+ Object *tar;
+ 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;
+ struct bAction *act;
+ char subtarget[32];
+} bActionConstraint;
+
+/* Locked Axis Tracking constraint */
+typedef struct bLockTrackConstraint {
+ Object *tar;
+ int trackflag;
+ int lockflag;
+ char subtarget[32];
+} bLockTrackConstraint;
+
+/* Follow Path constraints */
+typedef struct bFollowPathConstraint {
+ Object *tar; /* Must be path object */
+ float offset; /* Offset in time on the path (in frame) */
+ int followflag;
+ int trackflag;
+ int upflag;
+} bFollowPathConstraint;
+
+/* Stretch to constraint */
+typedef struct bStretchToConstraint {
+ Object *tar;
+ int volmode;
+ int plane;
+ float orglength;
+ float bulge;
+ char subtarget[32];
+} bStretchToConstraint;
+
+/* Rigid Body constraint */
+typedef struct bRigidBodyJointConstraint {
+ Object *tar;
+ Object *child;
+ int type;
+ float pivX;
+ float pivY;
+ float pivZ;
+ float axX;
+ float axY;
+ float axZ;
+ float minLimit[6];
+ float maxLimit[6];
+ float extraFz;
+ short flag;
+ short pad;
+ short pad1;
+ short pad2;
+} bRigidBodyJointConstraint;
+
+/* 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 flag2; /* for legacy reasons, this is flag2. used for any extra settings */
+} bClampToConstraint;
+
+/* 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 pad1;
+} bRotLimitConstraint;
+
+/* Limit Scaling Constraint */
+typedef struct bSizeLimitConstraint {
+ float xmin, xmax;
+ float ymin, ymax;
+ float zmin, zmax;
+ short flag;
+ short pad1;
+} bSizeLimitConstraint;
+
+/* ------------------------------------------ */
+
+/* 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_DISTANCELIMIT, /* was never properly coded - removed! */
+ 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 */
+ CONSTRAINT_EXPAND = (1<<0),
+ /* pre-check for illegal object name or bone name */
+ 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)
+} 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 */
+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
+ * (that is, same effect, different name). It simplifies the Python API access a lot.
+ */
+
+/* bRotateLikeConstraint.flag */
+#define ROTLIKE_X 0x01
+#define ROTLIKE_Y 0x02
+#define ROTLIKE_Z 0x04
+#define ROTLIKE_X_INVERT 0x10
+#define ROTLIKE_Y_INVERT 0x20
+#define ROTLIKE_Z_INVERT 0x40
+#define ROTLIKE_OFFSET 0x80
+
+/* bLocateLikeConstraint.flag */
+#define LOCLIKE_X 0x01
+#define LOCLIKE_Y 0x02
+#define LOCLIKE_Z 0x04
+#define LOCLIKE_TIP 0x08
+#define LOCLIKE_X_INVERT 0x10
+#define LOCLIKE_Y_INVERT 0x20
+#define LOCLIKE_Z_INVERT 0x40
+#define LOCLIKE_OFFSET 0x80
+
+/* bSizeLikeConstraint.flag */
+#define SIZELIKE_X 0x01
+#define SIZELIKE_Y 0x02
+#define SIZELIKE_Z 0x04
+#define SIZELIKE_OFFSET 0x80
+
+/* Axis flags */
+#define LOCK_X 0x00
+#define LOCK_Y 0x01
+#define LOCK_Z 0x02
+
+#define UP_X 0x00
+#define UP_Y 0x01
+#define UP_Z 0x02
+
+#define TRACK_X 0x00
+#define TRACK_Y 0x01
+#define TRACK_Z 0x02
+#define TRACK_nX 0x03
+#define TRACK_nY 0x04
+#define TRACK_nZ 0x05
+
+/* bTrackToConstraint->flags */
+#define TARGET_Z_UP 0x01
+
+#define VOLUME_XZ 0x00
+#define VOLUME_X 0x01
+#define VOLUME_Z 0x02
+#define NO_VOLUME 0x03
+
+#define PLANE_X 0x00
+#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
+#define CONSTRAINT_IK_AUTO 4
+#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
+#define MINMAX_STUCK 0x02
+#define MINMAX_USEROT 0x04
+
+/* transform limiting constraints -> flag */
+#define LIMIT_XMIN 0x01
+#define LIMIT_XMAX 0x02
+#define LIMIT_YMIN 0x04
+#define LIMIT_YMAX 0x08
+#define LIMIT_ZMIN 0x10
+#define LIMIT_ZMAX 0x20
+
+#define LIMIT_XROT 0x01
+#define LIMIT_YROT 0x02
+#define LIMIT_ZROT 0x04
+
+/* not used anymore - for older Limit Location constraints only */
+#define LIMIT_NOPARENT 0x01
+
+/* 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
+
+#endif
diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h
new file mode 100644
index 00000000000..b8bffd68db8
--- /dev/null
+++ b/source/blender/makesdna/DNA_controller_types.h
@@ -0,0 +1,79 @@
+/**
+ * blenlib/DNA_controller_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CONTROLLER_TYPES_H
+#define DNA_CONTROLLER_TYPES_H
+
+struct bActuator;
+struct Text;
+struct bSensor;
+
+/* ****************** CONTROLLERS ********************* */
+
+typedef struct bExpressionCont {
+ char str[128];
+} bExpressionCont;
+
+typedef struct bPythonCont {
+ struct Text *text;
+} bPythonCont;
+
+typedef struct bController {
+ struct bController *next, *prev, *mynew;
+ short type, flag, inputs, totlinks;
+ short otype, totslinks, pad2, pad3;
+
+ char name[32];
+ void *data;
+
+ struct bActuator **links;
+
+ struct bSensor **slinks;
+ short val, valo;
+ int pad5;
+
+} bController;
+
+/* controller->type */
+#define CONT_LOGIC_AND 0
+#define CONT_LOGIC_OR 1
+#define CONT_EXPRESSION 2
+#define CONT_PYTHON 3
+
+/* controller->flag */
+#define CONT_SHOW 1
+#define CONT_DEL 2
+#define CONT_NEW 4
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
new file mode 100644
index 00000000000..807fc2add07
--- /dev/null
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -0,0 +1,290 @@
+/**
+ * blenlib/DNA_curve_types.h (mar-2001 nzc)
+ *
+ * Curve stuff.
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CURVE_TYPES_H
+#define DNA_CURVE_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+#include "DNA_ID.h"
+
+#define MAXTEXTBOX 256 /* used in readfile.c and editfont.c */
+
+struct BoundBox;
+struct Object;
+struct Ipo;
+struct Key;
+struct Material;
+struct VFont;
+
+/* These two Lines with # tell makesdna this struct can be excluded. */
+#
+#
+typedef struct Path {
+ int len;
+ float *data;
+ float totdist;
+} Path;
+
+/* These two Lines with # tell makesdna this struct can be excluded. */
+#
+#
+typedef struct BevList {
+ struct BevList *next, *prev;
+ int nr, flag;
+ short poly, gat;
+} BevList;
+
+/* These two Lines with # tell makesdna this struct can be excluded. */
+#
+#
+typedef struct BevPoint {
+ float x, y, z, alfa, sina, cosa, mat[3][3];
+ short f1, f2;
+} BevPoint;
+
+/* 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
+ vec[0][2]=z location of handle 1 (not used for IpoCurve Points(2d))
+ vec[1][0]=x location of control point
+ vec[1][1]=y location of control point
+ vec[1][2]=z location of control point
+ vec[2][0]=x location of handle 2
+ vec[2][1]=y location of handle 2
+ vec[2][2]=z location of handle 2 (not used for IpoCurve Points(2d))
+*/
+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; /* 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; /* f1: selection status, hide: is point hidden or not */
+ float radius, pad; /* user-set radius per point for bevelling etc */
+} BPoint;
+
+typedef struct Nurb {
+ struct Nurb *next, *prev; /* multiple nurbs per curve object are allowed */
+ short type;
+ short mat_nr; /* index into material list */
+ short hide, flag;
+ short pntsu, pntsv; /* number of points in the U or V directions */
+ short resolu, resolv; /* tesselation resolution in the U or V directions */
+ short orderu, orderv;
+ short flagu, flagv;
+
+ float *knotsu, *knotsv;
+ BPoint *bp;
+ BezTriple *bezt;
+
+ short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */
+ short pad;
+
+ int charidx;
+} Nurb;
+
+typedef struct CharInfo {
+ short kern;
+ short mat_nr;
+ char flag;
+ char pad;
+ short pad2;
+} CharInfo;
+
+typedef struct TextBox {
+ float x, y, w, h;
+} TextBox;
+
+typedef struct Curve {
+ ID id;
+
+ struct BoundBox *bb;
+
+ ListBase nurb;
+ ListBase disp;
+ struct Object *bevobj, *taperobj, *textoncurve;
+ struct Ipo *ipo;
+ Path *path;
+ struct Key *key;
+ struct Material **mat;
+
+ ListBase bev;
+
+ /* texture space, copied as one block in editobject.c */
+ float loc[3];
+ float size[3];
+ float rot[3];
+
+ int texflag;
+
+ short pathlen, totcol;
+ short flag, bevresol;
+ float width, ext1, ext2;
+
+ /* default */
+ short resolu, resolv;
+ short resolu_ren, resolv_ren;
+ int pad2;
+
+ /* font part */
+ short len, lines, pos, spacemode;
+ float spacing, linedist, shear, fsize, wordspace, ulpos, ulheight;
+ float xof, yof;
+ float linewidth;
+
+ char *str;
+ char family[24];
+ struct VFont *vfont;
+ struct VFont *vfontb;
+ struct VFont *vfonti;
+ struct VFont *vfontbi;
+
+ int sepchar;
+
+ int totbox, actbox, pad;
+ struct TextBox *tb;
+
+ int selstart, selend;
+
+ struct CharInfo *strinfo;
+ struct CharInfo curinfo;
+} Curve;
+
+typedef struct IpoDriver {
+ struct Object *ob;
+ short blocktype, adrcode, type, flag;
+ char name[128]; /* bone or constraint(?), or python expression here */
+} IpoDriver;
+
+/* temp? we store more bone names in 1 driver... */
+#define DRIVER_NAME_OFFS 32
+
+typedef struct IpoCurve {
+ struct IpoCurve *next, *prev;
+
+ struct BPoint *bp; /* are these even used anywhere? */
+ struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple)*totvert. i.e. keyframes */
+
+ rctf maxrct, totrct; /* bounding boxes */
+
+ short blocktype, adrcode, vartype; /* blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data */
+ short totvert; /* total number of BezTriples (i.e. keyframes) on curve */
+ short ipo, extrap; /* interpolation and extrapolation modes */
+ short flag, rt; /* flag= settings; rt= ??? */
+ float ymin, ymax; /* minimum/maximum y-extents for curve */
+ unsigned int bitmask; /* ??? */
+
+ float slide_min, slide_max; /* minimum/maximum values for sliders (in action editor) */
+ float curval; /* value of ipo-curve for current frame */
+
+ IpoDriver *driver; /* pointer to ipo-driver for this curve */
+
+} IpoCurve;
+
+/* **************** CURVE ********************* */
+
+/* texflag */
+#define CU_AUTOSPACE 1
+
+/* flag */
+#define CU_3D 1
+#define CU_FRONT 2
+#define CU_BACK 4
+#define CU_PATH 8
+#define CU_FOLLOW 16
+#define CU_UV_ORCO 32
+#define CU_NOPUNOFLIP 64
+#define CU_STRETCH 128
+#define CU_OFFS_PATHDIST 256
+#define CU_FAST 512 /* Font: no filling inside editmode */
+#define CU_RETOPO 1024
+
+/* spacemode */
+#define CU_LEFT 0
+#define CU_MIDDLE 1
+#define CU_RIGHT 2
+#define CU_JUSTIFY 3
+#define CU_FLUSH 4
+
+/* flag (nurb) */
+#define CU_SMOOTH 1
+
+/* type (nurb) */
+#define CU_POLY 0
+#define CU_BEZIER 1
+#define CU_BSPLINE 2
+#define CU_CARDINAL 3
+#define CU_NURBS 4
+#define CU_2D 8
+
+/* flagu flagv (nurb) */
+#define CU_CYCLIC 1
+
+/* h1 h2 (beztriple) */
+#define HD_FREE 0
+#define HD_AUTO 1
+#define HD_VECT 2
+#define HD_ALIGN 3
+#define HD_AUTO_ANIM 4
+
+/* *************** CHARINFO **************** */
+
+/* flag */
+#define CU_STYLE (1+2)
+#define CU_BOLD 1
+#define CU_ITALIC 2
+#define CU_UNDERLINE 4
+#define CU_WRAP 8 /* wordwrap occured here */
+
+/* *************** driver ****************** */
+
+/* driver->type */
+#define IPO_DRIVER_TYPE_NORMAL 0
+#define IPO_DRIVER_TYPE_PYTHON 1
+
+/* driver->flag */
+/* invalid flag: currently only used for buggy pydriver expressions: */
+#define IPO_DRIVER_FLAG_INVALID 1
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
new file mode 100644
index 00000000000..1c1676ba277
--- /dev/null
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -0,0 +1,102 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CUSTOMDATA_TYPES_H
+#define DNA_CUSTOMDATA_TYPES_H
+
+/* descriptor and storage for a custom data layer */
+typedef struct CustomDataLayer {
+ int type; /* type of data in layer */
+ int offset; /* in editmode, offset of layer in block */
+ int flag; /* general purpose flag */
+ int active; /* number of the active layer of this type */
+ int active_rnd; /* number of the layer to render*/
+ char pad[4];
+ char name[32]; /* layer name */
+ void *data; /* layer data */
+} CustomDataLayer;
+
+/* structure which stores custom element data associated with mesh elements
+ * (vertices, edges or faces). The custom data is organised into a series of
+ * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */
+typedef struct CustomData {
+ CustomDataLayer *layers; /* CustomDataLayers, ordered by type */
+ int totlayer, maxlayer; /* number of layers, size of layers array */
+ int totsize, pad; /* in editmode, total size of all data layers */
+} CustomData;
+
+/* CustomData.type */
+#define CD_MVERT 0
+#define CD_MSTICKY 1
+#define CD_MDEFORMVERT 2
+#define CD_MEDGE 3
+#define CD_MFACE 4
+#define CD_MTFACE 5
+#define CD_MCOL 6
+#define CD_ORIGINDEX 7
+#define CD_NORMAL 8
+#define CD_FLAGS 9
+#define CD_PROP_FLT 10
+#define CD_PROP_INT 11
+#define CD_PROP_STR 12
+#define CD_NUMTYPES 13
+
+/* Bits for CustomDataMask */
+#define CD_MASK_MVERT (1 << CD_MVERT)
+#define CD_MASK_MSTICKY (1 << CD_MSTICKY)
+#define CD_MASK_MDEFORMVERT (1 << CD_MDEFORMVERT)
+#define CD_MASK_MEDGE (1 << CD_MEDGE)
+#define CD_MASK_MFACE (1 << CD_MFACE)
+#define CD_MASK_MTFACE (1 << CD_MTFACE)
+#define CD_MASK_MCOL (1 << CD_MCOL)
+#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)
+
+
+/* CustomData.flag */
+
+/* indicates layer should not be copied by CustomData_from_template or
+ * CustomData_copy_data */
+#define CD_FLAG_NOCOPY (1<<0)
+/* indicates layer should not be freed (for layers backed by external data) */
+#define CD_FLAG_NOFREE (1<<1)
+/* indicates the layer is only temporary, also implies no copy */
+#define CD_FLAG_TEMPORARY ((1<<2)|CD_FLAG_NOCOPY)
+
+/* Limits */
+#define MAX_MTFACE 8
+#define MAX_MCOL 8
+
+#endif
diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h
new file mode 100644
index 00000000000..45b58f17750
--- /dev/null
+++ b/source/blender/makesdna/DNA_documentation.h
@@ -0,0 +1,79 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * @mainpage DNA- Makesdna modules
+ *
+ * @section about About the DNA module
+ *
+ * The DNA module holds all type definitions that are serialized in a
+ * blender file. There is an executable that scans all files, looking
+ * for struct-s to serialize (hence sdna: Struct DNA). From this
+ * information, it builds a file with numbers that encode the format,
+ * the names of variables, and the plce to look for them.
+ *
+ * @section issues Known issues with DNA
+ *
+ * - Function pointers:
+ *
+ * Because of historical reasons, some function pointers were
+ * untyped. The parser/dna generator has been modified to explicitly
+ * handle these special cases. Most pointers have been given proper
+ * proto's by now. DNA_space_types.h::Spacefile::returnfuncmay still
+ * be badly defined. The reason for this is that is is called with
+ * different types of arguments. It takes a char* at this moment...
+ *
+ * - Path to the header files
+ *
+ * Also because of historical reasons, there is a path prefix to the
+ * headers that need to be scanned. This is the BASE_HEADER
+ * define. If you change the file-layout for DNA, you will probably
+ * have to change this (Not very flexible, but it is hardly ever
+ * changed. Sorry.).
+ *
+ * @section dependencies Dependencies
+ *
+ * DNA has no external dependencies (except for a few system
+ * includes).
+ *
+ **/
+
+
+/* PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN
+
+ ../blenloader/intern/genfile.c
+ (ton)
+
+ */
+
+
+
+/* This file has intentionally no definitions or implementation. */
+
diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h
new file mode 100644
index 00000000000..4d910861acd
--- /dev/null
+++ b/source/blender/makesdna/DNA_effect_types.h
@@ -0,0 +1,144 @@
+/**
+ * blenlib/DNA_effect_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_EFFECT_TYPES_H
+#define DNA_EFFECT_TYPES_H
+
+/* don't forget, new effects also in writefile.c for dna!!! */
+
+#define PAF_MAXMULT 4
+
+/* paf->flag (keep bit 0 free for compatibility) */
+#define PAF_BSPLINE 2
+#define PAF_STATIC 4
+#define PAF_FACE 8
+#define PAF_ANIMATED 16
+ /* show particles before they're emitted*/
+#define PAF_UNBORN 32
+ /* emit only from faces*/
+#define PAF_OFACE 64
+ /* show emitter (don't hide actual mesh)*/
+#define PAF_SHOWE 128
+ /* true random emit from faces (not just ordered jitter)*/
+#define PAF_TRAND 256
+ /* even distribution in face emission based on face areas*/
+#define PAF_EDISTR 512
+ /*show particles after they've died*/
+#define PAF_DIED 2048
+
+
+/*paf->flag2 for pos/neg paf->flag2neg*/
+#define PAF_TEXTIME 1 /*texture timing*/
+
+ /* eff->type */
+#define EFF_BUILD 0
+#define EFF_PARTICLE 1
+#define EFF_WAVE 2
+
+ /* eff->flag */
+#define EFF_SELECT 1
+
+ /* paf->stype */
+#define PAF_NORMAL 0
+#define PAF_VECT 1
+
+ /* paf->texmap */
+#define PAF_TEXINT 0
+#define PAF_TEXRGB 1
+#define PAF_TEXGRAD 2
+
+typedef struct Effect {
+ struct Effect *next, *prev;
+ short type, flag, buttype, rt;
+
+} Effect;
+
+typedef struct BuildEff {
+ struct BuildEff *next, *prev;
+ short type, flag, buttype, rt;
+
+ float len, sfra;
+
+} BuildEff;
+
+#
+#
+typedef struct Particle {
+ float co[3], no[3];
+ float time, lifetime;
+ short mat_nr, rt;
+} Particle;
+
+struct Group;
+
+typedef struct PartEff {
+ struct PartEff *next, *prev;
+ short type, flag, buttype, stype, vertgroup, userjit;
+
+ float sta, end, lifetime;
+ int totpart, totkey, seed;
+
+ float normfac, obfac, randfac, texfac, randlife;
+ float force[3];
+ float damp;
+
+ float nabla, vectsize, maxlen, pad, defvec[3];
+
+ float mult[4], life[4];
+ short child[4], mat[4];
+ short texmap, curmult;
+ short staticstep, omat, timetex, speedtex, flag2, flag2neg;
+ short disp, vertgroup_v;
+
+ char vgroupname[32], vgroupname_v[32];
+ float imat[4][4]; /* inverse matrix of parent Object */
+
+ Particle *keys;
+ struct Group *group;
+
+} PartEff;
+
+
+typedef struct WaveEff {
+ struct WaveEff *next, *prev;
+ short type, flag, buttype, stype;
+
+ float startx, starty, height, width;
+ float narrow, speed, minfac, damp;
+
+ float timeoffs, lifetime;
+
+} WaveEff;
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
new file mode 100644
index 00000000000..1aecf4da017
--- /dev/null
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -0,0 +1,60 @@
+/**
+ * blenlib/DNA_fileglobal_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_FILEGLOBAL_TYPES_H
+#define DNA_FILEGLOBAL_TYPES_H
+
+/**
+ * FileGlobal stores a part of the current user-unterface settings at
+ * the moment of saving, and the file-specific settings.
+ */
+typedef struct FileGlobal {
+ char subvstr[4]; /* needs to be here, for human fileformat recognition */
+ short subversion, pads;
+ short minversion, minsubversion;
+ short displaymode, winpos;
+ void *curscreen;
+ void *curscene;
+ int fileflags;
+ int globalf;
+} FileGlobal;
+
+
+/* minversion: in file, the oldest past blender version you can use compliant */
+/* example: if in 2.43 the meshes lose mesh data, minversion is 2.43 then too */
+/* or: in 2.42, subversion 1, same as above, minversion then is 2.42, min subversion 1 */
+/* (defines for version are in the BKE_blender.h file, for historic reasons) */
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
new file mode 100644
index 00000000000..3a074dd63bc
--- /dev/null
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -0,0 +1,65 @@
+/**
+ * blenlib/DNA_group_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_GROUP_TYPES_H
+#define DNA_GROUP_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct Object;
+
+typedef struct GroupObject {
+ struct GroupObject *next, *prev;
+ struct Object *ob;
+ void *lampren; /* used while render */
+ int recalc; /* copy of ob->recalc, used to set animated groups OK */
+ int pad;
+} GroupObject;
+
+
+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;
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
new file mode 100644
index 00000000000..8a5a7ce4a4c
--- /dev/null
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -0,0 +1,124 @@
+/**
+ * blenlib/DNA_image_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_IMAGE_TYPES_H
+#define DNA_IMAGE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct PackedFile;
+struct anim;
+struct ImBuf;
+struct RenderResult;
+
+
+/* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */
+/* should be used in conjunction with an ID * to Image. */
+typedef struct ImageUser {
+ int framenr; /* movies, sequences: current to display */
+ int frames; /* total amount of frames to use */
+ int offset, sfra; /* offset within movie, start frame in global time */
+ short fie_ima, cycl; /* fields/image in movie, cyclic flag */
+ short flag, ok;
+
+ short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */
+ short menunr; /* localized menu entry, for handling browse event */
+} ImageUser;
+
+/* iuser->flag */
+#define IMA_ANIM_ALWAYS 1
+#define IMA_ANIM_REFRESHED 2
+
+typedef struct Image {
+ ID id;
+
+ char name[240]; /* file path */
+
+ ListBase ibufs; /* not written in file */
+
+ /* sources from: */
+ struct anim *anim;
+ struct RenderResult *rr;
+
+ short ok, flag;
+ short source, type, pad, pad1;
+ int lastframe;
+
+ /* texture page */
+ short tpageflag, totbind;
+ short xrep, yrep;
+ short twsta, twend;
+ unsigned int bindcode; /* only for current image... */
+ unsigned int *repbind; /* for repeat of parts of images */
+
+ struct PackedFile * packedfile;
+ struct PreviewImage * preview;
+
+ float lastupdate;
+ int lastused;
+ short animspeed;
+
+ 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*/
+} Image;
+
+
+/* **************** IMAGE ********************* */
+
+/* flag */
+#define IMA_FIELDS 1
+#define IMA_STD_FIELD 2
+
+#define IMA_REFLECT 16
+#define IMA_NOCOLLECT 32
+#define IMA_ANTIALI 64
+
+
+/* tpageflag */
+#define IMA_TILES 1
+#define IMA_TWINANIM 2
+#define IMA_COLCYCLE 4 /* Depreciated */
+#define IMA_MIPMAP_COMPLETE 8 /* all mipmap levels in OpenGL texture set? */
+#define IMA_CLAMP_U 16
+#define IMA_CLAMP_V 32
+
+/* ima->type and ima->source moved to BKE_image.h, for API */
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
new file mode 100644
index 00000000000..1fca73b576c
--- /dev/null
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -0,0 +1,401 @@
+/**
+ * blenlib/DNA_ipo_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_IPO_TYPES_H
+#define DNA_IPO_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+
+#include "DNA_ID.h"
+
+/* IPO Data-Block */
+typedef struct Ipo {
+ ID id;
+
+ 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;
+
+/* 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? */
+
+#define IPOBUTY 17
+
+#define TOB_IPO 1
+#define TOB_IPODROT 2
+
+/* disptype */
+#define IPO_DISPDEGR 1
+#define IPO_DISPBITS 2
+#define IPO_DISPTIME 3
+
+/* ******************** */
+
+#define OB_TOTIPO 29
+#define OB_TOTNAM 29
+
+#define OB_LOC_X 1
+#define OB_LOC_Y 2
+#define OB_LOC_Z 3
+#define OB_DLOC_X 4
+#define OB_DLOC_Y 5
+#define OB_DLOC_Z 6
+
+#define OB_ROT_X 7
+#define OB_ROT_Y 8
+#define OB_ROT_Z 9
+#define OB_DROT_X 10
+#define OB_DROT_Y 11
+#define OB_DROT_Z 12
+
+#define OB_SIZE_X 13
+#define OB_SIZE_Y 14
+#define OB_SIZE_Z 15
+#define OB_DSIZE_X 16
+#define OB_DSIZE_Y 17
+#define OB_DSIZE_Z 18
+
+#define OB_LAY 19
+
+#define OB_TIME 20
+
+#define OB_COL_R 21
+#define OB_COL_G 22
+#define OB_COL_B 23
+#define OB_COL_A 24
+
+#define OB_PD_FSTR 25
+#define OB_PD_FFALL 26
+#define OB_PD_SDAMP 27
+#define OB_PD_RDAMP 28
+#define OB_PD_PERM 29
+
+/* exception: driver channel, for bone driver only */
+#define OB_ROT_DIFF 100
+
+
+/* ******************** */
+
+#define MA_TOTIPO 40
+#define MA_TOTNAM 26
+
+#define MA_COL_R 1
+#define MA_COL_G 2
+#define MA_COL_B 3
+#define MA_SPEC_R 4
+#define MA_SPEC_G 5
+#define MA_SPEC_B 6
+#define MA_MIR_R 7
+#define MA_MIR_G 8
+#define MA_MIR_B 9
+#define MA_REF 10
+#define MA_ALPHA 11
+#define MA_EMIT 12
+#define MA_AMB 13
+#define MA_SPEC 14
+#define MA_HARD 15
+#define MA_SPTR 16
+#define MA_IOR 17
+#define MA_MODE 18
+#define MA_HASIZE 19
+#define MA_TRANSLU 20
+#define MA_RAYM 21
+#define MA_FRESMIR 22
+#define MA_FRESMIRI 23
+#define MA_FRESTRA 24
+#define MA_FRESTRAI 25
+#define MA_ADD 26
+
+#define MA_MAP1 0x20
+#define MA_MAP2 0x40
+#define MA_MAP3 0x80
+#define MA_MAP4 0x100
+#define MA_MAP5 0x200
+#define MA_MAP6 0x400
+#define MA_MAP7 0x800
+#define MA_MAP8 0x1000
+#define MA_MAP9 0x2000
+#define MA_MAP10 0x4000
+
+#define TEX_TOTNAM 14
+
+#define MAP_OFS_X 1
+#define MAP_OFS_Y 2
+#define MAP_OFS_Z 3
+#define MAP_SIZE_X 4
+#define MAP_SIZE_Y 5
+#define MAP_SIZE_Z 6
+#define MAP_R 7
+#define MAP_G 8
+#define MAP_B 9
+
+#define MAP_DVAR 10
+#define MAP_COLF 11
+#define MAP_NORF 12
+#define MAP_VARF 13
+#define MAP_DISP 14
+
+/* ******************** */
+
+#define TE_TOTIPO 26
+#define TE_TOTNAM 26
+
+#define TE_NSIZE 1
+#define TE_NDEPTH 2
+#define TE_NTYPE 3
+#define TE_TURB 4
+
+#define TE_VNW1 5
+#define TE_VNW2 6
+#define TE_VNW3 7
+#define TE_VNW4 8
+#define TE_VNMEXP 9
+#define TE_VN_DISTM 10
+#define TE_VN_COLT 11
+
+#define TE_ISCA 12
+#define TE_DISTA 13
+
+#define TE_MG_TYP 14
+#define TE_MGH 15
+#define TE_MG_LAC 16
+#define TE_MG_OCT 17
+#define TE_MG_OFF 18
+#define TE_MG_GAIN 19
+
+#define TE_N_BAS1 20
+#define TE_N_BAS2 21
+
+#define TE_COL_R 22
+#define TE_COL_G 23
+#define TE_COL_B 24
+#define TE_BRIGHT 25
+#define TE_CONTRA 26
+
+/* ******************** */
+
+#define SEQ_TOTIPO 1
+#define SEQ_TOTNAM 1
+
+#define SEQ_FAC1 1
+
+/* ******************** */
+
+#define CU_TOTIPO 1
+#define CU_TOTNAM 1
+
+#define CU_SPEED 1
+
+/* ******************** */
+
+#define KEY_TOTIPO 64
+#define KEY_TOTNAM 64
+
+#define KEY_SPEED 0
+#define KEY_NR 1
+
+/* ******************** */
+
+#define WO_TOTIPO 29
+#define WO_TOTNAM 16
+
+#define WO_HOR_R 1
+#define WO_HOR_G 2
+#define WO_HOR_B 3
+#define WO_ZEN_R 4
+#define WO_ZEN_G 5
+#define WO_ZEN_B 6
+
+#define WO_EXPOS 7
+
+#define WO_MISI 8
+#define WO_MISTDI 9
+#define WO_MISTSTA 10
+#define WO_MISTHI 11
+
+#define WO_STAR_R 12
+#define WO_STAR_G 13
+#define WO_STAR_B 14
+#define WO_STARDIST 15
+#define WO_STARSIZE 16
+
+/* ******************** */
+
+#define LA_TOTIPO 21
+#define LA_TOTNAM 10
+
+#define LA_ENERGY 1
+#define LA_COL_R 2
+#define LA_COL_G 3
+#define LA_COL_B 4
+#define LA_DIST 5
+#define LA_SPOTSI 6
+#define LA_SPOTBL 7
+#define LA_QUAD1 8
+#define LA_QUAD2 9
+#define LA_HALOINT 10
+
+/* ******************** */
+
+/* yafray: totipo & totnam +2 because of added curves */
+#define CAM_TOTIPO 7
+#define CAM_TOTNAM 7
+
+#define CAM_LENS 1
+#define CAM_STA 2
+#define CAM_END 3
+
+/* yafray aperture & focal distance curves */
+#define CAM_YF_APERT 4
+#define CAM_YF_FDIST 5
+
+#define CAM_SHIFT_X 6
+#define CAM_SHIFT_Y 7
+
+/* ******************** */
+
+#define SND_TOTIPO 4
+#define SND_TOTNAM 4
+
+#define SND_VOLUME 1
+#define SND_PITCH 2
+#define SND_PANNING 3
+#define SND_ATTEN 4
+
+/* ******************** */
+
+#define AC_TOTIPO 10 /* __NLA */
+#define AC_TOTNAM 10
+
+#define AC_LOC_X 1
+#define AC_LOC_Y 2
+#define AC_LOC_Z 3
+
+#define AC_SIZE_X 13
+#define AC_SIZE_Y 14
+#define AC_SIZE_Z 15
+
+#define AC_QUAT_W 25
+#define AC_QUAT_X 26
+#define AC_QUAT_Y 27
+#define AC_QUAT_Z 28
+
+/* ******************** */
+#define CO_TOTIPO 1 /* Constraint Ipos */
+#define CO_TOTNAM 1
+
+#define CO_ENFORCE 1
+/*
+#define CO_TIME 2
+#define CO_OFFSET_X 3
+#define CO_OFFSET_Y 4
+#define CO_OFFSET_Z 5
+#define CO_ORIENT_X 6
+#define CO_ORIENT_Y 7
+#define CO_ORIENT_Z 8
+#define CO_ROLL 9
+*/
+
+/* ******************** */
+/* fluidsim ipos NT */
+
+#define FLUIDSIM_TOTIPO 9
+#define FLUIDSIM_TOTNAM 9
+
+#define FLUIDSIM_VISC 1
+#define FLUIDSIM_TIME 2
+
+#define FLUIDSIM_GRAV_X 3
+#define FLUIDSIM_GRAV_Y 4
+#define FLUIDSIM_GRAV_Z 5
+
+#define FLUIDSIM_VEL_X 6
+#define FLUIDSIM_VEL_Y 7
+#define FLUIDSIM_VEL_Z 8
+
+#define FLUIDSIM_ACTIVE 9
+
+
+/* these are IpoCurve specific */
+/* **************** IPO ********************* */
+
+/* icu->vartype */
+#define IPO_CHAR 0
+#define IPO_SHORT 1
+#define IPO_INT 2
+#define IPO_LONG 3
+#define IPO_FLOAT 4
+#define IPO_DOUBLE 5
+#define IPO_FLOAT_DEGR 6
+ /* very special case, in keys */
+#define IPO_BEZTRIPLE 100
+#define IPO_BPOINT 101
+
+/* icu->vartype */
+#define IPO_BITS 16
+#define IPO_CHAR_BIT 16
+#define IPO_SHORT_BIT 17
+#define IPO_INT_BIT 18
+
+/* icu->ipo: the type of curve */
+#define IPO_CONST 0
+#define IPO_LIN 1
+#define IPO_BEZ 2
+#define IPO_MIXED 3 /* not used yet */
+
+/* icu->extrap */
+#define IPO_HORIZ 0
+#define IPO_DIR 1
+#define IPO_CYCL 2
+#define IPO_CYCLX 3
+
+/* icu->flag */
+#define IPO_VISIBLE 1
+#define IPO_SELECT 2
+#define IPO_EDIT 4
+#define IPO_LOCK 8
+#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
new file mode 100644
index 00000000000..3292e07f80e
--- /dev/null
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -0,0 +1,91 @@
+/**
+ * blenlib/DNA_key_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_KEY_TYPES_H
+#define DNA_KEY_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct Ipo;
+
+typedef struct KeyBlock {
+ struct KeyBlock *next, *prev;
+
+ float pos;
+ float curval;
+ short type, adrcode;
+ int totelem;
+
+ void *data;
+ float *weights;
+ char name[32];
+ char vgroup[32];
+
+ float slidermin;
+ float slidermax;
+} KeyBlock;
+
+
+typedef struct Key {
+ ID id;
+
+ KeyBlock *refkey;
+ char elemstr[32];
+ int elemsize;
+ float curval;
+
+ ListBase block;
+ struct Ipo *ipo;
+
+ ID *from;
+
+ short type, totkey;
+ short slurph, flag;
+} Key;
+
+/* **************** KEY ********************* */
+
+/* key->type */
+#define KEY_NORMAL 0
+#define KEY_RELATIVE 1
+
+/* key->flag */
+
+/* keyblock->type */
+#define KEY_LINEAR 0
+#define KEY_CARDINAL 1
+#define KEY_BSPLINE 2
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
new file mode 100644
index 00000000000..f8cc2378cb1
--- /dev/null
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -0,0 +1,174 @@
+/**
+ * blenlib/DNA_lamp_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_LAMP_TYPES_H
+#define DNA_LAMP_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+#ifndef MAX_MTEX
+#define MAX_MTEX 10
+#endif
+
+struct MTex;
+struct Ipo;
+struct CurveMapping;
+
+typedef struct Lamp {
+ ID id;
+
+ short type, mode;
+
+ short colormodel, totex;
+ float r, g, b, k;
+
+ float energy, dist, spotsize, spotblend;
+ float haint;
+
+
+ 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;
+ 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;
+
+ /* yafray: photonlight params */
+ int YF_numphotons, YF_numsearch;
+ short YF_phdepth, YF_useqmc, YF_bufsize, YF_pad;
+ float YF_causticblur, YF_ltradius;
+ /* yafray: glow params */
+ float YF_glowint, YF_glowofs;
+ short YF_glowtype, YF_pad2;
+
+ struct MTex *mtex[10];
+ struct Ipo *ipo;
+
+ /* preview */
+ struct PreviewImage *preview;
+
+ ScriptLink scriptlink;
+} Lamp;
+
+/* **************** LAMP ********************* */
+
+/* type */
+#define LA_LOCAL 0
+#define LA_SUN 1
+#define LA_SPOT 2
+#define LA_HEMI 3
+#define LA_AREA 4
+/* yafray: extra lamp type used for caustic photonmap */
+#define LA_YF_PHOTON 5
+
+/* mode */
+#define LA_SHAD_BUF 1
+#define LA_HALO 2
+#define LA_LAYER 4
+#define LA_QUAD 8 /* no longer used */
+#define LA_NEG 16
+#define LA_ONLYSHADOW 32
+#define LA_SPHERE 64
+#define LA_SQUARE 128
+#define LA_TEXTURE 256
+#define LA_OSATEX 512
+#define LA_DEEP_SHADOW 1024
+#define LA_NO_DIFF 2048
+#define LA_NO_SPEC 4096
+#define LA_SHAD_RAY 8192
+/* yafray: lamp shadowbuffer flag, softlight */
+/* Since it is used with LOCAL lamp, can't use LA_SHAD */
+#define LA_YF_SOFT 16384
+
+/* 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
+#define LA_SHADBUF_HALFWAY 2
+
+/* bufflag, auto clipping */
+#define LA_SHADBUF_AUTO_START 1
+#define LA_SHADBUF_AUTO_END 2
+
+/* filtertype */
+#define LA_SHADBUF_BOX 0
+#define LA_SHADBUF_TENT 1
+#define LA_SHADBUF_GAUSS 2
+
+/* area shape */
+#define LA_AREA_SQUARE 0
+#define LA_AREA_RECT 1
+#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
+#define LA_SAMP_DITHER 4
+#define LA_SAMP_JITTER 8
+
+/* mapto */
+#define LAMAP_COL 1
+
+
+#endif /* DNA_LAMP_TYPES_H */
+
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
new file mode 100644
index 00000000000..823dc2ba485
--- /dev/null
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -0,0 +1,67 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_LATTICE_TYPES_H
+#define DNA_LATTICE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct BPoint;
+struct Ipo;
+struct Key;
+struct MDeformVert;
+
+typedef struct Lattice {
+ ID id;
+
+ short pntsu, pntsv, pntsw, flag;
+ short opntsu, opntsv, opntsw, pad2;
+ char typeu, typev, typew, type;
+ int pad;
+
+ float fu, fv, fw, du, dv, dw;
+
+ struct BPoint *def;
+
+ struct Ipo *ipo;
+ struct Key *key;
+
+ struct MDeformVert *dvert;
+} Lattice;
+
+/* ***************** LATTICE ********************* */
+
+/* flag */
+#define LT_GRID 1
+#define LT_OUTSIDE 2
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h
new file mode 100644
index 00000000000..10a1b59fb01
--- /dev/null
+++ b/source/blender/makesdna/DNA_listBase.h
@@ -0,0 +1,64 @@
+/**
+ * blenlib/BLI_listBase.h mar 2001 Nzc
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * These structs are the foundation for all linked lists in the
+ * library system.
+ *
+ */
+
+#ifndef DNA_LISTBASE_H
+#define DNA_LISTBASE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Link
+{
+ struct Link *next,*prev;
+} Link;
+
+/* never change the size of this! genfile.c detects pointerlen with it */
+typedef struct ListBase
+{
+ void *first, *last;
+} ListBase;
+
+/* 8 byte alignment! */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
new file mode 100644
index 00000000000..252af0ebdb1
--- /dev/null
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -0,0 +1,294 @@
+/**
+ * blenlib/DNA_material_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_MATERIAL_TYPES_H
+#define DNA_MATERIAL_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+#include "DNA_listBase.h"
+
+#ifndef MAX_MTEX
+#define MAX_MTEX 10
+#endif
+
+struct MTex;
+struct Ipo;
+struct Material;
+struct ColorBand;
+struct Group;
+struct bNodeTree;
+
+/* WATCH IT: change type? also make changes in ipo.h */
+
+typedef struct Material {
+ ID id;
+
+ short colormodel, flag;
+ /* note, keep this below synced with render_types.h */
+ float r, g, b;
+ float specr, specg, specb;
+ float mirr, mirg, mirb;
+ float ambr, ambb, ambg;
+ float amb, emit, ang, spectra, ray_mirror;
+ float alpha, ref, spec, zoffs, add;
+ float translucency;
+ /* end synced with render_types.h */
+
+ float fresnel_mir, fresnel_mir_i;
+ float fresnel_tra, fresnel_tra_i;
+ float filter; /* filter added, for raytrace transparency and transmissivity */
+ float tx_limit, tx_falloff;
+ short ray_depth, ray_depth_tra;
+ 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 pad1;
+
+ 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 sbias; /* shadow bias */
+ float shad_alpha, padf; /* in use for irregular shadowbuffer */
+
+ /* for buttons and render*/
+ char rgbsel, texact, pr_type, use_nodes;
+ short pr_back, pr_lamp, septex, ml_flag; /* ml_flag is for disable base material */
+
+ /* shaders */
+ short diff_shader, spec_shader;
+ float roughness, refrac;
+ float param[4]; /* size, smooth, size, smooth, for toonshader */
+ float rms;
+ float darkness;
+ short texco, mapto;
+
+ /* ramp colors */
+ struct ColorBand *ramp_col;
+ struct ColorBand *ramp_spec;
+ char rampin_col, rampin_spec;
+ char rampblend_col, rampblend_spec;
+ short ramp_show, pad3;
+ float rampfac_col, rampfac_spec;
+
+ struct MTex *mtex[10];
+ 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;
+
+ float sss_radius[3], sss_col[3];
+ float sss_error, sss_scale, sss_ior;
+ float sss_colfac, sss_texfac;
+ float sss_front, sss_back;
+ short sss_flag, sss_preset;
+
+ /* yafray: absorption color, dispersion parameters and material preset menu */
+ float YF_ar, YF_ag, YF_ab, YF_dscale, YF_dpwr;
+ int YF_dsmp, YF_preset, YF_djit;
+
+ ScriptLink scriptlink;
+} Material;
+
+/* **************** MATERIAL ********************* */
+
+ /* maximum number of materials per material array
+ * (on object, mesh, lamp, etc.)
+ */
+#define MAXMAT 16
+
+/* colormodel */
+#define MA_RGB 0
+#define MA_CMYK 1
+#define MA_YUV 2
+#define MA_HSV 3
+
+/* flag */
+ /* for render */
+#define MA_IS_USED 1
+
+/* mode (is int) */
+#define MA_TRACEBLE 1
+#define MA_SHADOW 2
+#define MA_SHLESS 4
+#define MA_WIRE 8
+#define MA_VERTEXCOL 16
+#define MA_HALO 32
+#define MA_ZTRA 64
+#define MA_VERTEXCOLP 128
+#define MA_ZINV 256
+#define MA_HALO_RINGS 256
+#define MA_ENV 512
+#define MA_HALO_LINES 512
+#define MA_ONLYSHADOW 1024
+#define MA_HALO_XALPHA 1024
+#define MA_STAR 0x800
+#define MA_FACETEXTURE 0x800
+#define MA_HALOTEX 0x1000
+#define MA_HALOPUNO 0x2000
+#define MA_ONLYCAST 0x2000
+#define MA_NOMIST 0x4000
+#define MA_HALO_SHADE 0x4000
+#define MA_HALO_FLARE 0x8000
+#define MA_RADIO 0x10000
+#define MA_RAYTRANSP 0x20000
+#define MA_RAYMIRROR 0x40000
+#define MA_SHADOW_TRA 0x80000
+#define MA_RAMP_COL 0x100000
+#define MA_RAMP_SPEC 0x200000
+#define MA_RAYBIAS 0x400000
+#define MA_FULL_OSA 0x800000
+#define MA_TANGENT_STR 0x1000000
+#define MA_SHADBUF 0x2000000
+ /* note; we drop MA_TANGENT_STR later to become tangent_u */
+#define MA_TANGENT_V 0x4000000
+/* 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_MODE_MASK 0x1fffffff /* all valid mode bits */
+
+/* ray mirror fadeout */
+#define MA_RAYMIR_FADETOSKY 0
+#define MA_RAYMIR_FADETOMAT 1
+
+/* diff_shader */
+#define MA_DIFF_LAMBERT 0
+#define MA_DIFF_ORENNAYAR 1
+#define MA_DIFF_TOON 2
+#define MA_DIFF_MINNAERT 3
+#define MA_DIFF_FRESNEL 4
+
+/* spec_shader */
+#define MA_SPEC_COOKTORR 0
+#define MA_SPEC_PHONG 1
+#define MA_SPEC_BLINN 2
+#define MA_SPEC_TOON 3
+#define MA_SPEC_WARDISO 4
+
+/* dynamode */
+#define MA_DRAW_DYNABUTS 1
+#define MA_FH_NOR 2
+
+/* ramps */
+#define MA_RAMP_IN_SHADER 0
+#define MA_RAMP_IN_ENERGY 1
+#define MA_RAMP_IN_NOR 2
+#define MA_RAMP_IN_RESULT 3
+
+#define MA_RAMP_BLEND 0
+#define MA_RAMP_ADD 1
+#define MA_RAMP_MULT 2
+#define MA_RAMP_SUB 3
+#define MA_RAMP_SCREEN 4
+#define MA_RAMP_DIV 5
+#define MA_RAMP_DIFF 6
+#define MA_RAMP_DARK 7
+#define MA_RAMP_LIGHT 8
+#define MA_RAMP_OVERLAY 9
+#define MA_RAMP_DODGE 10
+#define MA_RAMP_BURN 11
+#define MA_RAMP_HUE 12
+#define MA_RAMP_SAT 13
+#define MA_RAMP_VAL 14
+#define MA_RAMP_COLOR 15
+
+/* texco */
+#define TEXCO_ORCO 1
+#define TEXCO_REFL 2
+#define TEXCO_NORM 4
+#define TEXCO_GLOB 8
+#define TEXCO_UV 16
+#define TEXCO_OBJECT 32
+#define TEXCO_LAVECTOR 64
+#define TEXCO_VIEW 128
+#define TEXCO_STICKY 256
+#define TEXCO_OSA 512
+#define TEXCO_WINDOW 1024
+#define NEED_UV 2048
+#define TEXCO_TANGENT 4096
+ /* still stored in vertex->accum, 1 D */
+#define TEXCO_STRAND 8192
+#define TEXCO_STRESS 16384
+#define TEXCO_SPEED 32768
+
+/* mapto */
+#define MAP_COL 1
+#define MAP_NORM 2
+#define MAP_COLSPEC 4
+#define MAP_COLMIR 8
+#define MAP_VARS (0xFFF0)
+#define MAP_REF 16
+#define MAP_SPEC 32
+#define MAP_EMIT 64
+#define MAP_ALPHA 128
+#define MAP_HAR 256
+#define MAP_RAYMIRR 512
+#define MAP_TRANSLU 1024
+#define MAP_AMB 2048
+#define MAP_DISPLACE 4096
+#define MAP_WARP 8192
+#define MAP_LAYER 16384
+
+/* pr_type */
+#define MA_FLAT 0
+#define MA_SPHERE 1
+#define MA_CUBE 2
+#define MA_MONKEY 3
+#define MA_SPHERE_A 4
+#define MA_TEXTURE 5
+#define MA_LAMP 6
+#define MA_SKY 7
+#define MA_HAIR 10
+
+/* pr_back */
+#define MA_DARK 1
+
+/* sss_flag */
+#define MA_DIFF_SSS 1
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
new file mode 100644
index 00000000000..59f3a64ba5e
--- /dev/null
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -0,0 +1,139 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_MESH_TYPES_H
+#define DNA_MESH_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+#include "DNA_customdata_types.h"
+
+struct DerivedMesh;
+struct Ipo;
+struct Key;
+struct Material;
+struct MVert;
+struct MEdge;
+struct MFace;
+struct MCol;
+struct MSticky;
+struct Mesh;
+struct OcInfo;
+struct Multires;
+struct PartialVisibility;
+
+typedef struct Mesh {
+ ID id;
+
+ struct BoundBox *bb;
+
+ ListBase effect;
+
+ struct Ipo *ipo;
+ struct Key *key;
+ struct Material **mat;
+
+ 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; /* array of verts */
+ struct MEdge *medge; /* array of edges */
+ struct MDeformVert *dvert; /* __NLA */
+ struct MCol *mcol; /* array of colors, this must be the number of faces * 4 */
+ struct MSticky *msticky;
+ struct Mesh *texcomesh;
+ struct MSelect *mselect;
+
+ struct CustomData vdata, edata, fdata;
+
+ 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 */
+ float loc[3];
+ float size[3];
+ float rot[3];
+
+ float cubemapsize, pad;
+
+ short smoothresh, flag;
+
+ short subdiv, subdivr;
+ short totcol;
+ short subsurftype; /* only kept for backwards compat, not used anymore */
+
+ struct Multires *mr; /* Multiresolution modeling data */
+ struct PartialVisibility *pv;
+/*ifdef WITH_VERSE*/
+ /* not written in file, pointer at geometry VerseNode */
+ void *vnode;
+/*#endif*/
+} Mesh;
+
+/* deprecated by MTFace, only here for file reading */
+typedef struct TFace {
+ void *tpage; /* the faces image for the active UVLayer */
+ float uv[4][2];
+ unsigned int col[4];
+ char flag, transp;
+ short mode, tile, unwrap;
+} TFace;
+
+/* **************** MESH ********************* */
+
+/* texflag */
+#define AUTOSPACE 1
+
+/* me->flag */
+#define ME_ISDONE 1
+#define ME_NOPUNOFLIP 2
+#define ME_TWOSIDED 4
+#define ME_UVEFFECT 8
+#define ME_VCOLEFFECT 16
+#define ME_AUTOSMOOTH 32
+#define ME_SMESH 64
+#define ME_SUBSURF 128
+#define ME_OPT_EDGES 256
+
+/* Subsurf Type */
+#define ME_CC_SUBSURF 0
+#define ME_SIMPLE_SUBSURF 1
+
+#define MESH_MAX_VERTS 2000000000L
+
+#endif
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
new file mode 100644
index 00000000000..68d9bb245cf
--- /dev/null
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -0,0 +1,250 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_MESHDATA_TYPES_H
+#define DNA_MESHDATA_TYPES_H
+
+#include "DNA_customdata_types.h"
+
+struct Bone;
+struct Image;
+
+typedef struct MFace {
+ unsigned int v1, v2, v3, v4;
+ char pad, mat_nr;
+ char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */
+} MFace;
+
+typedef struct MEdge {
+ unsigned int v1, v2;
+ char crease, pad;
+ short flag;
+} MEdge;
+
+typedef struct MDeformWeight {
+ int def_nr;
+ float weight;
+} MDeformWeight;
+
+typedef struct MDeformVert {
+ struct MDeformWeight *dw;
+ int totweight;
+ int flag; /* flag only in use for weightpaint now */
+} MDeformVert;
+
+typedef struct MVert {
+ float co[3];
+ short no[3];
+ char flag, mat_nr;
+} 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;
+} MCol;
+
+typedef struct MSticky {
+ float co[2];
+} MSticky;
+
+typedef struct MSelect {
+ int index;
+ int type;
+} MSelect;
+
+typedef struct MTFace {
+ float uv[4][2];
+ struct Image *tpage;
+ char flag, transp;
+ 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;
+
+
+/* Multiresolution modeling */
+typedef struct MultiresCol {
+ float a, r, g, b;
+} MultiresCol;
+typedef struct MultiresColFace {
+ /* vertex colors */
+ MultiresCol col[4];
+} MultiresColFace;
+typedef struct MultiresFace {
+ unsigned int v[4];
+ unsigned int mid;
+ char flag, mat_nr, pad[2];
+} MultiresFace;
+typedef struct MultiresEdge {
+ unsigned int v[2];
+ unsigned int mid;
+} MultiresEdge;
+
+struct MultiresMapNode;
+typedef struct MultiresLevel {
+ struct MultiresLevel *next, *prev;
+
+ 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;
+
+ unsigned int totvert, totface, totedge, pad;
+
+ /* Kept for compatibility with older files */
+ MVert *verts;
+} MultiresLevel;
+
+typedef struct Multires {
+ ListBase levels;
+ MVert *verts;
+
+ unsigned char level_count, current, newlvl, edgelvl, pinlvl, renderlvl;
+ unsigned char use_col, pad;
+
+ /* Special level 1 data that cannot be modified from other levels */
+ CustomData vdata;
+ CustomData fdata;
+ short *edge_flags;
+ char *edge_creases;
+} Multires;
+
+typedef struct PartialVisibility {
+ unsigned int *vert_map; /* vert_map[Old Index]= New Index */
+ int *edge_map; /* edge_map[Old Index]= New Index, -1= hidden */
+ MFace *old_faces;
+ MEdge *old_edges;
+ unsigned int totface, totedge, totvert, pad;
+} PartialVisibility;
+
+/* mvert->flag (1=SELECT) */
+#define ME_SPHERETEST 2
+#define ME_SPHERETEMP 4
+#define ME_HIDE 16
+#define ME_VERT_MERGED (1<<6)
+
+/* medge->flag (1=SELECT)*/
+#define ME_EDGEDRAW (1<<1)
+#define ME_SEAM (1<<2)
+#define ME_FGON (1<<3)
+ /* reserve 16 for ME_HIDE */
+#define ME_EDGERENDER (1<<5)
+#define ME_LOOSEEDGE (1<<7)
+#define ME_SEAM_LAST (1<<8)
+#define ME_SHARP (1<<9)
+
+/* puno = vertexnormal (mface) */
+/* render assumes flips to be ordered like this */
+#define ME_FLIPV1 1
+#define ME_FLIPV2 2
+#define ME_FLIPV3 4
+#define ME_FLIPV4 8
+#define ME_PROJXY 16
+#define ME_PROJXZ 32
+#define ME_PROJYZ 64
+
+/* edcode (mface) */
+#define ME_V1V2 1
+#define ME_V2V3 2
+#define ME_V3V1 4
+#define ME_V3V4 4
+#define ME_V4V1 8
+
+/* flag (mface) */
+#define ME_SMOOTH 1
+#define ME_FACE_SEL 2
+ /* flag ME_HIDE==16 is used here too */
+/* mselect->type */
+#define ME_VSEl 0
+#define ME_ESEl 1
+#define ME_FSEL 2
+
+/* 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 /* deprecated! */
+#define TF_SEL1 4
+#define TF_SEL2 8
+#define TF_SEL3 16
+#define TF_SEL4 32
+#define TF_HIDE 64 /* unused, same as TF_SELECT */
+
+/* mtface->mode */
+#define TF_DYNAMIC 1
+#define TF_DEPRECATED 2
+#define TF_TEX 4
+#define TF_SHAREDVERT 8
+#define TF_LIGHT 16
+
+#define TF_SHAREDCOL 64
+#define TF_TILES 128
+#define TF_BILLBOARD 256
+#define TF_TWOSIDE 512
+#define TF_INVISIBLE 1024
+
+#define TF_OBCOL 2048
+#define TF_BILLBOARD2 4096 /* with Z axis constraint */
+#define TF_SHADOW 8192
+#define TF_BMFONT 16384
+
+/* mtface->transp */
+#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 */
+#define TF_DEPRECATED1 1
+#define TF_DEPRECATED2 2
+#define TF_DEPRECATED3 4
+#define TF_DEPRECATED4 8
+#define TF_PIN1 16
+#define TF_PIN2 32
+#define TF_PIN3 64
+#define TF_PIN4 128
+
+#endif
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
new file mode 100644
index 00000000000..e14782cf5ca
--- /dev/null
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -0,0 +1,120 @@
+/**
+ * blenlib/DNA_meta_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_META_TYPES_H
+#define DNA_META_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct BoundBox;
+struct Ipo;
+struct Material;
+
+
+typedef struct MetaElem {
+ struct MetaElem *next, *prev;
+
+ struct BoundBox *bb; /* Bound Box of MetaElem */
+ int i1,j1,k1, i2,j2,k2; /* corners of Bounding Box in lattice */
+
+ short type, flag, selcol1, selcol2;
+ float x, y, z; /* Position of center of MetaElem */
+ float quat[4]; /* Rotation of MetaElem */
+ float expx, expy, expz; /* dimension parameters, used for some types like cubes */
+ float rad; /* radius of the meta element */
+ float rad2; /* temp field, used only while processing */
+ float s; /* stiffness, how much of the element to fill */
+ float len; /* old, only used for backwards compat. use dimensions now */
+
+ float *mat, *imat; /* matrix and inverted matrix */
+
+} MetaElem;
+
+typedef struct MetaBall {
+ ID id;
+
+ struct BoundBox *bb;
+
+ ListBase elems;
+ ListBase disp;
+ struct Ipo *ipo;
+
+ /* material of the mother ball will define the material used of all others */
+ struct Material **mat;
+
+ short flag, totcol;
+ int texflag; /* used to store MB_AUTOSPACE */
+
+ /* texture space, copied as one block in editobject.c */
+ float loc[3];
+ float size[3];
+ float rot[3];
+
+ float wiresize, rendersize; /* display and render res */
+
+ /* bias elements to have an offset volume.
+ mother ball changes will effect other objects thresholds,
+ but these may also have their own thresh as an offset */
+ float thresh;
+
+
+} MetaBall;
+
+/* **************** METABALL ********************* */
+
+/* texflag */
+#define MB_AUTOSPACE 1
+
+/* mb->flag */
+#define MB_UPDATE_ALWAYS 0
+#define MB_UPDATE_HALFRES 1
+#define MB_UPDATE_FAST 2
+#define MB_UPDATE_NEVER 3
+
+/* ml->type */
+#define MB_BALL 0
+#define MB_TUBEX 1 /* depercated */
+#define MB_TUBEY 2 /* depercated */
+#define MB_TUBEZ 3 /* depercated */
+#define MB_TUBE 4
+#define MB_PLANE 5
+#define MB_ELIPSOID 6
+#define MB_CUBE 7
+
+/* ml->flag */
+#define MB_NEGATIVE 2
+#define MB_HIDE 8
+#define MB_SCALE_RAD 16
+
+#endif
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
new file mode 100644
index 00000000000..42016ad1c16
--- /dev/null
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -0,0 +1,366 @@
+/**
+ * $Id$
+ */
+
+#ifndef DNA_MODIFIER_TYPES_H
+#define DNA_MODIFIER_TYPES_H
+
+#define MODSTACK_DEBUG 1
+
+/* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */
+
+typedef enum ModifierType {
+ eModifierType_None = 0,
+ eModifierType_Subsurf,
+ eModifierType_Lattice,
+ eModifierType_Curve,
+ eModifierType_Build,
+ eModifierType_Mirror,
+ eModifierType_Decimate,
+ eModifierType_Wave,
+ eModifierType_Armature,
+ eModifierType_Hook,
+ eModifierType_Softbody,
+ eModifierType_Boolean,
+ eModifierType_Array,
+ eModifierType_EdgeSplit,
+ eModifierType_Displace,
+ eModifierType_UVProject,
+ eModifierType_Smooth,
+ eModifierType_Cast,
+ eModifierType_MeshDeform,
+ NUM_MODIFIER_TYPES
+} ModifierType;
+
+typedef enum ModifierMode {
+ eModifierMode_Realtime = (1<<0),
+ eModifierMode_Render = (1<<1),
+ eModifierMode_Editmode = (1<<2),
+ eModifierMode_OnCage = (1<<3),
+ eModifierMode_Expanded = (1<<4),
+ eModifierMode_Virtual = (1<<5),
+ eModifierMode_DisableTemporary = (1 << 31)
+} ModifierMode;
+
+typedef struct ModifierData {
+ struct ModifierData *next, *prev;
+
+ int type, mode;
+ char name[32];
+
+ char *error;
+} ModifierData;
+
+typedef enum {
+ eSubsurfModifierFlag_Incremental = (1<<0),
+ eSubsurfModifierFlag_DebugIncr = (1<<1),
+ eSubsurfModifierFlag_ControlEdges = (1<<2),
+ eSubsurfModifierFlag_SubsurfUv = (1<<3)
+} SubsurfModifierFlag;
+
+typedef struct SubsurfModifierData {
+ ModifierData modifier;
+
+ short subdivType, levels, renderLevels, flags;
+
+ void *emCache, *mCache;
+} SubsurfModifierData;
+
+typedef struct LatticeModifierData {
+ ModifierData modifier;
+
+ struct Object *object;
+ char name[32]; /* optional vertexgroup name */
+} LatticeModifierData;
+
+typedef struct CurveModifierData {
+ ModifierData modifier;
+
+ struct Object *object;
+ char name[32]; /* optional vertexgroup name */
+ short defaxis; /* axis along which curve deforms */
+ char pad[6];
+} CurveModifierData;
+
+/* CurveModifierData->defaxis */
+#define MOD_CURVE_POSX 1
+#define MOD_CURVE_POSY 2
+#define MOD_CURVE_POSZ 3
+#define MOD_CURVE_NEGX 4
+#define MOD_CURVE_NEGY 5
+#define MOD_CURVE_NEGZ 6
+
+typedef struct BuildModifierData {
+ ModifierData modifier;
+
+ float start, length;
+ int randomize, seed;
+} BuildModifierData;
+
+typedef struct ArrayModifierData {
+ ModifierData modifier;
+
+ /* the object with which to cap the start of the array */
+ struct Object *start_cap;
+ /* the object with which to cap the end of the array */
+ struct Object *end_cap;
+ /* the curve object to use for MOD_ARR_FITCURVE */
+ struct Object *curve_ob;
+ /* the object to use for object offset */
+ struct Object *offset_ob;
+ /* a constant duplicate offset;
+ 1 means the duplicates are 1 unit apart
+ */
+ float offset[3];
+ /* a scaled factor for duplicate offsets;
+ 1 means the duplicates are 1 object-width apart
+ */
+ float scale[3];
+ /* the length over which to distribute the duplicates */
+ float length;
+ /* the limit below which to merge vertices in adjacent duplicates */
+ float merge_dist;
+ /* determines how duplicate count is calculated; one of:
+ MOD_ARR_FIXEDCOUNT -> fixed
+ MOD_ARR_FITLENGTH -> calculated to fit a set length
+ MOD_ARR_FITCURVE -> calculated to fit the length of a Curve object
+ */
+ int fit_type;
+ /* flags specifying how total offset is calculated; binary OR of:
+ MOD_ARR_OFF_CONST -> total offset += offset
+ MOD_ARR_OFF_RELATIVE -> total offset += relative * object width
+ MOD_ARR_OFF_OBJ -> total offset += offset_ob's matrix
+ total offset is the sum of the individual enabled offsets
+ */
+ int offset_type;
+ /* general flags:
+ MOD_ARR_MERGE -> merge vertices in adjacent duplicates
+ */
+ int flags;
+ /* the number of duplicates to generate for MOD_ARR_FIXEDCOUNT */
+ int count;
+} ArrayModifierData;
+
+/* ArrayModifierData->fit_type */
+#define MOD_ARR_FIXEDCOUNT 0
+#define MOD_ARR_FITLENGTH 1
+#define MOD_ARR_FITCURVE 2
+
+/* ArrayModifierData->offset_type */
+#define MOD_ARR_OFF_CONST 1<<0
+#define MOD_ARR_OFF_RELATIVE 1<<1
+#define MOD_ARR_OFF_OBJ 1<<2
+
+/* ArrayModifierData->flags */
+#define MOD_ARR_MERGE 1<<0
+#define MOD_ARR_MERGEFINAL 1<<1
+
+typedef struct MirrorModifierData {
+ ModifierData modifier;
+
+ short axis, flag;
+ float tolerance;
+} MirrorModifierData;
+
+/* MirrorModifierData->flag */
+#define MOD_MIR_CLIPPING 1<<0
+#define MOD_MIR_MIRROR_U 1<<1
+#define MOD_MIR_MIRROR_V 1<<2
+#define MOD_MIR_AXIS_X 1<<3
+#define MOD_MIR_AXIS_Y 1<<4
+#define MOD_MIR_AXIS_Z 1<<5
+
+typedef struct EdgeSplitModifierData {
+ ModifierData modifier;
+
+ float split_angle; /* angle above which edges should be split */
+ int flags;
+} EdgeSplitModifierData;
+
+/* EdgeSplitModifierData->flags */
+#define MOD_EDGESPLIT_FROMANGLE 1<<1
+#define MOD_EDGESPLIT_FROMFLAG 1<<2
+
+typedef struct DisplaceModifierData {
+ ModifierData modifier;
+
+ struct Tex *texture;
+ float strength;
+ int direction;
+ char defgrp_name[32];
+ float midlevel;
+ int texmapping;
+ struct Object *map_object;
+ char uvlayer_name[32];
+ int uvlayer_tmp, pad;
+} DisplaceModifierData;
+
+/* DisplaceModifierData->direction */
+enum {
+ MOD_DISP_DIR_X,
+ MOD_DISP_DIR_Y,
+ MOD_DISP_DIR_Z,
+ MOD_DISP_DIR_NOR,
+ MOD_DISP_DIR_RGB_XYZ,
+};
+
+/* DisplaceModifierData->texmapping */
+enum {
+ MOD_DISP_MAP_LOCAL,
+ MOD_DISP_MAP_GLOBAL,
+ MOD_DISP_MAP_OBJECT,
+ MOD_DISP_MAP_UV,
+};
+
+typedef struct UVProjectModifierData {
+ ModifierData modifier;
+
+ /* the objects which do the projecting */
+ struct Object *projectors[10];
+ struct Image *image; /* the image to project */
+ int flags;
+ int num_projectors;
+ float aspectx, aspecty;
+ char uvlayer_name[32];
+ int uvlayer_tmp, pad;
+} UVProjectModifierData;
+
+#define MOD_UVPROJECT_MAXPROJECTORS 10
+
+/* UVProjectModifierData->flags */
+#define MOD_UVPROJECT_OVERRIDEIMAGE 1<<0
+
+typedef struct DecimateModifierData {
+ ModifierData modifier;
+
+ float percent;
+ int faceCount;
+} DecimateModifierData;
+
+/* Smooth modifier flags */
+#define MOD_SMOOTH_X (1<<1)
+#define MOD_SMOOTH_Y (1<<2)
+#define MOD_SMOOTH_Z (1<<3)
+
+typedef struct SmoothModifierData {
+ ModifierData modifier;
+ float fac;
+ char defgrp_name[32];
+ short flag, repeat;
+
+} SmoothModifierData;
+
+/* Cast modifier flags */
+#define MOD_CAST_X (1<<1)
+#define MOD_CAST_Y (1<<2)
+#define MOD_CAST_Z (1<<3)
+#define MOD_CAST_USE_OB_TRANSFORM (1<<4)
+#define MOD_CAST_SIZE_FROM_RADIUS (1<<5)
+
+/* Cast modifier projection types */
+#define MOD_CAST_TYPE_SPHERE 0
+#define MOD_CAST_TYPE_CYLINDER 1
+#define MOD_CAST_TYPE_CUBOID 2
+
+typedef struct CastModifierData {
+ ModifierData modifier;
+
+ struct Object *object;
+ float fac;
+ float radius;
+ float size;
+ char defgrp_name[32];
+ short flag, type;
+} CastModifierData;
+
+enum {
+ MOD_WAV_MAP_LOCAL,
+ MOD_WAV_MAP_GLOBAL,
+ MOD_WAV_MAP_OBJECT,
+ MOD_WAV_MAP_UV,
+};
+
+/* WaveModifierData.flag */
+#define MOD_WAVE_X 1<<1
+#define MOD_WAVE_Y 1<<2
+#define MOD_WAVE_CYCL 1<<3
+#define MOD_WAVE_NORM 1<<4
+#define MOD_WAVE_NORM_X 1<<5
+#define MOD_WAVE_NORM_Y 1<<6
+#define MOD_WAVE_NORM_Z 1<<7
+
+typedef struct WaveModifierData {
+ ModifierData modifier;
+
+ struct Object *objectcenter;
+ char defgrp_name[32];
+ struct Tex *texture;
+ struct Object *map_object;
+
+ short flag, pad;
+
+ float startx, starty, height, width;
+ float narrow, speed, damp;
+
+ int texmapping, uvlayer_tmp;
+
+ char uvlayer_name[32];
+
+ float timeoffs, lifetime;
+} WaveModifierData;
+
+typedef struct ArmatureModifierData {
+ ModifierData modifier;
+
+ short deformflag, pad1; /* deformflag replaces armature->deformflag */
+ int pad2;
+ struct Object *object;
+ char defgrp_name[32];
+} ArmatureModifierData;
+
+typedef struct HookModifierData {
+ ModifierData modifier;
+
+ struct Object *object;
+ float parentinv[4][4]; /* matrix making current transform unmodified */
+ float cent[3]; /* visualization of hook */
+ float falloff; /* if not zero, falloff is distance where influence zero */
+
+ int *indexar; /* if NULL, it's using vertexgroup */
+ int totindex;
+ float force;
+ char name[32]; /* optional vertexgroup name */
+} HookModifierData;
+
+typedef struct SoftbodyModifierData {
+ ModifierData modifier;
+} SoftbodyModifierData;
+
+typedef enum {
+ eBooleanModifierOp_Intersect,
+ eBooleanModifierOp_Union,
+ eBooleanModifierOp_Difference,
+} BooleanModifierOp;
+typedef struct BooleanModifierData {
+ ModifierData modifier;
+
+ struct Object *object;
+ int operation, pad;
+} BooleanModifierData;
+
+#define MOD_MDEF_INVERT_VGROUP (1<<0)
+
+typedef struct MeshDeformModifierData {
+ ModifierData modifier;
+
+ struct Object *object; /* mesh object */
+ char defgrp_name[32]; /* optional vertexgroup name */
+
+ float *bindweights, *bindcos; /* computed binding weights */
+ short gridsize, needbind;
+ short flag, pad;
+
+ int totvert, totcagevert;
+} MeshDeformModifierData;
+
+#endif
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
new file mode 100644
index 00000000000..d7ccfe01085
--- /dev/null
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -0,0 +1,105 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_NLA_TYPES_H
+#define DNA_NLA_TYPES_H
+
+#include "DNA_listBase.h"
+
+struct bAction;
+struct Ipo;
+struct Object;
+
+/* simple uniform modifier structure, assumed it can hold all type info */
+typedef struct bActionModifier {
+ struct bActionModifier *next, *prev;
+ short type, flag;
+ char channel[32];
+
+ /* noise modifier */
+ float noisesize, turbul;
+ short channels;
+
+ /* path deform modifier */
+ short no_rot_axis;
+ struct Object *ob;
+} bActionModifier;
+
+/* NLA-Modifier Types */
+#define ACTSTRIP_MOD_DEFORM 0
+#define ACTSTRIP_MOD_NOISE 1
+#define ACTSTRIP_MOD_OOMPH 2
+
+typedef struct bActionStrip {
+ struct bActionStrip *next, *prev;
+ short flag, mode;
+ short stride_axis; /* axis 0=x, 1=y, 2=z */
+ short curmod; /* current modifier for buttons */
+
+ 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 stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */
+ float repeat; /* The number of times to repeat the action range */
+
+ 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 */
+
+} 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 /* Not implemented. Is not used anywhere */
+#define ACTSTRIP_HOLDLASTFRAME 0x08
+#define ACTSTRIP_ACTIVE 0x10
+#define ACTSTRIP_LOCK_ACTION 0x20
+#define ACTSTRIP_MUTE 0x40
+#define ACTSTRIP_REVERSE 0x80 /* This has yet to be implemented. To indicate that a strip should be played backwards */
+#define ACTSTRIP_CYCLIC_USEX 0x100
+#define ACTSTRIP_CYCLIC_USEY 0x200
+#define ACTSTRIP_CYCLIC_USEZ 0x400
+#define ACTSTRIP_AUTO_BLENDS 0x800
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
new file mode 100644
index 00000000000..5f20939fc23
--- /dev/null
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -0,0 +1,257 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_NODE_TYPES_H
+#define DNA_NODE_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_vec_types.h"
+#include "DNA_listBase.h"
+
+struct ListBase;
+struct SpaceNode;
+struct bNodeLink;
+struct bNodeType;
+struct bNodeGroup;
+
+#define NODE_MAXSTR 32
+
+
+typedef struct bNodeStack {
+ float vec[4];
+ float min, max; /* min/max for values (UI writes it, execute might use it) */
+ void *data;
+ short hasinput; /* when input has link, tagged before executing */
+ short hasoutput; /* when output is linked, tagged before executing */
+ short datatype; /* type of data pointer */
+ short sockettype; /* type of socket stack comes from, to remap linking different sockets */
+} bNodeStack;
+
+/* ns->datatype, shadetree only */
+#define NS_OSA_VECTORS 1
+#define NS_OSA_VALUES 2
+
+typedef struct bNodeSocket {
+ struct bNodeSocket *next, *prev;
+
+ char name[32];
+ bNodeStack ns; /* custom data for inputs, only UI writes in this */
+
+ short type, flag; /* type is copy from socket type struct */
+ short limit, stack_index; /* limit for dependency sort, stack_index for exec */
+ short intern; /* intern = tag for group nodes */
+ short stack_index_ext; /* for groups, to find the caller stack index */
+ int pad1;
+
+ float locx, locy;
+
+ /* internal data to retrieve relations and groups */
+
+ int own_index, to_index; /* group socket identifiers, to find matching pairs after reading files */
+
+ struct bNodeSocket *tosock; /* group-node sockets point to the internal group counterpart sockets, set after read file */
+ struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */
+
+} bNodeSocket;
+
+/* sock->type */
+#define SOCK_VALUE 0
+#define SOCK_VECTOR 1
+#define SOCK_RGBA 2
+
+/* sock->flag, first bit is select */
+ /* hidden is user defined, to hide unused */
+#define SOCK_HIDDEN 2
+ /* only used now for groups... */
+#define SOCK_IN_USE 4
+ /* unavailable is for dynamic sockets */
+#define SOCK_UNAVAIL 8
+
+#
+#
+typedef struct bNodePreview {
+ float *rect;
+ short xsize, ysize;
+} bNodePreview;
+
+
+/* limit data in bNode to what we want to see saved? */
+typedef struct bNode {
+ struct bNode *next, *prev, *new_node;
+
+ char name[32];
+ short type, flag;
+ short done, level; /* both for dependency and sorting */
+ short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */
+ short stack_index; /* for groupnode, offset in global caller stack */
+ short nr; /* number of this node in list, used for UI exec events */
+
+ ListBase inputs, outputs;
+ struct ID *id; /* optional link to libdata */
+ void *storage; /* custom data, must be struct, for storage in file */
+
+ float locx, locy; /* root offset for drawing */
+ float width, miniwidth;
+ short custom1, custom2; /* to be abused for buttons */
+
+ short need_exec, exec; /* need_exec is set as UI execution event, exec is flag during exec */
+
+ rctf totr; /* entire boundbox */
+ rctf butr; /* optional buttons area */
+ rctf prvr; /* optional preview area */
+ bNodePreview *preview; /* optional preview image */
+
+ struct bNodeType *typeinfo; /* lookup of callbacks and defaults */
+
+} bNode;
+
+/* node->flag */
+#define NODE_SELECT 1
+#define NODE_OPTIONS 2
+#define NODE_PREVIEW 4
+#define NODE_HIDDEN 8
+#define NODE_ACTIVE 16
+#define NODE_ACTIVE_ID 32
+#define NODE_DO_OUTPUT 64
+#define NODE_GROUP_EDIT 128
+ /* free test flag, undefined */
+#define NODE_TEST 256
+
+typedef struct bNodeLink {
+ struct bNodeLink *next, *prev;
+
+ bNode *fromnode, *tonode;
+ bNodeSocket *fromsock, *tosock;
+
+} bNodeLink;
+
+/* the basis for a Node tree, all links and nodes reside internal here */
+/* only re-usable node trees are in the library though, materials allocate own tree struct */
+typedef struct bNodeTree {
+ ID id;
+
+ ListBase nodes, links;
+
+ bNodeStack **stack; /* stack is only while executing, no read/write in file */
+
+ int type, init; /* set init on fileread */
+ int stacksize; /* amount of elements in stack */
+ int cur_index; /* sockets in groups have unique identifiers, adding new sockets always
+ will increase this counter */
+ ListBase alltypes; /* type definitions */
+ struct bNodeType *owntype; /* for groups or dynamic trees, no read/write */
+
+ /* callbacks */
+ void (*timecursor)(int nr);
+ void (*stats_draw)(char *str);
+ int (*test_break)(void);
+} bNodeTree;
+
+/* ntree->type, index */
+#define NTREE_SHADER 0
+#define NTREE_COMPOSIT 1
+
+/* ntree->init, flag */
+#define NTREE_TYPE_INIT 1
+#define NTREE_EXEC_INIT 2
+
+/* data structs, for node->storage */
+
+/* this one has been replaced with ImageUser, keep it for do_versions() */
+typedef struct NodeImageAnim {
+ int frames, sfra, nr;
+ char cyclic, movie;
+ short pad;
+} NodeImageAnim;
+
+typedef struct NodeBlurData {
+ short sizex, sizey, samples, maxspeed, minspeed, pad1;
+ float fac;
+ short filtertype;
+ char bokeh, gamma;
+ int pad2;
+} NodeBlurData;
+
+typedef struct NodeHueSat {
+ float hue, sat, val;
+} NodeHueSat;
+
+typedef struct NodeImageFile {
+ char name[256];
+ short imtype, subimtype, quality, codec;
+ int sfra, efra;
+} NodeImageFile;
+
+typedef struct NodeChroma {
+ float t1,t2,t3;
+ float fsize,fstrength,falpha;
+ float key[4];
+} NodeChroma;
+
+typedef struct NodeTwoXYs {
+ short x1, x2, y1, y2;
+} NodeTwoXYs;
+
+typedef struct NodeGeometry {
+ char uvname[32];
+ char colname[32];
+} NodeGeometry;
+
+typedef struct NodeVertexCol {
+ char name[32];
+} NodeVertexCol;
+
+/* qdn: Defocus blur node */
+typedef struct NodeDefocus {
+ char bktype, rotation, preview, gamco;
+ short samples, no_zbuf;
+ float fstop, maxblur, bthresh, scale;
+} NodeDefocus;
+
+
+/* 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_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
new file mode 100644
index 00000000000..91c25d2ec1d
--- /dev/null
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -0,0 +1,157 @@
+/**
+ *
+ * $Id:
+ *
+ * ***** 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) 2004-2005 by Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_OBJECT_FLUIDSIM_H
+#define DNA_OBJECT_FLUIDSIM_H
+
+#include "DNA_ID.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Mesh;
+struct Ipo;
+struct MVert;
+
+typedef struct FluidsimSettings {
+ /* domain,fluid or obstacle */
+ short type;
+ /* display advanced options in fluid sim tab (on=1,off=0)*/
+ short show_advancedoptions;
+
+ /* domain object settings */
+ /* resolutions */
+ short resolutionxyz;
+ short previewresxyz;
+ /* size of the domain in real units (meters along largest resolution x,y,z extent) */
+ float realsize;
+ /* show original meshes, preview or final sim */
+ short guiDisplayMode;
+ short renderDisplayMode;
+
+ /* fluid properties */
+ float viscosityValue;
+ short viscosityMode;
+ short viscosityExponent;
+ /* gravity strength */
+ float gravx,gravy,gravz;
+ /* anim start end time */
+ float animStart, animEnd;
+ /* g star param (LBM compressibility) */
+ float gstar;
+ /* activate refinement? */
+ int maxRefine;
+
+ /* fluid object type settings */
+ /* gravity strength */
+ float iniVelx,iniVely,iniVelz;
+
+ /* store pointer to original mesh (for replacing the current one) */
+ struct Mesh *orgMesh;
+ /* pointer to the currently loaded fluidsim mesh */
+ struct Mesh *meshSurface;
+ /* a mesh to display the bounding box used for simulation */
+ struct Mesh *meshBB;
+
+ /* store output path, and file prefix for baked fluid surface */
+ /* strlens; 80= FILE_MAXFILE, 160= FILE_MAXDIR */
+ char surfdataPath[240];
+
+ /* store start coords of axis aligned bounding box together with size */
+ /* values are inited during derived mesh display */
+ float bbStart[3], bbSize[3];
+
+ /* animated params */
+ struct Ipo *ipo;
+
+ /* additional flags depending on the type, lower short contains flags
+ * to check validity, higher short additional flags */
+ short typeFlags;
+ /* switch off velocity genration, volume init type for fluid/obstacles (volume=1,shell=2,both=3) */
+ char domainNovecgen,volumeInitType;
+
+ /* boundary "stickiness" for part slip values */
+ float partSlipValue;
+
+ /* number of tracers to generate */
+ int generateTracers;
+ /* particle generation - on if >0, then determines amount (experimental...) */
+ float generateParticles;
+ /* smooth fluid surface? */
+ float surfaceSmoothing;
+ /* number of surface subdivisions*/
+ int surfaceSubdivs;
+ int unusedDNADummy;
+
+ /* particle display - size scaling, and alpha influence */
+ float particleInfSize, particleInfAlpha;
+ /* testing vars */
+ float farFieldSize;
+
+ /* save fluidsurface normals in mvert.no, and surface vertex velocities (if available) in mvert.co */
+ struct MVert *meshSurfNormals;
+
+} FluidsimSettings;
+
+/* ob->fluidsimSettings defines */
+#define OB_FLUIDSIM_ENABLE 1
+#define OB_FLUIDSIM_DOMAIN 2
+#define OB_FLUIDSIM_FLUID 4
+#define OB_FLUIDSIM_OBSTACLE 8
+#define OB_FLUIDSIM_INFLOW 16
+#define OB_FLUIDSIM_OUTFLOW 32
+#define OB_FLUIDSIM_PARTICLE 64
+
+#define OB_TYPEFLAG_START 0
+#define OB_FSGEO_THIN (1<<(OB_TYPEFLAG_START+1))
+#define OB_FSBND_NOSLIP (1<<(OB_TYPEFLAG_START+2))
+#define OB_FSBND_PARTSLIP (1<<(OB_TYPEFLAG_START+3))
+#define OB_FSBND_FREESLIP (1<<(OB_TYPEFLAG_START+4))
+#define OB_FSINFLOW_LOCALCOORD (1<<(OB_TYPEFLAG_START+5))
+
+// guiDisplayMode particle flags
+#define OB_FSDOM_GEOM 1
+#define OB_FSDOM_PREVIEW 2
+#define OB_FSDOM_FINAL 3
+#define OB_FSPART_BUBBLE (1<<1)
+#define OB_FSPART_DROP (1<<2)
+#define OB_FSPART_NEWPART (1<<3)
+#define OB_FSPART_FLOAT (1<<4)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
new file mode 100644
index 00000000000..a821e209ef0
--- /dev/null
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -0,0 +1,154 @@
+/**
+ *
+ * $Id$
+ *
+ * ***** 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) 2004-2005 by Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_OBJECT_FORCE_H
+#define DNA_OBJECT_FORCE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+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;
+
+ 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 f_strength; /* The strength of the force (+ or - ) */
+ float f_power; /* The power law - real gravitation is 2 (square) */
+ float maxdist; /* if indicated, use this maximum */
+
+ 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 */
+} PartDeflect;
+
+
+typedef struct SBVertex {
+ float vec[4];
+} SBVertex;
+
+typedef struct SoftBody {
+ /* dynamic data */
+ int totpoint, totspring;
+ struct BodyPoint *bpoint; /* not saved in file */
+ struct BodySpring *bspring; /* not saved in file */
+ float ctime; /* last time calculated */
+
+ /* part of UI: */
+
+ /* general options */
+ float nodemass; /* softbody mass of *vertex* */
+ float grav; /* softbody amount of gravitaion to apply */
+ float mediafrict; /* friction to env */
+ float rklimit; /* error limit for ODE solver */
+ float physics_speed;/* user control over simulation speed */
+
+ /* goal */
+ float goalspring; /* softbody goal springs */
+ float goalfrict; /* softbody goal springs friction */
+ float mingoal; /* quick limits for goal */
+ float maxgoal;
+ float defgoal; /* default goal for vertices without vgroup */
+ short vertgroup; /* index starting at 1 */
+
+ short fuzzyness; /* */
+
+ /* springs */
+ float inspring; /* softbody inner springs */
+ float infrict; /* softbody inner springs friction */
+
+ /* baking */
+ int sfra, efra;
+ int interval;
+ short local, solverflags; /* local==1: use local coords for baking */
+
+ SBVertex **keys; /* array of size totpointkey */
+ int totpointkey, totkey; /* if totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys */
+ float secondspring;
+
+ /* self collision*/
+ float colball; /* fixed collision ball size if > 0 */
+ float balldamp; /* cooling down collision response */
+ float ballstiff; /* pressure the ball is loaded with */
+ short sbc_mode;
+ short aeroedge,
+ minloops,
+ maxloops,
+ choke,
+ pad3,pad4,pad5
+ ;
+
+ struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */
+
+} SoftBody;
+
+/* pd->forcefield: Effector Fields types */
+#define PFIELD_FORCE 1
+#define PFIELD_VORTEX 2
+#define PFIELD_MAGNET 3
+#define PFIELD_WIND 4
+#define PFIELD_GUIDE 5
+
+/* pd->flag: various settings */
+#define PFIELD_USEMAX 1
+#define PDEFLE_DEFORM 2
+#define PFIELD_GUIDE_PATH_ADD 4
+
+/* ob->softflag */
+#define OB_SB_ENABLE 1
+#define OB_SB_GOAL 2
+#define OB_SB_EDGES 4
+#define OB_SB_QUADS 8
+#define OB_SB_POSTDEF 16
+#define OB_SB_REDO 32
+#define OB_SB_BAKESET 64
+#define OB_SB_BAKEDO 128
+#define OB_SB_RESET 256
+#define OB_SB_SELF 512
+#define OB_SB_FACECOLL 1024
+#define OB_SB_EDGECOLL 2048
+#define OB_SB_COLLFINAL 4096
+
+#define SBSO_MONITOR 1
+#define SBSO_OLDERR 2
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
new file mode 100644
index 00000000000..cb4aa42a847
--- /dev/null
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -0,0 +1,442 @@
+/**
+ * blenlib/DNA_object_types.h (mar-2001 nzc)
+ *
+ * Object is a sort of wrapper for general info.
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_OBJECT_TYPES_H
+#define DNA_OBJECT_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bPose;
+struct Object;
+struct Ipo;
+struct BoundBox;
+struct Path;
+struct Material;
+struct bConstraintChannel;
+struct PartDeflect;
+struct SoftBody;
+struct FluidsimSettings;
+struct DerivedMesh;
+
+typedef struct bDeformGroup {
+ struct bDeformGroup *next, *prev;
+ char name[32];
+} bDeformGroup;
+
+typedef struct BoundBox {
+ float vec[8][3];
+ int flag, pad;
+} BoundBox;
+
+/* boundbox flag */
+#define OB_BB_DISABLED 1
+
+typedef struct Object {
+ ID id;
+
+ short type, partype;
+ int par1, par2, par3; /* can be vertexnrs */
+ char parsubstr[32]; /* String describing subobject info */
+ struct Object *parent, *track;
+ /* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
+ /* proxy_from is set in target back to the proxy. */
+ struct Object *proxy, *proxy_group, *proxy_from;
+ struct Ipo *ipo;
+ struct Path *path;
+ struct BoundBox *bb;
+ struct bAction *action;
+ struct bPose *pose;
+ void *data;
+
+ ListBase constraintChannels;
+ ListBase effect;
+ ListBase disp;
+ ListBase defbase;
+ ListBase modifiers; /* list of ModifierData structures */
+
+ struct Material **mat;
+
+ /* rot en drot have to be together! (transform('r' en 's')) */
+ float loc[3], dloc[3], orig[3];
+ float size[3], dsize[3];
+ float rot[3], drot[3];
+ float quat[4], dquat[4];
+ float obmat[4][4];
+ float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
+ float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
+ float imat[4][4]; /* for during render, old game engine, temporally: ipokeys of transform */
+
+ unsigned int lay; /* copy of Base */
+
+ short flag; /* copy of Base */
+ short colbits; /* when zero, from obdata */
+
+ short transflag, ipoflag; /* transformation and ipo settings */
+ short trackflag, upflag;
+ short nlaflag, protectflag; /* nlaflag defines NLA override, protectflag is bits to lock transform */
+ short ipowin, scaflag; /* ipowin: blocktype last ipowindow */
+ short scavisflag, boundtype;
+
+ int dupon, dupoff, dupsta, dupend;
+
+ float sf, ctime;
+
+ /* during realtime */
+
+ /* note that inertia is only called inertia for historical reasons
+ * and is not changed to avoid DNA surgery. It actually reflects the
+ * Size value in the GameButtons (= radius) */
+
+ float mass, damping, inertia;
+ /* The form factor k is introduced to give the user more control
+ * and to fix incompatibility problems.
+ * For rotational symmetric objects, the inertia value can be
+ * expressed as: Theta = k * m * r^2
+ * where m = Mass, r = Radius
+ * For a Sphere, the form factor is by default = 0.4
+ */
+
+ float formfactor;
+ float rdamping, sizefac;
+
+ char dt, dtx;
+ char totcol; /* copy of mesh or curve or meta */
+ char actcol; /* currently selected material in the user interface */
+ char empty_drawtype, pad1[7];
+ float empty_drawsize;
+
+ ScriptLink scriptlink;
+ ListBase prop;
+ ListBase sensors;
+ ListBase controllers;
+ ListBase actuators;
+
+ /* now used to store cache particles,
+ * should be renamed see effect.c (Campbell) */
+ void *sumohandle;
+
+ float bbsize[3];
+ short index; /* custom index, for renderpasses */
+ unsigned short actdef; /* current deformation group */
+ float col[4]; /* object color, adjusted via IPO's only */
+ /**
+ * Settings for game objects
+ * bit 0: Object has dynamic behaviour
+ * bit 2: Object is evaluated by the gameengine
+ * bit 6: Use Fh settings in Materials
+ * bit 7: Use face normal to rotate Object
+ * bit 8: Friction is anisotropic
+ * bit 9: Object is a ghost
+ * bit 10: Do rigid body dynamics.
+ * bit 11: Use bounding object for physics
+ */
+ int gameflag;
+ /**
+ * More settings
+ * bit 15: Always ignore activity culling
+ */
+ int gameflag2;
+ short softflag; /* softboday settings */
+ short recalc; /* dependency flag */
+ float anisotropicFriction[3];
+
+ ListBase constraints;
+ ListBase nlastrips;
+ ListBase hooks;
+
+ struct PartDeflect *pd; /* particle deflector/attractor/collision data */
+ struct SoftBody *soft; /* if exists, saved in file */
+ struct Group *dup_group; /* object duplicator for group */
+
+ short fluidsimFlag; /* NT toggle fluidsim participation on/off */
+
+ short restrictflag; /* for restricting view, select, render etc. accessible in outliner */
+
+ short shapenr, shapeflag; /* current shape key for menu or pinned, flag for pinning */
+ float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */
+ short recalco, pad4; /* recalco for temp storage of ob->recalc, bad design warning */
+
+ 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;
+
+/*#ifdef WITH_VERSE*/
+ void *vnode; /* pointer at object VerseNode */
+/*#endif*/
+} Object;
+
+/* Warning, this is not used anymore because hooks are now modifiers */
+typedef struct ObHook {
+ struct ObHook *next, *prev;
+
+ struct Object *parent;
+ float parentinv[4][4]; /* matrix making current transform unmodified */
+ float mat[4][4]; /* temp matrix while hooking */
+ float cent[3]; /* visualization of hook */
+ float falloff; /* if not zero, falloff is distance where influence zero */
+
+ char name[32];
+
+ int *indexar;
+ int totindex, curindex; /* curindex is cache for fast lookup */
+ short type, active; /* active is only first hook, for button menu */
+ float force;
+} ObHook;
+
+
+/* this work object is defined in object.c */
+extern Object workob;
+
+
+/* **************** OBJECT ********************* */
+
+/* used many places... should be specialized */
+#define SELECT 1
+
+/* type */
+#define OB_EMPTY 0
+#define OB_MESH 1
+#define OB_CURVE 2
+#define OB_SURF 3
+#define OB_FONT 4
+#define OB_MBALL 5
+
+#define OB_LAMP 10
+#define OB_CAMERA 11
+
+#define OB_WAVE 21
+#define OB_LATTICE 22
+
+/* 23 and 24 are for life and sector (old file compat.) */
+#define OB_ARMATURE 25
+
+/* partype: first 4 bits: type */
+#define PARTYPE 15
+#define PAROBJECT 0
+#define PARCURVE 1
+#define PARKEY 2
+
+#define PARSKEL 4
+#define PARVERT1 5
+#define PARVERT3 6
+#define PARBONE 7
+#define PARSLOW 16
+
+/* (short) transflag */
+#define OB_OFFS_LOCAL 1
+#define OB_QUAT 2
+#define OB_NEG_SCALE 4
+#define OB_DUPLI (8+16+256+512)
+#define OB_DUPLIFRAMES 8
+#define OB_DUPLIVERTS 16
+#define OB_DUPLIROT 32
+#define OB_DUPLINOSPEED 64
+#define OB_POWERTRACK 128
+#define OB_DUPLIGROUP 256
+#define OB_DUPLIFACES 512
+#define OB_DUPLIFACES_SCALE 1024
+
+/* (short) ipoflag */
+#define OB_DRAWKEY 1
+#define OB_DRAWKEYSEL 2
+#define OB_OFFS_OB 4
+#define OB_OFFS_MAT 8
+#define OB_OFFS_VKEY 16
+#define OB_OFFS_PATH 32
+#define OB_OFFS_PARENT 64
+#define OB_OFFS_PARTICLE 128
+ /* get ipo from from action or not? */
+#define OB_ACTION_OB 256
+#define OB_ACTION_KEY 512
+ /* for stride edit */
+#define OB_DISABLE_PATH 1024
+
+/* (short) trackflag / upflag */
+#define OB_POSX 0
+#define OB_POSY 1
+#define OB_POSZ 2
+#define OB_NEGX 3
+#define OB_NEGY 4
+#define OB_NEGZ 5
+
+/* gameflag in game.h */
+
+/* dt: no flags */
+#define OB_BOUNDBOX 1
+#define OB_WIRE 2
+#define OB_SOLID 3
+#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))
+
+/* dtx: flags, char! */
+#define OB_AXIS 2
+#define OB_TEXSPACE 4
+#define OB_DRAWNAME 8
+#define OB_DRAWIMAGE 16
+ /* for solid+wire display */
+#define OB_DRAWWIRE 32
+ /* for overdraw */
+#define OB_DRAWXRAY 64
+ /* enable transparent draw */
+#define OB_DRAWTRANSP 128
+
+/* empty_drawtype: no flags */
+#define OB_ARROWS 1
+#define OB_PLAINAXES 2
+#define OB_CIRCLE 3
+#define OB_SINGLE_ARROW 4
+#define OB_CUBE 5
+
+/* boundtype */
+#define OB_BOUND_BOX 0
+#define OB_BOUND_SPHERE 1
+#define OB_BOUND_CYLINDER 2
+#define OB_BOUND_CONE 3
+#define OB_BOUND_POLYH 4
+#define OB_BOUND_POLYT 5
+#define OB_BOUND_DYN_MESH 6
+
+
+/* **************** BASE ********************* */
+
+/* also needed for base!!!!! or rather, thy interfere....*/
+/* base->flag and ob->flag */
+#define BA_WAS_SEL 2
+#define BA_HAS_RECALC_OB 4
+#define BA_HAS_RECALC_DATA 8
+
+#define BA_DO_IPO 32
+
+#define BA_FROMSET 128
+
+/* an initial attempt as making selection more specific! */
+#define BA_DESELECT 0
+#define BA_SELECT 1
+
+
+#define OB_FROMDUPLI 512
+#define OB_DONE 1024
+#define OB_RADIO 2048
+#define OB_FROMGROUP 4096
+#define OB_POSEMODE 8192
+
+/* ob->recalc (flag bits!) */
+#define OB_RECALC_OB 1
+#define OB_RECALC_DATA 2
+ /* time flag is set when time changes need recalc, so baked systems can ignore it */
+#define OB_RECALC_TIME 4
+#define OB_RECALC 7
+
+/* ob->gameflag */
+#define OB_DYNAMIC 1
+#define OB_CHILD 2
+#define OB_ACTOR 4
+#define OB_INERTIA_LOCK_X 8
+#define OB_INERTIA_LOCK_Y 16
+#define OB_INERTIA_LOCK_Z 32
+#define OB_DO_FH 64
+#define OB_ROT_FH 128
+#define OB_ANISOTROPIC_FRICTION 256
+#define OB_GHOST 512
+#define OB_RIGID_BODY 1024
+#define OB_BOUNDS 2048
+
+#define OB_COLLISION_RESPONSE 4096
+#define OB_SECTOR 8192
+#define OB_PROP 16384
+#define OB_MAINACTOR 32768
+
+/* ob->gameflag2 */
+#define OB_NEVER_DO_ACTIVITY_CULLING 1
+
+#define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD)
+
+/* ob->scavisflag */
+#define OB_VIS_SENS 1
+#define OB_VIS_CONT 2
+#define OB_VIS_ACT 4
+
+/* ob->scaflag */
+#define OB_SHOWSENS 64
+#define OB_SHOWACT 128
+#define OB_ADDSENS 256
+#define OB_ADDCONT 512
+#define OB_ADDACT 1024
+#define OB_SHOWCONT 2048
+
+/* ob->restrictflag */
+#define OB_RESTRICT_VIEW 1
+#define OB_RESTRICT_SELECT 2
+#define OB_RESTRICT_RENDER 4
+
+/* ob->shapeflag */
+#define OB_SHAPE_LOCK 1
+#define OB_SHAPE_TEMPLOCK 2
+
+/* ob->nlaflag */
+#define OB_NLA_OVERRIDE 1
+#define OB_NLA_COLLAPSED 2
+
+/* ob->protectflag */
+#define OB_LOCK_LOCX 1
+#define OB_LOCK_LOCY 2
+#define OB_LOCK_LOCZ 4
+#define OB_LOCK_LOC 7
+#define OB_LOCK_ROTX 8
+#define OB_LOCK_ROTY 16
+#define OB_LOCK_ROTZ 32
+#define OB_LOCK_SCALEX 64
+#define OB_LOCK_SCALEY 128
+#define OB_LOCK_SCALEZ 256
+
+/* ob->softflag in DNA_object_force.h */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_oops_types.h b/source/blender/makesdna/DNA_oops_types.h
new file mode 100644
index 00000000000..aaee18e3249
--- /dev/null
+++ b/source/blender/makesdna/DNA_oops_types.h
@@ -0,0 +1,86 @@
+/**
+ * blenlib/DNA_oops_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_OOPS_TYPES_H
+#define DNA_OOPS_TYPES_H
+
+#define OOPSX 5.0
+#define OOPSY 1.8
+
+#include "DNA_listBase.h"
+
+struct ID;
+
+typedef struct TreeStoreElem {
+ short type, nr, flag, used;
+ struct ID *id;
+} TreeStoreElem;
+
+typedef struct TreeStore {
+ int totelem, usedelem;
+ TreeStoreElem *data;
+} TreeStore;
+
+typedef struct Oops {
+ struct Oops *next, *prev;
+ short type, flag, dt, hide;
+ float x, y; /* left - bottom */
+ float dx, dy; /* shuffle */
+ struct ID *id;
+ ListBase link;
+} Oops;
+
+#
+#
+typedef struct OopsLink {
+ struct OopsLink *next, *prev;
+ short type, flag;
+ struct ID **idfrom;
+ Oops *to, *from; /* from is for temp */
+ float xof, yof;
+ char name[12];
+} OopsLink;
+
+/* oops->flag (1==SELECT) */
+#define OOPS_DOSELECT 2
+#define OOPS_REFER 4
+
+/* TreeStoreElem->flag */
+#define TSE_CLOSED 1
+#define TSE_SELECTED 2
+#define TSE_TEXTBUT 4
+
+/* TreeStoreElem types in BIF_outliner.h */
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h
new file mode 100644
index 00000000000..a0fdd892106
--- /dev/null
+++ b/source/blender/makesdna/DNA_packedFile_types.h
@@ -0,0 +1,65 @@
+/* DNA_packedFile_types.h
+ *
+ * 12-oct-2000 nzc
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_PACKEDFILE_TYPES_H
+#define DNA_PACKEDFILE_TYPES_H
+
+typedef struct PackedFile {
+ int size;
+ int seek;
+ int flags;
+ int pad;
+ void * data;
+} PackedFile;
+
+enum PF_FileStatus
+{
+ PF_EQUAL = 0,
+ PF_DIFFERS,
+ PF_NOFILE,
+
+ PF_WRITE_ORIGINAL,
+ PF_WRITE_LOCAL,
+ PF_USE_LOCAL,
+ PF_USE_ORIGINAL,
+ PF_KEEP,
+ PF_REMOVE,
+ PF_NOOP,
+
+ PF_ASK
+};
+
+#endif /* PACKEDFILE_TYPES_H */
+
diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h
new file mode 100644
index 00000000000..e46d557cc8b
--- /dev/null
+++ b/source/blender/makesdna/DNA_property_types.h
@@ -0,0 +1,68 @@
+/**
+ * blenlib/DNA_property_types.h (mar-2001 nzc)
+ *
+ * Renderrecipe and scene decription. The fact that there is a
+ * hierarchy here is a bit strange, and not desirable.
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_PROPERTY_TYPES_H
+#define DNA_PROPERTY_TYPES_H
+
+/* ********************* PROPERTY ************************ */
+
+typedef struct bProperty {
+ struct bProperty *next, *prev;
+ char name[32];
+ short type, otype; /* otype is for buttons, when a property type changes */
+ int data; /* data should be 4 bytes to store int,float stuff */
+ int old; /* old is for simul */
+ short flag, pad;
+ void *poin;
+ void *oldpoin; /* oldpoin is for simul */
+
+} bProperty;
+
+/* property->type */
+#define PROP_BOOL 0
+#define PROP_INT 1
+#define PROP_FLOAT 2
+#define PROP_STRING 3
+#define PROP_VECTOR 4
+#define PROP_TIME 5
+
+/* property->flag */
+#define PROP_DEBUG 1
+
+#define MAX_PROPSTRING 128
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_radio_types.h b/source/blender/makesdna/DNA_radio_types.h
new file mode 100644
index 00000000000..adaa4e6e159
--- /dev/null
+++ b/source/blender/makesdna/DNA_radio_types.h
@@ -0,0 +1,53 @@
+/**
+ * radio_types.h dec 2000 Nzc
+ *
+ * All type defs for the Blender core.
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ */
+
+#ifndef DNA_RADIO_TYPES_H
+#define DNA_RADIO_TYPES_H
+
+typedef struct Radio {
+ short hemires, maxiter;
+ short drawtype, flag; /* bit 0 and 1: show limits */
+ short subshootp, subshoote, nodelim, maxsublamp;
+ short pama, pami, elma, elmi; /* patch and elem limits */
+ int maxnode;
+ float convergence;
+ float radfac, gamma; /* for display */
+
+} Radio;
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
new file mode 100644
index 00000000000..031a88c517a
--- /dev/null
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -0,0 +1,672 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SCENE_TYPES_H
+#define DNA_SCENE_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "DNA_vec_types.h"
+#include "DNA_listBase.h"
+#include "DNA_scriptlink_types.h"
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct Radio;
+struct Object;
+struct World;
+struct Scene;
+struct Image;
+struct Group;
+struct bNodeTree;
+
+typedef struct Base {
+ struct Base *next, *prev;
+ unsigned int lay, selcol;
+ int flag;
+ short sx, sy;
+ struct Object *object;
+} Base;
+
+typedef struct AviCodecData {
+ void *lpFormat; /* save format */
+ void *lpParms; /* compressor options */
+ unsigned int cbFormat; /* size of lpFormat buffer */
+ unsigned int cbParms; /* size of lpParms buffer */
+
+ unsigned int fccType; /* stream type, for consistency */
+ unsigned int fccHandler; /* compressor */
+ unsigned int dwKeyFrameEvery; /* keyframe rate */
+ unsigned int dwQuality; /* compress quality 0-10,000 */
+ unsigned int dwBytesPerSecond; /* bytes per second */
+ unsigned int dwFlags; /* flags... see below */
+ unsigned int dwInterleaveEvery; /* for non-video streams only */
+ unsigned int pad;
+
+ char avicodecname[128];
+} AviCodecData;
+
+typedef struct QuicktimeCodecData {
+
+ void *cdParms; /* codec/compressor options */
+ void *pad; /* padding */
+
+ unsigned int cdSize; /* size of cdParms buffer */
+ unsigned int pad2; /* padding */
+
+ char qtcodecname[128];
+} QuicktimeCodecData;
+
+typedef struct FFMpegCodecData {
+ int type;
+ int codec;
+ int audio_codec;
+ int video_bitrate;
+ int audio_bitrate;
+ int gop_size;
+ int flags;
+
+ int rc_min_rate;
+ int rc_max_rate;
+ int rc_buffer_size;
+ int mux_packet_size;
+ int mux_rate;
+} FFMpegCodecData;
+
+
+typedef struct AudioData {
+ int mixrate;
+ float main; /* Main mix in dB */
+ short flag;
+ short pad[3];
+} AudioData;
+
+typedef struct SceneRenderLayer {
+ struct SceneRenderLayer *next, *prev;
+
+ char name[32];
+
+ struct Material *mat_override;
+ struct Group *light_override;
+
+ unsigned int lay; /* scene->lay itself has priority over this */
+ int layflag;
+ int passflag; /* pass_xor has to be after passflag */
+ int pass_xor;
+} SceneRenderLayer;
+
+/* srl->layflag */
+#define SCE_LAY_SOLID 1
+#define SCE_LAY_ZTRA 2
+#define SCE_LAY_HALO 4
+#define SCE_LAY_EDGE 8
+#define SCE_LAY_SKY 16
+#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
+
+/* srl->passflag */
+#define SCE_PASS_COMBINED 1
+#define SCE_PASS_Z 2
+#define SCE_PASS_RGBA 4
+#define SCE_PASS_DIFFUSE 8
+#define SCE_PASS_SPEC 16
+#define SCE_PASS_SHADOW 32
+#define SCE_PASS_AO 64
+#define SCE_PASS_REFLECT 128
+#define SCE_PASS_NORMAL 256
+#define SCE_PASS_VECTOR 512
+#define SCE_PASS_REFRACT 1024
+#define SCE_PASS_INDEXOB 2048
+#define SCE_PASS_UV 4096
+#define SCE_PASS_RADIO 8192
+/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
+
+
+typedef struct RenderData {
+
+ struct AviCodecData *avicodecdata;
+ struct QuicktimeCodecData *qtcodecdata;
+ struct FFMpegCodecData ffcodecdata;
+
+ int cfra, sfra, efra; /* frames as in 'images' */
+ int psfra, pefra; /* start+end frames of preview range */
+
+ int images, framapto;
+ short flag, threads;
+
+ float ctime; /* use for calcutions */
+ float framelen, blurfac;
+
+ /** For UR edge rendering: give the edges this color */
+ float edgeR, edgeG, edgeB;
+
+ short fullscreen, xplay, yplay, freqplay; /* standalone player */
+ short depth, attrib, rt1, rt2; /* standalone player */
+
+ short stereomode; /* standalone player stereo settings */
+
+ short dimensionspreset; /* for the dimensions presets menu */
+
+ short filtertype; /* filter is box, tent, gauss, mitch, etc */
+
+ short size, maximsize; /* size in %, max in Kb */
+ /* from buttons: */
+ /**
+ * The desired number of pixels in the x direction
+ */
+ short xsch;
+ /**
+ * The desired number of pixels in the y direction
+ */
+ short ysch;
+ /**
+ * Adjustment factors for the aspect ratio in the x direction
+ */
+ short xasp;
+ /**
+ * Adjustment factors for the aspect ratio in the x direction
+ */
+ short yasp;
+ /**
+ * The number of part to use in the x direction
+ */
+ short xparts;
+ /**
+ * The number of part to use in the y direction
+ */
+ short yparts;
+
+ short winpos, planes, imtype, subimtype;
+
+ /** Mode bits: */
+ /* 0: Enable backbuffering for images */
+ short bufflag;
+ short quality;
+
+ /**
+ * Flags for render settings. Use bit-masking to access the settings.
+ */
+ short scemode;
+
+ /**
+ * Flags for render settings. Use bit-masking to access the settings.
+ */
+ int mode;
+
+ /* render engine, octree resolution */
+ short renderer, ocres, rpad[2];
+
+ /**
+ * What to do with the sky/background. Picks sky/premul/key
+ * blending for the background
+ */
+ short alphamode;
+
+ /**
+ * The number of samples to use per pixel.
+ */
+ short osa;
+
+ short frs_sec, edgeint;
+
+ /* safety, border and display rect */
+ rctf safety, border;
+ rcti disprect;
+
+ /* information on different layers to be rendered */
+ ListBase layers;
+ short actlay, pad;
+
+ float frs_sec_base;
+
+ /**
+ * Value used to define filter size for all filter options */
+ float gauss;
+
+ /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
+ float postmul, postgamma, posthue, postsat;
+
+ /* Dither noise intensity */
+ float dither_intensity;
+
+ /* Bake Render options */
+ short bake_osa, bake_filter, bake_mode, bake_flag;
+
+ /* yafray: global panel params. TODO: move elsewhere */
+ short GIquality, GIcache, GImethod, GIphotons, GIdirect;
+ short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
+ int GIdepth, GIcausdepth, GIpixelspersample;
+ int GIphotoncount, GImixphotons;
+ float GIphotonradius;
+ int YF_numprocs, YF_raydepth, YF_AApasses, YF_AAsamples;
+ 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];
+
+ /* 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];
+} RenderData;
+
+
+typedef struct GameFraming {
+ float col[3];
+ char type, pad1, pad2, pad3;
+} GameFraming;
+
+#define SCE_GAMEFRAMING_BARS 0
+#define SCE_GAMEFRAMING_EXTEND 1
+#define SCE_GAMEFRAMING_SCALE 2
+
+typedef struct TimeMarker {
+ struct TimeMarker *next, *prev;
+ int frame;
+ char name[64];
+ unsigned int flag;
+} TimeMarker;
+
+struct ImagePaintSettings {
+ struct Brush *brush;
+ short flag, tool;
+ int pad3;
+};
+
+typedef struct ToolSettings {
+ /* Subdivide Settings */
+ short cornertype;
+ short editbutflag;
+ /*Triangle to Quad conversion threshold*/
+ float jointrilimit;
+ /* Extrude Tools */
+ float degr;
+ short step;
+ short turn;
+
+ float extr_offs;
+ float doublimit;
+
+ /* Primitive Settings */
+ /* UV Sphere */
+ short segments;
+ short rings;
+
+ /* Cylinder - Tube - Circle */
+ short vertices;
+
+ /* UV Calculation */
+ short unwrapper;
+ float uvcalc_radius;
+ float uvcalc_cubesize;
+ short uvcalc_mapdir;
+ short uvcalc_mapalign;
+ short uvcalc_flag;
+
+ short pad2;
+
+ /* Image Paint (8 byte aligned please!) */
+ struct ImagePaintSettings imapaint;
+
+ /* Select Group Threshold */
+ float select_thresh;
+
+ /* IPO-Editor */
+ float clean_thresh;
+
+ /* Retopo */
+ char retopo_mode;
+ char retopo_paint_tool;
+ char line_div, ellipse_div, retopo_hotspot;
+
+ /* Multires */
+ char multires_subdiv_type;
+
+ char pad4[2];
+} ToolSettings;
+
+/* Used by all brushes to store their properties, which can be directly set
+ by the interface code. Note that not all properties are actually used by
+ all the brushes. */
+typedef struct BrushData
+{
+ short size;
+ char strength, dir; /* Not used for smooth brush */
+ char airbrush;
+ char view;
+ char pad[2];
+} BrushData;
+
+struct SculptSession;
+typedef struct SculptData
+{
+ /* Data stored only from entering sculptmode until exiting sculptmode */
+ struct SculptSession *session;
+
+ /* Pointers to all of sculptmodes's textures */
+ struct MTex *mtex[10];
+
+ /* Settings for each brush */
+ BrushData drawbrush, smoothbrush, pinchbrush, inflatebrush, grabbrush, layerbrush, flattenbrush;
+ short brush_type;
+
+ /* For the Brush Shape */
+ short texact, texnr;
+ short spacing;
+ char texrept;
+ char texfade;
+ char texsep;
+
+ char averaging;
+ char flags;
+
+ /* Control tablet input */
+ char tablet_size, tablet_strength;
+
+ /* Symmetry is separate from the other BrushData because the same
+ settings are always used for all brush types */
+ char symm;
+} SculptData;
+
+typedef struct Scene {
+ ID id;
+ struct Object *camera;
+ struct World *world;
+
+ struct Scene *set;
+ struct Image *ima;
+
+ ListBase base;
+ struct Base *basact;
+
+ float cursor[3];
+ float twcent[3]; /* center for transform widget */
+ float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
+ unsigned int lay;
+
+ /* editmode stuff */
+ float editbutsize; /* size of normals */
+ short selectmode; /* for mesh only! */
+ short proportional, prop_mode;
+ short automerge, pad5, pad6, pad7;
+
+ short use_nodes;
+
+ struct bNodeTree *nodetree;
+
+ void *ed; /* sequence editor data is allocated here */
+ struct Radio *radio;
+
+ struct GameFraming framing;
+
+ struct ToolSettings *toolsettings;
+
+ /* migrate or replace? depends on some internal things... */
+ /* no, is on the right place (ton) */
+ struct RenderData r;
+ struct AudioData audio;
+
+ ScriptLink scriptlink;
+
+ ListBase markers;
+
+ short jumpframe, pad1;
+ short snap_flag, snap_target;
+
+ /* none of the dependancy graph vars is mean to be saved */
+ struct DagForest *theDag;
+ short dagisvalid, dagflags;
+ short pad4, recalc; /* recalc = counterpart of ob->recalc */
+
+ /* Sculptmode data */
+ struct SculptData sculptdata;
+} Scene;
+
+
+/* **************** RENDERDATA ********************* */
+
+/* bufflag */
+#define R_BACKBUF 1
+#define R_BACKBUFANIM 2
+#define R_FRONTBUF 4
+#define R_FRONTBUFANIM 8
+
+/* mode (int now) */
+#define R_OSA 0x0001
+#define R_SHADOW 0x0002
+#define R_GAMMA 0x0004
+#define R_ORTHO 0x0008
+#define R_ENVMAP 0x0010
+#define R_EDGE 0x0020
+#define R_FIELDS 0x0040
+#define R_FIELDSTILL 0x0080
+#define R_RADIO 0x0100
+#define R_BORDER 0x0200
+#define R_PANORAMA 0x0400
+#define R_CROP 0x0800
+#define R_COSMO 0x1000
+#define R_ODDFIELD 0x2000
+#define R_MBLUR 0x4000
+ /* unified was here */
+#define R_RAYTRACE 0x10000
+ /* R_GAUSS is obsolete, but used to retrieve setting from old files */
+#define R_GAUSS 0x20000
+ /* fbuf obsolete... */
+#define R_FBUF 0x40000
+ /* threads obsolete... is there for old files */
+#define R_THREADS 0x80000
+#define R_SPEED 0x100000
+#define R_SSS 0x200000
+
+/* filtertype */
+#define R_FILTER_BOX 0
+#define R_FILTER_TENT 1
+#define R_FILTER_QUAD 2
+#define R_FILTER_CUBIC 3
+#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
+#define R_YAFRAY 1
+
+/* scemode */
+#define R_DOSEQ 0x0001
+#define R_BG_RENDER 0x0002
+ /* passepartout is camera option now, keep this for backward compatibility */
+#define R_PASSEPARTOUT 0x0004
+#define R_PREVIEWBUTS 0x0008
+#define R_EXTENSION 0x0010
+#define R_NODE_PREVIEW 0x0020
+#define R_DOCOMP 0x0040
+#define R_COMP_CROP 0x0080
+#define R_FREE_IMAGE 0x0100
+#define R_SINGLE_LAYER 0x0200
+#define R_EXR_TILE_FILE 0x0400
+#define R_COMP_FREE 0x0800
+#define R_NO_IMAGE_LOAD 0x1000
+#define R_NO_TEX 0x2000
+#define R_STAMP_INFO 0x4000
+
+/* 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
+
+/* alphamode */
+#define R_ADDSKY 0
+#define R_ALPHAPREMUL 1
+#define R_ALPHAKEY 2
+
+/* planes */
+#define R_PLANES24 24
+#define R_PLANES32 32
+#define R_PLANESBW 8
+
+/* imtype */
+#define R_TARGA 0
+#define R_IRIS 1
+#define R_HAMX 2
+#define R_FTYPE 3
+#define R_JPEG90 4
+#define R_MOVIE 5
+#define R_IRIZ 7
+#define R_RAWTGA 14
+#define R_AVIRAW 15
+#define R_AVIJPEG 16
+#define R_PNG 17
+#define R_AVICODEC 18
+#define R_QUICKTIME 19
+#define R_BMP 20
+#define R_RADHDR 21
+#define R_TIFF 22
+#define R_OPENEXR 23
+#define R_FFMPEG 24
+#define R_FRAMESERVER 25
+#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
+
+/* bake_mode: same as RE_BAKE_xxx defines */
+/* bake_flag: */
+#define R_BAKE_CLEAR 1
+#define R_BAKE_OSA 2
+
+/* **************** SCENE ********************* */
+#define RAD_PHASE_PATCHES 1
+#define RAD_PHASE_FACES 2
+
+/* base->flag is in DNA_object_types.h */
+
+/* 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
+
+/* sce->selectmode */
+#define SCE_SELECT_VERTEX 1 /* for mesh */
+#define SCE_SELECT_EDGE 2
+#define SCE_SELECT_FACE 4
+
+/* sce->recalc (now in use by previewrender) */
+#define SCE_PRV_CHANGED 1
+
+/* sce->prop_mode (proportional falloff) */
+#define PROP_SMOOTH 0
+#define PROP_SPHERE 1
+#define PROP_ROOT 2
+#define PROP_SHARP 3
+#define PROP_LIN 4
+#define PROP_CONST 5
+#define PROP_RANDOM 6
+
+ /* return flag next_object function */
+#define F_START 0
+#define F_SCENE 1
+#define F_SET 2
+#define F_DUPLI 3
+
+/* audio->flag */
+#define AUDIO_MUTE 1
+#define AUDIO_SYNC 2
+#define AUDIO_SCRUB 4
+
+#define FFMPEG_MULTIPLEX_AUDIO 1
+#define FFMPEG_AUTOSPLIT_OUTPUT 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 INFLATE_BRUSH 4
+#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
+
+#define SYMM_X 1
+#define SYMM_Y 2
+#define SYMM_Z 4
+
+/* toolsettings->imagepaint_flag */
+#define IMAGEPAINT_DRAWING 1
+#define IMAGEPAINT_DRAW_TOOL 2
+#define IMAGEPAINT_DRAW_TOOL_DRAWING 4
+
+/* toolsettings->retopo_mode */
+#define RETOPO 1
+#define RETOPO_PAINT 2
+
+/* toolsettings->retopo_paint_tool */
+#define RETOPO_PEN 1
+#define RETOPO_LINE 2
+#define RETOPO_ELLIPSE 4
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
new file mode 100644
index 00000000000..65374983af5
--- /dev/null
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -0,0 +1,171 @@
+/**
+ * blenlib/DNA_screen_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SCREEN_TYPES_H
+#define DNA_SCREEN_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct Scene;
+
+typedef struct bScreen {
+ ID id;
+ ListBase vertbase, edgebase, areabase;
+ struct Scene *scene;
+ short startx, endx, starty, endy; /* framebuffer coords */
+ short sizex, sizey;
+ short scenenr, screennr; /* only for pupmenu */
+ short full, pad;
+ short mainwin, winakt;
+ short handler[8]; /* similar to space handler now */
+} bScreen;
+
+typedef struct ScrVert {
+ struct ScrVert *next, *prev, *newv;
+ vec2s vec;
+ int flag;
+} ScrVert;
+
+typedef struct ScrEdge {
+ struct ScrEdge *next, *prev;
+ ScrVert *v1, *v2;
+ short border; /* 1 when at edge of screen */
+ short flag;
+ int pad;
+} ScrEdge;
+
+#ifndef DNA_USHORT_FIX
+#define DNA_USHORT_FIX
+/**
+ * @deprecated This typedef serves to avoid badly typed functions when
+ * @deprecated compiling while delivering a proper dna.c. Do not use
+ * @deprecated it in any case.
+ */
+typedef unsigned short dna_ushort_fix;
+#endif
+
+
+
+typedef struct Panel { /* the part from uiBlock that needs saved in file */
+ struct Panel *next, *prev;
+ char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */
+ char drawname[64]; /* panelname is identifier for restoring location */
+ short ofsx, ofsy, sizex, sizey;
+ short flag, active; /* active= used currently by a uiBlock */
+ short control;
+ short snap;
+ short old_ofsx, old_ofsy; /* for stow */
+ int sortcounter; /* when sorting panels, it uses this to put new ones in right place */
+ struct Panel *paneltab; /* this panel is tabbed in *paneltab */
+} Panel;
+
+typedef struct ScrArea {
+ struct ScrArea *next, *prev;
+ ScrVert *v1, *v2, *v3, *v4;
+ bScreen *full; /* if area==full, this is the parent */
+ float winmat[4][4];
+ rcti totrct, headrct, winrct;
+
+ short headwin, win;
+ short headertype; /* 0=no header, 1= down, 2= up */
+ char spacetype, butspacetype; /* SPACE_... */
+ short winx, winy; /* size */
+ char head_swap, head_equal;
+ char win_swap, win_equal;
+
+ short headbutlen, headbutofs;
+ short cursor, flag;
+
+ ScriptLink scriptlink;
+
+ ListBase spacedata;
+ ListBase uiblocks;
+ ListBase panels;
+} ScrArea;
+
+#define MAXWIN 128
+
+/* area->flag */
+#define HEADER_NO_PULLDOWN 1
+
+/* If you change EDGEWIDTH, also do the global arrat edcol[] */
+#define EDGEWIDTH 1
+#define EDGEWIDTH2 0
+#define AREAGRID 4
+#define AREAMINX 32
+#define HEADERY 26
+#define AREAMINY (HEADERY+EDGEWIDTH)
+
+#define HEADERDOWN 1
+#define HEADERTOP 2
+
+#define SCREENNORMAL 0
+#define SCREENFULL 1
+#define SCREENAUTOPLAY 2
+
+/* sa->win_swap */
+#define WIN_FRONT_OK 1
+#define WIN_BACK_OK 2
+#define WIN_EQUAL 3
+
+#define L_SCROLL 1 /* left scrollbar */
+#define R_SCROLL 2
+#define VERT_SCROLL 3
+#define T_SCROLL 4
+#define B_SCROLL 8
+#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
+#define PNL_SNAP_TOP 1
+#define PNL_SNAP_RIGHT 2
+#define PNL_SNAP_BOTTOM 4
+#define PNL_SNAP_LEFT 8
+
+#define PNL_SNAP_DIST 9.0
+
+/* screen handlers */
+#define SCREEN_MAXHANDLER 8
+
+#define SCREEN_HANDLER_ANIM 1
+#define SCREEN_HANDLER_PYTHON 2
+#define SCREEN_HANDLER_VERSE 3
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_scriptlink_types.h b/source/blender/makesdna/DNA_scriptlink_types.h
new file mode 100644
index 00000000000..8a08d3f12c1
--- /dev/null
+++ b/source/blender/makesdna/DNA_scriptlink_types.h
@@ -0,0 +1,77 @@
+/**
+ * blenlib/DNA_object_types.h (mar-2001 nzc)
+ *
+ * Scriptlink is hard-coded in object for some reason.
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SCRIPTLINK_TYPES_H
+#define DNA_SCRIPTLINK_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ID;
+
+typedef struct ScriptLink {
+ struct ID **scripts;
+ short *flag;
+
+ short actscript, totscript;
+ int pad;
+} ScriptLink;
+
+/* **************** SCRIPTLINKS ********************* */
+
+#define SCRIPT_FRAMECHANGED 1
+#define SCRIPT_ONLOAD 2
+#define SCRIPT_REDRAW 4
+#define SCRIPT_ONSAVE 8
+#define SCRIPT_RENDER 16
+/* POSTRENDER is not meant for the UI, it simply calls the
+ * RENDER script links for clean-up actions */
+#define SCRIPT_POSTRENDER 32
+
+/* **************** SPACE HANDLERS ********************* */
+/* these are special scriptlinks that can be assigned to
+ * a given space in a given ScrArea to:
+ * - (EVENT type) handle events sent to that space;
+ * - (DRAW type) draw on the space after its own drawing function finishes
+ */
+#define SPACEHANDLER_VIEW3D_EVENT 1
+#define SPACEHANDLER_VIEW3D_DRAW 2
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
new file mode 100644
index 00000000000..8553a3868d1
--- /dev/null
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -0,0 +1,83 @@
+/**
+ * blenlib/DNA_sdna.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SDNA_H
+#define DNA_SDNA_H
+
+#
+#
+struct SDNA {
+ char *data;
+ int datalen, nr_names;
+ char **names;
+ int nr_types, pointerlen;
+ char **types;
+ short *typelens;
+ int nr_structs;
+ short **structs;
+
+ /* wrong place for this really, its a simple
+ * cache for findstruct_nr.
+ */
+ int lastfind;
+};
+
+#
+#
+typedef struct BHead {
+ int code, len;
+ void *old;
+ int SDNAnr, nr;
+} BHead;
+#
+#
+typedef struct BHead4 {
+ int code, len;
+ int old;
+ int SDNAnr, nr;
+} BHead4;
+#
+#
+typedef struct BHead8 {
+ int code, len;
+#if defined(WIN32) && !defined(FREE_WINDOWS)
+ /* This is a compiler type! */
+ __int64 old;
+#else
+ long long old;
+#endif
+ int SDNAnr, nr;
+} BHead8;
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
new file mode 100644
index 00000000000..7fcb400d66e
--- /dev/null
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -0,0 +1,253 @@
+/**
+ * blenlib/DNA_sensor_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SENSOR_TYPES_H
+#define DNA_SENSOR_TYPES_H
+
+struct Object;
+struct Material;
+
+/* ****************** SENSORS ********************* */
+
+typedef struct bNearSensor {
+ char name[32];
+ float dist, resetdist;
+ int lastval, pad;
+} bNearSensor;
+
+/**
+ * Defines the settings of a mouse sensor.
+ */
+typedef struct bMouseSensor {
+ /**
+ * The type of key this sensor listens to.
+ */
+ short type;
+ short flag;
+ short pad1;
+ short pad2;
+} bMouseSensor;
+
+typedef struct bTouchSensor {
+ char name[32];
+ struct Material *ma;
+ float dist, pad;
+} bTouchSensor;
+
+typedef struct bKeyboardSensor {
+ short key, qual;
+ short type, qual2;
+ /**
+ * Name of the target property
+ */
+ char targetName[32];
+ /**
+ * Name of the toggle property
+ */
+ char toggleName[32];
+} bKeyboardSensor;
+
+typedef struct bPropertySensor {
+ int type;
+ int pad;
+ char name[32];
+ char value[32];
+ char maxvalue[32];
+} bPropertySensor;
+
+typedef struct bCollisionSensor {
+ char name[32]; /* property name */
+ char materialName[32]; /* material */
+ short damptimer, damp;
+ short mode; /* flag to choose material or property */
+ short pad2;
+} bCollisionSensor;
+
+typedef struct bRadarSensor {
+ char name[32];
+ float angle;
+ float range;
+ short flag, axis;
+} bRadarSensor;
+
+typedef struct bRandomSensor {
+ char name[32];
+ int seed;
+ int delay;
+} bRandomSensor;
+
+typedef struct bRaySensor {
+ char name[32];
+ float range;
+ char propname[32];
+ char matname[32];
+ short mode;
+ short pad1;
+ int axisflag;
+} bRaySensor;
+
+typedef struct bMessageSensor {
+ /**
+ * (Possible future use) pointer to a single sender object
+ */
+ struct Object *fromObject;
+
+ /**
+ * Can be used to filter on subjects like this
+ */
+ char subject[32];
+
+ /**
+ * (Possible future use) body to filter on
+ */
+ char body[32];
+} bMessageSensor;
+
+typedef struct bSensor {
+ struct bSensor *next, *prev;
+ /* pulse and freq are the bool toggle and frame count for pulse mode */
+ short type, otype, flag, pulse;
+ short freq, totlinks, pad1, pad2;
+ char name[32];
+ void *data;
+
+ struct bController **links;
+
+ struct Object *ob;
+
+ /* just add here, to avoid align errors... */
+ short invert; /* Whether or not to invert the output. */
+ short freq2; /* The negative pulsing frequency? Not used anymore... */
+ int pad;
+} bSensor;
+
+typedef struct bJoystickSensor {
+ char name[32];
+ short type;
+ short pad;
+ int axis;
+ int axisf;
+ int button;
+ int buttonf;
+ int hat;
+ int hatf;
+ int precision;
+} bJoystickSensor;
+
+/* bMouseSensor->type: uses blender event defines */
+
+/* propertysensor->type */
+#define SENS_PROP_EQUAL 0
+#define SENS_PROP_NEQUAL 1
+#define SENS_PROP_INTERVAL 2
+#define SENS_PROP_CHANGED 3
+#define SENS_PROP_EXPRESSION 4
+
+/* raysensor->axisflag */
+/* flip x and y to make y default!!! */
+#define SENS_RAY_X_AXIS 1
+#define SENS_RAY_Y_AXIS 0
+#define SENS_RAY_Z_AXIS 2
+#define SENS_RAY_NEG_X_AXIS 3
+#define SENS_RAY_NEG_Y_AXIS 4
+#define SENS_RAY_NEG_Z_AXIS 5
+//#define SENS_RAY_NEGATIVE_AXIS 1
+
+/* bMessageSensor->type */
+#define SENS_MESG_MESG 0
+#define SENS_MESG_PROP 1
+
+/* sensor->type */
+#define SENS_ALWAYS 0
+#define SENS_TOUCH 1
+#define SENS_NEAR 2
+#define SENS_KEYBOARD 3
+#define SENS_PROPERTY 4
+#define SENS_MOUSE 5
+#define SENS_COLLISION 6
+#define SENS_RADAR 7
+#define SENS_RANDOM 8
+#define SENS_RAY 9
+#define SENS_MESSAGE 10
+#define SENS_JOYSTICK 11
+/* sensor->flag */
+#define SENS_SHOW 1
+#define SENS_DEL 2
+#define SENS_NEW 4
+#define SENS_NOT 8
+
+/* sensor->pulse */
+#define SENS_PULSE_CONT 0
+#define SENS_PULSE_REPEAT 1
+//#define SENS_PULSE_ONCE 2
+#define SENS_NEG_PULSE_MODE 4
+
+/* sensor->suppress */
+#define SENS_SUPPRESS_POSITIVE (1 << 0)
+#define SENS_SUPPRESS_NEGATIVE (1 << 1)
+
+/* collision, ray sensor modes: */
+/* A little bit fake: when property is active, the first bit is
+ * reset. Bite me :) So we don't actually use it, so we comment it out
+ * ... The reason for this is that we need to be backward compatible,
+ * and have a proper default value for this thing.
+ * */
+/* #define SENS_COLLISION_PROPERTY 0 */
+#define SENS_COLLISION_MATERIAL 1
+
+/* Some stuff for the mouse sensor Type: */
+#define BL_SENS_MOUSE_LEFT_BUTTON 1
+#define BL_SENS_MOUSE_MIDDLE_BUTTON 2
+#define BL_SENS_MOUSE_RIGHT_BUTTON 4
+#define BL_SENS_MOUSE_WHEEL_UP 5
+#define BL_SENS_MOUSE_WHEEL_DOWN 6
+#define BL_SENS_MOUSE_MOVEMENT 8
+#define BL_SENS_MOUSE_MOUSEOVER 16
+#define BL_SENS_MOUSE_MOUSEOVER_ANY 32
+
+#define SENS_JOY_BUTTON 0
+#define SENS_JOY_BUTTON_PRESSED 0
+#define SENS_JOY_BUTTON_RELEASED 1
+
+#define SENS_JOY_AXIS 1
+#define SENS_JOY_X_AXIS 0
+#define SENS_JOY_Y_AXIS 1
+#define SENS_JOY_NEG_X_AXIS 2
+#define SENS_JOY_NEG_Y_AXIS 3
+#define SENS_JOY_PRECISION 4
+
+#define SENS_JOY_HAT 2
+#define SENS_JOY_HAT_DIR 0
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
new file mode 100644
index 00000000000..839d804fbea
--- /dev/null
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -0,0 +1,239 @@
+/**
+ * blenlib/DNA_sequence_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SEQUENCE_TYPES_H
+#define DNA_SEQUENCE_TYPES_H
+
+#include "DNA_listBase.h"
+
+/* needed for sound support */
+#include "DNA_sound_types.h"
+
+struct Ipo;
+struct Scene;
+
+/* strlens; 80= FILE_MAXFILE, 160= FILE_MAXDIR */
+
+typedef struct StripElem {
+ char name[80];
+ struct ImBuf *ibuf;
+ struct StripElem *se1, *se2, *se3;
+ short ok;
+ short pad;
+ int nr;
+} StripElem;
+
+typedef struct Strip {
+ struct Strip *next, *prev;
+ int rt, len, us, done;
+ StripElem *stripdata;
+ char dir[160];
+ int orx, ory;
+} Strip;
+
+
+typedef struct PluginSeq {
+ char name[256];
+ void *handle;
+
+ char *pname;
+
+ int vars, version;
+
+ void *varstr;
+ float *cfra;
+
+ float data[32];
+
+ void *instance_private_data;
+ void **current_private_data;
+
+ void (*doit)(void);
+
+ void (*callback)(void);
+} PluginSeq;
+
+/* The sequence structure is the basic struct used by any strip. each of the strips uses a different sequence structure.*/
+/* 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 */
+
+ short 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; /*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;
+ /* is sfra needed anymore? - it looks like its only used in one place */
+ int sfra; /* starting frame according to the timeline of the scene. */
+
+ Strip *strip;
+ StripElem *curelem; /* reference the current frame - value from give_stripelem */
+
+ struct Ipo *ipo;
+ struct Scene *scene;
+ struct anim *anim;
+ float facf0, facf1;
+
+ PluginSeq *plugin;
+
+ /* pointers for effects: */
+ struct Sequence *seq1, *seq2, *seq3;
+
+ ListBase seqbase; /* list of strips for metastrips */
+
+ struct bSound *sound; /* the linked "bSound" object */
+ struct hdaudio *hdaudio; /* external hdaudio object */
+ float level, pan; /* level in dB (0=full), pan -1..1 */
+ int curpos; /* last sample position in audio_fill() */
+ float strobe;
+
+ void *effectdata; /* Struct pointer for effect settings */
+
+ int anim_preseek;
+ int pad;
+} Sequence;
+
+typedef struct MetaStack {
+ struct MetaStack *next, *prev;
+ ListBase *oldbasep;
+ Sequence *parseq;
+} MetaStack;
+
+typedef struct Editing {
+ ListBase *seqbasep;
+ ListBase seqbase;
+ ListBase metastack;
+ short flag;
+ short pad;
+ int rt;
+} Editing;
+
+/* ************* Effect Variable Structs ********* */
+typedef struct WipeVars {
+ float edgeWidth,angle;
+ short forward, wipetype;
+} WipeVars;
+
+typedef struct GlowVars {
+ float fMini; /* Minimum intensity to trigger a glow */
+ float fClamp;
+ float fBoost; /* Amount to multiply glow intensity */
+ float dDist; /* Radius of glow blurring */
+ int dQuality;
+ int bNoComp; /* SHOW/HIDE glow buffer */
+} GlowVars;
+
+typedef struct TransformVars {
+ float ScalexIni;
+ float ScaleyIni;
+ float ScalexFin;
+ float ScaleyFin;
+ float xIni;
+ float xFin;
+ float yIni;
+ float yFin;
+ float rotIni;
+ float rotFin;
+ int percent;
+ int interpolation;
+} TransformVars;
+
+typedef struct SolidColorVars {
+ float col[3];
+ float pad;
+} SolidColorVars;
+
+typedef struct SpeedControlVars {
+ float * frameMap;
+ float globalSpeed;
+ int flags;
+ int length;
+ int lastValidFrame;
+} SpeedControlVars;
+
+/* SpeedControlVars->flags */
+#define SEQ_SPEED_INTEGRATE 1
+#define SEQ_SPEED_BLEND 2
+#define SEQ_SPEED_COMPRESS_IPO_Y 4
+
+/* ***************** SEQUENCE ****************** */
+
+/* seq->flag */
+#define SEQ_LEFTSEL 2
+#define SEQ_RIGHTSEL 4
+#define SEQ_OVERLAP 8
+#define SEQ_FILTERY 16
+#define SEQ_MUTE 32
+#define SEQ_MAKE_PREMUL 64
+#define SEQ_REVERSE_FRAMES 128
+#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
+
+/* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */
+#define SEQ_IMAGE 0
+#define SEQ_META 1
+#define SEQ_SCENE 2
+#define SEQ_MOVIE 3
+#define SEQ_RAM_SOUND 4
+#define SEQ_HD_SOUND 5
+#define SEQ_MOVIE_AND_HD_SOUND 6 /* helper for add_sequence */
+
+#define SEQ_EFFECT 8
+#define SEQ_CROSS 8
+#define SEQ_ADD 9
+#define SEQ_SUB 10
+#define SEQ_ALPHAOVER 11
+#define SEQ_ALPHAUNDER 12
+#define SEQ_GAMCROSS 13
+#define SEQ_MUL 14
+#define SEQ_OVERDROP 15
+#define SEQ_PLUGIN 24
+#define SEQ_WIPE 25
+#define SEQ_GLOW 26
+#define SEQ_TRANSFORM 27
+#define SEQ_COLOR 28
+#define SEQ_SPEED 29
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
new file mode 100644
index 00000000000..27b9c373484
--- /dev/null
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -0,0 +1,183 @@
+/**
+ * blenlib/DNA_sound_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SOUND_TYPES_H
+#define DNA_SOUND_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+/* stupid... could easily be solved */
+#include "DNA_view2d_types.h"
+
+/* extern int noaudio; * defined in sound.c . also not very nice */
+/* extern ListBase *samples; don't do this in DNA, but in BKE_... instead */
+
+struct bSample;
+struct Ipo;
+struct PackedFile;
+struct SpaceLink;
+
+/* should not be here! */
+#
+#
+typedef struct bSample {
+ ID id;
+ void *data;
+ void *snd_sample;
+ short type, bits;
+ short channels;
+ int len, rate;
+// int buffer;
+ int alindex;
+ char fakedata[16];
+ int flags;
+ char name[160];
+ struct PackedFile * packedfile;
+ short us;
+} bSample;
+
+
+
+typedef struct bSound {
+ ID id;
+ char name[160];
+ struct bSample *sample;
+ void *stream;
+ struct PackedFile *packedfile;
+ struct PackedFile *newpackedfile;
+ void *snd_sound;
+ struct Ipo *ipo;
+ float volume, panning;
+ /**
+ * Sets the rollofffactor. The rollofffactor is a per-Source parameter
+ * the application can use to increase or decrease the range of a source
+ * by decreasing or increasing the attenuation, respectively. The default
+ * value is 1. The implementation is free to optimize for a rollofffactor
+ * value of 0, which indicates that the application does not wish any
+ * distance attenuation on the respective Source.
+ */
+ float attenuation;
+ float pitch;
+ /**
+ * min_gain indicates the minimal gain which is always guaranteed for this sound
+ */
+ float min_gain;
+ /**
+ * max_gain indicates the maximal gain which is always guaranteed for this sound
+ */
+ float max_gain;
+ /**
+ * Sets the referencedistance at which the listener will experience gain.
+ */
+ float distance;
+ int flags;
+ int streamlen;
+ char channels;
+ char highprio;
+ char pad[10];
+} bSound;
+
+typedef struct bSoundListener {
+ ID id;
+ /**
+ * Overall gain
+ */
+ float gain;
+ /**
+ * Sets a scaling to exaggerate or deemphasize the Doppler (pitch) shift
+ * resulting from the calculation.
+ */
+ float dopplerfactor;
+ /**
+ * Sets the value of the propagation speed relative to which the source
+ * velocities are interpreted.
+ */
+ float dopplervelocity;
+ short numsoundsblender;
+ short numsoundsgameengine;
+
+} bSoundListener;
+
+/* spacesound->flag */
+#define SND_DRAWFRAMES 1
+#define SND_CFRA_NUM 2
+
+typedef struct SpaceSound {
+ struct SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ bSound *sound;
+ short mode, sndnr;
+ short xof, yof;
+ short flag, lock;
+ int pad2;
+} SpaceSound;
+
+
+enum SAMPLE_FileTypes {
+ SAMPLE_INVALID = -1, // must be negative
+ SAMPLE_UNKNOWN = 0,
+ SAMPLE_RAW,
+ SAMPLE_WAV,
+ SAMPLE_MP2,
+ SAMPLE_MP3,
+ SAMPLE_OGG_VORBIS,
+ SAMPLE_WMA,
+ SAMPLE_ASF,
+ SAMPLE_AIFF
+};
+
+
+#define SOUND_CHANNELS_STEREO 0
+#define SOUND_CHANNELS_LEFT 1
+#define SOUND_CHANNELS_RIGHT 2
+
+#define SOUND_FLAGS_LOOP (1 << 0)
+#define SOUND_FLAGS_FIXED_VOLUME (1 << 1)
+#define SOUND_FLAGS_FIXED_PANNING (1 << 2)
+#define SOUND_FLAGS_3D (1 << 3)
+#define SOUND_FLAGS_BIDIRECTIONAL_LOOP (1 << 4)
+#define SOUND_FLAGS_PRIORITY (1 << 5)
+#define SOUND_FLAGS_SEQUENCE (1 << 6)
+
+#define SAMPLE_NEEDS_SAVE (1 << 0)
+
+/* to DNA_sound_types.h*/
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
new file mode 100644
index 00000000000..10f488c9f61
--- /dev/null
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -0,0 +1,649 @@
+/**
+ * blenlib/DNA_space_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SPACE_TYPES_H
+#define DNA_SPACE_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+#include "DNA_oops_types.h" /* for TreeStoreElem */
+#include "DNA_image_types.h" /* ImageUser */
+/* Hum ... Not really nice... but needed for spacebuts. */
+#include "DNA_view2d_types.h"
+
+struct Ipo;
+struct ID;
+struct Text;
+struct Script;
+struct ImBuf;
+struct Image;
+struct SpaceIpo;
+struct BlendHandle;
+struct RenderInfo;
+struct bNodeTree;
+struct uiBlock;
+struct FileList;
+
+ /**
+ * The base structure all the other spaces
+ * are derived (implicitly) from. Would be
+ * good to make this explicit.
+ */
+typedef struct SpaceLink SpaceLink;
+struct SpaceLink {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+ short blockhandler[8];
+};
+
+typedef struct SpaceInfo {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+} SpaceInfo;
+
+typedef struct SpaceIpo {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ unsigned int rowbut, pad2;
+ View2D v2d;
+
+ void *editipo;
+ ListBase ipokey;
+
+ /* the ipo context we need to store */
+ struct Ipo *ipo;
+ struct ID *from;
+ char actname[32], constname[32];
+
+ short totipo, pin;
+ short butofs, channel;
+ short showkey, blocktype;
+ short menunr, lock;
+ int flag;
+ float median[3];
+ rctf tot;
+} SpaceIpo;
+
+typedef struct SpaceButs {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+ struct RenderInfo *ri;
+
+ short blockhandler[8];
+
+ short cursens, curact;
+ short align, tabo; /* align for panels, tab is old tab */
+ View2D v2d;
+
+ short mainb, menunr; /* texnr and menunr have to remain shorts */
+ short pin, mainbo;
+ void *lockpoin;
+
+ short texnr;
+ char texfrom, showgroup;
+
+ short modeltype;
+ short scriptblock;
+ short scaflag;
+ short re_align;
+
+ short oldkeypress; /* for keeping track of the sub tab key cycling */
+ char pad, flag;
+
+ char texact, tab[7]; /* storing tabs for each context */
+
+} SpaceButs;
+
+typedef struct SpaceSeq {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ View2D v2d;
+
+ float xof, yof; /* offset for drawing the image preview */
+ short mainb, zoom;
+ short chanshown;
+ short pad2;
+ int flag;
+ int pad;
+} SpaceSeq;
+
+typedef struct SpaceFile {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ struct direntry *filelist;
+ int totfile;
+
+ char title[24];
+ char dir[160];
+ char file[80];
+
+ short type, ofs, flag, sort;
+ short maxnamelen, collums, f_fp, pad1;
+ int pad2;
+ char fp_str[8];
+
+ struct BlendHandle *libfiledata;
+
+ unsigned short retval; /* event */
+ short menu, act, ipotype;
+
+ /* one day we'll add unions to dna */
+ void (*returnfunc)(char *);
+ void (*returnfunc_event)(unsigned short);
+ void (*returnfunc_args)(char *, void *, void *);
+
+ void *arg1, *arg2;
+ short *menup; /* pointer to menu result or ID browsing */
+ char *pupmenu; /* optional menu in header */
+} SpaceFile;
+
+typedef struct SpaceOops {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ View2D v2d;
+
+ ListBase oops;
+ short pin, visiflag, flag, rt;
+ void *lockpoin;
+
+ ListBase tree;
+ struct TreeStore *treestore;
+
+ /* search stuff */
+ char search_string[32];
+ struct TreeStoreElem search_tse;
+ int search_flags, do_;
+
+ short type, outlinevis, storeflag;
+ short deps_flags;
+
+} SpaceOops;
+
+typedef struct SpaceImage {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ View2D v2d;
+
+ struct Image *image;
+ struct ImageUser iuser;
+
+ struct CurveMapping *cumap;
+ short mode, menunr;
+ 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, pin;
+ float zoom;
+ char dt_uv; /* UV draw type */
+ char sticky; /* sticky selection type */
+ char pad[6];
+
+ 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 {
+ struct SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ short menunr, lock;
+ short autosnap; /* this uses the same settings as autosnap for Action Editor */
+ short flag;
+
+ View2D v2d;
+} SpaceNla;
+
+typedef struct SpaceText {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ struct Text *text;
+
+ int top, viewlines;
+ short flags, menunr;
+
+ int font_id;
+ int lheight;
+ int left;
+ int showlinenrs;
+
+ int tabnumber;
+ int currtab_set;
+ int showsyntax;
+ int unused_padd;
+
+ float pix_per_line;
+
+ struct rcti txtscroll, txtbar;
+
+} SpaceText;
+
+typedef struct SpaceScript {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+ struct Script *script;
+
+ short flags, menunr;
+ int pad1;
+
+ void *but_refs;
+} SpaceScript;
+
+typedef struct SpaceTime {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ int flag, redraws;
+
+} SpaceTime;
+
+typedef struct SpaceNode {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ struct ID *id, *from; /* context, no need to save in file? well... pinning... */
+ short flag, menunr; /* menunr: browse id block in header */
+ float aspect;
+ void *curfont;
+
+ float xof, yof; /* offset for drawing the backdrop */
+
+ struct bNodeTree *nodetree, *edittree;
+ int treetype, pad; /* treetype: as same nodetree->type */
+
+} SpaceNode;
+
+/* snode->flag */
+#define SNODE_DO_PREVIEW 1
+#define SNODE_BACKDRAW 2
+
+typedef struct SpaceImaSel {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ 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 *);
+
+ void *arg1, *arg2;
+ short *menup; /* pointer to menu result or ID browsing */
+ char *pupmenu; /* optional menu in header */
+
+ struct ImBuf *img;
+} SpaceImaSel;
+
+
+/* **************** SPACE ********************* */
+
+
+/* view3d Now in DNA_view3d_types.h */
+
+/* button defines in BIF_butspace.h */
+
+/* sbuts->flag */
+#define SB_PRV_OSA 1
+
+/* these values need to be hardcoded in structs, dna does not recognize defines */
+/* also defined in BKE */
+#define FILE_MAXDIR 160
+#define FILE_MAXFILE 80
+#define FILE_MAX 240
+
+/* filesel types */
+#define FILE_UNIX 8
+#define FILE_BLENDER 8
+#define FILE_SPECIAL 9
+
+#define FILE_LOADLIB 1
+#define FILE_MAIN 2
+#define FILE_LOADFONT 3
+
+/* sfile->flag and simasel->flag */
+#define FILE_SHOWSHORT 1
+#define FILE_STRINGCODE 2
+#define FILE_LINK 4
+#define FILE_HIDE_DOT 8
+#define FILE_AUTOSELECT 16
+#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
+#define FILE_SORTDATE 1
+#define FILE_SORTSIZE 2
+#define FILE_SORTEXTENS 3
+
+/* files in filesel list: 2=ACTIVE */
+#define HILITE 1
+#define BLENDERFILE 4
+#define PSXFILE 8
+#define IMAGEFILE 16
+#define MOVIEFILE 32
+#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 */
+
+/* SpaceImage->mode */
+#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->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<<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 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
+
+/* SpaceText flags (moved from DNA_text_types.h) */
+
+#define ST_SCROLL_SELECT 0x0001 // scrollable
+#define ST_CLEAR_NAMESPACE 0x0010 // clear namespace after script
+ // execution (see BPY_main.c)
+
+/* SpaceOops->type */
+#define SO_OOPS 0
+#define SO_OUTLINER 1
+#define SO_DEPSGRAPH 2
+
+/* SpaceOops->flag */
+#define SO_TESTBLOCKS 1
+#define SO_NEWSELECTED 2
+#define SO_HIDE_RESTRICTCOLS 4
+
+/* SpaceOops->visiflag */
+#define OOPS_SCE 1
+#define OOPS_OB 2
+#define OOPS_ME 4
+#define OOPS_CU 8
+#define OOPS_MB 16
+#define OOPS_LT 32
+#define OOPS_LA 64
+#define OOPS_MA 128
+#define OOPS_TE 256
+#define OOPS_IP 512
+#define OOPS_LAY 1024
+#define OOPS_LI 2048
+#define OOPS_IM 4096
+#define OOPS_AR 8192
+#define OOPS_GR 16384
+
+/* SpaceOops->outlinevis */
+#define SO_ALL_SCENES 0
+#define SO_CUR_SCENE 1
+#define SO_VISIBLE 2
+#define SO_SELECTED 3
+#define SO_ACTIVE 4
+#define SO_SAME_TYPE 5
+#define SO_GROUPS 6
+#define SO_LIBRARIES 7
+#define SO_VERSE_SESSION 8
+#define SO_VERSE_MS 9
+
+/* SpaceOops->storeflag */
+#define SO_TREESTORE_CLEANUP 1
+ /* if set, it allows redraws. gets set for some allqueue events */
+#define SO_TREESTORE_REDRAW 2
+
+/* headerbuttons: 450-499 */
+
+#define B_IMASELHOME 451
+#define B_IMASELREMOVEBIP 452
+
+#define C_BACK 0xBAAAAA
+#define C_DARK 0x665656
+#define C_DERK 0x766666
+#define C_HI 0xCBBBBB
+#define C_LO 0x544444
+
+/* queue settings */
+#define IMS_KNOW_WIN 1
+#define IMS_KNOW_BIP 2
+#define IMS_KNOW_DIR 4
+#define IMS_DOTHE_INF 8
+#define IMS_KNOW_INF 16
+#define IMS_DOTHE_IMA 32
+#define IMS_KNOW_IMA 64
+#define IMS_FOUND_BIP 128
+#define IMS_DOTHE_BIP 256
+#define IMS_WRITE_NO_BIP 512
+
+/* imasel->mode */
+#define IMS_NOIMA 0
+#define IMS_IMA 1
+#define IMS_ANIM 2
+#define IMS_DIR 4
+#define IMS_FILE 8
+#define IMS_STRINGCODE 16
+
+#define IMS_INDIR 1
+#define IMS_INDIRSLI 2
+#define IMS_INFILE 3
+#define IMS_INFILESLI 4
+
+/* 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
+#define TIME_ALL_3D_WIN 2
+#define TIME_ALL_ANIM_WIN 4
+#define TIME_ALL_BUTS_WIN 8
+#define TIME_WITH_SEQ_AUDIO 16
+#define TIME_SEQ 32
+#define TIME_ALL_IMAGE_WIN 64
+
+/* sseq->mainb */
+#define SEQ_DRAW_SEQUENCE 0
+#define SEQ_DRAW_IMG_IMBUF 1
+#define SEQ_DRAW_IMG_WAVEFORM 2
+#define SEQ_DRAW_IMG_VECTORSCOPE 3
+
+/* sseq->flag */
+#define SEQ_DRAWFRAMES 1
+#define SEQ_MARKER_TRANS 2
+
+/* space types, moved from DNA_screen_types.h */
+enum {
+ SPACE_EMPTY,
+ SPACE_VIEW3D,
+ SPACE_IPO,
+ SPACE_OOPS,
+ SPACE_BUTS,
+ SPACE_FILE,
+ SPACE_IMAGE,
+ SPACE_INFO,
+ SPACE_SEQ,
+ SPACE_TEXT,
+ SPACE_IMASEL,
+ SPACE_SOUND,
+ SPACE_ACTION,
+ SPACE_NLA,
+ SPACE_SCRIPT,
+ SPACE_TIME,
+ SPACE_NODE,
+ SPACEICONMAX = SPACE_NODE
+/* SPACE_LOGIC */
+};
+
+#endif
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h
new file mode 100644
index 00000000000..8f2b40f7ff6
--- /dev/null
+++ b/source/blender/makesdna/DNA_text_types.h
@@ -0,0 +1,80 @@
+/**
+ * blenlib/DNA_text_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_TEXT_TYPES_H
+#define DNA_TEXT_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+typedef struct TextLine {
+ struct TextLine *next, *prev;
+
+ char *line;
+ char *format;
+ int len, blen;
+} TextLine;
+
+typedef struct Text {
+ ID id;
+
+ char *name;
+
+ int flags, nlines;
+
+ ListBase lines;
+ TextLine *curl, *sell;
+ int curc, selc;
+
+ char *undo_buf;
+ int undo_pos, undo_len;
+
+ void *compiled;
+} Text;
+
+
+#define TXT_OFFSET 35
+#define TXT_TABSIZE 4
+#define TXT_INIT_UNDO 1024
+#define TXT_MAX_UNDO (TXT_INIT_UNDO*TXT_INIT_UNDO)
+
+/* text flags */
+#define TXT_ISDIRTY 0x0001
+#define TXT_ISTMP 0x0002
+#define TXT_ISMEM 0x0004
+#define TXT_ISEXT 0x0008
+#define TXT_ISSCRIPT 0x0010 /* used by space handler scriptlinks */
+#define TXT_READONLY 0x0100
+#define TXT_FOLLOW 0x0200 /* always follow cursor (console) */
+
+#endif
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
new file mode 100644
index 00000000000..cf51990c9bf
--- /dev/null
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -0,0 +1,377 @@
+/**
+ * blenlib/DNA_texture_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_TEXTURE_TYPES_H
+#define DNA_TEXTURE_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_image_types.h"
+
+struct Ipo;
+struct PluginTex;
+struct ColorBand;
+struct EnvMap;
+struct Object;
+struct Tex;
+struct Image;
+struct PreviewImage;
+struct ImBuf;
+
+typedef struct MTex {
+
+ short texco, mapto, maptoneg, blendtype;
+ struct Object *object;
+ struct Tex *tex;
+ char uvname[32];
+
+ char projx, projy, projz, mapping;
+ float ofs[3], size[3];
+
+ short texflag, colormodel;
+ float r, g, b, k;
+ float def_var;
+
+ float colfac, norfac, varfac;
+ float dispfac;
+ float warpfac;
+
+} MTex;
+
+#ifndef DNA_USHORT_FIX
+#define DNA_USHORT_FIX
+/**
+ * @deprecated This typedef serves to avoid badly typed functions when
+ * @deprecated compiling while delivering a proper dna.c. Do not use
+ * @deprecated it in any case.
+ */
+typedef unsigned short dna_ushort_fix;
+#endif
+
+typedef struct PluginTex {
+ char name[160];
+ void *handle;
+
+ char *pname;
+ char *stnames;
+
+ int stypes;
+ int vars;
+ void *varstr;
+ float *result;
+ float *cfra;
+
+ float data[32];
+
+ int (*doit)(void);
+ void (*instance_init)(void *);
+
+ /* should be void (*)(unsigned short)... patched */
+ void (*callback)(dna_ushort_fix);
+
+ int version, pad;
+} PluginTex;
+
+typedef struct CBData {
+ float r, g, b, a, pos;
+ int cur;
+} 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];
+
+} ColorBand;
+
+typedef struct EnvMap {
+ struct Object *object;
+ struct Image *ima; /* type ENV_LOAD */
+ struct ImBuf *cube[6]; /* these images are dynamic, not part of the main struct */
+ float imat[4][4];
+ float obimat[3][3];
+ short type, stype;
+ float clipsta, clipend;
+ float viewscale; /* viewscale is for planar envmaps to zoom in or out */
+ unsigned int notlay;
+ short cuberes, depth;
+ int ok, lastframe;
+ short recalc, lastsize;
+} EnvMap;
+
+typedef struct Tex {
+ ID id;
+
+ float noisesize, turbul;
+ float bright, contrast, rfac, gfac, bfac;
+ float filtersize;
+
+ /* newnoise: musgrave parameters */
+ float mg_H, mg_lacunarity, mg_octaves, mg_offset, mg_gain;
+
+ /* newnoise: distorted noise amount, musgrave & voronoi ouput scale */
+ float dist_amount, ns_outscale;
+
+ /* newnoise: voronoi nearest neighbour weights, minkovsky exponent, distance metric & color type */
+ float vn_w1, vn_w2, vn_w3, vn_w4, vn_mexp;
+ short vn_distm, vn_coltype;
+
+ short noisedepth, noisetype;
+
+ /* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */
+ short noisebasis, noisebasis2;
+
+ short imaflag, flag;
+ short type, stype;
+
+ float cropxmin, cropymin, cropxmax, cropymax;
+ short xrepeat, yrepeat;
+ short extend;
+
+ /* variables disabled, moved to struct iuser */
+ short fie_ima;
+ int len;
+ int frames, offset, sfra;
+
+ float checkerdist, nabla;
+ float norfac;
+
+ struct ImageUser iuser;
+
+ struct Ipo *ipo;
+ struct Image *ima;
+ struct PluginTex *plugin;
+ struct ColorBand *coba;
+ struct EnvMap *env;
+ struct PreviewImage * preview;
+
+} Tex;
+
+/* used for mapping node. note: rot is in degrees */
+
+typedef struct TexMapping {
+ float loc[3], rot[3], size[3];
+ int flag;
+
+ float mat[4][4];
+ float min[3], max[3];
+ struct Object *ob;
+
+} TexMapping;
+
+/* texmap->flag */
+#define TEXMAP_CLIP_MIN 1
+#define TEXMAP_CLIP_MAX 2
+
+
+/* **************** TEX ********************* */
+
+/* type */
+#define TEX_CLOUDS 1
+#define TEX_WOOD 2
+#define TEX_MARBLE 3
+#define TEX_MAGIC 4
+#define TEX_BLEND 5
+#define TEX_STUCCI 6
+#define TEX_NOISE 7
+#define TEX_IMAGE 8
+#define TEX_PLUGIN 9
+#define TEX_ENVMAP 10
+#define TEX_MUSGRAVE 11
+#define TEX_VORONOI 12
+#define TEX_DISTNOISE 13
+
+/* musgrave stype */
+#define TEX_MFRACTAL 0
+#define TEX_RIDGEDMF 1
+#define TEX_HYBRIDMF 2
+#define TEX_FBM 3
+#define TEX_HTERRAIN 4
+
+/* newnoise: noisebasis 1 & 2 */
+#define TEX_BLENDER 0
+#define TEX_STDPERLIN 1
+#define TEX_NEWPERLIN 2
+#define TEX_VORONOI_F1 3
+#define TEX_VORONOI_F2 4
+#define TEX_VORONOI_F3 5
+#define TEX_VORONOI_F4 6
+#define TEX_VORONOI_F2F1 7
+#define TEX_VORONOI_CRACKLE 8
+#define TEX_CELLNOISE 14
+
+/* newnoise: Voronoi distance metrics, vn_distm */
+#define TEX_DISTANCE 0
+#define TEX_DISTANCE_SQUARED 1
+#define TEX_MANHATTAN 2
+#define TEX_CHEBYCHEV 3
+#define TEX_MINKOVSKY_HALF 4
+#define TEX_MINKOVSKY_FOUR 5
+#define TEX_MINKOVSKY 6
+
+/* imaflag */
+#define TEX_INTERPOL 1
+#define TEX_USEALPHA 2
+#define TEX_MIPMAP 4
+#define TEX_IMAROT 16
+#define TEX_CALCALPHA 32
+#define TEX_NORMALMAP 2048
+#define TEX_GAUSS_MIP 4096
+
+/* imaflag unused, only for version check */
+#define TEX_FIELDS_ 8
+#define TEX_ANIMCYCLIC_ 64
+#define TEX_ANIM5_ 128
+#define TEX_ANTIALI_ 256
+#define TEX_ANTISCALE_ 512
+#define TEX_STD_FIELD_ 1024
+
+/* flag */
+#define TEX_COLORBAND 1
+#define TEX_FLIPBLEND 2
+#define TEX_NEGALPHA 4
+#define TEX_CHECKER_ODD 8
+#define TEX_CHECKER_EVEN 16
+#define TEX_PRV_ALPHA 32
+#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
+#define TEX_CLIP 2
+#define TEX_REPEAT 3
+#define TEX_CLIPCUBE 4
+#define TEX_CHECKER 5
+
+/* noisetype */
+#define TEX_NOISESOFT 0
+#define TEX_NOISEPERL 1
+
+/* tex->noisebasis2 in texture.c - wood waveforms */
+#define TEX_SIN 0
+#define TEX_SAW 1
+#define TEX_TRI 2
+
+/* tex->stype in texture.c - wood types */
+#define TEX_BAND 0
+#define TEX_RING 1
+#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
+#define TEX_SHARPER 2
+
+/* tex->stype in texture.c - blend types */
+#define TEX_LIN 0
+#define TEX_QUAD 1
+#define TEX_EASE 2
+#define TEX_DIAG 3
+#define TEX_SPHERE 4
+#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
+
+/* wrap */
+#define MTEX_FLAT 0
+#define MTEX_CUBE 1
+#define MTEX_TUBE 2
+#define MTEX_SPHERE 3
+
+/* return value */
+#define TEX_INT 0
+#define TEX_RGB 1
+#define TEX_NOR 2
+
+/* **************** MTEX ********************* */
+
+/* proj */
+#define PROJ_N 0
+#define PROJ_X 1
+#define PROJ_Y 2
+#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
+
+/* blendtype */
+#define MTEX_BLEND 0
+#define MTEX_MUL 1
+#define MTEX_ADD 2
+#define MTEX_SUB 3
+#define MTEX_DIV 4
+#define MTEX_DARK 5
+#define MTEX_DIFF 6
+#define MTEX_LIGHT 7
+#define MTEX_SCREEN 8
+#define MTEX_OVERLAY 9
+
+/* **************** EnvMap ********************* */
+
+/* type */
+#define ENV_CUBE 0
+#define ENV_PLANE 1
+#define ENV_SPHERE 2
+
+/* stype */
+#define ENV_STATIC 0
+#define ENV_ANIM 1
+#define ENV_LOAD 2
+
+/* ok */
+#define ENV_NORMAL 1
+#define ENV_OSA 2
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
new file mode 100644
index 00000000000..47c00813913
--- /dev/null
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -0,0 +1,288 @@
+/**
+ * blenkernel/DNA_userdef_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+*/
+
+#ifndef DNA_USERDEF_TYPES_H
+#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
+
+typedef struct ThemeUI {
+ char outline[4];
+ char neutral[4];
+ char action[4];
+ char setting[4];
+ char setting1[4];
+ char setting2[4];
+ char num[4];
+ char textfield[4];
+ char textfield_hi[4];
+ char popup[4];
+ char text[4];
+ char text_hi[4];
+ char menu_back[4];
+ char menu_item[4];
+ char menu_hilite[4];
+ char menu_text[4];
+ char menu_text_hi[4];
+
+ 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...
+typedef struct ThemeSpace {
+ char back[4];
+ char text[4];
+ char text_hi[4];
+ char header[4];
+ char panel[4];
+
+ char shade1[4];
+ char shade2[4];
+
+ char hilite[4];
+ char grid[4];
+
+ char wire[4], select[4];
+ char lamp[4];
+ char active[4], group[4], group_active[4], transform[4];
+ char vertex[4], vertex_select[4];
+ char edge[4], edge_select[4];
+ char edge_seam[4], edge_sharp[4], edge_facesel[4];
+ char face[4], face_select[4]; // solid faces
+ char face_dot[4]; // selected color
+ char normal[4];
+ char bone_solid[4], bone_pose[4];
+ char strip[4], strip_select[4];
+
+ char vertex_size, facedot_size;
+ char bpad[2];
+
+ char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes
+ char syntaxv[4], syntaxc[4];
+
+ char movie[4], image[4], scene[4], audio[4]; // for sequence editor
+ char effect[4], plugin[4], transition[4], meta[4];
+ char editmesh_active[4];
+
+} ThemeSpace;
+
+
+typedef struct bTheme {
+ struct bTheme *next, *prev;
+ char name[32];
+
+ ThemeUI tui;
+
+ ThemeSpace tbuts;
+ ThemeSpace tv3d;
+ ThemeSpace tfile;
+ ThemeSpace tipo;
+ ThemeSpace tinfo;
+ ThemeSpace tsnd;
+ ThemeSpace tact;
+ ThemeSpace tnla;
+ ThemeSpace tseq;
+ ThemeSpace tima;
+ ThemeSpace timasel;
+ ThemeSpace text;
+ ThemeSpace toops;
+ ThemeSpace ttime;
+ ThemeSpace tnode;
+
+ unsigned char bpad[4], bpad1[4];
+
+} bTheme;
+
+typedef struct SolidLight {
+ int flag, pad;
+ float col[4], spec[4], vec[4];
+} SolidLight;
+
+typedef struct UserDef {
+ int flag, dupflag;
+ int savetime;
+ char tempdir[160]; // FILE_MAXDIR length
+ char fontdir[160];
+ char renderdir[160];
+ char textudir[160];
+ char plugtexdir[160];
+ char plugseqdir[160];
+ char pythondir[160];
+ char sounddir[160];
+ /* yafray: temporary xml export directory */
+ char yfexportdir[160];
+ short versions, vrmlflag; // tmp for export, will be replaced by strubi
+ int gameflags;
+ int wheellinescroll;
+ int uiflag, language;
+ short userpref, viewzoom;
+ short console_buffer; //console vars here for tuhopuu compat, --phase
+ short console_out;
+ int mixbufsize;
+ int fontsize;
+ short encoding;
+ short transopts;
+ short menuthreshold1, menuthreshold2;
+ char fontname[256]; // FILE_MAXDIR+FILE length
+ struct ListBase themes;
+ short undosteps;
+ short curssize;
+ short tb_leftmouse, tb_rightmouse;
+ struct SolidLight light[3];
+ 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 */
+ short recent_files; /* maximum number of recently used files to remember */
+ short smooth_viewtx; /* miliseconds to spend spinning the view */
+ short glreslimit;
+ char versemaster[160];
+ char verseuser[160];
+ float glalphaclip, pad;
+
+ struct ColorBand coba_weight; /* from texture.h */
+} UserDef;
+
+extern UserDef U; /* from usiblender.c !!!! */
+
+/* ***************** USERDEF ****************** */
+
+/* flag */
+#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)
+
+
+/* viewzom */
+#define USER_ZOOM_CONT 0
+#define USER_ZOOM_SCALE 1
+#define USER_ZOOM_DOLLY 2
+
+/* uiflag */
+
+#define USER_KEYINSERTACT (1 << 0)
+#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 (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)
+#define USER_KEYINSERTAVAI (1 << 15)
+#define USER_HIDE_DOT (1 << 16)
+#define USER_SHOW_ROTVIEWICON (1 << 17)
+#define USER_SHOW_VIEWPORTNAME (1 << 18)
+#define USER_KEYINSERTNEED (1 << 19)
+#define USER_ZOOM_TO_MOUSEPOS (1 << 20)
+
+/* 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)
+
+/* 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
+
+/* tw_flag (transform widget) */
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h
new file mode 100644
index 00000000000..9ae72b1c641
--- /dev/null
+++ b/source/blender/makesdna/DNA_vec_types.h
@@ -0,0 +1,91 @@
+/**
+ * vec_types.h dec 2000 Nzc
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ */
+
+#ifndef DNA_VEC_TYPES_H
+#define DNA_VEC_TYPES_H
+
+/* types */
+typedef struct vec2s {
+ short x, y;
+} vec2s;
+
+typedef struct vec2i {
+ int x, y;
+} vec2i;
+
+typedef struct vec2f {
+ float x, y;
+} vec2f;
+
+typedef struct vec2d {
+ double x, y;
+} vec2d;
+
+typedef struct vec3i {
+ int x, y, z;
+} vec3i;
+
+typedef struct vec3f {
+ float x, y, z;
+} vec3f;
+
+typedef struct vec3d {
+ double x, y, z;
+} vec3d;
+
+typedef struct vec4i {
+ int x, y, z, w;
+} vec4i;
+
+typedef struct vec4f {
+ float x, y, z, w;
+} vec4f;
+
+typedef struct vec4d {
+ double x, y, z, w;
+} vec4d;
+
+typedef struct rcti {
+ int xmin, xmax;
+ int ymin, ymax;
+} rcti;
+
+typedef struct rctf {
+ float xmin, xmax;
+ float ymin, ymax;
+} rctf;
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h
new file mode 100644
index 00000000000..df9279d6243
--- /dev/null
+++ b/source/blender/makesdna/DNA_vfont_types.h
@@ -0,0 +1,63 @@
+/**
+ * blenlib/DNA_vfont_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_VFONT_TYPES_H
+#define DNA_VFONT_TYPES_H
+
+#include "DNA_ID.h"
+
+struct PackedFile;
+struct VFontData;
+
+typedef struct VFont {
+ ID id;
+
+ char name[256];
+ float scale, pad;
+
+ struct VFontData *data;
+ struct PackedFile * packedfile;
+} VFont;
+
+/* *************** FONT ****************** */
+
+#define FO_CURS 1
+#define FO_CURSUP 2
+#define FO_CURSDOWN 3
+#define FO_DUPLI 4
+#define FO_PAGEUP 8
+#define FO_PAGEDOWN 9
+#define FO_SELCHANGE 10
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
new file mode 100644
index 00000000000..3ed82ddc793
--- /dev/null
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -0,0 +1,67 @@
+/**
+ * blenlib/DNA_view2d_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_VIEW2D_TYPES_H
+#define DNA_VIEW2D_TYPES_H
+
+#include "DNA_vec_types.h"
+
+typedef struct View2D {
+ rctf tot, cur;
+ rcti vert, hor, mask;
+ float min[2], max[2];
+ float minzoom, maxzoom;
+ short scroll, keeptot;
+ 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 */
+#define V2D_KEEPZOOM 0x0001
+#define V2D_LOCKZOOM_X 0x0100
+#define V2D_LOCKZOOM_Y 0x0200
+
+/* event codes for locking function */
+#define V2D_LOCK_COPY 1
+#define V2D_LOCK_REDRAW 2
+
+/* v2d->flag */
+#define V2D_VIEWLOCK 1
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
new file mode 100644
index 00000000000..ee75d7b8f0f
--- /dev/null
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -0,0 +1,212 @@
+/**
+ * blenlib/DNA_view3d_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_VIEW3D_TYPES_H
+#define DNA_VIEW3D_TYPES_H
+
+struct ViewDepths;
+struct Object;
+struct Image;
+struct Tex;
+struct SpaceLink;
+struct Base;
+struct BoundBox;
+struct RenderInfo;
+struct RetopoViewData;
+
+/* This is needed to not let VC choke on near and far... old
+ * proprietary MS extensions... */
+#ifdef WIN32
+#undef near
+#undef far
+#define near clipsta
+#define far clipend
+#endif
+
+#include "DNA_listBase.h"
+#include "DNA_image_types.h"
+
+/* The near/far thing is a Win EXCEPTION. Thus, leave near/far in the
+ * code, and patch for windows. */
+
+typedef struct BGpic {
+ struct Image *ima;
+ struct ImageUser iuser;
+ float xof, yof, size, zoom, blend;
+ short xim, yim;
+} BGpic;
+
+typedef struct View3D {
+ struct SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ short blockhandler[8];
+
+ float viewmat[4][4];
+ float viewinv[4][4];
+ float persmat[4][4];
+ float persinv[4][4];
+
+ float winmat1[4][4]; // persp(1) storage, for swap matrices
+ float viewmat1[4][4];
+
+ float viewquat[4], dist, zfac, pad0; /* zfac is initgrabz() result */
+
+ /**
+ * 0 - ortho
+ * 1 - do 3d perspective
+ * 2 - use the camera
+ */
+ short persp;
+ short view;
+
+ struct Object *camera, *ob_centre;
+ struct BGpic *bgpic;
+ struct View3D *localvd;
+ struct RenderInfo *ri;
+ struct RetopoViewData *retopo_view_data;
+ struct ViewDepths *depths;
+
+ char ob_centre_bone[32]; /* optional string for armature bone to define center */
+
+ /**
+ * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID,
+ * OB_SHADED or OB_TEXTURED */
+ short drawtype;
+ short localview;
+ int lay, layact;
+ short scenelock, around, camzoom;
+
+ char pivot_last, pad1; /* pivot_last is for rotating around the last edited element */
+
+ float lens, grid, gridview, pixsize, near, far;
+ float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
+ float ofs[3], cursor[3];
+
+ short gridlines, viewbut;
+ short gridflag;
+ short modeselect, menunr, texnr;
+
+ /* transform widget info */
+ short twtype, twmode, twflag, twdrawflag;
+ float twmat[4][4];
+
+ /* user defined clipping planes */
+ float clip[4][4];
+
+ struct BoundBox *clipbb;
+
+ /* afterdraw, for xray & transparent */
+ struct ListBase afterdraw;
+ /* drawflags, denoting state */
+ short zbuf, transp, xray;
+
+ short flag, flag2;
+
+ short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */
+
+ short pad3;
+
+ short pad2;
+
+ void *properties_storage; /* Nkey panel stores stuff here, not in file */
+
+} View3D;
+
+/* View3D->flag (short) */
+#define V3D_MODE (16+32+64+128+256+512)
+#define V3D_DISPIMAGE 1
+#define V3D_DISPBGPIC 2
+#define V3D_HIDE_HELPLINES 4
+#define V3D_NEEDBACKBUFDRAW 8
+#define V3D_EDITMODE 16
+#define V3D_VERTEXPAINT 32
+#define V3D_FACESELECT 64
+#define V3D_POSEMODE 128
+#define V3D_TEXTUREPAINT 256
+#define V3D_WEIGHTPAINT 512
+#define V3D_ALIGN 1024
+#define V3D_SELECT_OUTLINE 2048
+#define V3D_ZBUF_SELECT 4096
+#define V3D_GLOBAL_STATS 8192
+#define V3D_CLIPPING 16384
+#define V3D_DRAW_CENTERS 32768
+
+
+/* View3d->flag2 (short) */
+#define V3D_OPP_DIRECTION_NAME 1
+#define V3D_FLYMODE 2
+#define V3D_DEPRECATED 4 /* V3D_TRANSFORM_SNAP, moved to a scene setting */
+#define V3D_SOLID_TEX 8
+
+/* View3D->around */
+#define V3D_CENTER 0
+#define V3D_CENTROID 3
+#define V3D_CURSOR 1
+#define V3D_LOCAL 2
+#define V3D_ACTIVE 4
+
+
+/* View3d->persp */
+#define V3D_PERSP_ORTHO 0
+#define V3D_PERSP_DO_3D_PERSP 1
+#define V3D_PERSP_USE_THE_CAMERA 2
+
+/* View3d->gridflag */
+#define V3D_SHOW_FLOOR 1
+#define V3D_SHOW_X 2
+#define V3D_SHOW_Y 4
+#define V3D_SHOW_Z 8
+
+/* View3d->twtype (bits, we can combine them) */
+#define V3D_MANIP_TRANSLATE 1
+#define V3D_MANIP_ROTATE 2
+#define V3D_MANIP_SCALE 4
+
+/* View3d->twmode */
+#define V3D_MANIP_GLOBAL 0
+#define V3D_MANIP_LOCAL 1
+#define V3D_MANIP_NORMAL 2
+#define V3D_MANIP_VIEW 3
+
+/* View3d->twflag */
+ /* USE = user setting, DRAW = based on selection */
+#define V3D_USE_MANIPULATOR 1
+#define V3D_DRAW_MANIPULATOR 2
+#define V3D_CALC_MANIPULATOR 4
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_wave_types.h b/source/blender/makesdna/DNA_wave_types.h
new file mode 100644
index 00000000000..f499004fff8
--- /dev/null
+++ b/source/blender/makesdna/DNA_wave_types.h
@@ -0,0 +1,53 @@
+/**
+ * blenlib/DNA_wave_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_WAVE_TYPES_H
+#define DNA_WAVE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct Ipo;
+
+
+/* a Wave has never been implemented... it was meant as a 'free' mathematical
+ deformation object type (ton) */
+
+typedef struct Wave {
+ ID id;
+
+ struct Ipo *ipo;
+
+} Wave;
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
new file mode 100644
index 00000000000..9e5ec4cdb9a
--- /dev/null
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -0,0 +1,181 @@
+/**
+ * blenlib/DNA_world_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_WORLD_TYPES_H
+#define DNA_WORLD_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct Ipo;
+struct MTex;
+
+#ifndef MAX_MTEX
+#define MAX_MTEX 10
+#endif
+
+
+/**
+ * World defines general modeling data such as a background fill,
+ * gravity, color model, stars, etc. It mixes game-data, rendering
+ * data and modeling data. */
+typedef struct World {
+ ID id;
+
+ 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;
+
+ unsigned int fastcol;
+
+ /**
+ * Exposure= mult factor. unused now, but maybe back later. Kept in to be upward compat.
+ * New is exp/range control. linfac & logfac are constants... don't belong in
+ * file, but allocating 8 bytes for temp mem isnt useful either.
+ */
+ float exposure, exp, range;
+ float linfac, logfac;
+
+ /**
+ * Gravitation constant for the game world
+ */
+ float gravity;
+
+ /**
+ * Radius of the activity bubble, in Manhattan length. Objects
+ * outside the box are activity-culled. */
+ float activityBoxRadius;
+
+ short skytype;
+ /**
+ * Some world modes
+ * bit 0: Do mist
+ * bit 1: Do stars
+ * bit 2: (reserved) depth of field
+ * bit 3: (gameengine): Activity culling is enabled.
+ */
+ short mode;
+ int physicsEngine; /* here it's aligned */
+
+ float misi, miststa, mistdist, misthi;
+
+ float starr, starg, starb, stark;
+ float starsize, starmindist;
+ float stardist, starcolnoise;
+
+ /* unused now: DOF */
+ short dofsta, dofend, dofmin, dofmax;
+
+ /* ambient occlusion */
+ float aodist, aodistfac, aoenergy, aobias;
+ short aomode, aosamp, aomix, aocolor;
+ float ao_adapt_thresh, ao_adapt_speed_fac;
+ float pad2[2];
+ short ao_samp_method;
+ short pad1[3];
+
+ float *aosphere, *aotables;
+
+
+ struct Ipo *ipo;
+ struct MTex *mtex[10];
+
+ /* previews */
+ struct PreviewImage *preview;
+
+ ScriptLink scriptlink;
+
+} World;
+
+/* **************** WORLD ********************* */
+
+/* skytype */
+#define WO_SKYBLEND 1
+#define WO_SKYREAL 2
+#define WO_SKYPAPER 4
+/* while render: */
+#define WO_SKYTEX 8
+#define WO_ZENUP 16
+
+/* mode */
+#define WO_MIST 1
+#define WO_STARS 2
+#define WO_DOF 4
+#define WO_ACTIVITY_CULLING 8
+#define WO_AMB_OCC 16
+
+/* aomix */
+#define WO_AOADD 0
+#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
+
+/* aocolor */
+#define WO_AOPLAIN 0
+#define WO_AOSKYCOL 1
+#define WO_AOSKYTEX 2
+
+/* texco (also in DNA_material_types.h) */
+#define TEXCO_ANGMAP 64
+#define TEXCO_H_SPHEREMAP 256
+#define TEXCO_H_TUBEMAP 1024
+
+/* mapto */
+#define WOMAP_BLEND 1
+#define WOMAP_HORIZ 2
+#define WOMAP_ZENUP 4
+#define WOMAP_ZENDOWN 8
+#define WOMAP_MIST 16
+
+/* physicsEngine */
+#define WOPHY_NONE 0
+#define WOPHY_ENJI 1
+#define WOPHY_SUMO 2
+#define WOPHY_DYNAMO 3
+#define WOPHY_ODE 4
+#define WOPHY_BULLET 5
+
+#endif
+
diff --git a/source/blender/makesdna/Makefile b/source/blender/makesdna/Makefile
new file mode 100644
index 00000000000..f8274102b8c
--- /dev/null
+++ b/source/blender/makesdna/Makefile
@@ -0,0 +1,42 @@
+#
+# $Id$
+#
+# ***** 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) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+#
+# This module does not build normal .o's, but a DNA.c file, to be
+# compiled with the rest of the sources. To speed things up a little,
+# the compilation is done here.
+#
+# Bounces make to subdirectories.
+
+SOURCEDIR = source/blender/makesdna
+DIRS = intern
+
+include nan_subdirs.mk
diff --git a/source/blender/makesdna/SConscript b/source/blender/makesdna/SConscript
new file mode 100644
index 00000000000..d67be4955c4
--- /dev/null
+++ b/source/blender/makesdna/SConscript
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+Import ('env')
+
+objs = []
+
+o = SConscript('intern/SConscript')
+objs.append (o)
+
+incs = '#/intern/guardedalloc'
+
+env.BlenderLib ( 'bf_dna', objs, Split(incs), [], libtype=['common','player'], priority = [10, 215] )
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
new file mode 100644
index 00000000000..58aa4b3cd21
--- /dev/null
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -0,0 +1,37 @@
+# $Id$
+# ***** 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, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Jacques Beaurain.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+
+SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c)
+
+INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..)
+
+FILE(GLOB INC_FILES ../*.h)
+ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES})
+
+MESSAGE(STATUS "Configuring makesdna")
diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile
new file mode 100644
index 00000000000..bd498961e7a
--- /dev/null
+++ b/source/blender/makesdna/intern/Makefile
@@ -0,0 +1,86 @@
+#
+# $Id$
+#
+# ***** 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) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+#
+
+DIR = $(OCGDIR)/blender/makesdna
+CSRCS = $(wildcard *.c)
+
+ALLTARGETS = $(OBJS) $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(SHARED_DIR)$(DEBUG_DIR)DNA.o
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I$(OPENGL_HEADERS)
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I..
+
+ifeq ($(OS),windows)
+ # Windows needs these extra libs because of winstuff... It is not
+ # _really_ needed, but it is the easiest fix for now. If you have
+ # some spare time, try to trace down the exact dep. Then again, you
+ # could also spend that time making the sdna system more robust.
+ ifneq ($(FREE_WINDOWS),true)
+ WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
+ WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+ WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
+ WINLIBS += /link /nodefaultlib:libc
+ else
+ LDFLAGS += -mwindows -mno-cygwin
+ endif
+endif
+
+clean::
+ @$(RM) $(DIR)/makesdna* $(DIR)/DNA.c
+ @$(RM) $(DIR)/debug/makesdna* $(DIR)/debug/DNA.c
+
+# TODO include right .mk for ldflags
+
+# A small note: we do not use the debug version of the alloc lib. That
+# is done quite intentionally. If there is a bug in that lib, it needs
+# to be fixed by the module maintainer.
+$(DIR)/$(DEBUG_DIR)makesdna: $(OBJS) $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) \
+ $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a $(WINLIBS)
+
+$(DIR)/$(DEBUG_DIR)DNA.c: $(DIR)/$(DEBUG_DIR)makesdna
+ ifeq ($(OS),windows)
+ $(SRCHOME)/tools/cygwin/cl_wrapper.pl - $(DIR)/$(DEBUG_DIR)makesdna \
+ $(DIR)/$(DEBUG_DIR)DNA.c
+ else
+ $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(DEBUG_DIR)DNA.c
+ endif
+
+$(DIR)/$(SHARED_DIR)$(DEBUG_DIR)DNA.o: $(DIR)/$(DEBUG_DIR)DNA.c
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
new file mode 100644
index 00000000000..fe712afbeeb
--- /dev/null
+++ b/source/blender/makesdna/intern/SConscript
@@ -0,0 +1,41 @@
+#!/usr/bin/python
+import sys
+import os
+
+Import ('env')
+cflags = ''
+defines = []
+root_build_dir=env['BF_BUILDDIR']
+
+source_files = ['makesdna.c']
+
+makesdna_tool = env.Copy()
+dna = env.Copy()
+makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
+
+makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
+ '../../makesdna'])
+
+if env['OURPLATFORM'] == 'linuxcross':
+ makesdna_tool.Replace(CC='gcc')
+ makesdna_tool.Replace(AR='ar')
+ makesdna_tool.Replace(LINK='gcc')
+
+if sys.platform != 'cygwin':
+ makesdna_tool.Append (CCFLAGS = cflags)
+makesdna_tool.Append (CPPDEFINES = defines)
+makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib')
+
+if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep:
+ makesdna = makesdna_tool.Program (target = root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc'])
+else:
+ makesdna = makesdna_tool.Program (target = '#'+root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc'])
+
+dna_dict = dna.Dictionary()
+dna.Depends ('dna.c', makesdna)
+if env['OURPLATFORM'] != 'linuxcross':
+ dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
+else:
+ dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
+obj = 'intern/dna.c'
+Return ('obj')
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
new file mode 100644
index 00000000000..af41380d5f8
--- /dev/null
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -0,0 +1,1149 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * Struct muncher for making SDNA
+ *
+ * Originally by Ton, some mods by Frank, and some cleaning and
+ * extension by Nzc.
+ *
+ * Makesdna creates a .c file with a long string of numbers that
+ * encode the Blender file format. It is fast, because it is basically
+ * a binary dump. There are some details to mind when reconstructing
+ * the file (endianness and byte-alignment).
+ *
+ * This little program scans all structs that need to be serialized,
+ * and determined the names and types of all members. It calculates
+ * how much memory (on disk or in ram) is needed to store that struct,
+ * and the offsets for reaching a particular one.
+ *
+ * There is a facility to get verbose output from sdna. Search for
+ * debugSDNA. This int can be set to 0 (no output) to some int. Higher
+ * numbers give more output.
+ * */
+
+#define DNA_VERSION_DATE "$Id$"
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "MEM_guardedalloc.h"
+#include "DNA_sdna_types.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define SDNA_MAX_FILENAME_LENGTH 255
+
+
+/* Included the path relative from /source/blender/ here, so we can move */
+/* headers around with more freedom. */
+char *includefiles[] = {
+
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+
+ "DNA_listBase.h",
+ "DNA_vec_types.h",
+ "DNA_ID.h",
+ "DNA_ipo_types.h",
+ "DNA_key_types.h",
+ "DNA_scriptlink_types.h",
+ "DNA_text_types.h",
+ "DNA_packedFile_types.h",
+ "DNA_camera_types.h",
+ "DNA_image_types.h",
+ "DNA_texture_types.h",
+ "DNA_lamp_types.h",
+ "DNA_wave_types.h",
+ "DNA_material_types.h",
+ "DNA_vfont_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+ "DNA_meta_types.h",
+ "DNA_curve_types.h",
+ "DNA_mesh_types.h",
+ "DNA_meshdata_types.h",
+ "DNA_modifier_types.h",
+ "DNA_lattice_types.h",
+ "DNA_object_types.h",
+ "DNA_object_force.h",
+ "DNA_object_fluidsim.h",
+ "DNA_world_types.h",
+ "DNA_radio_types.h",
+ "DNA_scene_types.h",
+ "DNA_view3d_types.h",
+ "DNA_view2d_types.h",
+ "DNA_space_types.h",
+ "DNA_userdef_types.h",
+ "DNA_screen_types.h",
+ "DNA_sdna_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+ "DNA_fileglobal_types.h",
+ "DNA_sequence_types.h",
+ "DNA_effect_types.h",
+ "DNA_oops_types.h",
+ "DNA_property_types.h",
+ "DNA_sensor_types.h",
+ "DNA_controller_types.h",
+ "DNA_actuator_types.h",
+ "DNA_sound_types.h",
+ "DNA_group_types.h",
+ "DNA_armature_types.h",
+ "DNA_action_types.h",
+ "DNA_constraint_types.h",
+ "DNA_nla_types.h",
+ "DNA_node_types.h",
+ "DNA_color_types.h",
+ "DNA_brush_types.h",
+ "DNA_customdata_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+
+ // empty string to indicate end of includefiles
+ ""
+};
+
+int maxdata= 500000, maxnr= 50000;
+int nr_names=0;
+int nr_types=0;
+int nr_structs=0;
+char **names, *namedata; /* at adress names[a] is string a */
+char **types, *typedata; /* at adress types[a] is string a */
+short *typelens; /* at typelens[a] is de length of type a */
+short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits) */
+short **structs, *structdata; /* at sp= structs[a] is the first adress of a struct definition
+ sp[0] is type number
+ sp[1] is amount of elements
+ sp[2] sp[3] is typenr, namenr (etc) */
+/*
+ * debugSDNA:
+ * - 0 = no output, except errors
+ * - 1 = detail actions
+ * - 2 = full trace, tell which names and types were found
+ * - 4 = full trace, plus all gritty details
+ */
+int debugSDNA = 0;
+int additional_slen_offset;
+
+/* ************************************************************************** */
+/* Functions */
+/* ************************************************************************** */
+
+/**
+ * Add type <str> to struct indexed by <len>, if it was not yet found.
+ */
+int add_type(char *str, int len);
+
+/**
+ * Add variable <str> to
+ */
+int add_name(char *str);
+
+/**
+ * Search whether this structure type was already found, and if not,
+ * add it.
+ */
+short *add_struct(int namecode);
+
+/**
+ * Remove comments from this buffer. Assumes that the buffer refers to
+ * ascii-code text.
+ */
+int preprocess_include(char *maindata, int len);
+
+/**
+ * Scan this file for serializable types.
+ */
+int convert_include(char *filename);
+
+/**
+ * Determine how many bytes are needed for an array.
+ */
+int arraysize(char *astr, int len);
+
+/**
+ * Determine how many bytes are needed for each struct.
+ */
+static int calculate_structlens(int);
+
+/**
+ * Construct the DNA.c file
+ */
+void dna_write(FILE *file, void *pntr, int size);
+
+/**
+ * Report all structures found so far, and print their lenghts.
+ */
+void printStructLenghts(void);
+
+
+
+/* ************************************************************************** */
+/* Implementation */
+/* ************************************************************************** */
+
+/* ************************* MAKEN DNA ********************** */
+
+int add_type(char *str, int len)
+{
+ int nr;
+ char *cp;
+
+ if(str[0]==0) return -1;
+
+ /* search through type array */
+ for(nr=0; nr<nr_types; nr++) {
+ if(strcmp(str, types[nr])==0) {
+ if (len) {
+ typelens[nr]= len;
+ alphalens[nr] = len;
+ }
+ return nr;
+ }
+ }
+
+ /* append new type */
+ if(nr_types==0) cp= typedata;
+ else {
+ cp= types[nr_types-1]+strlen(types[nr_types-1])+1;
+ }
+ strcpy(cp, str);
+ types[nr_types]= cp;
+ typelens[nr_types]= len;
+ alphalens[nr_types]= len;
+
+ if(nr_types>=maxnr) {
+ printf("too many types\n");
+ return nr_types-1;;
+ }
+ nr_types++;
+
+ return nr_types-1;
+}
+
+
+/**
+ *
+ * Because of the weird way of tokenizing, we have to 'cast' function
+ * pointers to ... (*f)(), whatever the original signature. In fact,
+ * we add name and type at the same time... There are two special
+ * cases, unfortunately. These are explicitly checked.
+ *
+ * */
+int add_name(char *str)
+{
+ int nr, i, j, k;
+ char *cp;
+ char buf[255]; /* stupid limit, change it :) */
+ char *name;
+
+ additional_slen_offset = 0;
+
+ if((str[0]==0) /* || (str[1]==0) */) return -1;
+
+ if (str[0] == '(' && str[1] == '*') {
+ if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer found\n");
+ /* functionpointer: transform the type (sometimes) */
+ i = 0;
+ j = 0;
+
+ while (str[i] != ')') {
+ buf[i] = str[i];
+ i++;
+ }
+
+ /* Another number we need is the extra slen offset. This extra
+ * offset is the overshoot after a space. If there is no
+ * space, no overshoot should be calculated. */
+ j = i; /* j at first closing brace */
+
+ if (debugSDNA > 3) printf("first brace after offset %d\n", i);
+
+ j++; /* j beyond closing brace ? */
+ while ((str[j] != 0) && (str[j] != ')' )) {
+ if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
+ j++;
+ }
+ if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
+ if (debugSDNA > 3) printf("special after offset %d\n", j);
+
+ if (str[j] == 0 ) {
+ if (debugSDNA > 3) printf("offsetting for space\n");
+ /* get additional offset */
+ k = 0;
+ while (str[j] != ')') {
+ j++;
+ k++;
+ }
+ if (debugSDNA > 3) printf("extra offset %d\n", k);
+ additional_slen_offset = k;
+ } else if (str[j] == ')' ) {
+ if (debugSDNA > 3) printf("offsetting for brace\n");
+ ; /* don't get extra offset */
+ } else {
+ printf("Error during tokening function pointer argument list\n");
+ }
+
+ /*
+ * Put )(void) at the end? Maybe )(). Should check this with
+ * old sdna. Actually, sometimes )(), sometimes )(void...)
+ * Alas.. such is the nature of braindamage :(
+ *
+ * Sorted it out: always do )(), except for headdraw and
+ * windraw, part of ScrArea. This is important, because some
+ * linkers will treat different fp's differently when called
+ * !!! This has to do with interference in byte-alignment and
+ * the way args are pushed on the stack.
+ *
+ * */
+ buf[i] = 0;
+ if (debugSDNA > 3) printf("Name before chomping: %s\n", buf);
+ if ( (strncmp(buf,"(*headdraw", 10) == 0)
+ || (strncmp(buf,"(*windraw", 9) == 0) ) {
+ buf[i] = ')';
+ buf[i+1] = '(';
+ buf[i+2] = 'v';
+ buf[i+3] = 'o';
+ buf[i+4] = 'i';
+ buf[i+5] = 'd';
+ buf[i+6] = ')';
+ buf[i+7] = 0;
+ } else {
+ buf[i] = ')';
+ buf[i+1] = '(';
+ buf[i+2] = ')';
+ buf[i+3] = 0;
+ }
+ /* now precede with buf*/
+ if (debugSDNA > 3) printf("\t\t\t\t\tProposing fp name %s\n", buf);
+ name = buf;
+ } else {
+ /* normal field: old code */
+ name = str;
+ }
+
+ /* search name array */
+ for(nr=0; nr<nr_names; nr++) {
+ if(strcmp(name, names[nr])==0) {
+ return nr;
+ }
+ }
+
+ /* append new type */
+ if(nr_names==0) cp= namedata;
+ else {
+ cp= names[nr_names-1]+strlen(names[nr_names-1])+1;
+ }
+ strcpy(cp, name);
+ names[nr_names]= cp;
+
+ if(nr_names>=maxnr) {
+ printf("too many names\n");
+ return nr_names-1;
+ }
+ nr_names++;
+
+ return nr_names-1;
+}
+
+short *add_struct(int namecode)
+{
+ int len;
+ short *sp;
+
+ if(nr_structs==0) {
+ structs[0]= structdata;
+ }
+ else {
+ sp= structs[nr_structs-1];
+ len= sp[1];
+ structs[nr_structs]= sp+ 2*len+2;
+ }
+
+ sp= structs[nr_structs];
+ sp[0]= namecode;
+
+ if(nr_structs>=maxnr) {
+ printf("too many structs\n");
+ return sp;
+ }
+ nr_structs++;
+
+ return sp;
+}
+
+int preprocess_include(char *maindata, int len)
+{
+ int a, newlen, comment = 0;
+ char *cp, *temp, *md;
+
+ temp= MEM_mallocN(len, "preprocess_include");
+ memcpy(temp, maindata, len);
+
+ // remove all c++ comments
+ /* replace all enters/tabs/etc with spaces */
+ cp= temp;
+ a= len;
+ comment = 0;
+ while(a--) {
+ if(cp[0]=='/' && cp[1]=='/') {
+ comment = 1;
+ } else if (*cp<32) {
+ comment = 0;
+ }
+ if (comment || *cp<32 || *cp>128 ) *cp= 32;
+ cp++;
+ }
+
+
+ /* data from temp copy to maindata, remove comments and double spaces */
+ cp= temp;
+ md= maindata;
+ newlen= 0;
+ comment= 0;
+ a= len;
+ while(a--) {
+
+ if(cp[0]=='/' && cp[1]=='*') {
+ comment= 1;
+ cp[0]=cp[1]= 32;
+ }
+ if(cp[0]=='*' && cp[1]=='/') {
+ comment= 0;
+ cp[0]=cp[1]= 32;
+ }
+
+ /* do not copy when: */
+ if(comment);
+ else if( cp[0]==' ' && cp[1]==' ' );
+ else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers with a space */
+ else {
+ md[0]= cp[0];
+ md++;
+ newlen++;
+ }
+ cp++;
+ }
+
+ MEM_freeN(temp);
+ return newlen;
+}
+
+static void *read_file_data(char *filename, int *len_r)
+{
+#ifdef WIN32
+ FILE *fp= fopen(filename, "rb");
+#else
+ FILE *fp= fopen(filename, "r");
+#endif
+ void *data;
+
+ if (!fp) {
+ *len_r= -1;
+ return NULL;
+ }
+
+ fseek(fp, 0L, SEEK_END);
+ *len_r= ftell(fp);
+ fseek(fp, 0L, SEEK_SET);
+
+ data= MEM_mallocN(*len_r, "read_file_data");
+ if (!data) {
+ *len_r= -1;
+ return NULL;
+ }
+
+ if (fread(data, *len_r, 1, fp)!=1) {
+ *len_r= -1;
+ MEM_freeN(data);
+ return NULL;
+ }
+
+ return data;
+}
+
+int convert_include(char *filename)
+{
+ /* read include file, skip structs with a '#' before it.
+ store all data in temporal arrays.
+ */
+ int filelen, count, overslaan, slen, type, name, strct;
+ short *structpoin, *sp;
+ char *maindata, *mainend, *md, *md1;
+
+ md= maindata= read_file_data(filename, &filelen);
+ if (filelen==-1) {
+ printf("Can't read file %s\n", filename);
+ return 1;
+ }
+
+ filelen= preprocess_include(maindata, filelen);
+ mainend= maindata+filelen-1;
+
+ /* we look for '{' and then back to 'struct' */
+ count= 0;
+ overslaan= 0;
+ while(count<filelen) {
+
+ /* code for skipping a struct: two hashes. (preprocess added a space) */
+ if(md[0]=='#' && md[1]==' ' && md[2]=='#') {
+ overslaan= 1;
+ }
+
+ if(md[0]=='{') {
+ md[0]= 0;
+ if(overslaan) {
+ overslaan= 0;
+ }
+ else {
+ if(md[-1]==' ') md[-1]= 0;
+ md1= md-2;
+ while( *md1!=32) md1--; /* to beginning of word */
+ md1++;
+
+ /* we've got a struct name when... */
+ if( strncmp(md1-7, "struct", 6)==0 ) {
+
+
+ strct= add_type(md1, 0);
+ structpoin= add_struct(strct);
+ sp= structpoin+2;
+
+ if (debugSDNA > 1) printf("\t|\t|-- detected struct %s\n", types[strct]);
+
+ /* first lets make it all nice strings */
+ md1= md+1;
+ while(*md1 != '}') {
+ if(md1>mainend) break;
+
+ if(*md1==',' || *md1==' ') *md1= 0;
+ md1++;
+ }
+
+ /* read types and names until first character that is not '}' */
+ md1= md+1;
+ while( *md1 != '}' ) {
+ if(md1>mainend) break;
+
+ /* skip when it says 'struct' or 'unsigned' */
+ if(*md1) {
+ if( strncmp(md1, "struct", 6)==0 ) md1+= 7;
+ if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9;
+
+ /* we've got a type! */
+ type= add_type(md1, 0);
+
+ if (debugSDNA > 1) printf("\t|\t|\tfound type %s (", md1);
+
+ md1+= strlen(md1);
+
+
+ /* read until ';' */
+ while( *md1 != ';' ) {
+ if(md1>mainend) break;
+
+ if(*md1) {
+ /* We've got a name. slen needs
+ * correction for function
+ * pointers! */
+ slen= (int) strlen(md1);
+ if( md1[slen-1]==';' ) {
+ md1[slen-1]= 0;
+
+
+ name= add_name(md1);
+ slen += additional_slen_offset;
+ sp[0]= type;
+ sp[1]= name;
+
+ if ((debugSDNA>1) && (names[name] != 0 )) printf("%s |", names[name]);
+
+ structpoin[1]++;
+ sp+= 2;
+
+ md1+= slen;
+ break;
+ }
+
+
+ name= add_name(md1);
+ slen += additional_slen_offset;
+
+ sp[0]= type;
+ sp[1]= name;
+ if ((debugSDNA > 1) && (names[name] != 0 )) printf("%s ||", names[name]);
+
+ structpoin[1]++;
+ sp+= 2;
+
+ md1+= slen;
+ }
+ md1++;
+ }
+
+ if (debugSDNA > 1) printf(")\n");
+
+ }
+ md1++;
+ }
+ }
+ }
+ }
+ count++;
+ md++;
+ }
+
+ MEM_freeN(maindata);
+
+ return 0;
+}
+
+int arraysize(char *astr, int len)
+{
+ int a, mul=1;
+ char str[100], *cp=0;
+
+ memcpy(str, astr, len+1);
+
+ for(a=0; a<len; a++) {
+ if( str[a]== '[' ) {
+ cp= &(str[a+1]);
+ }
+ else if( str[a]==']' && cp) {
+ str[a]= 0;
+ mul*= atoi(cp);
+ }
+ }
+
+ return mul;
+}
+
+static int calculate_structlens(int firststruct)
+{
+ int a, b, len, alphalen, unknown= nr_structs, lastunknown, structtype, type, mul, namelen;
+ short *sp, *structpoin;
+ char *cp;
+ int has_pointer, dna_error = 0;
+
+ while(unknown) {
+ lastunknown= unknown;
+ unknown= 0;
+
+ /* check all structs... */
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* when length is not known... */
+ if(typelens[structtype]==0) {
+
+ sp= structpoin+2;
+ len= 0;
+ alphalen = 0;
+ has_pointer = 0;
+
+ /* check all elements in struct */
+ for(b=0; b<structpoin[1]; b++, sp+=2) {
+ type= sp[0];
+ cp= names[sp[1]];
+
+ namelen= (int) strlen(cp);
+ /* is it a pointer or function pointer? */
+ if(cp[0]=='*' || cp[1]=='*') {
+ has_pointer = 1;
+ /* has the name an extra length? (array) */
+ mul= 1;
+ if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
+
+ /* 4-8 aligned/ */
+ if(sizeof(void *) == 4) {
+ if (len % 4) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype], cp);
+ dna_error = 1;
+ }
+ } else {
+ if (len % 8) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype], cp);
+ dna_error = 1;
+ }
+ }
+
+ if (alphalen % 8) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype],cp);
+ dna_error = 1;
+ }
+
+ len += sizeof(void *) * mul;
+ alphalen += 8 * mul;
+
+ } else if( typelens[type] ) {
+ /* has the name an extra length? (array) */
+ mul= 1;
+ if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
+
+ /* struct alignment */
+ if(type >= firststruct) {
+ if(sizeof(void *)==8 && (len % 8) ) {
+ printf("Align struct error: %s %s\n", types[structtype],cp);
+ dna_error = 1;
+ }
+ }
+
+ /* 2-4 aligned/ */
+ if(typelens[type]>3 && (len % 4) ) {
+ printf("Align 4 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len%4);
+ dna_error = 1;
+ }
+ else if(typelens[type]==2 && (len % 2) ) {
+ printf("Align 2 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len%2);
+ dna_error = 1;
+ }
+
+ len += mul*typelens[type];
+ alphalen += mul * alphalens[type];
+
+ } else {
+ len= 0;
+ alphalen = 0;
+ break;
+ }
+ }
+
+ if (len==0) {
+ unknown++;
+ } else {
+ typelens[structtype]= len;
+ alphalens[structtype]= alphalen;
+ // two ways to detect if a struct contains a pointer:
+ // has_pointer is set or alphalen != len
+ if (has_pointer || alphalen != len) {
+ if (alphalen % 8) {
+ printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], alphalen%8);
+ dna_error = 1;
+ }
+ }
+
+ if(len % 4) {
+ printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], len%4);
+ dna_error = 1;
+ }
+
+ }
+ }
+ }
+
+ if(unknown==lastunknown) break;
+ }
+
+ if(unknown) {
+ printf("ERROR: still %d structs unknown\n", unknown);
+
+ if (debugSDNA) {
+ printf("*** Known structs : \n");
+
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* length unknown */
+ if(typelens[structtype]!=0) {
+ printf(" %s\n", types[structtype]);
+ }
+ }
+ }
+
+
+ printf("*** Unknown structs : \n");
+
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* length unkown yet */
+ if(typelens[structtype]==0) {
+ printf(" %s\n", types[structtype]);
+ }
+ }
+ }
+
+ return(dna_error);
+}
+
+#define MAX_DNA_LINE_LENGTH 20
+
+void dna_write(FILE *file, void *pntr, int size)
+{
+ static int linelength = 0;
+ int i;
+ char *data;
+
+ data = (char *) pntr;
+
+ for (i = 0 ; i < size ; i++)
+ {
+ fprintf(file, "%d,", data[i]);
+ linelength++;
+ if (linelength >= MAX_DNA_LINE_LENGTH) {
+ fprintf(file, "\n");
+ linelength = 0;
+ }
+ }
+}
+
+void printStructLenghts(void)
+{
+ int a, unknown= nr_structs, lastunknown, structtype;
+ short *structpoin;
+ printf("\n\n*** All detected structs:\n");
+
+ while(unknown) {
+ lastunknown= unknown;
+ unknown= 0;
+
+ /* check all structs... */
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+ printf("\t%s\t:%d\n", types[structtype], typelens[structtype]);
+ }
+ }
+
+ printf("*** End of list\n");
+
+}
+
+
+int make_structDNA(char *baseDirectory, FILE *file)
+{
+ int len, i;
+ short *sp;
+ /* str contains filenames. Since we now include paths, I stretched */
+ /* it a bit. Hope this is enough :) -nzc- */
+ char str[SDNA_MAX_FILENAME_LENGTH], *cp;
+ int firststruct;
+
+ if (debugSDNA > -1) {
+ fflush(stdout);
+ printf("Running makesdna at debug level %d\n", debugSDNA);
+ printf("\tProgram version: %s\n", DNA_VERSION_DATE);
+ }
+
+ /* the longest known struct is 50k, so we assume 100k is sufficent! */
+ namedata= MEM_callocN(maxdata, "namedata");
+ typedata= MEM_callocN(maxdata, "typedata");
+ structdata= MEM_callocN(maxdata, "structdata");
+
+ /* a maximum of 5000 variables, must be sufficient? */
+ names= MEM_callocN(sizeof(char *)*maxnr, "names");
+ types= MEM_callocN(sizeof(char *)*maxnr, "types");
+ typelens= MEM_callocN(sizeof(short)*maxnr, "typelens");
+ alphalens= MEM_callocN(sizeof(short)*maxnr, "alphalens");
+ structs= MEM_callocN(sizeof(short)*maxnr, "structs");
+
+ /* insertion of all known types */
+ /* watch it: uint is not allowed! use in structs an unsigned int */
+ add_type("char", 1); /* 0 */
+ add_type("uchar", 1); /* 1 */
+ add_type("short", 2); /* 2 */
+ add_type("ushort", 2); /* 3 */
+ add_type("int", 4); /* 4 */
+ add_type("long", 4); /* 5 */ /* should it be 8 on 64 bits? */
+ add_type("ulong", 4); /* 6 */
+ add_type("float", 4); /* 7 */
+ add_type("double", 8); /* 8 */
+ add_type("void", 0); /* 9 */
+
+ // the defines above shouldn't be output in the padding file...
+ firststruct = nr_types;
+
+ /* add all include files defined in the global array */
+ /* Since the internal file+path name buffer has limited length, I do a */
+ /* little test first... */
+ /* Mind the breaking condition here! */
+ if (debugSDNA) printf("\tStart of header scan:\n");
+ for (i = 0; strlen(includefiles[i]); i++) {
+ sprintf(str, "%s%s", baseDirectory, includefiles[i]);
+ if (debugSDNA) printf("\t|-- Converting %s\n", str);
+ if (convert_include(str)) {
+ return (1);
+ }
+ }
+ if (debugSDNA) printf("\tFinished scanning %d headers.\n", i);
+
+ if (calculate_structlens(firststruct)) {
+ // error
+ return(1);
+ }
+
+ /* FOR DEBUG */
+ if (debugSDNA > 1)
+ {
+ int a,b;
+/* short *elem; */
+ short num_types;
+
+ printf("nr_names %d nr_types %d nr_structs %d\n", nr_names, nr_types, nr_structs);
+ for(a=0; a<nr_names; a++) {
+ printf(" %s \n", names[a]);
+ }
+ printf("\n");
+
+ sp= typelens;
+ for(a=0; a<nr_types; a++, sp++) {
+ printf(" %s %d\n", types[a], *sp);
+ }
+ printf("\n");
+
+ for(a=0; a<nr_structs; a++) {
+ sp= structs[a];
+ printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1],typelens[sp[0]]);
+ num_types = sp[1];
+ sp+= 2;
+ /* ? num_types was elem? */
+ for(b=0; b< num_types; b++, sp+= 2) {
+ printf(" %s %s\n", types[sp[0]], names[sp[1]]);
+ }
+ }
+ }
+
+ /* file writing */
+
+ if (debugSDNA > -1) printf("Writing file ... ");
+
+ if(nr_names==0 || nr_structs==0);
+ else {
+ strcpy(str, "SDNA");
+ dna_write(file, str, 4);
+
+ /* write names */
+ strcpy(str, "NAME");
+ dna_write(file, str, 4);
+ len= nr_names;
+ dna_write(file, &len, 4);
+
+ /* calculate size of datablock with strings */
+ cp= names[nr_names-1];
+ cp+= strlen(names[nr_names-1]) + 1; /* +1: null-terminator */
+ len= (long) (cp - (char*) names[0]);
+ len= (len+3) & ~3;
+ dna_write(file, names[0], len);
+
+ /* write TYPES */
+ strcpy(str, "TYPE");
+ dna_write(file, str, 4);
+ len= nr_types;
+ dna_write(file, &len, 4);
+
+ /* calculate datablock size */
+ cp= types[nr_types-1];
+ cp+= strlen(types[nr_types-1]) + 1; /* +1: null-terminator */
+ len= (long) (cp - (char*) types[0]);
+ len= (len+3) & ~3;
+
+ dna_write(file, types[0], len);
+
+ /* WRITE TYPELENGTHS */
+ strcpy(str, "TLEN");
+ dna_write(file, str, 4);
+
+ len= 2*nr_types;
+ if(nr_types & 1) len+= 2;
+ dna_write(file, typelens, len);
+
+ /* WRITE STRUCTS */
+ strcpy(str, "STRC");
+ dna_write(file, str, 4);
+ len= nr_structs;
+ dna_write(file, &len, 4);
+
+ /* calc datablock size */
+ sp= structs[nr_structs-1];
+ sp+= 2+ 2*( sp[1] );
+ len= (long) ((char*) sp - (char*) structs[0]);
+ len= (len+3) & ~3;
+
+ dna_write(file, structs[0], len);
+
+ /* a simple dna padding test */
+ if (0) {
+ FILE *fp;
+ int a;
+
+ fp= fopen("padding.c", "w");
+ if(fp==NULL);
+ else {
+
+ // add all include files defined in the global array
+ for (i = 0; strlen(includefiles[i]); i++) {
+ fprintf(fp, "#include \"%s%s\"\n", baseDirectory, includefiles[i]);
+ }
+
+ fprintf(fp, "main(){\n");
+ sp = typelens;
+ sp += firststruct;
+ for(a=firststruct; a<nr_types; a++, sp++) {
+ if(*sp) {
+ fprintf(fp, "\tif(sizeof(struct %s) - %d) printf(\"ALIGN ERROR:", types[a], *sp);
+ fprintf(fp, "%%d %s %d ", types[a], *sp);
+ fprintf(fp, "\\n\", sizeof(struct %s) - %d);\n", types[a], *sp);
+ }
+ }
+ fprintf(fp, "}\n");
+ fclose(fp);
+ }
+ }
+ /* end end padding test */
+ }
+
+
+ MEM_freeN(namedata);
+ MEM_freeN(typedata);
+ MEM_freeN(structdata);
+ MEM_freeN(names);
+ MEM_freeN(types);
+ MEM_freeN(typelens);
+ MEM_freeN(structs);
+
+ if (debugSDNA > -1) printf("done.\n");
+
+ return(0);
+}
+
+/* ************************* END MAKE DNA ********************** */
+
+static void make_bad_file(char *file)
+{
+ FILE *fp= fopen(file, "w");
+ fprintf(fp, "ERROR! Cannot make correct DNA.c file, STUPID!\n");
+ fclose(fp);
+}
+
+#ifndef BASE_HEADER
+#define BASE_HEADER "../"
+#endif
+
+int main(int argc, char ** argv)
+{
+ FILE *file;
+ int return_status = 0;
+
+ if (argc!=2 && argc!=3) {
+ printf("Usage: %s outfile.c [base directory]\n", argv[0]);
+ return_status = 1;
+ } else {
+ file = fopen(argv[1], "w");
+ if (!file) {
+ printf ("Unable to open file: %s\n", argv[1]);
+ return_status = 1;
+ } else {
+ char baseDirectory[256];
+
+ if (argc==3) {
+ strcpy(baseDirectory, argv[2]);
+ } else {
+ strcpy(baseDirectory, BASE_HEADER);
+ }
+
+ fprintf (file, "unsigned char DNAstr[]= {\n");
+ if (make_structDNA(baseDirectory, file)) {
+ // error
+ fclose(file);
+ make_bad_file(argv[1]);
+ return_status = 1;
+ } else {
+ fprintf(file, "};\n");
+ fprintf(file, "int DNAlen= sizeof(DNAstr);\n");
+
+ fclose(file);
+ }
+ }
+ }
+
+
+ return(return_status);
+}
+
+// include files for automatic dependancies
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+#include "DNA_ID.h"
+#include "DNA_ipo_types.h"
+#include "DNA_key_types.h"
+#include "DNA_scriptlink_types.h"
+#include "DNA_text_types.h"
+#include "DNA_packedFile_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_image_types.h"
+#include "DNA_texture_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_wave_types.h"
+#include "DNA_material_types.h"
+#include "DNA_vfont_types.h"
+#include "DNA_meta_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_lattice_types.h"
+#include "DNA_object_types.h"
+#include "DNA_object_force.h"
+#include "DNA_object_fluidsim.h"
+#include "DNA_world_types.h"
+#include "DNA_radio_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_view3d_types.h"
+#include "DNA_view2d_types.h"
+#include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_sdna_types.h"
+#include "DNA_fileglobal_types.h"
+#include "DNA_sequence_types.h"
+#include "DNA_effect_types.h"
+#include "DNA_oops_types.h"
+#include "DNA_property_types.h"
+#include "DNA_sensor_types.h"
+#include "DNA_controller_types.h"
+#include "DNA_actuator_types.h"
+#include "DNA_sound_types.h"
+#include "DNA_group_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_action_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_nla_types.h"
+#include "DNA_node_types.h"
+#include "DNA_color_types.h"
+#include "DNA_brush_types.h"
+#include "DNA_customdata_types.h"
+/* end of list */