diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-22 19:18:43 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-22 19:18:43 +0400 |
commit | 396a3d31cc500af0ae2185c8c116bab44b3baeec (patch) | |
tree | 1ee14f951f6bf9b591b4db4cee3396ba76835f90 /source/blender/makesdna | |
parent | 53b01d90023a850b17ded5deb9cace354c8e298a (diff) |
Add MVertSkin DNA/RNA and customdata (CD_MVERT_SKIN).
The MVertSkin currently just stores local skin radii and skin
flags (MVertSkinFlag).
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
Reviewed by Campbell Barton.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 10 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 21 |
2 files changed, 26 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 5792953fe49..377af042922 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -63,12 +63,11 @@ 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[36]; /* runtime only! - maps types to indices of first layer of that type, + int typemap[37]; /* 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, pad2; /* in editmode, total size of all data layers */ + int totsize; /* in editmode, total size of all data layers */ void *pool; /* Bmesh: Memory pool for allocation of blocks */ CustomDataExternal *external; /* external file storing customdata layers */ } CustomData; @@ -114,8 +113,8 @@ typedef struct CustomData { #define CD_PAINT_MASK 34 #define CD_GRID_PAINT_MASK 35 - -#define CD_NUMTYPES 36 +#define CD_MVERT_SKIN 36 +#define CD_NUMTYPES 37 /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) @@ -156,6 +155,7 @@ typedef struct CustomData { #define CD_MASK_PAINT_MASK (1LL << CD_PAINT_MASK) #define CD_MASK_GRID_PAINT_MASK (1LL << CD_GRID_PAINT_MASK) +#define CD_MASK_MVERT_SKIN (1LL << CD_MVERT_SKIN) /* CustomData.flag */ diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index c3b0bc39388..0bd83e73271 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -257,6 +257,27 @@ typedef struct GridPaintMask { int pad; } GridPaintMask; +typedef enum MVertSkinFlag { + /* Marks a vertex as the edge-graph root, used for calculating + rotations for all connected edges (recursively.) Also used to + choose a root when generating an armature. */ + MVERT_SKIN_ROOT = 1, + + /* Marks a branch vertex (vertex with more than two connected + edges) so that it's neighbors are directly hulled together, + rather than the default of generating intermediate frames. */ + MVERT_SKIN_LOOSE = 2 +} MVertSkinFlag; + +typedef struct MVertSkin { + /* Radii of the skin, define how big the generated frames + are. Currently only the first two elements are used. */ + float radius[3]; + + /* MVertSkinFlag */ + int flag; +} MVertSkin; + /* mvert->flag (1=SELECT) */ #define ME_SPHERETEST 2 #define ME_VERT_TMP_TAG 4 |