创建静态扩展存储库#

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.

有关详细信息,请阅读生成的 JSON API

测试#

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

  • 获取扩展 → 存储库 → [+] → 添加扩展存储库

  • 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.

Tip

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

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.