I'm doing a simple project for a python scripting class that requires me to export objects in a scene to a new scene through the use of a GUI and save function.
In other words, the user is supposed to be able to click an object, run the script, have the GUI pop up, click export, be prompted to save the scene to a directory and name it, and the file will show up in that location. If the user were to load that new file, it would only be the designated exported object that was selected.
So this is what I have:
import maya.cmds as cmds
if ( cmds.window(winName,exists=True)):
cmds.window(winName,title='Export Selected Objects to New Scene',w=200,h=50)
cmds.textFieldButtonGrp('tfb',bl='Export',text='select objects and export to new scene',ed=False,bc='export()')
And that's what I have. The GUI works fine but I'm completely stumped with the saving process. I understand that the fileDialog2 command simply stores the save information in a variable but I can't figure out how to get Python to actually create the save file. Any help on this would be greaaaatly appreciated. Thank you!