From 53bdf84abb9407ae5e3970a6a40b335d4111b3d5 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 13 Jul 2020 13:59:17 +0200 Subject: [PATCH 1/3] removed Thumbs.db from pype/res --- res/icons/Thumbs.db | Bin 6144 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 res/icons/Thumbs.db diff --git a/res/icons/Thumbs.db b/res/icons/Thumbs.db deleted file mode 100644 index fa56c871f60da645a236c2786a1fdfe9f5693dc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6144 zcmeH}dpOkDAIHy_VT^>4YbAGs$-2hOR&FiZ=!Z})CHG6Yvy7Cqp_^5|HA11<PcBN=7 z2YeLz01Flo0^s?t=NNd6vJ^r9aKQ`oei1>C<%a;k%dhbT?ZA7uRy2PoIG99k2%2*| zgcm}9@Ilb`U*rF82dqILETKRKn1BG-hJXl|?avP}cw$y|1@(i!iy!G$Ve1+@Fj&~h zP++;I7T5%Ifis}O+5^^JOZQs99cU~S9pDKlK=YHsszMi9nICOG+3}+nk~T!kyp26{^?pu%gn<<9@3hVw7!L4ELZ=NEx}DId-63Fp`ZmFmFa28-7c z+EBeFeDdi~{s;OM;cycl=113!<_*os-~Ikq!T0=-)etmwf)MyG01zR3|kk%uTi&@q%?OM)mvR3NGlGGrq}4e|{{9ijn2 zPlgsm8-niBCWtOX4?=-_^)2*Nemc+`p}Ft)>ygX<$^`DjwM{-l{YTBD{9^LRzce>B$~h{ zCN3elR#AzhtfH#3Nmq|T{dU`TCZ^wSr@#M&h}oS?qruN4jon75e zdU`p}2VV^RHvId@%dzo^$*Jj?*|~S9E)2jf%lcEK4+*C#ImoQ5-|1Eh+mvVbT9c*`LDx($x$2 zu^5;D^ynKhYohcjTa`=3c`*OtktL<8CUiOjrc7~3qrnlWri_ad78uRHtNzI$BXjrRQ z$*j3qu^j_$HUrCly-qrX8)JY*ELCPhYuyG?$(Z@&UjG^gaW4DQ&GORCszLN};39~L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7I*&l-{TxXOf+5Ml~GN zs74lnX{jn%dGU_d7awG>&0d8Tj`|A*-<&qo&CZ6b7o~%EioTP5 zc~_xUFmv8I(L7(Rx2n2KZNad+Y_B@8&&WS~i8_DFpf6kFZ_LR)>kaghn=q;x0+M_2 z`?1kHfbx*m0zW?ut{|Y*_s0AigW0(2rdDUB$8&ko9kY~kNC6Id9)mgG`-c8*zP@hN z>#GE%)Hw5N`4cAO()YVZXD%JNaj+&L^SI98=Amdxc~Pph)On_+m-3S>TGvQ;KD;4$ z8)vaPuYdMz*Q&J2q0_e?Ty1)tLoAZS{TyT{|I~{qJ!|t$dSSW>0X2^iaH>EJ&*@6! zyc+6I>ph@kXgn96$yJBr><*zbs0uEL@y}ue&$%DD?PH!Ls@z1Qv6I#IDZgsl(|72& kBV1h;Z#MfU+O7Nv+GgGN`$lJ^|FXW7PpGf$7rX=i0f1|-6aWAK From 21645bb30bcd8f6c02751e24f660e73ce5c51aa7 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 13 Jul 2020 13:59:52 +0200 Subject: [PATCH 2/3] moved remaining resources from `~/pype/res/` to `~/pype/pype/resources/icons/` --- {res => pype/resources}/icons/folder-favorite.png | Bin {res => pype/resources}/icons/folder-favorite2.png | Bin {res => pype/resources}/icons/folder-favorite3.png | Bin {res => pype/resources}/icons/inventory.png | Bin {res => pype/resources}/icons/loader.png | Bin {res => pype/resources}/icons/lookmanager.png | Bin {res => pype/resources}/icons/workfiles.png | Bin 7 files changed, 0 insertions(+), 0 deletions(-) rename {res => pype/resources}/icons/folder-favorite.png (100%) rename {res => pype/resources}/icons/folder-favorite2.png (100%) rename {res => pype/resources}/icons/folder-favorite3.png (100%) rename {res => pype/resources}/icons/inventory.png (100%) rename {res => pype/resources}/icons/loader.png (100%) rename {res => pype/resources}/icons/lookmanager.png (100%) rename {res => pype/resources}/icons/workfiles.png (100%) diff --git a/res/icons/folder-favorite.png b/pype/resources/icons/folder-favorite.png similarity index 100% rename from res/icons/folder-favorite.png rename to pype/resources/icons/folder-favorite.png diff --git a/res/icons/folder-favorite2.png b/pype/resources/icons/folder-favorite2.png similarity index 100% rename from res/icons/folder-favorite2.png rename to pype/resources/icons/folder-favorite2.png diff --git a/res/icons/folder-favorite3.png b/pype/resources/icons/folder-favorite3.png similarity index 100% rename from res/icons/folder-favorite3.png rename to pype/resources/icons/folder-favorite3.png diff --git a/res/icons/inventory.png b/pype/resources/icons/inventory.png similarity index 100% rename from res/icons/inventory.png rename to pype/resources/icons/inventory.png diff --git a/res/icons/loader.png b/pype/resources/icons/loader.png similarity index 100% rename from res/icons/loader.png rename to pype/resources/icons/loader.png diff --git a/res/icons/lookmanager.png b/pype/resources/icons/lookmanager.png similarity index 100% rename from res/icons/lookmanager.png rename to pype/resources/icons/lookmanager.png diff --git a/res/icons/workfiles.png b/pype/resources/icons/workfiles.png similarity index 100% rename from res/icons/workfiles.png rename to pype/resources/icons/workfiles.png From 308d643bae2036d81f580900a5b30587a833568b Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 13 Jul 2020 14:12:18 +0200 Subject: [PATCH 3/3] moved resources changed in code --- pype/hosts/maya/customize.py | 7 ++----- pype/hosts/nuke/utils.py | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pype/hosts/maya/customize.py b/pype/hosts/maya/customize.py index 8bd7052d9e..cf179e1d63 100644 --- a/pype/hosts/maya/customize.py +++ b/pype/hosts/maya/customize.py @@ -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" diff --git a/pype/hosts/nuke/utils.py b/pype/hosts/nuke/utils.py index aa5bc1077e..72c7b7bc14 100644 --- a/pype/hosts/nuke/utils.py +++ b/pype/hosts/nuke/utils.py @@ -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,