[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42999] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: patch from Jason Hays
Campbell Barton
ideasman42 at gmail.com
Fri Dec 30 12:31:51 CET 2011
Revision: 42999
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42999
Author: campbellbarton
Date: 2011-12-30 11:31:48 +0000 (Fri, 30 Dec 2011)
Log Message:
-----------
patch from Jason Hays
---
Locking only redistributes or restricts weights when using bone groups.
So, in addition to adding a NULL check to my last bit of code, I made
has_locked_group() check for bone groups.
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-12-30 11:15:39 UTC (rev 42998)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2011-12-30 11:31:48 UTC (rev 42999)
@@ -1141,14 +1141,14 @@
See if the current deform vertex has a locked group
*/
static char has_locked_group(MDeformVert *dvert, const int defbase_tot,
- const char *lock_flags)
+ const char *bone_groups, const char *lock_flags)
{
int i;
MDeformWeight *dw;
for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot) {
- if (lock_flags[dw->def_nr] && dw->weight > 0.0f) {
+ if (bone_groups[dw->def_nr] && lock_flags[dw->def_nr] && dw->weight > 0.0f) {
return TRUE;
}
}
@@ -1325,7 +1325,7 @@
char *change_status;
- if(!lock_flags || !has_locked_group(ndv, defbase_tot, lock_flags)) {
+ if(!lock_flags || !has_locked_group(ndv, defbase_tot, vgroup_validmap, lock_flags)) {
return;
}
/* record if a group was changed, unlocked and not changed, or locked */
@@ -1598,7 +1598,7 @@
/* If there are no locks or multipaint,
* then there is no need to run the more complicated checks */
if ( (wpi->do_multipaint == FALSE || wpi->defbase_tot_sel <= 1) &&
- (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->lock_flags) == FALSE))
+ (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == FALSE))
{
wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, FALSE);
More information about the Bf-blender-cvs
mailing list