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-03-22 17:43:02 +0300
committerHans Goudey <h.goudey@me.com>2022-03-24 16:37:56 +0300
commitb89437c27e4ce286d8f3525ade8d8d28c35d582f (patch)
treeda7da1e8c0414053cf74e3384b6d4f9d113ea631 /source/blender/blenkernel/BKE_key.h
parentafd2fc313e7d9cceb841f4c2cfc5500bffa1c8d5 (diff)
Fix T96294: Crash and error with shape key normal calculation
A mistake in the mesh normal refactor caused the wrong mesh to be used when calculating normals with a shape key's deformation. This commit fixes the normal calculation by using the correct mesh, with just adjusted vertex positions, and calculating the results directly into the result arrays when possible. This completely avoids the need to make a local copy of the mesh, which makes sense, since the only thing that changes is the vertex positions. Differential Revision: https://developer.blender.org/D14317
Diffstat (limited to 'source/blender/blenkernel/BKE_key.h')
-rw-r--r--source/blender/blenkernel/BKE_key.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h
index 07e816558df..ee83427d620 100644
--- a/source/blender/blenkernel/BKE_key.h
+++ b/source/blender/blenkernel/BKE_key.h
@@ -29,6 +29,7 @@ struct Lattice;
struct ListBase;
struct Main;
struct Mesh;
+struct MVert;
struct Object;
/* Kernel prototypes */
@@ -135,7 +136,8 @@ void BKE_keyblock_convert_to_curve(struct KeyBlock *kb, struct Curve *cu, struct
void BKE_keyblock_update_from_mesh(struct Mesh *me, struct KeyBlock *kb);
void BKE_keyblock_convert_from_mesh(struct Mesh *me, struct Key *key, struct KeyBlock *kb);
-void BKE_keyblock_convert_to_mesh(struct KeyBlock *kb, struct Mesh *me);
+void BKE_keyblock_convert_to_mesh(struct KeyBlock *kb, struct MVert *mvert, int totvert);
+
/**
* Computes normals (vertices, polygons and/or loops ones) of given mesh for given shape key.
*