From 1cd7d8d331aeaf4d0b618305e7ee3ba2ff6c7ac6 Mon Sep 17 00:00:00 2001 From: doc-code Date: Sat, 17 Aug 2024 00:23:17 +0200 Subject: [PATCH] Built .zip for release v.1.0.0 Remove old blender manifest file Update README for v1.0.0 Update script name for .zip to release.sh Remove operations that was specific for user_default extensions Update README with Support info and .blend path notice Update zip for v1.0.0 Fix select template popup Override first release 1.0.0 --- README.md | 16 +++++++++++-- addon/__init__.py | 7 +++--- blender_manifest.toml | 27 ---------------------- make_zip.sh | 2 -- release.sh | 2 ++ releases/1.x.x/custom_templates-1.0.0.zip | Bin 0 -> 3429 bytes 6 files changed, 20 insertions(+), 34 deletions(-) delete mode 100644 blender_manifest.toml delete mode 100644 make_zip.sh create mode 100644 release.sh create mode 100644 releases/1.x.x/custom_templates-1.0.0.zip diff --git a/README.md b/README.md index c756201..444da02 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Custom Templates - Add-On -##### v0.9.22 (12/08/2024) - ### Have you ever wanted to customize new projects? Custom Templates Add-On allows you to use your own .blend files as template options for new projects. @@ -13,6 +11,12 @@ Custom Templates Add-On allows you to use your own .blend files as template opti - Addon files: /addon/* - Release .zip files: /releases//* +### Releases + +##### v1.x + +- Version 1.0.0: [custom_templates-1.0.0.zip](./releases//1.x.x/custom_templates-1.0.0.zip) + ### Preferences In the add-on preferences, you can manage the list of your custom template files. @@ -23,6 +27,9 @@ Each template has it's Name, and Path to the .blend file. ![Custom Templates Preferences](./images/Addons_Preferences.png) +*Note that, as of now, using wrong file paths will NOT show any warning and you will get an error while opening the template.* +*Be sure to use only valid .blend files as path.* + ### How to use You can always open the add-on preferences using the button `File > Defaults > Manage templates`. @@ -32,6 +39,11 @@ Instead of using preferences, you can select a new template file using `File > D ![File > Defaults menu with the add-on custom buttons](./images/File__Defaults.png) +### Support + +As of today, the add-on has been only tested on Blender 4.2.0. +*It may or may not work on previous version.* + ### Copyright This add-on is developed under GPL-3.0 license by Francesco Bellini from 2024. diff --git a/addon/__init__.py b/addon/__init__.py index 8b89b46..b56aabe 100644 --- a/addon/__init__.py +++ b/addon/__init__.py @@ -59,8 +59,6 @@ class OT_SelectTemplatePopup(Operator): new_project = prefs.projects.add() new_project.name = self.project_name new_project.path = self.project_path - self.project_name.pop() - self.project_path.pop() self.report( {'INFO'}, f"Template '{self.project_name}' selected and added successfully!") @@ -176,7 +174,6 @@ class OT_OpenAddonPreferences(bpy.types.Operator): bpy.ops.screen.userpref_show('INVOKE_DEFAULT') context.preferences.active_section = 'ADDONS' context.window_manager.addon_search = "Custom Templates" - bpy.ops.preferences.addon_expand(module="bl_ext.user_default.custom_templates") return {'FINISHED'} # Add-On Preferences @@ -230,16 +227,20 @@ def draw_new_menu(self, context): "wm.read_homefile", text=project.name).filepath = project.path +# File > Defaults > Add-On Buttons def draw_add_template(self, context): layout = self.layout draw_addon_separator(layout) + # Manage Template layout.operator("custom_templates.open_preferences", text="Manage templates") + # Select new custom template layout.operator("wm.select_template_popup", text="Select new custom template") if bpy.data.filepath != "": + # Use current as new template (only with an active saved .blend file opened) layout.operator("wm.add_template_popup", text="Use current as new template") diff --git a/blender_manifest.toml b/blender_manifest.toml deleted file mode 100644 index 3fcbaac..0000000 --- a/blender_manifest.toml +++ /dev/null @@ -1,27 +0,0 @@ -schema_version = "1.0.0" -id = "custom_templates" -version = "0.9.22" -name = "Custom Templates" -tagline = "Use your own .blend files as template options for new projects" -maintainer = "Francesco Bellini " -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 = ["System"] - -blender_version_min = "4.2.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-3.0-or-later", -] -# Optional: required by some licenses. -copyright = [ - "2024 Francesco Bellini", -] - diff --git a/make_zip.sh b/make_zip.sh deleted file mode 100644 index c19e61c..0000000 --- a/make_zip.sh +++ /dev/null @@ -1,2 +0,0 @@ - -zip -9 -r ./releases/0.9.x/custom_templates-0.9.22.zip ./addon/ \ No newline at end of file diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..ea565fe --- /dev/null +++ b/release.sh @@ -0,0 +1,2 @@ + +zip -9 -r ./releases/1.x.x/custom_templates-1.0.0.zip ./addon/ \ No newline at end of file diff --git a/releases/1.x.x/custom_templates-1.0.0.zip b/releases/1.x.x/custom_templates-1.0.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..4a13be0f9207d4db1a114473ec643cbbe2a5241f GIT binary patch literal 3429 zcmZ`+XH*l|whq07E+7aI2vrp61f)Y~Qbd{rgwT};NsxphO^WnTM@oh&ML@^^BA_76 z&_Se12{lTT;sAmu_2JCD^X{8>=bW|oI%l1=zrEM_{(PUMDGe<%;OB~^=7jxm_*bF_ z2m)L^JWxnkTN@?-P2Rh9ub+Vp0s^RLKhXdHe`;Pib47M`~ez!2KY1n23lrinmR7W(RO$%xr?sU{PsYB zw9Z{!G%SG!$i?MgOVBjO3EtRJ_5J#LZtH;iOTYLh>Dm#$$n}GmEadu zc8_+Dd_KLoc;B9KRteGbYw`+s`nc`Q_(vn{wKEf)z1v$r(cKC0BI_8$dAV!ThYwj| zU5gnI&(Vq-mvo8e8WP${hV>@-gr0}y&^PY)Lz8@%kaF=caoH(81~NSZ%iHEMTb3|{ zb5cSZ2*gLZp7_Y>#?rY)qL%fVZpIaG=4CUUGKYM$Wc>Du2qg>Ra0+}XYcVjBaMDs= z!#MIvs5eMLXDhFB*?C8GdJnBAAC+#$mx&1#k0ABs8#wJ8SCVq3bBp8=Ce=7~Hp9Fg z{~lGJ_!ko+lOhmTds@?9P~Bl8Zq-4Sh;j#&cHg7s@pXjehD{9WH4m89^yZXEud>Ih z>E)?>BLUZ_y4a`rMM;M(fpExJWsJJ^q4p_o?-$pCSUzU2eD=Vmk4XqyE9p3bwO`rA z@bzFCrU;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