From 1c7d7c915063c7f7c6c960aa843a33f3716debbe Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Wed, 29 Dec 2021 12:27:24 -0300 Subject: Fix T94113: Local view + Geometry Nodes is broken for instances `GeometrySet::compute_boundbox_without_instances` may not initialize min max in some cases such as meshes without vertices. This can result in a Bounding Box with impossible dimensions (min=FLT_MAX, max=-FLT_MAX). So repeat the same solution seen in `BKE_object_boundbox_calc_from_mesh` and set boundbox values to zero. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13664 --- source/blender/blenkernel/BKE_geometry_set.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_geometry_set.hh') diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 834d943d9ce..8e36bda84ce 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -372,7 +372,7 @@ struct GeometrySet { */ blender::Vector get_components_for_read() const; - void compute_boundbox_without_instances(blender::float3 *r_min, blender::float3 *r_max) const; + bool compute_boundbox_without_instances(blender::float3 *r_min, blender::float3 *r_max) const; friend std::ostream &operator<<(std::ostream &stream, const GeometrySet &geometry_set); -- cgit v1.2.3