Commit: 1e5d5085675afd1c3d6e0191e668449217f733ed
Author: Bastien Montagne
Date:   Mon Nov 17 20:33:25 2014 +0100
Branches: master
https://developer.blender.org/rB1e5d5085675afd1c3d6e0191e668449217f733ed

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...

===================================================================

M       source/blender/editors/include/ED_mesh.h
M       source/blender/editors/object/object_vgroup.c
M       source/blender/makesrna/intern/rna_object.c
M       source/blenderplayer/bad_level_call_stubs/stubs.c

===================================================================

diff --git a/source/blender/editors/include/ED_mesh.h 
b/source/blender/editors/include/ED_mesh.h
index 2b4fa1b..63362b0 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 b7f121d..672dcb4 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 8ebeeaf..e6714bb 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 56abdfd..a5a8d9b 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

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to