[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40819] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: fix [#26193] Weightpainting on Mesh with Armature-Modifier fails if x-mirror and auto normalize is enabled

Campbell Barton ideasman42 at gmail.com
Thu Oct 6 06:06:49 CEST 2011


Revision: 40819
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40819
Author:   campbellbarton
Date:     2011-10-06 04:06:47 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
fix [#26193] Weightpainting on Mesh with Armature-Modifier fails if x-mirror and auto normalize is enabled

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2011-10-06 03:57:03 UTC (rev 40818)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2011-10-06 04:06:47 UTC (rev 40819)
@@ -1618,9 +1618,14 @@
 				/* copy, not paint again */
 				uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
 				uw->weight= dw->weight;
-				do_weight_paint_auto_normalize_all_groups(dv_mirr, wpi->vgroup_validmap, wpi->do_auto_normalize);
 			}
 		}
+
+		/* important to normalize after mirror, otherwise mirror gets wight
+		 * which has already been scaled down in relation to other weights,
+		 * then scales a second time [#26193]. Tricky multi-paint code doesn't
+		 * suffer from this problem - campbell */
+		do_weight_paint_auto_normalize_all_groups(dv_mirr, wpi->vgroup_validmap, wpi->do_auto_normalize);
 	}
 	else {
 		/* use locks and/or multipaint */




More information about the Bf-blender-cvs mailing list