mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
27 lines
639 B
Python
27 lines
639 B
Python
import os
|
|
import sys
|
|
|
|
import openpype
|
|
import pyblish.api
|
|
from openpype.tools.utils.host_tools import show_publish
|
|
|
|
|
|
def main(env):
|
|
# Registers pype's Global pyblish plugins
|
|
openpype.install()
|
|
|
|
# Register additional paths
|
|
addition_paths_str = env.get("PUBLISH_PATHS") or ""
|
|
addition_paths = addition_paths_str.split(os.pathsep)
|
|
for path in addition_paths:
|
|
path = os.path.normpath(path)
|
|
if not os.path.exists(path):
|
|
continue
|
|
pyblish.api.register_plugin_path(path)
|
|
|
|
return show_publish()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
result = main(os.environ)
|
|
sys.exit(not bool(result))
|