Page MenuHome

Fix T101906: Modifier apply not working if target object is in excluded collection
ClosedPublic

Authored by Sergey Sharybin (sergey) on Nov 8 2022, 2:38 PM.

Details

Summary

The issue was introduced by the optimization of hidden objects and modifiers
in the f12f7800c296.

The solution here detects that either an object is hidden or the modifier is
disabled and does special tricks to ensure the dependencies are evaluated.
This is done by constructing a separate minimal dependency graph needed for
the object on which the modifier is being applied on. This minimal dependency
graph will not perform visibility optimization, making it so modifier
dependencies are ensured to be evaluated.

The downside of such approach is that some dependencies which are not needed
for the modifier are still evaluated. There is no currently an easy way to
avoid this. At least not without introducing possible race conditions with
other dependency graphs.

If the performance of applying modifiers in such cases becomes a problem the
possible solution would be to create a temporary object with a single modifier
so that only minimal set of dependencies is pulled in the minimal dependency
graph.

Diff Detail

Repository
rB Blender
Branch
fix_T101906 (branched from master)
Build Status
Buildable 24539
Build 24539: arc lint + arc unit

Event Timeline

Sergey Sharybin (sergey) requested review of this revision.Nov 8 2022, 2:38 PM
Sergey Sharybin (sergey) created this revision.

The downside of such approach is that some dependencies which are not needed for the modifier are still evaluated. There is no currently an easy way to avoid this. At least not without introducing possible race conditions with other dependency graphs.

I'm not sure which types of dependencies this is referring to. Like materials or objects for constraints? That's seem difficult to avoid since these might even affect modifier evaluation.

Seems reasonable anyway, especially since this only affects hidden objects.

This revision is now accepted and ready to land.Nov 8 2022, 7:31 PM

I'm not sure which types of dependencies this is referring to. Like materials or objects for constraints? That's seem difficult to avoid since these might even affect modifier evaluation.

Everything referenced from the Object (even indirectly) which the minimal dependency graph is built for. Target objects for constraints, IDs used for drivers, materials, ....