More Fixes

- Fixes an other error in the updater due to urllib not being imported and used correctly.
- Small Atlas Texturing fixes and UI Improvements.
This commit is contained in:
Yusarina
2024-11-26 03:12:42 +00:00
parent 346f73ebb0
commit 4d20ce77f7
4 changed files with 148 additions and 105 deletions
+18
View File
@@ -29,6 +29,24 @@ def register() -> None:
description=t("MergeArmatures.selected_armature.label")
)))
register_property((bpy.types.Object, "material_group_expanded", bpy.props.BoolProperty(
name="Expand Material Group",
description="Show/hide materials for this mesh",
default=False
)))
register_property((bpy.types.Material, "material_expanded", bpy.props.BoolProperty(
name="Expand Material",
description="Show/hide material properties",
default=False
)))
register_property((bpy.types.Material, "include_in_atlas", bpy.props.BoolProperty(
name=t("TextureAtlas.include_in_atlas"),
description=t("TextureAtlas.include_in_atlas_desc"),
default=True
)))
register_property((bpy.types.Scene, "merge_armature_apply_transforms", bpy.props.BoolProperty(
default=False,
name=t("MergeArmature.merge_armatures.apply_transforms.label"),
+4 -3
View File
@@ -7,6 +7,7 @@ import shutil
import pathlib
import zipfile
import time
from urllib import request, error
from threading import Thread
from bpy.app.handlers import persistent
from ..functions.translations import t
@@ -140,9 +141,9 @@ def get_github_releases() -> bool:
try:
ssl._create_default_https_context = ssl._create_unverified_context
with urllib.request.urlopen(f'https://api.github.com/repos/{GITHUB_REPO}/releases') as url:
with request.urlopen(f'https://api.github.com/repos/{GITHUB_REPO}/releases') as url:
data = json.loads(url.read().decode())
except urllib.error.URLError:
except error.URLError:
print('URL ERROR')
return False
@@ -214,7 +215,7 @@ def download_file(update_url: str) -> None:
try:
ssl._create_default_https_context = ssl._create_unverified_context
urllib.request.urlretrieve(update_url, update_zip_file)
except urllib.error.URLError:
except error.URLError:
finish_update(error=t('download_file.cantConnect'))
return