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");
52 b.add_output<
decl::Bool>(
"Bottom").field_on_all().translation_context(
56 const bNode *node =
b.node_or_null();
57 if (node !=
nullptr) {
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) {
91 params.set_default_remaining_outputs();
95 const int side_segments =
params.extract_input<
int>(
"Side Segments");
96 if (side_segments < 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) {
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(ID *id)
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_PRIMITIVE_CYLINDER
#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 * MEM_callocN(size_t len, const char *str)
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(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, std::string idname, const std::optional< int16_t > legacy_type)
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[]
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
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
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void use_property_decorate_set(bool is_sep)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)