Organize single file code more like sequence file code

This commit is contained in:
Roy Nieterau 2022-03-29 12:28:47 +02:00
parent 0c2c60d37b
commit 44d6199a9e

View file

@ -551,21 +551,24 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
else:
# Single file
template_data.pop("frame", None)
fname = files
assert not os.path.isabs(fname), (
"Given file name is a full path"
)
# Store used frame value to template data
# Manage anatomy template data
template_data.pop("frame", None)
if repre.get("udim"):
template_data["udim"] = repre["udim"][0]
src = os.path.join(stagingdir, fname)
# Construct destination filepath from template
anatomy_filled = anatomy.format(template_data)
template_filled = anatomy_filled[template_name]["path"]
repre_context = template_filled.used_values
dst = os.path.normpath(template_filled)
# Single file transfer
src = os.path.join(stagingdir, fname)
transfers = [(src, dst)]
for key in self.db_representation_context_keys: