Skip to content

Commit

Permalink
update documents, update blender versions for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matyalatte committed May 25, 2023
1 parent bc76599 commit 49fe57b
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 21 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion addons/blender_dds_addon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion addons/blender_dds_addon/ui/bpy_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions addons/blender_dds_addon/ui/custom_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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


Expand Down
2 changes: 1 addition & 1 deletion addons/blender_dds_addon/ui/export_dds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions addons/blender_dds_addon/ui/preferences.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/How-To-Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand All @@ -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`.
Expand Down
13 changes: 7 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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)
<a href="https://www.buymeacoffee.com/matyalatteQ" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Expand Down Expand Up @@ -124,23 +125,23 @@ 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

[Texconv](https://github.com/microsoft/DirectXTex/wiki/Texconv)
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.

0 comments on commit 49fe57b

Please sign in to comment.