[Bf-blender-cvs] [a0d0f73] temp_custom_loop_normals: Add comment about broken copy-from-face-normal.

Bastien Montagne noreply at git.blender.org
Mon Nov 3 17:59:19 CET 2014


Commit: a0d0f7367e429ba08f56a07b527996ace0b0848d
Author: Bastien Montagne
Date:   Mon Nov 3 17:58:06 2014 +0100
Branches: temp_custom_loop_normals
https://developer.blender.org/rBa0d0f7367e429ba08f56a07b527996ace0b0848d

Add comment about broken copy-from-face-normal.

bvh works on tesselleated face, so return tessellated index, not poly one. Need a mapping,
won't fix that here - not worth it, since we want to use transferdata code here in the end.

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

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

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

diff --git a/source/blender/modifiers/intern/MOD_copysplitnormal.c b/source/blender/modifiers/intern/MOD_copysplitnormal.c
index a77417a..caa8c89 100644
--- a/source/blender/modifiers/intern/MOD_copysplitnormal.c
+++ b/source/blender/modifiers/intern/MOD_copysplitnormal.c
@@ -163,6 +163,10 @@ static void copySplitNormalModifier_do_facenormal(
 			/* Compute and store result. */
 			BLI_bvhtree_find_nearest(treeData.tree, tmp_co, &nearest, treeData.nearest_callback, &treeData);
 
+			/* XXX This is broken in polygon case - nearest.index is index of nearest tessellated face, not nearest poly!
+			 *     Not worth fixing this here, better to wait for transferdata code, which handles all that mess itself.
+			 */
+
 			if (facs[i] && nearest.index != -1) {
 				copy_v3_v3(cos[i], target_polynors[nearest.index]);
 				/* Bring normal back in own space! */




More information about the Bf-blender-cvs mailing list