From 500045a0d3b57f4333527cb710f05f666acaf904 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 8 Apr 2021 14:32:41 -0500 Subject: Geometry Nodes: Support volumes in the bounding box node Where possible, nodes in the "Geometry" category should support all geometry component types. This adds support for volumes in the recently added bounding box node, based on functions added in the previous two commits. Differential Revision: https://developer.blender.org/D10906 --- source/blender/blenkernel/intern/geometry_set.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc index fd86f4e550c..3e457e48076 100644 --- a/source/blender/blenkernel/intern/geometry_set.cc +++ b/source/blender/blenkernel/intern/geometry_set.cc @@ -178,6 +178,10 @@ void GeometrySet::compute_boundbox_without_instances(float3 *r_min, float3 *r_ma if (mesh != nullptr) { BKE_mesh_wrapper_minmax(mesh, *r_min, *r_max); } + const Volume *volume = this->get_volume_for_read(); + if (volume != nullptr) { + BKE_volume_min_max(volume, *r_min, *r_max); + } } std::ostream &operator<<(std::ostream &stream, const GeometrySet &geometry_set) -- cgit v1.2.3