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:
authorBastien Montagne <b.mont29@gmail.com>2020-04-01 12:57:32 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-04-01 13:39:06 +0300
commite0dc4130fda77dc4d99ffe25e36a53228a2d0325 (patch)
tree67c5803ce78a0fd2993a05d33a7f5f983776c429 /source/blender
parent358f8b484fa0b786d905aac54c19603aca0d0f07 (diff)
Writefile: Cleanup Armature runtime data.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenloader/intern/writefile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 4a2f6875c83..3b7ce3bdc1b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3171,6 +3171,13 @@ static void write_bone(WriteData *wd, Bone *bone)
static void write_armature(WriteData *wd, bArmature *arm, const void *id_address)
{
if (arm->id.us > 0 || wd->use_memfile) {
+ /* Clean up, important in undo case to reduce false detection of changed datablocks. */
+ arm->bonehash = NULL;
+ arm->edbo = NULL;
+ /* Must always be cleared (armatures don't have their own edit-data). */
+ arm->needs_flush_to_id = 0;
+ arm->act_edbone = NULL;
+
writestruct_at_address(wd, ID_AR, bArmature, 1, id_address, arm);
write_iddata(wd, &arm->id);