Commit: f25377ceb7f589072d861bfca6c6006d321ee009 Author: Joseph Eagar Date: Thu Jan 12 19:28:57 2023 -0800 Branches: temp-pbvh-texpaint-automasking https://developer.blender.org/rBf25377ceb7f589072d861bfca6c6006d321ee009
Merge branch 'master' into temp-pbvh-texpaint-automasking =================================================================== =================================================================== diff --cc source/blender/blenkernel/BKE_pbvh.h index af6442530de,0e7eb957fd9..03a9eb2c7b1 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@@ -587,14 -583,13 +583,15 @@@ typedef struct PBVHVertexIter int gridsize; /* mesh */ - struct MVert *mverts; + float (*vert_positions)[3]; float (*vert_normals)[3]; + const bool *hide_vert; int totvert; + int unique_vert_len; const int *vert_indices; float *vmask; + bool is_mesh; /* bmesh */ struct GSetIterator bm_unique_verts; diff --cc source/blender/blenkernel/intern/pbvh.c index 03463ca9a5c,2a8683ecaaa..d88db32e60d --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@@ -3366,11 -3348,9 +3348,12 @@@ void pbvh_vertex_iter_init(PBVH *pbvh, else { vi->totvert = uniq_verts; } + + vi->unique_vert_len = uniq_verts; + vi->vert_indices = vert_indices; - vi->mverts = verts; + vi->vert_positions = pbvh->vert_positions; + vi->is_mesh = pbvh->vert_positions != NULL; if (pbvh->header.type == PBVH_BMESH) { BLI_gsetIterator_init(&vi->bm_unique_verts, node->bm_unique_verts); diff --cc source/blender/editors/sculpt_paint/sculpt_automasking.cc index 79c5a8b5f27,67c3e4bfd74..1982cdc9727 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc @@@ -12,10 -12,9 +12,10 @@@ #include "BLI_hash.h" #include "BLI_index_range.hh" #include "BLI_math.h" - #include "BLI_math_vec_types.hh" + #include "BLI_math_vector_types.hh" #include "BLI_set.hh" #include "BLI_task.h" +#include "BLI_task.hh" #include "BLI_vector.hh" #include "DNA_brush_types.h" diff --cc source/blender/editors/sculpt_paint/sculpt_paint_image.cc index 16cb2ed3e0f,75c84c48f77..29be026c300 --- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc @@@ -367,16 -328,16 +370,16 @@@ static void do_paint_pixels(void *__res PBVHData &pbvh_data = BKE_pbvh_pixels_data_get(*pbvh); NodeData &node_data = BKE_pbvh_pixels_node_data_get(*node); const int thread_id = BLI_task_parallel_thread_id(tls); - MVert *mvert = SCULPT_mesh_deformed_mverts_get(ss); + const float(*positions)[3] = SCULPT_mesh_deformed_positions_get(ss); std::vector<bool> brush_test = init_uv_primitives_brush_test( - ss, pbvh_data.geom_primitives, node_data.uv_primitives, mvert); + ss, pbvh_data.geom_primitives, node_data.uv_primitives, positions); - PaintingKernel<ImageBufferFloat4> kernel_float4(ss, brush, thread_id, mvert); - PaintingKernel<ImageBufferByte4> kernel_byte4(ss, brush, thread_id, mvert); + PaintingKernel<ImageBufferFloat4> kernel_float4(ss, brush, thread_id, positions); + PaintingKernel<ImageBufferByte4> kernel_byte4(ss, brush, thread_id, positions); - AutomaskingNodeData automask_data; - SCULPT_automasking_node_begin(ob, ss, ss->cache->automasking, &automask_data, data->nodes[n]); + AutomaskingNodeData automask_data = {0}; + automask_data.have_orig_data = false; ImageUser image_user = *data->image_data.image_user; bool pixels_updated = false; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs