  | | | Creating a new file | Creating a new file 2003-12-09 - By Kevin Baca
Back With fileBrowserDialog I couldn't figure out how to specify my own file type filter. It seems filters are restricted to Maya's pre-defined file types.
Is there a way around this?
-Kevin
> -- --Original Message-- -- > From: maya-dev-bounce@(protected) > [mailto:maya-dev-bounce@(protected)] On Behalf Of Bryan Ewert > Sent: Tuesday, December 09, 2003 8:22 AM > To: maya-dev@(protected) > Subject: Re: Creating a new file > > > > from Mon, 8 Dec 2003 15:44:04 -0500 > > > doesn't seem to be an way in MEL to have the user "pick" a > file that > > doesn't exist and have the path to that non-existent file returned. > > The 'fileBrowserDialog', when invoked in "save" mode, allows > you to enter a new filename: > > // ** BEGIN MEL ** > > global proc int newFileCB( string $filename, string $filetype ) { > print ( "You entered the name: " + $filename + "\n" ); > > return true; > } > > global proc newFile() > { > // '-mode 1' is Save mode, which offers two features: > // 1. Warns when overwriting an existing file. > // 2. Allows the user to enter a new filename. > > fileBrowserDialog -mode 1 -fc "newFileCB" -ft "Maya > Scene" -an "Save"; }; > > // ** END MEL ** > > -- > Bryan Ewert < maya@(protected) . http://www.ewertb.com > > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > List-help: <mailto:listar@(protected)?Subject=help> > List-archive: <http://www.highend3d.com/maya/devarchive/> >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|
 |