[Bf-blender-cvs] [e0dc4130fda] master: Writefile: Cleanup Armature runtime data.
Bastien Montagne
noreply at git.blender.org
Wed Apr 1 14:27:37 CEST 2020
Commit: e0dc4130fda77dc4d99ffe25e36a53228a2d0325
Author: Bastien Montagne
Date: Wed Apr 1 11:57:32 2020 +0200
Branches: master
https://developer.blender.org/rBe0dc4130fda77dc4d99ffe25e36a53228a2d0325
Writefile: Cleanup Armature runtime data.
===================================================================
M source/blender/blenloader/intern/writefile.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list