Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren>2020-09-29 15:34:01 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-09-29 17:10:16 +0300
commitbab2260b59c7bffe1e16b5e860ac36b5fdc31bf0 (patch)
tree814d0b54a1618ce2c1359ac16888e10cb90479cf /source/blender/makesrna
parent5845c06a63a6b96f038f5a46d538b0f9737102e9 (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/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index b433c938bd6..0e8903a2796 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -6134,7 +6134,12 @@ static void rna_def_modifier_meshseqcache(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "read_flag");
RNA_def_property_enum_items(prop, read_flag_items);
RNA_def_property_ui_text(prop, "Read Data", "Data to read from the cache");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ prop = RNA_def_property(srna, "use_vertex_interpolation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "read_flag", MOD_MESHSEQ_INTERPOLATE_VERTICES);
+ RNA_def_property_ui_text(
+ prop, "Vertex Interpolation", "Allow interpolation of vertex positions.");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "velocity_scale", PROP_FLOAT, PROP_NONE);