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:
authorPiotr Ostrowski <postrowski>2020-09-30 16:56:37 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-09-30 18:20:29 +0300
commit6070f92ab94be7bd1d6729f178d71c71c4245fbb (patch)
treebacd1100dffa84ddf51fbd4d53b58eb3d29c0916 /source/blender/modifiers/intern/MOD_multires.c
parent53f20b940a1e520e131b8bb31cf0529ed4d30f9e (diff)
Subdivision Surfaces: add boundary smooth option to modifiers
This adds the option to either smooth the entire boundary, or to keep corners sharp, for the Subdivision Surface and Multiresolution modifiers. This mainly helps with compatibility with other software. The default behavior remains to smooth the entire boundary. Differential Revision: https://developer.blender.org/D8485
Diffstat (limited to 'source/blender/modifiers/intern/MOD_multires.c')
-rw-r--r--source/blender/modifiers/intern/MOD_multires.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c
index 2c6ee50d419..41188fcc907 100644
--- a/source/blender/modifiers/intern/MOD_multires.c
+++ b/source/blender/modifiers/intern/MOD_multires.c
@@ -73,6 +73,7 @@ static void initData(ModifierData *md)
mmd->renderlvl = 0;
mmd->totlvl = 0;
mmd->uv_smooth = SUBSURF_UV_SMOOTH_PRESERVE_CORNERS;
+ mmd->boundary_smooth = SUBSURF_BOUNDARY_SMOOTH_ALL;
mmd->quality = 4;
mmd->flags |= (eMultiresModifierFlag_UseCrease | eMultiresModifierFlag_ControlEdges);
@@ -489,6 +490,7 @@ static void advanced_panel_draw(const bContext *UNUSED(C), Panel *panel)
col = uiLayoutColumn(layout, false);
uiLayoutSetEnabled(col, true);
uiItemR(col, ptr, "uv_smooth", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "boundary_smooth", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_creases", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_custom_normals", 0, NULL, ICON_NONE);