Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.c
| Show First 20 Lines • Show All 714 Lines • ▼ Show 20 Lines | bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode) | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode) | bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode) | ||||
| { | { | ||||
| return ((ob->mode == object_mode) || (ob->mode & object_mode) != 0); | return ((ob->mode == object_mode) || (ob->mode & object_mode) != 0); | ||||
| } | } | ||||
| bool BKE_object_editmode_exit(struct Main *bmain, struct Object *ob) | |||||
| { | |||||
| if (ob->mode & OB_MODE_EDIT) { | |||||
| if (ob->type == OB_MESH) { | |||||
| Mesh *me = ob->data; | |||||
| if (me->edit_mesh) { | |||||
| BKE_editmesh_load(bmain, me->edit_mesh); | |||||
| BKE_editmesh_free(me->edit_mesh); | |||||
| MEM_freeN(me->edit_mesh); | |||||
| me->edit_mesh = NULL; | |||||
| ob->mode &= ~OB_MODE_EDIT; | |||||
| return true; | |||||
| } | |||||
| } | |||||
| else { | |||||
| /* TODO */ | |||||
| } | |||||
| } | |||||
| return false; | |||||
| } | |||||
| /** | /** | ||||
| * Return which parts of the object are visible, as evaluated by depsgraph | * Return which parts of the object are visible, as evaluated by depsgraph | ||||
| */ | */ | ||||
| int BKE_object_visibility(const Object *ob, const int dag_eval_mode) | int BKE_object_visibility(const Object *ob, const int dag_eval_mode) | ||||
| { | { | ||||
| if ((ob->base_flag & BASE_VISIBLE_DEPSGRAPH) == 0) { | if ((ob->base_flag & BASE_VISIBLE_DEPSGRAPH) == 0) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 3,758 Lines • Show Last 20 Lines | |||||