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/CCGSubSurf_opensubdiv_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/CCGSubSurf_opensubdiv_converter.c')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c index f81a1d9eec9..0301582b303 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c @@ -84,6 +84,13 @@ static OpenSubdiv_SchemeType conv_dm_get_type( return OSD_SCHEME_CATMARK; } +static OpenSubdiv_VtxBoundaryInterpolation +conv_dm_get_vtx_boundary_interpolation( + const OpenSubdiv_Converter *UNUSED(converter)) +{ + return OSD_VTX_BOUNDARY_EDGE_ONLY; +} + static OpenSubdiv_FVarLinearInterpolation conv_dm_get_fvar_linear_interpolation( const OpenSubdiv_Converter *converter) { @@ -448,6 +455,8 @@ void ccgSubSurf_converter_setup_from_derivedmesh( converter->getSchemeType = conv_dm_get_type; + converter->getVtxBoundaryInterpolation = + conv_dm_get_vtx_boundary_interpolation; converter->getFVarLinearInterpolation = conv_dm_get_fvar_linear_interpolation; converter->specifiesFullTopology = conv_dm_specifies_full_topology; @@ -546,6 +555,13 @@ static OpenSubdiv_SchemeType conv_ccg_get_bilinear_type( } } +static OpenSubdiv_VtxBoundaryInterpolation +conv_ccg_get_vtx_boundary_interpolation( + const OpenSubdiv_Converter *UNUSED(converter)) +{ + return OSD_VTX_BOUNDARY_EDGE_ONLY; +} + static OpenSubdiv_FVarLinearInterpolation conv_ccg_get_fvar_linear_interpolation(const OpenSubdiv_Converter *converter) { @@ -750,6 +766,8 @@ void ccgSubSurf_converter_setup_from_ccg(CCGSubSurf *ss, { converter->getSchemeType = conv_ccg_get_bilinear_type; + converter->getVtxBoundaryInterpolation = + conv_ccg_get_vtx_boundary_interpolation; converter->getFVarLinearInterpolation = conv_ccg_get_fvar_linear_interpolation; converter->specifiesFullTopology = conv_ccg_specifies_full_topology; |