3D Paint Brush: Disable Node Splitting
Node splitting seems to be broken and when triggered it crashes blender. The cause for this is that SplitNodePair stores a full node and uses assign operators, that can free unallocated space. Although node splitting is important for performance point of view, we should reevaluate how we want node splitting to work. This PR only disables it, so it won't crash when used. Pull Request: https://projects.blender.org/blender/blender/pulls/115928
This commit is contained in:
@@ -30,6 +30,15 @@
|
||||
|
||||
namespace blender::bke::pbvh::pixels {
|
||||
|
||||
/**
|
||||
* Splitting of pixel nodes has been disabled as it was designed for C. When migrating to CPP
|
||||
* the splitting data structure will corrupt memory.
|
||||
*
|
||||
* TODO(jbakker): This should be fixed or replaced with a different solution. If we go into a
|
||||
* direction of compute shaders this might not be needed anymore.
|
||||
*/
|
||||
constexpr bool PBVH_PIXELS_SPLIT_NODES_ENABLED = false;
|
||||
|
||||
/**
|
||||
* Calculate the delta of two neighbor UV coordinates in the given image buffer.
|
||||
*/
|
||||
@@ -805,7 +814,7 @@ using namespace blender::bke::pbvh::pixels;
|
||||
|
||||
void BKE_pbvh_build_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image_user)
|
||||
{
|
||||
if (update_pixels(pbvh, mesh, image, image_user)) {
|
||||
if (update_pixels(pbvh, mesh, image, image_user) && PBVH_PIXELS_SPLIT_NODES_ENABLED) {
|
||||
split_pixel_nodes(pbvh, mesh, image, image_user);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user