move api functions from r57909 into BKE.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user