diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-10-31 19:46:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-10-31 19:47:40 +0300 |
commit | a2a8e7121081404e35d9aa4769b17ebf23f83f11 (patch) | |
tree | dcb80b6466cba21f905740abadd6383aa07f0a16 /source/blender/blenkernel/intern/subdiv_converter.c | |
parent | 9c328502bb37ab082e4205be4b61fe9d4a43aa1b (diff) |
OpenSubdiv: API, expose vertex boundary interpolation option
Only affects internal API, bout could be exposed as an option for
the compatibility reasons with other software.
Is a part of some ongoing development of multires, but might or
might not be used.
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_converter.c')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_converter.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_converter.c b/source/blender/blenkernel/intern/subdiv_converter.c index 47e87bfdd78..b3eab1565d7 100644 --- a/source/blender/blenkernel/intern/subdiv_converter.c +++ b/source/blender/blenkernel/intern/subdiv_converter.c @@ -40,6 +40,21 @@ void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter) } } +int BKE_subdiv_converter_vtx_boundary_interpolation_from_settings( + const SubdivSettings *settings) +{ + switch (settings->vtx_boundary_interpolation) { + case SUBDIV_VTX_BOUNDARY_NONE: + return OSD_VTX_BOUNDARY_NONE; + case SUBDIV_VTX_BOUNDARY_EDGE_ONLY: + return OSD_VTX_BOUNDARY_EDGE_ONLY; + case SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER: + return OSD_VTX_BOUNDARY_EDGE_AND_CORNER; + } + BLI_assert(!"Unknown vtx boundary interpolation"); + return OSD_VTX_BOUNDARY_EDGE_ONLY; +} + /*OpenSubdiv_FVarLinearInterpolation*/ int BKE_subdiv_converter_fvar_linear_from_settings(const SubdivSettings *settings) { |