25 {int(
Mode::All),
"ALL", ICON_NONE,
"All",
"Output all paths"},
30 N_(
"Find paths to bundles of a specific type")},
35 N_(
"Find paths to values of a specific data type")},
58 b.add_output<
decl::String>(
"Paths"_ustr).structure_type(StructureType::List);
69 const Bundle &bundle = *bundle_ptr;
81 const std::string type_pattern = params.
extract_input<std::string>(
"Bundle Type"_ustr);
84 std::string pattern_error;
86 pattern_mode, type_pattern, pattern_error);
91 if (!type_pattern.empty()) {
93 bundle, [&](
const StringRef type) {
return pattern_fn->match(type); });
105 std::ranges::sort(paths);
115 ntype.
ui_name =
"Get Nested Bundle Paths";
116 ntype.
ui_description =
"Get paths to items in a nested bundle with a filter";
#define NODE_CLASS_CONVERTER
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void append(const T &value)
static std::string combine_path(Span< StringRef > path)
static GListPtr from_container(ContainerT &&container)
void error_message_add(const NodeWarningType type, StringRef message) const
T extract_input(const UString identifier)
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
static std::optional< StringPattern > from_str(StringPatternMode mode, StringRef pattern, std::string &r_error)
void node_register_type(bNodeType &ntype)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static const EnumPropertyItem mode_items[]
const EnumPropertyItem string_pattern_mode_items[]
Vector< std::string > gather_bundle_paths_by_bundle_type(const Bundle &bundle, const FunctionRef< bool(StringRef type)> type_filter_fn)
bool socket_type_supported_in_bundle(const eNodeSocketDatatype socket_type, const int ntree_type)
Vector< std::string > gather_bundle_paths_by_data_type(const Bundle &bundle, const eNodeSocketDatatype data_type)
void foreach_nested_bundle_item(const Bundle &bundle, const FunctionRef< void(Span< BundleKey >, const BundleItemValue &value)> fn)
ImplicitSharingPtr< Bundle > BundlePtr
const EnumPropertyItem rna_enum_node_socket_data_type_items[]
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
static constexpr int _180
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare