Fix staging data computation.

This commit is contained in:
robin@ynput.io 2024-11-19 16:49:08 -05:00
parent 7375538f22
commit b8ba7f47b0
7 changed files with 17 additions and 11 deletions

View file

@ -857,16 +857,18 @@ class Creator(BaseCreator):
version = instance.get("version")
if version is not None:
template_data = {"version": version}
else:
template_data = {}
staging_dir_info = get_staging_dir_info(
create_ctx.host_name,
create_ctx.get_current_project_entity(),
create_ctx.get_current_folder_entity(),
create_ctx.get_current_task_entity(),
product_type,
product_name,
create_ctx.get_current_project_anatomy(),
create_ctx.get_current_project_settings(),
create_ctx.host_name,
anatomy=create_ctx.get_current_project_anatomy(),
project_settings=create_ctx.get_current_project_settings(),
always_return_path=False,
logger=self.log,
template_data=template_data,

View file

@ -653,12 +653,12 @@ def get_custom_staging_dir_info(
DeprecationWarning,
)
tr_data = get_staging_dir_config(
host_name,
project_name,
task_type,
task_name,
product_type,
product_name,
host_name,
project_settings=project_settings,
anatomy=anatomy,
log=log,
@ -698,12 +698,12 @@ def get_instance_staging_dir(instance):
template_data["workfile_name"] = workfile_name
staging_dir_info = get_staging_dir_info(
context.data["hostName"],
context.data["projectEntity"],
instance.data.get("folderEntity"),
instance.data.get("taskEntity"),
instance.data["productType"],
instance.data["productName"],
context.data["hostName"],
anatomy=context.data["anatomy"],
project_settings=context.data["project_settings"],
template_data=template_data,

View file

@ -184,12 +184,12 @@ def get_staging_dir_info(
# get staging dir config
staging_dir_config = get_staging_dir_config(
host_name,
project_entity["name"],
task_entity.get("type"),
task_entity.get("taskType"),
task_entity.get("name"),
product_type,
product_name,
host_name,
project_settings=project_settings,
anatomy=anatomy,
log=log,
@ -211,7 +211,7 @@ def get_staging_dir_info(
return {
"stagingDir": StringTemplate.format_template(
staging_dir_config["template"], ctx_data
staging_dir_config["template"]["directory"], ctx_data
),
"stagingDir_persistent": staging_dir_config["persistence"],
}

View file

@ -33,7 +33,11 @@ class CollectManagedStagingDir(pyblish.api.InstancePlugin):
order = pyblish.api.CollectorOrder + 0.4990
def process(self, instance):
""" Collect the staging data and stores it to the instance.
Args:
instance (object): The instance to inspect.
"""
staging_dir_path = get_instance_staging_dir(instance)
persistance = instance.data.get("stagingDir_persistent", False)

View file

@ -254,7 +254,7 @@ class ExtractBurnin(publish.Extractor):
if do_convert:
new_staging_dir = get_temp_dir(
project_name=instance.context.data["projectName"],
make_local=True,
use_local_temp=True,
)
repre["stagingDir"] = new_staging_dir

View file

@ -106,7 +106,7 @@ class ExtractOIIOTranscode(publish.Extractor):
original_staging_dir = new_repre["stagingDir"]
new_staging_dir = get_temp_dir(
project_name=instance.context.data["projectName"],
make_local=True,
use_local_temp=True,
)
new_repre["stagingDir"] = new_staging_dir

View file

@ -312,7 +312,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
if do_convert:
new_staging_dir = get_temp_dir(
project_name=instance.context.data["projectName"],
make_local=True,
use_local_temp=True,
)
repre["stagingDir"] = new_staging_dir