diff options
Diffstat (limited to 'source/blender/editors/object/object_vgroup.c')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index c60041fe67b..f610d758243 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -92,7 +92,7 @@ static Lattice *vgroup_edit_lattice(Object *ob) int ED_vgroup_object_is_edit_mode(Object *ob) { if(ob->type == OB_MESH) - return (((Mesh*)ob->data)->edit_btmesh != NULL); + return (BMEdit_FromObject(ob) != NULL); else if(ob->type == OB_LATTICE) return (((Lattice*)ob->data)->editlatt != NULL); @@ -769,7 +769,7 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count) MLoop *ml = &me->mloop[mp->loopstart]; while(j--) { /* XXX This assume a vert can only be once in a poly, even though - * it seems logical to me, not totaly sure of that. */ + * it seems logical to me, not totally sure of that. */ if (ml->v == vert) { int a, b, k; if(j == first_l) { @@ -1257,11 +1257,12 @@ static void vgroup_blend(Object *ob) int i, dvert_tot=0; const int def_nr= ob->actdef-1; - BMEditMesh *em= ((Mesh *)ob->data)->edit_btmesh; + BMEditMesh *em = BMEdit_FromObject(ob); // ED_vgroup_give_array(ob->data, &dvert_array, &dvert_tot); - if (em==NULL) + if (em == NULL) { return; + } if (BLI_findlink(&ob->defbase, def_nr)) { BMEdge *eed; @@ -1604,7 +1605,7 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v } /* unlike editmesh we know that by only looping over the first hald of - * the 'u' indicies it will cover all points except the middle which is + * the 'u' indices it will cover all points except the middle which is * ok in this case */ pntsu_half= lt->pntsu / 2; @@ -1880,7 +1881,7 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg) static int vgroup_object_in_edit_mode(Object *ob) { if(ob->type == OB_MESH) - return (((Mesh*)ob->data)->edit_btmesh != NULL); + return (BMEdit_FromObject(ob) != NULL); else if(ob->type == OB_LATTICE) return (((Lattice*)ob->data)->editlatt != NULL); @@ -2644,7 +2645,7 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op) if((change == 0 && fail == 0) || fail) { BKE_reportf(op->reports, RPT_ERROR, - "Copy to VGroups to Selected warning done %d, failed %d, object data must have matching indicies", + "Copy to VGroups to Selected warning done %d, failed %d, object data must have matching indices", change, fail); } @@ -2773,7 +2774,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op) if(ob->mode == OB_MODE_EDIT) { if(ob->type==OB_MESH) { - BMEditMesh *em = ((Mesh*)ob->data)->edit_btmesh; + BMEditMesh *em = BMEdit_FromObject(ob); BMIter iter; BMVert *eve; @@ -2795,7 +2796,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op) ED_vgroup_give_array(ob->data, &dvert, &dvert_tot); - /*create as necassary*/ + /*create as necessary*/ while(dvert && dvert_tot--) { if(dvert->totweight) defvert_remap(dvert, sort_map, defbase_tot); |