Skip to content

Commit

Permalink
add an error for ARM devices
Browse files Browse the repository at this point in the history
  • Loading branch information
matyalatte committed Oct 21, 2023
1 parent bd7df0d commit be56016
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 4 additions & 5 deletions addons/blender_dds_addon/directx/texconv.py
Expand Up @@ -74,13 +74,12 @@ def load_dll(self, dll_path=None):
raise RuntimeError(f'This OS ({util.get_os_name()}) is unsupported.')
dirname = os.path.dirname(file_path)
dll_path = os.path.join(dirname, dll_name)
dll_path2 = os.path.join(os.path.dirname(dirname), dll_name) # allow ../texconv.dll

if util.is_arm():
raise RuntimeError(f'{dll_name} does NOT support ARM devices')

if not os.path.exists(dll_path):
if os.path.exists(dll_path2):
dll_path = dll_path2
else:
raise RuntimeError(f'texconv not found. ({dll_path})')
raise RuntimeError(f'texconv not found. ({dll_path})')

self.dll = ctypes.cdll.LoadLibrary(dll_path)
DLL = self.dll
Expand Down
4 changes: 4 additions & 0 deletions addons/blender_dds_addon/directx/util.py
Expand Up @@ -36,3 +36,7 @@ def is_linux():

def is_mac():
return get_os_name() == 'Darwin'


def is_arm():
return 'arm' in platform.machine().lower()
1 change: 1 addition & 0 deletions changelog.txt
Expand Up @@ -2,6 +2,7 @@ ver 0.3.3
- Fixed a crash when closing Blender after exporting BC6 or BC7 textures.
- Fixed a bug that sRGB formats make textures brighter when exporting.
- Fixed an error when importing files from some specific directory structures.
- Added an error for ARM devices.

ver 0.3.2
- Fixed an error when importing dds without image editor opened.
Expand Down

0 comments on commit be56016

Please sign in to comment.