Guest User

Maya 2013-x64 modname_source/mesa/FileMenu.mel

a guest
Mar 6th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.84 KB | None | 0 0
  1. //EDIT by ALPHATT - functional maya 2013-x64
  2. // Copyright (C) 1997-2011 Autodesk, Inc., and/or its licensors.
  3. // All rights reserved.
  4. //
  5. // The coded instructions, statements, computer programs, and/or related
  6. // material (collectively the "Data") in these files contain unpublished
  7. // information proprietary to Autodesk, Inc. ("Autodesk") and/or its licensors,
  8. // which is protected by U.S. and Canadian federal copyright law and by
  9. // international treaties.
  10. //
  11. // The Data is provided for use exclusively by You. You have the right to use,
  12. // modify, and incorporate this Data into other products for purposes authorized
  13. // by the Autodesk software license agreement, without fee.
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. AUTODESK
  15. // DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES
  16. // INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF NON-INFRINGEMENT,
  17. // MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE
  18. // OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT WILL AUTODESK AND/OR ITS
  19. // LICENSORS BE LIABLE FOR ANY LOST REVENUES, DATA, OR PROFITS, OR SPECIAL,
  20. // DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS
  21. // LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES.
  22.  
  23. //
  24. // Creation Date: Nov 17 1996
  25. //
  26. // Procedure Name:
  27. // FileMenu
  28. //
  29. // Description:
  30. // This procedure creates the main menubar File menu.
  31. //
  32. // Input Arguments:
  33. // None
  34. //
  35. // Return Value:
  36. // None.
  37. //
  38. global proc forceSavePreferences()
  39. // Removed for Maya 3.0 but could still be on people's shelves
  40. {
  41. warning (uiRes("m_FileMenu.kForceSavePrefs"));
  42. }
  43.  
  44. global proc FileMenu_SaveItem()
  45. //
  46. // If the current file is named, save it. If it
  47. // is still untitled, then bring up the Save As
  48. // dialog.
  49. //
  50. {
  51. string $sceneName = `file -q -sceneName`;
  52.  
  53. // Get the name of the scene File.
  54. if ( size($sceneName) == 0 ) {
  55. // Then the name can't be set.
  56. projectViewer SaveAs;
  57. // bug fix 89970 file save
  58. } else if ((`file -q -amf`) || (`file -q -ex` == 0)) {
  59. int $incrementalSave = false;
  60. if(`optionVar -exists isIncrementalSaveEnabled`)
  61. $incrementalSave = `optionVar -q isIncrementalSaveEnabled`;
  62. if ( $incrementalSave ) {
  63. // Save the scene using the Incremental Save feature.
  64. //
  65. incrementalSaveScene;
  66. } else {
  67. string $compressedSave = 0;
  68. string $preserveName = 0;
  69.  
  70. string $cmd = "file -save";
  71. if(`optionVar -exists isCompressedSaveEnabled`)
  72. $compressedSave = `optionVar -q isCompressedSaveEnabled`;
  73.  
  74. if ($compressedSave == 1 )
  75. {
  76. $cmd = $cmd + " -compress";
  77. }
  78.  
  79. if(`optionVar -exists isCompressedPreserveName`)
  80. $preserveName = `optionVar -q isCompressedPreserveName`;
  81.  
  82. if ($preserveName == 1 )
  83. {
  84. $cmd = $cmd + " -preserveName";
  85. }
  86. evalEcho($cmd);
  87. }
  88. } else {
  89. warning (uiRes("m_FileMenu.kNoChangesToSave"));
  90. }
  91. }
  92.  
  93.  
  94. global proc buildRecentProjectsMenu()
  95. {
  96. string $RecentProjectsList[];
  97. string $localList[];
  98. int $i;
  99. int $nNumItems;
  100. int $nNumItemsToBeRemoved;
  101. int $RecentProjectsMaxSize;
  102.  
  103. if (!`optionVar -exists "RecentProjectsList"`) return;
  104.  
  105. // get the list
  106. $RecentProjectsList = `optionVar -query "RecentProjectsList"`;
  107. $nNumItems = size($RecentProjectsList);
  108. $RecentProjectsMaxSize = `optionVar -query "RecentProjectsMaxSize"`;
  109.  
  110. // check if there are too many items in the list
  111. if ($RecentProjectsMaxSize < $nNumItems)
  112. {
  113. //if so, truncate the list
  114. $nNumItemsToBeRemoved = $nNumItems - $RecentProjectsMaxSize;
  115.  
  116. //Begin removing items from the head of the array (least recent project in the list)
  117. for ($i = 0; $i < $nNumItemsToBeRemoved; $i++)
  118. {
  119. optionVar -removeFromArray "RecentProjectsList" 0;
  120. }
  121. $RecentProjectsList = `optionVar -query "RecentProjectsList"`;
  122. $nNumItems = size($RecentProjectsList);
  123. }
  124.  
  125. // first, check if we are the same.
  126. $localList = `menu -query -itemArray FileMenuRecentProjectItems`;
  127. if ($nNumItems == size($localList))
  128. {
  129. for ($i = 0; $i < $nNumItems; $i++)
  130. {
  131. string $label = `menuItem -query -label $localList[$i]`;
  132. if ($label != toNativePath($RecentProjectsList[$nNumItems-$i-1]))
  133. break;
  134. }
  135. if ($i == $nNumItems) return;
  136. }
  137.  
  138. // we are not the same, so start over.
  139. menu -edit -deleteAllItems FileMenuRecentProjectItems;
  140. setParent -menu FileMenuRecentProjectItems;
  141. for ($i = 0; $i < $nNumItems; $i++)
  142. {
  143. string $cmd = "setProject \"" + $RecentProjectsList[$nNumItems-$i-1] + "\"";
  144. string $label = toNativePath($RecentProjectsList[$nNumItems-$i-1]);
  145. menuItem -label $label -command $cmd;
  146. }
  147. }
  148.  
  149. global proc openRecentFile( string $file, string $fileType )
  150. {
  151. global string $gv_operationMode;
  152. $gv_operationMode = "Open";
  153. pv_performAction($file, $fileType);
  154. checkForUnknownNodes();
  155. }
  156.  
  157. global proc buildRecentFileMenu(string $parentMenu)
  158. {
  159. string $RecentFilesList[];
  160. string $RecentFilesTypeList[];
  161. string $localList[];
  162. int $i;
  163. int $nNumItems;
  164. int $nNumItemsToBeRemoved;
  165. int $RecentFilesMaxSize;
  166.  
  167. if (!`optionVar -exists "RecentFilesList"`) return;
  168.  
  169. // get the list
  170. $RecentFilesList = `optionVar -query "RecentFilesList"`;
  171. $nNumItems = size($RecentFilesList);
  172. $RecentFilesMaxSize = `optionVar -query "RecentFilesMaxSize"`;
  173.  
  174. // check if there are too many items in the list
  175. if ($RecentFilesMaxSize < $nNumItems)
  176. {
  177. //if so, truncate the list
  178. $nNumItemsToBeRemoved = $nNumItems - $RecentFilesMaxSize;
  179.  
  180. //Begin removing items from the head of the array (least recent file in the list)
  181. for ($i = 0; $i < $nNumItemsToBeRemoved; $i++)
  182. {
  183. optionVar -removeFromArray "RecentFilesList" 0;
  184. }
  185. $RecentFilesList = `optionVar -query "RecentFilesList"`;
  186. $nNumItems = size($RecentFilesList);
  187. }
  188.  
  189. // The RecentFilesTypeList optionVar may not exist since it was
  190. // added after the RecentFilesList optionVar. If it doesn't exist,
  191. // we create it and initialize it with a guest at the file type
  192. if ($nNumItems > 0 )
  193. {
  194. if ( !`optionVar -exists "RecentFilesTypeList"`)
  195. {
  196. initRecentFilesTypeList( $RecentFilesList );
  197. }
  198. $RecentFilesTypeList = `optionVar -query "RecentFilesTypeList"`;
  199. }
  200.  
  201.  
  202. // first, check if we are the same.
  203. $localList = `menu -query -itemArray $parentMenu`;
  204. if ($nNumItems == size($localList))
  205. {
  206. for ($i = 0; $i < $nNumItems; $i++)
  207. {
  208. string $label = `menuItem -query -label $localList[$i]`;
  209. if ($label != toNativePath($RecentFilesList[$nNumItems-$i-1]))
  210. break;
  211. }
  212. if ($i == $nNumItems) return;
  213. }
  214.  
  215. // we are not the same, so start over.
  216. menu -edit -deleteAllItems $parentMenu;
  217. setParent -menu $parentMenu;
  218. for ($i = 0; $i < $nNumItems; $i++)
  219. {
  220. string $cmd = ( "openRecentFile(\"" + $RecentFilesList[$nNumItems-$i-1] + "\", " +
  221. "\"" + $RecentFilesTypeList[$nNumItems-$i-1] + "\")" );
  222.  
  223. string $label = toNativePath($RecentFilesList[$nNumItems-$i-1]);
  224. menuItem -label $label -command $cmd;
  225. }
  226. }
  227.  
  228. //
  229. // Procedure Name:
  230. // buildIncrementalSaveMenu
  231. //
  232. // Description:
  233. // Build the sub menu in the file menu that lists the recent incremental
  234. // backups that exist for the current scene
  235. //
  236. // Input Arguments:
  237. // None.
  238. //
  239. // Return Value:
  240. // None.
  241. //
  242. global proc buildIncrementalSaveMenu()
  243. {
  244. string $scenePath = `file -q -sceneName`;
  245.  
  246. if ( size( $scenePath ) == 0 ) return;
  247.  
  248. string $pathInfo[] = incrementalSaveProcessPath( $scenePath );
  249. string $scenePath = $pathInfo[0];
  250. string $sceneExtension = $pathInfo[2];
  251. string $sceneNamePrefix = $pathInfo[3];
  252. string $incrementDirName = $pathInfo[5] + "/";
  253.  
  254. string $incrementDirPath = $scenePath + $incrementDirName;
  255.  
  256. // Get a list of all files in the backup directory
  257. //
  258. string $existingIncrements[] = `getFileList
  259. -folder $incrementDirPath
  260. -filespec ($sceneNamePrefix + ".*" + $sceneExtension)`;
  261.  
  262. // Make sure that they are sorted
  263. //
  264. $existingIncrements = sort( $existingIncrements );
  265.  
  266. int $numIncrementals = `optionVar -q "RecentBackupsMaxSize"`;
  267.  
  268. // Build the menu
  269. //
  270. int $last = size( $existingIncrements );
  271. int $first = max( 0, $last - $numIncrementals );
  272. menu -e -deleteAllItems FileMenuRecentBackupItems;
  273. setParent -menu FileMenuRecentBackupItems;
  274. for ( $i = $first; $i < $last; $i++ ) {
  275. string $cmd = "file -f -open \"" + $incrementDirPath + $existingIncrements[$i] + "\"";
  276. string $sceneName = `match "[^/]+$" $existingIncrements[$i]`;
  277. menuItem -l $sceneName -c $cmd;
  278. }
  279. }
  280.  
  281. //
  282. // Procedure Name:
  283. // hasIncrementalSaves
  284. //
  285. // Description:
  286. // Returns true if the current file has some automatic backups
  287. //
  288. // Input Arguments:
  289. // None.
  290. //
  291. // Return Value:
  292. // None.
  293. //
  294. global proc int hasIncrementalSaves()
  295. {
  296. int $result = 0;
  297.  
  298. string $scenePath = `file -q -sceneName`;
  299.  
  300. if ( size( $scenePath ) > 0 ) {
  301. string $pathInfo[] = incrementalSaveProcessPath( $scenePath );
  302. string $scenePath = $pathInfo[0];
  303. string $sceneExtension = $pathInfo[2];
  304. string $sceneNamePrefix = $pathInfo[3];
  305. string $incrementDirName = $pathInfo[5] + "/";
  306.  
  307. string $incrementDirPath = $scenePath + $incrementDirName;
  308.  
  309. // Get a list of all files in the backup directory
  310. //
  311. string $existingIncrements[] = `getFileList
  312. -folder $incrementDirPath
  313. -filespec ($sceneNamePrefix + ".*" + $sceneExtension)`;
  314.  
  315. $result = ( size( $existingIncrements ) > 0 );
  316. }
  317.  
  318. return $result;
  319. }
  320.  
  321. //
  322. // Procedure Name:
  323. // checkMainFileMenu
  324. //
  325. // Description:
  326. // Disables or enables the recent files, backups, and projects
  327. // menus depending on whether they have contents.
  328. //
  329. // Input Arguments:
  330. // None.
  331. //
  332. // Return Value:
  333. // None.
  334. //
  335. global proc checkMainFileMenu()
  336. {
  337. $enable = false;
  338. if (`optionVar -exists "RecentFilesList"`)
  339. {
  340. if (`optionVar -arraySize "RecentFilesList"` > 0) $enable = 1;
  341. }
  342. menuItem -e -enable $enable FileMenuRecentFileItems;
  343.  
  344. $enable = hasIncrementalSaves();
  345. menuItem -e -enable $enable FileMenuRecentBackupItems;
  346.  
  347. $enable = false;
  348. if (`optionVar -exists "RecentProjectsList"`)
  349. {
  350. if (`optionVar -arraySize "RecentProjectsList"` > 0) {
  351. $enable = true;
  352. }
  353. }
  354. menuItem -e -enable $enable FileMenuRecentProjectItems;
  355.  
  356. // Create "Send To" menu items for one-click
  357. // interop with available applications.
  358. //
  359. buildSendToSubMenus;
  360. }
  361.  
  362. global proc buildFileMenu()
  363. {
  364. global string $gMainFileMenu;
  365. if( `menu -q -ni $gMainFileMenu` != 0 ) {
  366. //
  367. // Menu is built already - just return
  368. //
  369. return;
  370. }
  371.  
  372. menu -e -postMenuCommand checkMainFileMenu $gMainFileMenu;
  373.  
  374. int $dimWhenNoSelect = 0;
  375.  
  376. setParent -m $gMainFileMenu;
  377. menuItem -label (uiRes("m_FileMenu.kNewScene"))
  378. -annotation (getRunTimeCommandAnnotation("NewScene" ))
  379. -command ("NewScene") newProject;
  380. menuItem -optionBox true
  381. -annotation (getRunTimeCommandAnnotation("NewSceneOptions"))
  382. -command ("NewSceneOptions")
  383. newFileOptions;
  384.  
  385. menuItem -label (uiRes("m_FileMenu.kOpenScene"))
  386. -annotation (getRunTimeCommandAnnotation("OpenScene"))
  387. -command ("OpenScene") openProject;
  388. menuItem -optionBox true
  389. -annotation (getRunTimeCommandAnnotation("OpenSceneOptions"))
  390. -command ("OpenSceneOptions")
  391. openFileOptions;
  392.  
  393. menuItem -divider true;
  394.  
  395. menuItem -label (uiRes("m_FileMenu.kSave"))
  396. -annotation (getRunTimeCommandAnnotation("SaveScene"))
  397. -command ("SaveScene") saveItem;
  398. menuItem -optionBox true
  399. -annotation (getRunTimeCommandAnnotation("SaveSceneOptions"))
  400. -command ("SaveSceneOptions")
  401. saveOptions;
  402.  
  403. menuItem -l (uiRes("m_FileMenu.kSaveAs"))
  404. -annotation (getRunTimeCommandAnnotation("SaveSceneAs"))
  405. -command ("SaveSceneAs") saveAsItem;
  406. menuItem -optionBox true
  407. -annotation (getRunTimeCommandAnnotation("SaveSceneAsOptions"))
  408. -command ("SaveSceneAsOptions")
  409. saveAsOptions;
  410.  
  411. menuItem -label (uiRes("m_FileMenu.kArchive"))
  412. -annotation (getRunTimeCommandAnnotation("ArchiveScene"))
  413. -command ("ArchiveScene") archiveItem;
  414. menuItem -optionBox true
  415. -annotation (getRunTimeCommandAnnotation("ArchiveSceneOptions"))
  416. -command ("ArchiveSceneOptions")
  417. archiveSceneOptions;
  418.  
  419. menuItem -ecr false -label (uiRes("m_FileMenu.kSavePrefs"))
  420. -annotation (getRunTimeCommandAnnotation("SavePreferences"))
  421. -command ("SavePreferences");
  422.  
  423. menuItem -divider true;
  424.  
  425. menuItem -l (uiRes("m_FileMenu.kOptimize"))
  426. -annotation (getRunTimeCommandAnnotation("OptimizeScene"))
  427. -command ("OptimizeScene") cleanUpProject;
  428. menuItem -optionBox true
  429. -annotation (getRunTimeCommandAnnotation("OptimizeSceneOptions"))
  430. -command ("OptimizeSceneOptions")
  431. cleanUpSceneOptions;
  432.  
  433. menuItem -divider true;
  434.  
  435. menuItem -label (uiRes("m_FileMenu.kImport"))
  436. -annotation (getRunTimeCommandAnnotation("Import"))
  437. -command ("Import") importFileItem;
  438. menuItem -optionBox true
  439. -annotation (getRunTimeCommandAnnotation("ImportOptions"))
  440. -command ("ImportOptions")
  441. importFileOptions;
  442.  
  443. menuItem -label (uiRes("m_FileMenu.kExportAll"))
  444. -annotation (getRunTimeCommandAnnotation("Export"))
  445. -command ("Export") exportAllFileItem;
  446. menuItem -optionBox true
  447. -annotation (getRunTimeCommandAnnotation("ExportOptions"))
  448. -command ("ExportOptions")
  449. exportAllFileOptions;
  450.  
  451. menuItem -label (uiRes("m_FileMenu.kExportSelection"))
  452. -annotation (getRunTimeCommandAnnotation("ExportSelection"))
  453. -command ("ExportSelection") exportActiveFileItem;
  454. menuItem -optionBox true
  455. -annotation (getRunTimeCommandAnnotation("ExportSelectionOptions"))
  456. -command ("ExportSelectionOptions")
  457. exportActiveFileOptions;
  458. if( $dimWhenNoSelect )
  459. dimWhen -false SomethingSelected exportActiveFileItem;
  460.  
  461. menuItem -divider true;
  462.  
  463. menuItem -label (uiRes("m_FileMenu.kExportOfflineFile"))
  464. -annotation (getRunTimeCommandAnnotation("ExportOfflineFile"))
  465. -command ("ExportOfflineFile") exportEditsFileItem;
  466. menuItem -optionBox true
  467. -annotation (getRunTimeCommandAnnotation("ExportOfflineFileOptions"))
  468. -command ("ExportOfflineFileOptions")
  469. exportEditsFileOptions;
  470. if( $dimWhenNoSelect )
  471. dimWhen -false SomethingSelected exportEditsFileItem;
  472.  
  473. menuItem -label (uiRes("m_FileMenu.kAssignOfflineFile"))
  474. -annotation (getRunTimeCommandAnnotation("AssignOfflineFile"))
  475. -command ("AssignOfflineFile") assignOfflineFileItem;
  476. menuItem -optionBox true
  477. -annotation (getRunTimeCommandAnnotation("AssignOfflineFileOptions"))
  478. -command ("AssignOfflineFileOptions")
  479. assignOfflineFileOptions;
  480. if( $dimWhenNoSelect )
  481. dimWhen -false SomethingSelected assignOfflineFileItem;
  482.  
  483. menuItem -divider true;
  484.  
  485. menuItem -label (uiRes("m_FileMenu.kViewImage"))
  486. -annotation (getRunTimeCommandAnnotation ("ViewImage"))
  487. -command ("ViewImage")
  488. viewFrameItem;
  489.  
  490.  
  491. menuItem -label (uiRes("m_FileMenu.kViewSequence"))
  492. -annotation (getRunTimeCommandAnnotation ("ViewSequence"))
  493. -command ("ViewSequence")
  494. viewSequenceItem;
  495.  
  496. menuItem -divider true;
  497.  
  498. menuItem -label (uiRes("m_FileMenu.kCreateReference"))
  499. -annotation (getRunTimeCommandAnnotation("CreateReference"))
  500. -command ("CreateReference") referenceFileItem;
  501. menuItem -optionBox true
  502. -annotation (getRunTimeCommandAnnotation("CreateReferenceOptions"))
  503. -command ("CreateReferenceOptions")
  504. referenceFileOptions;
  505.  
  506. menuItem -label (uiRes("m_FileMenu.kReferenceEditor"))
  507. -annotation (getRunTimeCommandAnnotation("ReferenceEditor"))
  508. -command ("ReferenceEditor")
  509. residentFileItem;
  510.  
  511. menuItem -divider true;
  512. menuItem -label "Export SMD..."
  513. -annotation "Export SMD: Save SMD associated with this file"
  514. -command ("smdExportMenuItem")
  515. smdExportMenu;
  516. menuItem -optionBox true
  517. -annotation "SMD Option Box"
  518. -label "SMD Option Box"
  519. -command ("smdOptionWindow")
  520. smdExportOptions;
  521.  
  522. menuItem -label "Export VTA..."
  523. -annotation "Emport VTA: emport VTA format file"
  524. -command ("vtaExport")
  525. vtaExport;
  526.  
  527. menuItem -label "Import SMD..."
  528. -annotation "Import SMD: import SMD format file"
  529. -command ("smdImport")
  530. smdImport;
  531.  
  532.  
  533. menuItem -label "Import SMD Animation"
  534. -annotation "Import SMD: import SMD format file"
  535. -command ("smdImportani")
  536. smdImportani;
  537.  
  538. menuItem -label "Import From Hammer..."
  539. -annotation "Import From Hammer: import DXF exported by Hammer"
  540. -command ("wcImport")
  541. wcImport;
  542.  
  543. menuItem -label "Compile QC File"
  544. -annotation "Compile QC: run studiomdl on the QC file for current project"
  545. -command ("compileQCFile")
  546. qcFileExportMenu;
  547.  
  548. // menuItem -label "SourceSafe"
  549. // -annotation "SourceSafe: check file in and out of VSS"
  550. // -command ("if (`vssStatus`){print `vss -f -i`;} else {print `vss -f -o`;}vssStatus;")
  551. // -cb 0
  552. // vssMenuItem;
  553.  
  554. menuItem -divider true;
  555.  
  556. menuItem -label (uiRes("m_FileMenu.kProjectWindow"))
  557. -annotation (getRunTimeCommandAnnotation("ProjectWindow"))
  558. -command ("ProjectWindow") projectWindowFileItem;
  559.  
  560. menuItem -label (uiRes("m_FileMenu.kSet"))
  561. -annotation (getRunTimeCommandAnnotation("SetProject"))
  562. -command ("SetProject") setProjectFileItem;
  563.  
  564. // add recent file and project lists
  565. menuItem -subMenu true -l (uiRes("m_FileMenu.kRecentFiles"))
  566. -postMenuCommand "buildRecentFileMenu FileMenuRecentFileItems" FileMenuRecentFileItems;
  567. setParent -m ..;
  568.  
  569. menuItem -subMenu true -l (uiRes("m_FileMenu.kRecentIncrements"))
  570. -postMenuCommand "buildIncrementalSaveMenu" FileMenuRecentBackupItems;
  571. setParent -m ..;
  572.  
  573. menuItem -subMenu true -l (uiRes("m_FileMenu.kRecentProjects"))
  574. -postMenuCommand "buildRecentProjectsMenu" FileMenuRecentProjectItems;
  575. setParent -m ..;
  576.  
  577. if (!`about -mac`) {
  578. menuItem -divider true;
  579.  
  580. // Do not add any other code to the quit or you will not
  581. // have it executed for some types of quitting - like
  582. // quitting through the command language or by double-clicking
  583. // the main Maya window.
  584. //
  585. menuItem -l (uiRes("m_FileMenu.kExit"))
  586. -annotation (uiRes("m_FileMenu.kExitAnnot"))
  587. -command ("Quit") quitItem;
  588.  
  589. if (`about -nt`)
  590. {
  591. menuItem -e -mn "O" openProject;
  592. menuItem -e -mn "S" saveItem;
  593. menuItem -e -mn "A" saveAsItem;
  594. menuItem -e -mn "x" quitItem;
  595. }
  596. }
  597.  
  598. checkMainFileMenu();
  599. }
  600.  
  601. // OneClick selection setting options
  602. //
  603. global proc int oneClickDefaultSendPreviousSelection()
  604. {
  605. global int $gOneClickDefaultSendPreviousSelection = 0;
  606. return $gOneClickDefaultSendPreviousSelection;
  607. }
  608.  
  609. global proc int oneClickDefaultSendEntireScene()
  610. {
  611. global int $gOneClickDefaultSendEntireScene = 0;
  612. return $gOneClickDefaultSendEntireScene;
  613. }
  614.  
  615. {
  616. global string $gMainFileMenu;
  617. global string $gMainWindow;
  618.  
  619. menu -p $gMainWindow -l (uiRes("m_FileMenu.kFile"))
  620. -allowOptionBoxes true -tearOff true
  621. -postMenuCommand "buildFileMenu();"
  622. -familyImage "menuIconFile.png" $gMainFileMenu;
  623.  
  624. setParent -m ..;
  625. }
Advertisement
Add Comment
Please, Sign In to add comment