Batch save scene by model's name.

Hi,
I've a master scene (studio) and a lot of models in different files (.max). I need merge these files by one in a master scene and save the master scene by name of this merged model. Is it possible to automatize this task? )

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
AlexYu's picture

Batch save scene by model's name.

hi,
thank you! I already tried this great script and rendered the scene via batch render and scene states but it is a long story to setup the scene.
I downloaded MFrender script http://www.scriptspot.com/3ds-max/scripts/mfrender this is much faster way to render a lot of files but now i'm looking for how to automatize creating the files to render.

AlexYu's picture

Batch save scene by model's name.

thanks scriptspot.com i've get some workflow for my task.

1. merge files in a master scene by the great script "Batch loader" http://www.scriptspot.com/3ds-max/scripts/batch-loader
(it can merge files in personal layers}.

2. By using this script I could render one by one and script gives the names by the model's name. Perfect! thanks to Christoph Bьlter

--Select all objects you want to render separately and execute the script.
--written by Christoph Bьlter

(

local outputPath = "C:\Users\YourName\Desktop" --change this to where your renderings should be placed
local fileExt = ".png" --change this to any image file type

renderSceneDialog.close() --close render scene dialog to make changes have an effect

for s in selection do s.isHidden = true --hide all selected objects

for s in selection do --loop through selection
(
s.isHidden = false --unhide object
rendSaveFile = true --make sure image is saved to disk
rendOutputFileName = outputPath + "\\" + s.name + fileExt --create filename
max quick render --render using the settings from the render scene dialog
s.isHidden = true --hide object again
)--end for
)

Anybody know how to save the scene right after the render finish the first object with the name of current model?
I don't know the Maxscript, i found this in maxscript listener

actionMan.executeAction 0 "40007" -- File: Save File As

But how to give the name by the object in a scene automatically?
something like "s.name" ?

barigazy's picture

...

You can use #postrender callback and next line which will works only if you select any object before you press "Render" button

(
	if selection.count != 0 do
	(
        	saveMaxFile (@"c:\Users\Branko\Desktop\"+selection[1].name)
	)
)

bga

AlexYu's picture

...

thank you very much!!!

barigazy's picture

...

Maybe this tool can helps you to manage your max files
http://www.scriptspot.com/3ds-max/scripts/batch-loader

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.