mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'develop' into enhancement/AY-2224_add_show_in_ayon_launcher_action
This commit is contained in:
commit
78f8767e4c
2 changed files with 25 additions and 17 deletions
|
|
@ -53,8 +53,9 @@ class CollectContextEntities(pyblish.api.ContextPlugin):
|
||||||
|
|
||||||
context.data["folderEntity"] = folder_entity
|
context.data["folderEntity"] = folder_entity
|
||||||
context.data["taskEntity"] = task_entity
|
context.data["taskEntity"] = task_entity
|
||||||
|
context_attributes = (
|
||||||
folder_attributes = folder_entity["attrib"]
|
task_entity["attrib"] if task_entity else folder_entity["attrib"]
|
||||||
|
)
|
||||||
|
|
||||||
# Task type
|
# Task type
|
||||||
task_type = None
|
task_type = None
|
||||||
|
|
@ -63,12 +64,12 @@ class CollectContextEntities(pyblish.api.ContextPlugin):
|
||||||
|
|
||||||
context.data["taskType"] = task_type
|
context.data["taskType"] = task_type
|
||||||
|
|
||||||
frame_start = folder_attributes.get("frameStart")
|
frame_start = context_attributes.get("frameStart")
|
||||||
if frame_start is None:
|
if frame_start is None:
|
||||||
frame_start = 1
|
frame_start = 1
|
||||||
self.log.warning("Missing frame start. Defaulting to 1.")
|
self.log.warning("Missing frame start. Defaulting to 1.")
|
||||||
|
|
||||||
frame_end = folder_attributes.get("frameEnd")
|
frame_end = context_attributes.get("frameEnd")
|
||||||
if frame_end is None:
|
if frame_end is None:
|
||||||
frame_end = 2
|
frame_end = 2
|
||||||
self.log.warning("Missing frame end. Defaulting to 2.")
|
self.log.warning("Missing frame end. Defaulting to 2.")
|
||||||
|
|
@ -76,8 +77,8 @@ class CollectContextEntities(pyblish.api.ContextPlugin):
|
||||||
context.data["frameStart"] = frame_start
|
context.data["frameStart"] = frame_start
|
||||||
context.data["frameEnd"] = frame_end
|
context.data["frameEnd"] = frame_end
|
||||||
|
|
||||||
handle_start = folder_attributes.get("handleStart") or 0
|
handle_start = context_attributes.get("handleStart") or 0
|
||||||
handle_end = folder_attributes.get("handleEnd") or 0
|
handle_end = context_attributes.get("handleEnd") or 0
|
||||||
|
|
||||||
context.data["handleStart"] = int(handle_start)
|
context.data["handleStart"] = int(handle_start)
|
||||||
context.data["handleEnd"] = int(handle_end)
|
context.data["handleEnd"] = int(handle_end)
|
||||||
|
|
@ -87,7 +88,7 @@ class CollectContextEntities(pyblish.api.ContextPlugin):
|
||||||
context.data["frameStartHandle"] = frame_start_h
|
context.data["frameStartHandle"] = frame_start_h
|
||||||
context.data["frameEndHandle"] = frame_end_h
|
context.data["frameEndHandle"] = frame_end_h
|
||||||
|
|
||||||
context.data["fps"] = folder_attributes["fps"]
|
context.data["fps"] = context_attributes["fps"]
|
||||||
|
|
||||||
def _get_folder_entity(self, project_name, folder_path):
|
def _get_folder_entity(self, project_name, folder_path):
|
||||||
if not folder_path:
|
if not folder_path:
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ class ExtractBurnin(publish.Extractor):
|
||||||
if not burnins_per_repres:
|
if not burnins_per_repres:
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
"Skipped instance. No representations found matching a burnin"
|
"Skipped instance. No representations found matching a burnin"
|
||||||
"definition in: %s", burnin_defs
|
" definition in: %s", burnin_defs
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -399,7 +399,7 @@ class ExtractBurnin(publish.Extractor):
|
||||||
|
|
||||||
add_repre_files_for_cleanup(instance, new_repre)
|
add_repre_files_for_cleanup(instance, new_repre)
|
||||||
|
|
||||||
# Cleanup temp staging dir after procesisng of output definitions
|
# Cleanup temp staging dir after processing of output definitions
|
||||||
if do_convert:
|
if do_convert:
|
||||||
temp_dir = repre["stagingDir"]
|
temp_dir = repre["stagingDir"]
|
||||||
shutil.rmtree(temp_dir)
|
shutil.rmtree(temp_dir)
|
||||||
|
|
@ -420,6 +420,12 @@ class ExtractBurnin(publish.Extractor):
|
||||||
self.log.debug("Removed: \"{}\"".format(filepath))
|
self.log.debug("Removed: \"{}\"".format(filepath))
|
||||||
|
|
||||||
def _get_burnin_options(self):
|
def _get_burnin_options(self):
|
||||||
|
"""Get the burnin options from `ExtractBurnin` settings.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
dict[str, Any]: Burnin options.
|
||||||
|
|
||||||
|
"""
|
||||||
# Prepare burnin options
|
# Prepare burnin options
|
||||||
burnin_options = copy.deepcopy(self.default_options)
|
burnin_options = copy.deepcopy(self.default_options)
|
||||||
if self.options:
|
if self.options:
|
||||||
|
|
@ -696,7 +702,7 @@ class ExtractBurnin(publish.Extractor):
|
||||||
"""Prepare data for representation.
|
"""Prepare data for representation.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
instance (Instance): Currently processed Instance.
|
instance (pyblish.api.Instance): Currently processed Instance.
|
||||||
repre (dict): Currently processed representation.
|
repre (dict): Currently processed representation.
|
||||||
burnin_data (dict): Copy of basic burnin data based on instance
|
burnin_data (dict): Copy of basic burnin data based on instance
|
||||||
data.
|
data.
|
||||||
|
|
@ -752,9 +758,11 @@ class ExtractBurnin(publish.Extractor):
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
profile (dict): Profile from presets matching current context.
|
profile (dict): Profile from presets matching current context.
|
||||||
|
instance (pyblish.api.Instance): Publish instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
list: Contain all valid output definitions.
|
list[dict[str, Any]]: Contain all valid output definitions.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
filtered_burnin_defs = []
|
filtered_burnin_defs = []
|
||||||
|
|
||||||
|
|
@ -773,12 +781,11 @@ class ExtractBurnin(publish.Extractor):
|
||||||
if not self.families_filter_validation(
|
if not self.families_filter_validation(
|
||||||
families, families_filters
|
families, families_filters
|
||||||
):
|
):
|
||||||
self.log.debug((
|
self.log.debug(
|
||||||
"Skipped burnin definition \"{}\". Family"
|
f"Skipped burnin definition \"{filename_suffix}\"."
|
||||||
" filters ({}) does not match current instance families: {}"
|
f" Family filters ({families_filters}) does not match"
|
||||||
).format(
|
f" current instance families: {families}"
|
||||||
filename_suffix, str(families_filters), str(families)
|
)
|
||||||
))
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Burnin values
|
# Burnin values
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue