Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
| Show All 23 Lines | |||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_mesh_primitive_cone_declare(NodeDeclarationBuilder &b) | static void geo_node_mesh_primitive_cone_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Int>("Vertices").default_value(32).min(3).max(512); | b.add_input<decl::Int>(N_("Vertices")).default_value(32).min(3).max(512); | ||||
| b.add_input<decl::Int>("Side Segments").default_value(1).min(1).max(512); | b.add_input<decl::Int>(N_("Side Segments")).default_value(1).min(1).max(512); | ||||
| b.add_input<decl::Int>("Fill Segments").default_value(1).min(1).max(512); | b.add_input<decl::Int>(N_("Fill Segments")).default_value(1).min(1).max(512); | ||||
| b.add_input<decl::Float>("Radius Top").min(0.0f).subtype(PROP_DISTANCE); | b.add_input<decl::Float>(N_("Radius Top")).min(0.0f).subtype(PROP_DISTANCE); | ||||
| b.add_input<decl::Float>("Radius Bottom").default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE); | b.add_input<decl::Float>(N_("Radius Bottom")) | ||||
| b.add_input<decl::Float>("Depth").default_value(2.0f).min(0.0f).subtype(PROP_DISTANCE); | .default_value(1.0f) | ||||
| b.add_output<decl::Geometry>("Mesh"); | .min(0.0f) | ||||
| .subtype(PROP_DISTANCE); | |||||
| b.add_input<decl::Float>(N_("Depth")).default_value(2.0f).min(0.0f).subtype(PROP_DISTANCE); | |||||
| b.add_output<decl::Geometry>(N_("Mesh")); | |||||
| } | } | ||||
| static void geo_node_mesh_primitive_cone_init(bNodeTree *UNUSED(ntree), bNode *node) | static void geo_node_mesh_primitive_cone_init(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeGeometryMeshCone *node_storage = (NodeGeometryMeshCone *)MEM_callocN( | NodeGeometryMeshCone *node_storage = (NodeGeometryMeshCone *)MEM_callocN( | ||||
| sizeof(NodeGeometryMeshCone), __func__); | sizeof(NodeGeometryMeshCone), __func__); | ||||
| node_storage->fill_type = GEO_NODE_MESH_CIRCLE_FILL_NGON; | node_storage->fill_type = GEO_NODE_MESH_CIRCLE_FILL_NGON; | ||||
| ▲ Show 20 Lines • Show All 712 Lines • Show Last 20 Lines | |||||