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...
This commit is contained in:
parent
7019c2bb7f
commit
1e5d508567
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue