[Bf-blender-cvs] [a60606e4678] master: Fix T73029: Crash transforming object

Sergey Sharybin noreply at git.blender.org
Mon Jan 13 12:18:39 CET 2020


Commit: a60606e4678a3291f89ebac8ec5f94f5a6a40aff
Author: Sergey Sharybin
Date:   Mon Jan 13 12:16:23 2020 +0100
Branches: master
https://developer.blender.org/rBa60606e4678a3291f89ebac8ec5f94f5a6a40aff

Fix T73029: Crash transforming object

Was caused by recent animation backup added to depsgraph as a part of
another bugfix.

This commit effectively disables the animation backup, restoring bug
related on handlers, but makes it possible to interact with objects
again.

Will re-iterate over handlers+animated properties.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M	source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_animation.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index a3439f80e4b..31c1b0361f8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2675,6 +2675,10 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
     }
   }
 
+#if 0
+  /* NOTE: Relation is disabled since AnimationBackup() is disabled.
+   * See comment in  AnimationBackup:init_from_id(). */
+
   /* Copy-on-write of write will iterate over f-curves to store current values corresponding
    * to their RNA path. This means that action must be copied prior to the ID's copy-on-write,
    * otherwise depsgraph might try to access freed data. */
@@ -2689,6 +2693,7 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
                    RELATION_FLAG_GODMODE | RELATION_FLAG_NO_FLUSH);
     }
   }
+#endif
 }
 
 /* **** ID traversal callbacks functions **** */
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_animation.cc b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_animation.cc
index d5f29006434..cc4935431d1 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_animation.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_animation.cc
@@ -100,6 +100,14 @@ void AnimationBackup::reset()
 
 void AnimationBackup::init_from_id(ID *id)
 {
+  /* NOTE: This animation backup nicely preserves values which are animated and
+   * are not touched by frame/depsgraph post_update handler.
+   *
+   * But it makes it impossible to have user edits to animated properties: for
+   * example, translation of object with animated location will not work with
+   * the current version of backup. */
+  return;
+
   AnimatedPropertyStoreCalbackData data;
   data.backup = this;
   data.id = id;
@@ -109,6 +117,8 @@ void AnimationBackup::init_from_id(ID *id)
 
 void AnimationBackup::restore_to_id(ID *id)
 {
+  return;
+
   PointerRNA id_pointer_rna;
   RNA_id_pointer_create(id, &id_pointer_rna);
   for (const AnimationValueBackup &value_backup : values_backup) {



More information about the Bf-blender-cvs mailing list