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:
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/multires_subdiv.c3
-rw-r--r--source/blender/blenkernel/intern/subdiv.c13
2 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/multires_subdiv.c b/source/blender/blenkernel/intern/multires_subdiv.c
index fc092d3ccce..73ef623fbfd 100644
--- a/source/blender/blenkernel/intern/multires_subdiv.c
+++ b/source/blender/blenkernel/intern/multires_subdiv.c
@@ -40,7 +40,8 @@ void BKE_multires_subdiv_settings_init(SubdivSettings *settings, const MultiresM
settings->is_adaptive = true;
settings->level = settings->is_simple ? 1 : mmd->quality;
settings->use_creases = (mmd->flags & eMultiresModifierFlag_UseCrease);
- settings->vtx_boundary_interpolation = SUBDIV_VTX_BOUNDARY_EDGE_ONLY;
+ settings->vtx_boundary_interpolation = BKE_subdiv_vtx_boundary_interpolation_from_subsurf(
+ mmd->boundary_smooth);
settings->fvar_linear_interpolation = BKE_subdiv_fvar_interpolation_from_uv_smooth(
mmd->uv_smooth);
}
diff --git a/source/blender/blenkernel/intern/subdiv.c b/source/blender/blenkernel/intern/subdiv.c
index fe1dd3835fd..f1cde39f657 100644
--- a/source/blender/blenkernel/intern/subdiv.c
+++ b/source/blender/blenkernel/intern/subdiv.c
@@ -72,6 +72,19 @@ eSubdivFVarLinearInterpolation BKE_subdiv_fvar_interpolation_from_uv_smooth(int
return SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL;
}
+eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsurf(
+ int boundary_smooth)
+{
+ switch (boundary_smooth) {
+ case SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS:
+ return SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER;
+ case SUBSURF_BOUNDARY_SMOOTH_ALL:
+ return SUBDIV_VTX_BOUNDARY_EDGE_ONLY;
+ }
+ BLI_assert(!"Unknown boundary smooth flag");
+ return SUBDIV_VTX_BOUNDARY_EDGE_ONLY;
+}
+
/* ================================ SETTINGS ================================ */
static bool check_mesh_has_non_quad(const Mesh *mesh)