Fix mesh edit wasn't updating for new objects

The problem was that we were updating the mesh cache on
BKE_object_eval_shading, not on mesh change.
This commit is contained in:
Dalai Felinto
2017-03-02 12:58:28 +01:00
parent 007fcfc193
commit 4bf9a65da9

View File

@@ -342,13 +342,14 @@ void BKE_object_eval_uber_data(EvaluationContext *eval_ctx,
BLI_assert(ob->type != OB_ARMATURE);
BKE_object_handle_data_update(eval_ctx, scene, ob);
if (ob->type == OB_MESH) {
BKE_mesh_batch_cache_dirty(ob->data);
}
ob->recalc &= ~(OB_RECALC_DATA | OB_RECALC_TIME);
}
void BKE_object_eval_shading(EvaluationContext *UNUSED(eval_ctx), Object *ob)
{
DEBUG_PRINT("%s on %s\n", __func__, ob->id.name);
if (ob->type == OB_MESH) {
BKE_mesh_batch_cache_dirty(ob->data);
}
}