// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: Jan 31 2013 // // Description: // A helper procedure to call SaveSceneAs and return a result. // Primarily used by Maya internally // // Return value: // 0 SaveAs did not save anything // 1 SaveAs saved the scene // global proc int doSaveSceneAsWithResult (string $product) { checkForUnknownNodes(); int $result = projectViewer ("SaveAs"); if ($result != 0) { string $scene = `file -query -sceneName`; string $message = (uiRes("m_doSaveSceneAsWithResult.kSaveSuccess")); $message += "\n\n" + $scene + "\n\n"; $message += (uiRes("m_doSaveSceneAsWithResult.kApplicationExit")); $message = `format -s $product $message`; confirmDialog -title $product -icon "information" -button (uiRes("m_doSaveSceneAsWithResult.kOk")) -message $message; } return ($result); }