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:
authorHans Goudey <h.goudey@me.com>2022-09-23 17:02:05 +0300
committerHans Goudey <h.goudey@me.com>2022-09-23 17:02:28 +0300
commita8a454287a27d408668f8adc6fe1b3aa988de1ac (patch)
treea0c55182e620598bb92542562d2fc134091a2c08 /source/blender/blenkernel/BKE_mesh_legacy_convert.h
parentb197cd5821f1dfaa5168d31984dd8014f5252456 (diff)
Mesh: Move edge crease out of MEdge
This is very similar to D14077. There are two differences though. First is that vertex creases are already stored in a separate layer, and second is that we can now completely remove use of `Mesh.cd_flag`, since that information is now inherent to whether the layers exist. There are two functional differences here: * Operators are used to add and remove layers instead of a property. * The "crease" attribute can be created and removed by geometry nodes. The second change should make various geometry nodes slightly faster, since the "crease" attribute was always processed before. Creases are now interpolated generically in the CustomData API too, which should help maintain the values across edits better. Meshes get an `edge_creases` RNA property like the existing vertex property, to provide more efficient access to the data in Cycles. One test failure is expected, where different rounding between float the old char storage means that 5 additional points are scattered in a geometry nodes test. Differential Revision: https://developer.blender.org/D15927
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh_legacy_convert.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh_legacy_convert.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.h b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
index b0bc5fe8efe..f45dfd8bc8d 100644
--- a/source/blender/blenkernel/BKE_mesh_legacy_convert.h
+++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
@@ -27,6 +27,15 @@ void BKE_mesh_legacy_face_set_from_generic(struct Mesh *mesh);
void BKE_mesh_legacy_face_set_to_generic(struct Mesh *mesh);
/**
+ * Copy edge creases from a separate layer into edges.
+ */
+void BKE_mesh_legacy_edge_crease_from_layers(struct Mesh *mesh);
+/**
+ * Copy edge creases from edges to a separate layer.
+ */
+void BKE_mesh_legacy_edge_crease_to_layers(struct Mesh *mesh);
+
+/**
* Copy bevel weights from separate layers into vertices and edges.
*/
void BKE_mesh_legacy_bevel_weight_from_layers(struct Mesh *mesh);