diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2021-03-14 18:39:56 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2021-03-14 20:20:03 +0300 |
commit | a01fb22f28df21acab103a5216591355b1dc85d7 (patch) | |
tree | a84f714d5f46328a1787a5a4942e94177c7300ad /source/blender/blenkernel/BKE_mesh_boolean_convert.h | |
parent | 8936550269333297f6c083c92c90f11660b22e33 (diff) |
Fix T86427 Exact solver does not apply target material.
I had done some experiments to see what Fast boolean did for material
mapping and thought it just used the same slot in the target as the
slot in the source. The truth is more complicated: if the target material
exists in any slot of the destination, we need to remap to whatever
slot has the matching material. I fixed Exact Boolean to do this.
Since the materials may be in the object, this means that BKE_mesh_boolean
had to get another argument, the remapping arrays.
I will note that the current behavior of Fast, and now Exact, is not ideal.
Ideally, if the source material does not exist in the target, a new material
slot should be created in the target and the source material copied there
(and incrementing the material's reference count). Maybe a future project,
but for now, I want the behavior of Exact to match that of Fast.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh_boolean_convert.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh_boolean_convert.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_boolean_convert.h b/source/blender/blenkernel/BKE_mesh_boolean_convert.h index a87f2609e46..1bb1d9ea8dc 100644 --- a/source/blender/blenkernel/BKE_mesh_boolean_convert.h +++ b/source/blender/blenkernel/BKE_mesh_boolean_convert.h @@ -29,6 +29,7 @@ extern "C" { Mesh *BKE_mesh_boolean(const Mesh **meshes, const float (*obmats[])[4][4], + const short **material_remaps, const int meshes_len, const bool use_self, const bool hole_tolerant, |