Files
test/source/blender/blenkernel
Julian Eisel d90795bc3c Asset System: New "weak" asset reference for storing in .blend files
No user visible changes expected.

For brush assets, we need a way to store a reference to a brush in .blend files, so that the last active brush can be restored from the file. See #101908. It seems like a generally useful thing to have.

Adds a new DNA struct to store a "weak" asset reference, that is, a reference that can break under a number of circumstances, but should work reliably enough under normal usage. There's no way to reliably reference an asset currently, so this works on a "best effort" basis. It can break when assets are moved inside the asset library, asset libraries are unregistered from the Preferences, or a file is opened on a different machine with different Preferences, for example. It can also break currently if an asset library is renamed.
It contains:
- Information to identify the asset library the asset can be found in.
- A relative "identifier" (currently a relative path) for the asset within the asset library.

There's further code to resolve a weak reference to file paths and Blender library paths.

Part of #101908.

Co-authored-by: Bastien Montagne <bastien@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/105603
2023-03-30 12:25:42 +02:00
..
2022-11-01 12:24:58 +11:00
2022-11-12 18:33:31 +01:00
2023-03-24 08:34:21 -04:00
2023-03-17 16:45:42 +11:00
2023-03-13 11:57:03 +01:00
2023-03-27 12:08:14 +11:00
2023-02-06 17:19:02 +01:00
2022-10-05 13:48:01 -05:00
2023-03-03 10:09:20 +11:00