diff --git a/client/ayon_core/hosts/maya/plugins/load/load_vrayproxy.py b/client/ayon_core/hosts/maya/plugins/load/load_vrayproxy.py index 651197627e..59d8eadefa 100644 --- a/client/ayon_core/hosts/maya/plugins/load/load_vrayproxy.py +++ b/client/ayon_core/hosts/maya/plugins/load/load_vrayproxy.py @@ -7,9 +7,9 @@ loader will use them instead of native vray vrmesh format. """ import os -from ayon_api import get_representation_by_name import maya.cmds as cmds +import ayon_api from ayon_core.settings import get_project_settings from ayon_core.pipeline import ( load, diff --git a/client/ayon_core/hosts/tvpaint/plugins/load/load_reference_image.py b/client/ayon_core/hosts/tvpaint/plugins/load/load_reference_image.py index a3bcf4c144..ec671b0cb1 100644 --- a/client/ayon_core/hosts/tvpaint/plugins/load/load_reference_image.py +++ b/client/ayon_core/hosts/tvpaint/plugins/load/load_reference_image.py @@ -1,10 +1,7 @@ import collections from ayon_core.lib.attribute_definitions import BoolDef -from ayon_core.pipeline import ( - get_representation_context, - registered_host, -) +from ayon_core.pipeline import registered_host from ayon_core.hosts.tvpaint.api import plugin from ayon_core.hosts.tvpaint.api.lib import ( get_layers_data, @@ -218,10 +215,7 @@ class LoadImage(plugin.Loader): removed. """ - repre_entity = context["representation"] # Create new containers first - context = get_representation_context(repre_entity["id"]) - # Get layer ids from previous container old_layer_names = self.get_members_from_container(container) diff --git a/client/ayon_core/pipeline/create/context.py b/client/ayon_core/pipeline/create/context.py index 308762fae6..8c6a7f1bb6 100644 --- a/client/ayon_core/pipeline/create/context.py +++ b/client/ayon_core/pipeline/create/context.py @@ -1953,11 +1953,11 @@ class CreateContext: """Trigger create of plugins with standartized arguments. Arguments 'folder_entity' and 'task_name' use current context as - default values. If only 'task_name' is provided it will be overriden - by task name from current context. If 'task_name' is not provided - when 'folder_entity' is, it is considered that task name is not - specified, which can lead to error if product name template requires - task name. + default values. If only 'task_entity' is provided it will be + overridden by task name from current context. If 'task_name' is not + provided when 'folder_entity' is, it is considered that task name is + not specified, which can lead to error if product name template + requires task name. Args: creator_identifier (str): Identifier of creator plugin. @@ -1986,6 +1986,8 @@ class CreateContext: raise CreatorError( "Folder '{}' was not found".format(folder_path) ) + + task_name = None if task_entity is None: task_name = self.get_current_task_name() task_entity = ayon_api.get_task_by_name( diff --git a/client/ayon_core/tools/sceneinventory/switch_dialog/dialog.py b/client/ayon_core/tools/sceneinventory/switch_dialog/dialog.py index 823a4a6631..4977ad13c6 100644 --- a/client/ayon_core/tools/sceneinventory/switch_dialog/dialog.py +++ b/client/ayon_core/tools/sceneinventory/switch_dialog/dialog.py @@ -240,7 +240,7 @@ class SwitchAssetDialog(QtWidgets.QDialog): return ayon_api.get_last_versions( project_name, product_ids, - fields={"id", "folderId", "version"} + fields={"id", "productId", "version"} ) def _on_show_timer(self):