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/blenkernel/BKE_volume_render.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/blenkernel/BKE_volume_render.h') diff --git a/source/blender/blenkernel/BKE_volume_render.h b/source/blender/blenkernel/BKE_volume_render.h index a42f24a5312..593f296135c 100644 --- a/source/blender/blenkernel/BKE_volume_render.h +++ b/source/blender/blenkernel/BKE_volume_render.h @@ -58,6 +58,16 @@ void BKE_volume_grid_wireframe(const struct Volume *volume, BKE_volume_wireframe_cb cb, void *cb_userdata); +/* Selection Surface */ + +typedef void (*BKE_volume_selection_surface_cb)( + void *userdata, float (*verts)[3], int (*tris)[3], int totvert, int tottris); + +void BKE_volume_grid_selection_surface(const struct Volume *volume, + struct VolumeGrid *volume_grid, + BKE_volume_selection_surface_cb cb, + void *cb_userdata); + /* Render */ float BKE_volume_density_scale(const struct Volume *volume, const float matrix[4][4]); -- cgit v1.2.3