Fix #113325: Zero-sized curve leads to OptiX error #115044

Merged
Patrick Mours merged 1 commits from pmoursnv/blender:fix_113325 into main 2023-11-17 17:21:08 +01:00

1 Commits

Author SHA1 Message Date
Patrick Mours 970a5829f0 Fix #113325: Zero-sized curve leads to OptiX error
Empty hair geometry in Cycles may still report having one curve, even when
there are no actual segments in that curve. This caused an attempt to build
an acceleration structure with zero primitives, which due to other setup
OptiX rejected with an error. Fix that by checking the number of segments
rather than the number of curves in the hair geometry, since the former will
always be zero for empty geometry.
2023-11-17 14:46:03 +01:00