diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index f71a15f511f..a7cdef06268 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -83,6 +83,7 @@ bool BKE_object_is_in_editmode(const struct Object *ob); bool BKE_object_is_in_editmode_vgroup(const struct Object *ob); bool BKE_object_is_in_wpaint_select_vert(const struct Object *ob); bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode); +bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode); typedef enum eObjectVisibilityCheck { OB_VISIBILITY_CHECK_FOR_VIEWPORT, diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 1b6916a2d55..02e0d46e5c1 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -550,6 +550,12 @@ bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode) return false; } +bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode) +{ + return ((ob->mode == object_mode) || + (ob->mode & object_mode) != 0); +} + /** * Return if the object is visible, as evaluated by depsgraph */ |