Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_input_normal.cc
| Show All 19 Lines | |||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_input_normal_declare(NodeDeclarationBuilder &b) | static void geo_node_input_normal_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_output<decl::Vector>("Normal"); | b.add_output<decl::Vector>("Normal").is_field(); | ||||
| } | } | ||||
| static GVArrayPtr mesh_face_normals(const Mesh &mesh, | static GVArrayPtr mesh_face_normals(const Mesh &mesh, | ||||
| const Span<MVert> verts, | const Span<MVert> verts, | ||||
| const Span<MPoly> polys, | const Span<MPoly> polys, | ||||
| const Span<MLoop> loops, | const Span<MLoop> loops, | ||||
| const IndexMask mask) | const IndexMask mask) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines | |||||