mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove AYON_SERVER_ENABLED checks in hosts and modules
This commit is contained in:
parent
90d68c7e86
commit
ea1268f69d
49 changed files with 126 additions and 647 deletions
|
|
@ -1,4 +1,3 @@
|
|||
from ayon_core import AYON_SERVER_ENABLED
|
||||
import ayon_core.hosts.aftereffects.api as api
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.pipeline import (
|
||||
|
|
@ -46,11 +45,7 @@ class AEWorkfileCreator(AutoCreator):
|
|||
|
||||
existing_asset_name = None
|
||||
if existing_instance is not None:
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_asset_name = existing_instance.get("folderPath")
|
||||
|
||||
if existing_asset_name is None:
|
||||
existing_asset_name = existing_instance["asset"]
|
||||
existing_asset_name = existing_instance.get("folderPath")
|
||||
|
||||
if existing_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -59,13 +54,10 @@ class AEWorkfileCreator(AutoCreator):
|
|||
project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": self.default_variant
|
||||
"variant": self.default_variant,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
data.update(self.get_dynamic_data(
|
||||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name, None
|
||||
|
|
@ -88,10 +80,6 @@ class AEWorkfileCreator(AutoCreator):
|
|||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import bpy
|
|||
import bpy.utils.previews
|
||||
|
||||
from ayon_core import style
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import get_current_asset_name, get_current_task_name
|
||||
from ayon_core.tools.utils import host_tools
|
||||
|
||||
|
|
@ -312,14 +311,6 @@ class LaunchLoader(LaunchQtApp):
|
|||
bl_label = "Load..."
|
||||
_tool_name = "loader"
|
||||
|
||||
def before_window_show(self):
|
||||
if AYON_SERVER_ENABLED:
|
||||
return
|
||||
self._window.set_context(
|
||||
{"asset": get_current_asset_name()},
|
||||
refresh=True
|
||||
)
|
||||
|
||||
|
||||
class LaunchPublisher(LaunchQtApp):
|
||||
"""Launch Avalon Publisher."""
|
||||
|
|
@ -339,11 +330,6 @@ class LaunchManager(LaunchQtApp):
|
|||
bl_label = "Manage..."
|
||||
_tool_name = "sceneinventory"
|
||||
|
||||
def before_window_show(self):
|
||||
if AYON_SERVER_ENABLED:
|
||||
return
|
||||
self._window.refresh()
|
||||
|
||||
|
||||
class LaunchLibrary(LaunchQtApp):
|
||||
"""Launch Library Loader."""
|
||||
|
|
@ -352,11 +338,6 @@ class LaunchLibrary(LaunchQtApp):
|
|||
bl_label = "Library..."
|
||||
_tool_name = "libraryloader"
|
||||
|
||||
def before_window_show(self):
|
||||
if AYON_SERVER_ENABLED:
|
||||
return
|
||||
self._window.refresh()
|
||||
|
||||
|
||||
class LaunchWorkFiles(LaunchQtApp):
|
||||
"""Launch Avalon Work Files."""
|
||||
|
|
@ -366,22 +347,7 @@ class LaunchWorkFiles(LaunchQtApp):
|
|||
_tool_name = "workfiles"
|
||||
|
||||
def execute(self, context):
|
||||
result = super().execute(context)
|
||||
if not AYON_SERVER_ENABLED:
|
||||
self._window.set_context({
|
||||
"asset": get_current_asset_name(),
|
||||
"task": get_current_task_name()
|
||||
})
|
||||
return result
|
||||
|
||||
def before_window_show(self):
|
||||
if AYON_SERVER_ENABLED:
|
||||
return
|
||||
self._window.root = str(Path(
|
||||
os.environ.get("AVALON_WORKDIR", ""),
|
||||
os.environ.get("AVALON_SCENEDIR", ""),
|
||||
))
|
||||
self._window.refresh()
|
||||
return super().execute(context)
|
||||
|
||||
|
||||
class SetFrameRange(bpy.types.Operator):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from typing import Dict, List, Optional
|
|||
|
||||
import bpy
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import (
|
||||
Creator,
|
||||
CreatedInstance,
|
||||
|
|
@ -231,10 +230,7 @@ class BaseCreator(Creator):
|
|||
bpy.context.scene.collection.children.link(instances)
|
||||
|
||||
# Create asset group
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance_data["folderPath"].split("/")[-1]
|
||||
else:
|
||||
asset_name = instance_data["asset"]
|
||||
asset_name = instance_data["folderPath"].split("/")[-1]
|
||||
|
||||
name = prepare_scene_name(asset_name, subset_name)
|
||||
if self.create_as_asset_group:
|
||||
|
|
@ -295,11 +291,6 @@ class BaseCreator(Creator):
|
|||
and their changes, as a list of tuples.
|
||||
"""
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name_key = "folderPath"
|
||||
else:
|
||||
asset_name_key = "asset"
|
||||
|
||||
for created_instance, changes in update_list:
|
||||
data = created_instance.data_to_store()
|
||||
node = created_instance.transient_data["instance_node"]
|
||||
|
|
@ -316,11 +307,9 @@ class BaseCreator(Creator):
|
|||
# workfile instance is included in the AVALON_CONTAINER collection.
|
||||
if (
|
||||
"subset" in changes.changed_keys
|
||||
or asset_name_key in changes.changed_keys
|
||||
or "folderPath" in changes.changed_keys
|
||||
) and created_instance.family != "workfile":
|
||||
asset_name = data[asset_name_key]
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = asset_name.split("/")[-1]
|
||||
asset_name = data["folderPath"].split("/")[-1]
|
||||
name = prepare_scene_name(
|
||||
asset=asset_name, subset=data["subset"]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import bpy
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import CreatedInstance, AutoCreator
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.hosts.blender.api.plugin import BaseCreator
|
||||
|
|
@ -40,11 +39,7 @@ class CreateWorkfile(BaseCreator, AutoCreator):
|
|||
|
||||
existing_asset_name = None
|
||||
if workfile_instance is not None:
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_asset_name = workfile_instance.get("folderPath")
|
||||
|
||||
if existing_asset_name is None:
|
||||
existing_asset_name = workfile_instance["asset"]
|
||||
existing_asset_name = workfile_instance.get("folderPath")
|
||||
|
||||
if not workfile_instance:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -52,13 +47,10 @@ class CreateWorkfile(BaseCreator, AutoCreator):
|
|||
task_name, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": task_name,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
data.update(
|
||||
self.get_dynamic_data(
|
||||
task_name,
|
||||
|
|
@ -84,11 +76,8 @@ class CreateWorkfile(BaseCreator, AutoCreator):
|
|||
subset_name = self.get_subset_name(
|
||||
task_name, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
workfile_instance["folderPath"] = asset_name
|
||||
else:
|
||||
workfile_instance["asset"] = asset_name
|
||||
|
||||
workfile_instance["folderPath"] = asset_name
|
||||
workfile_instance["task"] = task_name
|
||||
workfile_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
Action
|
||||
{
|
||||
ID = "OpenPype_Menu",
|
||||
Category = "OpenPype",
|
||||
Name = "OpenPype Menu",
|
||||
|
||||
Targets =
|
||||
{
|
||||
Composition =
|
||||
{
|
||||
Execute = _Lua [=[
|
||||
local scriptPath = app:MapPath("OpenPype:../MenuScripts/launch_menu.py")
|
||||
if bmd.fileexists(scriptPath) == false then
|
||||
print("[OpenPype Error] Can't run file: " .. scriptPath)
|
||||
else
|
||||
target:RunScript(scriptPath)
|
||||
end
|
||||
]=],
|
||||
},
|
||||
},
|
||||
},
|
||||
Action
|
||||
{
|
||||
ID = "OpenPype_Install_PySide2",
|
||||
Category = "OpenPype",
|
||||
Name = "Install PySide2",
|
||||
|
||||
Targets =
|
||||
{
|
||||
Composition =
|
||||
{
|
||||
Execute = _Lua [=[
|
||||
local scriptPath = app:MapPath("OpenPype:../MenuScripts/install_pyside2.py")
|
||||
if bmd.fileexists(scriptPath) == false then
|
||||
print("[OpenPype Error] Can't run file: " .. scriptPath)
|
||||
else
|
||||
target:RunScript(scriptPath)
|
||||
end
|
||||
]=],
|
||||
},
|
||||
},
|
||||
},
|
||||
Menus
|
||||
{
|
||||
Target = "ChildFrame",
|
||||
|
||||
Before "Help"
|
||||
{
|
||||
Sub "OpenPype"
|
||||
{
|
||||
"OpenPype_Menu{}",
|
||||
"_",
|
||||
Sub "Admin" {
|
||||
"OpenPype_Install_PySide2{}"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
Locked = true,
|
||||
Global = {
|
||||
Paths = {
|
||||
Map = {
|
||||
["OpenPype:"] = "$(OPENPYPE_FUSION)/deploy/openpype",
|
||||
["Config:"] = "UserPaths:Config;OpenPype:Config",
|
||||
["Scripts:"] = "UserPaths:Scripts;Reactor:System/Scripts",
|
||||
},
|
||||
},
|
||||
Script = {
|
||||
PythonVersion = 3,
|
||||
Python3Forced = true
|
||||
},
|
||||
UserInterface = {
|
||||
Language = "en_US"
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@ import os
|
|||
import shutil
|
||||
import platform
|
||||
from pathlib import Path
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.hosts.fusion import (
|
||||
FUSION_HOST_DIR,
|
||||
FUSION_VERSIONS_DICT,
|
||||
|
|
@ -163,12 +162,8 @@ class FusionCopyPrefsPrelaunch(PreLaunchHook):
|
|||
# to define where it can read custom scripts and tools from
|
||||
master_prefs_variable = f"FUSION{profile_version}_MasterPrefs"
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
master_prefs = Path(
|
||||
FUSION_HOST_DIR, "deploy", "ayon", "fusion_shared.prefs")
|
||||
else:
|
||||
master_prefs = Path(
|
||||
FUSION_HOST_DIR, "deploy", "openpype", "fusion_shared.prefs")
|
||||
master_prefs = Path(
|
||||
FUSION_HOST_DIR, "deploy", "ayon", "fusion_shared.prefs")
|
||||
|
||||
self.log.info(f"Setting {master_prefs_variable}: {master_prefs}")
|
||||
self.launch_context.env[master_prefs_variable] = str(master_prefs)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from ayon_core.hosts.fusion.api import (
|
||||
get_current_comp
|
||||
)
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.pipeline import (
|
||||
AutoCreator,
|
||||
|
|
@ -71,10 +70,8 @@ class FusionWorkfileCreator(AutoCreator):
|
|||
|
||||
if existing_instance is None:
|
||||
existing_instance_asset = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
existing_instance_asset = existing_instance["folderPath"]
|
||||
else:
|
||||
existing_instance_asset = existing_instance["asset"]
|
||||
existing_instance_asset = existing_instance["folderPath"]
|
||||
|
||||
if existing_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -83,13 +80,10 @@ class FusionWorkfileCreator(AutoCreator):
|
|||
project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": self.default_variant
|
||||
"variant": self.default_variant,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
data.update(self.get_dynamic_data(
|
||||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name, None
|
||||
|
|
@ -110,9 +104,6 @@ class FusionWorkfileCreator(AutoCreator):
|
|||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import pyblish
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline.editorial import is_overlapping_otio_ranges
|
||||
|
||||
from ayon_core.hosts.hiero import api as phiero
|
||||
|
|
@ -233,12 +232,7 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
|
|||
asset_name
|
||||
)
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset = folder_path
|
||||
else:
|
||||
asset = asset_name
|
||||
|
||||
return asset, asset_name
|
||||
return folder_path, asset_name
|
||||
|
||||
def create_audio_instance(self, context, **data):
|
||||
subset = "audioMain"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from qtpy.QtGui import QPixmap
|
|||
|
||||
import hiero.ui
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.hosts.hiero.api.otio import hiero_export
|
||||
|
||||
|
||||
|
|
@ -19,9 +18,7 @@ class PrecollectWorkfile(pyblish.api.ContextPlugin):
|
|||
|
||||
def process(self, context):
|
||||
asset = context.data["asset"]
|
||||
asset_name = asset
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = asset_name.split("/")[-1]
|
||||
asset_name = asset.split("/")[-1]
|
||||
|
||||
active_timeline = hiero.ui.activeSequence()
|
||||
project = active_timeline.project()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from abc import (
|
|||
import six
|
||||
import hou
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import (
|
||||
CreatorError,
|
||||
LegacyCreator,
|
||||
|
|
@ -185,10 +184,7 @@ class HoudiniCreator(NewCreator, HoudiniCreatorBase):
|
|||
if node_type is None:
|
||||
node_type = "geometry"
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance_data["folderPath"]
|
||||
else:
|
||||
asset_name = instance_data["asset"]
|
||||
asset_name = instance_data["folderPath"]
|
||||
|
||||
instance_node = self.create_instance_node(
|
||||
asset_name, subset_name, "/out", node_type)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator plugin for creating workfiles."""
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.hosts.houdini.api import plugin
|
||||
from ayon_core.hosts.houdini.api.lib import read, imprint
|
||||
from ayon_core.hosts.houdini.api.pipeline import CONTEXT_CONTAINER
|
||||
|
|
@ -33,10 +32,8 @@ class CreateWorkfile(plugin.HoudiniCreatorBase, AutoCreator):
|
|||
|
||||
if current_instance is None:
|
||||
current_instance_asset = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
current_instance_asset = current_instance["folderPath"]
|
||||
else:
|
||||
current_instance_asset = current_instance["asset"]
|
||||
current_instance_asset = current_instance["folderPath"]
|
||||
|
||||
if current_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -44,13 +41,10 @@ class CreateWorkfile(plugin.HoudiniCreatorBase, AutoCreator):
|
|||
variant, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": variant
|
||||
"variant": variant,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
|
||||
data.update(
|
||||
self.get_dynamic_data(
|
||||
|
|
@ -71,10 +65,7 @@ class CreateWorkfile(plugin.HoudiniCreatorBase, AutoCreator):
|
|||
subset_name = self.get_subset_name(
|
||||
variant, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
current_instance["folderPath"] = asset_name
|
||||
else:
|
||||
current_instance["asset"] = asset_name
|
||||
current_instance["folderPath"] = asset_name
|
||||
current_instance["task"] = task_name
|
||||
current_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
"""OpenPype startup script."""
|
||||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.hosts.houdini.api import HoudiniHost
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
def main():
|
||||
print("Installing {} ...".format(
|
||||
"AYON" if AYON_SERVER_ENABLED else "OpenPype"))
|
||||
print("Installing AYON ...")
|
||||
install_host(HoudiniHost())
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
"""OpenPype startup script."""
|
||||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.hosts.houdini.api import HoudiniHost
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
def main():
|
||||
print("Installing {} ...".format(
|
||||
"AYON" if AYON_SERVER_ENABLED else "OpenPype"))
|
||||
print("Installing AYON ...")
|
||||
install_host(HoudiniHost())
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
"""OpenPype startup script."""
|
||||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.hosts.houdini.api import HoudiniHost
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
def main():
|
||||
print("Installing {} ...".format(
|
||||
"AYON" if AYON_SERVER_ENABLED else "OpenPype"))
|
||||
print("Installing AYON ...")
|
||||
install_host(HoudiniHost())
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
"""OpenPype startup script."""
|
||||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.hosts.houdini.api import HoudiniHost
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
def main():
|
||||
print("Installing {} ...".format(
|
||||
"AYON" if AYON_SERVER_ENABLED else "OpenPype"))
|
||||
print("Installing AYON ...")
|
||||
install_host(HoudiniHost())
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import six
|
|||
from maya import cmds
|
||||
from maya.app.renderSetup.model import renderSetup
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.lib import BoolDef, Logger
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
|
|
@ -452,13 +451,10 @@ class RenderlayerCreator(NewCreator, MayaCreatorBase):
|
|||
project_name = self.create_context.get_current_project_name()
|
||||
asset_name = self.create_context.get_current_asset_name()
|
||||
instance_data = {
|
||||
"folderPath": asset_name,
|
||||
"task": self.create_context.get_current_task_name(),
|
||||
"variant": layer.name(),
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_data["folderPath"] = asset_name
|
||||
else:
|
||||
instance_data["asset"] = asset_name
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
subset_name = self.get_subset_name(
|
||||
layer.name(),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ from ayon_api import (
|
|||
)
|
||||
from maya import cmds # noqa: F401
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_assets
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_core.lib import BoolDef, EnumDef, TextDef
|
||||
|
|
@ -208,8 +207,3 @@ class CreateMultishotLayout(plugin.MayaCreator):
|
|||
"name", "label", "path", "folderType", "id"
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# blast this creator if Ayon server is not enabled
|
||||
if not AYON_SERVER_ENABLED:
|
||||
del CreateMultishotLayout
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import json
|
|||
|
||||
from maya import cmds
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.hosts.maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
|
|
@ -44,10 +43,7 @@ class CreateReview(plugin.MayaCreator):
|
|||
members = cmds.ls(selection=True)
|
||||
|
||||
project_name = self.project_name
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance_data["folderPath"]
|
||||
else:
|
||||
asset_name = instance_data["asset"]
|
||||
asset_name = instance_data["folderPath"]
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
task_name = instance_data["task"]
|
||||
preset = lib.get_capture_preset(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator plugin for creating workfiles."""
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import CreatedInstance, AutoCreator
|
||||
from ayon_core.client import get_asset_by_name, get_asset_name_identifier
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
|
|
@ -32,10 +31,8 @@ class CreateWorkfile(plugin.MayaCreatorBase, AutoCreator):
|
|||
|
||||
if current_instance is None:
|
||||
current_instance_asset = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
current_instance_asset = current_instance["folderPath"]
|
||||
else:
|
||||
current_instance_asset = current_instance["asset"]
|
||||
current_instance_asset = current_instance["folderPath"]
|
||||
|
||||
if current_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -43,14 +40,10 @@ class CreateWorkfile(plugin.MayaCreatorBase, AutoCreator):
|
|||
variant, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": variant
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
|
||||
data.update(
|
||||
self.get_dynamic_data(
|
||||
variant, task_name, asset_doc,
|
||||
|
|
@ -72,10 +65,7 @@ class CreateWorkfile(plugin.MayaCreatorBase, AutoCreator):
|
|||
)
|
||||
asset_name = get_asset_name_identifier(asset_doc)
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
current_instance["folderPath"] = asset_name
|
||||
else:
|
||||
current_instance["asset"] = asset_name
|
||||
current_instance["folderPath"] = asset_name
|
||||
current_instance["task"] = task_name
|
||||
current_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,8 @@ from ayon_core.lib import (
|
|||
ToolNotFoundError,
|
||||
)
|
||||
|
||||
from ayon_core.pipeline import legacy_io, publish, KnownPublishError
|
||||
from ayon_core.pipeline import publish, KnownPublishError
|
||||
from ayon_core.hosts.maya.api import lib
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
# Modes for transfer
|
||||
COPY = 1
|
||||
|
|
@ -58,14 +57,9 @@ def find_paths_by_hash(texture_hash):
|
|||
str: path to texture if found.
|
||||
|
||||
"""
|
||||
if AYON_SERVER_ENABLED:
|
||||
raise KnownPublishError(
|
||||
"This is a bug. \"find_paths_by_hash\" is not compatible with "
|
||||
"AYON."
|
||||
)
|
||||
|
||||
key = "data.sourceHashes.{0}".format(texture_hash)
|
||||
return legacy_io.distinct(key, {"type": "version"})
|
||||
raise KnownPublishError(
|
||||
"This is a bug. \"find_paths_by_hash\" is not compatible with AYON."
|
||||
)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import pyblish.api
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
import ayon_core.hosts.maya.api.action
|
||||
from ayon_core.pipeline.publish import (
|
||||
RepairAction,
|
||||
|
|
@ -67,12 +66,8 @@ class ValidateInstanceInContext(pyblish.api.InstancePlugin,
|
|||
def repair(cls, instance):
|
||||
context_asset = cls.get_context_asset(instance)
|
||||
instance_node = instance.data["instance_node"]
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name_attr = "folderPath"
|
||||
else:
|
||||
asset_name_attr = "asset"
|
||||
cmds.setAttr(
|
||||
"{}.{}".format(instance_node, asset_name_attr),
|
||||
"{}.folderPath".format(instance_node),
|
||||
context_asset,
|
||||
type="string"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ from collections import OrderedDict
|
|||
import nuke
|
||||
from qtpy import QtCore, QtWidgets
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import (
|
||||
get_project,
|
||||
get_asset_by_name,
|
||||
|
|
@ -1128,10 +1127,7 @@ def format_anatomy(data):
|
|||
file = script_name()
|
||||
data["version"] = get_version_from_path(file)
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = data["folderPath"]
|
||||
else:
|
||||
asset_name = data["asset"]
|
||||
asset_name = data["folderPath"]
|
||||
task_name = data["task"]
|
||||
host_name = get_current_host_name()
|
||||
context_data = get_template_data_with_names(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import re
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
import ayon_core.hosts.photoshop.api as api
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.lib import prepare_template_data
|
||||
|
|
@ -47,10 +46,8 @@ class PSAutoCreator(AutoCreator):
|
|||
|
||||
if existing_instance is None:
|
||||
existing_instance_asset = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
existing_instance_asset = existing_instance["folderPath"]
|
||||
else:
|
||||
existing_instance_asset = existing_instance["asset"]
|
||||
existing_instance_asset = existing_instance["folderPath"]
|
||||
|
||||
if existing_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -59,13 +56,10 @@ class PSAutoCreator(AutoCreator):
|
|||
project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": self.default_variant
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
data.update(self.get_dynamic_data(
|
||||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name, None
|
||||
|
|
@ -90,10 +84,7 @@ class PSAutoCreator(AutoCreator):
|
|||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from ayon_core.pipeline import CreatedInstance
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.lib import BoolDef
|
||||
import ayon_core.hosts.photoshop.api as api
|
||||
from ayon_core.hosts.photoshop.lib import PSAutoCreator, clean_subset_name
|
||||
|
|
@ -40,10 +39,8 @@ class AutoImageCreator(PSAutoCreator):
|
|||
|
||||
if existing_instance is None:
|
||||
existing_instance_asset = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
existing_instance_asset = existing_instance["folderPath"]
|
||||
else:
|
||||
existing_instance_asset = existing_instance["asset"]
|
||||
existing_instance_asset = existing_instance["folderPath"]
|
||||
|
||||
if existing_instance is None:
|
||||
subset_name = self.get_subset_name(
|
||||
|
|
@ -52,12 +49,9 @@ class AutoImageCreator(PSAutoCreator):
|
|||
)
|
||||
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
|
||||
if not self.active_on_create:
|
||||
data["active"] = False
|
||||
|
|
@ -80,10 +74,7 @@ class AutoImageCreator(PSAutoCreator):
|
|||
self.default_variant, task_name, asset_doc,
|
||||
project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ from ayon_core.hosts.resolve.api.lib import (
|
|||
get_publish_attribute,
|
||||
get_otio_clip_instance_data,
|
||||
)
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
class PrecollectInstances(pyblish.api.ContextPlugin):
|
||||
|
|
@ -61,11 +60,7 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
|
|||
if k not in ("id", "applieswhole", "label")
|
||||
})
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset = tag_data["folder_path"]
|
||||
else:
|
||||
asset = tag_data["asset_name"]
|
||||
|
||||
asset = tag_data["folder_path"]
|
||||
subset = tag_data["subset"]
|
||||
|
||||
data.update({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pyblish.api
|
||||
from pprint import pformat
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import get_current_asset_name
|
||||
|
||||
from ayon_core.hosts.resolve import api as rapi
|
||||
|
|
@ -15,10 +14,8 @@ class PrecollectWorkfile(pyblish.api.ContextPlugin):
|
|||
order = pyblish.api.CollectorOrder - 0.5
|
||||
|
||||
def process(self, context):
|
||||
current_asset_name = asset_name = get_current_asset_name()
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = current_asset_name.split("/")[-1]
|
||||
current_asset_name = get_current_asset_name()
|
||||
asset_name = current_asset_name.split("/")[-1]
|
||||
|
||||
subset = "workfileMain"
|
||||
project = rapi.get_current_project()
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.lib import Logger
|
||||
|
||||
log = Logger.get_logger(__name__)
|
||||
|
||||
|
||||
def main(env):
|
||||
from ayon_core.hosts.resolve.api import ResolveHost, launch_pype_menu
|
||||
|
||||
# activate resolve from openpype
|
||||
host = ResolveHost()
|
||||
install_host(host)
|
||||
|
||||
launch_pype_menu()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
result = main(os.environ)
|
||||
sys.exit(not bool(result))
|
||||
|
|
@ -2,7 +2,6 @@ import os
|
|||
import shutil
|
||||
from ayon_core.lib import Logger, is_running_from_build
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
RESOLVE_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
|
|
@ -46,8 +45,8 @@ def setup(env):
|
|||
for directory, scripts in scripts.items():
|
||||
for script in scripts:
|
||||
if (
|
||||
is_running_from_build() and
|
||||
script in ["tests", "develop"]
|
||||
is_running_from_build()
|
||||
and script in ["tests", "develop"]
|
||||
):
|
||||
# only copy those if started from build
|
||||
continue
|
||||
|
|
@ -55,14 +54,6 @@ def setup(env):
|
|||
src = os.path.join(directory, script)
|
||||
dst = os.path.join(util_scripts_dir, script)
|
||||
|
||||
# TODO: remove this once we have a proper solution
|
||||
if AYON_SERVER_ENABLED:
|
||||
if "OpenPype__Menu.py" == script:
|
||||
continue
|
||||
else:
|
||||
if "AYON__Menu.py" == script:
|
||||
continue
|
||||
|
||||
# TODO: Make this a less hacky workaround
|
||||
if script == "openpype_startup.scriptlib":
|
||||
# Handle special case for scriptlib that needs to be a folder
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator plugin for creating workfiles."""
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import CreatedInstance, AutoCreator
|
||||
from ayon_core.client import get_asset_by_name
|
||||
|
||||
|
|
@ -44,10 +43,8 @@ class CreateWorkfile(AutoCreator):
|
|||
|
||||
if current_instance is None:
|
||||
current_instance_asset = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
current_instance_asset = current_instance["folderPath"]
|
||||
else:
|
||||
current_instance_asset = current_instance["asset"]
|
||||
current_instance_asset = current_instance["folderPath"]
|
||||
|
||||
if current_instance is None:
|
||||
self.log.info("Auto-creating workfile instance...")
|
||||
|
|
@ -56,13 +53,10 @@ class CreateWorkfile(AutoCreator):
|
|||
variant, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": variant
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
current_instance = self.create_instance_in_context(subset_name,
|
||||
data)
|
||||
elif (
|
||||
|
|
@ -74,10 +68,7 @@ class CreateWorkfile(AutoCreator):
|
|||
subset_name = self.get_subset_name(
|
||||
variant, task_name, asset_doc, project_name, host_name
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
current_instance["folderPath"] = asset_name
|
||||
else:
|
||||
current_instance["asset"] = asset_name
|
||||
current_instance["folderPath"] = asset_name
|
||||
current_instance["task"] = task_name
|
||||
current_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import (
|
||||
get_assets,
|
||||
get_subsets,
|
||||
|
|
@ -116,10 +115,7 @@ class SettingsCreator(TrayPublishCreator):
|
|||
|
||||
# Fill 'version_to_use' if version control is enabled
|
||||
if self.allow_version_control:
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = data["folderPath"]
|
||||
else:
|
||||
asset_name = data["asset"]
|
||||
asset_name = data["folderPath"]
|
||||
subset_docs_by_asset_id = self._prepare_next_versions(
|
||||
[asset_name], [subset_name])
|
||||
version = subset_docs_by_asset_id[asset_name].get(subset_name)
|
||||
|
|
@ -221,16 +217,10 @@ class SettingsCreator(TrayPublishCreator):
|
|||
):
|
||||
filtered_instance_data.append(instance)
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_names = {
|
||||
instance["folderPath"]
|
||||
for instance in filtered_instance_data
|
||||
}
|
||||
else:
|
||||
asset_names = {
|
||||
instance["asset"]
|
||||
for instance in filtered_instance_data
|
||||
}
|
||||
asset_names = {
|
||||
instance["folderPath"]
|
||||
for instance in filtered_instance_data
|
||||
}
|
||||
subset_names = {
|
||||
instance["subset"]
|
||||
for instance in filtered_instance_data}
|
||||
|
|
@ -238,10 +228,7 @@ class SettingsCreator(TrayPublishCreator):
|
|||
asset_names, subset_names
|
||||
)
|
||||
for instance in filtered_instance_data:
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance["folderPath"]
|
||||
else:
|
||||
asset_name = instance["asset"]
|
||||
asset_name = instance["folderPath"]
|
||||
subset_name = instance["subset"]
|
||||
version = subset_docs_by_asset_id[asset_name][subset_name]
|
||||
instance["creator_attributes"]["version_to_use"] = version
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ production type `ociolook`. All files are published as representation.
|
|||
"""
|
||||
from pathlib import Path
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.lib.attribute_definitions import (
|
||||
FileDef, EnumDef, TextDef, UISeparatorDef
|
||||
|
|
@ -55,10 +54,7 @@ This creator publishes color space look file (LUT).
|
|||
# this should never happen
|
||||
raise CreatorError("Missing files from representation")
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance_data["folderPath"]
|
||||
else:
|
||||
asset_name = instance_data["asset"]
|
||||
asset_name = instance_data["folderPath"]
|
||||
asset_doc = get_asset_by_name(
|
||||
self.project_name, asset_name)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
from copy import deepcopy
|
||||
import opentimelineio as otio
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
from ayon_core.client import (
|
||||
get_asset_by_name,
|
||||
get_project
|
||||
|
|
@ -102,21 +102,12 @@ class EditorialShotInstanceCreator(EditorialClipInstanceCreatorBase):
|
|||
label = "Editorial Shot"
|
||||
|
||||
def get_instance_attr_defs(self):
|
||||
instance_attributes = []
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_attributes.append(
|
||||
TextDef(
|
||||
"folderPath",
|
||||
label="Folder path"
|
||||
)
|
||||
)
|
||||
else:
|
||||
instance_attributes.append(
|
||||
TextDef(
|
||||
"shotName",
|
||||
label="Shot name"
|
||||
)
|
||||
instance_attributes = [
|
||||
TextDef(
|
||||
"folderPath",
|
||||
label="Folder path"
|
||||
)
|
||||
]
|
||||
instance_attributes.extend(CLIP_ATTR_DEFS)
|
||||
return instance_attributes
|
||||
|
||||
|
|
@ -224,11 +215,8 @@ or updating already created. Publishing will create OTIO file.
|
|||
i["family"] for i in self._creator_settings["family_presets"]
|
||||
]
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance_data["folderPath"]
|
||||
else:
|
||||
asset_name = instance_data["asset"]
|
||||
|
||||
asset_name = instance_data["folderPath"]
|
||||
asset_doc = get_asset_by_name(self.project_name, asset_name)
|
||||
|
||||
if pre_create_data["fps"] == "from_selection":
|
||||
|
|
@ -379,7 +367,6 @@ or updating already created. Publishing will create OTIO file.
|
|||
instance_data (dict): clip instance data
|
||||
family_presets (list): list of dict settings subset presets
|
||||
"""
|
||||
self.asset_name_check = []
|
||||
|
||||
tracks = otio_timeline.each_child(
|
||||
descended_from_type=otio.schema.Track
|
||||
|
|
@ -608,10 +595,7 @@ or updating already created. Publishing will create OTIO file.
|
|||
Returns:
|
||||
str: label string
|
||||
"""
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name = instance_data["creator_attributes"]["folderPath"]
|
||||
else:
|
||||
asset_name = instance_data["creator_attributes"]["shotName"]
|
||||
asset_name = instance_data["creator_attributes"]["folderPath"]
|
||||
|
||||
variant_name = instance_data["variant"]
|
||||
family = preset["family"]
|
||||
|
|
@ -683,11 +667,6 @@ or updating already created. Publishing will create OTIO file.
|
|||
}
|
||||
)
|
||||
|
||||
# It should be validated only in openpype since we are supporting
|
||||
# publishing to AYON with folder path and uniqueness is not an issue
|
||||
if not AYON_SERVER_ENABLED:
|
||||
self._validate_name_uniqueness(shot_name)
|
||||
|
||||
timing_data = self._get_timing_data(
|
||||
otio_clip,
|
||||
timeline_offset,
|
||||
|
|
@ -720,18 +699,9 @@ or updating already created. Publishing will create OTIO file.
|
|||
}
|
||||
# update base instance data with context data
|
||||
# and also update creator attributes with context data
|
||||
if AYON_SERVER_ENABLED:
|
||||
# TODO: this is here just to be able to publish
|
||||
# to AYON with folder path
|
||||
creator_attributes["folderPath"] = shot_metadata.pop("folderPath")
|
||||
base_instance_data["folderPath"] = parent_asset_name
|
||||
else:
|
||||
creator_attributes.update({
|
||||
"shotName": shot_name,
|
||||
"Parent hierarchy path": shot_metadata["hierarchy"]
|
||||
})
|
||||
creator_attributes["folderPath"] = shot_metadata.pop("folderPath")
|
||||
base_instance_data["folderPath"] = parent_asset_name
|
||||
|
||||
base_instance_data["asset"] = parent_asset_name
|
||||
# add creator attributes to shared instance data
|
||||
base_instance_data["creator_attributes"] = creator_attributes
|
||||
# add hierarchy shot metadata
|
||||
|
|
@ -834,22 +804,6 @@ or updating already created. Publishing will create OTIO file.
|
|||
|
||||
return True
|
||||
|
||||
def _validate_name_uniqueness(self, name):
|
||||
""" Validating name uniqueness.
|
||||
|
||||
In context of other clip names in sequence file.
|
||||
|
||||
Args:
|
||||
name (str): shot name string
|
||||
"""
|
||||
if name not in self.asset_name_check:
|
||||
self.asset_name_check.append(name)
|
||||
else:
|
||||
self.log.warning(
|
||||
f"Duplicate shot name: {name}! "
|
||||
"Please check names in the input sequence files."
|
||||
)
|
||||
|
||||
def get_pre_create_attr_defs(self):
|
||||
""" Creating pre-create attributes at creator plugin.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import copy
|
|||
import os
|
||||
import re
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_asset_name_identifier
|
||||
from ayon_core.lib import (
|
||||
FileDef,
|
||||
|
|
@ -68,11 +67,8 @@ class BatchMovieCreator(TrayPublishCreator):
|
|||
|
||||
asset_name = get_asset_name_identifier(asset_doc)
|
||||
|
||||
instance_data["folderPath"] = asset_name
|
||||
instance_data["task"] = task_name
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_data["folderPath"] = asset_name
|
||||
else:
|
||||
instance_data["asset"] = asset_name
|
||||
|
||||
# Create new instance
|
||||
new_instance = CreatedInstance(self.family, subset_name,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ from pprint import pformat
|
|||
import pyblish.api
|
||||
import opentimelineio as otio
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
class CollectShotInstance(pyblish.api.InstancePlugin):
|
||||
""" Collect shot instances
|
||||
|
|
@ -121,7 +119,7 @@ class CollectShotInstance(pyblish.api.InstancePlugin):
|
|||
frame_end = _cr_attrs["frameEnd"]
|
||||
frame_dur = frame_end - frame_start
|
||||
|
||||
data = {
|
||||
return {
|
||||
"fps": float(_cr_attrs["fps"]),
|
||||
"handleStart": _cr_attrs["handle_start"],
|
||||
"handleEnd": _cr_attrs["handle_end"],
|
||||
|
|
@ -132,14 +130,9 @@ class CollectShotInstance(pyblish.api.InstancePlugin):
|
|||
"clipDuration": _cr_attrs["clipDuration"],
|
||||
"sourceIn": _cr_attrs["sourceIn"],
|
||||
"sourceOut": _cr_attrs["sourceOut"],
|
||||
"workfileFrameStart": workfile_start_frame
|
||||
"workfileFrameStart": workfile_start_frame,
|
||||
"asset": _cr_attrs["folderPath"],
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["asset"] = _cr_attrs["folderPath"]
|
||||
else:
|
||||
data["asset"] = _cr_attrs["shotName"]
|
||||
|
||||
return data
|
||||
|
||||
def _solve_hierarchy_context(self, instance):
|
||||
""" Adding hierarchy data to context shared data.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ from aiohttp_json_rpc.protocol import (
|
|||
)
|
||||
from aiohttp_json_rpc.exceptions import RpcError
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.lib import emit_event
|
||||
from ayon_core.hosts.tvpaint.tvpaint_plugin import get_plugin_files_path
|
||||
|
||||
|
|
@ -835,9 +834,7 @@ class BaseCommunicator:
|
|||
|
||||
|
||||
class QtCommunicator(BaseCommunicator):
|
||||
label = os.getenv("AVALON_LABEL")
|
||||
if not label:
|
||||
label = "AYON" if AYON_SERVER_ENABLED else "OpenPype"
|
||||
label = os.getenv("AVALON_LABEL") or "AYON"
|
||||
title = "{} Tools".format(label)
|
||||
menu_definitions = {
|
||||
"title": title,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ Todos:
|
|||
import collections
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_asset_by_name, get_asset_name_identifier
|
||||
from ayon_core.lib import (
|
||||
prepare_template_data,
|
||||
|
|
@ -787,23 +786,17 @@ class TVPaintAutoDetectRenderCreator(TVPaintCreator):
|
|||
)
|
||||
asset_name = get_asset_name_identifier(asset_doc)
|
||||
if existing_instance is not None:
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
return existing_instance
|
||||
|
||||
instance_data: dict[str, str] = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"family": creator.family,
|
||||
"variant": variant
|
||||
"variant": variant,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_data["folderPath"] = asset_name
|
||||
else:
|
||||
instance_data["asset"] = asset_name
|
||||
pre_create_data: dict[str, str] = {
|
||||
"group_id": group_id,
|
||||
"mark_for_review": mark_for_review
|
||||
|
|
@ -848,24 +841,17 @@ class TVPaintAutoDetectRenderCreator(TVPaintCreator):
|
|||
)
|
||||
|
||||
if render_pass is not None:
|
||||
if AYON_SERVER_ENABLED:
|
||||
render_pass["folderPath"] = asset_name
|
||||
else:
|
||||
render_pass["asset"] = asset_name
|
||||
|
||||
render_pass["folderPath"] = asset_name
|
||||
render_pass["task"] = task_name
|
||||
render_pass["subset"] = subset_name
|
||||
continue
|
||||
|
||||
instance_data: dict[str, str] = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"family": creator.family,
|
||||
"variant": variant
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_data["folderPath"] = asset_name
|
||||
else:
|
||||
instance_data["asset"] = asset_name
|
||||
|
||||
pre_create_data: dict[str, Any] = {
|
||||
"render_layer_instance_id": render_layer_instance.id,
|
||||
|
|
@ -900,10 +886,7 @@ class TVPaintAutoDetectRenderCreator(TVPaintCreator):
|
|||
|
||||
def create(self, subset_name, instance_data, pre_create_data):
|
||||
project_name: str = self.create_context.get_current_project_name()
|
||||
if AYON_SERVER_ENABLED:
|
||||
asset_name: str = instance_data["folderPath"]
|
||||
else:
|
||||
asset_name: str = instance_data["asset"]
|
||||
asset_name: str = instance_data["folderPath"]
|
||||
task_name: str = instance_data["task"]
|
||||
asset_doc: dict[str, Any] = get_asset_by_name(
|
||||
project_name, asset_name)
|
||||
|
|
@ -1083,6 +1066,7 @@ class TVPaintSceneRenderCreator(TVPaintAutoCreator):
|
|||
host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": self.default_variant,
|
||||
"creator_attributes": {
|
||||
|
|
@ -1094,10 +1078,6 @@ class TVPaintSceneRenderCreator(TVPaintAutoCreator):
|
|||
self.default_pass_name
|
||||
)
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
if not self.active_on_create:
|
||||
data["active"] = False
|
||||
|
||||
|
|
@ -1126,12 +1106,7 @@ class TVPaintSceneRenderCreator(TVPaintAutoCreator):
|
|||
asset_name = create_context.get_current_asset_name()
|
||||
task_name = create_context.get_current_task_name()
|
||||
|
||||
existing_name = None
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_name = existing_instance.get("folderPath")
|
||||
if existing_name is None:
|
||||
existing_name = existing_instance["asset"]
|
||||
|
||||
existing_name = existing_instance.get("folderPath")
|
||||
if (
|
||||
existing_name != asset_name
|
||||
or existing_instance["task"] != task_name
|
||||
|
|
@ -1145,10 +1120,7 @@ class TVPaintSceneRenderCreator(TVPaintAutoCreator):
|
|||
host_name,
|
||||
existing_instance
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.pipeline import CreatedInstance
|
||||
from ayon_core.hosts.tvpaint.api.plugin import TVPaintAutoCreator
|
||||
|
|
@ -36,10 +35,8 @@ class TVPaintReviewCreator(TVPaintAutoCreator):
|
|||
|
||||
if existing_instance is None:
|
||||
existing_asset_name = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
existing_asset_name = existing_instance["folderPath"]
|
||||
else:
|
||||
existing_asset_name = existing_instance["asset"]
|
||||
existing_asset_name = existing_instance["folderPath"]
|
||||
|
||||
if existing_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -51,13 +48,10 @@ class TVPaintReviewCreator(TVPaintAutoCreator):
|
|||
host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": self.default_variant
|
||||
"variant": self.default_variant,
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
|
||||
if not self.active_on_create:
|
||||
data["active"] = False
|
||||
|
|
@ -83,9 +77,6 @@ class TVPaintReviewCreator(TVPaintAutoCreator):
|
|||
host_name,
|
||||
existing_instance
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import get_asset_by_name
|
||||
from ayon_core.pipeline import CreatedInstance
|
||||
from ayon_core.hosts.tvpaint.api.plugin import TVPaintAutoCreator
|
||||
|
|
@ -32,10 +31,8 @@ class TVPaintWorkfileCreator(TVPaintAutoCreator):
|
|||
|
||||
if existing_instance is None:
|
||||
existing_asset_name = None
|
||||
elif AYON_SERVER_ENABLED:
|
||||
existing_asset_name = existing_instance["folderPath"]
|
||||
else:
|
||||
existing_asset_name = existing_instance["asset"]
|
||||
existing_asset_name = existing_instance["folderPath"]
|
||||
|
||||
if existing_instance is None:
|
||||
asset_doc = get_asset_by_name(project_name, asset_name)
|
||||
|
|
@ -47,13 +44,10 @@ class TVPaintWorkfileCreator(TVPaintAutoCreator):
|
|||
host_name
|
||||
)
|
||||
data = {
|
||||
"folderPath": asset_name,
|
||||
"task": task_name,
|
||||
"variant": self.default_variant
|
||||
}
|
||||
if AYON_SERVER_ENABLED:
|
||||
data["folderPath"] = asset_name
|
||||
else:
|
||||
data["asset"] = asset_name
|
||||
|
||||
new_instance = CreatedInstance(
|
||||
self.family, subset_name, data, self
|
||||
|
|
@ -76,9 +70,6 @@ class TVPaintWorkfileCreator(TVPaintAutoCreator):
|
|||
host_name,
|
||||
existing_instance
|
||||
)
|
||||
if AYON_SERVER_ENABLED:
|
||||
existing_instance["folderPath"] = asset_name
|
||||
else:
|
||||
existing_instance["asset"] = asset_name
|
||||
existing_instance["folderPath"] = asset_name
|
||||
existing_instance["task"] = task_name
|
||||
existing_instance["subset"] = subset_name
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pyblish.api
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import (
|
||||
PublishXmlValidationError,
|
||||
OptionalPyblishPluginMixin,
|
||||
|
|
@ -25,19 +24,12 @@ class FixAssetNames(pyblish.api.Action):
|
|||
old_instance_items = list_instances()
|
||||
new_instance_items = []
|
||||
for instance_item in old_instance_items:
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_asset_name = instance_item.get("folderPath")
|
||||
else:
|
||||
instance_asset_name = instance_item.get("asset")
|
||||
|
||||
instance_asset_name = instance_item.get("folderPath")
|
||||
if (
|
||||
instance_asset_name
|
||||
and instance_asset_name != context_asset_name
|
||||
):
|
||||
if AYON_SERVER_ENABLED:
|
||||
instance_item["folderPath"] = context_asset_name
|
||||
else:
|
||||
instance_item["asset"] = context_asset_name
|
||||
instance_item["folderPath"] = context_asset_name
|
||||
new_instance_items.append(instance_item)
|
||||
write_instances(new_instance_items)
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ from ayon_core.pipeline.publish import (
|
|||
from ayon_core.pipeline.publish.lib import (
|
||||
replace_with_published_scene_path
|
||||
)
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
JSONDecodeError = getattr(json.decoder, "JSONDecodeError", ValueError)
|
||||
|
||||
|
|
@ -400,12 +399,9 @@ class DeadlineJobInfo(object):
|
|||
|
||||
def add_render_job_env_var(self):
|
||||
"""Check if in OP or AYON mode and use appropriate env var."""
|
||||
if AYON_SERVER_ENABLED:
|
||||
self.EnvironmentKeyValue["AYON_RENDER_JOB"] = "1"
|
||||
self.EnvironmentKeyValue["AYON_BUNDLE_NAME"] = (
|
||||
os.environ["AYON_BUNDLE_NAME"])
|
||||
else:
|
||||
self.EnvironmentKeyValue["OPENPYPE_RENDER_JOB"] = "1"
|
||||
self.EnvironmentKeyValue["AYON_RENDER_JOB"] = "1"
|
||||
self.EnvironmentKeyValue["AYON_BUNDLE_NAME"] = (
|
||||
os.environ["AYON_BUNDLE_NAME"])
|
||||
|
||||
|
||||
@six.add_metaclass(AbstractMetaInstancePlugin)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
"""Collect default Deadline server."""
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
|
||||
|
||||
class CollectDefaultDeadlineServer(pyblish.api.ContextPlugin):
|
||||
"""Collect default Deadline Webservice URL.
|
||||
|
|
@ -33,15 +31,7 @@ class CollectDefaultDeadlineServer(pyblish.api.ContextPlugin):
|
|||
raise AssertionError("OpenPype Deadline module not found.")
|
||||
|
||||
deadline_settings = context.data["project_settings"]["deadline"]
|
||||
deadline_server_name = None
|
||||
if AYON_SERVER_ENABLED:
|
||||
deadline_server_name = deadline_settings["deadline_server"]
|
||||
else:
|
||||
deadline_servers = deadline_settings["deadline_servers"]
|
||||
if deadline_servers:
|
||||
deadline_server_name = deadline_servers[0]
|
||||
|
||||
context.data["deadlinePassMongoUrl"] = self.pass_mongo_url
|
||||
deadline_server_name = deadline_settings["deadline_server"]
|
||||
|
||||
deadline_webservice = None
|
||||
if deadline_server_name:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import requests
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import legacy_io
|
||||
from ayon_core.pipeline.publish import (
|
||||
OpenPypePyblishPluginMixin
|
||||
|
|
@ -229,7 +228,8 @@ class FusionSubmitDeadline(
|
|||
"AVALON_APP_NAME",
|
||||
"OPENPYPE_DEV",
|
||||
"OPENPYPE_LOG_NO_COLORS",
|
||||
"IS_TEST"
|
||||
"IS_TEST",
|
||||
"AYON_BUNDLE_NAME",
|
||||
]
|
||||
|
||||
# Add OpenPype version if we are running from build.
|
||||
|
|
@ -240,13 +240,7 @@ class FusionSubmitDeadline(
|
|||
if key in os.environ}, **legacy_io.Session)
|
||||
|
||||
# to recognize render jobs
|
||||
if AYON_SERVER_ENABLED:
|
||||
environment["AYON_BUNDLE_NAME"] = os.environ["AYON_BUNDLE_NAME"]
|
||||
render_job_label = "AYON_RENDER_JOB"
|
||||
else:
|
||||
render_job_label = "OPENPYPE_RENDER_JOB"
|
||||
|
||||
environment[render_job_label] = "1"
|
||||
environment["AYON_RENDER_JOB"] = "1"
|
||||
|
||||
payload["JobInfo"].update({
|
||||
"EnvironmentKeyValue%d" % index: "{key}={value}".format(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import os
|
|||
import attr
|
||||
from datetime import datetime
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import legacy_io, PublishXmlValidationError
|
||||
from ayon_core.tests.lib import is_in_tests
|
||||
from ayon_core.lib import is_running_from_build
|
||||
|
|
@ -116,11 +115,8 @@ class MayaSubmitRemotePublishDeadline(
|
|||
environment["OPENPYPE_USERNAME"] = instance.context.data["user"]
|
||||
environment["OPENPYPE_PUBLISH_SUBSET"] = instance.data["subset"]
|
||||
environment["OPENPYPE_REMOTE_PUBLISH"] = "1"
|
||||
environment["AYON_REMOTE_PUBLISH"] = "1"
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
environment["AYON_REMOTE_PUBLISH"] = "1"
|
||||
else:
|
||||
environment["OPENPYPE_REMOTE_PUBLISH"] = "1"
|
||||
for key, value in environment.items():
|
||||
job_info.EnvironmentKeyValue[key] = value
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from datetime import datetime
|
|||
import requests
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.pipeline import legacy_io
|
||||
from ayon_core.pipeline.publish import (
|
||||
OpenPypePyblishPluginMixin
|
||||
|
|
@ -388,6 +387,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin,
|
|||
"TOOL_ENV",
|
||||
"FOUNDRY_LICENSE",
|
||||
"OPENPYPE_SG_USER",
|
||||
"AYON_BUNDLE_NAME",
|
||||
]
|
||||
|
||||
# Add OpenPype version if we are running from build.
|
||||
|
|
@ -406,13 +406,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin,
|
|||
if key in os.environ}, **legacy_io.Session)
|
||||
|
||||
# to recognize render jobs
|
||||
if AYON_SERVER_ENABLED:
|
||||
environment["AYON_BUNDLE_NAME"] = os.environ["AYON_BUNDLE_NAME"]
|
||||
render_job_label = "AYON_RENDER_JOB"
|
||||
else:
|
||||
render_job_label = "OPENPYPE_RENDER_JOB"
|
||||
|
||||
environment[render_job_label] = "1"
|
||||
environment["AYON_RENDER_JOB"] = "1"
|
||||
|
||||
# finally search replace in values of any key
|
||||
if self.env_search_replace_values:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import requests
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import (
|
||||
get_last_version_by_subset_name,
|
||||
)
|
||||
|
|
@ -136,24 +135,13 @@ class ProcessSubmittedCacheJobOnFarm(pyblish.api.InstancePlugin,
|
|||
"AVALON_TASK": instance.context.data["task"],
|
||||
"OPENPYPE_USERNAME": instance.context.data["user"],
|
||||
"OPENPYPE_LOG_NO_COLORS": "1",
|
||||
"IS_TEST": str(int(is_in_tests()))
|
||||
"IS_TEST": str(int(is_in_tests())),
|
||||
"AYON_PUBLISH_JOB": "1",
|
||||
"AYON_RENDER_JOB": "0",
|
||||
"AYON_REMOTE_PUBLISH": "0",
|
||||
"AYON_BUNDLE_NAME": os.environ["AYON_BUNDLE_NAME"],
|
||||
}
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
environment["AYON_PUBLISH_JOB"] = "1"
|
||||
environment["AYON_RENDER_JOB"] = "0"
|
||||
environment["AYON_REMOTE_PUBLISH"] = "0"
|
||||
environment["AYON_BUNDLE_NAME"] = os.environ["AYON_BUNDLE_NAME"]
|
||||
deadline_plugin = "Ayon"
|
||||
else:
|
||||
environment["OPENPYPE_PUBLISH_JOB"] = "1"
|
||||
environment["OPENPYPE_RENDER_JOB"] = "0"
|
||||
environment["OPENPYPE_REMOTE_PUBLISH"] = "0"
|
||||
deadline_plugin = "OpenPype"
|
||||
# Add OpenPype version if we are running from build.
|
||||
if is_running_from_build():
|
||||
self.environ_keys.append("OPENPYPE_VERSION")
|
||||
|
||||
# add environments from self.environ_keys
|
||||
for env_key in self.environ_keys:
|
||||
if os.getenv(env_key):
|
||||
|
|
@ -196,7 +184,7 @@ class ProcessSubmittedCacheJobOnFarm(pyblish.api.InstancePlugin,
|
|||
)
|
||||
payload = {
|
||||
"JobInfo": {
|
||||
"Plugin": deadline_plugin,
|
||||
"Plugin": "Ayon",
|
||||
"BatchName": job["Props"]["Batch"],
|
||||
"Name": job_name,
|
||||
"UserName": job["Props"]["User"],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import clique
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.client import (
|
||||
get_last_version_by_subset_name,
|
||||
)
|
||||
|
|
@ -192,24 +191,13 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
|
|||
"AVALON_TASK": instance.context.data["task"],
|
||||
"OPENPYPE_USERNAME": instance.context.data["user"],
|
||||
"OPENPYPE_LOG_NO_COLORS": "1",
|
||||
"IS_TEST": str(int(is_in_tests()))
|
||||
"IS_TEST": str(int(is_in_tests())),
|
||||
"AYON_PUBLISH_JOB": "1",
|
||||
"AYON_RENDER_JOB": "0",
|
||||
"AYON_REMOTE_PUBLISH": "0",
|
||||
"AYON_BUNDLE_NAME": os.environ["AYON_BUNDLE_NAME"],
|
||||
}
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
environment["AYON_PUBLISH_JOB"] = "1"
|
||||
environment["AYON_RENDER_JOB"] = "0"
|
||||
environment["AYON_REMOTE_PUBLISH"] = "0"
|
||||
environment["AYON_BUNDLE_NAME"] = os.environ["AYON_BUNDLE_NAME"]
|
||||
deadline_plugin = "Ayon"
|
||||
else:
|
||||
environment["OPENPYPE_PUBLISH_JOB"] = "1"
|
||||
environment["OPENPYPE_RENDER_JOB"] = "0"
|
||||
environment["OPENPYPE_REMOTE_PUBLISH"] = "0"
|
||||
deadline_plugin = "OpenPype"
|
||||
# Add OpenPype version if we are running from build.
|
||||
if is_running_from_build():
|
||||
self.environ_keys.append("OPENPYPE_VERSION")
|
||||
|
||||
# add environments from self.environ_keys
|
||||
for env_key in self.environ_keys:
|
||||
if os.getenv(env_key):
|
||||
|
|
@ -252,7 +240,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
|
|||
)
|
||||
payload = {
|
||||
"JobInfo": {
|
||||
"Plugin": deadline_plugin,
|
||||
"Plugin": "Ayon",
|
||||
"BatchName": job["Props"]["Batch"],
|
||||
"Name": job_name,
|
||||
"UserName": job["Props"]["User"],
|
||||
|
|
|
|||
|
|
@ -8,29 +8,10 @@ import appdirs
|
|||
from qtpy import QtCore, QtWidgets, QtGui
|
||||
|
||||
from ayon_core import resources
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.style import load_stylesheet
|
||||
from ayon_core.lib import JSONSettingRegistry
|
||||
|
||||
|
||||
|
||||
openpype_art = """
|
||||
. . .. . ..
|
||||
_oOOP3OPP3Op_. .
|
||||
.PPpo~. .. ~2p. .. .... . .
|
||||
.Ppo . .pPO3Op.. . O:. . . .
|
||||
.3Pp . oP3'. 'P33. . 4 .. . . . .. . . .
|
||||
.~OP 3PO. .Op3 : . .. _____ _____ _____
|
||||
.P3O . oP3oP3O3P' . . . . / /./ /./ /
|
||||
O3:. O3p~ . .:. . ./____/./____/ /____/
|
||||
'P . 3p3. oP3~. ..P:. . . .. . . .. . . .
|
||||
. ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . .
|
||||
. '_ .. . . _OP3.. . .https://openpype.io.. .
|
||||
~P3.OPPPO3OP~ . .. .
|
||||
. ' '. . .. . . . .. .
|
||||
|
||||
"""
|
||||
|
||||
ayon_art = r"""
|
||||
|
||||
▄██▄
|
||||
|
|
@ -55,12 +36,8 @@ class PythonInterpreterRegistry(JSONSettingRegistry):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
if AYON_SERVER_ENABLED:
|
||||
self.vendor = "ynput"
|
||||
self.product = "ayon"
|
||||
else:
|
||||
self.vendor = "pypeclub"
|
||||
self.product = "openpype"
|
||||
self.vendor = "Ynput"
|
||||
self.product = "AYON"
|
||||
name = "python_interpreter_tool"
|
||||
path = appdirs.user_data_dir(self.product, self.vendor)
|
||||
super(PythonInterpreterRegistry, self).__init__(name, path)
|
||||
|
|
@ -357,9 +334,7 @@ class PythonInterpreterWidget(QtWidgets.QWidget):
|
|||
def __init__(self, allow_save_registry=True, parent=None):
|
||||
super(PythonInterpreterWidget, self).__init__(parent)
|
||||
|
||||
self.setWindowTitle("{} Console".format(
|
||||
"AYON" if AYON_SERVER_ENABLED else "OpenPype"
|
||||
))
|
||||
self.setWindowTitle("AYON Console")
|
||||
self.setWindowIcon(QtGui.QIcon(resources.get_openpype_icon_filepath()))
|
||||
|
||||
self.ansi_escape = re.compile(
|
||||
|
|
@ -407,10 +382,7 @@ class PythonInterpreterWidget(QtWidgets.QWidget):
|
|||
self._tab_widget = tab_widget
|
||||
self._line_check_timer = line_check_timer
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
self._append_lines([ayon_art])
|
||||
else:
|
||||
self._append_lines([openpype_art])
|
||||
self._append_lines([ayon_art])
|
||||
|
||||
self._first_show = True
|
||||
self._splitter_size_ratio = None
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os
|
||||
from ayon_core import AYON_SERVER_ENABLED
|
||||
from ayon_core.lib.openpype_version import is_staging_enabled
|
||||
|
||||
RESOURCES_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
|
@ -41,21 +40,15 @@ def get_liberation_font_path(bold=False, italic=False):
|
|||
|
||||
|
||||
def get_openpype_production_icon_filepath():
|
||||
filename = "openpype_icon.png"
|
||||
if AYON_SERVER_ENABLED:
|
||||
filename = "AYON_icon.png"
|
||||
return get_resource("icons", filename)
|
||||
return get_resource("icons", "AYON_icon.png")
|
||||
|
||||
|
||||
def get_openpype_staging_icon_filepath():
|
||||
filename = "openpype_icon_staging.png"
|
||||
if AYON_SERVER_ENABLED:
|
||||
filename = "AYON_icon_staging.png"
|
||||
return get_resource("icons", filename)
|
||||
return get_resource("icons", "AYON_icon_staging.png")
|
||||
|
||||
|
||||
def get_openpype_icon_filepath(staging=None):
|
||||
if AYON_SERVER_ENABLED and os.getenv("AYON_USE_DEV") == "1":
|
||||
if os.getenv("AYON_USE_DEV") == "1":
|
||||
return get_resource("icons", "AYON_icon_dev.png")
|
||||
|
||||
if staging is None:
|
||||
|
|
@ -70,17 +63,12 @@ def get_openpype_splash_filepath(staging=None):
|
|||
if staging is None:
|
||||
staging = is_staging_enabled()
|
||||
|
||||
if AYON_SERVER_ENABLED:
|
||||
if os.getenv("AYON_USE_DEV") == "1":
|
||||
splash_file_name = "AYON_splash_dev.png"
|
||||
elif staging:
|
||||
splash_file_name = "AYON_splash_staging.png"
|
||||
else:
|
||||
splash_file_name = "AYON_splash.png"
|
||||
if os.getenv("AYON_USE_DEV") == "1":
|
||||
splash_file_name = "AYON_splash_dev.png"
|
||||
elif staging:
|
||||
splash_file_name = "openpype_splash_staging.png"
|
||||
splash_file_name = "AYON_splash_staging.png"
|
||||
else:
|
||||
splash_file_name = "openpype_splash.png"
|
||||
splash_file_name = "AYON_splash.png"
|
||||
return get_resource("icons", splash_file_name)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue