set module name
1.3.3 - code: sys.module name corrected when addon folder isn't named `blender_asset_tracer` as expectedmain
parent
c4cabccbb7
commit
dd82a38956
|
@ -16,6 +16,10 @@ Standard Bat pack is doing an "assembly", modifying file internal links. This zi
|
||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
1.3.3
|
||||||
|
|
||||||
|
- code: sys.module name corrected when addon folder isn't named `blender_asset_tracer` as expected
|
||||||
|
|
||||||
1.3.2
|
1.3.2
|
||||||
|
|
||||||
- changed: zip packer ops label `Export File to .ZIP` >> `Zip Pack - keep hierachy`
|
- changed: zip packer ops label `Export File to .ZIP` >> `Zip Pack - keep hierachy`
|
||||||
|
|
11
__init__.py
11
__init__.py
|
@ -25,7 +25,7 @@ __version__ = '1.3'
|
||||||
bl_info = {
|
bl_info = {
|
||||||
"name": "Blender Asset Tracer",
|
"name": "Blender Asset Tracer",
|
||||||
"author": "Campbell Barton, Sybren A. Stüvel, Loïc Charrière and Clément Ducarteron",
|
"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),
|
"blender": (2, 80, 0),
|
||||||
"location": "File > External Data > BAT",
|
"location": "File > External Data > BAT",
|
||||||
"description": "Utility for packing blend files",
|
"description": "Utility for packing blend files",
|
||||||
|
@ -34,6 +34,13 @@ bl_info = {
|
||||||
"category": "Import-Export",
|
"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
|
import bpy
|
||||||
from bpy.types import Operator
|
from bpy.types import Operator
|
||||||
from bpy_extras.io_utils import ExportHelper
|
from bpy_extras.io_utils import ExportHelper
|
||||||
|
@ -43,7 +50,7 @@ from pathlib import Path, PurePath
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
# import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
from blender_asset_tracer.trace import deps
|
from blender_asset_tracer.trace import deps
|
||||||
|
|
Loading…
Reference in New Issue