Differential D13033 Diff 44115 source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.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_cylinder_declare(NodeDeclarationBuilder &b) | static void geo_node_mesh_primitive_cylinder_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Int>("Vertices") | b.add_input<decl::Int>(N_("Vertices")) | ||||
| .default_value(32) | .default_value(32) | ||||
| .min(3) | .min(3) | ||||
| .max(512) | .max(512) | ||||
| .description("The number of vertices around the circumference"); | .description(N_("The number of vertices around the circumference")); | ||||
| b.add_input<decl::Int>("Side Segments") | b.add_input<decl::Int>(N_("Side Segments")) | ||||
| .default_value(1) | .default_value(1) | ||||
| .min(1) | .min(1) | ||||
| .max(512) | .max(512) | ||||
| .description("The number of segments along the side"); | .description(N_("The number of segments along the side")); | ||||
| b.add_input<decl::Int>("Fill Segments") | b.add_input<decl::Int>(N_("Fill Segments")) | ||||
| .default_value(1) | .default_value(1) | ||||
| .min(1) | .min(1) | ||||
| .max(512) | .max(512) | ||||
| .description("The number of concentric segments of the fill"); | .description(N_("The number of concentric segments of the fill")); | ||||
| b.add_input<decl::Float>("Radius") | b.add_input<decl::Float>(N_("Radius")) | ||||
| .default_value(1.0f) | .default_value(1.0f) | ||||
| .min(0.0f) | .min(0.0f) | ||||
| .subtype(PROP_DISTANCE) | .subtype(PROP_DISTANCE) | ||||
| .description("The radius of the cylinder"); | .description(N_("The radius of the cylinder")); | ||||
| b.add_input<decl::Float>("Depth") | b.add_input<decl::Float>(N_("Depth")) | ||||
| .default_value(2.0f) | .default_value(2.0f) | ||||
| .min(0.0f) | .min(0.0f) | ||||
| .subtype(PROP_DISTANCE) | .subtype(PROP_DISTANCE) | ||||
| .description("The height of the cylinder on the Z axis"); | .description(N_("The height of the cylinder on the Z axis")); | ||||
| b.add_output<decl::Geometry>("Mesh"); | b.add_output<decl::Geometry>(N_("Mesh")); | ||||
| } | } | ||||
| static void geo_node_mesh_primitive_cylinder_layout(uiLayout *layout, | static void geo_node_mesh_primitive_cylinder_layout(uiLayout *layout, | ||||
| bContext *UNUSED(C), | bContext *UNUSED(C), | ||||
| PointerRNA *ptr) | PointerRNA *ptr) | ||||
| { | { | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetPropDecorate(layout, false); | uiLayoutSetPropDecorate(layout, false); | ||||
| ▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines | |||||