mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
make sure silos don't crash publishing.
This commit is contained in:
parent
067a7c94cb
commit
08cdbe36e6
6 changed files with 11 additions and 10 deletions
|
|
@ -44,7 +44,7 @@ class CollectTemplates(pyblish.api.InstancePlugin):
|
|||
|
||||
assert asset, ("No asset found by the name '{}' "
|
||||
"in project '{}'".format(asset_name, project_name))
|
||||
silo = asset['silo']
|
||||
silo = asset.get('silo')
|
||||
|
||||
subset = io.find_one({"type": "subset",
|
||||
"name": subset_name,
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
template_data = {"root": root,
|
||||
"project": {"name": PROJECT,
|
||||
"code": project['data']['code']},
|
||||
"silo": asset['silo'],
|
||||
"silo": asset.get('silo'),
|
||||
"task": TASK,
|
||||
"asset": ASSET,
|
||||
"family": instance.data['family'],
|
||||
|
|
@ -382,7 +382,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
"project": {"name": PROJECT,
|
||||
"code": project['data']['code']},
|
||||
'task': TASK,
|
||||
"silo": asset['silo'],
|
||||
"silo": asset.get('silo'),
|
||||
"asset": ASSET,
|
||||
"family": instance.data['family'],
|
||||
"subset": subset["name"],
|
||||
|
|
@ -487,9 +487,10 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
self.log.info("Subset '%s' not found, creating.." % subset_name)
|
||||
|
||||
_id = io.insert_one({
|
||||
"schema": "avalon-core:subset-2.0",
|
||||
"schema": "pype:subset-3.0",
|
||||
"type": "subset",
|
||||
"name": subset_name,
|
||||
"families": instance.data.get('families'),
|
||||
"data": {},
|
||||
"parent": asset["_id"]
|
||||
}).inserted_id
|
||||
|
|
@ -513,7 +514,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
version_locations = [location for location in locations if
|
||||
location is not None]
|
||||
|
||||
return {"schema": "avalon-core:version-2.0",
|
||||
return {"schema": "pype:version-3.0",
|
||||
"type": "version",
|
||||
"parent": subset["_id"],
|
||||
"name": version_number,
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ def maketx(source, destination, *args):
|
|||
args=cmd,
|
||||
stderr=subprocess.STDOUT
|
||||
)
|
||||
|
||||
|
||||
if sys.platform == "win32":
|
||||
kwargs["creationflags"] = CREATE_NO_WIDOW
|
||||
try:
|
||||
|
|
@ -425,7 +425,7 @@ class ExtractLook(pype.api.Extractor):
|
|||
|
||||
assert asset, ("No asset found by the name '{}' "
|
||||
"in project '{}'".format(asset_name, project_name))
|
||||
silo = asset['silo']
|
||||
silo = asset.get('silo')
|
||||
|
||||
subset = io.find_one({"type": "subset",
|
||||
"name": subset_name,
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class ExtractVideoTracksLuts(pyblish.api.InstancePlugin):
|
|||
|
||||
assert asset, ("No asset found by the name '{}' "
|
||||
"in project '{}'".format(asset_name, project_name))
|
||||
silo = asset['silo']
|
||||
silo = asset.get('silo')
|
||||
|
||||
subset = io.find_one({"type": "subset",
|
||||
"name": subset_name,
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class IntegrateAssumedDestination(pyblish.api.InstancePlugin):
|
|||
|
||||
assert asset, ("No asset found by the name '{}' "
|
||||
"in project '{}'".format(asset_name, project_name))
|
||||
silo = asset['silo']
|
||||
silo = asset.get('silo')
|
||||
|
||||
subset = io.find_one({"type": "subset",
|
||||
"name": subset_name,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class TextureCopy:
|
|||
template_data = {"root": root,
|
||||
"project": {"name": PROJECT,
|
||||
"code": project['data']['code']},
|
||||
"silo": asset['silo'],
|
||||
"silo": asset.get('silo'),
|
||||
"asset": asset['name'],
|
||||
"family": 'texture',
|
||||
"subset": 'Main',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue