Fix T55326: Massive slowdown when animating material in a highpoly mesh

This is a dependency graph part, which is the last required bit to get the
issue solved after all the rest of the work done by Clement.
This commit is contained in:
2019-04-24 11:24:45 +02:00
parent 8ba4c38643
commit 8955ec6776
3 changed files with 0 additions and 26 deletions

View File

@@ -369,14 +369,6 @@ void BKE_object_eval_transform_all(Depsgraph *depsgraph, Scene *scene, Object *o
BKE_object_eval_transform_final(depsgraph, object);
}
void BKE_object_eval_update_shading(Depsgraph *depsgraph, Object *object)
{
DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
if (object->type == OB_MESH) {
BKE_mesh_batch_cache_dirty_tag(object->data, BKE_MESH_BATCH_DIRTY_SHADING);
}
}
void BKE_object_data_select_update(Depsgraph *depsgraph, ID *object_data)
{
DEG_debug_print_eval(depsgraph, __func__, object_data->name, object_data);

View File

@@ -1177,12 +1177,6 @@ void DepsgraphNodeBuilder::build_object_data_geometry(Object *object, bool is_ob
op_node->set_as_exit();
/* Materials. */
if (object->totcol != 0) {
if (object->type == OB_MESH) {
add_operation_node(&object->id,
NodeType::SHADING,
OperationCode::SHADING,
function_bind(BKE_object_eval_update_shading, _1, object_cow));
}
for (int a = 1; a <= object->totcol; a++) {
Material *ma = give_current_material(object, a);
if (ma != NULL) {

View File

@@ -1904,12 +1904,6 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object)
Material *ma = give_current_material(object, a);
if (ma != NULL) {
build_material(ma);
if (object->type == OB_MESH) {
OperationKey material_key(&ma->id, NodeType::SHADING, OperationCode::MATERIAL_UPDATE);
OperationKey shading_key(&object->id, NodeType::SHADING, OperationCode::SHADING);
add_relation(material_key, shading_key, "Material Update");
}
}
}
}
@@ -1923,12 +1917,6 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object)
OperationKey obdata_ubereval_key(
&object->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL);
add_relation(geom_init_key, obdata_ubereval_key, "Object Geometry UberEval");
if (object->totcol != 0 && object->type == OB_MESH) {
ComponentKey object_shading_key(&object->id, NodeType::SHADING);
Relation *rel = add_relation(
obdata_ubereval_key, object_shading_key, "Object Geometry batch Update");
rel->flag |= RELATION_FLAG_NO_FLUSH;
}
}
if (object->type == OB_MBALL) {
Object *mom = BKE_mball_basis_find(scene_, object);