diff options
author | Sybren A. Stüvel <sybren> | 2020-09-29 15:34:01 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-29 17:10:16 +0300 |
commit | bab2260b59c7bffe1e16b5e860ac36b5fdc31bf0 (patch) | |
tree | 814d0b54a1618ce2c1359ac16888e10cb90479cf /source/blender/modifiers | |
parent | 5845c06a63a6b96f038f5a46d538b0f9737102e9 (diff) |
Fix T71981: Alembic vertex interpolation can jumble mesh
Add an option to disable Alembic vertex interpolation.
Bump subversion from 5 to 6.
Alembic stores mesh samples at specific time keys; when a frame in
Blender maps to a timecode between two samples, Blender will interpolate
the mesh vertex positions. This interpolation only happens when the mesh
has a constant topology, but sometimes this was not detected properly
when the vertices change order, but the number of mesh elements remains
the same. This would result in a mesh with jumbled up vertices (T71981).
With this patch, users have the ability to disable vertex interpolation.
An alternative would be to have better detection of topology changes,
but that that'll cause a considerable slowdown.
Maniphest Tasks: T71981
Differential Revision: https://developer.blender.org/D9041
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshsequencecache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index c9437605a01..eca20c088ce 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -66,7 +66,7 @@ static void initData(ModifierData *md) mcmd->cache_file = NULL; mcmd->object_path[0] = '\0'; - mcmd->read_flag = MOD_MESHSEQ_READ_ALL; + mcmd->read_flag = MOD_MESHSEQ_READ_ALL | MOD_MESHSEQ_INTERPOLATE_VERTICES; mcmd->velocity_scale = 1.0f; mcmd->vertex_velocities = NULL; mcmd->num_vertices = 0; @@ -238,6 +238,7 @@ static void panel_draw(const bContext *C, Panel *panel) if (RNA_enum_get(&ob_ptr, "type") == OB_MESH) { uiItemR(layout, ptr, "read_data", UI_ITEM_R_EXPAND, NULL, ICON_NONE); + uiItemR(layout, ptr, "use_vertex_interpolation", 0, NULL, ICON_NONE); } uiItemR(layout, ptr, "velocity_scale", 0, NULL, ICON_NONE); |