Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/edit_curve_mode.c
| Show All 22 Lines | |||||
| * \ingroup draw | * \ingroup draw | ||||
| */ | */ | ||||
| #include "DRW_engine.h" | #include "DRW_engine.h" | ||||
| #include "DRW_render.h" | #include "DRW_render.h" | ||||
| #include "DNA_curve_types.h" | #include "DNA_curve_types.h" | ||||
| #include "BKE_object.h" | |||||
| /* If builtin shaders are needed */ | /* If builtin shaders are needed */ | ||||
| #include "GPU_shader.h" | #include "GPU_shader.h" | ||||
| #include "GPU_batch.h" | #include "GPU_batch.h" | ||||
| #include "draw_common.h" | #include "draw_common.h" | ||||
| #include "draw_mode_engines.h" | #include "draw_mode_engines.h" | ||||
| ▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | static void EDIT_CURVE_cache_populate(void *vedata, Object *ob) | ||||
| EDIT_CURVE_PassList *psl = ((EDIT_CURVE_Data *)vedata)->psl; | EDIT_CURVE_PassList *psl = ((EDIT_CURVE_Data *)vedata)->psl; | ||||
| EDIT_CURVE_StorageList *stl = ((EDIT_CURVE_Data *)vedata)->stl; | EDIT_CURVE_StorageList *stl = ((EDIT_CURVE_Data *)vedata)->stl; | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| const Scene *scene = draw_ctx->scene; | const Scene *scene = draw_ctx->scene; | ||||
| UNUSED_VARS(psl, stl); | UNUSED_VARS(psl, stl); | ||||
| if (ob->type == OB_CURVE) { | if (ob->type == OB_CURVE) { | ||||
| 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 | |||||
| { | |||||
| Curve *cu = ob->data; | Curve *cu = ob->data; | ||||
| /* Get geometry cache */ | /* Get geometry cache */ | ||||
| struct Gwn_Batch *geom; | struct Gwn_Batch *geom; | ||||
| geom = DRW_cache_curve_edge_wire_get(ob); | geom = DRW_cache_curve_edge_wire_get(ob); | ||||
| DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); | DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); | ||||
| if ((cu->flag & CU_3D) && (cu->drawflag & CU_HIDE_NORMALS) == 0) { | if ((cu->flag & CU_3D) && (cu->drawflag & CU_HIDE_NORMALS) == 0) { | ||||
| ▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines | |||||