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-02-24 19:56:11 +0300
committerHans Goudey <h.goudey@me.com>2022-02-24 19:56:32 +0300
commit7b37d980b97fd6f2fde7561c5f2a881f46db2c1f (patch)
treef3af8379ecf446087a1429563e7e98d45e7006d1 /source/blender/editors
parentf8507ca3720e6bcec934d01ef3af129e9bf1d3a8 (diff)
Fix: Crash switching between sculpt and edit mode
Also fix a couple other places where normals layers weren't properly tagged dirty or reallocated when the mesh changes. Caused by cfa53e0fbeed7178. When the size of a mesh changes, the normal layers need to be reallocated. There were a couple of places that cleared other runtime data with `BKE_mesh_runtime_clear_geometry` but didn't deal with normals properly. Clearing the runtime "geometry" is different from clearing the normals, because sometimes the size of the normal layers doesn't have to change, in which case simply tagging them dirty is fine.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/meshtools.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index c9615698c46..b8e3d5737a3 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -428,6 +428,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op)
* Even though this mesh wont typically have run-time data, the Python API can for e.g.
* create loop-triangle cache here, which is confusing when left in the mesh, see: T90798. */
BKE_mesh_runtime_clear_geometry(me);
+ BKE_mesh_clear_derived_normals(me);
/* new material indices and material array */
if (totmat) {