28 .description(
"The parts of the geometry that go into the first output");
31 .description(
"The parts of the geometry in the selection");
34 .description(
"The parts of the geometry not in the selection");
45 data->domain = int8_t(AttrDomain::Point);
58 auto separate_geometry_maybe_recursively = [&](
GeometrySet &geometry_set,
62 if (domain == AttrDomain::Instance) {
84 if (
params.output_is_required(
"Selection")) {
85 separate_geometry_maybe_recursively(
86 geometry_set, selection_field,
params.get_attribute_filter(
"Selection"));
87 params.set_output(
"Selection", std::move(geometry_set));
89 if (
params.output_is_required(
"Inverted")) {
90 separate_geometry_maybe_recursively(second_set,
92 params.get_attribute_filter(
"Inverted"));
93 params.set_output(
"Inverted", std::move(second_set));
102 "Which domain to separate on",
105 int(AttrDomain::Point));
113 ntype.
ui_name =
"Separate Geometry";
114 ntype.
ui_description =
"Split a geometry into two geometry outputs based on a selection";
118 "NodeGeometrySeparateGeometry",
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_SEPARATE_GEOMETRY
@ GEO_NODE_DELETE_GEOMETRY_MODE_ALL
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
BMesh const char void * data
void * MEM_callocN(size_t len, const char *str)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
Field< bool > invert_boolean_field(const Field< bool > &field)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
void separate_geometry(bke::GeometrySet &geometry_set, bke::AttrDomain domain, GeometryNodeDeleteGeometryMode mode, const fn::Field< bool > &selection_field, const bke::AttributeFilter &attribute_filter, bool &r_is_error)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_rna(StructRNA *srna)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static void node_init(bNodeTree *, bNode *node)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
const EnumPropertyItem rna_enum_attribute_domain_without_corner_items[]
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)