@@ -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 publishing'
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 reviewCmd(BaseCommand):
242
244
243
245
@ingroup UnityCommands
244
246
"""
247
+ kIconPath = "preview.png"
245
248
kLabel = 'Review Model in Unity'
246
249
kShortLabel = 'Review'
247
250
kCmdName = "{}Review" .format (version .pluginPrefix ())
@@ -332,6 +335,7 @@ class publishCmd(BaseCommand):
332
335
333
336
@ingroup UnityCommands
334
337
"""
338
+ kIconPath = "export.png"
335
339
kLabel = 'Publish Model to Unity'
336
340
kShortLabel = 'Publish'
337
341
kCmdName = "{}Publish" .format (version .pluginPrefix ())
0 commit comments