diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-13 13:21:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-13 13:37:18 +0300 |
commit | f8a499b596b8af46201b86a30c9807ca54363e25 (patch) | |
tree | 8ce53c7fb9c598deda0141f3eecf7d316b8c24b1 /source/blender/blenkernel/intern/subdiv_converter.c | |
parent | 33fbc4fbea14a17d71eacf2c152d51518737df35 (diff) |
OpenSubdiv: Add stub implementation of C-API
C-API is way smaller than the rest of the code which uses it.
So better to conditionally compile stub implementation than
to keep adding ifdef everywhere.
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_converter.c')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_converter.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_converter.c b/source/blender/blenkernel/intern/subdiv_converter.c index f6dabfa1c80..0ef32200bd3 100644 --- a/source/blender/blenkernel/intern/subdiv_converter.c +++ b/source/blender/blenkernel/intern/subdiv_converter.c @@ -27,25 +27,18 @@ #include "BLI_utildefines.h" -#ifdef WITH_OPENSUBDIV -# include "opensubdiv_converter_capi.h" -#endif +#include "opensubdiv_converter_capi.h" void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter) { -#ifdef WITH_OPENSUBDIV if (converter->freeUserData) { converter->freeUserData(converter); } -#else - UNUSED_VARS(converter); -#endif } /*OpenSubdiv_FVarLinearInterpolation*/ int BKE_subdiv_converter_fvar_linear_from_settings(const SubdivSettings *settings) { -#ifdef WITH_OPENSUBDIV switch (settings->fvar_linear_interpolation) { case SUBDIV_FVAR_LINEAR_INTERPOLATION_NONE: return OSD_FVAR_LINEAR_INTERPOLATION_NONE; @@ -58,8 +51,4 @@ BKE_subdiv_converter_fvar_linear_from_settings(const SubdivSettings *settings) } BLI_assert(!"Unknown fvar linear interpolation"); return OSD_FVAR_LINEAR_INTERPOLATION_NONE; -#else - UNUSED_VARS(settings); - return 0; -#endif } |