Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_separate_components.cc
| Show All 10 Lines | |||||
| * | * | ||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * 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 { | namespace blender::nodes::node_geo_separate_components_cc { | ||||
| static void geo_node_join_geometry_declare(NodeDeclarationBuilder &b) | static void geo_node_join_geometry_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")); | ||||
| Show All 28 Lines | static void geo_node_separate_components_exec(GeoNodeExecParams params) | ||||
| params.set_output("Mesh", meshes); | params.set_output("Mesh", meshes); | ||||
| params.set_output("Point Cloud", point_clouds); | params.set_output("Point Cloud", point_clouds); | ||||
| params.set_output("Curve", curves); | params.set_output("Curve", curves); | ||||
| params.set_output("Volume", volumes); | params.set_output("Volume", volumes); | ||||
| params.set_output("Instances", instances); | params.set_output("Instances", instances); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_geo_separate_components_cc | ||||
| void register_node_type_geo_separate_components() | void register_node_type_geo_separate_components() | ||||
| { | { | ||||
| 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 = blender::nodes::geo_node_join_geometry_declare; | ntype.declare = file_ns::geo_node_join_geometry_declare; | ||||
| ntype.geometry_node_execute = blender::nodes::geo_node_separate_components_exec; | ntype.geometry_node_execute = file_ns::geo_node_separate_components_exec; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||