🐛 fix representation creation

This commit is contained in:
Ondřej Samohel 2022-11-16 18:56:18 +01:00
parent c028bb2a94
commit 24da47332b
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -13,12 +13,11 @@ class CollectOnlineFile(pyblish.api.InstancePlugin):
def process(self, instance):
file = Path(instance.data["creator_attributes"]["path"])
if not instance.data.get("representations"):
instance.data["representations"] = [
{
instance.data["representations"].append(
{
"name": file.suffix.lstrip("."),
"ext": file.suffix.lstrip("."),
"files": file.name,
"stagingDir": file.parent.as_posix()
}
]
}
)