Skip to content

Commit bd7e7f1

Browse files
committed
select export set to publish
1 parent 610e538 commit bd7e7f1

File tree

1 file changed

+7
-0
lines changed
  • Assets/Integrations/Autodesk/maya2017/scripts/unityOneClick

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ def doIt(self, args):
281281
unity_fbx_file_path = maya.cmds.getAttr("{0}.{1}".format(self._exportSet, self._unityFbxFilePathAttr))
282282
unity_fbx_file_name = maya.cmds.getAttr("{0}.{1}".format(self._exportSet, self._unityFbxFileNameAttr))
283283

284+
285+
# select the export set for export, if it exists,
286+
# otherwise take what is currently selected
287+
allSets = maya.cmds.listSets(allSets=True)
288+
if self._exportSet in allSets:
289+
maya.cmds.select(self._exportSet, r=True, ne=True)
290+
284291
if unity_fbx_file_path and unity_fbx_file_name:
285292
strCmd = r'file -force -options "" -typ "FBX export" -pr -es "{0}{1}"'.format(unity_fbx_file_path, unity_fbx_file_name);
286293
else:

0 commit comments

Comments
 (0)