浏览代码

Merge branch 'dev'

AUTOMATIC1111 1 年之前
父节点
当前提交
e2b177c508
共有 3 个文件被更改,包括 7 次插入4 次删除
  1. 5 0
      CHANGELOG.md
  2. 1 1
      extensions-builtin/hypertile/scripts/hypertile_xyz.py
  3. 1 3
      modules/script_loading.py

+ 5 - 0
CHANGELOG.md

@@ -1,3 +1,8 @@
+## 1.9.2
+
+### Extensions and API:
+* restore 1.8.0-style naming of scripts
+
 ## 1.9.1
 ## 1.9.1
 
 
 ### Minor:
 ### Minor:

+ 1 - 1
extensions-builtin/hypertile/scripts/hypertile_xyz.py

@@ -1,7 +1,7 @@
 from modules import scripts
 from modules import scripts
 from modules.shared import opts
 from modules.shared import opts
 
 
-xyz_grid = [x for x in scripts.scripts_data if x.script_class.__module__ == "scripts.xyz_grid"][0].module
+xyz_grid = [x for x in scripts.scripts_data if x.script_class.__module__ == "xyz_grid.py"][0].module
 
 
 def int_applier(value_name:str, min_range:int = -1, max_range:int = -1):
 def int_applier(value_name:str, min_range:int = -1, max_range:int = -1):
     """
     """

+ 1 - 3
modules/script_loading.py

@@ -8,9 +8,7 @@ loaded_scripts = {}
 
 
 
 
 def load_module(path):
 def load_module(path):
-    module_name, _ = os.path.splitext(os.path.basename(path))
-    full_module_name = "scripts." + module_name
-    module_spec = importlib.util.spec_from_file_location(full_module_name, path)
+    module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path)
     module = importlib.util.module_from_spec(module_spec)
     module = importlib.util.module_from_spec(module_spec)
     module_spec.loader.exec_module(module)
     module_spec.loader.exec_module(module)