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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/makesdna/DNA_mesh_types.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/makesdna/DNA_mesh_types.h')
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h324
1 files changed, 161 insertions, 163 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 0d43b14e252..a7b061e6d48 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -50,159 +50,158 @@ struct SubdivCCG;
#
#
typedef struct EditMeshData {
- /** when set, \a vertexNos, polyNos are lazy initialized */
- const float (*vertexCos)[3];
-
- /** lazy initialize (when \a vertexCos is set) */
- float const (*vertexNos)[3];
- float const (*polyNos)[3];
- /** also lazy init but dont depend on \a vertexCos */
- const float (*polyCos)[3];
+ /** when set, \a vertexNos, polyNos are lazy initialized */
+ const float (*vertexCos)[3];
+
+ /** lazy initialize (when \a vertexCos is set) */
+ float const (*vertexNos)[3];
+ float const (*polyNos)[3];
+ /** also lazy init but dont depend on \a vertexCos */
+ const float (*polyCos)[3];
} EditMeshData;
-
/**
* \warning Typical access is done via #BKE_mesh_runtime_looptri_ensure, #BKE_mesh_runtime_looptri_len.
*/
struct MLoopTri_Store {
- /* WARNING! swapping between array (ready-to-be-used data) and array_wip
- * (where data is actually computed)
- * shall always be protected by same lock as one used for looptris computing. */
- struct MLoopTri *array, *array_wip;
- int len;
- int len_alloc;
+ /* WARNING! swapping between array (ready-to-be-used data) and array_wip
+ * (where data is actually computed)
+ * shall always be protected by same lock as one used for looptris computing. */
+ struct MLoopTri *array, *array_wip;
+ int len;
+ int len_alloc;
};
/* not saved in file! */
typedef struct Mesh_Runtime {
- struct EditMeshData *edit_data;
- void *batch_cache;
-
- struct SubdivCCG *subdiv_ccg;
- void *_pad1;
- int subdiv_ccg_tot_level;
- char _pad2[4];
-
- int64_t cd_dirty_vert;
- int64_t cd_dirty_edge;
- int64_t cd_dirty_loop;
- int64_t cd_dirty_poly;
-
- struct MLoopTri_Store looptris;
-
- /** 'BVHCache', for 'BKE_bvhutil.c' */
- struct LinkNode *bvh_cache;
-
- /** Non-manifold boundary data for Shrinkwrap Target Project. */
- struct ShrinkwrapBoundaryData *shrinkwrap_data;
-
- /** Set by modifier stack if only deformed from original. */
- char deformed_only;
- /**
- * Copied from edit-mesh (hint, draw with editmesh data).
- * In the future we may leave the mesh-data empty
- * since its not needed if we can use edit-mesh data. */
- char is_original;
- char _pad[6];
+ struct EditMeshData *edit_data;
+ void *batch_cache;
+
+ struct SubdivCCG *subdiv_ccg;
+ void *_pad1;
+ int subdiv_ccg_tot_level;
+ char _pad2[4];
+
+ int64_t cd_dirty_vert;
+ int64_t cd_dirty_edge;
+ int64_t cd_dirty_loop;
+ int64_t cd_dirty_poly;
+
+ struct MLoopTri_Store looptris;
+
+ /** 'BVHCache', for 'BKE_bvhutil.c' */
+ struct LinkNode *bvh_cache;
+
+ /** Non-manifold boundary data for Shrinkwrap Target Project. */
+ struct ShrinkwrapBoundaryData *shrinkwrap_data;
+
+ /** Set by modifier stack if only deformed from original. */
+ char deformed_only;
+ /**
+ * Copied from edit-mesh (hint, draw with editmesh data).
+ * In the future we may leave the mesh-data empty
+ * since its not needed if we can use edit-mesh data. */
+ char is_original;
+ char _pad[6];
} Mesh_Runtime;
typedef struct Mesh {
- ID id;
- /** Animation data (must be immediately after id for utilities to use it). */
- struct AnimData *adt;
-
- struct BoundBox *bb;
-
- /** Old animation system, deprecated for 2.5. */
- struct Ipo *ipo DNA_DEPRECATED;
- struct Key *key;
- struct Material **mat;
- struct MSelect *mselect;
-
-/* BMESH ONLY */
- /*new face structures*/
- struct MPoly *mpoly;
- struct MLoop *mloop;
- struct MLoopUV *mloopuv;
- struct MLoopCol *mloopcol;
-/* END BMESH ONLY */
-
- /* mface stores the tessellation (triangulation) of the mesh,
- * real faces are now stored in nface.*/
- /** Array of mesh object mode faces for tessellation. */
- struct MFace *mface;
- /** Store tessellation face UV's and texture here. */
- struct MTFace *mtface;
- /** Deprecated, use mtface. */
- struct TFace *tface DNA_DEPRECATED;
- /** Array of verts. */
- struct MVert *mvert;
- /** Array of edges. */
- struct MEdge *medge;
- /** Deformgroup vertices. */
- struct MDeformVert *dvert;
-
- /* array of colors for the tessellated faces, must be number of tessellated
- * faces * 4 in length */
- struct MCol *mcol;
- struct Mesh *texcomesh;
-
- /* When the object is available, the preferred access method is: BKE_editmesh_from_object(ob) */
- /** Not saved in file!. */
- struct BMEditMesh *edit_mesh;
-
- struct CustomData vdata, edata, fdata;
-
-/* BMESH ONLY */
- struct CustomData pdata, ldata;
-/* END BMESH ONLY */
-
- int totvert, totedge, totface, totselect;
-
-/* BMESH ONLY */
- int totpoly, totloop;
-/* END BMESH ONLY */
-
- /* 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;
-
- /* texture space, copied as one block in editobject.c */
- float loc[3];
- float size[3];
- float rot[3];
-
- short texflag, flag;
- float smoothresh;
-
- /* customdata flag, for bevel-weight and crease, which are now optional */
- char cd_flag, _pad;
-
- char subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED;
- /** Only kept for backwards compat, not used anymore. */
- char subsurftype DNA_DEPRECATED;
- char editflag;
-
- short totcol;
-
- /** Deprecated multiresolution modeling data, only keep for loading old files. */
- struct Multires *mr DNA_DEPRECATED;
- void *_pad1;
-
- Mesh_Runtime runtime;
+ ID id;
+ /** Animation data (must be immediately after id for utilities to use it). */
+ struct AnimData *adt;
+
+ struct BoundBox *bb;
+
+ /** Old animation system, deprecated for 2.5. */
+ struct Ipo *ipo DNA_DEPRECATED;
+ struct Key *key;
+ struct Material **mat;
+ struct MSelect *mselect;
+
+ /* BMESH ONLY */
+ /*new face structures*/
+ struct MPoly *mpoly;
+ struct MLoop *mloop;
+ struct MLoopUV *mloopuv;
+ struct MLoopCol *mloopcol;
+ /* END BMESH ONLY */
+
+ /* mface stores the tessellation (triangulation) of the mesh,
+ * real faces are now stored in nface.*/
+ /** Array of mesh object mode faces for tessellation. */
+ struct MFace *mface;
+ /** Store tessellation face UV's and texture here. */
+ struct MTFace *mtface;
+ /** Deprecated, use mtface. */
+ struct TFace *tface DNA_DEPRECATED;
+ /** Array of verts. */
+ struct MVert *mvert;
+ /** Array of edges. */
+ struct MEdge *medge;
+ /** Deformgroup vertices. */
+ struct MDeformVert *dvert;
+
+ /* array of colors for the tessellated faces, must be number of tessellated
+ * faces * 4 in length */
+ struct MCol *mcol;
+ struct Mesh *texcomesh;
+
+ /* When the object is available, the preferred access method is: BKE_editmesh_from_object(ob) */
+ /** Not saved in file!. */
+ struct BMEditMesh *edit_mesh;
+
+ struct CustomData vdata, edata, fdata;
+
+ /* BMESH ONLY */
+ struct CustomData pdata, ldata;
+ /* END BMESH ONLY */
+
+ int totvert, totedge, totface, totselect;
+
+ /* BMESH ONLY */
+ int totpoly, totloop;
+ /* END BMESH ONLY */
+
+ /* 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;
+
+ /* texture space, copied as one block in editobject.c */
+ float loc[3];
+ float size[3];
+ float rot[3];
+
+ short texflag, flag;
+ float smoothresh;
+
+ /* customdata flag, for bevel-weight and crease, which are now optional */
+ char cd_flag, _pad;
+
+ char subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED;
+ /** Only kept for backwards compat, not used anymore. */
+ char subsurftype DNA_DEPRECATED;
+ char editflag;
+
+ short totcol;
+
+ /** Deprecated multiresolution modeling data, only keep for loading old files. */
+ struct Multires *mr DNA_DEPRECATED;
+ void *_pad1;
+
+ Mesh_Runtime runtime;
} Mesh;
/* deprecated by MTFace, only here for file reading */
#ifdef DNA_DEPRECATED
typedef struct TFace {
- /** The faces image for the active UVLayer. */
- void *tpage;
- float uv[4][2];
- unsigned int col[4];
- char flag, transp;
- short mode, tile, unwrap;
+ /** The faces image for the active UVLayer. */
+ void *tpage;
+ float uv[4][2];
+ unsigned int col[4];
+ char flag, transp;
+ short mode, tile, unwrap;
} TFace;
#endif
@@ -210,54 +209,53 @@ typedef struct TFace {
/* texflag */
enum {
- ME_AUTOSPACE = 1,
+ ME_AUTOSPACE = 1,
};
/* me->editflag */
enum {
- ME_EDIT_MIRROR_X = 1 << 0,
- ME_EDIT_MIRROR_Y = 1 << 1, /* unused so far */
- ME_EDIT_MIRROR_Z = 1 << 2, /* unused so far */
+ ME_EDIT_MIRROR_X = 1 << 0,
+ ME_EDIT_MIRROR_Y = 1 << 1, /* unused so far */
+ ME_EDIT_MIRROR_Z = 1 << 2, /* unused so far */
- ME_EDIT_PAINT_FACE_SEL = 1 << 3,
- ME_EDIT_MIRROR_TOPO = 1 << 4,
- ME_EDIT_PAINT_VERT_SEL = 1 << 5,
+ ME_EDIT_PAINT_FACE_SEL = 1 << 3,
+ ME_EDIT_MIRROR_TOPO = 1 << 4,
+ ME_EDIT_PAINT_VERT_SEL = 1 << 5,
};
/* we cant have both flags enabled at once,
* flags defined in DNA_scene_types.h */
-#define ME_EDIT_PAINT_SEL_MODE(_me) ( \
- (_me->editflag & ME_EDIT_PAINT_FACE_SEL) ? SCE_SELECT_FACE : \
- (_me->editflag & ME_EDIT_PAINT_VERT_SEL) ? SCE_SELECT_VERTEX : \
- 0 \
- )
+#define ME_EDIT_PAINT_SEL_MODE(_me) \
+ ((_me->editflag & ME_EDIT_PAINT_FACE_SEL) ? \
+ SCE_SELECT_FACE : \
+ (_me->editflag & ME_EDIT_PAINT_VERT_SEL) ? SCE_SELECT_VERTEX : 0)
/* me->flag */
enum {
- ME_FLAG_UNUSED_0 = 1 << 0, /* cleared */
- ME_FLAG_UNUSED_1 = 1 << 1, /* cleared */
- ME_TWOSIDED = 1 << 2,
- ME_FLAG_UNUSED_3 = 1 << 3, /* cleared */
- ME_FLAG_UNUSED_4 = 1 << 4, /* cleared */
- ME_AUTOSMOOTH = 1 << 5,
- ME_FLAG_UNUSED_6 = 1 << 6, /* cleared */
- ME_FLAG_UNUSED_7 = 1 << 7, /* cleared */
- ME_FLAG_UNUSED_8 = 1 << 8, /* cleared */
- ME_DS_EXPAND = 1 << 9,
- ME_SCULPT_DYNAMIC_TOPOLOGY = 1 << 10,
+ ME_FLAG_UNUSED_0 = 1 << 0, /* cleared */
+ ME_FLAG_UNUSED_1 = 1 << 1, /* cleared */
+ ME_TWOSIDED = 1 << 2,
+ ME_FLAG_UNUSED_3 = 1 << 3, /* cleared */
+ ME_FLAG_UNUSED_4 = 1 << 4, /* cleared */
+ ME_AUTOSMOOTH = 1 << 5,
+ ME_FLAG_UNUSED_6 = 1 << 6, /* cleared */
+ ME_FLAG_UNUSED_7 = 1 << 7, /* cleared */
+ ME_FLAG_UNUSED_8 = 1 << 8, /* cleared */
+ ME_DS_EXPAND = 1 << 9,
+ ME_SCULPT_DYNAMIC_TOPOLOGY = 1 << 10,
};
/* me->cd_flag */
enum {
- ME_CDFLAG_VERT_BWEIGHT = 1 << 0,
- ME_CDFLAG_EDGE_BWEIGHT = 1 << 1,
- ME_CDFLAG_EDGE_CREASE = 1 << 2,
+ ME_CDFLAG_VERT_BWEIGHT = 1 << 0,
+ ME_CDFLAG_EDGE_BWEIGHT = 1 << 1,
+ ME_CDFLAG_EDGE_CREASE = 1 << 2,
};
/* Subsurf Type */
enum {
- ME_CC_SUBSURF = 0,
- ME_SIMPLE_SUBSURF = 1,
+ ME_CC_SUBSURF = 0,
+ ME_SIMPLE_SUBSURF = 1,
};
#define MESH_MAX_VERTS 2000000000L