Differential D16858 Diff 58866 source/blender/nodes/geometry/nodes/node_geo_mesh_topology_face_of_corner.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_topology_face_of_corner.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_mesh_mapping.h" | #include "BKE_mesh_mapping.h" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes::node_geo_mesh_topology_face_of_corner_cc { | namespace blender::nodes::node_geo_mesh_topology_face_of_corner_cc { | ||||
| static void node_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Int>(N_("Corner Index")) | b.add_input<decl::Int>(N_("Corner Index")) | ||||
| .implicit_field(implicit_field_inputs::index) | .implicit_field(implicit_field_inputs::index) | ||||
| .description( | .description( | ||||
| N_("The corner to retrieve data from. Defaults to the corner from the context")); | N_("The corner to retrieve data from. Defaults to the corner from the context")); | ||||
| b.add_output<decl::Int>(N_("Face Index")) | b.add_output<decl::Int>(N_("Face Index")) | ||||
| .dependent_field() | .field_source_reference_all() | ||||
| .description(N_("The index of the face the corner is a part of")); | .description(N_("The index of the face the corner is a part of")); | ||||
| b.add_output<decl::Int>(N_("Index in Face")) | b.add_output<decl::Int>(N_("Index in Face")) | ||||
| .dependent_field() | .field_source_reference_all() | ||||
| .description(N_("The index of the corner starting from the first corner in the face")); | .description(N_("The index of the corner starting from the first corner in the face")); | ||||
| } | } | ||||
| class CornerFaceIndexInput final : public bke::MeshFieldInput { | class CornerFaceIndexInput final : public bke::MeshFieldInput { | ||||
| public: | public: | ||||
| CornerFaceIndexInput() : bke::MeshFieldInput(CPPType::get<int>(), "Corner Face Index") | CornerFaceIndexInput() : bke::MeshFieldInput(CPPType::get<int>(), "Corner Face Index") | ||||
| { | { | ||||
| category_ = Category::Generated; | category_ = Category::Generated; | ||||
| ▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines | |||||