[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46346] trunk/blender/source/blender/ modifiers/intern/MOD_weightvgmix.c: fix for error in MOD_weightvgmix. c caused by confusion without braces.

Campbell Barton ideasman42 at gmail.com
Sun May 6 14:52:42 CEST 2012


Revision: 46346
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46346
Author:   campbellbarton
Date:     2012-05-06 12:52:42 +0000 (Sun, 06 May 2012)
Log Message:
-----------
fix for error in MOD_weightvgmix.c caused by confusion without braces.

CustomData_add_layer_named would run even when the dvert layer was found.

Modified Paths:
--------------
    trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c

Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c	2012-05-06 12:37:19 UTC (rev 46345)
+++ trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c	2012-05-06 12:52:42 UTC (rev 46346)
@@ -258,7 +258,7 @@
 
 	dvert = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MDEFORMVERT, numVerts);
 	/* If no vertices were ever added to an object's vgroup, dvert might be NULL. */
-	if (!dvert)
+	if (!dvert) {
 		/* If not affecting all vertices, just return. */
 		if (wmd->mix_set != MOD_WVG_SET_ALL)
 			return dm;
@@ -268,7 +268,7 @@
 		/* Ultimate security check. */
 		if (!dvert)
 			return dm;
-
+	}
 	/* Find out which vertices to work on. */
 	tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGMix Modifier, tidx");
 	tdw1 = MEM_mallocN(sizeof(MDeformWeight*) * numVerts, "WeightVGMix Modifier, tdw1");




More information about the Bf-blender-cvs mailing list