Files
test/source
Sybren A. Stüvel 2ec1b6887d Core: move short-lived ID_TAG_ID_LINK_PLACEHOLDER to runtime struct
Move the `ID_TAG_ID_LINK_PLACEHOLDER` bit of `id->tag` to
`id->runtime.readfile_data->tags.is_id_link_placeholder`. It also
introduces the necessary stucts and allocation/freeing code.

Old code:

```cpp
if (id_tag & ID_TAG_ID_LINK_PLACEHOLDER) {
```

New code:

```cpp
if (readfile_id_runtime_tags(id).is_id_link_placeholder) {
```

where `readfile_id_runtime_tags(id)` is a getter for
`id->runtime.readfile_data->tags` that is null-safe for
`id->runtime.readfile_data`. The `readfile_data` is not allocated in
these cases:

1. When reading undo steps, because that doesn't have to deal with
   versioning or linking (which are the sole purposes for this
   struct).
2. When linking from another file (for example from the 'Link...'
   operator). The just-linked IDs will have the `readfile_data`
   struct, but already-loaded IDs will already have had those freed.

No functional changes intended.

Pull Request: https://projects.blender.org/blender/blender/pulls/132169

Design Task: #131695
2025-01-06 10:58:56 +01:00
..
2025-01-03 22:35:05 -05:00