@@ -38,7 +38,8 @@ class BaseCommand(OpenMayaMPx.MPxCommand, LoggerMixin):
38
38
"""
39
39
Base class for UnityOneClick Plugin Commands.
40
40
"""
41
- kDefaultIcon = 'unity_100.png'
41
+ kIconPath = ""
42
+ kFamilyIcon = 'unity.png'
42
43
kFamilyLabel = "The UnityOneClick plugin allows you to reliably exchange and review your work between Maya and Unity."
43
44
44
45
def __init__ (self ):
@@ -92,11 +93,11 @@ def loadUnityFbxExportSettings(self):
92
93
93
94
@classmethod
94
95
def iconPath (cls ):
95
- return ""
96
+ return cls . kIconPath
96
97
97
98
@classmethod
98
99
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 ))
100
101
101
102
def storeAttribute (self , node , attr , attrValue , attrType = "string" ):
102
103
if not maya .mel .eval ('attributeExists "{0}" "{1}"' .format (attr , node )):
@@ -117,6 +118,7 @@ class importCmd(BaseCommand):
117
118
118
119
@ingroup UnityCommands
119
120
"""
121
+ kIconPath = "import.png"
120
122
kLabel = 'Import FBX file from Unity Project and auto-configure for exporting'
121
123
kShortLabel = 'Import'
122
124
kCmdName = "{}Import" .format (version .pluginPrefix ())
@@ -145,7 +147,7 @@ def syntaxCreator(cls):
145
147
@classmethod
146
148
def scriptCmd (cls ):
147
149
return
148
-
150
+
149
151
def beforeImport (self , retCode , file , clientData ):
150
152
# store path and filename
151
153
self ._tempPath = file .resolvedPath ()
@@ -242,6 +244,7 @@ class previewCmd(BaseCommand):
242
244
243
245
@ingroup UnityCommands
244
246
"""
247
+ kIconPath = "preview.png"
245
248
kLabel = 'Preview Model in Unity window'
246
249
kShortLabel = 'Preview'
247
250
kCmdName = "{}Preview" .format (version .pluginPrefix ())
@@ -343,6 +346,7 @@ class exportCmd(BaseCommand):
343
346
344
347
@ingroup UnityCommands
345
348
"""
349
+ kIconPath = "export.png"
346
350
kLabel = 'Export Model to Unity'
347
351
kShortLabel = 'Export'
348
352
kCmdName = "{}Export" .format (version .pluginPrefix ())
0 commit comments