From 6d71669849b2ed70f8aa3da7ad0a105a0025bae3 Mon Sep 17 00:00:00 2001 From: Yusarina Date: Sun, 2 Mar 2025 15:09:36 +0000 Subject: [PATCH 01/10] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index e2daac7..eb810be 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ Join the Neoneko Discord here: https://discord.catsblenderplugin.xyz Need a more stable toolset while Avatar Toolkit is in Alpha? Then please use Blender 4.x and use our Unofficial Cats Blender Plugin which you can find [here](https://github.com/unofficalcats/Cats-Blender-Plugin-Unofficial-). +### Support us: +If you like what we do and want to help support the development of cats you can do it on our pally.gg [here](https://pally.gg/p/teamneoneko) all money is split automatically between all developers and any support is appreciated. + ## Blender version support policies. You can find them on the wiki here [HERE](https://avatartoolkit.xyz/wiki.html?version=0.1.0#what-is-avatar-toolkits-version-support-policy) From 9104bfae67b4144d6a202f1804b97d12011e0591 Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:32:49 +0000 Subject: [PATCH 02/10] Updated Alpha 1 updater - Updater will only look for Alpha 1 updates now - Will check for updates automatically when the updater tab is opened. (Same for Alpha 2, just needed update to Alpha 1 as Alpha 2 is for Blender 4.4) --- core/updater.py | 83 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/core/updater.py b/core/updater.py index c22a4cc..aa6d764 100644 --- a/core/updater.py +++ b/core/updater.py @@ -17,11 +17,17 @@ from typing import Dict, List, Tuple, Optional, Set, Any GITHUB_REPO = "teamneoneko/Avatar-Toolkit" +# Define which version series this installation can update to +# For example: ["0.1"] means only look for 0.1.x updates +# ["0.2", "0.3"] would look for both 0.2.x and 0.3.x updates +ALLOWED_VERSION_SERIES = ["0.1"] # Change this based on which version you're building + is_checking_for_update: bool = False update_needed: bool = False latest_version: Optional[str] = None latest_version_str: str = '' version_list: Optional[Dict[str, List[str]]] = None +last_manual_check_time: float = 0 main_dir: str = os.path.dirname(os.path.dirname(__file__)) downloads_dir: str = os.path.join(main_dir, "downloads") @@ -34,7 +40,9 @@ class AvatarToolkit_OT_CheckForUpdate(bpy.types.Operator): bl_options = {'INTERNAL'} def execute(self, context: bpy.types.Context) -> Set[str]: + global last_manual_check_time check_for_update_background() + last_manual_check_time = time.time() # Reset the timer on manual check return {'FINISHED'} @@ -80,7 +88,16 @@ class AvatarToolkit_PT_UpdaterPanel(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context: bpy.types.Context) -> None: + global last_manual_check_time layout = self.layout + + # Auto-check for updates when panel is drawn, but not too frequently + current_time = time.time() + if current_time - last_manual_check_time > 300: # 5 minutes between auto-checks + if not is_checking_for_update and not update_needed: + check_for_update_background() + last_manual_check_time = current_time + draw_updater_panel(context, layout) @@ -158,11 +175,23 @@ def get_github_releases() -> bool: return True def check_for_update_available() -> bool: - global latest_version, latest_version_str + global latest_version, latest_version_str, version_list if not version_list: return False - latest_version = max(version_list.keys(), key=lambda v: [int(x) for x in v.split('.')]) + # Filter versions by allowed version series + compatible_versions = {} + for v, info in version_list.items(): + for prefix in ALLOWED_VERSION_SERIES: + if v.startswith(prefix): + compatible_versions[v] = info + break + + if not compatible_versions: + print(f"No compatible versions found in series: {', '.join(ALLOWED_VERSION_SERIES)}") + return False + + latest_version = max(compatible_versions.keys(), key=lambda v: [int(x) for x in v.split('.')]) latest_version_str = latest_version current_version = get_current_version() @@ -195,11 +224,37 @@ def update_now(latest: bool = False) -> None: if not version_list: print("No version list available. Please check for updates first.") return - + if latest: - update_link = version_list[latest_version_str][0] + # Filter compatible versions + compatible_versions = {} + for v, info in version_list.items(): + for prefix in ALLOWED_VERSION_SERIES: + if v.startswith(prefix): + compatible_versions[v] = info + break + + if not compatible_versions: + print(f"No compatible versions found in series: {', '.join(ALLOWED_VERSION_SERIES)}") + return + + latest_compatible = max(compatible_versions.keys(), key=lambda v: [int(x) for x in v.split('.')]) + update_link = version_list[latest_compatible][0] else: - update_link = version_list[bpy.context.scene.avatar_toolkit_updater_version_list][0] + selected_version = bpy.context.scene.avatar_toolkit_updater_version_list + + # Check if selected version is compatible + is_compatible = False + for prefix in ALLOWED_VERSION_SERIES: + if selected_version.startswith(prefix): + is_compatible = True + break + + if not is_compatible: + print(f"Selected version {selected_version} is not in allowed series: {', '.join(ALLOWED_VERSION_SERIES)}") + return + + update_link = version_list[selected_version][0] download_file(update_link) ui_refresh() @@ -274,7 +329,17 @@ def finish_update(error: str = '') -> None: ui_refresh() def get_version_list(self, context: bpy.types.Context) -> List[Tuple[str, str, str]]: - return [(v, v, '') for v in version_list.keys()] if version_list else [] + if not version_list: + return [] + + compatible_versions = [] + for v in version_list.keys(): + for prefix in ALLOWED_VERSION_SERIES: + if v.startswith(prefix): + compatible_versions.append(v) + break + + return [(v, v, '') for v in compatible_versions] def draw_updater_panel(context: bpy.types.Context, layout: bpy.types.UILayout) -> None: box = layout.box() @@ -287,6 +352,12 @@ def draw_updater_panel(context: bpy.types.Context, layout: bpy.types.UILayout) - col.separator() + # Show compatibility info + col.label(text=f"Update series: {', '.join(s + '.x' for s in ALLOWED_VERSION_SERIES)}", icon='INFO') + col.label(text=f"Blender version: {bpy.app.version_string}", icon='BLENDER') + + col.separator() + # Update check/status section if is_checking_for_update: col.operator(AvatarToolkit_OT_CheckForUpdate.bl_idname, From 57ded41f2f6696d0c7a7133c119076c47d564942 Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:33:56 +0000 Subject: [PATCH 03/10] Update en_US.json --- resources/translations/en_US.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/translations/en_US.json b/resources/translations/en_US.json index 5f23be2..6fc3724 100644 --- a/resources/translations/en_US.json +++ b/resources/translations/en_US.json @@ -1,7 +1,7 @@ { "authors": ["Avatar Toolkit Team"], "messages": { - "AvatarToolkit.label": "Avatar Toolkit (Alpha 0.1.1)", + "AvatarToolkit.label": "Avatar Toolkit (Alpha 0.1.4)", "AvatarToolkit.desc1": "Avatar Toolkit is in Early Access there", "AvatarToolkit.desc2": "will be issues, if you find any issues,", "AvatarToolkit.desc3": "please report it on our Github.", @@ -425,4 +425,4 @@ "Language.changed.success": "Language changed successfully!", "Language.changed.restart": "Some UI elements may require restarting Blender" } -} \ No newline at end of file +} From 285c331f794b6a56c46ffc4380b918fee3e2de25 Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:34:02 +0000 Subject: [PATCH 04/10] Update ja_JP.json --- resources/translations/ja_JP.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/translations/ja_JP.json b/resources/translations/ja_JP.json index d66ff9b..c332cfe 100644 --- a/resources/translations/ja_JP.json +++ b/resources/translations/ja_JP.json @@ -1,7 +1,7 @@ { "authors": ["Avatar Toolkit Team"], "messages": { - "AvatarToolkit.label": "アバターツールキット (Alpha 0.1.1)", + "AvatarToolkit.label": "アバターツールキット (Alpha 0.1.4)", "AvatarToolkit.desc1": "アバターツールキットは早期アクセス中で", "AvatarToolkit.desc2": "問題が発生する可能性があります。問題を見つけた場合は、", "AvatarToolkit.desc3": "GitHubで報告してください。", @@ -425,4 +425,4 @@ "Language.changed.success": "言語が正常に変更されました!", "Language.changed.restart": "一部のUI要素の更新にはBlenderの再起動が必要な場合があります" } -} \ No newline at end of file +} From 30115eeaacf0cc1c7897a30e4793b09746807dbd Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:34:09 +0000 Subject: [PATCH 05/10] Update ko_KR.json --- resources/translations/ko_KR.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/translations/ko_KR.json b/resources/translations/ko_KR.json index 81b09bf..9f79182 100644 --- a/resources/translations/ko_KR.json +++ b/resources/translations/ko_KR.json @@ -1,7 +1,7 @@ { "authors": ["Avatar Toolkit Team"], "messages": { - "AvatarToolkit.label": "아바타 툴킷 (알파 0.1.1)", + "AvatarToolkit.label": "아바타 툴킷 (알파 0.1.4)", "AvatarToolkit.desc1": "아바타 툴킷은 초기 액세스 단계입니다", "AvatarToolkit.desc2": "문제가 발생할 수 있으며, 문제를 발견하시면", "AvatarToolkit.desc3": "Github에 보고해 주시기 바랍니다.", @@ -425,4 +425,4 @@ "Language.changed.success": "언어가 성공적으로 변경됨!", "Language.changed.restart": "일부 UI 요소는 블렌더 재시작이 필요할 수 있음" } - } \ No newline at end of file + } From 2dc3a19283e30c164ae1e554012e821c1d62ee2c Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:34:52 +0000 Subject: [PATCH 06/10] Update blender_manifest.toml --- blender_manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blender_manifest.toml b/blender_manifest.toml index 7b8d826..436da03 100644 --- a/blender_manifest.toml +++ b/blender_manifest.toml @@ -3,7 +3,7 @@ schema_version = "1.0.0" id = "avatar_toolkit" -version = "0.1.2" +version = "0.1.3" name = "Avatar Toolkit" tagline = "A modern tool for importing and optimizing models for VRChat, Resonite, and other similar games." maintainer = "Team NekoNeo" From 36550a42e55ec5ab274fc036b87a557dec2b19fa Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:41:33 +0000 Subject: [PATCH 07/10] Stop this version from loading on newer blenders --- __init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/__init__.py b/__init__.py index 59a9275..8e38c1a 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,24 @@ +import bpy +from bpy.app.handlers import persistent + modules = None ordered_classes = None +def show_version_error_popup(): + def draw(self, context): + self.layout.label(text="Sorry, this version of Avatar Toolkit does not work on this version of Blender.") + self.layout.label(text="Please check the GitHub repository for the correct version for your Blender.") + self.layout.operator("wm.url_open", text="Open GitHub Repository").url = "https://github.com/teamneoneko/Avatar-Toolkit" + + bpy.context.window_manager.popup_menu(draw, title="Avatar Toolkit Version Error", icon='ERROR') + def register(): + # Check Blender version first + version = bpy.app.version + if version[0] > 4 or (version[0] == 4 and version[1] > 3): + show_version_error_popup() + return + # Add wheel installation check try: import lz4 From c532e2a6a06675f75a77b38cfb1e54b7c3fd49e1 Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:42:17 +0000 Subject: [PATCH 08/10] Update en_US.json --- resources/translations/en_US.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/translations/en_US.json b/resources/translations/en_US.json index 6fc3724..b3a59f4 100644 --- a/resources/translations/en_US.json +++ b/resources/translations/en_US.json @@ -1,7 +1,7 @@ { "authors": ["Avatar Toolkit Team"], "messages": { - "AvatarToolkit.label": "Avatar Toolkit (Alpha 0.1.4)", + "AvatarToolkit.label": "Avatar Toolkit (Alpha 0.1.3)", "AvatarToolkit.desc1": "Avatar Toolkit is in Early Access there", "AvatarToolkit.desc2": "will be issues, if you find any issues,", "AvatarToolkit.desc3": "please report it on our Github.", From 10fb112de7ef4620f1c843458ab3212959aca74a Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:42:23 +0000 Subject: [PATCH 09/10] Update ja_JP.json --- resources/translations/ja_JP.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/translations/ja_JP.json b/resources/translations/ja_JP.json index c332cfe..07461fe 100644 --- a/resources/translations/ja_JP.json +++ b/resources/translations/ja_JP.json @@ -1,7 +1,7 @@ { "authors": ["Avatar Toolkit Team"], "messages": { - "AvatarToolkit.label": "アバターツールキット (Alpha 0.1.4)", + "AvatarToolkit.label": "アバターツールキット (Alpha 0.1.3)", "AvatarToolkit.desc1": "アバターツールキットは早期アクセス中で", "AvatarToolkit.desc2": "問題が発生する可能性があります。問題を見つけた場合は、", "AvatarToolkit.desc3": "GitHubで報告してください。", From eeb41dec40c053bc0db317a11b8cc7d07a64587b Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:42:29 +0000 Subject: [PATCH 10/10] Update ko_KR.json --- resources/translations/ko_KR.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/translations/ko_KR.json b/resources/translations/ko_KR.json index 9f79182..389f804 100644 --- a/resources/translations/ko_KR.json +++ b/resources/translations/ko_KR.json @@ -1,7 +1,7 @@ { "authors": ["Avatar Toolkit Team"], "messages": { - "AvatarToolkit.label": "아바타 툴킷 (알파 0.1.4)", + "AvatarToolkit.label": "아바타 툴킷 (알파 0.1.3)", "AvatarToolkit.desc1": "아바타 툴킷은 초기 액세스 단계입니다", "AvatarToolkit.desc2": "문제가 발생할 수 있으며, 문제를 발견하시면", "AvatarToolkit.desc3": "Github에 보고해 주시기 바랍니다.",