diff --git a/client/ayon_core/hosts/batchpublisher/addon.py b/client/ayon_core/hosts/batchpublisher/addon.py index e56b0f2bf1..df60887c57 100644 --- a/client/ayon_core/hosts/batchpublisher/addon.py +++ b/client/ayon_core/hosts/batchpublisher/addon.py @@ -52,13 +52,13 @@ class BatchPublishAddon(AYONAddon, IHostAddon, ITrayAction): import ayon_core.hosts.batchpublisher.ui.batch_publisher_view import ayon_core.hosts.batchpublisher.ui.window - # # TODO: These lines are only for testing current branch - # reload(ayon_core.hosts.batchpublisher.controller) - # reload(ayon_core.hosts.batchpublisher.ui.batch_publisher_model) - # reload( - # ayon_core.hosts.batchpublisher.ui.batch_publisher_delegate) - # reload(ayon_core.hosts.batchpublisher.ui.batch_publisher_view) - # reload(ayon_core.hosts.batchpublisher.ui.window) + # TODO: These lines are only for testing current branch + reload(ayon_core.hosts.batchpublisher.controller) + reload(ayon_core.hosts.batchpublisher.ui.batch_publisher_model) + reload( + ayon_core.hosts.batchpublisher.ui.batch_publisher_delegate) + reload(ayon_core.hosts.batchpublisher.ui.batch_publisher_view) + reload(ayon_core.hosts.batchpublisher.ui.window) # from ayon_core.hosts.batchpublisher.ui.window \ # import BatchPublisherWindow diff --git a/client/ayon_core/hosts/batchpublisher/publish.py b/client/ayon_core/hosts/batchpublisher/publish.py index b32bfac7e0..e1d9e70afd 100644 --- a/client/ayon_core/hosts/batchpublisher/publish.py +++ b/client/ayon_core/hosts/batchpublisher/publish.py @@ -30,7 +30,8 @@ def publish_version_pyblish( frame_start=None, frame_end=None): - os.environ['AVALON_PROJECT'] = project_name + # os.environ["AVALON_PROJECT"] = project_name + os.environ["AYON_PROJECT_NAME"] = project_name representation_name = list(expected_representations.keys())[0] file_path = list(expected_representations.values())[0] @@ -56,10 +57,11 @@ def publish_version_pyblish( family=family_name) instance.data.update( { - "family": family_name, + # "project": project_name, + "productType": family_name, "asset": asset_name, "task": task_name, - "subset": subset_name, + "productName": subset_name, "publish": True, "active": True, # "source": file_path, diff --git a/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_delegate.py b/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_delegate.py index 13edf509bc..f605726c3d 100644 --- a/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_delegate.py +++ b/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_delegate.py @@ -23,7 +23,8 @@ class BatchPublisherTableDelegate(QtWidgets.QStyledItemDelegate): # NOTE: Project name has been disabled to change from this dialog accepted, _project_name, folder_path, task_name = \ self._on_choose_context(ingest_file.folder_path) - if accepted and folder_path: + # if accepted and folder_path: + if folder_path: for _index in view.selectedIndexes(): model.setData( model.index(_index.row(), model.COLUMN_OF_FOLDER), @@ -161,19 +162,16 @@ class BatchPublisherTableDelegate(QtWidgets.QStyledItemDelegate): dialog.set_context( project_name=project_name) accepted = dialog.exec_() - if accepted: - context = dialog.get_context() - project = context["project"] - asset = context["asset"] - # AYON version of dialog stores the folder path - folder_path = context.get("folder_path") - if folder_path: - # Folder path returned by ContextDialog is missing slash - folder_path = "/" + folder_path - folder_path = folder_path or asset - task_name = context["task"] - return accepted, project, folder_path, task_name - return accepted, None, None, None + # if accepted: + context = dialog.get_context() + project = context["project"] + asset = context["asset"] + # AYON version of dialog stores the folder path + folder_path = context.get("folder_path") + folder_path = folder_path or asset + task_name = context["task"] + return accepted, project, folder_path, task_name + # return accepted, None, None, None class ComboBox(QtWidgets.QComboBox): diff --git a/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_model.py b/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_model.py index 4a9253651d..e7757842a4 100644 --- a/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_model.py +++ b/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_model.py @@ -1,6 +1,6 @@ from qtpy import QtCore, QtGui -from openpype.plugins.publish import integrate +from ayon_core.plugins.publish import integrate class BatchPublisherModel(QtCore.QAbstractTableModel): diff --git a/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_view.py b/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_view.py index cfad2e88fe..64cf5a1e25 100644 --- a/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_view.py +++ b/client/ayon_core/hosts/batchpublisher/ui/batch_publisher_view.py @@ -43,7 +43,6 @@ class BatchPublisherTableView(QtWidgets.QTableView): self._controller = controller def set_current_directory(self, directory): - print("view set_current_directory", directory) self._model.set_current_directory(directory) def get_product_items(self):