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:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-05-13 11:42:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-05-13 13:11:27 +0300
commit23fd95458c264dc53f5ce94cd2c65404a69d0f6f (patch)
treeee16d30acb322b1b3decd413b2d2e59418695bb7 /source/blender/blenkernel/intern/multires_reshape.c
parent0790d90d027355c6f0d7ba157dec18dea131d4f2 (diff)
Multires: Fix wrong or missing mask propagation
Propagation when changing sculpt level was missing. In fact, the mask was simply completely removed when changing sculpt level. Subdivision worked for simple and linear subdivision, but Catmull-Clark was giving empty results. Fixes propagation part of T76386.
Diffstat (limited to 'source/blender/blenkernel/intern/multires_reshape.c')
-rw-r--r--source/blender/blenkernel/intern/multires_reshape.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c
index c5184881b7c..e59b19638f8 100644
--- a/source/blender/blenkernel/intern/multires_reshape.c
+++ b/source/blender/blenkernel/intern/multires_reshape.c
@@ -216,19 +216,20 @@ void multiresModifier_subdivide_to_level(struct Object *object,
multires_reshape_store_original_grids(&reshape_context);
multires_reshape_ensure_grids(coarse_mesh, reshape_context.top.level);
- multires_reshape_assign_final_coords_from_orig_mdisps(&reshape_context);
+ multires_reshape_assign_final_elements_from_orig_mdisps(&reshape_context);
+
+ /* Free original grids which makes it so smoothing with details thinks all the details were
+ * added against base mesh's limit surface. This is similar behavior to as if we've done all
+ * displacement in sculpt mode at the old top level and then propagated to the new top level.*/
+ multires_reshape_free_original_grids(&reshape_context);
if (ELEM(mode, MULTIRES_SUBDIVIDE_LINEAR, MULTIRES_SUBDIVIDE_SIMPLE)) {
multires_reshape_smooth_object_grids(&reshape_context, mode);
}
else {
- /* Free original grids which makes it so smoothing with details thinks all the details were
- * added against base mesh's limit surface. This is similar behavior to as if we've done all
- * displacement in sculpt mode at the old top level and then propagated to the new top level.*/
- multires_reshape_free_original_grids(&reshape_context);
-
multires_reshape_smooth_object_grids_with_details(&reshape_context);
}
+
multires_reshape_object_grids_to_tangent_displacement(&reshape_context);
multires_reshape_context_free(&reshape_context);