3D Paint Brush: Disable Node Splitting #115928

Merged
Jeroen Bakker merged 1 commits from Jeroen-Bakker/blender:3dbrush/disable-node-splitting into main 2023-12-08 11:15:15 +01:00
1 changed files with 10 additions and 1 deletions

View File

@ -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);
}
}