GeometryNodes: Add Corners of Edge Node #107967
@ -424,9 +424,9 @@ class NODE_MT_geometry_node_mesh_topology(Menu):
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeCornersOfEdge")
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeCornersOfFace")
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeCornersOfVertex")
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeCornersOfEdge")
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeEdgesOfCorner")
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeEdgesOfVertex")
|
||||
node_add_menu.add_node_type(layout, "GeometryNodeFaceOfCorner")
|
||||
|
@ -1281,9 +1281,9 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, i
|
||||
#define GEO_NODE_CURVE_TOPOLOGY_CURVE_OF_POINT 1178
|
||||
#define GEO_NODE_CURVE_TOPOLOGY_POINTS_OF_CURVE 1179
|
||||
#define GEO_NODE_MESH_TOPOLOGY_OFFSET_CORNER_IN_FACE 1180
|
||||
#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_EDGE 2103
|
||||
#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_FACE 1181
|
||||
#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_VERTEX 1182
|
||||
#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_EDGE 2103
|
||||
#define GEO_NODE_MESH_TOPOLOGY_EDGES_OF_CORNER 1183
|
||||
#define GEO_NODE_MESH_TOPOLOGY_EDGES_OF_VERTEX 1184
|
||||
#define GEO_NODE_MESH_TOPOLOGY_FACE_OF_CORNER 1185
|
||||
|
@ -375,9 +375,9 @@ DefNode(GeometryNode, GEO_NODE_MESH_TO_CURVE, 0, "MESH_TO_CURVE", MeshToCurve, "
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TO_POINTS, def_geo_mesh_to_points, "MESH_TO_POINTS", MeshToPoints, "Mesh to Points", "Generate a point cloud from a mesh's vertices")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TO_SDF_VOLUME, def_geo_mesh_to_sdf_volume, "MESH_TO_SDF_VOLUME", MeshToSDFVolume, "Mesh to SDF Volume", "Create an SDF volume with the shape of the input mesh's surface")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TO_VOLUME, def_geo_mesh_to_volume, "MESH_TO_VOLUME", MeshToVolume, "Mesh to Volume", "Create a fog volume with the shape of the input mesh's surface")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_EDGE, 0, "CORNERS_OF_EDGE", CornersOfEdge, "Corners of Edge", "Retrieve face corners connected to edges")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_FACE, 0, "CORNERS_OF_FACE", CornersOfFace, "Corners of Face", "Retrieve corners that make up a face")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_VERTEX, 0, "CORNERS_OF_VERTEX", CornersOfVertex, "Corners of Vertex", "Retrieve face corners connected to vertices")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_EDGE, 0, "CORNERS_OF_EDGE", CornersOfEdge, "Corners of Edge", "Retrieve face corners connected to edges")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_EDGES_OF_CORNER, 0, "EDGES_OF_CORNER", EdgesOfCorner, "Edges of Corner", "Retrieve the edges on both sides of a face corner")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_EDGES_OF_VERTEX, 0, "EDGES_OF_VERTEX", EdgesOfVertex, "Edges of Vertex", "Retrieve the edges connected to each vertex")
|
||||
DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_FACE_OF_CORNER, 0, "FACE_OF_CORNER", FaceOfCorner, "Face of Corner", "Retrieve the face each face corner is part of")
|
||||
|
@ -130,9 +130,9 @@ set(SRC
|
||||
nodes/node_geo_mesh_to_points.cc
|
||||
nodes/node_geo_mesh_to_sdf_volume.cc
|
||||
nodes/node_geo_mesh_to_volume.cc
|
||||
nodes/node_geo_mesh_topology_corners_of_edge.cc
|
||||
nodes/node_geo_mesh_topology_corners_of_face.cc
|
||||
nodes/node_geo_mesh_topology_corners_of_vertex.cc
|
||||
nodes/node_geo_mesh_topology_corners_of_edge.cc
|
||||
nodes/node_geo_mesh_topology_edges_of_corner.cc
|
||||
nodes/node_geo_mesh_topology_edges_of_vertex.cc
|
||||
nodes/node_geo_mesh_topology_face_of_corner.cc
|
||||
|
@ -114,9 +114,9 @@ void register_geometry_nodes()
|
||||
register_node_type_geo_mesh_to_points();
|
||||
register_node_type_geo_mesh_to_sdf_volume();
|
||||
register_node_type_geo_mesh_to_volume();
|
||||
register_node_type_geo_mesh_topology_corners_of_edge();
|
||||
register_node_type_geo_mesh_topology_corners_of_face();
|
||||
register_node_type_geo_mesh_topology_corners_of_vertex();
|
||||
register_node_type_geo_mesh_topology_corners_of_edge();
|
||||
register_node_type_geo_mesh_topology_edges_of_corner();
|
||||
register_node_type_geo_mesh_topology_edges_of_vertex();
|
||||
register_node_type_geo_mesh_topology_face_of_corner();
|
||||
|
@ -111,9 +111,9 @@ void register_node_type_geo_mesh_to_curve();
|
||||
void register_node_type_geo_mesh_to_points();
|
||||
void register_node_type_geo_mesh_to_sdf_volume();
|
||||
void register_node_type_geo_mesh_to_volume();
|
||||
void register_node_type_geo_mesh_topology_corners_of_edge();
|
||||
void register_node_type_geo_mesh_topology_corners_of_face();
|
||||
void register_node_type_geo_mesh_topology_corners_of_vertex();
|
||||
void register_node_type_geo_mesh_topology_corners_of_edge();
|
||||
void register_node_type_geo_mesh_topology_edges_of_corner();
|
||||
void register_node_type_geo_mesh_topology_edges_of_vertex();
|
||||
void register_node_type_geo_mesh_topology_face_of_corner();
|
||||
|
@ -138,20 +138,6 @@ class CornersOfEdgeInput final : public bke::MeshFieldInput {
|
||||
sort_weight_.node().for_each_field_input_recursive(fn);
|
||||
}
|
||||
|
||||
uint64_t hash() const final
|
||||
{
|
||||
return 125394805703121;
|
||||
}
|
||||
|
||||
bool is_equal_to(const fn::FieldNode &other) const final
|
||||
{
|
||||
if (const auto *typed = dynamic_cast<const CornersOfEdgeInput *>(&other)) {
|
||||
return typed->edge_index_ == edge_index_ && typed->sort_index_ == sort_index_ &&
|
||||
typed->sort_weight_ == sort_weight_;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::optional<eAttrDomain> preferred_domain(const Mesh & /*mesh*/) const final
|
||||
{
|
||||
return ATTR_DOMAIN_EDGE;
|
||||
@ -180,19 +166,6 @@ class CornersOfEdgeCountInput final : public bke::MeshFieldInput {
|
||||
return VArray<int>::ForContainer(std::move(counts));
|
||||
}
|
||||
|
||||
uint64_t hash() const final
|
||||
{
|
||||
return 253098745374645;
|
||||
}
|
||||
|
||||
bool is_equal_to(const fn::FieldNode &other) const final
|
||||
{
|
||||
if (dynamic_cast<const CornersOfEdgeCountInput *>(&other)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::optional<eAttrDomain> preferred_domain(const Mesh & /*mesh*/) const final
|
||||
{
|
||||
return ATTR_DOMAIN_EDGE;
|
||||
|
Loading…
Reference in New Issue
Block a user