28 .
description(
"The number of vertices on the top and bottom circles");
33 .
description(
"The number of rectangular segments along each side");
34 auto &fill =
b.add_input<
decl::Int>(
"Fill Segments")
38 .
description(
"The number of concentric rings used to fill the round faces");
43 .description(
"The radius of the cylinder");
48 .description(
"The height of the cylinder");
56 const bNode *node =
b.node_or_null();
57 if (node !=
nullptr) {
78 node->storage = node_storage;
86 const float radius =
params.extract_input<
float>(
"Radius");
87 const float depth =
params.extract_input<
float>(
"Depth");
88 const int circle_segments =
params.extract_input<
int>(
"Vertices");
89 if (circle_segments < 3) {
90 params.error_message_add(NodeWarningType::Info,
TIP_(
"Vertices must be at least 3"));
91 params.set_default_remaining_outputs();
95 const int side_segments =
params.extract_input<
int>(
"Side Segments");
96 if (side_segments < 1) {
97 params.error_message_add(NodeWarningType::Info,
TIP_(
"Side Segments must be at least 1"));
98 params.set_default_remaining_outputs();
103 const int fill_segments = no_fill ? 1 :
params.extract_input<
int>(
"Fill Segments");
104 if (fill_segments < 1) {
105 params.error_message_add(NodeWarningType::Info,
TIP_(
"Fill Segments must be at least 1"));
106 params.set_default_remaining_outputs();
111 attribute_outputs.
top_id =
params.get_output_anonymous_attribute_id_if_needed(
"Top");
112 attribute_outputs.
bottom_id =
params.get_output_anonymous_attribute_id_if_needed(
"Bottom");
113 attribute_outputs.
side_id =
params.get_output_anonymous_attribute_id_if_needed(
"Side");
114 attribute_outputs.
uv_map_id =
params.get_output_anonymous_attribute_id_if_needed(
"UV Map");
General operations, lookup, etc. for materials.
void BKE_id_material_eval_ensure_default_slot(struct ID *id)
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define BLT_I18NCONTEXT_ID_NODETREE
GeometryNodeMeshCircleFillType
@ GEO_NODE_MESH_CIRCLE_FILL_NGON
@ GEO_NODE_MESH_CIRCLE_FILL_NONE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
std::string translation_context
local_group_size(16, 16) .push_constant(Type b
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
Mesh * create_cylinder_or_cone_mesh(float radius_top, float radius_bottom, float depth, int circle_segments, int side_segments, int fill_segments, ConeFillType fill_type, ConeAttributeOutputs &attribute_outputs)
static void node_rna(StructRNA *srna)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
const EnumPropertyItem rna_enum_node_geometry_mesh_circle_fill_type_items[]
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
std::optional< std::string > side_id
std::optional< std::string > top_id
std::optional< std::string > uv_map_id
std::optional< std::string > bottom_id