17 b.use_custom_socket_order();
18 b.allow_any_socket_order();
22 b.add_output<
decl::Geometry>(
"Mesh"_ustr).propagate_all_geometry().align_with_previous();
23 b.add_input<
decl::Int>(
"Level"_ustr).default_value(1).min(0).max(6);
27static Mesh *simple_subdivide_mesh(
const Mesh &
mesh,
const int level)
39 subdiv_settings.
level = 1;
64 const int level = std::max(params.
extract_input<
int>(
"Level"_ustr), 0);
66 params.
set_output(
"Mesh"_ustr, std::move(geometry_set));
83 TIP_(
"Disabled, Blender was compiled without OpenSubdiv"));
85 params.
set_output(
"Mesh"_ustr, std::move(geometry_set));
93 ntype.
ui_name =
"Subdivide Mesh";
95 "Divide mesh faces into smaller ones without changing the shape or volume, using linear "
96 "interpolation to place the new vertices";
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_SUBDIVIDE_MESH
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void error_message_add(const NodeWarningType type, StringRef message) const
T extract_input(const UString identifier)
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
void free(Subdiv *subdiv)
Subdiv * new_from_mesh(const Settings *settings, const Mesh *mesh)
FVarLinearInterpolation fvar_interpolation_from_uv_smooth(int uv_smooth)
VtxBoundaryInterpolation vtx_boundary_interpolation_from_subsurf(int boundary_smooth)
Mesh * subdiv_to_mesh(Subdiv *subdiv, const ToMeshSettings *settings, const Mesh *coarse_mesh)
void node_register_type(bNodeType &ntype)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
void debug_randomize_mesh_order(Mesh *mesh)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
const Mesh * get_mesh() const
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare
VtxBoundaryInterpolation vtx_boundary_interpolation
FVarLinearInterpolation fvar_linear_interpolation