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-06 16:58:56 +11:00
2025-01-06 16:58:56 +11:00
2023-12-08 13:28:13 +11:00
2025-01-02 16:01:17 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%