Skip to content

Commit

Permalink
use snake-case method names
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Feb 7, 2024
1 parent 5d46336 commit 1327bff
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions client/ayon_core/hosts/fusion/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_()
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/fusion/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
13 changes: 6 additions & 7 deletions client/ayon_core/hosts/houdini/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import re
import uuid
import logging
from contextlib import contextmanager
import json

import six
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/houdini/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions client/ayon_core/hosts/max/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions client/ayon_core/hosts/maya/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/maya/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/substancepainter/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1327bff

Please sign in to comment.