From 6070f92ab94be7bd1d6729f178d71c71c4245fbb Mon Sep 17 00:00:00 2001 From: Piotr Ostrowski Date: Wed, 30 Sep 2020 15:56:37 +0200 Subject: 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 --- source/blender/blenkernel/BKE_subdiv.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_subdiv.h') diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h index 96a79d753cf..92da909b2ae 100644 --- a/source/blender/blenkernel/BKE_subdiv.h +++ b/source/blender/blenkernel/BKE_subdiv.h @@ -204,6 +204,9 @@ void BKE_subdiv_exit(void); /* NOTE: uv_smooth is eSubsurfUVSmooth. */ eSubdivFVarLinearInterpolation BKE_subdiv_fvar_interpolation_from_uv_smooth(int uv_smooth); +eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsurf( + int boundary_smooth); + /* =============================== STATISTICS =============================== */ void BKE_subdiv_stats_init(SubdivStats *stats); -- cgit v1.2.3 From 5b8503425a491f94f526d1f65cefea1599cafd92 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 1 Oct 2020 17:39:24 +0200 Subject: Fix subdivision surface wrong for non-limit surface and subdivision level 1 Remove the workaround for T59395 that increases the minimal refinement to 2 to work around an OpenSubdiv bug. This bug appears to be fixed in the latest OpenSubdiv version we are using. Problem found by Piotr Ostrowski. Ref D9076 --- source/blender/blenkernel/BKE_subdiv.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_subdiv.h') diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h index 92da909b2ae..3d47c8d3bc5 100644 --- a/source/blender/blenkernel/BKE_subdiv.h +++ b/source/blender/blenkernel/BKE_subdiv.h @@ -220,8 +220,6 @@ void BKE_subdiv_stats_print(const SubdivStats *stats); /* ================================ SETTINGS ================================ */ -void BKE_subdiv_settings_validate_for_mesh(SubdivSettings *settings, const struct Mesh *mesh); - bool BKE_subdiv_settings_equal(const SubdivSettings *settings_a, const SubdivSettings *settings_b); /* ============================== CONSTRUCTION ============================== */ -- cgit v1.2.3