mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
changes to keep indentation consistend 2
This commit is contained in:
parent
eea4df6b51
commit
7f9a4e9528
11 changed files with 54 additions and 16 deletions
|
|
@ -32,7 +32,10 @@ class CollectTemplates(pyblish.api.InstancePlugin):
|
|||
project_name = api.Session["AVALON_PROJECT"]
|
||||
|
||||
project = io.find_one(
|
||||
{"type": "project", "name": project_name},
|
||||
{
|
||||
"type": "project",
|
||||
"name": project_name
|
||||
},
|
||||
projection={"config": True, "data": True}
|
||||
)
|
||||
|
||||
|
|
@ -60,7 +63,10 @@ class CollectTemplates(pyblish.api.InstancePlugin):
|
|||
version_number = 1
|
||||
if subset is not None:
|
||||
version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,10 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
|
|||
|
||||
# get next version
|
||||
latest_version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
{"name": True},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,10 @@ class IntegrateAssumedDestination(pyblish.api.InstancePlugin):
|
|||
version_number = 1
|
||||
if subset is not None:
|
||||
version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,10 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
|
||||
# get next version
|
||||
latest_version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
{"name": True},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,10 @@ class IntegrateFrames(pyblish.api.InstancePlugin):
|
|||
|
||||
# get next version
|
||||
latest_version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
{"name": True},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,10 @@ def _get_script():
|
|||
def get_latest_version(asset_name, subset_name, family):
|
||||
# Get asset
|
||||
asset_name = io.find_one(
|
||||
{"type": "asset", "name": asset_name},
|
||||
{
|
||||
"type": "asset",
|
||||
"name": asset_name
|
||||
},
|
||||
projection={"name": True}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -449,7 +449,10 @@ class ExtractLook(pype.api.Extractor):
|
|||
version_number = 1
|
||||
if subset is not None:
|
||||
version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@ class ValidateNodeIDsRelated(pyblish.api.InstancePlugin):
|
|||
|
||||
asset = instance.data['asset']
|
||||
asset_data = io.find_one(
|
||||
{"name": asset, "type": "asset"},
|
||||
{
|
||||
"name": asset,
|
||||
"type": "asset"
|
||||
},
|
||||
projection={"_id": True}
|
||||
)
|
||||
asset_id = str(asset_data['_id'])
|
||||
|
|
|
|||
|
|
@ -201,7 +201,10 @@ class ExtractVideoTracksLuts(pyblish.api.InstancePlugin):
|
|||
version_number = 1
|
||||
if subset is not None:
|
||||
version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,10 @@ class IntegrateAssumedDestination(pyblish.api.InstancePlugin):
|
|||
project_name = api.Session["AVALON_PROJECT"]
|
||||
|
||||
project = io.find_one(
|
||||
{"type": "project", "name": project_name},
|
||||
{
|
||||
"type": "project",
|
||||
"name": project_name
|
||||
},
|
||||
projection={"config": True, "data": True}
|
||||
)
|
||||
|
||||
|
|
@ -106,7 +109,10 @@ class IntegrateAssumedDestination(pyblish.api.InstancePlugin):
|
|||
version_number = 1
|
||||
if subset is not None:
|
||||
version = io.find_one(
|
||||
{"type": "version", "parent": subset["_id"]},
|
||||
{
|
||||
"type": "version",
|
||||
"parent": subset["_id"]
|
||||
},
|
||||
sort=[("name", -1)]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -463,10 +463,12 @@ def update_scene(set_container, containers, current_data, new_data, new_file):
|
|||
# Check whether the conversion can be done by the Loader.
|
||||
# They *must* use the same asset, subset and Loader for
|
||||
# `api.update` to make sense.
|
||||
old = io.find_one(
|
||||
{"_id": io.ObjectId(representation_current)}
|
||||
)
|
||||
new = io.find_one({"_id": io.ObjectId(representation_new)})
|
||||
old = io.find_one({
|
||||
"_id": io.ObjectId(representation_current)
|
||||
})
|
||||
new = io.find_one({
|
||||
"_id": io.ObjectId(representation_new)
|
||||
})
|
||||
is_valid = compare_representations(old=old, new=new)
|
||||
if not is_valid:
|
||||
log.error("Skipping: %s. See log for details.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue