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:
authorSergey Sharybin <sergey@blender.org>2022-02-02 14:20:03 +0300
committerSergey Sharybin <sergey@blender.org>2022-02-03 12:02:20 +0300
commitc8cca888518182914e6b4f1b98e0f7b861add08d (patch)
treedd93675a11be5b9240e6112c3513c88c87607686 /source/blender/editors/armature
parent45d5773519bdd760d8ac1d8742a9471ebcbf5023 (diff)
Fix assert in original modifiers pointer update function
The issue was happening with a specific file where the ID management code was not fully copying all modifiers because of the extra check in the `BKE_object_support_modifier_type_check()`. While it is arguable that copy-on-write should be a 1:1 copy there is no real need to maintain the per-modifier pointer to its original. Use its SessionUUID to perform lookup in the original datablock. Downside of this approach is that it is a linear lookup instead of direct pointer access, but the upside is that there is less pointers to manage and that the file with unsupported modifiers does behave correct without any asserts. Differential Revision: https://developer.blender.org/D13993
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/meshlaplacian.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 787d7cbaab0..14f47a84286 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1742,14 +1742,15 @@ static void harmonic_coordinates_bind(MeshDeformModifierData *mmd, MeshDeformBin
free_bvhtree_from_mesh(&mdb->bvhdata);
}
-void ED_mesh_deform_bind_callback(MeshDeformModifierData *mmd,
+void ED_mesh_deform_bind_callback(Object *object,
+ MeshDeformModifierData *mmd,
Mesh *cagemesh,
float *vertexcos,
int totvert,
float cagemat[4][4])
{
MeshDeformModifierData *mmd_orig = (MeshDeformModifierData *)BKE_modifier_get_original(
- &mmd->modifier);
+ object, &mmd->modifier);
MeshDeformBind mdb;
MVert *mvert;
int a;