mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
changed pype env prefix in modules
This commit is contained in:
parent
d33476b724
commit
43572b5b6f
15 changed files with 47 additions and 47 deletions
|
|
@ -23,7 +23,7 @@ class AvalonModule(PypeModule, ITrayModule, IWebServerRoutes):
|
|||
avalon_mongo_url = avalon_settings["AVALON_MONGO"]
|
||||
# Use pype mongo if Avalon's mongo not defined
|
||||
if not avalon_mongo_url:
|
||||
avalon_mongo_url = os.environ["PYPE_MONGO"]
|
||||
avalon_mongo_url = os.environ["OPENPYPE_MONGO"]
|
||||
|
||||
thumbnail_root = os.environ.get("AVALON_THUMBNAIL_ROOT")
|
||||
if not thumbnail_root:
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ class AfterEffectsSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
|
|||
"AVALON_ASSET",
|
||||
"AVALON_TASK",
|
||||
"AVALON_APP_NAME",
|
||||
"PYPE_USERNAME",
|
||||
"PYPE_DEV",
|
||||
"PYPE_LOG_NO_COLORS"
|
||||
"OPENPYPE_USERNAME",
|
||||
"OPENPYPE_DEV",
|
||||
"OPENPYPE_LOG_NO_COLORS"
|
||||
]
|
||||
|
||||
environment = dict({key: os.environ[key] for key in keys
|
||||
|
|
@ -78,7 +78,7 @@ class AfterEffectsSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
|
|||
key=key,
|
||||
value=val)
|
||||
# to recognize job from PYPE for turning Event On/Off
|
||||
dln_job_info.EnvironmentKeyValue = "PYPE_RENDER_JOB=1"
|
||||
dln_job_info.EnvironmentKeyValue = "OPENPYPE_RENDER_JOB=1"
|
||||
|
||||
return dln_job_info
|
||||
|
||||
|
|
|
|||
|
|
@ -273,9 +273,9 @@ class HarmonySubmitDeadline(
|
|||
"AVALON_ASSET",
|
||||
"AVALON_TASK",
|
||||
"AVALON_APP_NAME",
|
||||
"PYPE_USERNAME",
|
||||
"PYPE_DEV",
|
||||
"PYPE_LOG_NO_COLORS"
|
||||
"OPENPYPE_USERNAME",
|
||||
"OPENPYPE_DEV",
|
||||
"OPENPYPE_LOG_NO_COLORS"
|
||||
]
|
||||
|
||||
environment = dict({key: os.environ[key] for key in keys
|
||||
|
|
@ -288,7 +288,7 @@ class HarmonySubmitDeadline(
|
|||
value=val)
|
||||
|
||||
# to recognize job from PYPE for turning Event On/Off
|
||||
job_info.EnvironmentKeyValue = "PYPE_RENDER_JOB=1"
|
||||
job_info.EnvironmentKeyValue = "OPENPYPE_RENDER_JOB=1"
|
||||
|
||||
return job_info
|
||||
|
||||
|
|
|
|||
|
|
@ -441,17 +441,17 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
"AVALON_ASSET",
|
||||
"AVALON_TASK",
|
||||
"AVALON_APP_NAME",
|
||||
"PYPE_USERNAME",
|
||||
"PYPE_DEV",
|
||||
"PYPE_LOG_NO_COLORS"
|
||||
"OPENPYPE_USERNAME",
|
||||
"OPENPYPE_DEV",
|
||||
"OPENPYPE_LOG_NO_COLORS"
|
||||
]
|
||||
|
||||
environment = dict({key: os.environ[key] for key in keys
|
||||
if key in os.environ}, **api.Session)
|
||||
environment["PYPE_LOG_NO_COLORS"] = "1"
|
||||
environment["PYPE_MAYA_VERSION"] = cmds.about(v=True)
|
||||
environment["OPENPYPE_LOG_NO_COLORS"] = "1"
|
||||
environment["OPENPYPE_MAYA_VERSION"] = cmds.about(v=True)
|
||||
# to recognize job from PYPE for turning Event On/Off
|
||||
environment["PYPE_RENDER_JOB"] = "1"
|
||||
environment["OPENPYPE_RENDER_JOB"] = "1"
|
||||
self.payload_skeleton["JobInfo"].update({
|
||||
"EnvironmentKeyValue%d" % index: "{key}={value}".format(
|
||||
key=key,
|
||||
|
|
@ -858,20 +858,20 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
envs.append(
|
||||
"AVALON_APP_NAME={}".format(os.environ.get("AVALON_APP_NAME")))
|
||||
envs.append(
|
||||
"PYPE_ASS_EXPORT_RENDER_LAYER={}".format(data["renderlayer"]))
|
||||
"OPENPYPE_ASS_EXPORT_RENDER_LAYER={}".format(data["renderlayer"]))
|
||||
envs.append(
|
||||
"PYPE_ASS_EXPORT_SCENE_FILE={}".format(data["filepath"]))
|
||||
"OPENPYPE_ASS_EXPORT_SCENE_FILE={}".format(data["filepath"]))
|
||||
envs.append(
|
||||
"PYPE_ASS_EXPORT_OUTPUT={}".format(
|
||||
"OPENPYPE_ASS_EXPORT_OUTPUT={}".format(
|
||||
payload['JobInfo']['OutputFilename0']))
|
||||
envs.append(
|
||||
"PYPE_ASS_EXPORT_START={}".format(
|
||||
"OPENPYPE_ASS_EXPORT_START={}".format(
|
||||
int(self._instance.data["frameStartHandle"])))
|
||||
envs.append(
|
||||
"PYPE_ASS_EXPORT_END={}".format(
|
||||
"OPENPYPE_ASS_EXPORT_END={}".format(
|
||||
int(self._instance.data["frameEndHandle"])))
|
||||
envs.append(
|
||||
"PYPE_ASS_EXPORT_STEP={}".format(1))
|
||||
"OPENPYPE_ASS_EXPORT_STEP={}".format(1))
|
||||
|
||||
i = 0
|
||||
for e in envs:
|
||||
|
|
@ -984,7 +984,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
|
||||
"""
|
||||
if 'verify' not in kwargs:
|
||||
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
# add 10sec timeout before bailing out
|
||||
kwargs['timeout'] = 10
|
||||
return requests.post(*args, **kwargs)
|
||||
|
|
@ -1003,7 +1003,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
|
||||
"""
|
||||
if 'verify' not in kwargs:
|
||||
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
# add 10sec timeout before bailing out
|
||||
kwargs['timeout'] = 10
|
||||
return requests.get(*args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
"PYBLISHPLUGINPATH",
|
||||
"NUKE_PATH",
|
||||
"TOOL_ENV",
|
||||
"PYPE_DEV",
|
||||
"OPENPYPE_DEV",
|
||||
"FOUNDRY_LICENSE"
|
||||
]
|
||||
environment = dict({key: os.environ[key] for key in keys
|
||||
|
|
@ -279,7 +279,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
|
||||
environment = clean_environment
|
||||
# to recognize job from PYPE for turning Event On/Off
|
||||
environment["PYPE_RENDER_JOB"] = "1"
|
||||
environment["OPENPYPE_RENDER_JOB"] = "1"
|
||||
payload["JobInfo"].update({
|
||||
"EnvironmentKeyValue%d" % index: "{key}={value}".format(
|
||||
key=key,
|
||||
|
|
|
|||
|
|
@ -114,16 +114,16 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
"FTRACK_API_USER",
|
||||
"FTRACK_API_KEY",
|
||||
"FTRACK_SERVER",
|
||||
"PYPE_METADATA_FILE",
|
||||
"OPENPYPE_METADATA_FILE",
|
||||
"AVALON_PROJECT",
|
||||
"AVALON_ASSET",
|
||||
"AVALON_TASK",
|
||||
"AVALON_APP_NAME",
|
||||
"PYPE_PUBLISH_JOB"
|
||||
"PYPE_LOG_NO_COLORS",
|
||||
"PYPE_USERNAME",
|
||||
"PYPE_RENDER_JOB",
|
||||
"PYPE_PUBLISH_JOB"
|
||||
"OPENPYPE_PUBLISH_JOB"
|
||||
"OPENPYPE_LOG_NO_COLORS",
|
||||
"OPENPYPE_USERNAME",
|
||||
"OPENPYPE_RENDER_JOB",
|
||||
"OPENPYPE_PUBLISH_JOB"
|
||||
]
|
||||
|
||||
# custom deadline atributes
|
||||
|
|
@ -223,10 +223,10 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
environment["AVALON_ASSET"] = io.Session["AVALON_ASSET"]
|
||||
environment["AVALON_TASK"] = io.Session["AVALON_TASK"]
|
||||
environment["AVALON_APP_NAME"] = os.environ.get("AVALON_APP_NAME")
|
||||
environment["PYPE_LOG_NO_COLORS"] = "1"
|
||||
environment["PYPE_USERNAME"] = instance.context.data["user"]
|
||||
environment["PYPE_PUBLISH_JOB"] = "1"
|
||||
environment["PYPE_RENDER_JOB"] = "0"
|
||||
environment["OPENPYPE_LOG_NO_COLORS"] = "1"
|
||||
environment["OPENPYPE_USERNAME"] = instance.context.data["user"]
|
||||
environment["OPENPYPE_PUBLISH_JOB"] = "1"
|
||||
environment["OPENPYPE_RENDER_JOB"] = "0"
|
||||
|
||||
args = [
|
||||
'publish',
|
||||
|
|
@ -1048,4 +1048,4 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
# Directory
|
||||
publish_folder = os.path.dirname(file_path)
|
||||
|
||||
return publish_folder
|
||||
return publish_folder
|
||||
|
|
|
|||
|
|
@ -44,5 +44,5 @@ class ValidateDeadlineConnection(pyblish.api.ContextPlugin):
|
|||
of defense SSL is providing and it is not recommended.
|
||||
"""
|
||||
if 'verify' not in kwargs:
|
||||
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
return requests.get(*args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class AppplicationsAction(BaseAction):
|
|||
type = "Application"
|
||||
label = "Application action"
|
||||
identifier = "pype_app.{}.".format(str(uuid4()))
|
||||
icon_url = os.environ.get("PYPE_STATICS_SERVER")
|
||||
icon_url = os.environ.get("OPENPYPE_STATICS_SERVER")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from pype.lib import get_pype_execute_args
|
|||
class SocketThread(threading.Thread):
|
||||
"""Thread that checks suprocess of storer of processor of events"""
|
||||
|
||||
MAX_TIMEOUT = int(os.environ.get("PYPE_FTRACK_SOCKET_TIMEOUT", 45))
|
||||
MAX_TIMEOUT = int(os.environ.get("OPENPYPE_FTRACK_SOCKET_TIMEOUT", 45))
|
||||
|
||||
def __init__(self, name, port, filepath, additional_args=[]):
|
||||
super(SocketThread, self).__init__()
|
||||
|
|
@ -57,7 +57,7 @@ class SocketThread(threading.Thread):
|
|||
)
|
||||
|
||||
env = os.environ.copy()
|
||||
env["PYPE_PROCESS_MONGO_ID"] = str(Logger.mongo_process_id)
|
||||
env["OPENPYPE_PROCESS_MONGO_ID"] = str(Logger.mongo_process_id)
|
||||
# Pype executable (with path to start script if not build)
|
||||
args = get_pype_execute_args(
|
||||
# Add `run` command
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from .ftrack_base_handler import BaseHandler
|
|||
|
||||
|
||||
def statics_icon(*icon_statics_file_parts):
|
||||
statics_server = os.environ.get("PYPE_STATICS_SERVER")
|
||||
statics_server = os.environ.get("OPENPYPE_STATICS_SERVER")
|
||||
if not statics_server:
|
||||
return None
|
||||
return "/".join((statics_server, *icon_statics_file_parts))
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class ValidateFtrackAttributes(pyblish.api.InstancePlugin):
|
|||
|
||||
Attributes to be validated are specified in:
|
||||
|
||||
`$PYPE_CONFIG/presets/<host>/ftrack_attributes.json`
|
||||
`$OPENPYPE_CONFIG/presets/<host>/ftrack_attributes.json`
|
||||
|
||||
This is array (list) of checks in format:
|
||||
[
|
||||
|
|
|
|||
|
|
@ -153,5 +153,5 @@ class MusterModule(PypeModule, ITrayModule, IWebServerRoutes):
|
|||
of defense SSL is providing and it is not recommended.
|
||||
"""
|
||||
if 'verify' not in kwargs:
|
||||
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
|
||||
return requests.post(*args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ class TimersManager(PypeModule, ITrayService, IIdleManager, IWebServerRoutes):
|
|||
|
||||
def change_timer_from_host(self, project_name, asset_name, task_name):
|
||||
"""Prepared method for calling change timers on REST api"""
|
||||
webserver_url = os.environ.get("PYPE_WEBSERVER_URL")
|
||||
webserver_url = os.environ.get("OPENPYPE_WEBSERVER_URL")
|
||||
if not webserver_url:
|
||||
self.log.warning("Couldn't find webserver url")
|
||||
return
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class UserModule(PypeModule, ITrayModule, IWebServerRoutes):
|
|||
appdirs.user_data_dir('pype-app', 'pype')
|
||||
)
|
||||
cred_filename = 'user_info.json'
|
||||
env_name = "PYPE_USERNAME"
|
||||
env_name = "OPENPYPE_USERNAME"
|
||||
|
||||
name = "user"
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ class WebServerModule(PypeModule, ITrayService):
|
|||
self.server_manager.add_static(static_prefix, resources.RESOURCES_DIR)
|
||||
|
||||
webserver_url = "http://localhost:{}".format(self.port)
|
||||
os.environ["PYPE_WEBSERVER_URL"] = webserver_url
|
||||
os.environ["PYPE_STATICS_SERVER"] = "{}{}".format(
|
||||
os.environ["OPENPYPE_WEBSERVER_URL"] = webserver_url
|
||||
os.environ["OPENPYPE_STATICS_SERVER"] = "{}{}".format(
|
||||
webserver_url, static_prefix
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue