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:
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_outline.c')
-rw-r--r--source/blender/draw/engines/overlay/overlay_outline.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_outline.c b/source/blender/draw/engines/overlay/overlay_outline.c
index e904066248f..f1467ff9794 100644
--- a/source/blender/draw/engines/overlay/overlay_outline.c
+++ b/source/blender/draw/engines/overlay/overlay_outline.c
@@ -272,6 +272,17 @@ static void OVERLAY_outline_gpencil(OVERLAY_PrivateData *pd, Object *ob)
pd->cfra);
}
+static void OVERLAY_outline_volume(OVERLAY_PrivateData *pd, Object *ob)
+{
+ struct GPUBatch *geom = DRW_cache_volume_selection_surface_get(ob);
+ if (geom == NULL) {
+ return;
+ }
+
+ DRWShadingGroup *shgroup = pd->outlines_grp;
+ DRW_shgroup_call(shgroup, geom, ob);
+}
+
void OVERLAY_outline_cache_populate(OVERLAY_Data *vedata,
Object *ob,
OVERLAY_DupliData *dupli,
@@ -293,6 +304,11 @@ void OVERLAY_outline_cache_populate(OVERLAY_Data *vedata,
return;
}
+ if (ob->type == OB_VOLUME) {
+ OVERLAY_outline_volume(pd, ob);
+ return;
+ }
+
if (ob->type == OB_POINTCLOUD && pd->wireframe_mode) {
/* Looks bad in this case. Could be relaxed if we draw a
* wireframe of some sort in the future. */