diff options
author | Hans Goudey <h.goudey@me.com> | 2021-04-08 22:32:41 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-04-08 22:32:41 +0300 |
commit | 500045a0d3b57f4333527cb710f05f666acaf904 (patch) | |
tree | 700f0bb619c8bd9274ff380692e9343a154b4b5c /source/blender/blenkernel/intern/geometry_set.cc | |
parent | 57fe650b76f85538cad961b738ce6d3e4682404f (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_set.cc')
-rw-r--r-- | source/blender/blenkernel/intern/geometry_set.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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) |