move api functions from r57909 into BKE.

This commit is contained in:
2013-07-01 20:27:03 +00:00
parent 11145c7c22
commit 3d845b4a17
5 changed files with 33 additions and 37 deletions

View File

@@ -79,6 +79,8 @@ void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target);
void BKE_object_unlink(struct Object *ob);
bool BKE_object_exists_check(struct Object *obtest);
bool BKE_object_is_in_editmode(struct Object *ob);
bool BKE_object_is_in_editmode_vgroup(struct Object *ob);
bool BKE_object_is_in_wpaint_select_vert(struct Object *ob);
struct Object *BKE_object_add_only_object(struct Main *bmain, int type, const char *name);
struct Object *BKE_object_add(struct Main *bmain, struct Scene *scene, int type);

View File

@@ -764,6 +764,24 @@ bool BKE_object_is_in_editmode(Object *ob)
return false;
}
bool BKE_object_is_in_editmode_vgroup(Object *ob)
{
return (OB_TYPE_SUPPORT_VGROUP(ob->type) &&
BKE_object_is_in_editmode(ob));
}
bool BKE_object_is_in_wpaint_select_vert(Object *ob)
{
if (ob->type == OB_MESH) {
Mesh *me = ob->data;
return ( (ob->mode & OB_MODE_WEIGHT_PAINT) &&
(me->edit_btmesh == NULL) &&
(ME_EDIT_PAINT_SEL_MODE(me) == SCE_SELECT_VERTEX) );
}
return false;
}
bool BKE_object_exists_check(Object *obtest)
{
Object *ob;