Danh Mục Tài Nguyên (Asset Catalogs)

Danh Mục Tài Nguyên giúp bạn sắp xếp tài nguyên của mình. Chúng trông hơi giống thư mục tập tin, nhưng chúng hoàn toàn độc lập với vị trí của tập tin blend của bạn. Ấn định mỗi tài nguyên trong tập tin blend vào danh mục riêng của nó hoặc tạo một danh mục lớn với toàn bộ các tài nguyên của toàn bộ các tập tin blend lại làm một. Làm thế nào thì đấy là tuỳ bạn.

Similar to Tập Hợp (Collections), catalogs can be nested i.e. you can have a main catalog that contains several nested catalogs. For example, this allows you to have a catalog of assets for "Furniture" with sub-catalogs of "Tables", "Chairs", "Lamps", etc...

For more technical information, see Asset Catalogs on the Blender Wiki.

../../_images/asset-browser-catalogs.png

Example file system and catalog structures.

Vị Trí Nhà của Tài Nguyên (The Home Location of Assets)

There can be as many catalogs as you want, but an asset can be assigned to a single catalog at a time. This is similar to a file system, where a file is only in one directory (ignoring advanced things like symbolic links).

Catalogs themselves can be nested and moved by dragging and dropping. Moving a catalog will not modify the assets it contains; they will simply move along to the new location of the catalog.

Selecting a catalog in the Asset Browser will show all assets in that catalog and in child catalogs. So, in the preceding example, selecting Characters/Ellie/Poses will also show assets from Characters/Ellie/Poses/Head and Characters/Ellie/Poses/Hands.

Ấn Định một Tài Nguyên (Assigning an Asset)

../../_images/asset_browser-assign_catalog.png

Assigning a selection of "Scale material" assets to a catalog.

To assign assets to a catalog, just select and drag the assets on top of the catalog.

Mẹo

You can assign an asset to the "Unassigned" catalog, this will remove it from any existing catalogs.

Các thành Phần của một Hạng Mục (Components of a Catalog)

Each catalog consists of a catalog path, a UUID, and a simple name. Normally you would only deal with the catalog path; the rest is for internal Blender use and/or for emergency situations.

Đường Dẫn Danh Mục (Catalog Path)

The path of a catalog determines where in the catalog hierarchy the catalog is shown. Examples are Characters/Ellie/Poses/Hand or Kitbash/City/Skyscrapers, which would result in the following catalog tree. The highlighted catalog has path Characters/Ellie/Poses/Hand.

../../_images/asset-catalog-tree.png

Example tree of asset catalogs.

UUID (UUID)

Each catalog has a UUID, which is normally hidden from the user interface (enable Developer Extras and the experimental Asset Debug Info option to see them). This is what is stored in the asset, and what determines the "identity" of the catalog. As a result, a catalog can be renamed or moved around (i.e. you can change its path), and all assets that are contained in it will move along with it. This only requires a change to the catalog itself, and not to any asset blend-file.

Tên Đơn Giản (Simple Name)

Each catalog has an optional simple name. This name is stored along with the UUID in each asset. The purpose is to make it possible for humans to recognize the catalog the asset was assigned to, even when the catalog definition file (see below) is lost.

Like the UUID, the simple name is normally hidden from the user interface. Enable Developer Extras in the interface preferences to make it visible in the Asset Browser.

Tập Tin Định Nghĩa Hạng Mục (Catalog Definition Files)

Asset catalogs are stored in Catalog Definition Files (CDFs). Blender 3.0 supports a single CDF per asset library. It is stored in blender_assets.cats.txt in the root directory of the asset library. If the file does not exist, Blender will create it when the catalogs are saved. When catalogs are changed, Blender updates that file, but also creates a backup of the previous state to a file named blender_assets.cats.txt~.

Tập Tin nào để Viết vào (Which File to Write To)

Asset catalogs can be saved independently of the blend-file; the catalog editor has its own "Save" button.

Định Dạng/Hình Thức (Format)

Catalog Definition Files (CDFs) are relatively simple text files, encoded in UTF-8. Each CDF consists of a version indicator, and a line of text per catalog. Each catalog line is colon-separated, of the form {UUID}:{path}:{simple name}.

Ví Dụ (Example)

This is an example of a valid catalog definition file:

# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Subsequent lines are of the format "CATALOG_UUID:catalog/path/for/assets:simple catalog name"

VERSION 1

313ea471-7c81-4de6-af81-fb04c3535d0e:catalog/without/simple/name:
ee9c7b60-02f1-4058-bed6-539b8d2a6d34:character/Ellie/poselib:character-Ellie-poselib
cd66bf52-58f4-45cb-a4e2-dc0e0ee8f3fe:character/Ellie/poselib:character-Ellie
4eb44ec6-3424-405b-9782-ca006953e799:character/Ellie/poselib/white space:character-Ellie-poselib-white space
b63ed357-2511-4b96-8728-1b5a7093824c:character/Ružena/poselib:Ružena pose library
dcdee4df-926e-4d72-b995-33106983bb9a:character/Ružena/poselib/face:Ružena face
fb698f2e-9e2b-4146-a539-3af292d44899:character/Ružena/poselib/hand:Ružena hands

Đường Dẫn Danh Mục Hợp Lệ (Valid Catalog Paths)

Catalog paths follow the following rules:

  • All paths are absolute; there is no difference between /a/b and a/b.

  • Only / as separator (no \; think less filesystem path and more URL).

  • Not empty (it's required for a valid catalog).

  • No empty components (so not a//b; a/b is fine).

  • Invalid characters: :, \.

  • Paths are always interpreted as UTF-8.