mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +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 = []
|
||||
_containers = list(host.ls())
|
||||
_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 = {
|
||||
str(doc["_id"]): doc["parent"] for doc in
|
||||
io.find({"_id": {"$in": _repr_ids}}, projection={"parent": 1})
|
||||
str(doc["_id"]): doc["parent"]
|
||||
for doc in repre_docs
|
||||
}
|
||||
|
||||
# QUESTION should we add same representation id when loaded multiple
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue