I’m using the command file to querying the filename in Maya 2014. But it doesn’t work in 2015 or 2016.
filename = cmds.file(q=True, sn=True, shn=True, wcn=True)
I tried using pymel and it works fine.
pm.sceneName()
but, is this a bug or did something change in 2015? Or is there something wrong with the scenes I’m opening?
Is there any other way to get the file name?