// =========================================================================== // 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: April 15 2016 // // Description: // This script is called from initAfter.mel for crash panel initialization. // global proc initCrashPanel() { if (`optionVar -exists displayCrashInfo` && `optionVar -query displayCrashInfo`) { // If the crash file exists if ( size(`crashInfo -q -crashFile`) ) { string $crashFile = `crashInfo -q -crashFile`; string $savedFile = `crashInfo -q -savedBeforeCrash`; string $openCrashCmd = "file -force -open \"" + $crashFile + "\""; string $openSavedCmd = "file -force -open \"" + $savedFile + "\""; // Build the crash file information panel string $crashWindow = `window -widthHeight 600 55 -title (uiRes("m_initCrashPanel.kCrashCaption"))`; string $buttonLayout = `columnLayout -parent $crashWindow`; text -label (uiRes("m_initCrashPanel.kLTCrashInfo")) -parent $buttonLayout; button -parent $buttonLayout -width 500 -label $crashFile -command $openCrashCmd; if ( size($savedFile)) { button -parent $buttonLayout -width 500 -label $savedFile -command $openSavedCmd; } dockControl -area "left" -content $crashWindow -allowedArea "left" -allowedArea "right" -label (uiRes("m_initCrashPanel.kCrashLog")) -width 50; } } }