Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
| Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | for (Object *child_object : children_objects) { | ||||
| float4x4 transform = float4x4::identity(); | float4x4 transform = float4x4::identity(); | ||||
| if (!reset_children) { | if (!reset_children) { | ||||
| if (use_relative_transform) { | if (use_relative_transform) { | ||||
| transform = self_object->imat; | transform = self_object->imat; | ||||
| } | } | ||||
| else { | else { | ||||
| sub_v3_v3(transform.values[3], collection->instance_offset); | sub_v3_v3(transform.values[3], collection->instance_offset); | ||||
| } | } | ||||
| mul_m4_m4_post(transform.values, child_object->obmat); | mul_m4_m4_post(transform.values, child_object->object_to_world); | ||||
| } | } | ||||
| entries.append({handle, &(child_object->id.name[2]), transform}); | entries.append({handle, &(child_object->id.name[2]), transform}); | ||||
| } | } | ||||
| std::sort(entries.begin(), | std::sort(entries.begin(), | ||||
| entries.end(), | entries.end(), | ||||
| [](const InstanceListEntry &a, const InstanceListEntry &b) { | [](const InstanceListEntry &a, const InstanceListEntry &b) { | ||||
| return BLI_strcasecmp_natural(a.name, b.name) < 0; | return BLI_strcasecmp_natural(a.name, b.name) < 0; | ||||
| Show All 38 Lines | |||||