From 66dc4d4efb88ecf2d18bfa08ab9c43b024ebd2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Thu, 14 Apr 2022 17:48:31 +0200 Subject: Cleanup: Alembic, use a structure to pass parameters This adds a structure, `ABCReadParams`, to store some parameters passed to `ABC_read_mesh` so we avoid passing too many parameters, and makes it easier to add more parameters in the future without worrying about argument order. Differential Revision: https://developer.blender.org/D14484 --- source/blender/modifiers/intern/MOD_meshsequencecache.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_meshsequencecache.cc') diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.cc b/source/blender/modifiers/intern/MOD_meshsequencecache.cc index 7dbd4c5b260..998fb0a94a3 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.cc +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.cc @@ -226,14 +226,13 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * velocity_scale *= FPS; } - result = ABC_read_mesh(mcmd->reader, - ctx->object, - mesh, - time, - &err_str, - mcmd->read_flag, - mcmd->cache_file->velocity_name, - velocity_scale); + ABCReadParams params = {}; + params.time = time; + params.read_flags = mcmd->read_flag; + params.velocity_name = mcmd->cache_file->velocity_name; + params.velocity_scale = velocity_scale; + + result = ABC_read_mesh(mcmd->reader, ctx->object, mesh, ¶ms, &err_str); # endif break; } -- cgit v1.2.3