Chaos Corona Forum
General Category => General CG Discussion => Topic started by: aaouviz on 2023-10-12, 15:03:26
-
Man, I suck at maxscript...
I want to make a simple "Save and then Exit" script (via toolbar button).
This is what I have, but I can't quite get it to work as intended. Any helpers out there? Many thanks!
--Original script by: aaouviz
------
macroscript SaveAndExit
category: "AAScripts"
buttonText: "Save and Exit"
tooltip: "Save and Exit"
Icon:#("AAGen_01",1)
(
saveMaxFile
)
quitmax #noprompt
-
I assume you just want File > Save correct? Overwrite previous version?
--Original script by: aaouviz
------
macroscript SaveAndExit
category: "AAScripts"
buttonText: "Save and Exit"
tooltip: "Save and Exit"
Icon:#("AAGen_01",1)
(
max file save
quitmax #noprompt
)
-
Amazing, and perfect as always James.
Thanks a million!
-
Glad to hear its working as expected :)
-
Hi,
picked up the idea but implemented it as file menu item. Additionally, saving only happens if a save is required (no changed made to scene, relying on getSaveRequired()). Script goes to any autostart folder (usually scripts\startup). Sharing it as an alternate option.
Good Luck
-
Excellent!
The 'saving only happens if a save is required' seemed a bit beyond my capabilities, so I didn't bother. But this is clever of you, and I feel pleased to have I've influenced you, Frood :)
-
Yes, thanks for letting me steal that idea to use them for myself - which is my daily deed ;)
Good Luck