[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38817] branches/vgroup_modifiers/source/ blender/modifiers/intern: vgroup_modifiers: Fixed last problems with WP mode, plus a small fix in weightvg_util.c.
Bastien Montagne
montagne29 at wanadoo.fr
Fri Jul 29 15:25:58 CEST 2011
Revision: 38817
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38817
Author: mont29
Date: 2011-07-29 13:25:58 +0000 (Fri, 29 Jul 2011)
Log Message:
-----------
vgroup_modifiers: Fixed last problems with WP mode, plus a small fix in weightvg_util.c.
It seems WeightVG modifiers can?\226?\128?\153t enable the eModifierTypeFlag_SupportsMapping flag...
Modified Paths:
--------------
branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c
branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c
branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c
branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c
Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c
===================================================================
--- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c 2011-07-29 12:33:18 UTC (rev 38816)
+++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c 2011-07-29 13:25:58 UTC (rev 38817)
@@ -187,6 +187,7 @@
for (i = 0; i < num; i++) {
int j;
+ char add2vg = do_add;
float w = weights[i];
MDeformVert *dv = &dvert[indices ? indices[i] : i];
MDeformWeight *newdw;
@@ -221,16 +222,17 @@
}
}
/* Else, just set the new computed weight. */
- else
+ else {
dv->dw[j].weight = w;
+ }
+ add2vg = 0;
break;
}
- continue;
}
/* If the vert wasn’t in the deform group, add it if needed!
*/
- if (do_add && w > add_thresh) {
+ if (add2vg && w > add_thresh) {
newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "WeightVGEdit Modifier, deformWeight");
if(dv->dw) {
memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);
Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c
===================================================================
--- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-07-29 12:33:18 UTC (rev 38816)
+++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-07-29 13:25:58 UTC (rev 38817)
@@ -191,7 +191,9 @@
{
WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
DerivedMesh *dm = derivedData, *ret = NULL;
+#if 0
Mesh *ob_m = NULL;
+#endif
MDeformVert *dvert = NULL;
float *org_w = NULL; /* Array original weights. */
float *new_w = NULL; /* Array new weights. */
@@ -344,7 +346,7 @@
/* structSize */ sizeof(WeightVGEditModifierData),
/* type */ eModifierTypeType_Nonconstructive,
/* flags */ eModifierTypeFlag_AcceptsMesh
- |eModifierTypeFlag_SupportsMapping
+/* |eModifierTypeFlag_SupportsMapping*/
|eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c
===================================================================
--- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-07-29 12:33:18 UTC (rev 38816)
+++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-07-29 13:25:58 UTC (rev 38817)
@@ -221,7 +221,9 @@
{
WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
DerivedMesh *dm = derivedData, *ret = NULL;
+#if 0
Mesh *ob_m = NULL;
+#endif
MDeformVert *dvert = NULL;
int numVerts;
int defgrp_idx, defgrp_idx2 = -1;
@@ -436,7 +438,7 @@
/* structSize */ sizeof(WeightVGMixModifierData),
/* type */ eModifierTypeType_Nonconstructive,
/* flags */ eModifierTypeFlag_AcceptsMesh
- |eModifierTypeFlag_SupportsMapping
+/* |eModifierTypeFlag_SupportsMapping*/
|eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c
===================================================================
--- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-07-29 12:33:18 UTC (rev 38816)
+++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-07-29 13:25:58 UTC (rev 38817)
@@ -507,7 +507,7 @@
/* structSize */ sizeof(WeightVGProximityModifierData),
/* type */ eModifierTypeType_Nonconstructive,
/* flags */ eModifierTypeFlag_AcceptsMesh
- |eModifierTypeFlag_SupportsMapping
+/* |eModifierTypeFlag_SupportsMapping*/
|eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
More information about the Bf-blender-cvs
mailing list