Kiến Tạo một Kho Lưu Trữ Trình Mở Rộng Tĩnh [Creating a Static Extensions Repository]

To host your own extensions and leverage Blender update system all that is required is to host a static JSON file that is generated by Blender.

JSON

To generate a valid JSON file use the server generate Blender command-line tool:

blender --command extension server-generate --repo-dir=/path/to/packages

This creates an index.json listing from all the .zip extensions found in the --repo-dir location.

Để biết thêm chi tiết, xin hãy đọc API (Application Programming Interface: Giao Diện Lập Trình Ứng Dụng) của JSON sinh tạo.

Thử Nghiệm [Testing]

To test the generated repository, add a new Remote Repository from the Preferences:

  • Get Extensions → Repositories → [+] → Add Remote Repository

  • Paste the location of the generated JSON as the URL. So the example /path/to/packages would use the:

    • file:///path/to/packages/index.json on Linux and macOS.

    • file:///C:/path/to/packages/index.json on Windows.

    • file://HOST/share/path/to/packages/index.json for network shares on Windows.

Mẹo

Open file:/// in a web browser and navigate to the repository location and copy that as the remote repository URL.

Liệt Kê Trình Mở Rộng trong HTML [Extensions Listing HTML]

The server-generate command can optionally create a simple website using the --html argument.

blender --command extension server-generate --repo-dir=/path/to/packages --html

This creates an index.html file ready to use, listing extensions which can be dropped into Blender for installation.