remove dot from extension and add warning in integrate new to be ackwnoledged about extension with dot

This commit is contained in:
iLLiCiTiT 2021-01-04 19:23:07 +01:00
parent 45d3cc63ce
commit a7dd5dc3dc
3 changed files with 17 additions and 2 deletions

View file

@ -329,6 +329,17 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
if repre.get("outputName"):
template_data["output"] = repre['outputName']
ext = repre["ext"]
if ext.startswith("."):
self.log.warning((
"Implementaion warning: <\"{}\">"
" Representation's extension stored under \"ext\" key "
" started with dot (\"{}\")."
).format(repre["name"], ext))
ext = ext[1:]
repre["ext"] = ext
template_data["ext"] = ext
template = os.path.normpath(
anatomy.templates[template_name]["path"])

View file

@ -95,7 +95,7 @@ class IntegrateThumbnails(pyblish.api.InstancePlugin):
template_data.update({
"_id": str(thumbnail_id),
"thumbnail_root": os.environ.get("AVALON_THUMBNAIL_ROOT"),
"ext": file_extension,
"ext": file_extension[1:],
"thumbnail_type": "thumbnail"
})

View file

@ -145,12 +145,16 @@ class CollectContextDataSAPublish(pyblish.api.ContextPlugin):
component["stagingDir"] = component["stagingDir"]
if isinstance(component["files"], list):
collections, remainder = clique.assemble(component["files"])
collections, _remainder = clique.assemble(component["files"])
self.log.debug("collecting sequence: {}".format(collections))
instance.data["frameStart"] = int(component["frameStart"])
instance.data["frameEnd"] = int(component["frameEnd"])
instance.data["fps"] = int(component["fps"])
ext = component["ext"]
if ext.startswith("."):
component["ext"] = ext[1:]
if component["preview"]:
instance.data["families"].append("review")
instance.data["repreProfiles"] = ["h264"]