[Bf-blender-cvs] [78c0e7c0152] temp-geometry-nodes-fields-prototype: Fix: Extrude and Move Edge out selection

Fabian Schempp noreply at git.blender.org
Tue Aug 10 10:45:39 CEST 2021


Commit: 78c0e7c0152be5141d69078b4c58eabf23599730
Author: Fabian Schempp
Date:   Tue Aug 10 10:45:23 2021 +0200
Branches: temp-geometry-nodes-fields-prototype
https://developer.blender.org/rB78c0e7c0152be5141d69078b4c58eabf23599730

Fix: Extrude and Move Edge out selection

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

M	source/blender/blenkernel/BKE_node.h
M	source/blender/nodes/geometry/nodes/node_geo_extrude_and_move.cc

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

diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 3cbc80d49a3..03c2efda9c9 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -1484,7 +1484,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree,
 #define GEO_NODE_ATTRIBUTE_EXTRACT 1079
 #define GEO_NODE_NORMAL 1080
 #define GEO_NODE_CURVE_PARAMETER 1081
-#define GEO_NODE_EXTRUDE_AND_MOVE 1079
+#define GEO_NODE_EXTRUDE_AND_MOVE 1082
 
 /** \} */
 
diff --git a/source/blender/nodes/geometry/nodes/node_geo_extrude_and_move.cc b/source/blender/nodes/geometry/nodes/node_geo_extrude_and_move.cc
index 541b6e2eb59..d64427bd5a8 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_extrude_and_move.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_extrude_and_move.cc
@@ -120,7 +120,12 @@ static Mesh *extrude_edges(const Mesh *mesh,
   BM_select_edges(bm, selection.data());
 
   BMOperator extrude_op;
-  BMO_op_initf(bm, &extrude_op, 0, "extrude_edge_only edges=%he", BM_ELEM_SELECT);
+  BMO_op_initf(bm,
+               &extrude_op,
+               0,
+               "extrude_edge_only edges=%he use_select_history=%b",
+               BM_ELEM_SELECT,
+               true);
   BMO_op_exec(bm, &extrude_op);
 
   float o[3] = {offset.x, offset.y, offset.z};
@@ -145,8 +150,8 @@ static Mesh *extrude_edges(const Mesh *mesh,
   if (out_selection_id) {
     OutputAttribute_Typed<bool> attribute =
         component.attribute_try_get_anonymous_for_output_only<bool>(*out_selection_id,
-                                                                    ATTR_DOMAIN_EDGE);
-    BM_get_selected_edges(bm, attribute.as_span().data());
+                                                                    ATTR_DOMAIN_POINT);
+    BM_get_selected_vertices(bm, attribute.as_span().data());
     attribute.save();
   }



More information about the Bf-blender-cvs mailing list