[Bf-blender-cvs] [e276558a50f] master: Fix T74983: Material preview icons don't refresh

Sybren A. Stüvel noreply at git.blender.org
Thu Apr 2 16:54:41 CEST 2020


Commit: e276558a50f06c6ec5d6b36b138ad5777dd05c0a
Author: Sybren A. Stüvel
Date:   Thu Apr 2 16:54:17 2020 +0200
Branches: master
https://developer.blender.org/rBe276558a50f06c6ec5d6b36b138ad5777dd05c0a

Fix T74983: Material preview icons don't refresh

The root cause of the issue reported in T74983 is that an `IDNode` would
not be marked as user-modified. This marking happened while looping over
outgoing relations of one of its operation nodes. Since rBff60dd8b18ed
unused relations are removed, and as a result the `IDNode` would not be
marked.

The solution was to move the responsible code outside the loop; this is
probably a good idea anyway, as the code did not actually use the
looped-over relations at all, and was thus repeated unnecessarily.

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

M	source/blender/depsgraph/intern/eval/deg_eval_flush.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index dd72bc22a70..990002cf2e8 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -172,16 +172,17 @@ BLI_INLINE void flush_handle_component_node(IDNode *id_node,
  */
 BLI_INLINE OperationNode *flush_schedule_children(OperationNode *op_node, FlushQueue *queue)
 {
+  if (op_node->flag & DEPSOP_FLAG_USER_MODIFIED) {
+    IDNode *id_node = op_node->owner->owner;
+    id_node->is_user_modified = true;
+  }
+
   OperationNode *result = nullptr;
   for (Relation *rel : op_node->outlinks) {
     /* Flush is forbidden, completely. */
     if (rel->flag & RELATION_FLAG_NO_FLUSH) {
       continue;
     }
-    if (op_node->flag & DEPSOP_FLAG_USER_MODIFIED) {
-      IDNode *id_node = op_node->owner->owner;
-      id_node->is_user_modified = true;
-    }
     /* Relation only allows flushes on user changes, but the node was not
      * affected by user. */
     if ((rel->flag & RELATION_FLAG_FLUSH_USER_EDIT_ONLY) &&



More information about the Bf-blender-cvs mailing list