023277359f99274bf712c4f4b89094b00e1fb925
The recursion depth was checked for equality with a maximum depth, allowing leaves with more primitives if a certain depth was reached. However, a single leaf must always use the same material (including set_smooth), so if a leaf contained multiple materials it was split anyway. This meant that in the next recursion step the depth was larger than the cutoff value and it would go back to recursing until the number of primitives was small enough, ignoring the recursion depth for the rest of the process. In certain edge cases this could lead to a stack overflow. Even with the check changed from 'equality' to 'larger or equal' this could still fail in the pathological case where every primitive has another material. But that can't be helped, and it wouldn't realistically happen either. Differential Revsision: https://developer.blender.org/D17188
…
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
11%
C
6.3%
GLSL
2.2%
CMake
1.3%
Other
1.1%
