diff options
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.cc')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 59d9039fff5..6ec3e783fa2 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -345,30 +345,6 @@ static void layerInterp_normal(const void **sources, normalize_v3_v3((float *)dest, no); } -static bool layerValidate_normal(void *data, const uint totitems, const bool do_fixes) -{ - static const float no_default[3] = {0.0f, 0.0f, 1.0f}; /* Z-up default normal... */ - float(*no)[3] = (float(*)[3])data; - bool has_errors = false; - - for (int i = 0; i < totitems; i++, no++) { - if (!is_finite_v3((float *)no)) { - has_errors = true; - if (do_fixes) { - copy_v3_v3((float *)no, no_default); - } - } - else if (!compare_ff(len_squared_v3((float *)no), 1.0f, 1e-6f)) { - has_errors = true; - if (do_fixes) { - normalize_v3((float *)no); - } - } - } - - return has_errors; -} - static void layerCopyValue_normal(const void *source, void *dest, const int mixmode, @@ -1549,7 +1525,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { layerInterp_normal, nullptr, nullptr, - layerValidate_normal, + nullptr, nullptr, nullptr, nullptr, |