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:
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h4
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h14
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h19
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h16
-rw-r--r--source/blender/makesdna/intern/dna_rename_defs.h1
5 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 0355ed3febe..124df373c5d 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -88,8 +88,8 @@ typedef enum eCustomDataType {
*/
CD_AUTO_FROM_NAME = -1,
- CD_MVERT = 0,
#ifdef DNA_DEPRECATED_ALLOW
+ CD_MVERT = 0, /* DEPRECATED */
CD_MSTICKY = 1, /* DEPRECATED */
#endif
CD_MDEFORMVERT = 2,
@@ -159,7 +159,7 @@ typedef enum eCustomDataType {
} eCustomDataType;
/* Bits for eCustomDataMask */
-#define CD_MASK_MVERT (1 << CD_MVERT)
+// #define CD_MASK_MVERT (1 << CD_MVERT) /* DEPRECATED */
// #define CD_MASK_MSTICKY (1 << CD_MSTICKY) /* DEPRECATED */
#define CD_MASK_MDEFORMVERT (1 << CD_MDEFORMVERT)
#define CD_MASK_MEDGE (1 << CD_MEDGE)
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 3f951583741..39253aafa7c 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -13,6 +13,10 @@
#include "DNA_meshdata_types.h"
#include "DNA_session_uuid_types.h"
+#ifdef __cplusplus
+# include "BLI_math_vec_types.hh"
+#endif
+
/** Workaround to forward-declare C++ type in C header. */
#ifdef __cplusplus
namespace blender {
@@ -40,7 +44,6 @@ struct MCol;
struct MEdge;
struct MFace;
struct MLoopTri;
-struct MVert;
struct Material;
typedef struct Mesh {
@@ -61,7 +64,7 @@ typedef struct Mesh {
*/
struct Material **mat;
- /** The number of vertices (#MVert) in the mesh, and the size of #vdata. */
+ /** The number of vertices in the mesh, and the size of #vdata. */
int totvert;
/** The number of edges (#MEdge) in the mesh, and the size of #edata. */
int totedge;
@@ -210,12 +213,11 @@ typedef struct Mesh {
MeshRuntimeHandle *runtime;
#ifdef __cplusplus
/**
- * Array of vertex positions (and various other data). Edges and faces are defined by indices
- * into this array.
+ * Array of vertex positions. Edges and faces are defined by indices into this array.
*/
- blender::Span<MVert> verts() const;
+ blender::Span<blender::float3> positions() const;
/** Write access to vertex data. */
- blender::MutableSpan<MVert> verts_for_write();
+ blender::MutableSpan<blender::float3> positions_for_write();
/**
* Array of edges, containing vertex indices. For simple triangle or quad meshes, edges could be
* calculated from the #MPoly and #MLoop arrays, however, edges need to be stored explicitly to
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index f1c2dcaae68..1950e4d5e3b 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -19,12 +19,11 @@ extern "C" {
* \{ */
/**
- * Mesh Vertices.
- *
- * Typically accessed from #Mesh.verts()
+ * Deprecated mesh vertex data structure. Now stored with generic attributes.
*/
+#ifdef DNA_DEPRECATED_ALLOW
typedef struct MVert {
- float co[3];
+ float co_legacy[3];
/**
* Deprecated flag for storing hide status and selection, which are now stored in separate
* generic attributes. Kept for file read and write.
@@ -38,8 +37,6 @@ typedef struct MVert {
} MVert;
/** #MVert.flag */
-
-#ifdef DNA_DEPRECATED_ALLOW
enum {
/** Deprecated selection status. Now stored in ".select_vert" attribute. */
/* SELECT = (1 << 0), */
@@ -111,7 +108,7 @@ enum {
* Typically accessed with #Mesh.loops().
*/
typedef struct MLoop {
- /** Vertex index into an #MVert array. */
+ /** Vertex index. */
unsigned int v;
/** Edge index into an #MEdge array. */
unsigned int e;
@@ -152,7 +149,7 @@ enum {
/**
* #MLoopTri's are lightweight triangulation data,
* for functionality that doesn't support ngons (#MPoly).
- * This is cache data created from (#MPoly, #MLoop & #MVert arrays).
+ * This is cache data created from (#MPoly, #MLoop & position arrays).
* There is no attempt to maintain this data's validity over time,
* any changes to the underlying mesh invalidate the #MLoopTri array,
* which will need to be re-calculated.
@@ -179,9 +176,9 @@ enum {
*
* // access vertex locations.
* float *vtri_co[3] = {
- * mvert[mloop[lt->tri[0]].v].co,
- * mvert[mloop[lt->tri[1]].v].co,
- * mvert[mloop[lt->tri[2]].v].co,
+ * positions[mloop[lt->tri[0]].v],
+ * positions[mloop[lt->tri[1]].v],
+ * positions[mloop[lt->tri[2]].v],
* };
*
* // access UV coordinates (works for all loop data, vertex colors... etc).
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index c4180071352..465dae89ad1 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -849,17 +849,17 @@ typedef struct CollisionModifierData {
ModifierData modifier;
/** Position at the beginning of the frame. */
- struct MVert *x;
+ float (*x)[3];
/** Position at the end of the frame. */
- struct MVert *xnew;
+ float (*xnew)[3];
/** Unused at the moment, but was discussed during sprint. */
- struct MVert *xold;
+ float (*xold)[3];
/** New position at the actual inter-frame step. */
- struct MVert *current_xnew;
+ float (*current_xnew)[3];
/** Position at the actual inter-frame step. */
- struct MVert *current_x;
+ float (*current_x)[3];
/** (xnew - x) at the actual inter-frame step. */
- struct MVert *current_v;
+ float (*current_v)[3];
struct MVertTri *tri;
@@ -879,9 +879,9 @@ typedef struct SurfaceModifierData {
ModifierData modifier;
/** Old position. */
- struct MVert *x;
+ float (*x)[3];
/** Velocity. */
- struct MVert *v;
+ float (*v)[3];
struct Mesh *mesh;
diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h
index afc907b7780..4b810f9a536 100644
--- a/source/blender/makesdna/intern/dna_rename_defs.h
+++ b/source/blender/makesdna/intern/dna_rename_defs.h
@@ -102,6 +102,7 @@ DNA_STRUCT_RENAME_ELEM(Object_Runtime, crazyspace_num_verts, crazyspace_verts_nu
DNA_STRUCT_RENAME_ELEM(MEdge, bweight, bweight_legacy)
DNA_STRUCT_RENAME_ELEM(MEdge, crease, crease_legacy)
DNA_STRUCT_RENAME_ELEM(MPoly, mat_nr, mat_nr_legacy)
+DNA_STRUCT_RENAME_ELEM(MVert, co, co_legacy)
DNA_STRUCT_RENAME_ELEM(MVert, bweight, bweight_legacy)
DNA_STRUCT_RENAME_ELEM(MVert, flag, flag_legacy)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, child_nbr, child_percent)