diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/multires_subdiv.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_converter_mesh.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/multires_subdiv.c b/source/blender/blenkernel/intern/multires_subdiv.c index 3d1a019f427..59229f28751 100644 --- a/source/blender/blenkernel/intern/multires_subdiv.c +++ b/source/blender/blenkernel/intern/multires_subdiv.c @@ -41,6 +41,7 @@ void BKE_multires_subdiv_settings_init( settings->is_simple = (mmd->simple != 0); 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->fvar_linear_interpolation = BKE_subdiv_fvar_interpolation_from_uv_smooth(mmd->uv_smooth); diff --git a/source/blender/blenkernel/intern/subdiv_converter_mesh.c b/source/blender/blenkernel/intern/subdiv_converter_mesh.c index 00a2436098e..eda6b522b85 100644 --- a/source/blender/blenkernel/intern/subdiv_converter_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_converter_mesh.c @@ -168,6 +168,9 @@ static float get_edge_sharpness(const OpenSubdiv_Converter *converter, return 10.0f; } #endif + if (!storage->settings.use_creases) { + return 0.0f; + } const int edge_index = storage->manifold_edge_index_reverse[manifold_edge_index]; const MEdge *medge = storage->mesh->medge; @@ -190,9 +193,13 @@ static bool is_infinite_sharp_vertex(const OpenSubdiv_Converter *converter, vertex_index); } -static float get_vertex_sharpness(const OpenSubdiv_Converter *UNUSED(converter), +static float get_vertex_sharpness(const OpenSubdiv_Converter *converter, int UNUSED(manifold_vertex_index)) { + ConverterStorage *storage = converter->user_data; + if (!storage->settings.use_creases) { + return 0.0f; + } return 0.0f; } |