diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-17 22:33:25 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-17 22:33:25 +0300 |
commit | 1e5d5085675afd1c3d6e0191e668449217f733ed (patch) | |
tree | b18988f0f578b0a7bee871472398a6ef5ebf69f4 /source | |
parent | 7019c2bb7f9b8fd27e8f0cc5b72b262e2de584a9 (diff) |
Cleanup: Shapekey: get rid of `ED_vgroup_object_is_edit_mode()`
It was doing exactly the same thing as `BKE_object_is_in_editmode_vgroup()`, tsst...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 | ||||
-rw-r--r-- | source/blenderplayer/bad_level_call_stubs/stubs.c | 1 |
4 files changed, 4 insertions, 17 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 2b4fa1b9196..63362b0638b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -244,8 +244,6 @@ void ED_vgroup_mirror(struct Object *ob, const bool all_vgroups, const bool use_topology, int *r_totmirr, int *r_totfail); -bool ED_vgroup_object_is_edit_mode(struct Object *ob); - void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode); void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum); float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index b7f121d52dd..672dcb47d92 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -126,16 +126,6 @@ bool ED_vgroup_sync_from_pose(Object *ob) return false; } -bool ED_vgroup_object_is_edit_mode(Object *ob) -{ - if (ob->type == OB_MESH) - return (BKE_editmesh_from_object(ob) != NULL); - else if (ob->type == OB_LATTICE) - return (((Lattice *)ob->data)->editlatt != NULL); - - return false; -} - bDeformGroup *ED_vgroup_add_name(Object *ob, const char *name) { bDeformGroup *defgroup; @@ -159,7 +149,7 @@ void ED_vgroup_delete(Object *ob, bDeformGroup *defgroup) { BLI_assert(BLI_findindex(&ob->defbase, defgroup) != -1); - if (ED_vgroup_object_is_edit_mode(ob)) + if (BKE_object_is_in_editmode_vgroup(ob)) vgroup_delete_edit_mode(ob, defgroup); else vgroup_delete_object_mode(ob, defgroup); @@ -168,7 +158,7 @@ void ED_vgroup_delete(Object *ob, bDeformGroup *defgroup) void ED_vgroup_clear(Object *ob) { bDeformGroup *dg = (bDeformGroup *)ob->defbase.first; - int edit_mode = ED_vgroup_object_is_edit_mode(ob); + int edit_mode = BKE_object_is_in_editmode_vgroup(ob); while (dg) { bDeformGroup *next_dg = dg->next; diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 8ebeeafbc58..e6714bbe433 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1422,7 +1422,7 @@ static void rna_VertexGroup_vertex_add(ID *id, bDeformGroup *def, ReportList *re { Object *ob = (Object *)id; - if (ED_vgroup_object_is_edit_mode(ob)) { + if (BKE_object_is_in_editmode_vgroup(ob)) { BKE_report(reports, RPT_ERROR, "VertexGroup.add(): cannot be called while object is in edit mode"); return; } @@ -1437,7 +1437,7 @@ static void rna_VertexGroup_vertex_remove(ID *id, bDeformGroup *dg, ReportList * { Object *ob = (Object *)id; - if (ED_vgroup_object_is_edit_mode(ob)) { + if (BKE_object_is_in_editmode_vgroup(ob)) { BKE_report(reports, RPT_ERROR, "VertexGroup.remove(): cannot be called while object is in edit mode"); return; } diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 56abdfd27b1..a5a8d9b17da 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -467,7 +467,6 @@ void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertn float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum) RET_ZERO void ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup) RET_NONE void ED_vgroup_clear(struct Object *ob) RET_NONE -bool ED_vgroup_object_is_edit_mode(struct Object *ob) RET_ZERO int ED_mesh_mirror_topo_table(struct Object *ob, char mode) RET_ZERO int ED_mesh_mirror_spatial_table(struct Object *ob, struct BMEditMesh *em, const float co[3], char mode) RET_ZERO |