Fix T65778: Missing selection update with linked objects in edit mode

This commit is contained in:
Sergey Sharybin 2019-07-02 15:14:47 +02:00
parent 71099a3d67
commit 26e6bb3fa3
Notes: blender-bot 2023-02-14 09:29:42 +01:00
Referenced by issue #65778, linked duplicate objects - issues with selection in edit mode
4 changed files with 20 additions and 2 deletions

View File

@ -295,6 +295,7 @@ void BKE_object_eval_transform_all(struct Depsgraph *depsgraph,
void BKE_object_eval_update_shading(struct Depsgraph *depsgraph, struct Object *object);
void BKE_object_data_select_update(struct Depsgraph *depsgraph, struct ID *object_data);
void BKE_object_select_update(struct Depsgraph *depsgraph, struct Object *object);
void BKE_object_eval_eval_base_flags(struct Depsgraph *depsgraph,
struct Scene *scene,

View File

@ -393,6 +393,12 @@ 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);
}
void BKE_object_eval_eval_base_flags(Depsgraph *depsgraph,
Scene *scene,
const int view_layer_index,

View File

@ -1207,6 +1207,11 @@ void DepsgraphNodeBuilder::build_object_data_geometry(Object *object, bool is_ob
build_object_pointcache(object);
/* Geometry. */
build_object_data_geometry_datablock((ID *)object->data, is_object_visible);
/* Batch cache. */
add_operation_node(&object->id,
NodeType::BATCH_CACHE,
OperationCode::GEOMETRY_SELECT_UPDATE,
function_bind(BKE_object_select_update, _1, object_cow));
}
void DepsgraphNodeBuilder::build_object_data_geometry_datablock(ID *obdata, bool is_object_visible)

View File

@ -1988,10 +1988,16 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object)
}
}
/* Syncronization back to original object. */
ComponentKey final_geometry_jey(&object->id, NodeType::GEOMETRY);
ComponentKey final_geometry_key(&object->id, NodeType::GEOMETRY);
OperationKey synchronize_key(
&object->id, NodeType::SYNCHRONIZATION, OperationCode::SYNCHRONIZE_TO_ORIGINAL);
add_relation(final_geometry_jey, synchronize_key, "Synchronize to Original");
add_relation(final_geometry_key, synchronize_key, "Synchronize to Original");
/* Batch cache. */
OperationKey object_data_select_key(
obdata, NodeType::BATCH_CACHE, OperationCode::GEOMETRY_SELECT_UPDATE);
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");
}
void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)