// =========================================================================== // 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. // =========================================================================== // // Description: // Browses for take files for use with the deviceEditor. // global proc takeBrowserReadTake(string $path, string $fileType) // // Description: // A callback used by takeBrowser in the fileBrowser. It will send // the results of the fileBrowser selection to the deviceEditor. // { global string $g_deviceEditorName; if ($fileType != "move" && $fileType != (uiRes("m_fileOptions.kBestGuess"))) { return; } if (`window -ex projectViewerWindow`) { window -e -vis false projectViewerWindow; } deviceEditor -e -takePath $path $g_deviceEditorName; } global proc takeBrowser(string $deviceEditorName) // // Description: // Brings up the fileBrowser to select a takeFile for writing or // reading by the device editor. // // This is called by the deviceEditor. // { if (!`licenseCheck -m "edit" -typ "complete"`) { error (uiRes("m_takeBrowser.kNoLicenseError")); } global string $g_deviceEditorName; $g_deviceEditorName = $deviceEditorName; string $takeFile = (uiRes("s_TfileBrowserDialogStrings.rTakeFile")); fileBrowser("takeBrowserReadTake", $takeFile, "move", 0); }