Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_separate_components.cc
| Show All 12 Lines | |||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes::node_geo_separate_components_cc { | namespace blender::nodes::node_geo_separate_components_cc { | ||||
| static void geo_node_join_geometry_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>(N_("Geometry")); | b.add_input<decl::Geometry>(N_("Geometry")); | ||||
| b.add_output<decl::Geometry>(N_("Mesh")); | b.add_output<decl::Geometry>(N_("Mesh")); | ||||
| b.add_output<decl::Geometry>(N_("Point Cloud")); | b.add_output<decl::Geometry>(N_("Point Cloud")); | ||||
| b.add_output<decl::Geometry>(N_("Curve")); | b.add_output<decl::Geometry>(N_("Curve")); | ||||
| b.add_output<decl::Geometry>(N_("Volume")); | b.add_output<decl::Geometry>(N_("Volume")); | ||||
| b.add_output<decl::Geometry>(N_("Instances")); | b.add_output<decl::Geometry>(N_("Instances")); | ||||
| } | } | ||||
| static void geo_node_separate_components_exec(GeoNodeExecParams params) | static void node_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | ||||
| GeometrySet meshes; | GeometrySet meshes; | ||||
| GeometrySet point_clouds; | GeometrySet point_clouds; | ||||
| GeometrySet volumes; | GeometrySet volumes; | ||||
| GeometrySet curves; | GeometrySet curves; | ||||
| GeometrySet instances; | GeometrySet instances; | ||||
| Show All 26 Lines | |||||
| void register_node_type_geo_separate_components() | void register_node_type_geo_separate_components() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_geo_separate_components_cc; | namespace file_ns = blender::nodes::node_geo_separate_components_cc; | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| geo_node_type_base( | geo_node_type_base( | ||||
| &ntype, GEO_NODE_SEPARATE_COMPONENTS, "Separate Components", NODE_CLASS_GEOMETRY, 0); | &ntype, GEO_NODE_SEPARATE_COMPONENTS, "Separate Components", NODE_CLASS_GEOMETRY, 0); | ||||
| ntype.declare = file_ns::geo_node_join_geometry_declare; | ntype.declare = file_ns::node_declare; | ||||
| ntype.geometry_node_execute = file_ns::geo_node_separate_components_exec; | ntype.geometry_node_execute = file_ns::node_exec; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||