See T94828 for details.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
Fix is correct, but think this can be made more clear re logic of the code.
| source/blender/blenkernel/intern/blendfile_link_append.c | ||
|---|---|---|
| 687–697 | Think this can be split in two, and then add a third condition, with appropriate comment about why. Something like that: if (!do_add_collection) { continue; } /* When instantiated into view-layer, do not add collections if one of their parents is also instantiated. */ if (!do_instantiate_as_empty && loose_data_instantiate_collection_parents_check_recursive(collection)) { continue; } /* When instantiated as empties, do not add indirectly linked (i.e. non-user-selected) collections. */ if (do_instantiate_as_empty && (item->tag & LINK_APPEND_TAG_INDIRECT) != 0) { continue; } | |
| 702–703 | This change is not making logic of the code easier to follow, rather the opposite. Suggest to move that 'skip' case above with the other ones. Then you can just do if (do_instantiate_as_empty) here. | |
| source/blender/blenkernel/intern/blendfile_link_append.c | ||
|---|---|---|
| 687–697 | Agree, this makes things more readable. | |