Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
| Show All 20 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_mesh_primitive_cube_declare(NodeDeclarationBuilder &b) | static void geo_node_mesh_primitive_cube_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Vector>("Size").default_value(float3(1)).min(0.0f).subtype(PROP_TRANSLATION); | b.add_input<decl::Vector>(N_("Size")) | ||||
| b.add_input<decl::Int>("Vertices X").default_value(2).min(2).max(1000); | .default_value(float3(1)) | ||||
| b.add_input<decl::Int>("Vertices Y").default_value(2).min(2).max(1000); | .min(0.0f) | ||||
| b.add_input<decl::Int>("Vertices Z").default_value(2).min(2).max(1000); | .subtype(PROP_TRANSLATION); | ||||
| b.add_output<decl::Geometry>("Mesh"); | b.add_input<decl::Int>(N_("Vertices X")).default_value(2).min(2).max(1000); | ||||
| b.add_input<decl::Int>(N_("Vertices Y")).default_value(2).min(2).max(1000); | |||||
| b.add_input<decl::Int>(N_("Vertices Z")).default_value(2).min(2).max(1000); | |||||
| b.add_output<decl::Geometry>(N_("Mesh")); | |||||
| } | } | ||||
| struct CuboidConfig { | struct CuboidConfig { | ||||
| float3 size; | float3 size; | ||||
| int verts_x; | int verts_x; | ||||
| int verts_y; | int verts_y; | ||||
| int verts_z; | int verts_z; | ||||
| int edges_x; | int edges_x; | ||||
| ▲ Show 20 Lines • Show All 457 Lines • Show Last 20 Lines | |||||