Commit: 5eee1b4d1bfe23515350809511e8e8fcc1c64500
Author: Sergey Sharybin
Date:   Fri Mar 1 16:35:11 2019 +0100
Branches: master
https://developer.blender.org/rB5eee1b4d1bfe23515350809511e8e8fcc1c64500

Use original base to see whether it can be ignored from evaluation

Object of evaluated base is not yet copied, so we can not know whether
it has animation on visibility or not.

This issue was reported in T56635#630383.

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

M       source/blender/depsgraph/intern/builder/deg_builder.cc
M       source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc 
b/source/blender/depsgraph/intern/builder/deg_builder.cc
index 3365cdda53d..9fe64fd8a05 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -113,7 +113,7 @@ DepsgraphBuilder::DepsgraphBuilder(Main *bmain, Depsgraph 
*graph)
           graph_(graph) {
 }
 
-bool DepsgraphBuilder::need_pull_base_into_graph(struct Base *base)
+bool DepsgraphBuilder::need_pull_base_into_graph(Base *base)
 {
        return deg_check_base_available_for_build(graph_, base);
 }
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc 
b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index dab403adf07..a4948941b73 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -373,9 +373,15 @@ void view_layer_remove_disabled_bases(const Depsgraph 
*depsgraph,
                 *
                 * NOTE: The idea of using id's tag and check whether its 
copied ot not
                 * is not reliable, since object might be indirectly linked 
into the
-                * graph. */
+                * graph.
+                *
+                * NOTE: We are using original base since the object which 
evaluated base
+                * points to is not yet copied. This is dangerous access from 
evaluated
+                * domain to original one, but this is how the entire 
copy-on-write works:
+                * it does need to access original for an initial copy.
+                * */
                const bool is_object_enabled =
-                       deg_check_base_available_for_build(depsgraph, base);
+                       deg_check_base_available_for_build(depsgraph, 
base->base_orig);
                if (is_object_enabled) {
                        BLI_addtail(&enabled_bases, base);
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to