From e12767a0352a9e113892b4a07c6c8446d3ff361f Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 29 Sep 2020 12:39:41 +0200 Subject: Volumes: support selection and outlines in viewport Previously, one could only select a volume object in the outliner or by clicking on the object origin. This patch allows you to click on the actual volume. Furthermore, the generated (invisible) mesh that is used for selection is also used to draw an outline for the volume object now. Reviewers: brecht Differential Revision: https://developer.blender.org/D9022 --- source/blender/draw/intern/draw_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/draw/intern/draw_cache.c') diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 0fbc9e2ed82..52e7e91a995 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -3279,6 +3279,12 @@ GPUBatch *DRW_cache_volume_face_wireframe_get(Object *ob) return DRW_volume_batch_cache_get_wireframes_face(ob->data); } +GPUBatch *DRW_cache_volume_selection_surface_get(Object *ob) +{ + BLI_assert(ob->type == OB_VOLUME); + return DRW_volume_batch_cache_get_selection_surface(ob->data); +} + /** \} */ /* -------------------------------------------------------------------- */ -- cgit v1.2.3