Commit: 0385e2f1f90ff10c75773cc22125292a82cddaa6 Author: Jeroen Bakker Date: Wed Apr 20 13:42:51 2022 +0200 Branches: master https://developer.blender.org/rB0385e2f1f90ff10c75773cc22125292a82cddaa6
PBVH: Pass Mesh to extract internals. More mesh data is required when extracting the UV seams. This is an API change for to support this future enhancement. =================================================================== M source/blender/blenkernel/BKE_pbvh.h M source/blender/blenkernel/intern/pbvh_pixels.cc M source/blender/editors/sculpt_paint/sculpt.c =================================================================== diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index bb918fcfdcb..978e52d8003 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -143,8 +143,7 @@ void BKE_pbvh_build_bmesh(PBVH *pbvh, int cd_face_node_offset); void BKE_pbvh_build_pixels(PBVH *pbvh, - const struct MLoop *mloop, - struct CustomData *ldata, + struct Mesh *mesh, struct Image *image, struct ImageUser *image_user); void BKE_pbvh_free(PBVH *pbvh); diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc index 1c1e9254157..5623cac44ac 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels.cc @@ -275,11 +275,7 @@ static void apply_watertight_check(PBVH *pbvh, Image *image, ImageUser *image_us BKE_image_partial_update_mark_full_update(image); } -static void update_pixels(PBVH *pbvh, - const struct MLoop *mloop, - struct CustomData *ldata, - struct Image *image, - struct ImageUser *image_user) +static void update_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image_user) { Vector<PBVHNode *> nodes_to_update; @@ -287,14 +283,14 @@ static void update_pixels(PBVH *pbvh, return; } - MLoopUV *ldata_uv = static_cast<MLoopUV *>(CustomData_get_layer(ldata, CD_MLOOPUV)); + MLoopUV *ldata_uv = static_cast<MLoopUV *>(CustomData_get_layer(&mesh->ldata, CD_MLOOPUV)); if (ldata_uv == nullptr) { return; } for (PBVHNode *node : nodes_to_update) { NodeData *node_data = static_cast<NodeData *>(node->pixels.node_data); - init_triangles(pbvh, node, node_data, mloop); + init_triangles(pbvh, node, node_data, mesh->mloop); } EncodePixelsUserData user_data; @@ -377,13 +373,9 @@ void BKE_pbvh_pixels_mark_image_dirty(PBVHNode &node, Image &image, ImageUser &i extern "C" { using namespace blender::bke::pbvh::pixels; -void BKE_pbvh_build_pixels(PBVH *pbvh, - const struct MLoop *mloop, - struct CustomData *ldata, - struct Image *image, - struct ImageUser *image_user) +void BKE_pbvh_build_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image_user) { - update_pixels(pbvh, mloop, ldata, image, image_user); + update_pixels(pbvh, mesh, image, image_user); } void pbvh_pixels_free(PBVHNode *node) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 8807032bf69..d576d529ce5 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2780,7 +2780,7 @@ static void sculpt_pbvh_update_pixels(PaintModeSettings *paint_mode_settings, return; } - BKE_pbvh_build_pixels(ss->pbvh, mesh->mloop, &mesh->ldata, image, image_user); + BKE_pbvh_build_pixels(ss->pbvh, mesh, image, image_user); } /** \} */ _______________________________________________ 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