Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-29 13:39:41 +0300
committerJacques Lucke <jacques@blender.org>2020-09-29 13:39:41 +0300
commite12767a0352a9e113892b4a07c6c8446d3ff361f (patch)
tree9fe48bb33bda0256e1421f34714bc22668d7b06e /source/blender/draw/intern/draw_cache.c
parent6374644fd11797806ab2e92341e5e7d32e94067b (diff)
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
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r--source/blender/draw/intern/draw_cache.c6
1 files changed, 6 insertions, 0 deletions
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);
+}
+
/** \} */
/* -------------------------------------------------------------------- */