[Closed] Save Settings ?
Can this be done?
Through out Max there are interfaces that I would like to save the settings use in other max scenes. I.E. materials you can save as a preset to open in a new scene.
I have made a folder of preset effects I use often but I have to open the scene, go to the panel like environments then write down each of the values and settings. There has to be a better way.
It seems that the Listener is tracking most of the settings but have not had any luck in producing a script in recalling the data.
Any advice?
– name: Sparks Trails v0.7
– Author: othoap
macroscript Sparks Trails v0.7
Category: “Trails”
buttontext: “TrailsV0.7”
(
(getEffect 2).applymethod = 0
(getEffect 2).traillifeduration = 8000
(getEffect 2).particlequantity = 97
(getEffect 2).hyperspacedirection = 1
(getEffect 2).particlelifeduration = 1600
(getEffect 2).initialradius = 10.099
(getEffect 2).finalradius = 4.9995
(getEffect 2).initialcolor = color 64 128 255
(getEffect 2).finalcolor = color 0 0 0
(getEffect 2).initialalpha = 255
(getEffect 2).finalalpha = 0
(getEffect 2).initialbrightness = 50
(getEffect 2).finalbrightness = 50
(getEffect 2).initialbalance = 0.25
(getEffect 2).finalbalance = 0.25
(getEffect 2).initialfinalbalance = 0.608
)
The following example snapshots the parameters of the first effect in the queue and writes them to a file in C:/Temp.
You should create a Rollout with controls like output file name and control index or name to snapshot…
So this is just an idea.
Once you have executed the script, the resulting file can be evaluated to recreate the original effect with most of its settings.
This is very similar to the way my BFF scene exporter works…
(
theEffect = getEffect 1
theProps = getPropNames theEffect
theFileName = "c:/temp/testeffectsave.ms"
theFile = createFile theFileName
if theFile != undefined do
(
format "(addEffect (theEffect = %())
" (classof theEffect ) to:theFile
for p in theProps do
format "try(setProperty theEffect % %)catch()
" p (getProperty theEffect p) to:theFile
format ")
" to:theFile
close theFile
)
edit theFileName
)
Wow what a coincidence, I just ordered your disk Variables, Macroscripts & Functions I never expected to get a response from the master.
I will look for BFF on scriptspot.com and take a look inside.
Thanks for your response and all your scripts, I’m looking forward to getting your other disks in the future but I will have my brain full with the one.
Actually, Variables, Macros and Functions is by Laszlo Sebo, mine is called “MAXScript for the Masses”. They come in a box set, too, you might have bought that?
I am working on a new one about vectors and matrices, hope to finish it soon…
Cheers,
Bobo
I am working on a new one about vectors and matrices, hope to finish it soon…
That’s great news Bobo! I can barely wait for that! I’ve seen both the DVD’s from CGAcademy and they are amazing!!!
Also your class at this years Siggraph was a blast!!!
Thanks for doing all this, it’s a lot of inspiration and help for us, the beginner and intermediary level scripters!