main.tscript 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. //------------------------------------------------------------------------------
  23. // Shape Editor
  24. //------------------------------------------------------------------------------
  25. function initializeShapeEditor()
  26. {
  27. echo(" % - Initializing Shape Editor");
  28. exec("./gui/Profiles.ed." @ $TorqueScriptFileExtension);
  29. // Order of GUI loading is important
  30. exec("./gui/shapeEdPreviewWindow.ed.gui");
  31. exec("./gui/ShapeEditorToolbar.ed.gui");
  32. exec("./gui/shapeEdSelectWindow.ed.gui");
  33. exec("./gui/shapeEdPropWindow.ed.gui");
  34. exec("./gui/shapeEdAdvancedWindow.ed.gui");
  35. exec("./gui/shapeEdAnimWindow.ed.gui");
  36. exec("./scripts/shapeEditor.ed." @ $TorqueScriptFileExtension);
  37. exec("./scripts/shapeEditorHints.ed." @ $TorqueScriptFileExtension);
  38. exec("./scripts/shapeEditorActions.ed." @ $TorqueScriptFileExtension);
  39. // Add windows to editor gui
  40. ShapeEdPreviewGui.setVisible(false);
  41. ShapeEdAnimWindow.setVisible(false);
  42. ShapeEdSelectWindow.setVisible(false);
  43. ShapeEdPropWindow.setVisible(false);
  44. MainSceneTabPanel.add(ShapeEdPreviewGui);
  45. MainSceneTabPanel.add(ShapeEdAnimWindow);
  46. MainSceneTabPanel.add(ShapeEdAdvancedWindow);
  47. MainSceneTabPanel.add(ShapeEdSelectWindow);
  48. MainSceneTabPanel.add(ShapeEdPropWindow);
  49. new ScriptObject(ShapeEditorPlugin)
  50. {
  51. superClass = "EditorPlugin";
  52. editorGui = ShapeEdShapeView;
  53. };
  54. %map = new ActionMap();
  55. %map.bindCmd( keyboard, "escape", "ToolsToolbarArray->WorldEditorInspectorPalette.performClick();", "" );
  56. %map.bindCmd( keyboard, "1", "ShapeEditorNoneModeBtn.performClick();", "" );
  57. %map.bindCmd( keyboard, "2", "ShapeEditorMoveModeBtn.performClick();", "" );
  58. %map.bindCmd( keyboard, "3", "ShapeEditorRotateModeBtn.performClick();", "" );
  59. //%map.bindCmd( keyboard, "4", "ShapeEditorScaleModeBtn.performClick();", "" ); // not needed for the shape editor
  60. %map.bindCmd( keyboard, "n", "ShapeEditorToolbar->showNodes.performClick();", "" );
  61. %map.bindCmd( keyboard, "t", "ShapeEditorToolbar->ghostMode.performClick();", "" );
  62. %map.bindCmd( keyboard, "r", "ShapeEditorToolbar->wireframeMode.performClick();", "" );
  63. %map.bindCmd( keyboard, "f", "ShapeEditorToolbar->fitToShapeBtn.performClick();", "" );
  64. %map.bindCmd( keyboard, "g", "ShapeEditorToolbar->showGridBtn.performClick();", "" );
  65. %map.bindCmd( keyboard, "h", "ShapeEdSelectWindow->tabBook.selectPage( 2 );", "" ); // Load help tab
  66. %map.bindCmd( keyboard, "l", "ShapeEdSelectWindow->tabBook.selectPage( 1 );", "" ); // load Library Tab
  67. %map.bindCmd( keyboard, "j", "ShapeEdSelectWindow->tabBook.selectPage( 0 );", "" ); // load scene object Tab
  68. %map.bindCmd( keyboard, "SPACE", "ShapeEdAnimWindow.togglePause();", "" );
  69. %map.bindCmd( keyboard, "i", "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());", "" );
  70. %map.bindCmd( keyboard, "o", "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());", "" );
  71. %map.bindCmd( keyboard, "shift -", "ShapeEdSeqSlider.setValue(ShapeEdAnimWindow-->seqIn.getText());", "" );
  72. %map.bindCmd( keyboard, "shift =", "ShapeEdSeqSlider.setValue(ShapeEdAnimWindow-->seqOut.getText());", "" );
  73. %map.bindCmd( keyboard, "=", "ShapeEdAnimWindow-->stepFwdBtn.performClick();", "" );
  74. %map.bindCmd( keyboard, "-", "ShapeEdAnimWindow-->stepBkwdBtn.performClick();", "" );
  75. ShapeEditorPlugin.map = %map;
  76. ShapeEditorPlugin.initSettings();
  77. }
  78. function destroyShapeEditor()
  79. {
  80. }
  81. function SetToggleButtonValue(%ctrl, %value)
  82. {
  83. if ( %ctrl.getValue() != %value )
  84. %ctrl.performClick();
  85. }
  86. // Replace the command field in an Editor PopupMenu item (returns the original value)
  87. function ShapeEditorPlugin::replaceMenuCmd(%this, %menuTitle, %id, %newCmd)
  88. {
  89. %menu = EditorGui.findMenu( %menuTitle );
  90. %cmd = getField( %menu.item[%id], 2 );
  91. %menu.setItemCommand( %id, %newCmd );
  92. return %cmd;
  93. }
  94. function ShapeEditorPlugin::onWorldEditorStartup(%this)
  95. {
  96. // Add ourselves to the window menu.
  97. %accel = EditorGui.addToEditorsMenu("Shape Editor", "", ShapeEditorPlugin);
  98. // Add ourselves to the ToolsToolbar
  99. %tooltip = "Shape Editor (" @ %accel @ ")";
  100. EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", "ToolsModule:shape_editor_n_image", %tooltip );
  101. // Add ourselves to the Editor Settings window
  102. exec( "./gui/ShapeEditorSettingsTab.gui" );
  103. //ESettingsWindow.addTabPage( EShapeEditorSettingsPage );
  104. GuiWindowCtrl::attach(ShapeEdPropWindow, ShapeEdSelectWindow);
  105. ShapeEdAnimWindow.resize( -1, 526, 593, 53 );
  106. // Initialise gui
  107. ShapeEdSeqNodeTabBook.selectPage(0);
  108. ShapeEdAdvancedWindow-->tabBook.selectPage(0);
  109. ShapeEdSelectWindow-->tabBook.selectPage(0);
  110. SetToggleButtonValue( ShapeEditorToolbar-->orbitNodeBtn, 0 );
  111. SetToggleButtonValue( ShapeEditorToolbar-->ghostMode, 0 );
  112. // Initialise hints menu
  113. ShapeEdHintMenu.clear();
  114. %count = ShapeHintGroup.getCount();
  115. for (%i = 0; %i < %count; %i++)
  116. {
  117. %hint = ShapeHintGroup.getObject(%i);
  118. ShapeEdHintMenu.add(%hint.objectType, %hint);
  119. }
  120. }
  121. function ShapeEditorPlugin::openShapeAsset(%this, %assetDef)
  122. {
  123. %this.selectedAssetDef = %assetDef;
  124. %this.open(%this.selectedAssetDef);
  125. }
  126. function ShapeEditorPlugin::openShapeAssetId(%this, %assetId)
  127. {
  128. %this.selectedAssetDef = AssetDatabase.acquireAsset(%assetId);
  129. //%this.selectedAssetDef = %assetDef;
  130. %this.open(%this.selectedAssetDef);
  131. }
  132. function ShapeEditorPlugin::open(%this, %shapeAsset)
  133. {
  134. if ( !%this.isActivated )
  135. {
  136. // Activate the Shape Editor
  137. EditorGui.setEditor( %this, true );
  138. // Get editor settings (note the sun angle is not configured in the settings
  139. // dialog, so apply the settings here instead of in readSettings)
  140. %this.readSettings();
  141. ShapeEdShapeView.sunAngleX = EditorSettings.value("ShapeEditor/SunAngleX");
  142. ShapeEdShapeView.sunAngleZ = EditorSettings.value("ShapeEditor/SunAngleZ");
  143. EWorldEditor.forceLoadDAE = EditorSettings.value("forceLoadDAE");
  144. $wasInWireFrameMode = $gfx::wireframe;
  145. ShapeEditorToolbar-->wireframeMode.setStateOn($gfx::wireframe);
  146. if ( GlobalGizmoProfile.getFieldValue(alignment) $= "Object" )
  147. ShapeEdNodes-->objectTransform.setStateOn(1);
  148. else
  149. ShapeEdNodes-->worldTransform.setStateOn(1);
  150. // Initialise and show the shape editor
  151. ShapeEdShapeTreeView.open(getScene(0));
  152. ShapeEdShapeTreeView.buildVisibleTree(true);
  153. ShapeEdPreviewGui.setVisible(true);
  154. ShapeEdSelectWindow.setVisible(true);
  155. ShapeEdPropWindow.setVisible(true);
  156. ShapeEdAnimWindow.setVisible(true);
  157. ShapeEdAdvancedWindow.setVisible(ShapeEditorToolbar-->showAdvanced.getValue());
  158. MainSceneTabPanel.bringToFront(ShapeEdPreviewGui);
  159. ToolsPaletteArray->WorldEditorMove.performClick();
  160. %this.map.push();
  161. // Switch to the ShapeEditor UndoManager
  162. %this.oldUndoMgr = Editor.getUndoManager();
  163. Editor.setUndoManager( ShapeEdUndoManager );
  164. ShapeEdShapeView.setDisplayType( EditorGui.currentDisplayType );
  165. %this.initStatusBar();
  166. // Customise menu bar
  167. %this.oldCamFitCmd = %this.replaceMenuCmd( "Camera", 8, "ShapeEdShapeView.fitToShape();" );
  168. %this.oldCamFitOrbitCmd = %this.replaceMenuCmd( "Camera", 9, "ShapeEdShapeView.fitToShape();" );
  169. Parent::onActivated(%this);
  170. }
  171. // Select the new shape
  172. if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShapeAsset $= %shapeAsset))
  173. {
  174. // Shape is already selected => re-highlight the selected material if necessary
  175. ShapeEdMaterials.updateSelectedMaterial(ShapeEdMaterials-->highlightMaterial.getValue());
  176. }
  177. else if (%shapeAsset !$= "")
  178. {
  179. ShapeEditor.selectShape(%shapeAsset, ShapeEditor.isDirty());
  180. // 'fitToShape' only works after the GUI has been rendered, so force a repaint first
  181. Canvas.repaint();
  182. ShapeEdShapeView.fitToShape();
  183. }
  184. }
  185. function EditorGui::SetShapePalletBar()
  186. {
  187. //Clears the button pallete stack
  188. EWToolsPaletteWindow.setStackCtrl(ToolsPaletteArray); //legacy ctrl adhereance
  189. EWToolsPaletteWindow.clearButtons();
  190. EWToolsPaletteWindow.setActionMap(WorldEditorInspectorPlugin.map);
  191. //Adds a button to the pallete stack
  192. //Name Icon Click Command Tooltip text Keybind
  193. EWToolsPaletteWindow.addButton("Select", "ToolsModule:arrow_n_image", "GlobalGizmoProfile.mode = \"None\";", "", "Select Arrow", "1");
  194. EWToolsPaletteWindow.addButton("MoveSelection", "ToolsModule:move_point_n_image", "GlobalGizmoProfile.mode = \"Move\";", "", "Move", "2");
  195. EWToolsPaletteWindow.addButton("RotateSelection", "ToolsModule:rotate_point_n_image", "GlobalGizmoProfile.mode = \"Rotate\";", "", "Rotate", "3");
  196. EWToolsPaletteWindow.addButton("RotateSun", "ToolsModule:sun_btn_n_image", "ShapeEdShapeView.editSun = !ShapeEdShapeView.editSun;", "", "Rotate sun", "4");
  197. EWToolsPaletteWindow.refresh();
  198. }
  199. function ShapeEditorPlugin::onActivated(%this)
  200. {
  201. %this.open("");
  202. // Try to start with the shape selected in the world editor
  203. %count = EWorldEditor.getSelectionSize();
  204. for (%i = 0; %i < %count; %i++)
  205. {
  206. %obj = EWorldEditor.getSelectedObject(%i);
  207. %shapeFile = ShapeEditor.getObjectShapeFile(%obj);
  208. if (%shapeFile !$= "" && isFile(%shapeFile))
  209. {
  210. if (!isObject(ShapeEditor.shape) || (ShapeEditor.shape.baseShape !$= %shapeFile))
  211. {
  212. // Call the 'onSelect' method directly if the object is not in the
  213. // MissionGroup tree (such as a Player or Projectile object).
  214. ShapeEdShapeTreeView.clearSelection();
  215. if (!ShapeEdShapeTreeView.selectItem(%obj))
  216. ShapeEdShapeTreeView.onSelect(%obj);
  217. // 'fitToShape' only works after the GUI has been rendered, so force a repaint first
  218. Canvas.repaint();
  219. ShapeEdShapeView.fitToShape();
  220. }
  221. break;
  222. }
  223. else if(%shapeFile !$= "")
  224. {
  225. %this.openShapeAssetId(%shapeFile);
  226. }
  227. }
  228. EditorGuiToolbarStack.remove( EWorldEditorToolbar );
  229. EditorGuiToolbarStack.add( ShapeEditorToolbar );
  230. EditorGui.SetShapePalletBar();
  231. }
  232. function ShapeEditorPlugin::initStatusBar(%this)
  233. {
  234. EditorGuiStatusBar.setInfo("Shape editor ( Shift Click ) to speed up camera.");
  235. EditorGuiStatusBar.setSelection( ShapeEditor.shape.baseShape );
  236. }
  237. function ShapeEditorPlugin::onDeactivated(%this)
  238. {
  239. %this.writeSettings();
  240. // Notify game objects if shape has been modified
  241. if ( ShapeEditor.isDirty() )
  242. ShapeEditor.shape.notifyShapeChanged();
  243. $gfx::wireframe = $wasInWireFrameMode;
  244. ShapeEdMaterials.updateSelectedMaterial(false);
  245. EditorGuiToolbarStack.add( EWorldEditorToolbar );
  246. EditorGuiToolbarStack.remove( ShapeEditorToolbar );
  247. ShapeEdPreviewGui.setVisible(false);
  248. ShapeEdSelectWindow.setVisible(false);
  249. ShapeEdPropWindow.setVisible(false);
  250. ShapeEdAnimWindow.setVisible(false);
  251. ShapeEdAdvancedWindow.setVisible(false);
  252. if( EditorGui-->MatEdPropertiesWindow.visible )
  253. {
  254. ShapeEdMaterials.editSelectedMaterialEnd( true );
  255. }
  256. %this.map.pop();
  257. // Restore the original undo manager
  258. Editor.setUndoManager( %this.oldUndoMgr );
  259. // Restore menu bar
  260. %this.replaceMenuCmd( "Camera", 8, %this.oldCamFitCmd );
  261. %this.replaceMenuCmd( "Camera", 9, %this.oldCamFitOrbitCmd );
  262. Parent::onDeactivated(%this);
  263. }
  264. function ShapeEditorPlugin::onExitMission( %this )
  265. {
  266. // unselect the current shape
  267. ShapeEdShapeView.setModel( "" );
  268. if (ShapeEditor.shape != -1)
  269. ShapeEditor.shape.delete();
  270. ShapeEditor.shape = 0;
  271. ShapeEdUndoManager.clearAll();
  272. ShapeEditor.setDirty( false );
  273. ShapeEdSequenceList.clear();
  274. ShapeEdNodeTreeView.removeItem( 0 );
  275. ShapeEdPropWindow.update_onNodeSelectionChanged( -1 );
  276. ShapeEdDetailTree.removeItem( 0 );
  277. ShapeEdMaterialList.clear();
  278. ShapeEdMountWindow-->mountList.clear();
  279. ShapeEdThreadWindow-->seqList.clear();
  280. ShapeEdThreadList.clear();
  281. }
  282. function ShapeEditorPlugin::openShape( %this, %path, %discardChangesToCurrent )
  283. {
  284. EditorGui.setEditor( ShapeEditorPlugin );
  285. if( ShapeEditor.isDirty() && !%discardChangesToCurrent )
  286. {
  287. toolsMessageBoxYesNo( "Save Changes?",
  288. "Save changes to current shape?",
  289. "ShapeEditor.saveChanges(); ShapeEditorPlugin.openShape(\"" @ %path @ "\");",
  290. "ShapeEditorPlugin.openShape(\"" @ %path @ "\");" );
  291. return;
  292. }
  293. ShapeEditor.selectShape( %path );
  294. ShapeEdShapeView.fitToShape();
  295. }
  296. function shapeEditorWireframeMode()
  297. {
  298. $gfx::wireframe = !$gfx::wireframe;
  299. ShapeEditorToolbar-->wireframeMode.setStateOn($gfx::wireframe);
  300. }
  301. //-----------------------------------------------------------------------------
  302. // Settings
  303. //-----------------------------------------------------------------------------
  304. function ShapeEditorPlugin::initSettings( %this )
  305. {
  306. EditorSettings.beginGroup( "ShapeEditor", true );
  307. // Display options
  308. EditorSettings.setDefaultValue( "BackgroundColor", "128 128 128 100" );
  309. EditorSettings.setDefaultValue( "HighlightMaterial", 1 );
  310. EditorSettings.setDefaultValue( "ShowNodes", 1 );
  311. EditorSettings.setDefaultValue( "ShowBounds", 0 );
  312. EditorSettings.setDefaultValue( "ShowObjBox", 1 );
  313. EditorSettings.setDefaultValue( "RenderMounts", 1 );
  314. EditorSettings.setDefaultValue( "RenderCollision", 0 );
  315. // Grid
  316. EditorSettings.setDefaultValue( "ShowGrid", 1 );
  317. EditorSettings.setDefaultValue( "GridSize", 0.1 );
  318. EditorSettings.setDefaultValue( "GridDimension", "40 40" );
  319. // Sun
  320. EditorSettings.setDefaultValue( "SunDiffuseColor", "255 255 255 255" );
  321. EditorSettings.setDefaultValue( "SunAmbientColor", "180 180 180 255" );
  322. EditorSettings.setDefaultValue( "SunAngleX", "45" );
  323. EditorSettings.setDefaultValue( "SunAngleZ", "135" );
  324. // Sub-windows
  325. EditorSettings.setDefaultValue( "AdvancedWndVisible", "1" );
  326. EditorSettings.endGroup();
  327. }
  328. function ShapeEditorPlugin::readSettings( %this )
  329. {
  330. EditorSettings.beginGroup( "ShapeEditor", true );
  331. // Display options
  332. ShapeEdPreviewGui-->previewBackground.color = ColorIntToFloat( EditorSettings.value("BackgroundColor") );
  333. SetToggleButtonValue( ShapeEdMaterials-->highlightMaterial, EditorSettings.value( "HighlightMaterial" ) );
  334. SetToggleButtonValue( ShapeEditorToolbar-->showNodes, EditorSettings.value( "ShowNodes" ) );
  335. SetToggleButtonValue( ShapeEditorToolbar-->showBounds, EditorSettings.value( "ShowBounds" ) );
  336. SetToggleButtonValue( ShapeEditorToolbar-->showObjBox, EditorSettings.value( "ShowObjBox" ) );
  337. SetToggleButtonValue( ShapeEditorToolbar-->renderColMeshes, EditorSettings.value( "RenderCollision" ) );
  338. SetToggleButtonValue( ShapeEdMountWindow-->renderMounts, EditorSettings.value( "RenderMounts" ) );
  339. // Grid
  340. SetToggleButtonValue( ShapeEditorToolbar-->showGridBtn, EditorSettings.value( "ShowGrid" ) );
  341. ShapeEdShapeView.gridSize = EditorSettings.value( "GridSize" );
  342. ShapeEdShapeView.gridDimension = EditorSettings.value( "GridDimension" );
  343. // Sun
  344. ShapeEdShapeView.sunDiffuse = EditorSettings.value("SunDiffuseColor");
  345. ShapeEdShapeView.sunAmbient = EditorSettings.value("SunAmbientColor");
  346. // Sub-windows
  347. SetToggleButtonValue( ShapeEditorToolbar-->showAdvanced, EditorSettings.value( "AdvancedWndVisible" ) );
  348. EditorSettings.endGroup();
  349. }
  350. function ShapeEditorPlugin::writeSettings( %this )
  351. {
  352. EditorSettings.beginGroup( "ShapeEditor", true );
  353. // Display options
  354. EditorSettings.setValue( "BackgroundColor", ColorFloatToInt( ShapeEdPreviewGui-->previewBackground.color ) );
  355. EditorSettings.setValue( "HighlightMaterial", ShapeEdMaterials-->highlightMaterial.getValue() );
  356. EditorSettings.setValue( "ShowNodes", ShapeEditorToolbar-->showNodes.getValue() );
  357. EditorSettings.setValue( "ShowBounds", ShapeEditorToolbar-->showBounds.getValue() );
  358. EditorSettings.setValue( "ShowObjBox", ShapeEditorToolbar-->showObjBox.getValue() );
  359. EditorSettings.setValue( "RenderCollision", ShapeEditorToolbar-->renderColMeshes.getValue() );
  360. EditorSettings.setValue( "RenderMounts", ShapeEdMountWindow-->renderMounts.getValue() );
  361. // Grid
  362. EditorSettings.setValue( "ShowGrid", ShapeEditorToolbar-->showGridBtn.getValue() );
  363. EditorSettings.setValue( "GridSize", ShapeEdShapeView.gridSize );
  364. EditorSettings.setValue( "GridDimension", ShapeEdShapeView.gridDimension );
  365. // Sun
  366. EditorSettings.setValue( "SunDiffuseColor", ShapeEdShapeView.sunDiffuse );
  367. EditorSettings.setValue( "SunAmbientColor", ShapeEdShapeView.sunAmbient );
  368. EditorSettings.setValue( "SunAngleX", ShapeEdShapeView.sunAngleX );
  369. EditorSettings.setValue( "SunAngleZ", ShapeEdShapeView.sunAngleZ );
  370. // Sub-windows
  371. EditorSettings.setValue( "AdvancedWndVisible", ShapeEditorToolbar-->showAdvanced.getValue() );
  372. EditorSettings.endGroup();
  373. }