Blender Git Loki

Blender Git "temp-assetlib-plus-uuid-rename" branch commits.

September 21, 2021, 19:18 (GMT)
One more rename I missed
September 21, 2021, 19:14 (GMT)
UUIDs: rename UUID to bUUID

Rename the `UUID` struct & C++ class to `bUUID`. This avoids a symbol
clash on Windows, which also defines `UUID`. This only pops up when a
`UUID` field is used in the DNA code, which is why it wasn't a problem
before (it will be once D12589 lands).

No functional changes.
September 21, 2021, 16:33 (GMT)
Asset Catalogs: prevent writing of empty files
September 21, 2021, 16:33 (GMT)
Asset Catalogs: nicer temporary filename when writing
September 21, 2021, 16:33 (GMT)
Cleanup: clarify `AssetCatalogService::write_to_disk()`

No functional changes.
September 21, 2021, 16:33 (GMT)
Cleanup: mention `UUID_STRING_LEN` in comment

Mention that `UUID_STRING_LEN` exists in the documentation of
`BLI_uuid_format()`.

No functional changes.
September 21, 2021, 15:48 (GMT)
Asset Catalogs: defer writing of catalog definitions

Instead of writing the catalog definition file (CDF) immediately after
creating a new catalog, wait until the `write_to_disk(...)` function is
called.

As a result, it's now also possible to create an `AssetCatalogService`
without passing it an asset library root path (for example when creating
catalogs in a not-yet-saved blend file and without having an asset
library opened/configured/selected).
September 21, 2021, 14:33 (GMT)
Cleanup: move AssetCatalogDefinitionFile functions together

No functional changes.
September 21, 2021, 14:15 (GMT)
Asset Catalogs: read new on-disk catalogs before saving to disk

Before saving asset catalogs to disk, the to-be-overwritten file gets
inspected. Any new catalogs are loaded to memory.

- Changed catalog path: in-memory data wins
- Catalogs deleted on disk: they are recreated based on in-memory data
- Catalogs deleted in memory: deleted on disk as well
- New catalogs on disk: are loaded and thus survive the overwriting
September 21, 2021, 14:15 (GMT)
Asset Catalog tests: initialise the tempdirs

Call `BKE_tempdir_init("")` to have non-empty tempdirs.
September 21, 2021, 14:11 (GMT)
Cleanup: refactor asset catalog definition file loading

Change the API for loading asset catalog definition files, by moving the
file/line parsing code into the `AssetCatalogDefinitionFile` class.

This separates the parsing of these files from handling the parsed data.
The caller of the `parse_catalog_line()` function has to provide a callback
that stores the `AssetCatalog` in the desired place.

No functional changes.
September 21, 2021, 14:10 (GMT)
Remove remaining C++ filesystem file & CMakeLists entries
September 21, 2021, 14:07 (GMT)
Merge remote-tracking branch 'origin/master' into temp-asset-browser-catalogs
September 21, 2021, 14:06 (GMT)
Remove ghc::filesystem files
September 21, 2021, 14:02 (GMT)
Use existing C-APIs for path and filesystem handling

The `ghc::filesystem` we wanted to use for a platform compatible
replacement of `std::filesystem` (see D12197) doesn't behave as we
expect or want to. We could probably find a solution, but it's not worth
the extra time. To move this forward, we can switch the asset catalogs
to use Blender's C functions for path and filesystem handling.

Differential Revision: https://developer.blender.org/D12538
September 21, 2021, 10:35 (GMT)
Asset Catalogs: implement catalog deletion

Asset catalogs can now be deleted by providing their UUID. This marks the
catalog for deletion, which causes it to be hidden from the UI and not
saved to disk.

The catalog is not immediately deleted from memory, to make it possible
to later merge on-disk data with in-memory data. This is envisioned to
support multi-user edits to the same catalog definition file (for example
when synced between machines with SyncThing).
September 21, 2021, 10:32 (GMT)
Cleanup: asset catalog tests, move tree testing code into separate function

Move `AssetCatalogTree` verification code into its own function, so that
it can be called from other places as well.
September 21, 2021, 10:23 (GMT)
Cleanup: asset catalogs, move "only for test" code into test

Move the "for testing only" function `get_catalog_definition_file()` from
`AssetCatalogService` to a new class `TestableAssetCatalogService` that's
only available in the unit test file that needs it.

No functional changes.
September 21, 2021, 09:49 (GMT)
Cleanup: Asset Tests, rename Elly to Ellie

The test character names come from the Sprite Fright production, and
there the girl is named Ellie, not Elly. Once seen cannot be un-seen.

No functional changes.
September 21, 2021, 09:15 (GMT)
Cleanup: asset catalog, add note about path cleanup

No functional changes.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021