Skip to content

Commit f0139d0

Browse files
committed
use setExists function
1 parent c1ef473 commit f0139d0

File tree

1 file changed

+4
-6
lines changed
  • Assets/Integrations/Autodesk/maya2017/scripts/unityOneClick

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,15 @@ def doIt(self, args):
295295

296296
if not self.loadUnityFbxExportSettings():
297297
return
298-
299-
unity_fbx_file_path = self.getAttribute(self._exportSet, self._unityFbxFilePathAttr)
300-
unity_fbx_file_name = self.getAttribute(self._exportSet, self._unityFbxFileNameAttr)
301-
302298

303299
# select the export set for export, if it exists,
304300
# otherwise take what is currently selected
305-
allSets = maya.cmds.listSets(allSets=True)
306-
if self._exportSet in allSets:
301+
if self.setExists(self._exportSet):
307302
maya.cmds.select(self._exportSet, r=True, ne=True)
308303

304+
unity_fbx_file_path = self.getAttribute(self._exportSet, self._unityFbxFilePathAttr)
305+
unity_fbx_file_name = self.getAttribute(self._exportSet, self._unityFbxFileNameAttr)
306+
309307
if unity_fbx_file_path and unity_fbx_file_name:
310308
strCmd = r'file -force -options "" -typ "FBX export" -pr -es "{0}{1}"'.format(unity_fbx_file_path, unity_fbx_file_name);
311309
else:

0 commit comments

Comments
 (0)