Gnimmel
09-22-2005, 10:14 PM
I'm trying to call a external image converter (texconv.exe, part of the directX sdk) from our network scripts folder which is ;
Z:\Project\Art Assets\Tools\MEL_Scripts\ddsconverter
The file I'm trying to convert is also on our network in a similar place;
Z:\Project\Art Assets\3D Projects\- Rome Textures -
As you can see both dir's have spaces in them, which I belive is part of my problem.
I can't get this to work at all. If I open a command line I can do it by putting both file names in "'s, e.g.
"Z:\CityBuilder\Art Assets\Tools\MEL_Scripts\ddsconverter\texconv" -ft bmp "Z:/CityBuilder/Art Assets/3D Projects/- Rome Textures -/Roof_RedD.dds"
The -ft flag is filetype by the way, I'm trying to convert a DSS to a BMP (or anything that Mental ray will render). This works in a command line, but the same thing in MEL does not. e.g.
string $FileName = `getAttr ($EachFile + ".fileTextureName")`;
string $DDSConvert = ("\"Z:\\CityBuilder\\Art Assets\\Tools\\MEL_Scripts\\ddsconverter\\texconv\" -ft bmp \"" + $FileName + "\"");
print ("\n SYS command = " + $DDSConvert);
//returns
Sys retrun = 'Z:\CityBuilder\Art' is not recognized as an internal or external command, operable program or batch file.
Can anyone see what's up? and no I didn't create the original dir structure and it's way too late to change it now.
Or if anyone knows a good way to get arround Mental ray not rendering DDS files, that would also help as that is what I'm trying to do. Basically at render time my script checks the renderer and if it's mental ray it converts any DDS files to BMP's so that mental ray will work. After the render it switches them back again so the artits has no idea their dds files didn't get rendered. Thats the plan anyway.
Thanks,
Richard
Z:\Project\Art Assets\Tools\MEL_Scripts\ddsconverter
The file I'm trying to convert is also on our network in a similar place;
Z:\Project\Art Assets\3D Projects\- Rome Textures -
As you can see both dir's have spaces in them, which I belive is part of my problem.
I can't get this to work at all. If I open a command line I can do it by putting both file names in "'s, e.g.
"Z:\CityBuilder\Art Assets\Tools\MEL_Scripts\ddsconverter\texconv" -ft bmp "Z:/CityBuilder/Art Assets/3D Projects/- Rome Textures -/Roof_RedD.dds"
The -ft flag is filetype by the way, I'm trying to convert a DSS to a BMP (or anything that Mental ray will render). This works in a command line, but the same thing in MEL does not. e.g.
string $FileName = `getAttr ($EachFile + ".fileTextureName")`;
string $DDSConvert = ("\"Z:\\CityBuilder\\Art Assets\\Tools\\MEL_Scripts\\ddsconverter\\texconv\" -ft bmp \"" + $FileName + "\"");
print ("\n SYS command = " + $DDSConvert);
//returns
Sys retrun = 'Z:\CityBuilder\Art' is not recognized as an internal or external command, operable program or batch file.
Can anyone see what's up? and no I didn't create the original dir structure and it's way too late to change it now.
Or if anyone knows a good way to get arround Mental ray not rendering DDS files, that would also help as that is what I'm trying to do. Basically at render time my script checks the renderer and if it's mental ray it converts any DDS files to BMP's so that mental ray will work. After the render it switches them back again so the artits has no idea their dds files didn't get rendered. Thats the plan anyway.
Thanks,
Richard
