diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-28 17:05:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-28 22:02:59 +0300 |
commit | a016ad2ea8d718a8f48be841fe463bc5a54e3be8 (patch) | |
tree | b12021f9504358563f85e2eee279a27eeb1e56a6 /source/blender/depsgraph | |
parent | 06805251478c53a262bc1fe9a7224d1f1b5bf449 (diff) |
Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations.
BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0,
which was never filled in correctly. In 2.7 the equivalent function used to
modify the source derivedmesh and add valid original indices to it, but this
is no longer possible in the new design and was quite unpredictable anyway.
Now instead rely on mesh_calc_modifiers and the depsgraph to determine when
CD_ORIGINDEX should be added.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 33850181f60..f0c1dc8ffc3 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -931,6 +931,11 @@ void DepsgraphRelationBuilder::build_object_parent(Object *object) * so we onl;y hook up to transform channel here. */ add_relation(parent_geometry_key, ob_key, "Parent"); } + + /* Dupliverts uses original vertex index. */ + if (parent->transflag & OB_DUPLIVERTS) { + add_customdata_mask(parent, DEGCustomDataMeshMasks::MaskVert(CD_MASK_ORIGINDEX)); + } } void DepsgraphRelationBuilder::build_object_pointcache(Object *object) |