Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/edit_lattice_mode.c
| Show All 20 Lines | |||||
| /** \file blender/draw/modes/edit_lattice_mode.c | /** \file blender/draw/modes/edit_lattice_mode.c | ||||
| * \ingroup draw | * \ingroup draw | ||||
| */ | */ | ||||
| #include "DRW_engine.h" | #include "DRW_engine.h" | ||||
| #include "DRW_render.h" | #include "DRW_render.h" | ||||
| #include "BKE_object.h" | |||||
| /* If builtin shaders are needed */ | /* If builtin shaders are needed */ | ||||
| #include "GPU_shader.h" | #include "GPU_shader.h" | ||||
| #include "draw_common.h" | #include "draw_common.h" | ||||
| #include "draw_mode_engines.h" | #include "draw_mode_engines.h" | ||||
| /* If needed, contains all global/Theme colors | /* If needed, contains all global/Theme colors | ||||
| ▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| EDIT_LATTICE_PassList *psl = ((EDIT_LATTICE_Data *)vedata)->psl; | EDIT_LATTICE_PassList *psl = ((EDIT_LATTICE_Data *)vedata)->psl; | ||||
| EDIT_LATTICE_StorageList *stl = ((EDIT_LATTICE_Data *)vedata)->stl; | EDIT_LATTICE_StorageList *stl = ((EDIT_LATTICE_Data *)vedata)->stl; | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| UNUSED_VARS(psl); | UNUSED_VARS(psl); | ||||
| if (ob->type == OB_LATTICE) { | if (ob->type == OB_LATTICE) { | ||||
| if (ob == draw_ctx->object_edit) { | #if 0 | ||||
| if (ob == draw_ctx->object_edit) | |||||
| #else | |||||
| if ((ob == draw_ctx->object_edit) || BKE_object_is_in_editmode_and_selected(ob)) | |||||
| #endif | |||||
| { | |||||
| /* Get geometry cache */ | /* Get geometry cache */ | ||||
| struct Gwn_Batch *geom; | struct Gwn_Batch *geom; | ||||
| geom = DRW_cache_lattice_wire_get(ob, true); | geom = DRW_cache_lattice_wire_get(ob, true); | ||||
| DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); | DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); | ||||
| geom = DRW_cache_lattice_vert_overlay_get(ob); | geom = DRW_cache_lattice_vert_overlay_get(ob); | ||||
| DRW_shgroup_call_add(stl->g_data->vert_shgrp, geom, ob->obmat); | DRW_shgroup_call_add(stl->g_data->vert_shgrp, geom, ob->obmat); | ||||
| ▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines | |||||