2.5 Paint:
[blender.git] / source / blender / editors / object / object_vgroup.c
index 3d3e29bcc228f5efc4677c1cc0a27d40f179bed5..154ab14df60100189a94fd1b11af1db93446af7d 100644 (file)
@@ -57,6 +57,7 @@
 #include "BKE_global.h"
 #include "BKE_lattice.h"
 #include "BKE_mesh.h"
+#include "BKE_paint.h"
 #include "BKE_utildefines.h"
 
 #include "RNA_access.h"
@@ -1028,11 +1029,11 @@ void vgroup_assign_with_menu(Scene *scene, Object *ob)
        switch (mode) {
                case 1: /* add to new group */
                        add_defgroup(ob);
-                       assign_verts_defgroup(ob, wp->brush->alpha);
+                       assign_verts_defgroup(ob, paint_brush(&wp->paint)->alpha);
                        BIF_undo_push("Assign to vertex group");
                        break;
                case 2: /* add to current group */
-                       assign_verts_defgroup(ob, wp->brush->alpha);
+                       assign_verts_defgroup(ob, paint_brush(&wp->paint)->alpha);
                        BIF_undo_push("Assign to vertex group");
                        break;
                case 3: /* remove from current group */