25 N_(
"Output each child of the collection as a separate instance, sorted alphabetically"));
28 N_(
"Reset the transforms of every child instance in the output. Only used when Separate "
29 "Children is enabled"));
55 if (collection ==
nullptr) {
56 params.set_default_remaining_outputs();
63 params.error_message_add(NodeWarningType::Error,
"Collection contains current object");
64 params.set_default_remaining_outputs();
75 const bool separate_children =
params.get_input<
bool>(
"Separate Children");
76 if (separate_children) {
77 const bool reset_children =
params.get_input<
bool>(
"Reset Children");
80 children_collections.append(collection_child->collection);
84 children_objects.
append(collection_object->ob);
87 instances.
reserve(children_collections.size() + children_objects.
size());
89 entries.
reserve(children_collections.size() + children_objects.
size());
91 for (
Collection *child_collection : children_collections) {
93 if (!reset_children) {
95 if (use_relative_transform) {
102 const int handle = instances.
add_reference(*child_collection);
105 for (
Object *child_object : children_objects) {
108 if (!reset_children) {
109 if (use_relative_transform) {
123 return BLI_strcasecmp_natural(a.name, b.name) < 0;
131 if (use_relative_transform) {
140 params.set_output(
"Geometry", geometry_set_out);
155 "NodeGeometryCollectionInfo",
bool BKE_collection_has_object_recursive_instanced(struct Collection *collection, struct Object *ob)
#define NODE_STORAGE_FUNCS(StorageT)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define GEO_NODE_COLLECTION_INFO
void nodeRegisterType(struct bNodeType *ntype)
#define LISTBASE_FOREACH(type, var, list)
void mul_m4_m4_pre(float R[4][4], const float A[4][4])
void mul_m4_m4_post(float R[4][4], const float B[4][4])
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
Object groups, one object can be in many groups at once.
@ GEO_NODE_TRANSFORM_SPACE_RELATIVE
@ GEO_NODE_TRANSFORM_SPACE_ORIGINAL
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
int add_reference(const InstanceReference &reference)
void add_instance(int instance_handle, const blender::float4x4 &transform)
void reserve(int min_capacity)
void append(const T &value)
void reserve(const int64_t min_capacity)
static void node_declare(NodeDeclarationBuilder &b)
static void node_node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_collection_info()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeDeclareFunction declare
static float4x4 identity()