diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-11-08 16:02:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-11-09 16:20:26 +0300 |
commit | c26d49e854b345094828ecf908e050a4d9c637cf (patch) | |
tree | 73f0748d2a85f4adfedd0a6346185820e510cf4d /source/blender/depsgraph/DEG_depsgraph_build.h | |
parent | fb52a09840efa4dbaa21176f6ecec4f4fef63f64 (diff) |
Fix T101906: Modifier apply not working if target object is in excluded collection
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.
Differential Revision: https://developer.blender.org/D16421
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_build.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_build.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h index 201a534f535..ffeb5e897ab 100644 --- a/source/blender/depsgraph/DEG_depsgraph_build.h +++ b/source/blender/depsgraph/DEG_depsgraph_build.h @@ -56,6 +56,9 @@ void DEG_graph_build_for_render_pipeline(struct Depsgraph *graph); */ void DEG_graph_build_for_compositor_preview(struct Depsgraph *graph, struct bNodeTree *nodetree); +/** + * Builds the minimal dependency graph needed for evaluation of the given IDs. + */ void DEG_graph_build_from_ids(struct Depsgraph *graph, struct ID **ids, int num_ids); /** Tag relations from the given graph for update. */ |