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
This commit is contained in:
2020-09-29 12:39:41 +02:00
parent 6374644fd1
commit e12767a035
11 changed files with 450 additions and 153 deletions

View File

@@ -152,6 +152,7 @@ struct GPUBatch **DRW_cache_pointcloud_surface_shaded_get(struct Object *ob,
int DRW_volume_material_count_get(struct Volume *volume);
struct GPUBatch *DRW_volume_batch_cache_get_wireframes_face(struct Volume *volume);
struct GPUBatch *DRW_volume_batch_cache_get_selection_surface(struct Volume *volume);
/* Mesh */
void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,