Blender Git Loki

Blender Git "temp-asset-browser-catalogs-save-hook" branch commits.

September 27, 2021, 15:36 (GMT)
Asset Catalog Tests: unnecessary use of temp dir

Remove unnecessary use of temp directories in the Asset Catalog unit
tests, so that the test doesn't try and clean up a directory that
doesn't exist.
September 27, 2021, 15:29 (GMT)
Another fix for BLI_path_contains on Windows
September 27, 2021, 15:18 (GMT)
Hopefully fix asset catalog test on Windows
September 27, 2021, 15:18 (GMT)
Hopefully fix `BLI_path_contains()` on Windows
September 27, 2021, 14:03 (GMT)
Asset Catalogs: write catalogs to disk when saving the blend file

The Asset Catalog Definition File is now saved whenever the blend file
is saved. The location of the CDF depends on where the blend file is
saved, and whether previously a CDF was already loaded, according to the
following rules. The first matching rule wins:

1. Already loaded a CDF from disk? -> Always write to that file.
2. The directory containing the blend file has a
`blender_assets.cats.txt` file? -> Merge with & write to that file.
3. The directory containing the blend file is part of an asset library,
as per the user's preferences? -> Merge with & write to
`${ASSET_LIBRARY_ROOT}/blender_assets.cats.txt`
4. Create a new file `blender_assets.cats.txt` next to the blend file.
September 27, 2021, 14:03 (GMT)
BKE Preferences: find asset library containing a path

Add `BKE_preferences_asset_library_containing_path(&U, some_path)` that
finds the asset library that contains the given path.

This is a simple linear search, returning the first asset library that
matches. There is no smartness when it comes to nested asset libraries
(like returning the library with the best-matching path), although this
could be a useful feature to add later.
September 27, 2021, 14:03 (GMT)
BLI Path: add function `BLI_path_contains()`

Add function `BLI_path_contains(container, containee)` that returns true
if and only `container` contains `containee`.

Paths are normalised and converted to native path separators before
comparing. Relative paths are *not* made absolute, to simplify the
function call; if this is necessary the caller has to do this conversion
first.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021