mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
implemented append_user_scripts using OPENPYPE_BLENDER_USER_SCRIPTS env to load user scripts
This commit is contained in:
parent
424e9950e7
commit
5110374a1b
1 changed files with 12 additions and 0 deletions
|
|
@ -91,3 +91,15 @@ def load_scripts(paths):
|
|||
"Warning, unregistered class: %s(%s)" %
|
||||
(subcls.__name__, cls.__name__)
|
||||
)
|
||||
|
||||
|
||||
def append_user_scripts():
|
||||
user_scripts = os.environ.get("OPENPYPE_BLENDER_USER_SCRIPTS")
|
||||
if not user_scripts:
|
||||
return
|
||||
|
||||
try:
|
||||
load_scripts(user_scripts.split(os.pathsep))
|
||||
except Exception:
|
||||
print("Couldn't load user scripts \"{}\"".format(user_scripts))
|
||||
traceback.print_exc()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue