PDA

View Full Version : SaveScene()



nickdigital
04-12-2012, 02:18 PM
Is there a way to do a SaveScene() and automatically pass it a "yes"? Even the normal Layout "Save Scene" gives you that user prompt despite changing the Alert Level.

It would be nice to be able to save without that prompt...other programs do that.

xchrisx
04-12-2012, 03:25 PM
AutoConfirm is your friend, it will automatically override dialogs' Ok buttons. Just be careful to always set it to 0 afterward you are done or you wont be prompted in the future.

AutoConfirm(1);
SaveScene();
AutoConfirm(0);


-chris

nickdigital
04-12-2012, 03:35 PM
Thank you!

Blochi
05-03-2012, 01:43 PM
Are you sure that's what you want?
If all you need is the current state of the scene on disk for parsing, it might be better to not save over the user's file, but rather use SaveSceneCopy(tempScenePath). That will just dump the scene without overwriting anything, and it will also not reset the location of the current scene loaded.

K-Dawg
07-12-2012, 12:37 PM
Sorry for high jacking your thread.

I wanted to write an LScript related to saving a scene and wanted to ask if there is a LScript Doc to LW where I can see a list of commands with description.

Greetz

nickdigital
07-12-2012, 12:46 PM
I reference Dodgy's site and the pdf documentation. If that fails then I scream for help on the forum.

http://mikegreen.name/Lscript/Lscript%20Index.html

K-Dawg
07-12-2012, 12:53 PM
Thanks for the Link. Really helpful. Which PDF do you mean?


If that fails then I scream for help on the forum.
I hear ya :D

EDIT:

Is there a function to save a scene and/or object incrementally in LScript?

nickdigital
07-12-2012, 01:12 PM
Thanks for the Link. Really helpful. Which PDF do you mean?


There should be a link for lsript docs in your Registration page. At least there is in mine.

Or use these:
ftp://ftp.newtek.com/products/LightWave/SDK/LScriptUserGuide.pdf
ftp://ftp.newtek.com/products/LightWave/SDK/LScriptReference.pdf

nickdigital
07-12-2012, 01:16 PM
Is there a function to save a scene and/or object incrementally in LScript?

Not sure off the top of my head...still a lscript noob. The hack would be to get the name of the file, get the version number and then increment that. Then save out the new filename.

K-Dawg
07-12-2012, 01:30 PM
Thanks for the links. I only have a user refrence guide in my Download section. Oddly, since I have LW 9+ I have all Version of LW in my Downloads, but my LW 5.6 is not listed anymore. I know it's a while back, but I was always wondering why.

Anyhow, thanks for the links. I'll have to look into those.