Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | |||||
| * it is in edit mode, when another object with the same mesh is in edit mode. | * it is in edit mode, when another object with the same mesh is in edit mode. | ||||
| * This will not be the case when one of the objects are influenced by modifiers. */ | * This will not be the case when one of the objects are influenced by modifiers. */ | ||||
| bool DRW_object_is_in_edit_mode(const Object *ob) | bool DRW_object_is_in_edit_mode(const Object *ob) | ||||
| { | { | ||||
| if (BKE_object_is_in_editmode(ob)) { | if (BKE_object_is_in_editmode(ob)) { | ||||
| if (ob->type == OB_MESH) { | if (ob->type == OB_MESH) { | ||||
| if ((ob->mode & OB_MODE_EDIT) == 0) { | if ((ob->mode & OB_MODE_EDIT) == 0) { | ||||
| Mesh *me = (Mesh *)ob->data; | Mesh *me = (Mesh *)ob->data; | ||||
| EditMeshData *emd = me->runtime.edit_data; | |||||
| BMEditMesh *embm = me->edit_mesh; | BMEditMesh *embm = me->edit_mesh; | ||||
| /* Sanity check when rendering in multiple windows. */ | /* Sanity check when rendering in multiple windows. */ | ||||
| if (embm && embm->mesh_eval_final == NULL) { | if (embm && emd && emd->eval.mesh_eval_final == NULL) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* Do not draw ob with edit overlay when edit data is present and is modified. */ | /* Do not draw ob with edit overlay when edit data is present and is modified. */ | ||||
| if (embm && embm->mesh_eval_cage && (embm->mesh_eval_cage != embm->mesh_eval_final)) { | if (embm && emd && emd->eval.mesh_eval_cage && | ||||
| (emd->eval.mesh_eval_cage != emd->eval.mesh_eval_final)) { | |||||
| return false; | return false; | ||||
| } | } | ||||
| /* Check if the object that we are drawing is modified. */ | /* Check if the object that we are drawing is modified. */ | ||||
| if (!DEG_is_original_id(&me->id)) { | if (!DEG_is_original_id(&me->id)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,995 Lines • Show Last 20 Lines | |||||