[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43382] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: fix for weight paint when the mirror vertex was allocated ( would free the original verts weight).
Campbell Barton
ideasman42 at gmail.com
Sat Jan 14 19:52:43 CET 2012
Revision: 43382
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43382
Author: campbellbarton
Date: 2012-01-14 18:52:34 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
fix for weight paint when the mirror vertex was allocated (would free the original verts weight).
was an error in own recent commit.
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 2012-01-14 18:11:45 UTC (rev 43381)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2012-01-14 18:52:34 UTC (rev 43382)
@@ -1655,7 +1655,20 @@
}
}
else {
- dw_mirr = defvert_verify_index(dv_mirr, vgroup_mirr);
+ if (index != index_mirr) {
+ dw_mirr = defvert_verify_index(dv_mirr, vgroup_mirr);
+ }
+ else {
+ /* dv and dv_mirr are the same */
+ int totweight_prev = dv_mirr->totweight;
+ int dw_offset = (int)(dw - dv_mirr->dw);
+ dw_mirr = defvert_verify_index(dv_mirr, vgroup_mirr);
+
+ /* if we added another, get our old one back */
+ if (totweight_prev != dv_mirr->totweight) {
+ dw = &dv_mirr->dw[dw_offset];
+ }
+ }
}
}
else {
More information about the Bf-blender-cvs
mailing list