Skip to content

Commit

Permalink
Fix Blender 4.2 import/export errors (again).
Browse files Browse the repository at this point in the history
  • Loading branch information
Greatness7 committed Nov 14, 2024
1 parent 6d68341 commit 1ad530c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bl_info = {
"name": "Morrowind (.nif)",
"author": "Greatness7",
"version": (0, 8, 101),
"version": (0, 8, 102),
"blender": (3, 0, 0),
"location": "File > Import/Export > Morrowind (.nif)",
"description": "Import/Export files for Morrowind",
Expand Down
2 changes: 1 addition & 1 deletion blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version = "1.0.0"

id = "io_scene_mw"
version = "0.8.101"
version = "0.8.102"
name = "Morrowind Blender Plugin"
tagline = "Import/Export files for Morrowind"
maintainer = "Greatness7 <[email protected]>"
Expand Down
4 changes: 1 addition & 3 deletions nif_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,7 @@ def setup_markers(self, data):

@property
def scale_correction(self):
addon = bpy.context.preferences.addons[
"bl_ext.user_default.io_scene_mw" if bpy.app.version >= (4, 2, 0) else "io_scene_mw"
]
addon = bpy.context.preferences.addons[__package__]
return 1 / addon.preferences.scale_correction

@property
Expand Down
8 changes: 2 additions & 6 deletions nif_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,7 @@ def import_keyframe_data(self, data):

@property
def scale_correction(self):
addon = bpy.context.preferences.addons[
"bl_ext.user_default.io_scene_mw" if bpy.app.version >= (4, 2, 0) else "io_scene_mw"
]
addon = bpy.context.preferences.addons[__package__]
return addon.preferences.scale_correction


Expand Down Expand Up @@ -1024,9 +1022,7 @@ def resolve_texture_path(
suffixes = {path.suffix, ".dds", ".tga", ".bmp"}

# evaluate final image path
addon = bpy.context.preferences.addons[
"bl_ext.user_default.io_scene_mw" if bpy.app.version >= (4, 2, 0) else "io_scene_mw"
]
addon = bpy.context.preferences.addons[__package__]
for item in addon.preferences.texture_paths:
abspath = item.name / path
for suffix in suffixes:
Expand Down

0 comments on commit 1ad530c

Please sign in to comment.