Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
MEL: Creating a new file

MEL: Creating a new file

2003-12-08       - By Andrew Chapman

 Back
Reply:     1     2     3     4  

Andrew Chapman wrote:
> Taisuke Tanimura wrote:
>
>>I have a MEL script that saves some animation data out to file. I've run
>>into a problem when I want to save the data out to a new file - there
>>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
>>fileDialog command only returns a string if the user picks an existing
>>file. I could work around it by popping up a text box and have the user
>>manually enter the full path and then create the file via fopen, but it
>>would be nice to use the file picker to do this. Has anyone had similar
>>problems or know of a workaround? Thanks!
>
> You could start with a base name, and append increasing numbers to the
> end until you find one that doesn't exist. Use fopen() in read mode to
> test for file existence (would be nice if the sysFile command had a
> -exists flag wouldn't it?).

Erm, yeah... totally misread that post sorry ;)

I thought you were after a way to create a tempfile and be sure it
wasn't one that already existed.

Just ignore me, I've been working too long...

--
Andrew Chapman
3D Technical Director - Framestore CFC


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>