19 .
description(
"Horizontal resolution of the sphere");
21 "The number of horizontal rings");
26 .description(
"Distance from the generated points to the origin");
33 const int segments_num =
params.extract_input<
int>(
"Segments");
34 const int rings_num =
params.extract_input<
int>(
"Rings");
35 if (segments_num < 3 || rings_num < 2) {
36 if (segments_num < 3) {
37 params.error_message_add(NodeWarningType::Info,
TIP_(
"Segments must be at least 3"));
40 params.error_message_add(NodeWarningType::Info,
TIP_(
"Rings must be at least 3"));
42 params.set_default_remaining_outputs();
46 const float radius =
params.extract_input<
float>(
"Radius");
48 std::optional<std::string> uv_map_id =
params.get_output_anonymous_attribute_id_if_needed(
General operations, lookup, etc. for materials.
void BKE_id_material_eval_ensure_default_slot(struct ID *id)
#define NODE_CLASS_GEOMETRY
#define NOD_REGISTER_NODE(REGISTER_FUNC)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
Mesh * create_uv_sphere_mesh(float radius, int segments, int rings, const std::optional< StringRef > &uv_map_id)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare