Skip to content

Commit f8f772e

Browse files
authored
Merge pull request #154 from Unity-Technologies/Uni-25833-maya-icons
Uni-25833-maya-icons
2 parents 34d4ef4 + 3a41352 commit f8f772e

File tree

7 files changed

+8
-4
lines changed

7 files changed

+8
-4
lines changed
19.6 KB
Loading
19.4 KB
Loading
23 KB
Loading
Binary file not shown.
Binary file not shown.

Assets/Integrations/Autodesk/maya/scripts/unityOneClick/commands.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class BaseCommand(OpenMayaMPx.MPxCommand, LoggerMixin):
3838
"""
3939
Base class for UnityOneClick Plugin Commands.
4040
"""
41-
kDefaultIcon = 'unity_100.png'
41+
kIconPath = ""
42+
kFamilyIcon = 'unity.png'
4243
kFamilyLabel = "The UnityOneClick plugin allows you to reliably exchange and review your work between Maya and Unity."
4344

4445
def __init__(self):
@@ -92,11 +93,11 @@ def loadUnityFbxExportSettings(self):
9293

9394
@classmethod
9495
def iconPath(cls):
95-
return ""
96+
return cls.kIconPath
9697

9798
@classmethod
9899
def familyIconPath(cls):
99-
return maya.mel.eval('$tempPath = languageResourcePath("{0}");'.format(cls.kDefaultIcon))
100+
return maya.mel.eval('$tempPath = languageResourcePath("{0}");'.format(cls.kFamilyIcon))
100101

101102
def storeAttribute(self, node, attr, attrValue, attrType="string"):
102103
if not maya.mel.eval('attributeExists "{0}" "{1}"'.format(attr, node)):
@@ -117,6 +118,7 @@ class importCmd(BaseCommand):
117118
118119
@ingroup UnityCommands
119120
"""
121+
kIconPath = "import.png"
120122
kLabel = 'Import FBX file from Unity Project and auto-configure for exporting'
121123
kShortLabel = 'Import'
122124
kCmdName = "{}Import".format(version.pluginPrefix())
@@ -145,7 +147,7 @@ def syntaxCreator(cls):
145147
@classmethod
146148
def scriptCmd(cls):
147149
return
148-
150+
149151
def beforeImport(self, retCode, file, clientData):
150152
# store path and filename
151153
self._tempPath = file.resolvedPath()
@@ -242,6 +244,7 @@ class previewCmd(BaseCommand):
242244
243245
@ingroup UnityCommands
244246
"""
247+
kIconPath = "preview.png"
245248
kLabel = 'Preview Model in Unity window'
246249
kShortLabel = 'Preview'
247250
kCmdName = "{}Preview".format(version.pluginPrefix())
@@ -343,6 +346,7 @@ class exportCmd(BaseCommand):
343346
344347
@ingroup UnityCommands
345348
"""
349+
kIconPath = "export.png"
346350
kLabel = 'Export Model to Unity'
347351
kShortLabel = 'Export'
348352
kCmdName = "{}Export".format(version.pluginPrefix())

0 commit comments

Comments
 (0)