diff options
-rw-r--r-- | source/blender/blenkernel/intern/object_update.c | 12 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c index 2bb06c86120..b682e233888 100644 --- a/source/blender/blenkernel/intern/object_update.c +++ b/source/blender/blenkernel/intern/object_update.c @@ -31,6 +31,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLI_threads.h" #include "BLI_math.h" #include "BKE_animsys.h" @@ -396,7 +397,16 @@ void BKE_object_data_select_update(Depsgraph *depsgraph, ID *object_data) void BKE_object_select_update(Depsgraph *depsgraph, Object *object) { DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); - BKE_object_data_select_update(depsgraph, object->data); + if (!object->runtime.is_mesh_eval_owned) { + Mesh *mesh_input = object->runtime.mesh_orig; + Mesh_Runtime *mesh_runtime = &mesh_input->runtime; + BLI_mutex_lock(mesh_runtime->eval_mutex); + BKE_object_data_select_update(depsgraph, object->data); + BLI_mutex_unlock(mesh_runtime->eval_mutex); + } + else { + BKE_object_data_select_update(depsgraph, object->data); + } } void BKE_object_eval_eval_base_flags(Depsgraph *depsgraph, diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 8f85640bb4d..20ef6229a0e 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1998,6 +1998,8 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object) OperationKey object_select_key( &object->id, NodeType::BATCH_CACHE, OperationCode::GEOMETRY_SELECT_UPDATE); add_relation(object_data_select_key, object_select_key, "Data Selection -> Object Selection"); + add_relation( + geom_key, object_select_key, "Object Geometry -> Select Update", RELATION_FLAG_NO_FLUSH); } void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata) |