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/nodes
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/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
index 698efa8865d..d674f611c9f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
@@ -183,8 +183,7 @@ static void scale_vertex_islands_uniformly(Mesh &mesh,
}
});
- /* Positions have changed, so the normals will have to be recomputed. */
- BKE_mesh_normals_tag_dirty(&mesh);
+ BKE_mesh_tag_coords_changed(&mesh);
}
static void scale_vertex_islands_on_axis(Mesh &mesh,
@@ -228,8 +227,7 @@ static void scale_vertex_islands_on_axis(Mesh &mesh,
}
});
- /* Positions have changed, so the normals will have to be recomputed. */
- BKE_mesh_normals_tag_dirty(&mesh);
+ BKE_mesh_tag_coords_changed(&mesh);
}
static Vector<ElementIsland> prepare_face_islands(const Mesh &mesh, const IndexMask face_selection)