Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_subdivide.cc
| Show All 9 Lines | |||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes::node_geo_mesh_subdivide_cc { | namespace blender::nodes::node_geo_mesh_subdivide_cc { | ||||
| static void node_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH); | b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH); | ||||
| b.add_input<decl::Int>(N_("Level")).default_value(1).min(0).max(6); | b.add_input<decl::Int>(N_("Level")).default_value(1).min(0).max(6); | ||||
| b.add_output<decl::Geometry>(N_("Mesh")); | b.add_output<decl::Geometry>(N_("Mesh")).propagate_all(); | ||||
| } | } | ||||
| static void geometry_set_mesh_subdivide(GeometrySet &geometry_set, const int level) | static void geometry_set_mesh_subdivide(GeometrySet &geometry_set, const int level) | ||||
| { | { | ||||
| if (!geometry_set.has_mesh()) { | if (!geometry_set.has_mesh()) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines | |||||