task name is also checked

This commit is contained in:
iLLiCiTiT 2020-02-05 09:59:25 +01:00
parent f6e6220869
commit f6ae5b2213
2 changed files with 13 additions and 3 deletions

View file

@ -87,13 +87,19 @@ class CollectInstanceAnatomyData(pyblish.api.InstancePlugin):
if latest_version is not None:
version_number += int(latest_version)
# Version should not be collected since may be instance
anatomy_data.update({
anatomy_updates = {
"asset": asset_name,
"family": instance.data["family"],
"subset": subset_name,
"version": version_number
})
}
task_name = instance.data.get("task")
if task_name:
anatomy_updates["task"] = task_name
# Version should not be collected since may be instance
anatomy_data.update(anatomy_updates)
resolution_width = instance.data.get("resolutionWidth")
if resolution_width:

View file

@ -132,6 +132,10 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
hierarchy = "/".join(parents)
anatomy_data["hierarchy"] = hierarchy
task_name = instance.data.get("task")
if task_name:
anatomy_data["task"] = task_name
stagingdir = instance.data.get("stagingDir")
if not stagingdir:
self.log.info((