How to trigger the import dialog using python script in Autodesk Maya


#1

how to trigger the import dialog using python in Maya

I’ve tried these commands but maybe i can’t get it right
fileDialog2, fileDialog, fileBrowserDialog.

I just want the default import dialog to popup once a command is executed, which i know how to but i don’t know the command responsible for triggering the import dialog
if it is not one of the commands mentioned above then what is the command ?

I hope i am posting this where it supposed to be posted
thanks in advance!


#2

for anyone who might fall into the same mistake i did or whoever would search for this in the future
The command is

import maya.cmds as cmds
cmds.Import()

don’t use these (file, fileDialog2, fileDialog, fileBrowserDialog) commands for import purposes until you want to import a specific file type