From 54182e4925de4ee7e49e4351479e79cb257acc73 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 23 Jun 2022 12:00:25 -0500 Subject: 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 --- source/blender/modifiers/intern/MOD_boolean.cc | 2 +- source/blender/modifiers/intern/MOD_ocean.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc index 5739de1c65c..deafe795061 100644 --- a/source/blender/modifiers/intern/MOD_boolean.cc +++ b/source/blender/modifiers/intern/MOD_boolean.cc @@ -146,7 +146,7 @@ static Mesh *get_quick_mesh( mul_m4_v3(omat, mv->co); } - BKE_mesh_normals_tag_dirty(result); + BKE_mesh_tag_coords_changed(result); } break; diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index b5411eee883..75708851030 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -469,7 +469,7 @@ static Mesh *doOcean(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mes } } - BKE_mesh_normals_tag_dirty(mesh); + BKE_mesh_tag_coords_changed(mesh); if (allocated_ocean) { BKE_ocean_free(omd->ocean); -- cgit v1.2.3