Commit: 3aadf3632eb73c4104211ceaffd409a7acaeba30
Author: Hans Goudey
Date: Sat Nov 6 23:26:07 2021 -0500
Branches: temp-vert-normals-cleanup
https://developer.blender.org/rB3aadf3632eb73c4104211ceaffd409a7acaeba30
Fix failing mesh primitive line node test
An "incorrect" state is totally valid for the normal custom data layers,
if the normals are tagged dirty. In general it doesn't really make sense
to validate the normal layer though, since they are just calculated on
demand.
===================================================================
M source/blender/blenkernel/intern/customdata.c
===================================================================
diff --git a/source/blender/blenkernel/intern/customdata.c
b/source/blender/blenkernel/intern/customdata.c
index 0e469859945..f8967681ed5 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -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] = 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,
@@ -1547,10 +1523,11 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] =
{
NULL,
NULL,
NULL,
+ /* TODO: Should normal interpolation be removed? Normals are generally
just recalculated. */
layerInterp_normal,
NULL,
NULL,
- layerValidate_normal,
+ NULL,
NULL,
NULL,
NULL,
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs