From 1327bff286adb1cdbbe4b4f5b74e6909702f8774 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Wed, 7 Feb 2024 17:45:20 +0100 Subject: [PATCH] use snake-case method names --- client/ayon_core/hosts/fusion/api/lib.py | 4 ++-- client/ayon_core/hosts/fusion/api/pipeline.py | 2 +- client/ayon_core/hosts/houdini/api/lib.py | 13 ++++++------- client/ayon_core/hosts/houdini/api/pipeline.py | 2 +- client/ayon_core/hosts/max/api/lib.py | 4 ++-- client/ayon_core/hosts/maya/api/lib.py | 4 ++-- client/ayon_core/hosts/maya/api/pipeline.py | 2 +- .../hosts/substancepainter/api/pipeline.py | 2 +- .../plugins/inventory/delete_unused_assets.py | 4 ++-- 9 files changed, 18 insertions(+), 19 deletions(-) diff --git a/client/ayon_core/hosts/fusion/api/lib.py b/client/ayon_core/hosts/fusion/api/lib.py index b8034afbb0..b31f812c1b 100644 --- a/client/ayon_core/hosts/fusion/api/lib.py +++ b/client/ayon_core/hosts/fusion/api/lib.py @@ -172,8 +172,8 @@ def _on_repair(): msg = "Comp preferences mismatches '{}'".format(asset_doc["name"]) msg += "\n" + "\n".join(invalid) - dialog.setMessage(msg) - dialog.setButtonText("Repair") + dialog.set_message(msg) + dialog.set_button_text("Repair") dialog.on_clicked.connect(_on_repair) dialog.show() dialog.raise_() diff --git a/client/ayon_core/hosts/fusion/api/pipeline.py b/client/ayon_core/hosts/fusion/api/pipeline.py index 18e26d74de..b3c42314b7 100644 --- a/client/ayon_core/hosts/fusion/api/pipeline.py +++ b/client/ayon_core/hosts/fusion/api/pipeline.py @@ -193,7 +193,7 @@ def _on_show_scene_inventory(): from ayon_core.style import load_stylesheet dialog = SimplePopup(parent=menu.menu) dialog.setWindowTitle("Fusion comp has outdated content") - dialog.setMessage("There are outdated containers in " + dialog.set_message("There are outdated containers in " "your Fusion comp.") dialog.on_clicked.connect(_on_show_scene_inventory) dialog.show() diff --git a/client/ayon_core/hosts/houdini/api/lib.py b/client/ayon_core/hosts/houdini/api/lib.py index 75bb775ee5..c0c398fbb6 100644 --- a/client/ayon_core/hosts/houdini/api/lib.py +++ b/client/ayon_core/hosts/houdini/api/lib.py @@ -5,7 +5,6 @@ import re import uuid import logging -from contextlib import contextmanager import json import six @@ -24,7 +23,7 @@ from ayon_core.pipeline.create import CreateContext from ayon_core.pipeline.template_data import get_template_data from ayon_core.pipeline.context_tools import get_current_project_asset -from ayon_core.tools.utils import PopupUpdateKeys +from ayon_core.tools.utils import PopupUpdateKeys, SimplePopup from ayon_core.tools.utils.host_tools import get_tool_by_name import hou @@ -212,9 +211,9 @@ def validate_fps(): dialog = PopupUpdateKeys(parent=parent) dialog.setModal(True) dialog.setWindowTitle("Houdini scene does not match project FPS") - dialog.setMessage("Scene %i FPS does not match project %i FPS" % + dialog.set_message("Scene %i FPS does not match project %i FPS" % (current_fps, fps)) - dialog.setButtonText("Fix") + dialog.set_button_text("Fix") # on_show is the Fix button clicked callback dialog.on_clicked_state.connect(lambda: set_scene_fps(fps)) @@ -950,11 +949,11 @@ def update_houdini_vars_context_dialog(): # TODO: Use better UI! parent = hou.ui.mainQtWindow() - dialog = popup.Popup(parent=parent) + dialog = SimplePopup(parent=parent) dialog.setModal(True) dialog.setWindowTitle("Houdini scene has outdated asset variables") - dialog.setMessage(message) - dialog.setButtonText("Fix") + dialog.set_message(message) + dialog.set_button_text("Fix") # on_show is the Fix button clicked callback dialog.on_clicked.connect(update_houdini_vars_context) diff --git a/client/ayon_core/hosts/houdini/api/pipeline.py b/client/ayon_core/hosts/houdini/api/pipeline.py index 1363700b8a..d93ea9acec 100644 --- a/client/ayon_core/hosts/houdini/api/pipeline.py +++ b/client/ayon_core/hosts/houdini/api/pipeline.py @@ -316,7 +316,7 @@ def _on_show_inventory(): dialog = SimplePopup(parent=parent) dialog.setWindowTitle("Houdini scene has outdated content") - dialog.setMessage("There are outdated containers in " + dialog.set_message("There are outdated containers in " "your Houdini scene.") dialog.on_clicked.connect(_on_show_inventory) dialog.show() diff --git a/client/ayon_core/hosts/max/api/lib.py b/client/ayon_core/hosts/max/api/lib.py index 88d9bde746..05c3364e4a 100644 --- a/client/ayon_core/hosts/max/api/lib.py +++ b/client/ayon_core/hosts/max/api/lib.py @@ -408,9 +408,9 @@ def check_colorspace(): from ayon_core.tools.utils import SimplePopup dialog = SimplePopup(parent=parent) dialog.setWindowTitle("Warning: Wrong OCIO Mode") - dialog.setMessage("This scene has wrong OCIO " + dialog.set_message("This scene has wrong OCIO " "Mode setting.") - dialog.setButtonText("Fix") + dialog.set_button_text("Fix") dialog.setStyleSheet(load_stylesheet()) dialog.on_clicked.connect(reset_colorspace) dialog.show() diff --git a/client/ayon_core/hosts/maya/api/lib.py b/client/ayon_core/hosts/maya/api/lib.py index cf3e49d367..7b791c3d51 100644 --- a/client/ayon_core/hosts/maya/api/lib.py +++ b/client/ayon_core/hosts/maya/api/lib.py @@ -2678,12 +2678,12 @@ def validate_fps(): dialog = PopupUpdateKeys(parent=parent) dialog.setModal(True) dialog.setWindowTitle("Maya scene does not match project FPS") - dialog.setMessage( + dialog.set_message( "Scene {} FPS does not match project {} FPS".format( current_fps, expected_fps ) ) - dialog.setButtonText("Fix") + dialog.set_button_text("Fix") # Set new text for button (add optional argument for the popup?) def on_click(update): diff --git a/client/ayon_core/hosts/maya/api/pipeline.py b/client/ayon_core/hosts/maya/api/pipeline.py index 7d918b7b26..95617cb90a 100644 --- a/client/ayon_core/hosts/maya/api/pipeline.py +++ b/client/ayon_core/hosts/maya/api/pipeline.py @@ -606,7 +606,7 @@ def _on_show_inventory(): dialog = SimplePopup(parent=parent) dialog.setWindowTitle("Maya scene has outdated content") - dialog.setMessage("There are outdated containers in " + dialog.set_message("There are outdated containers in " "your Maya scene.") dialog.on_clicked.connect(_on_show_inventory) dialog.show() diff --git a/client/ayon_core/hosts/substancepainter/api/pipeline.py b/client/ayon_core/hosts/substancepainter/api/pipeline.py index 5e28620f15..06643df7e5 100644 --- a/client/ayon_core/hosts/substancepainter/api/pipeline.py +++ b/client/ayon_core/hosts/substancepainter/api/pipeline.py @@ -303,7 +303,7 @@ def _on_show_inventory(): dialog = SimplePopup(parent=parent) dialog.setWindowTitle("Substance scene has outdated content") - dialog.setMessage("There are outdated containers in " + dialog.set_message("There are outdated containers in " "your Substance scene.") dialog.on_clicked.connect(_on_show_inventory) dialog.show() diff --git a/client/ayon_core/hosts/unreal/plugins/inventory/delete_unused_assets.py b/client/ayon_core/hosts/unreal/plugins/inventory/delete_unused_assets.py index 51d1b64ec2..1f63a1697a 100644 --- a/client/ayon_core/hosts/unreal/plugins/inventory/delete_unused_assets.py +++ b/client/ayon_core/hosts/unreal/plugins/inventory/delete_unused_assets.py @@ -44,11 +44,11 @@ def _show_confirmation_dialog(self, containers): ) dialog.setFocusPolicy(QtCore.Qt.StrongFocus) dialog.setWindowTitle("Delete all unused assets") - dialog.setMessage( + dialog.set_message( "You are about to delete all the assets in the project that \n" "are not used in any level. Are you sure you want to continue?" ) - dialog.setButtonText("Delete") + dialog.set_button_text("Delete") dialog.on_clicked.connect( lambda: self._delete_unused_assets(containers)