ScriptSpot

Forum topic · Scripts Wanted

Simple batch render manager

By Marc_bpt · 2012-11-16

Description

Hi everybody,

I need a simple script for a batch render manager.What I need is a simple interface with ten button for batch rendering and frame rate (Start and end frame).each of these ten buttons should pick a camera.There should be also save and render button.

(I am begginer in max script)

Thank you in Advance

Comments (4)

teresa · 2013-02-19

Hi,

I'm familiar with different programming codes but in batch render manager I'm not into it yet, I'm planning to undergo training because it seems that batch render manager gives a big help in terms of running a programs.-increase testosterone

Thank you for your informative post, it really gives a big help!

Hi Marc

Anubis · 2012-11-16

Did you make a search in this site for batch render scripts?

Marc_bpt · 2012-11-17

Hi,
First, Thank you for your answer.
Yes I found one (Actually a very good one) , but I'd like to learn the commandes for picking camera or views and start render.Actually, I have already done the interface!
I don't know how to associate my script lines to my buttons.I can send you my interface if it helps.

Thanks again

well...

Anubis · 2012-11-18

Ok, first to say, welcome to MAXScript !

I can help with code but you s'd start to use the help file (MAXScript Referrence), all is there and very well explained, especially about the work with rollouts and their controls. Each control has Parameters, Properties and Events, and for each control you have example there.

In the Index tab search for "button" and you`ve got the page (Button UI Control), and there is clear example, the Button have 2 events and you add code to them using the name of your button. In that example the button was named

theButton

and it display message box when it pressed by adding a code to it Event

Pressed

:

-- quote from the help
button theButton "Press me!"
on theButton pressed do
messagebox "Remember: ..."

-- so, if you have button named myButton1:
button myButton1 "My Title"

-- here is how you add a code to its events
on myButton1 pressed do (messageBox "Hello")
on myButton1 rightclick do
(
     messageBox "Bye"
)

As for how to pick a camera (one at the time using ui-button)... there is 3 ways: using selectByName dialog, using pickObject tool, or using UI pickButton control, and here is example:

rollout ro_example "Example"
(
	-- filter function
	fn cam_filt obj = isKindOf obj Camera

	-- #1. using pickButton
	pickButton pbCam "Pick Camera" filter:cam_filt autoDisplay:true
	
	on pbCam picked obj do
	(
		if obj != undefined do -- do something
			select obj -- select it for example
	)
	
	-- #2. using Button and pickObject tool
	button btn1 "Pick Camera"
	
	on btn1 pressed do
	(
		local obj = pickObject message:"Pick Camera" filter:cam_filt count:1
		if obj != undefined do -- do something
			print obj.name -- print it name for example
	)
	
	-- #3. using Button and selectByName dialog
	button btn2 "Pick Camera"
	
	on btn2 pressed do
	(
		local obj = selectByName "Select Camera" filter:cam_filt single:true
		if obj != undefined do -- do something
			viewport.setCamera obj
	)
)
CreateDialog ro_example

Cheers!