mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use 'get_asset_name_identifier' in pipeline logic
This commit is contained in:
parent
4c6ec4b9bc
commit
0ddd95eacf
2 changed files with 10 additions and 6 deletions
|
|
@ -17,6 +17,7 @@ from openpype.client import (
|
|||
get_asset_by_id,
|
||||
get_asset_by_name,
|
||||
version_is_latest,
|
||||
get_asset_name_identifier,
|
||||
)
|
||||
from openpype.lib.events import emit_event
|
||||
from openpype.modules import load_modules, ModulesManager
|
||||
|
|
@ -568,14 +569,12 @@ def compute_session_changes(
|
|||
Dict[str, str]: Changes in the Session dictionary.
|
||||
"""
|
||||
|
||||
changes = {}
|
||||
|
||||
# Get asset document and asset
|
||||
if not asset_doc:
|
||||
task_name = None
|
||||
asset_name = None
|
||||
else:
|
||||
asset_name = asset_doc["name"]
|
||||
asset_name = get_asset_name_identifier(asset_doc)
|
||||
|
||||
# Detect any changes compared session
|
||||
mapping = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
import collections
|
||||
|
||||
from openpype.client import get_assets, get_subsets, get_last_versions
|
||||
from openpype.client import (
|
||||
get_assets,
|
||||
get_subsets,
|
||||
get_last_versions,
|
||||
get_asset_name_identifier,
|
||||
)
|
||||
|
||||
|
||||
def get_last_versions_for_instances(
|
||||
|
|
@ -52,10 +57,10 @@ def get_last_versions_for_instances(
|
|||
asset_docs = get_assets(
|
||||
project_name,
|
||||
asset_names=subset_names_by_asset_name.keys(),
|
||||
fields=["name", "_id"]
|
||||
fields=["name", "_id", "data.parents"]
|
||||
)
|
||||
asset_names_by_id = {
|
||||
asset_doc["_id"]: asset_doc["name"]
|
||||
asset_doc["_id"]: get_asset_name_identifier(asset_doc)
|
||||
for asset_doc in asset_docs
|
||||
}
|
||||
if not asset_names_by_id:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue