[Bf-blender-cvs] [470ed9f0745] master: Merge branch 'blender-v2.83-release'

Sergey Sharybin noreply at git.blender.org
Mon May 18 10:49:44 CEST 2020


Commit: 470ed9f07453acdf59b9ff8feac71df52409f0ab
Author: Sergey Sharybin
Date:   Mon May 18 10:49:23 2020 +0200
Branches: master
https://developer.blender.org/rB470ed9f07453acdf59b9ff8feac71df52409f0ab

Merge branch 'blender-v2.83-release'

===================================================================



===================================================================

diff --cc source/blender/blenkernel/intern/multires_reshape.c
index e59b19638f8,01e7b87cac0..64cc9130e25
--- a/source/blender/blenkernel/intern/multires_reshape.c
+++ b/source/blender/blenkernel/intern/multires_reshape.c
@@@ -197,14 -188,18 +197,23 @@@ void multiresModifier_subdivide_to_leve
    if (!has_mdisps) {
      CustomData_add_layer(&coarse_mesh->ldata, CD_MDISPS, CD_CALLOC, NULL, coarse_mesh->totloop);
    }
-   if (!has_mdisps || top_level == 1) {
+ 
+   /* NOTE: Subdivision happens from the top level of the existing multires modifier. If it is set
+    * to 0 and there is mdisps layer it would mean that the modifier went out of sync with the data.
+    * This happens when, for example, linking modifiers from one object to another.
+    *
+    * In such cases simply ensure grids to be the proper level.
+    *
+    * If something smarter is needed it is up to the operators which does data synchronization, so
+    * that the mdisps layer is also synchronized. */
+   if (!has_mdisps || top_level == 1 || mmd->totlvl == 0) {
      multires_reshape_ensure_grids(coarse_mesh, top_level);
 -    multires_set_tot_level(object, mmd, top_level);
 +    if (ELEM(mode, MULTIRES_SUBDIVIDE_LINEAR, MULTIRES_SUBDIVIDE_SIMPLE)) {
 +      multires_subdivide_create_tangent_displacement_linear_grids(object, mmd);
 +    }
 +    else {
 +      multires_set_tot_level(object, mmd, top_level);
 +    }
      return;
    }



More information about the Bf-blender-cvs mailing list