Skip to content

Commit

Permalink
Merge pull request #229 from azmodii/main
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikDoom authored Sep 2, 2023
2 parents 86ea94a + 53f46c9 commit d4cca00
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/shared_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,20 @@
except AttributeError:
LYCO_PATH = None


def find_ext_wildcard_paths():
"""Returns the path to the extension wildcards folder"""
found = list(EXT_PATH.glob("*/wildcards/"))
# Try to find the wildcard path from the shared opts
try:
from modules.shared import opts
except ImportError: # likely not in an a1111 context
opts = None

wildcard_dir = getattr(opts, "wildcard_dir", None)
if wildcard_dir is not None:
wildcard_dir = Path(wildcard_dir)
if wildcard_dir.exists():
found.append(wildcard_dir)
return found


Expand Down

0 comments on commit d4cca00

Please sign in to comment.