Page MenuHome

Fix T74983 : fixed refreshing of material icon preview
AbandonedPublic

Authored by Alexia (Tempo) on Mar 28 2020, 5:41 AM.

Details

Summary

Fix T74983
So I found the node that make the bug, and added a condition for
it to not get removed.

All other nodes are removed :
before :


after :

Diff Detail

Event Timeline

Alexia (Tempo) created this revision.Mar 28 2020, 5:41 AM
Ankit Meel (ankitm) retitled this revision from T74983 : fixed refreshing of material icon preview to Fix T74983 : fixed refreshing of material icon preview.Mar 28 2020, 6:39 AM
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
Brecht Van Lommel (brecht) requested changes to this revision.Mar 28 2020, 11:01 AM

MAMaterial is the name of the default material datablock, this fix will not work for other materials or other types of datablocks that also have previews.

We really have to understand why this happens at a more fundamental level.

This revision now requires changes to proceed.Mar 28 2020, 11:01 AM

Thank you, I'll work on it.

Where can I have more info about depsgraph system and how noop() is calculated, since this is the function that is used to check if a node operation is useful or not and the algorithm still remove useful operations.

By the way, I saw that most of the removed operations were entry/evaluation/exit operations, so I wonder if thoses node are automatically setup as noop() ?

I committed the solution in rBe276558a50f0. In the end, it wasn't caused by the removal of no-op relations at all; this removal just made the mistake visible. It was caused by setting a property is_user_modified on a node while looping over its outgoing connections. Since rBe276558a50f0 removed those connections, the loop wouldn't do anything, and thus that property wasn't set. I moved the code to set the property outside of the loop, which resolved this issue.

Thx again for the patch, I think this should be abandoned then (since solution is in master)?