[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12627] trunk/blender/source/blender/ python/api2_2x/Mesh.c: ==Python API==

Campbell Barton ideasman42 at gmail.com
Mon Nov 19 20:00:28 CET 2007


Revision: 12627
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12627
Author:   campbellbarton
Date:     2007-11-19 20:00:28 +0100 (Mon, 19 Nov 2007)

Log Message:
-----------
==Python API==
removing vertex groups was broken, the function being called was for editmode, this would remove the vertex group but apply the weights from the removed group to the next vertex group.

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Mesh.c

Modified: trunk/blender/source/blender/python/api2_2x/Mesh.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Mesh.c	2007-11-19 18:31:32 UTC (rev 12626)
+++ trunk/blender/source/blender/python/api2_2x/Mesh.c	2007-11-19 19:00:28 UTC (rev 12627)
@@ -6409,6 +6409,10 @@
 	int nIndex;
 	bDeformGroup *pGroup;
 
+	if( G.obedit )
+		return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+			"can't use removeVertGroup() while in edit mode" );
+	
 	if( !groupStr )
 		return EXPP_ReturnPyObjError( PyExc_TypeError,
 					      "expected string argument" );
@@ -6431,8 +6435,8 @@
 	nIndex++;
 	object->actdef = (unsigned short)nIndex;
 
-	del_defgroup( object );
-
+	del_defgroup_in_object_mode( object );
+	
 	EXPP_allqueue( REDRAWBUTSALL, 1 );
 
 	Py_RETURN_NONE;





More information about the Bf-blender-cvs mailing list