19 .
description(
"Horizontal resolution of the sphere");
29 .description(
"Distance from the generated points to the origin");
31 b.add_output<
decl::Vector>(
"UV Map"_ustr).anonymous_attribute_output();
36 const int segments_num = params.
extract_input<
int>(
"Segments"_ustr);
37 const int rings_num = params.
extract_input<
int>(
"Rings"_ustr);
38 if (segments_num < 3 || rings_num < 2) {
39 if (segments_num < 3) {
49 const float radius = params.
extract_input<
float>(
"Radius"_ustr);
66 "Generate a spherical mesh with quads, except for triangles at the top and bottom";
General operations, lookup, etc. for materials.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_PRIMITIVE_UV_SPHERE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
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)
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
Mesh * create_uv_sphere_mesh(float radius, int segments, int rings, std::optional< StringRef > uv_map_id)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void BKE_id_material_eval_ensure_default_slot(ID *id)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)