fix [#28003] Unable to delete vgroup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 18 Jul 2011 07:38:44 +0000 (07:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 18 Jul 2011 07:38:44 +0000 (07:38 +0000)
still need to find how an invalid defgroup index is set, but at least dont show the vertex group as selected when its not.

source/blender/makesrna/intern/rna_object.c

index dd66e49fdec1ad2f228aafb8776d1cc191055ee3..61e65585dd4fa4d9688c10d73a4971be48c3c406 100644 (file)
@@ -483,7 +483,7 @@ static PointerRNA rna_Object_active_vertex_group_get(PointerRNA *ptr)
 static int rna_Object_active_vertex_group_index_get(PointerRNA *ptr)
 {
        Object *ob= (Object*)ptr->id.data;
 static int rna_Object_active_vertex_group_index_get(PointerRNA *ptr)
 {
        Object *ob= (Object*)ptr->id.data;
-       return MAX2(ob->actdef-1, 0);
+       return ob->actdef-1;
 }
 
 static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value)
 }
 
 static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value)