diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-09-18 16:26:04 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-09-18 18:08:33 +0300 |
commit | a9a8eedd163e17fcf345726fd4c4db891771cac8 (patch) | |
tree | a217d872be0dff407e287fd6ce6e847606c8378c /source/blender/depsgraph/intern/depsgraph_build.cc | |
parent | a1318d241553246c266410eb1ae4ba23e73179e1 (diff) |
Fix T65816: Alembic export of procedural mesh results in a static mesh and crashes
The static mesh issue described in T65816 has been resolved by @Sergey
in T60094.
This commit fixes the last bit of the puzzle, which was two-fold:
- A missing depsgraph update when setting `orig_object.data = new_mesh`
from Python. Thanks @Sergey for providing the fix :)
- Properly locking the interface while exporting. This prevents crashes
as described in T60094. The previous approach of calling
`BKE_spacedata_draw_locks()` was not enough.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index 968ed8ef403..e34c8af0cf3 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -59,6 +59,7 @@ extern "C" { #include "intern/node/deg_node_id.h" #include "intern/node/deg_node_operation.h" +#include "intern/depsgraph_registry.h" #include "intern/depsgraph_type.h" /* ****************** */ @@ -356,12 +357,7 @@ void DEG_graph_relations_update(Depsgraph *graph, Main *bmain, Scene *scene, Vie void DEG_relations_tag_update(Main *bmain) { DEG_GLOBAL_DEBUG_PRINTF(TAG, "%s: Tagging relations for update.\n", __func__); - LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { - LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { - Depsgraph *depsgraph = (Depsgraph *)BKE_scene_get_depsgraph(bmain, scene, view_layer, false); - if (depsgraph != NULL) { - DEG_graph_tag_relations_update(depsgraph); - } - } + for (DEG::Depsgraph *depsgraph : DEG::get_all_registered_graphs(bmain)) { + DEG_graph_tag_relations_update(reinterpret_cast<Depsgraph *>(depsgraph)); } } |