diff --git a/client/ayon_core/tools/ayon_utils/widgets/tasks_widget.py b/client/ayon_core/tools/ayon_utils/widgets/tasks_widget.py index 437eef2180..b273d83fa6 100644 --- a/client/ayon_core/tools/ayon_utils/widgets/tasks_widget.py +++ b/client/ayon_core/tools/ayon_utils/widgets/tasks_widget.py @@ -360,6 +360,20 @@ class TasksWidget(QtWidgets.QWidget): self._tasks_model.refresh() def get_selected_task_info(self): + """Get selected task info. + + Example output:: + + { + "task_id": "5e7e3e3e3e3e3e3e3e3e3e3e", + "task_name": "modeling", + "task_type": "Modeling" + } + + Returns: + dict[str, Union[str, None]]: Task info. + + """ _, task_id, task_name, task_type = self._get_selected_item_ids() return { "task_id": task_id, diff --git a/client/ayon_core/tools/publisher/widgets/create_context_widgets.py b/client/ayon_core/tools/publisher/widgets/create_context_widgets.py index cd3d1103e3..d65a2ace8d 100644 --- a/client/ayon_core/tools/publisher/widgets/create_context_widgets.py +++ b/client/ayon_core/tools/publisher/widgets/create_context_widgets.py @@ -82,6 +82,18 @@ class CreateSelectionModel(object): class CreateHierarchyController: + """Controller for hierarchy widgets. + + Helper for handling hierarchy widgets in create tab. It handles selection + of folder and task to properly propagate it to other widgets. + + At the same time handles expected selection so can pre-select folder and + task based on current context. + + Args: + controller (PublisherController): Publisher controller. + + """ def __init__(self, controller): self._event_system = QueuedEventSystem() self._controller = controller