Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
| Show All 13 Lines | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes::node_geo_separate_geometry_cc { | ||||
| static void geo_node_separate_geometry_declare(NodeDeclarationBuilder &b) | static void geo_node_separate_geometry_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>(N_("Geometry")); | b.add_input<decl::Geometry>(N_("Geometry")); | ||||
| b.add_input<decl::Bool>(N_("Selection")) | b.add_input<decl::Bool>(N_("Selection")) | ||||
| .default_value(true) | .default_value(true) | ||||
| .hide_value() | .hide_value() | ||||
| .supports_field() | .supports_field() | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | if (params.output_is_required("Inverted")) { | ||||
| params.set_output("Inverted", std::move(second_set)); | params.set_output("Inverted", std::move(second_set)); | ||||
| } | } | ||||
| if (all_is_error) { | if (all_is_error) { | ||||
| /* Only show this if none of the instances/components actually changed. */ | /* Only show this if none of the instances/components actually changed. */ | ||||
| params.error_message_add(NodeWarningType::Info, TIP_("No geometry with given domain")); | params.error_message_add(NodeWarningType::Info, TIP_("No geometry with given domain")); | ||||
| } | } | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_geo_separate_geometry_cc | ||||
| void register_node_type_geo_separate_geometry() | void register_node_type_geo_separate_geometry() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_geo_separate_geometry_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| geo_node_type_base( | geo_node_type_base( | ||||
| &ntype, GEO_NODE_SEPARATE_GEOMETRY, "Separate Geometry", NODE_CLASS_GEOMETRY, 0); | &ntype, GEO_NODE_SEPARATE_GEOMETRY, "Separate Geometry", NODE_CLASS_GEOMETRY, 0); | ||||
| node_type_storage(&ntype, | node_type_storage(&ntype, | ||||
| "NodeGeometrySeparateGeometry", | "NodeGeometrySeparateGeometry", | ||||
| node_free_standard_storage, | node_free_standard_storage, | ||||
| node_copy_standard_storage); | node_copy_standard_storage); | ||||
| node_type_init(&ntype, blender::nodes::geo_node_separate_geometry_init); | node_type_init(&ntype, file_ns::geo_node_separate_geometry_init); | ||||
| ntype.declare = blender::nodes::geo_node_separate_geometry_declare; | ntype.declare = file_ns::geo_node_separate_geometry_declare; | ||||
| ntype.geometry_node_execute = blender::nodes::geo_node_separate_geometry_exec; | ntype.geometry_node_execute = file_ns::geo_node_separate_geometry_exec; | ||||
| ntype.draw_buttons = blender::nodes::geo_node_separate_geometry_layout; | ntype.draw_buttons = file_ns::geo_node_separate_geometry_layout; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||