mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
use resources
This commit is contained in:
parent
a27eab6049
commit
1a13997eb9
1 changed files with 2 additions and 4 deletions
|
|
@ -7,12 +7,10 @@ from . import lib
|
||||||
from Qt import QtCore, QtGui
|
from Qt import QtCore, QtGui
|
||||||
from avalon.vendor import qtawesome
|
from avalon.vendor import qtawesome
|
||||||
from avalon import io, style, api
|
from avalon import io, style, api
|
||||||
|
from pype.api import resources
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
icons_dir = "C:/Users/iLLiCiT/Desktop/Prace/pype-setup/repos/pype/pype/resources/app_icons"
|
|
||||||
|
|
||||||
|
|
||||||
class TaskModel(QtGui.QStandardItemModel):
|
class TaskModel(QtGui.QStandardItemModel):
|
||||||
"""A model listing the tasks combined for a list of assets"""
|
"""A model listing the tasks combined for a list of assets"""
|
||||||
|
|
@ -152,7 +150,7 @@ class ActionModel(QtGui.QStandardItemModel):
|
||||||
return icon
|
return icon
|
||||||
|
|
||||||
icon = self.default_icon
|
icon = self.default_icon
|
||||||
icon_path = os.path.join(icons_dir, icon_name)
|
icon_path = resources.get_resource(icon_name)
|
||||||
if os.path.exists(icon_path):
|
if os.path.exists(icon_path):
|
||||||
icon = QtGui.QIcon(icon_path)
|
icon = QtGui.QIcon(icon_path)
|
||||||
self._icon_cache[icon_name] = icon
|
self._icon_cache[icon_name] = icon
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue