Notifications
Clear all

[Closed] Bitmap Save fileType Setup/Settings

Hey guys,

I searched the help files and the forum but didn’t find anything that could help me with my problem… Even tho it should be rather simple to solve so i think I’m just overlooking something verry obvious…
I need to save out collections of maps as dds files in different formats depending on different conditions. Diff maps as DXT1 normals as DXT5 for example… But i’ve got no clue how to change that

Here’s my unfiltered resize & save code


local newBM = bitmap width height;
copy m.bitmap newBM;
newBM.fileName = outputDir + getfilenameFile m.fileName + ".dds";
save newBM;
close newBM;

Any help would be greatly apprechiated

4 Replies

the easiest and complete solution that i found for myself is to save files in any appropriate format and convert then to DDS by using NVIDIA DDS Utilities with hiddendoscommand.

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Maybe this question is out of topic but how to copy or move single file using hiddendoscommand to different folder?
I try something like this


fn transferFile sourceFile: destinationFolder: opt: =
(
	local cmdStr = (opt + " " +  sourceFile + " " + destinationFolder)
	HiddenDOSCommand cmdStr exitCode:&ec
	format (if ec != 0 then "Transfer Failed!!!
" else "Transfer Successfully!!!
")
)
source = @"C:	emp\script.ms"
folder = @"C:	empnew"
transferFile sourceFile:source destinationFolder:folder opt:"move"
transferFile sourceFile:source destinationFolder:folder opt:"copy"

If you are using a version of max older than 2010 then you need to specify the startPath parameter.
http://techarttiki.blogspot.com/2009/06/hidden-hiddendoscommand-details.html

Any reason you can’t use the copyFile and renameFile (move) for file operations?
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/files/GUID-BA196B48-8ECA-4E0C-AE2E-F7EFAAF39844.htm

You can use the donotwait:false option in hiddenDosCommand to convert a texture to DDS, then move it with the standard max external file operations.

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Because of this restriction (from mxsHelp):
Fails if the new file already exists or if the old file is open in MAXScript.
I know how to copy/move file using dotnet, but i think that hiddenDOSCommand is more efficient method and shorter for sure.