27 .description(
"Recursively retrieve collections and objects");
28 b.add_output<
decl::Collection>(
"Collections"_ustr).structure_type(StructureType::List);
29 b.add_output<
decl::Object>(
"Objects"_ustr).structure_type(StructureType::List);
38 if (visited.
add(cc)) {
48 const bool recursive = params.
extract_input<
bool>(
"Recursive"_ustr);
50 if (collection ==
nullptr) {
72 obj_collections.
append(collection);
74 obj_collections.
extend(child_collections);
87 if (obj_visited.
add(cob.
ob)) {
88 child_objects.append(cob.
ob);
93 std::ranges::sort(child_objects, [](
const Object *a,
const Object *
b) {
105 ntype.
ui_name =
"Collection Children";
107 "Retrieve a collection's object and collection children, in a name-based order";
Object groups, one object can be in many groups at once.
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void append(const T &value)
void extend(Span< T > array)
static GListPtr from_container(ContainerT &&container)
T extract_input(const UString identifier)
bool output_is_required(const UString identifier) const
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
static void collection_children_recursive(Collection *collection, Vector< Collection * > &collections, Set< Collection * > &visited)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
int char char int int int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
const char * BKE_id_name(const ID &id)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
struct Collection * collection
ListBaseT< CollectionChild > children
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare