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-06-23 20:00:25 +0300
committerHans Goudey <h.goudey@me.com>2022-06-23 20:00:25 +0300
commit54182e4925de4ee7e49e4351479e79cb257acc73 (patch)
treed598250e653ee2e61f875b113ce4f41f87e4a084 /source/blender/blenkernel/BKE_mesh.h
parent3e5a4d14124029dd3ccb111de2db299bb405d668 (diff)
Mesh: Add an explicit "positions changed" function
We store various lazily calculated caches on meshes, some of which depend on the vertex positions staying the same. The current API to invalidate these caches is a bit confusing. With an explicit set of functions modeled after the functions in `BKE_node_tree_update.h`, it becomes clear which function to call. This may become more important if more lazy caches are added in the future. Differential Revision: https://developer.blender.org/D14760
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 23ec69babc8..8e038a1d3d9 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -52,6 +52,18 @@ extern "C" {
# define BKE_MESH_OMP_LIMIT 10000
#endif
+/* mesh_runtime.cc */
+
+/**
+ * Call after changing vertex positions to tag lazily calculated caches for recomputation.
+ */
+void BKE_mesh_tag_coords_changed(struct Mesh *mesh);
+
+/**
+ * Call after moving every mesh vertex by the same translation.
+ */
+void BKE_mesh_tag_coords_changed_uniformly(struct Mesh *mesh);
+
/* *** mesh.c *** */
struct BMesh *BKE_mesh_to_bmesh_ex(const struct Mesh *me,