diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1afc832..4b694c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,22 +37,22 @@ jobs: fail-fast: false matrix: include: - # Test with 2.83, 3.0, and 3.3 on Windows + # Test with 2.83, 3.3, and 3.5 on Windows - platform: windows-latest - blender-version: '3.3.3' + blender-version: '3.5.1' - platform: windows-latest - blender-version: '3.0.1' + blender-version: '3.3.7' - platform: windows-latest blender-version: '2.83.20' - # Test with 3.3 on Unix systems + # Test with 3.3 on Unix/Linux systems - platform: ubuntu-latest - blender-version: '3.3.3' + blender-version: '3.3.7' - platform: macos-latest - blender-version: '3.3.3' + blender-version: '3.3.7' steps: - uses: actions/checkout@v3 diff --git a/addons/blender_dds_addon/__init__.py b/addons/blender_dds_addon/__init__.py index fbc3991..886106a 100644 --- a/addons/blender_dds_addon/__init__.py +++ b/addons/blender_dds_addon/__init__.py @@ -8,7 +8,7 @@ bl_info = { 'name': 'DDS textures', 'author': 'Matyalatte', - 'version': (0, 3, 1), + 'version': (0, 3, 2), 'blender': (2, 83, 20), 'location': 'Image Editor > Sidebar > DDS Tab', 'description': 'Import and export .dds files', diff --git a/addons/blender_dds_addon/ui/bpy_util.py b/addons/blender_dds_addon/ui/bpy_util.py index b09d04d..adce5f5 100644 --- a/addons/blender_dds_addon/ui/bpy_util.py +++ b/addons/blender_dds_addon/ui/bpy_util.py @@ -34,7 +34,7 @@ def load_texture(file, name, color_space='Non-Color'): """Load a texture file. Args: - file (string): file path for dds + file (string): file path for tga name (string): object name for the texture color_space (string): color space diff --git a/addons/blender_dds_addon/ui/custom_properties.py b/addons/blender_dds_addon/ui/custom_properties.py index dee37e2..3a37ee4 100644 --- a/addons/blender_dds_addon/ui/custom_properties.py +++ b/addons/blender_dds_addon/ui/custom_properties.py @@ -8,7 +8,7 @@ fmt_list = [fmt.name for fmt in DXGI_FORMAT] fmt_list = [fmt for fmt in fmt_list if "BC" in fmt] + [fmt for fmt in fmt_list if "BC" not in fmt] -dic = { +alt_format = { "BC1_UNORM": " (DXT1)", "BC3_UNORM": " (DXT5)", "BC4_UNORM": " (ATI1)", @@ -18,8 +18,8 @@ def get_alt_fmt(fmt): """Add alt name for the format.""" - if fmt in dic: - return fmt + dic[fmt] + if fmt in alt_format: + return fmt + alt_format[fmt] return fmt diff --git a/addons/blender_dds_addon/ui/export_dds.py b/addons/blender_dds_addon/ui/export_dds.py index cea94ee..72d0bca 100644 --- a/addons/blender_dds_addon/ui/export_dds.py +++ b/addons/blender_dds_addon/ui/export_dds.py @@ -40,7 +40,7 @@ def save_dds(tex, file, dds_fmt, invert_normals=False, no_mip=False, texconv (Texconv): Texture converter for dds. Returns: - tex (bpy.types.Image): loaded texture + tex (bpy.types.Image): saved texture """ is_cube = "cube" in texture_type is_array = "array" in texture_type diff --git a/addons/blender_dds_addon/ui/preferences.py b/addons/blender_dds_addon/ui/preferences.py index 09957ee..fcf513e 100644 --- a/addons/blender_dds_addon/ui/preferences.py +++ b/addons/blender_dds_addon/ui/preferences.py @@ -1,3 +1,9 @@ +"""UI panel for addon preferences. + +Notes: + Edit > Preferences > Add-ons > Imoprt-Export: DDS textures +""" + import bpy from bpy.types import AddonPreferences from bpy.props import BoolProperty diff --git a/docs/How-To-Build.md b/docs/How-To-Build.md index ec79766..59d6b62 100644 --- a/docs/How-To-Build.md +++ b/docs/How-To-Build.md @@ -15,7 +15,7 @@ Make sure that [Texconv-Custom-DLL](https://github.com/matyalatte/Texconv-Custom If you won't use Visual Studio 2022, you could need to edit cmake commands in batch files. -### for Unix +### for Unix/Lunux - xcode (for macOS) - build-essential (for Ubuntu) @@ -28,7 +28,7 @@ Move to `./Blender-DDS-Addon`. Then, type `git submodule update --init --recursive`. It'll clone external repositories to the addon's repo. -## 2. Get `sal.h` (for Unix systems) +## 2. Get `sal.h` (for Unix/Linux systems) If you are using non-Windows platforms, you should download [sal.h](https://github.com/dotnet/corert/blob/master/src/Native/inc/unix/sal.h) for DirectXMath. @@ -44,7 +44,7 @@ Move to `./Blender-DDS-Addon/external/Texconv-Custom-DLL/batch_files`. Then, type `build_small.bat`. `texconv.dll` will be generated in `./Blender-DDS-Addon/external/Texconv-Custom-DLL/` -### for Unix +### for Unix/Linux Move to `./Blender-DDS-Addon/external/Texconv-Custom-DLL/shell_scripts`. Then, type `bash build_small.sh`. diff --git a/docs/README.md b/docs/README.md index 3830b56..532e6c6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,6 @@ -# Blender-DDS-Addon v0.3.1 +# Blender-DDS-Addon v0.3.2 +[![Github All Releases](https://img.shields.io/github/downloads/matyalatte/Blender-DDS-Addon/total.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![build](https://github.com/matyalatte/Blender-DDS-Addon/actions/workflows/build.yml/badge.svg) Buy Me A Coffee @@ -124,7 +125,7 @@ See wiki pages for the details. - [Cubemaps](https://github.com/matyalatte/Blender-DDS-Addon/wiki/Cubemaps) - [Texture Arrays](https://github.com/matyalatte/Blender-DDS-Addon/wiki/Texture-Arrays) -## External Dependencies +## External Projects ### Texconv-Custom-DLL @@ -132,15 +133,15 @@ See wiki pages for the details. is a texture converter developed by Microsoft. It's the best DDS converter as far as I know. And [Texconv-Custom-DLL](https://github.com/matyalatte/Texconv-Custom-DLL) is a cross-platform implementation I made. -The official Texconv only supports Windows but you can use it on Unix systems. +The official Texconv only supports Windows but you can use it on Unix/Linux systems. ## License -Files in this repository (including all submodules) are licensed under [MIT license](../LICENSE). +Files in this repository (including all submodules) are available under the [MIT license](../LICENSE). ## For Developers There are some documents for developers. -- [How to Build](./How-To-Build.md): See here if you want to know how to create a zip from the repository. -- [Tools for development](./For-Dev.md): See here if you want to know how to test the addon. +- [How to Build](./How-To-Build.md): How to create a zip from the repository. +- [Tools for development](./For-Dev.md): How to test the addon.