mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Merge branch 'feature/OP-7176_Use-folder-path-as-unique-identifier' into feature/OP-7190_Use-folder-path-as-identifier-in-editorial
This commit is contained in:
commit
c1dfb052dc
116 changed files with 10377 additions and 335 deletions
|
|
@ -58,21 +58,21 @@ class ExplicitCleanUp(pyblish.api.ContextPlugin):
|
|||
# Store failed paths with exception
|
||||
failed = []
|
||||
# Store removed filepaths for logging
|
||||
succeded_files = set()
|
||||
succeeded_files = set()
|
||||
# Remove file by file
|
||||
for filepath in filepaths:
|
||||
try:
|
||||
os.remove(filepath)
|
||||
succeded_files.add(filepath)
|
||||
succeeded_files.add(filepath)
|
||||
except Exception as exc:
|
||||
failed.append((filepath, exc))
|
||||
|
||||
if succeded_files:
|
||||
if succeeded_files:
|
||||
self.log.info(
|
||||
"Removed files:\n{}".format("\n".join(succeded_files))
|
||||
"Removed files:\n{}".format("\n".join(sorted(succeeded_files)))
|
||||
)
|
||||
|
||||
# Delete folders with it's content
|
||||
# Delete folders with its content
|
||||
succeeded = set()
|
||||
for dirpath in dirpaths:
|
||||
# Check if directory still exists
|
||||
|
|
@ -87,17 +87,21 @@ class ExplicitCleanUp(pyblish.api.ContextPlugin):
|
|||
|
||||
if succeeded:
|
||||
self.log.info(
|
||||
"Removed directories:\n{}".format("\n".join(succeeded))
|
||||
"Removed directories:\n{}".format(
|
||||
"\n".join(sorted(succeeded))
|
||||
)
|
||||
)
|
||||
|
||||
# Prepare lines for report of failed removements
|
||||
# Prepare lines for report of failed removals
|
||||
lines = []
|
||||
for filepath, exc in failed:
|
||||
lines.append("{}: {}".format(filepath, str(exc)))
|
||||
|
||||
if lines:
|
||||
self.log.warning(
|
||||
"Failed to remove filepaths:\n{}".format("\n".join(lines))
|
||||
"Failed to remove filepaths:\n{}".format(
|
||||
"\n".join(sorted(lines))
|
||||
)
|
||||
)
|
||||
|
||||
def _remove_empty_dirs(self, empty_dirpaths):
|
||||
|
|
@ -134,8 +138,8 @@ class ExplicitCleanUp(pyblish.api.ContextPlugin):
|
|||
|
||||
if to_skip_dirpaths:
|
||||
self.log.debug(
|
||||
"Skipped directories because contain files:\n{}".format(
|
||||
"\n".join(to_skip_dirpaths)
|
||||
"Skipped directories because they contain files:\n{}".format(
|
||||
"\n".join(sorted(to_skip_dirpaths))
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -147,6 +151,6 @@ class ExplicitCleanUp(pyblish.api.ContextPlugin):
|
|||
if to_delete_dirpaths:
|
||||
self.log.debug(
|
||||
"Deleted empty directories:\n{}".format(
|
||||
"\n".join(to_delete_dirpaths)
|
||||
"\n".join(sorted(to_delete_dirpaths))
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ class CollectRenderedFiles(pyblish.api.ContextPlugin):
|
|||
staging_dir = data_object.get("stagingDir")
|
||||
if staging_dir:
|
||||
data_object["stagingDir"] = anatomy.fill_root(staging_dir)
|
||||
self.log.debug("Filling stagingDir with root to: %s",
|
||||
data_object["stagingDir"])
|
||||
|
||||
def _process_path(self, data, anatomy):
|
||||
"""Process data of a single JSON publish metadata file.
|
||||
|
|
@ -108,7 +110,6 @@ class CollectRenderedFiles(pyblish.api.ContextPlugin):
|
|||
instance = self._context.create_instance(
|
||||
instance_data.get("subset")
|
||||
)
|
||||
self.log.debug("Filling stagingDir...")
|
||||
|
||||
self._fill_staging_dir(instance_data, anatomy)
|
||||
instance.data.update(instance_data)
|
||||
|
|
@ -161,7 +162,7 @@ class CollectRenderedFiles(pyblish.api.ContextPlugin):
|
|||
anatomy.project_name
|
||||
))
|
||||
|
||||
self.log.debug("anatomy: {}".format(anatomy.roots))
|
||||
self.log.debug("Anatomy roots: {}".format(anatomy.roots))
|
||||
try:
|
||||
session_is_set = False
|
||||
for path in paths:
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ class CollectResourcesPath(pyblish.api.InstancePlugin):
|
|||
]
|
||||
|
||||
def process(self, instance):
|
||||
# editorial would fail since they might not be in database yet
|
||||
is_editorial = instance.data.get("isEditorial")
|
||||
if is_editorial:
|
||||
self.log.debug("Instance is Editorial. Skipping.")
|
||||
return
|
||||
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
|
||||
template_data = copy.deepcopy(instance.data["anatomyData"])
|
||||
|
|
|
|||
|
|
@ -171,8 +171,6 @@ class ExtractBurnin(publish.Extractor):
|
|||
).format(host_name, family, task_name, task_type, subset))
|
||||
return
|
||||
|
||||
self.log.debug("profile: {}".format(profile))
|
||||
|
||||
# Pre-filter burnin definitions by instance families
|
||||
burnin_defs = self.filter_burnins_defs(profile, instance)
|
||||
if not burnin_defs:
|
||||
|
|
@ -450,7 +448,7 @@ class ExtractBurnin(publish.Extractor):
|
|||
filling burnin strings. `temp_data` are for repre pre-process
|
||||
preparation.
|
||||
"""
|
||||
self.log.debug("Prepring basic data for burnins")
|
||||
self.log.debug("Preparing basic data for burnins")
|
||||
context = instance.context
|
||||
|
||||
version = instance.data.get("version")
|
||||
|
|
|
|||
|
|
@ -326,7 +326,6 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
" | Task type \"{}\" | Subset \"{}\" "
|
||||
).format(host_name, family, task_name, task_type, subset))
|
||||
|
||||
self.log.debug("profile: {}".format(profile))
|
||||
return profile
|
||||
|
||||
def _repre_is_valid(self, repre):
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
]
|
||||
|
||||
# Supported extensions
|
||||
image_exts = ["exr", "jpg", "jpeg", "png", "dpx"]
|
||||
image_exts = ["exr", "jpg", "jpeg", "png", "dpx", "tga"]
|
||||
video_exts = ["mov", "mp4"]
|
||||
supported_exts = image_exts + video_exts
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
custom_tags = repre.get("custom_tags")
|
||||
if "review" not in tags:
|
||||
self.log.debug((
|
||||
"Repre: {} - Didn't found \"review\" in tags. Skipping"
|
||||
"Repre: {} - Didn't find \"review\" in tags. Skipping"
|
||||
).format(repre_name))
|
||||
continue
|
||||
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ class IntegrateThumbnails(pyblish.api.ContextPlugin):
|
|||
|
||||
if thumb_repre_doc is None:
|
||||
self.log.debug(
|
||||
"There is not representation with name \"thumbnail\""
|
||||
"There is no representation with name \"thumbnail\""
|
||||
)
|
||||
return None
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class IntegrateThumbnailsAYON(pyblish.api.ContextPlugin):
|
|||
|
||||
if thumb_repre_doc is None:
|
||||
self.log.debug(
|
||||
"There is not representation with name \"thumbnail\""
|
||||
"There is no representation with name \"thumbnail\""
|
||||
)
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue