29 .description(
"Number of points on the circle at the top and bottom");
34 .description(
"The number of edges running vertically along the side of the cone");
35 auto &fill =
b.add_input<
decl::Int>(
"Fill Segments")
39 .description(
"Number of concentric rings used to fill the round face");
43 .description(
"Radius of the top circle of the cone");
48 .description(
"Radius of the bottom circle of the cone");
53 .description(
"Height of the generated cone");
56 b.add_output<
decl::Bool>(
"Bottom").field_on_all().translation_context(
61 const bNode *node =
b.node_or_null();
62 if (node !=
nullptr) {
91 const int circle_segments =
params.extract_input<
int>(
"Vertices");
92 if (circle_segments < 3) {
94 params.set_default_remaining_outputs();
98 const int side_segments =
params.extract_input<
int>(
"Side Segments");
99 if (side_segments < 1) {
101 params.set_default_remaining_outputs();
106 const int fill_segments = no_fill ? 1 :
params.extract_input<
int>(
"Fill Segments");
107 if (fill_segments < 1) {
109 params.set_default_remaining_outputs();
113 const float radius_top =
params.extract_input<
float>(
"Radius Top");
114 const float radius_bottom =
params.extract_input<
float>(
"Radius Bottom");
115 const float depth =
params.extract_input<
float>(
"Depth");
118 attribute_outputs.
top_id =
params.get_output_anonymous_attribute_id_if_needed(
"Top");
119 attribute_outputs.bottom_id =
params.get_output_anonymous_attribute_id_if_needed(
"Bottom");
120 attribute_outputs.side_id =
params.get_output_anonymous_attribute_id_if_needed(
"Side");
121 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_CONE
#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 mesh_translate(Mesh &mesh, const float3 &translation, bool do_shape_keys)
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_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void node_geo_exec(GeoNodeExecParams params)
static void node_init(bNodeTree *, bNode *node)
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)
VecBase< float, 3 > float3
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 > top_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)