[Bf-blender-cvs] [0649131be76] geometry-nodes: Geometry Nodes: Switch boolean node inputs

Hans Goudey noreply at git.blender.org
Fri Nov 20 21:20:15 CET 2020


Commit: 0649131be763d79af2cc3fc724c6a99910742033
Author: Hans Goudey
Date:   Fri Nov 20 15:20:03 2020 -0500
Branches: geometry-nodes
https://developer.blender.org/rB0649131be763d79af2cc3fc724c6a99910742033

Geometry Nodes: Switch boolean node inputs

This changes the meaning of the order of the two geometry input sockets
to match the existing boolean modifier. The first socket is now the base
mesh and the second socket is the "cutter" geometry.

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_boolean.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_boolean.cc b/source/blender/nodes/geometry/nodes/node_geo_boolean.cc
index 570c754194c..78b2e4e1d7c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_boolean.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_boolean.cc
@@ -61,8 +61,8 @@ static Mesh *mesh_boolean_calc(const Mesh *mesh_a, const Mesh *mesh_b, int boole
   {
     struct BMeshFromMeshParams bmesh_from_mesh_params = {0};
     bmesh_from_mesh_params.calc_face_normal = true;
-    BM_mesh_bm_from_me(bm, mesh_a, &bmesh_from_mesh_params);
     BM_mesh_bm_from_me(bm, mesh_b, &bmesh_from_mesh_params);
+    BM_mesh_bm_from_me(bm, mesh_a, &bmesh_from_mesh_params);
   }
 
   const int looptris_tot = poly_to_tri_count(bm->totface, bm->totloop);
@@ -71,7 +71,7 @@ static Mesh *mesh_boolean_calc(const Mesh *mesh_a, const Mesh *mesh_b, int boole
                             (*)[3])(MEM_malloc_arrayN(looptris_tot, sizeof(*looptris), __func__));
   BM_mesh_calc_tessellation_beauty(bm, looptris, &tottri);
 
-  const int i_faces_end = mesh_a->totpoly;
+  const int i_faces_end = mesh_b->totpoly;
 
   /* We need face normals because of 'BM_face_split_edgenet'
    * we could calculate on the fly too (before calling split). */



More information about the Bf-blender-cvs mailing list