From 7b8640896e1c36d5cf99a88dd5eedaa5d03df51b Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 30 Jul 2024 16:44:41 +0200 Subject: [PATCH] Templates: Blender Manifest template Pull Request: https://projects.blender.org/blender/blender/pulls/125668 --- scripts/startup/bl_ui/space_text.py | 9 +++ scripts/templates_toml/blender_manifest.toml | 73 ++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 scripts/templates_toml/blender_manifest.toml diff --git a/scripts/startup/bl_ui/space_text.py b/scripts/startup/bl_ui/space_text.py index 8f8001cfea3..57476e6439f 100644 --- a/scripts/startup/bl_ui/space_text.py +++ b/scripts/startup/bl_ui/space_text.py @@ -310,6 +310,15 @@ class TEXT_MT_templates(Menu): layout = self.layout layout.menu("TEXT_MT_templates_py") layout.menu("TEXT_MT_templates_osl") + # We only have one Blender Manifest template for now, + # better to show it on the top level. + layout.separator() + self.path_menu( + bpy.utils.script_paths(subdir="templates_toml"), + "text.open", + props_default={"internal": True}, + filter_ext=lambda ext: (ext.lower() == ".toml"), + ) class TEXT_MT_select(Menu): diff --git a/scripts/templates_toml/blender_manifest.toml b/scripts/templates_toml/blender_manifest.toml new file mode 100644 index 00000000000..891ec1c68d1 --- /dev/null +++ b/scripts/templates_toml/blender_manifest.toml @@ -0,0 +1,73 @@ +schema_version = "1.0.0" + +# Example of manifest file for a Blender extension +# Change the values according to your extension +id = "my_example_extension" +version = "1.0.0" +name = "Test Extension" +tagline = "This is another extension" +maintainer = "Developer name " +# Supported types: "add-on", "theme" +type = "add-on" + +# Optional link to documentation, support, source files, etc +# website = "https://extensions.blender.org/add-ons/my-example-package/" + +# Optional list defined by Blender and server, see: +# https://docs.blender.org/manual/en/dev/advanced/extensions/tags.html +tags = ["Animation", "Sequencer"] + +blender_version_min = "4.2.0" +# # Optional: Blender version that the extension does not support, earlier versions are supported. +# # This can be omitted and defined later on the extensions platform if an issue is found. +# blender_version_max = "5.1.0" + +# License conforming to https://spdx.org/licenses/ (use "SPDX: prefix) +# https://docs.blender.org/manual/en/dev/advanced/extensions/licenses.html +license = [ + "SPDX:GPL-2.0-or-later", +] +# Optional: required by some licenses. +# copyright = [ +# "2002-2024 Developer Name", +# "1998 Company Name", +# ] + +# Optional list of supported platforms. If omitted, the extension will be available in all operating systems. +# platforms = ["windows-x64", "macos-arm64", "linux-x64"] +# Other supported platforms: "windows-arm64", "macos-x64" + +# Optional: bundle 3rd party Python modules. +# https://docs.blender.org/manual/en/dev/advanced/extensions/python_wheels.html +# wheels = [ +# "./wheels/hexdump-3.3-py3-none-any.whl", +# "./wheels/jsmin-3.0.1-py3-none-any.whl", +# ] + +# # Optional: add-ons can list which resources they will require: +# # * files (for access of any filesystem operations) +# # * network (for internet access) +# # * clipboard (to read and/or write the system clipboard) +# # * camera (to capture photos and videos) +# # * microphone (to capture audio) +# # +# # If using network, remember to also check `bpy.app.online_access` +# # https://docs.blender.org/manual/en/dev/advanced/extensions/addons.html#internet-access +# # +# # For each permission it is important to also specify the reason why it is required. +# # Keep this a single short sentence without a period (.) at the end. +# # For longer explanations use the documentation or detail page. +# +# [permissions] +# network = "Need to sync motion-capture data to server" +# files = "Import/export FBX from/to disk" +# clipboard = "Copy and paste bone transforms" + +# Optional: build settings. +# https://docs.blender.org/manual/en/dev/advanced/extensions/command_line_arguments.html#command-line-args-extension-build +# [build] +# paths_exclude_pattern = [ +# "__pycache__/", +# "/.git/", +# "/*.zip", +# ] \ No newline at end of file