Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/drawobject.c
| Show All 22 Lines | |||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BKE_DerivedMesh.h" | #include "BKE_DerivedMesh.h" | ||||
| #include "BKE_global.h" | |||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_global.h" | |||||
| #include "BKE_object.h" | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "GPU_shader.h" | #include "GPU_shader.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "GPU_batch.h" | #include "GPU_batch.h" | ||||
| #include "GPU_state.h" | #include "GPU_state.h" | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | void ED_draw_object_facemap(Depsgraph *depsgraph, | ||||
| /* happens on undo */ | /* happens on undo */ | ||||
| if (ob->type != OB_MESH || !ob->data) { | if (ob->type != OB_MESH || !ob->data) { | ||||
| return; | return; | ||||
| } | } | ||||
| Mesh *me = ob->data; | Mesh *me = ob->data; | ||||
| { | { | ||||
| Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); | Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); | ||||
| if (ob_eval->runtime.mesh_eval) { | Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval); | ||||
| me = ob_eval->runtime.mesh_eval; | if (me_eval != NULL) { | ||||
| me = me_eval; | |||||
| } | } | ||||
| } | } | ||||
| glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); | glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); | ||||
| /* Just to create the data to pass to immediate mode, grr! */ | /* Just to create the data to pass to immediate mode, grr! */ | ||||
| const int *facemap_data = CustomData_get_layer(&me->pdata, CD_FACEMAP); | const int *facemap_data = CustomData_get_layer(&me->pdata, CD_FACEMAP); | ||||
| if (facemap_data) { | if (facemap_data) { | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||