Skip to content

Commit 9d333de

Browse files
committed
change ui
1 parent 295e5d9 commit 9d333de

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

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 publishing'
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 reviewCmd(BaseCommand):
242244
243245
@ingroup UnityCommands
244246
"""
247+
kIconPath = "preview.png"
245248
kLabel = 'Review Model in Unity'
246249
kShortLabel = 'Review'
247250
kCmdName = "{}Review".format(version.pluginPrefix())
@@ -332,6 +335,7 @@ class publishCmd(BaseCommand):
332335
333336
@ingroup UnityCommands
334337
"""
338+
kIconPath = "export.png"
335339
kLabel = 'Publish Model to Unity'
336340
kShortLabel = 'Publish'
337341
kCmdName = "{}Publish".format(version.pluginPrefix())

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ def installMenu():
9999
label=commands.reviewCmd.kShortLabel,
100100
annotation=commands.reviewCmd.kLabel,
101101
command=commands.reviewCmd.kScriptCommand,
102-
image=commands.importCmd.iconPath(),
102+
image=commands.reviewCmd.iconPath(),
103103
version=whatsNewVersion())
104104
maya.cmds.menuItem(parent=kMenuName,
105105
label=commands.publishCmd.kShortLabel,
106106
annotation=commands.publishCmd.kLabel,
107107
command=commands.publishCmd.kScriptCommand,
108-
image=commands.importCmd.iconPath(),
108+
image=commands.publishCmd.iconPath(),
109109
version=whatsNewVersion())
110110

111111
def uninstallMenu():

0 commit comments

Comments
 (0)