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:
authorCampbell Barton <ideasman42@gmail.com>2021-04-30 09:22:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-30 09:29:03 +0300
commit2b723abea02c868d94623f4dd9e9b6775cb3aaab (patch)
treed97e06140092dbfc9a407a4bdfdc9925c23b8a0a /source/blender/blenkernel/intern/object.c
parentea17a92cd7040c0d63a4ed3a8a60cd8f0a3cb77e (diff)
Object: improve on fix for Object.to_mesh() crash T86871
While fa7ddd0f43ea15dd19d81e7808de2bfe8cfc89ee fixed the reported issue, the possibility of reusing runtime data during curve-to-mesh conversion remained. Instead of treating the bounding-box as a special case, clear all run-time data for temporary objects. Ref D11026 Reviewed By: sergey
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 82d99e980a4..912bd5a4d69 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -5114,6 +5114,17 @@ void BKE_object_runtime_reset_on_copy(Object *object, const int UNUSED(flag))
}
/**
+ * The function frees memory used by the runtime data, but not the runtime field itself.
+ *
+ * The caller is expected to run #BKE_object_runtime_reset if the struct will be used again.
+ */
+void BKE_object_runtime_free(Object *object)
+{
+ /* Currently this is all that's needed. */
+ BKE_object_free_derived_caches(object);
+}
+
+/**
* Find an associated armature object.
*/
static Object *obrel_armature_find(Object *ob)