restore a scene state with maxscript

Hello.
Because I am very new to scripting and
I need these functions to know how
to initiate them through maxscript:

1.
How to restore a scenestate?

2.
How to export to a file format

3.
How to set the rendering resolution

thank you all.

Comments

Comment viewing options

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

quick help

I never used sceneStateMgr interface in scripting,
so take next code just as "getting started" tip.

ssm = sceneStateMgr
ss_id = ssm.FindSceneState "02" -- get the state index
if ss_id > 0 do -- if found...
(
	ssi = ssm.GetSceneState ss_id -- the state
	-- get it parts...
	ssp = ssm.GetParts "02"
	ssm.Restore "02" ssp
	-- OR use...
	---ssm.RestoreAllParts "02"
)

my recent MAXScripts RSS (archive here)

morpheus's picture

THANK YOUUUUUUU

ANUBIS YOU ARE THE BEST THANK YOU VERY MUCH

br0t's picture

1. search in the

1. search in the documentation for "sceneStateMgr"

2. search in the documentation for "exportFile"

3. to see what renderers you have installed and assign one of them try this:

rendererClass.classes --execute this to get a list of strings
renderers.current = "V_Ray_Adv_2_10_01" --use the strings to set the current renderer

EDIT: oh ive red solution and not resolution lol...
the resolution is easily set using "renderWidth" and "renderHeight"
Cheers

Never get low & slow & out of ideas

morpheus's picture

thanks but I dont understand :)

br01, really thanks for your immediate reply.
Unfortunately I don't have a lot of time to learn maxscipt right now.
So at list if I know for the beginning some functions and
after some time I wish to learn in a good way how to scipt in max.

In the help documentation of 3dsmax I found these, but
when I put them into script listener, many errors occurs.

Interface: sceneStateMgr

Restore name parts

Restores the scene state with the given name using the supplied array of parts. Returns true on success, false otherwise.

How should I put them for ex to restore a scene state named "02"?

thanks again very much

Comment viewing options

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