Page MenuHome
Paste P1020

(An Untitled Masterwork)
ActivePublic

Authored by Sergey Sharybin (sergey) on Jul 2 2019, 2:32 PM.
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index fdd61580d9e..f59bf3579be 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -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,
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index 6a6adb82225..2bb06c86120 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -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,
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index e65dd3b4560..9b02f231be4 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -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)
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index c7f6116e81d..8f85640bb4d 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -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)

Event Timeline