[Bf-blender-cvs] [11abb13483] master: Fix T50534, Part II: warn user when DataTransfer mod affects custom normals.

Bastien Montagne noreply at git.blender.org
Fri Jan 27 19:10:35 CET 2017


Commit: 11abb1348301b181c313fe9e840edf38958f9849
Author: Bastien Montagne
Date:   Fri Jan 27 19:06:10 2017 +0100
Branches: master
https://developer.blender.org/rB11abb1348301b181c313fe9e840edf38958f9849

Fix T50534, Part II: warn user when DataTransfer mod affects custom normals.

Custom normals need Autosmooth setting to be enabled, always!

===================================================================

M	source/blender/modifiers/intern/MOD_datatransfer.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c
index f5ab28d3d8..53742ef203 100644
--- a/source/blender/modifiers/intern/MOD_datatransfer.c
+++ b/source/blender/modifiers/intern/MOD_datatransfer.c
@@ -211,6 +211,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
 	if (BKE_reports_contain(&reports, RPT_ERROR)) {
 		modifier_setError(md, "%s", BKE_reports_string(&reports, RPT_ERROR));
 	}
+	else if ((dtmd->data_types & DT_TYPE_LNOR) && !(me->flag & ME_AUTOSMOOTH)) {
+		modifier_setError((ModifierData *)dtmd, "Enable 'Auto Smooth' option in mesh settings");
+	}
 	else if (dm->getNumVerts(dm) > HIGH_POLY_WARNING || ((Mesh *)(dtmd->ob_source->data))->totvert > HIGH_POLY_WARNING) {
 		modifier_setError(md, "You are using a rather high poly as source or destination, computation might be slow");
 	}




More information about the Bf-blender-cvs mailing list