make sure template keys exist only when needed

This commit is contained in:
Milan Kolar 2020-01-10 16:48:23 +01:00
parent 301b011c2b
commit 59305a1210

View file

@ -267,10 +267,19 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
"family": instance.data['family'],
"subset": subset["name"],
"version": int(version["name"]),
"hierarchy": hierarchy,
"resolution_width": repre.get("resolutionWidth", ""),
"resolution_height": repre.get("resolutionHeight", ""),
"fps": str(instance.data.get("fps", ""))}
"hierarchy": hierarchy}
resolution_width = repre.get("resolutionWidth")
resolution_height = repre.get("resolutionHeight")
fps = instance.data.get("fps")
if resolution_width:
template_data["resolution_width"] = resolution_width
if resolution_width:
template_data["resolution_height"] = resolution_height
if resolution_width:
template_data["fps"] = fps
files = repre['files']
if repre.get('stagingDir'):