diff --git a/README.md b/README.md index d05dd68..6996b5a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ Standard Bat pack is doing an "assembly", modifying file internal links. This zi ### Changelog +1.3.3 + +- code: sys.module name corrected when addon folder isn't named `blender_asset_tracer` as expected + 1.3.2 - changed: zip packer ops label `Export File to .ZIP` >> `Zip Pack - keep hierachy` diff --git a/__init__.py b/__init__.py index fc0eace..d7f460f 100644 --- a/__init__.py +++ b/__init__.py @@ -25,7 +25,7 @@ __version__ = '1.3' bl_info = { "name": "Blender Asset Tracer", "author": "Campbell Barton, Sybren A. Stüvel, Loïc Charrière and Clément Ducarteron", - "version": (1, 3, 2), + "version": (1, 3, 3), "blender": (2, 80, 0), "location": "File > External Data > BAT", "description": "Utility for packing blend files", @@ -34,6 +34,13 @@ bl_info = { "category": "Import-Export", } + +## Reset root module name +## if folder has an unexpected name (like "blender_asset_tracer-main" from zip-dl) +import sys +if __name__ != "blender_asset_tracer": + sys.modules["blender_asset_tracer"] = sys.modules[__name__] + import bpy from bpy.types import Operator from bpy_extras.io_utils import ExportHelper @@ -43,7 +50,7 @@ from pathlib import Path, PurePath import os import re -import sys +# import sys import subprocess import tempfile from blender_asset_tracer.trace import deps