Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering

This commit is contained in:
Ondřej Samohel 2024-05-09 16:05:20 +02:00 committed by GitHub
commit 883449194e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 31 additions and 29 deletions

View file

@ -6,12 +6,9 @@ import json
from typing import Any, Dict, Union
import six
import ayon_api
from ayon_core.pipeline import (
get_current_project_name,
get_current_folder_path,
get_current_task_name,
colorspace
)
from ayon_core.settings import get_project_settings

View file

@ -6,7 +6,6 @@ from ayon_core.lib import (
BoolDef,
NumberDef,
)
from ayon_core.pipeline import CreatedInstance
def _get_animation_attr_defs(cls):

View file

@ -1,5 +1,3 @@
import os
import pyblish.api
import pyblish.util

View file

@ -139,6 +139,7 @@ from .path_tools import (
)
from .ayon_info import (
is_in_ayon_launcher_process,
is_running_from_build,
is_using_ayon_console,
is_staging_enabled,
@ -248,6 +249,7 @@ __all__ = [
"Logger",
"is_in_ayon_launcher_process",
"is_running_from_build",
"is_using_ayon_console",
"is_staging_enabled",

View file

@ -1,4 +1,5 @@
import os
import sys
import json
import datetime
import platform
@ -25,6 +26,18 @@ def get_ayon_launcher_version():
return content["__version__"]
def is_in_ayon_launcher_process():
"""Determine if current process is running from AYON launcher.
Returns:
bool: True if running from AYON launcher.
"""
ayon_executable_path = os.path.normpath(os.environ["AYON_EXECUTABLE"])
executable_path = os.path.normpath(sys.executable)
return ayon_executable_path == executable_path
def is_running_from_build():
"""Determine if current process is running from build or code.

View file

@ -467,8 +467,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
# Inject deadline url to instances to query DL for job id for overrides
for inst in instances:
if not "deadline" in inst:
inst["deadline"] = {}
inst["deadline"] = instance.data["deadline"]
# publish job file

View file

@ -72,7 +72,7 @@ class ValidateDeadlinePools(OptionalPyblishPluginMixin,
auth=auth,
log=self.log)
# some DL return "none" as a pool name
if not "none" in pools:
if "none" not in pools:
pools.append("none")
self.log.info("Available pools: {}".format(pools))
self.pools_per_url[deadline_url] = pools

View file

@ -73,8 +73,8 @@ def get_folder_template_data(folder_entity, project_name):
- 'parent' - direct parent name, project name used if is under
project
Required document fields:
Folder: 'path' -> Plan to require: 'folderType'
Required entity fields:
Folder: 'path', 'folderType'
Args:
folder_entity (Dict[str, Any]): Folder entity.
@ -101,6 +101,8 @@ def get_folder_template_data(folder_entity, project_name):
return {
"folder": {
"name": folder_name,
"type": folder_entity["folderType"],
"path": path,
},
"asset": folder_name,
"hierarchy": hierarchy,

View file

@ -33,6 +33,7 @@ import collections
import pyblish.api
import ayon_api
from ayon_core.pipeline.template_data import get_folder_template_data
from ayon_core.pipeline.version_start import get_versioning_start
@ -383,24 +384,11 @@ class CollectAnatomyInstanceData(pyblish.api.ContextPlugin):
# - 'folder', 'hierarchy', 'parent', 'folder'
folder_entity = instance.data.get("folderEntity")
if folder_entity:
folder_name = folder_entity["name"]
folder_path = folder_entity["path"]
hierarchy_parts = folder_path.split("/")
hierarchy_parts.pop(0)
hierarchy_parts.pop(-1)
parent_name = project_entity["name"]
if hierarchy_parts:
parent_name = hierarchy_parts[-1]
hierarchy = "/".join(hierarchy_parts)
anatomy_data.update({
"asset": folder_name,
"hierarchy": hierarchy,
"parent": parent_name,
"folder": {
"name": folder_name,
},
})
folder_data = get_folder_template_data(
folder_entity,
project_entity["name"]
)
anatomy_data.update(folder_data)
return
if instance.data.get("newAssetPublishing"):
@ -418,6 +406,11 @@ class CollectAnatomyInstanceData(pyblish.api.ContextPlugin):
"parent": parent_name,
"folder": {
"name": folder_name,
"path": instance.data["folderPath"],
# TODO get folder type from hierarchy
# Using 'Shot' is current default behavior of editorial
# (or 'newAssetPublishing') publishing.
"type": "Shot",
},
})