Notifications
Clear all

[Closed] BitmapIO and setting output paths with Maxscript

I’m using maxscript to generate Batch Render jobs dynamically (yeah, I’m aware of the bugs with the .enable and .sceneStateName properties), and I’m having trouble trying to figure out how to deal with the BitmapIO settings when setting the output paths.

My understanding is, when the user manually sets an output path and configures the output driver through the UI (in other words, sets the bitdepth of a .tga, or the compression setting of a .jpg), those settings are somehow saved with that output path, and then at render time, they are called up and the global bitmapIO settings are set to what is stored for that path. Is that correct?

This causes a problem when you want to set the output path for a Batch Render job with maxscript, since you’re not getting to register the output driver settings with that path.

Any one have any ideas on this?

Thanks!

7 Replies

Look up the BitmapIO Classes in the Help. This will give you the maxscript code to get and set values, only certain types and values are supported. I would try setting the values then setting the path to a different file type.

-Eric

P_M,

I have already read through the help docs and previous forum threads pertaining to this issue, but they offer very little explanation, which is why I’m hoping someone who really understands it can explain it better now.

The gist of my question is 1) where does Max store the local settings for a specific path the user has chosen, and 2) is it possible to get/set those output settings for a given path.

That being said, your suggestion about setting the bitmapIO right before saving the path has possibility, I’ll look into that. If that doesn’t work, then it seems to me there’s a significant and fundamental part of Max’s functionality that isn’t being exposed to Maxscript like one would expect.

Thanks.

The settings are stored locally on the disk in a config file or the registry, depending on the plugin. As far as I know there is no way to access the data embedded in a file. I believe the proper way to set them would be:

btrnd = batchrendermgr.getview 1 – get first batch render entry
targa.setcolorDepth = 32 – set tga colordepth to 32
btrnd.outputfilename “C:\some path\some_file.tga” – set a targa fileoutput

btrnd = batchrendermgr.getview 2 – get second batch render entry
jpeg.setQuality = 90 – set the jpeg quality
btrnd.outputfilename “C:\some path\some_file.jpg” – set a jpeg fileoutput
I haven’t tested this, but I believe it should work.

-Eric

Eric,

Thanks for your idea. I’ll give that a try hopefully tomorrow to see if that will allow files settings to be set along with file paths when scripting Batch Render jobs.

Laterz…

Hi, Eric

I just got around to testing your idea, and I’m sorry to report that it didn’t work. It just uses the last values that were set.

My guess at this point is that the only way to do what I want is to capture the current settings of the bitmapIO module that the user has just set a path for, and record that data in maxscript along with the path.

The only other way that I know of is create a dos bat file, same as output by the batch render dialog. Here you can specify specific output parameters for some output modules. Check the 3ds Max user reference for “backburner command line” or “cmdjob” for more info. I have had to use this in the past, created them manually to submit netrender jobs when bitmap I/O settings weren’t properly being sent from the Max UI.

-Eric

Ok, Eric, thanks for your help!