Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-11-19 22:00:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-11-19 22:00:28 +0300
commita92173d4799d869f8c1a008825b5c8d139eb91e1 (patch)
tree8e29b844289916f8bd539a5577d5676805bdbe83 /source/blender
parent1199744188def6f4570ae7994f4cb4639e9d507a (diff)
==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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/python/api2_2x/Mesh.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 7430c2a6e91..5dffb488b3d 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -6409,6 +6409,10 @@ static PyObject *Mesh_removeVertGroup( PyObject * self, PyObject * value )
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 @@ static PyObject *Mesh_removeVertGroup( PyObject * self, PyObject * value )
nIndex++;
object->actdef = (unsigned short)nIndex;
- del_defgroup( object );
-
+ del_defgroup_in_object_mode( object );
+
EXPP_allqueue( REDRAWBUTSALL, 1 );
Py_RETURN_NONE;