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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-12-28 22:31:32 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-12-28 22:31:32 +0400
commitc2ae77e5bdd60e4cfe9b1f9d3d54e66f8089245c (patch)
tree505b5270122ec50302f6f824088b43318d13a296 /source/blender/makesdna
parentfd134927dd23047237c6e490c09454487ba19a4a (diff)
parentfe2131367b3f1ca1f974d1d6160cfc8a1a220abe (diff)
Merging r42896 through r42944 from trunk into soc-2911-tomato
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h4
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h4
-rw-r--r--source/blender/makesdna/DNA_brush_types.h2
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h8
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h43
-rw-r--r--source/blender/makesdna/DNA_defs.h2
-rw-r--r--source/blender/makesdna/DNA_documentation.h10
-rw-r--r--source/blender/makesdna/DNA_material_types.h4
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h40
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h42
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h2
-rw-r--r--source/blender/makesdna/DNA_movieclip_types.h2
-rw-r--r--source/blender/makesdna/DNA_node_types.h6
-rw-r--r--source/blender/makesdna/DNA_particle_types.h4
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h6
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h8
16 files changed, 143 insertions, 44 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 97ea7592d04..8de7ae39a55 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -57,7 +57,7 @@ typedef struct IDProperty {
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.*/
+ * 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
@@ -74,7 +74,7 @@ typedef struct IDProperty {
#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.*/
+ * some cleanup of blenkernel, most likely.*/
#define IDP_ID 7
#define IDP_DOUBLE 8
#define IDP_IDPARRAY 9
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 20a2c36166f..a4280a6e463 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -194,7 +194,7 @@ typedef struct bVisibilityActuator {
int flag;
} bVisibilityActuator;
-typedef struct bTwoDFilterActuator{
+typedef struct bTwoDFilterActuator {
char pad[4];
/* Tells what type of 2D Filter */
short type;
@@ -205,7 +205,7 @@ typedef struct bTwoDFilterActuator{
/* a float argument */
float float_arg;
struct Text *text;
-}bTwoDFilterActuator;
+} bTwoDFilterActuator;
typedef struct bParentActuator {
char pad[2];
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index e9290a92493..1dfef225828 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -132,7 +132,7 @@ typedef struct Brush {
#define BRUSH_CUSTOM_ICON (1<<28)
/* temporary flag which sets up autmatically for correct
- brush drawing when inverted modal operator is running */
+ * brush drawing when inverted modal operator is running */
#define BRUSH_INVERTED (1<<29)
/* Brush.sculpt_tool */
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 50c1779960d..f5abf00bd44 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -126,10 +126,10 @@ typedef struct bPythonConstraint {
/* Inverse-Kinematics (IK) constraint
- This constraint supports a variety of mode determine by the type field
- according to B_CONSTRAINT_IK_TYPE.
- Some fields are used by all types, some are specific to some types
- This is indicated in the comments for each field
+ * This constraint supports a variety of mode determine by the type field
+ * according to B_CONSTRAINT_IK_TYPE.
+ * Some fields are used by all types, some are specific to some types
+ * This is indicated in the comments for each field
*/
typedef struct bKinematicConstraint {
struct Object *tar; /* All: target object in case constraint needs a target */
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index d98e5200d21..0b0ffb42ba8 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -29,6 +29,7 @@
* \ingroup DNA
*/
+
#ifndef DNA_CUSTOMDATA_TYPES_H
#define DNA_CUSTOMDATA_TYPES_H
@@ -36,6 +37,8 @@
extern "C" {
#endif
+#include "DNA_defs.h" /* USE_BMESH_FORWARD_COMPAT */
+
/** descriptor and storage for a custom data layer */
typedef struct CustomDataLayer {
int type; /* type of data in layer */
@@ -59,6 +62,9 @@ typedef struct CustomDataExternal {
* layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */
typedef struct CustomData {
CustomDataLayer *layers; /* CustomDataLayers, ordered by type */
+ int typemap[32]; /* runtime only! - maps types to indices of first layer of that type,
+ * MUST be >= CD_NUMTYPES, but we cant use a define here.
+ * Correct size is ensured in CustomData_update_typemap assert() */
int totlayer, maxlayer; /* number of layers, size of layers array */
int totsize, pad; /* in editmode, total size of all data layers */
void *pool; /* Bmesh: Memory pool for allocation of blocks */
@@ -75,7 +81,7 @@ typedef struct CustomData {
#define CD_MCOL 6
#define CD_ORIGINDEX 7
#define CD_NORMAL 8
-#define CD_FLAGS 9
+#define CD_POLYINDEX 9
#define CD_PROP_FLT 10
#define CD_PROP_INT 11
#define CD_PROP_STR 12
@@ -91,8 +97,27 @@ typedef struct CustomData {
#define CD_TEXTURE_MCOL 22
#define CD_CLOTH_ORCO 23
#define CD_RECAST 24
+
+#ifdef USE_BMESH_FORWARD_COMPAT
+
+/* BMESH ONLY START */
+#define CD_MPOLY 25
+#define CD_MLOOP 26
+#define CD_SHAPE_KEYINDEX 27
+#define CD_SHAPEKEY 28
+#define CD_BWEIGHT 29
+#define CD_CREASE 30
+#define CD_WEIGHT_MLOOPCOL 31
+/* BMESH ONLY END */
+
+#define CD_NUMTYPES 32
+
+#else
+
#define CD_NUMTYPES 25
+#endif
+
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
#define CD_MASK_MSTICKY (1 << CD_MSTICKY)
@@ -103,7 +128,7 @@ typedef struct CustomData {
#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_POLYINDEX (1 << CD_POLYINDEX)
#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)
@@ -118,6 +143,20 @@ typedef struct CustomData {
#define CD_MASK_CLOTH_ORCO (1 << CD_CLOTH_ORCO)
#define CD_MASK_RECAST (1 << CD_RECAST)
+#ifdef USE_BMESH_FORWARD_COMPAT
+
+/* BMESH ONLY START */
+#define CD_MASK_MPOLY (1 << CD_MPOLY)
+#define CD_MASK_MLOOP (1 << CD_MLOOP)
+#define CD_MASK_SHAPE_KEYINDEX (1 << CD_SHAPE_KEYINDEX)
+#define CD_MASK_SHAPEKEY (1 << CD_SHAPEKEY)
+#define CD_MASK_BWEIGHT (1 << CD_BWEIGHT)
+#define CD_MASK_CREASE (1 << CD_CREASE)
+#define CD_MASK_WEIGHT_MLOOPCOL (1 << CD_WEIGHT_MLOOPCOL)
+/* BMESH ONLY END */
+
+#endif
+
/* CustomData.flag */
/* indicates layer should not be copied by CustomData_from_template or
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
index 25d95419605..54dfc18a03c 100644
--- a/source/blender/makesdna/DNA_defs.h
+++ b/source/blender/makesdna/DNA_defs.h
@@ -45,4 +45,6 @@
/* hrmf, we need a better include then this */
#include "../blenloader/BLO_sys_types.h" /* needed for int64_t only! */
+#define USE_BMESH_FORWARD_COMPAT
+
#endif /* DNA_DEFS_H */
diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h
index 206a45fad5d..c1d6ee4aec3 100644
--- a/source/blender/makesdna/DNA_documentation.h
+++ b/source/blender/makesdna/DNA_documentation.h
@@ -63,14 +63,12 @@
* \section dnanote NOTE
- PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN
-
- intern/dna_genfile.c
- (ton)
+ * PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN
+ *
+ * intern/dna_genfile.c
+ * (ton)
*/
-
/* This file has intentionally no definitions or implementation. */
-
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 3e1cdd08086..189f52eead9 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -168,8 +168,8 @@ typedef struct Material {
short sss_flag, sss_preset;
int mapto_textured; /* render-time cache to optimise texture lookups */
- short shadowonly_flag; /* "shadowsonly" type */
- short index; /* custom index for render passes */
+ short shadowonly_flag; /* "shadowsonly" type */
+ short index; /* custom index for render passes */
ListBase gpumaterial; /* runtime */
} Material;
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index f8062aeccc7..eae7102ef42 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -36,6 +36,8 @@
#include "DNA_ID.h"
#include "DNA_customdata_types.h"
+#include "DNA_defs.h" /* USE_BMESH_FORWARD_COMPAT */
+
struct DerivedMesh;
struct Ipo;
struct Key;
@@ -47,6 +49,11 @@ struct MCol;
struct MSticky;
struct Mesh;
struct OcInfo;
+struct MPoly;
+struct MTexPoly;
+struct MLoop;
+struct MLoopUV;
+struct MLoopCol;
struct Multires;
struct EditMesh;
struct AnimData;
@@ -61,6 +68,17 @@ typedef struct Mesh {
struct Key *key;
struct Material **mat;
+/*#ifdef USE_BMESH_FORWARD_COMPAT*/ /* XXX - ifdefs dont work here! */
+/* BMESH ONLY */
+ /*new face structures*/
+ struct MPoly *mpoly;
+ struct MTexPoly *mtpoly;
+ struct MLoop *mloop;
+ struct MLoopUV *mloopuv;
+ struct MLoopCol *mloopcol;
+/* END BMESH ONLY */
+/*#endif*/
+
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 */
@@ -76,8 +94,20 @@ typedef struct Mesh {
struct CustomData vdata, edata, fdata;
+/*#ifdef USE_BMESH_FORWARD_COMPAT*/ /* XXX - ifdefs dont work here! */
+/* BMESH ONLY */
+ struct CustomData pdata, ldata;
+/* END BMESH ONLY */
+/*#endif*/
+
int totvert, totedge, totface, totselect;
-
+
+/*#ifdef USE_BMESH_FORWARD_COMPAT*/
+/* BMESH ONLY */
+ int totpoly, totloop;
+/* END BMESH ONLY */
+/*#endif*/ /* XXX - ifdefs dont work here! */
+
/* 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
@@ -192,4 +222,12 @@ typedef struct TFace {
#define MESH_MAX_VERTS 2000000000L
+/* this is so we can save bmesh files that load in trunk, ignoring NGons
+ * will eventually be removed */
+
+#if 0 /* enable in bmesh branch only for now */
+#define USE_BMESH_SAVE_AS_COMPAT
+#endif
+
+
#endif
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 66e1333bf66..ab4b560943f 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -72,21 +72,41 @@ typedef struct MCol {
char a, r, g, b;
} MCol;
+#ifdef USE_BMESH_FORWARD_COMPAT
+
+/*new face structure, replaces MFace, which is now
+ only used for storing tesselations.*/
+typedef struct MPoly {
+ /* offset into loop array and number of loops in the face */
+ int loopstart;
+ int totloop; /* keep signed since we need to subtract when getting the previous loop */
+ short mat_nr;
+ char flag, pad;
+} MPoly;
+
+/*the e here is because we want to move away from
+ relying on edge hashes.*/
+typedef struct MLoop {
+ unsigned int v; /*vertex index*/
+ unsigned int e; /*edge index*/
+} MLoop;
+
+#endif /* USE_BMESH_FORWARD_COMPAT */
+
/*bmesh custom data stuff*/
-typedef struct MTexPoly{
+typedef struct MTexPoly {
struct Image *tpage;
char flag, transp;
short mode,tile,unwrap;
-}MTexPoly;
+} MTexPoly;
-typedef struct MLoopUV{
+typedef struct MLoopUV {
float uv[2];
-}MLoopUV;
+} MLoopUV;
-typedef struct MLoopCol{
+typedef struct MLoopCol {
char a, r, g, b;
- int pad; /*waste!*/
-}MLoopCol;
+} MLoopCol;
typedef struct MSticky {
float co[2];
@@ -105,13 +125,13 @@ typedef struct MTFace {
} MTFace;
/*Custom Data Properties*/
-typedef struct MFloatProperty{
+typedef struct MFloatProperty {
float f;
} MFloatProperty;
-typedef struct MIntProperty{
+typedef struct MIntProperty {
int i;
} MIntProperty;
-typedef struct MStringProperty{
+typedef struct MStringProperty {
char s[256];
} MStringProperty;
@@ -174,7 +194,7 @@ typedef struct Multires {
/** End Multires **/
-typedef struct MRecast{
+typedef struct MRecast {
int i;
} MRecast;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 5edc0869d9b..da77f7a85cf 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -704,7 +704,7 @@ typedef struct SimpleDeformModifierData {
#define MOD_SIMPLEDEFORM_LOCK_AXIS_Y (1<<1)
/* indicates whether simple deform should use the local
- coordinates or global coordinates of origin */
+ * coordinates or global coordinates of origin */
#define MOD_SIMPLEDEFORM_ORIGIN_LOCAL (1<<0)
#define MOD_UVPROJECT_MAX 10
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h
index fc21f26fa32..1a065741121 100644
--- a/source/blender/makesdna/DNA_movieclip_types.h
+++ b/source/blender/makesdna/DNA_movieclip_types.h
@@ -113,6 +113,8 @@ typedef struct MovieClipScopes {
#define MCLIP_USE_PROXY (1<<0)
#define MCLIP_USE_PROXY_CUSTOM_DIR (1<<1)
+#define MCLIP_TIMECODE_FLAGS (MCLIP_USE_PROXY|MCLIP_USE_PROXY_CUSTOM_DIR)
+
/* MovieClip->render_size */
#define MCLIP_PROXY_RENDER_SIZE_FULL 0
#define MCLIP_PROXY_RENDER_SIZE_25 1
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 845d8a87c5b..2dfc05bda04 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -354,12 +354,12 @@ typedef struct NodeChroma {
float t1,t2,t3;
float fsize,fstrength,falpha;
float key[4];
- short algorithm, channel;
+ short algorithm, channel;
} NodeChroma;
typedef struct NodeTwoXYs {
short x1, x2, y1, y2;
- float fac_x1, fac_x2, fac_y1, fac_y2;
+ float fac_x1, fac_x2, fac_y1, fac_y2;
} NodeTwoXYs;
typedef struct NodeTwoFloats {
@@ -428,7 +428,7 @@ typedef struct NodeColorspill {
short limchan, unspill;
float limscale;
float uspillr, uspillg, uspillb;
-}NodeColorspill;
+} NodeColorspill;
typedef struct NodeTexBase {
TexMapping tex_mapping;
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index c56d771d3b3..504c847a9ea 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -65,7 +65,7 @@ typedef struct BoidParticle {
typedef struct ParticleSpring {
float rest_length;
unsigned int particle_index[2], delete_flag;
-}ParticleSpring;
+} ParticleSpring;
/* Child particles are created around or between parent particles */
typedef struct ChildParticle {
@@ -295,7 +295,7 @@ typedef struct ParticleSystem
float dt_frac; /* current time step, as a fraction of a frame */
float _pad; /* spare capacity */
-}ParticleSystem;
+} ParticleSystem;
/* part->type */
/* hair is allways baked static in object/geometry space */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index ca2b7e0b2a9..50f406afbf9 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -347,9 +347,9 @@ typedef struct SpeedControlVars {
#define SEQ_BLEND_REPLACE 0
/* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical
- to the table above. (Only those effects that handle _exactly_ two inputs,
- otherwise, you can't really blend, right :) !)
-*/
+ * to the table above. (Only those effects that handle _exactly_ two inputs,
+ * otherwise, you can't really blend, right :) !)
+ */
#define SEQ_HAS_PATH(_seq) (ELEM5((_seq)->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_RAM_SOUND, SEQ_HD_SOUND))
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 851d4b562e6..b30a1baf7bb 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -603,20 +603,20 @@ extern UserDef U; /* from blenkernel blender.c */
#define NDOF_FLY_HELICOPTER (1 << 1)
#define NDOF_LOCK_HORIZON (1 << 2)
/* the following might not need to be saved between sessions,
- but they do need to live somewhere accessible... */
+ * but they do need to live somewhere accessible... */
#define NDOF_SHOULD_PAN (1 << 3)
#define NDOF_SHOULD_ZOOM (1 << 4)
#define NDOF_SHOULD_ROTATE (1 << 5)
/* orbit navigation modes
- only two options, so it's sort of a hyrbrid bool/enum
- if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */
+ * only two options, so it's sort of a hyrbrid bool/enum
+ * if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */
/*
#define NDOF_ORBIT_MODE (1 << 6)
#define NDOF_OM_TARGETCAMERA 0
#define NDOF_OM_OBJECT NDOF_ORBIT_MODE
*/
/* actually... users probably don't care about what the mode
- is called, just that it feels right */
+ * is called, just that it feels right */
/* zoom is up/down if this flag is set (otherwise forward/backward) */
#define NDOF_ZOOM_UPDOWN (1 << 7)
#define NDOF_ZOOM_INVERT (1 << 8)