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.vfx@gmail.com>2018-12-17 14:28:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-17 14:33:37 +0300
commita84c823b891fcf440e134eb284024ea06aa1a9ff (patch)
treeae07aaa5b4d32a8817ffefe96dc6416b0957c27d /source/blender/blenkernel/intern/object.c
parentdcc11360c619f51a70466e7b3622cc1aebe08fd9 (diff)
Fix T58652: Crash editing shape keys weirdness with instances
This is a second attempt to get the crash fixed. The original fix worked, but it was reverted by d3e0d7f0825. Now the logic goes as: - All pointers which we can not have shared (the ones which are owned by the runtime) are cleared. - The rest of runtime stays untouched. This seems to be enough to keep particles happy.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 498658765b6..921a3602c08 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3582,6 +3582,17 @@ void BKE_object_runtime_reset(Object *object)
memset(&object->runtime, 0, sizeof(object->runtime));
}
+/* Reset all pointers which we don't want to be shared when copying the object. */
+void BKE_object_runtime_reset_on_copy(Object *object)
+{
+ Object_Runtime *runtime = &object->runtime;
+ runtime->mesh_eval = NULL;
+ runtime->mesh_deform_eval = NULL;
+ runtime->curve_cache = NULL;
+ runtime->gpencil_cache = NULL;
+ runtime->cached_bbone_deformation = NULL;
+}
+
/*
* Find an associated Armature object
*/