Skip to content

Commit

Permalink
improve error message for outdated Blender version
Browse files Browse the repository at this point in the history
  • Loading branch information
ScanMountGoat committed Jul 29, 2024
1 parent 2c80faf commit 4df1c29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## unreleased
### Changed
* Improved the error message when attempting to install the addon on an unsupported Blender version.

### Fixed
* Fixed an issue where exporting would fail if an image texture did not use the expected naming convention.
* Fixed an issue where some models would not correctly generate outline meshes for all relevant meshes.
Expand Down
7 changes: 7 additions & 0 deletions xenoblade_blender/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def menu_import_camdo(self, context):


def register():
if bpy.app.version < bl_info["blender"]:
current_version = ".".join(str(v) for v in bpy.app.version)
expected_version = ".".join(str(v) for v in bl_info["blender"])
raise ImportError(
f"Blender version {current_version} is incompatible. Use version {expected_version} or later."
)

for cls in classes:
bpy.utils.register_class(cls)

Expand Down

0 comments on commit 4df1c29

Please sign in to comment.