mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
reorganized code a little bit
This commit is contained in:
parent
7c46088644
commit
a5826ae336
1 changed files with 6 additions and 2 deletions
|
|
@ -38,9 +38,13 @@ class CollectSceneLoadedVersions(pyblish.api.ContextPlugin):
|
||||||
loaded_versions = []
|
loaded_versions = []
|
||||||
_containers = list(host.ls())
|
_containers = list(host.ls())
|
||||||
_repr_ids = [ObjectId(c["representation"]) for c in _containers]
|
_repr_ids = [ObjectId(c["representation"]) for c in _containers]
|
||||||
|
repre_docs = io.find(
|
||||||
|
{"_id": {"$in": _repr_ids}},
|
||||||
|
projection={"_id": 1, "parent": 1}
|
||||||
|
)
|
||||||
version_by_repr = {
|
version_by_repr = {
|
||||||
str(doc["_id"]): doc["parent"] for doc in
|
str(doc["_id"]): doc["parent"]
|
||||||
io.find({"_id": {"$in": _repr_ids}}, projection={"parent": 1})
|
for doc in repre_docs
|
||||||
}
|
}
|
||||||
|
|
||||||
# QUESTION should we add same representation id when loaded multiple
|
# QUESTION should we add same representation id when loaded multiple
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue