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"_ustr)
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");
51 .anonymous_attribute_output()
53 b.add_output<
decl::Bool>(
"Side"_ustr).anonymous_attribute_output();
55 .anonymous_attribute_output()
57 b.add_output<
decl::Vector>(
"UV Map"_ustr).anonymous_attribute_output();
60 if (
node !=
nullptr) {
81 node->storage = node_storage;
89 const float radius = params.
extract_input<
float>(
"Radius"_ustr);
90 const float depth = params.
extract_input<
float>(
"Depth"_ustr);
91 const int circle_segments = params.
extract_input<
int>(
"Vertices"_ustr);
92 if (circle_segments < 3) {
98 const int side_segments = params.
extract_input<
int>(
"Side Segments"_ustr);
99 if (side_segments < 1) {
106 const int fill_segments = no_fill ? 1 : params.
extract_input<
int>(
"Fill Segments"_ustr);
107 if (fill_segments < 1) {
General operations, lookup, etc. for materials.
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_PRIMITIVE_CYLINDER
#define BLT_I18NCONTEXT_ID_NODETREE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
void error_message_add(const NodeWarningType type, StringRef message) const
std::optional< std::string > get_output_anonymous_attribute_id_if_needed(const UString output_identifier, const bool force_create=false)
T extract_input(const UString identifier)
const bNode & node() const
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
#define storage(slot, qualifiers)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
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(ui::Layout &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 BKE_id_material_eval_ensure_default_slot(ID *id)
const EnumPropertyItem rna_enum_node_geometry_mesh_circle_fill_type_items[]
GeometryNodeMeshCircleFillType
@ GEO_NODE_MESH_CIRCLE_FILL_NONE
@ GEO_NODE_MESH_CIRCLE_FILL_NGON
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
GeometryNodeMeshCircleFillType fill_type
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
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
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)