Merge pull request #349 from pypeclub/feature/last_res_to_resources

Feature/last res to resources
This commit is contained in:
Milan Kolar 2020-07-17 17:14:30 +02:00 committed by GitHub
commit c30626265d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 4 additions and 8 deletions

View file

@ -70,16 +70,13 @@ def override_component_mask_commands():
def override_toolbox_ui():
"""Add custom buttons in Toolbox as replacement for Maya web help icon."""
import pype
res = os.path.join(os.path.dirname(os.path.dirname(pype.__file__)),
"res")
icons = os.path.join(res, "icons")
import avalon.tools.sceneinventory as inventory
import avalon.tools.loader as loader
from avalon.maya.pipeline import launch_workfiles_app
import mayalookassigner
from pype.api import resources
icons = resources.get_resource("icons")
# Ensure the maya web icon on toolbox exists
web_button = "ToolBox|MainToolboxLayout|mayaWebButton"

View file

@ -1,6 +1,7 @@
import os
import nuke
from avalon.nuke import lib as anlib
from pype.api import resources
def set_context_favorites(favorites={}):
@ -9,9 +10,7 @@ def set_context_favorites(favorites={}):
Argumets:
favorites (dict): couples of {name:path}
"""
dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
icon_path = os.path.join(dir, 'res', 'icons', 'folder-favorite3.png')
icon_path = resources.get_resource("icons", "folder-favorite3.png")
for name, path in favorites.items():
nuke.addFavoriteDir(
name,

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 408 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

Before After
Before After

Binary file not shown.