Files
test2/source
Pratik Borhade 6fe4496f4c Fix #125944: Outliner: Child objects missing when linked to other collection
Objects inside `lc.collection->gobject / te_parent->subtree` are not
order according to ob-parent heirarchy. Due to this, some child
object tree elements are iterated before the parent inside
`make_object_parent_hierarchy_collections` while building the hierarchy.
This ignores the case for objects when they are in the different
collection (lets say "Collection2"), see `if(!found)`. To fix this,
store ordered list of object hierarchy in a Vector `ordered_objects`.
This way, the parent element is first added to collection2.
Then while iterating its child, `parent_ob_tree_elements` has more than
one elements (i.e. possible to add child object inside Collection2)

Also resolves #100393
Steps to Reproduce: Just open the .blend from above report

Alternative for !136872

Pull Request: https://projects.blender.org/blender/blender/pulls/136971
2025-06-03 14:11:05 +02:00
..