Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2950 from pypeclub/bugfix/small_general_fixes
Browse files Browse the repository at this point in the history
General: Smaller fixes and typos
  • Loading branch information
iLLiCiTiT authored Mar 31, 2022
2 parents 05beee9 + 58085d3 commit 8146aab
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from openpype.hosts.traypublisher.api import pipeline
from openpype.lib import FileDef
from openpype.pipeline import (
Creator,
CreatedInstance,
lib
CreatedInstance
)


Expand Down Expand Up @@ -80,7 +80,7 @@ def get_default_variants(self):

def get_instance_attr_defs(self):
output = [
lib.FileDef(
FileDef(
"filepath",
folders=False,
extensions=self.extensions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ValidateWorkfilePath(pyblish.api.InstancePlugin):
"""Validate existence of workfile instance existence."""

label = "Collect Workfile"
label = "Validate Workfile"
order = pyblish.api.ValidatorOrder - 0.49
families = ["workfile"]
hosts = ["traypublisher"]
Expand Down
15 changes: 0 additions & 15 deletions openpype/modules/ftrack/lib/avalon_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,21 +286,6 @@ def from_dict_to_set(data, is_project):
return result


def get_avalon_project_template(project_name):
"""Get avalon template
Args:
project_name: (string)
Returns:
dictionary with templates
"""
templates = Anatomy(project_name).templates
return {
"workfile": templates["avalon"]["workfile"],
"work": templates["avalon"]["work"],
"publish": templates["avalon"]["publish"]
}


def get_project_apps(in_app_list):
""" Application definitions for app name.
Expand Down
6 changes: 3 additions & 3 deletions openpype/modules/log_viewer/tray/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def __init__(self, parent=None):

self.setStyleSheet(style.load_stylesheet())

self._frist_show = True
self._first_show = True

def showEvent(self, event):
super(LogsWindow, self).showEvent(event)

if self._frist_show:
self._frist_show = False
if self._first_show:
self._first_show = False
self.logs_widget.refresh()
2 changes: 1 addition & 1 deletion openpype/tools/publisher/widgets/create_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def __init__(
create_btn.setEnabled(False)

form_layout = QtWidgets.QFormLayout()
form_layout.addRow("Name:", variant_layout)
form_layout.addRow("Variant:", variant_layout)
form_layout.addRow("Subset:", subset_name_input)

mid_widget = QtWidgets.QWidget(self)
Expand Down
16 changes: 14 additions & 2 deletions openpype/tools/utils/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from openpype.style import get_objected_colors
from openpype.resources import get_image_path

log = Logger.get_logger(__name__)


def center_window(window):
"""Move window to center of it's screen."""
Expand Down Expand Up @@ -111,13 +113,23 @@ def get_qta_icon_by_name_and_color(icon_name, icon_color):
variants.append("{0}.{1}".format(key, icon_name))

icon = None
used_variant = None
for variant in variants:
try:
icon = qtawesome.icon(variant, color=icon_color)
used_variant = variant
break
except Exception:
pass

if used_variant is None:
log.info("Didn't find icon \"{}\"".format(icon_name))

elif used_variant != icon_name:
log.debug("Icon \"{}\" was not found \"{}\" is used instead".format(
icon_name, used_variant
))

SharedObjects.icons[full_icon_name] = icon
return icon

Expand All @@ -140,8 +152,8 @@ def get_asset_icon_name(asset_doc, has_children=True):
return icon_name

if has_children:
return "folder"
return "folder-o"
return "fa.folder"
return "fa.folder-o"


def get_asset_icon_color(asset_doc):
Expand Down
3 changes: 2 additions & 1 deletion openpype/widgets/attribute_defs/files_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,5 +641,6 @@ def dropEvent(self, event):
filepaths.append(filepath)
# TODO filter check
if len(filepaths) == 1:
self.set_value(filepaths[0], False)
self._filepath_input.setText(filepaths[0])

event.accept()

0 comments on commit 8146aab

Please sign in to comment.