.. | .. |
---|
60 | 60 | this.copy = this.group = group; |
---|
61 | 61 | //selectees = this.group.selectees; |
---|
62 | 62 | |
---|
| 63 | + if (copy.versions == null) |
---|
| 64 | + { |
---|
| 65 | + copy.versions = new byte[100][]; |
---|
| 66 | + copy.versionindex = -1; |
---|
| 67 | + } |
---|
| 68 | + |
---|
63 | 69 | if(ui) |
---|
64 | 70 | SetupUI(objEditor); |
---|
65 | 71 | } |
---|
.. | .. |
---|
74 | 80 | this.copy = this.group = copy; |
---|
75 | 81 | //selectees = this.group.selectees; |
---|
76 | 82 | |
---|
| 83 | + if (copy.versions == null) |
---|
| 84 | + { |
---|
| 85 | + copy.versions = new byte[100][]; |
---|
| 86 | + copy.versionindex = -1; |
---|
| 87 | + } |
---|
| 88 | + |
---|
77 | 89 | SetupMenu2(this); //objEditor); |
---|
78 | 90 | SetupUI2(objEditor); |
---|
79 | 91 | objEditor.SetupUI(true); |
---|
.. | .. |
---|
84 | 96 | |
---|
85 | 97 | void CloneSelection(boolean supports) |
---|
86 | 98 | { |
---|
| 99 | + if (Globals.REPLACEONMAKE) |
---|
| 100 | + Save(); |
---|
| 101 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 102 | + Globals.REPLACEONMAKE = false; |
---|
87 | 103 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 104 | //Object3D obj; |
---|
89 | 105 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 110 | |
---|
95 | 111 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 112 | } |
---|
| 113 | + Globals.REPLACEONMAKE = keep; |
---|
97 | 114 | } |
---|
98 | 115 | |
---|
99 | 116 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
189 | 206 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
190 | 207 | // pasteExpandItem.addActionListener(this); |
---|
191 | 208 | menu.add("-"); |
---|
192 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
193 | | - clearItem.addActionListener(this); |
---|
| 209 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 210 | + deleteItem.addActionListener(this); |
---|
194 | 211 | |
---|
195 | 212 | if (Globals.ADVANCED) |
---|
196 | 213 | { |
---|
.. | .. |
---|
204 | 221 | //zBufferItem.addActionListener(this); |
---|
205 | 222 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
206 | 223 | //normalLensItem.addActionListener(this); |
---|
207 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
208 | | - revertCameraItem.addActionListener(this); |
---|
| 224 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 225 | + restoreCameraItem.addActionListener(this); |
---|
209 | 226 | |
---|
210 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
211 | | - toggleFullScreenItem.addItemListener(this); |
---|
212 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
213 | | - cameraMenu.add("-"); |
---|
| 227 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 228 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 229 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 230 | +// cameraMenu.add("-"); |
---|
| 231 | +// |
---|
| 232 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 233 | +// toggleTextureItem.addItemListener(this); |
---|
| 234 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 235 | +// |
---|
| 236 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 237 | +// toggleSwitchItem.addItemListener(this); |
---|
| 238 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
214 | 239 | |
---|
215 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
216 | | - toggleTextureItem.addItemListener(this); |
---|
217 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
218 | | - |
---|
219 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
220 | | - toggleSwitchItem.addItemListener(this); |
---|
221 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
222 | | - |
---|
223 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 240 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
224 | 241 | toggleHandleItem.addItemListener(this); |
---|
225 | 242 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
226 | 243 | |
---|
.. | .. |
---|
275 | 292 | { |
---|
276 | 293 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
277 | 294 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
278 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 295 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
279 | 296 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
280 | 297 | oe.cameraMenu.add("-"); |
---|
281 | 298 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
283 | 300 | editLeafItem.addActionListener(this); |
---|
284 | 301 | lookAtItem.addActionListener(this); |
---|
285 | 302 | //lookFromItem.addActinoListener(this); |
---|
286 | | - //switchItem.addActionListener(this); |
---|
| 303 | + //switchViewItem.addActionListener(this); |
---|
287 | 304 | } |
---|
288 | 305 | |
---|
289 | 306 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
328 | 345 | } |
---|
329 | 346 | |
---|
330 | 347 | oe.menuBar.add(menu = new Menu("Group")); |
---|
331 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
332 | | - grabItem.addActionListener(this); |
---|
| 348 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 349 | +// grabItem.addActionListener(this); |
---|
333 | 350 | backItem = menu.add(new MenuItem("Back")); |
---|
334 | 351 | backItem.addActionListener(this); |
---|
335 | 352 | frontItem = menu.add(new MenuItem("Front")); |
---|
336 | 353 | frontItem.addActionListener(this); |
---|
337 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
338 | | - compositeItem.addActionListener(this); |
---|
| 354 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 355 | +// compositeItem.addActionListener(this); |
---|
339 | 356 | |
---|
340 | 357 | if (Globals.ADVANCED) |
---|
341 | 358 | { |
---|
.. | .. |
---|
345 | 362 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
346 | 363 | ungroupItem.addActionListener(this); |
---|
347 | 364 | |
---|
348 | | - menu.add("-"); |
---|
349 | | - |
---|
350 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
351 | | - randomItem.addActionListener(this); |
---|
| 365 | +// menu.add("-"); |
---|
| 366 | +// |
---|
| 367 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 368 | +// switchItem.addActionListener(this); |
---|
352 | 369 | if (Globals.ADVANCED) |
---|
353 | 370 | { |
---|
354 | 371 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
.. | .. |
---|
365 | 382 | frameselectorItem.addActionListener(this); |
---|
366 | 383 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
367 | 384 | scriptNodeItem.addActionListener(this); |
---|
368 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
369 | | - cameraItem.addActionListener(this); |
---|
370 | 385 | } |
---|
371 | 386 | |
---|
372 | 387 | oe.menuBar.add(menu = new Menu("Object")); |
---|
373 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
374 | | - textureItem.addActionListener(this); |
---|
| 388 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 389 | +// textureItem.addActionListener(this); |
---|
375 | 390 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
376 | 391 | billboardItem.addActionListener(this); |
---|
377 | 392 | csgItem = menu.add(new MenuItem("CSG")); |
---|
.. | .. |
---|
382 | 397 | shadowYItem.addActionListener(this); |
---|
383 | 398 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
384 | 399 | shadowZItem.addActionListener(this); |
---|
| 400 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 401 | + attributeItem.addActionListener(this); |
---|
| 402 | + |
---|
385 | 403 | if (Globals.ADVANCED) |
---|
386 | 404 | { |
---|
387 | 405 | menu.add("-"); |
---|
388 | 406 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
389 | 407 | linkerItem.addActionListener(this); |
---|
390 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
391 | | - attributeItem.addActionListener(this); |
---|
392 | 408 | templateItem = menu.add(new MenuItem("Template")); |
---|
393 | 409 | templateItem.addActionListener(this); |
---|
394 | 410 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
417 | 433 | genNormalsMESHItem.addActionListener(this); |
---|
418 | 434 | if (Globals.ADVANCED) |
---|
419 | 435 | { |
---|
420 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 436 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
421 | 437 | genNormalsMINEItem.addActionListener(this); |
---|
422 | 438 | } |
---|
423 | 439 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
540 | 556 | buildToolsMenu(menu); |
---|
541 | 557 | } |
---|
542 | 558 | |
---|
| 559 | + |
---|
543 | 560 | void SetupUI2(ObjEditor oe) |
---|
544 | 561 | { |
---|
545 | 562 | // June 2019 |
---|
.. | .. |
---|
582 | 599 | oe.radioPanel.add(dummyButton); |
---|
583 | 600 | oe.buttonGroup.add(dummyButton); |
---|
584 | 601 | */ |
---|
| 602 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 603 | + |
---|
| 604 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 605 | + |
---|
585 | 606 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
586 | 607 | |
---|
587 | 608 | //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
588 | 609 | //minButton.setToolTipText("Minimize window"); |
---|
589 | 610 | //minButton.addActionListener(this); |
---|
590 | 611 | |
---|
591 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
592 | | - maxButton.setToolTipText("Maximize window"); |
---|
593 | | - maxButton.addActionListener(this); |
---|
| 612 | + if (Globals.ADVANCED) |
---|
| 613 | + { |
---|
| 614 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 615 | + maxButton.setToolTipText("Maximize window"); |
---|
| 616 | + maxButton.addActionListener(this); |
---|
| 617 | + } |
---|
594 | 618 | |
---|
595 | 619 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
596 | 620 | fullButton.setToolTipText("Full-screen window"); |
---|
597 | 621 | fullButton.addActionListener(this); |
---|
598 | 622 | |
---|
599 | | - oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
600 | | - undoButton.setToolTipText("Undo changes"); |
---|
601 | | - undoButton.addActionListener(this); |
---|
| 623 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 624 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 625 | + screenfitButton.addActionListener(this); |
---|
| 626 | + |
---|
| 627 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 628 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 629 | + restoreCameraButton.addActionListener(this); |
---|
602 | 630 | |
---|
603 | | - oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
604 | | - redoButton.setToolTipText("Redo changes"); |
---|
605 | | - redoButton.addActionListener(this); |
---|
606 | | - |
---|
607 | | - oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
608 | | - saveButton.setToolTipText("Save changes"); |
---|
| 631 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 632 | + saveButton.setToolTipText("New version"); |
---|
609 | 633 | saveButton.addActionListener(this); |
---|
| 634 | + |
---|
| 635 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 636 | + undoButton.setToolTipText("Previous version"); |
---|
| 637 | + undoButton.addActionListener(this); |
---|
| 638 | + undoButton.setEnabled(false); |
---|
610 | 639 | |
---|
611 | | - oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 640 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 641 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 642 | + restoreButton.setToolTipText("Restore current"); |
---|
| 643 | + restoreButton.addActionListener(this); |
---|
| 644 | + restoreButton.setEnabled(false); |
---|
| 645 | + |
---|
| 646 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 647 | + replaceButton.setToolTipText("Replace current"); |
---|
| 648 | + replaceButton.addActionListener(this); |
---|
| 649 | + replaceButton.setEnabled(false); |
---|
| 650 | + |
---|
| 651 | + copyOptionsPanel.add(updown); |
---|
| 652 | + |
---|
| 653 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 654 | + redoButton.setToolTipText("Next version"); |
---|
| 655 | + redoButton.addActionListener(this); |
---|
| 656 | + redoButton.setEnabled(false); |
---|
| 657 | + |
---|
| 658 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
612 | 659 | liveCB.setToolTipText("Enable animation"); |
---|
613 | 660 | liveCB.addItemListener(this); |
---|
614 | 661 | |
---|
615 | | - oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 662 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
616 | 663 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
617 | 664 | oneStepButton.addActionListener(this); |
---|
618 | 665 | |
---|
619 | | - oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 666 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
620 | 667 | fastCB.setToolTipText("Fast mode"); |
---|
621 | 668 | fastCB.addItemListener(this); |
---|
622 | 669 | |
---|
623 | | - oe.toolboxPanel.Return(); |
---|
| 670 | + //oe.toolboxPanel.Return(); |
---|
624 | 671 | |
---|
625 | | - oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
626 | | - trackCB.setToolTipText("Enable tracking"); |
---|
627 | | - trackCB.addItemListener(this); |
---|
628 | | - |
---|
629 | | - oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
630 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
631 | | - screenfitButton.addActionListener(this); |
---|
| 672 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 673 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 674 | +// trackCB.addItemListener(this); |
---|
632 | 675 | |
---|
633 | 676 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
634 | 677 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
640 | 683 | snapobjectButton.setToolTipText("Snap Object"); |
---|
641 | 684 | } |
---|
642 | 685 | |
---|
643 | | - oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
644 | | - flashSelectionButton.setToolTipText("Highlight selection"); |
---|
645 | | - flashSelectionButton.addActionListener(this); |
---|
646 | | - |
---|
647 | 686 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
648 | | - |
---|
649 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | | - twoButton.setToolTipText("Show center view only"); |
---|
651 | | - twoButton.addActionListener(this); |
---|
652 | | - this.fullscreenLayout = twoButton; |
---|
653 | 687 | |
---|
654 | 688 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
655 | 689 | fourButton.addActionListener(this); |
---|
656 | 690 | fourButton.setToolTipText("Show left panel only"); |
---|
| 691 | + |
---|
| 692 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + twoButton.setToolTipText("Show right view only"); |
---|
| 694 | + twoButton.addActionListener(this); |
---|
| 695 | + this.fullscreenLayout = twoButton; |
---|
| 696 | + |
---|
657 | 697 | oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
658 | | - sixButton.setToolTipText("2-column layout left"); |
---|
| 698 | + sixButton.setToolTipText("Show left and right"); |
---|
659 | 699 | sixButton.addActionListener(this); |
---|
660 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
661 | | - threeButton.setToolTipText("2-column layout right"); |
---|
662 | | - threeButton.addActionListener(this); |
---|
663 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
664 | | - sevenButton.setToolTipText("3-column layout"); |
---|
665 | | - sevenButton.addActionListener(this); |
---|
| 700 | +// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 701 | +// threeButton.setToolTipText("2-column layout right"); |
---|
| 702 | +// threeButton.addActionListener(this); |
---|
| 703 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 704 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 705 | +// sevenButton.addActionListener(this); |
---|
666 | 706 | // |
---|
667 | 707 | |
---|
668 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
669 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 708 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 709 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
670 | 710 | rootButton.addActionListener(this); |
---|
671 | 711 | |
---|
672 | 712 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
688 | 728 | sphereButton.setToolTipText("Create sphere"); |
---|
689 | 729 | sphereButton.addActionListener(this); |
---|
690 | 730 | |
---|
691 | | - oe.toolboxPanel.Return(); |
---|
692 | | - |
---|
693 | 731 | oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
694 | 732 | coneButton.setToolTipText("Create cone"); |
---|
695 | 733 | coneButton.addActionListener(this); |
---|
.. | .. |
---|
713 | 751 | particlesButton.setToolTipText("Create particle system"); |
---|
714 | 752 | particlesButton.addActionListener(this); |
---|
715 | 753 | |
---|
| 754 | + oe.toolboxPanel.Return(); |
---|
| 755 | + |
---|
| 756 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 757 | + groupButton.setToolTipText("Create group"); |
---|
| 758 | + groupButton.addActionListener(this); |
---|
| 759 | + |
---|
| 760 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 761 | + compositeButton.setToolTipText("Create composite"); |
---|
| 762 | + compositeButton.addActionListener(this); |
---|
| 763 | + |
---|
| 764 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 765 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 766 | + switchButton.addActionListener(this); |
---|
| 767 | + |
---|
| 768 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 769 | + loopButton.setToolTipText("Create loop"); |
---|
| 770 | + loopButton.addActionListener(this); |
---|
| 771 | + |
---|
| 772 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 773 | + textureButton.setToolTipText("Create texture"); |
---|
| 774 | + textureButton.addActionListener(this); |
---|
| 775 | + |
---|
716 | 776 | oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
717 | 777 | overlayButton.setToolTipText("Create overlay"); |
---|
718 | 778 | overlayButton.addActionListener(this); |
---|
.. | .. |
---|
721 | 781 | lightButton.setToolTipText("Create light"); |
---|
722 | 782 | lightButton.addActionListener(this); |
---|
723 | 783 | |
---|
| 784 | + for (int i=6; --i>=0;) |
---|
| 785 | + { |
---|
| 786 | + oe.toolboxPanel.Return(); |
---|
| 787 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 788 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 789 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 790 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 791 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 792 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 793 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 794 | + } |
---|
| 795 | + |
---|
724 | 796 | // EDIT panel |
---|
725 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
726 | | - editButton.setToolTipText("Edit selection"); |
---|
| 797 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 798 | + editButton.setToolTipText("Pin selection controls"); |
---|
727 | 799 | editButton.addActionListener(this); |
---|
728 | 800 | |
---|
729 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
730 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 801 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 802 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
731 | 803 | uneditButton.addActionListener(this); |
---|
732 | 804 | |
---|
733 | 805 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
734 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 806 | + allParamsButton.setToolTipText("Show all controle"); |
---|
735 | 807 | allParamsButton.addActionListener(this); |
---|
736 | 808 | |
---|
737 | 809 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
742 | 814 | unselectButton.setToolTipText("Unselect"); |
---|
743 | 815 | unselectButton.addActionListener(this); |
---|
744 | 816 | |
---|
| 817 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 818 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 819 | + flashSelectionButton.addActionListener(this); |
---|
| 820 | + |
---|
745 | 821 | editCommandsPanel.preferredHeight = 1; |
---|
746 | 822 | |
---|
| 823 | + SetPinStates(false); |
---|
747 | 824 | // oe.treePanel.add(commandsPanel); |
---|
748 | 825 | // oe.treePanel.Return(); |
---|
749 | 826 | |
---|
.. | .. |
---|
768 | 845 | oe.treePanel.add(jSPPanel); |
---|
769 | 846 | oe.treePanel.Return(); |
---|
770 | 847 | |
---|
771 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
772 | | - |
---|
773 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
774 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
775 | | - colorCB.addItemListener(this); |
---|
776 | | - |
---|
777 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
778 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
779 | | - materialCB.addItemListener(this); |
---|
780 | | - |
---|
781 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
782 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
783 | | - textureCB.addItemListener(this); |
---|
784 | | - |
---|
785 | | - copyOptionsPanel.preferredHeight = 1; |
---|
786 | 848 | oe.treePanel.add(copyOptionsPanel); |
---|
787 | 849 | oe.treePanel.Return(); |
---|
| 850 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 851 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 852 | + sliderPane.preferredHeight = 1; |
---|
788 | 853 | |
---|
789 | 854 | // mainPanel.setDividerLocation(0.5); //1.0); |
---|
790 | 855 | // mainPanel.setResizeWeight(0.5); |
---|
.. | .. |
---|
807 | 872 | dgr.addDragGestureListener(this); |
---|
808 | 873 | }catch(Exception e) {} |
---|
809 | 874 | */ |
---|
810 | | - radio.layout = sevenButton; |
---|
| 875 | + radio.layout = sixButton; // sevenButton; |
---|
811 | 876 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
812 | 877 | } |
---|
813 | 878 | |
---|
814 | 879 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
815 | 880 | { |
---|
| 881 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 882 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 883 | + colorCB.addItemListener(this); |
---|
| 884 | + |
---|
| 885 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 886 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 887 | + materialCB.addItemListener(this); |
---|
| 888 | + |
---|
| 889 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 890 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 891 | + textureCB.addItemListener(this); |
---|
| 892 | + |
---|
| 893 | + panel.Return(); |
---|
| 894 | + |
---|
816 | 895 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
817 | 896 | boxCB.setToolTipText("Display bounding boxes"); |
---|
818 | 897 | boxCB.addItemListener(this); |
---|
819 | 898 | |
---|
820 | 899 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
821 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 900 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
822 | 901 | zoomBoxCB.addItemListener(this); |
---|
823 | 902 | |
---|
824 | 903 | if (true) // Globals.ADVANCED) |
---|
825 | 904 | { |
---|
826 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
827 | | - supportCB.setToolTipText("Enable rigging"); |
---|
828 | | - supportCB.addItemListener(this); |
---|
| 905 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 906 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 907 | +// supportCB.addItemListener(this); |
---|
| 908 | + |
---|
| 909 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 910 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 911 | + freezeCB.addItemListener(this); |
---|
829 | 912 | |
---|
830 | 913 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
831 | 914 | // localCB.addItemListener(this); |
---|
832 | 915 | |
---|
| 916 | + panel.Return(); |
---|
| 917 | + |
---|
833 | 918 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
834 | 919 | crowdCB.setToolTipText("Used for crowds"); |
---|
835 | 920 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
846 | 931 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
847 | 932 | // speakerMocapCB.addItemListener(this); |
---|
848 | 933 | |
---|
| 934 | + panel.Return(); |
---|
| 935 | + |
---|
849 | 936 | if (false) |
---|
850 | 937 | { |
---|
851 | 938 | // handled in scripts |
---|
.. | .. |
---|
860 | 947 | //constraints.gridy += 1; |
---|
861 | 948 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
862 | 949 | smoothfocusCB.addItemListener(this); |
---|
| 950 | + panel.Return(); |
---|
863 | 951 | } |
---|
864 | 952 | |
---|
865 | 953 | //constraints.gridx += 1; |
---|
866 | 954 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
867 | 955 | // debugCB.addItemListener(this); |
---|
868 | 956 | |
---|
| 957 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 958 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 959 | + trackCB.addItemListener(this); |
---|
| 960 | + |
---|
869 | 961 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
870 | | - oeilCB.setToolTipText("Move camera when tracking target"); |
---|
| 962 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
871 | 963 | oeilCB.addItemListener(this); |
---|
872 | 964 | |
---|
873 | 965 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
874 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 966 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
875 | 967 | shadowCB.addItemListener(this); |
---|
876 | 968 | |
---|
877 | | - panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
878 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
879 | | - autosaveCB.addItemListener(this); |
---|
| 969 | + panel.Return(); |
---|
| 970 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 971 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 972 | + toggleTextureCB.addItemListener(this); |
---|
| 973 | + |
---|
| 974 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 975 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 976 | + toggleSwitchCB.addItemListener(this); |
---|
| 977 | + |
---|
| 978 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 979 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 980 | + autokeepCB.addItemListener(this); |
---|
880 | 981 | |
---|
| 982 | + panel.Return(); |
---|
881 | 983 | if (Globals.ADVANCED) |
---|
882 | 984 | { |
---|
883 | 985 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
.. | .. |
---|
888 | 990 | } |
---|
889 | 991 | |
---|
890 | 992 | cGridBag fill = new cGridBag(); |
---|
891 | | - |
---|
892 | 993 | fill.preferredHeight = 200; |
---|
| 994 | + cGridBag fill2 = new cGridBag(); |
---|
| 995 | + fill2.preferredHeight = 200; |
---|
| 996 | + cGridBag fill3 = new cGridBag(); |
---|
| 997 | + fill3.preferredHeight = 200; |
---|
893 | 998 | |
---|
894 | 999 | panel.add(fill); |
---|
| 1000 | + panel.add(fill2); |
---|
| 1001 | + panel.add(fill3); |
---|
895 | 1002 | |
---|
896 | 1003 | } |
---|
897 | 1004 | |
---|
.. | .. |
---|
899 | 1006 | { |
---|
900 | 1007 | cRadio radioButton = new cRadio(obj.name); |
---|
901 | 1008 | |
---|
902 | | - // Patch to avoid bug with transparency. |
---|
| 1009 | + // June 2019. Patch to avoid bug with transparency. |
---|
903 | 1010 | radioButton.hadMaterial = obj.material != null; |
---|
904 | 1011 | if (!radioButton.hadMaterial) |
---|
905 | 1012 | { |
---|
.. | .. |
---|
907 | 1014 | } |
---|
908 | 1015 | |
---|
909 | 1016 | radioButton.SetObject(obj); |
---|
910 | | - radioButton.layout = sevenButton; |
---|
| 1017 | + radioButton.layout = sixButton; // sevenButton; |
---|
911 | 1018 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
912 | 1019 | radioButton.addActionListener(this); |
---|
913 | 1020 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
936 | 1043 | cCheckBox slowCB; |
---|
937 | 1044 | cCheckBox boxCB; |
---|
938 | 1045 | cCheckBox zoomBoxCB; |
---|
939 | | - cToggleButton trackCB; |
---|
| 1046 | + cCheckBox freezeCB; |
---|
| 1047 | + //cToggleButton trackCB; |
---|
| 1048 | + cCheckBox trackCB; |
---|
940 | 1049 | cCheckBox smoothfocusCB; |
---|
941 | 1050 | // JCheckBox speakerMocapCB; |
---|
942 | 1051 | cCheckBox speakerCameraCB; |
---|
.. | .. |
---|
945 | 1054 | |
---|
946 | 1055 | cCheckBox oeilCB; |
---|
947 | 1056 | cCheckBox shadowCB; |
---|
948 | | - cCheckBox autosaveCB; |
---|
| 1057 | + cCheckBox autokeepCB; |
---|
949 | 1058 | cCheckBox lookAtCB; |
---|
950 | 1059 | |
---|
951 | 1060 | // static int COLOR = 1; |
---|
.. | .. |
---|
1053 | 1162 | { |
---|
1054 | 1163 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1055 | 1164 | } |
---|
1056 | | - else if(e.getSource() == autosaveCB) |
---|
| 1165 | + else if(e.getSource() == freezeCB) |
---|
1057 | 1166 | { |
---|
1058 | | - Globals.SAVEONMAKE ^= true; |
---|
| 1167 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1168 | + } |
---|
| 1169 | + else if(e.getSource() == autokeepCB) |
---|
| 1170 | + { |
---|
| 1171 | + Globals.REPLACEONMAKE ^= true; |
---|
1059 | 1172 | } |
---|
1060 | 1173 | else if(e.getSource() == lookAtCB) |
---|
1061 | 1174 | { |
---|
.. | .. |
---|
1137 | 1250 | } |
---|
1138 | 1251 | } |
---|
1139 | 1252 | |
---|
1140 | | - String string = (String) object; |
---|
1141 | | - |
---|
1142 | 1253 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1143 | 1254 | // if( object instanceof java.io.File[]) |
---|
1144 | 1255 | // { |
---|
.. | .. |
---|
1146 | 1257 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1147 | 1258 | // return; |
---|
1148 | 1259 | // } |
---|
| 1260 | + |
---|
| 1261 | + String string = object.toString(); |
---|
1149 | 1262 | |
---|
1150 | 1263 | // File path for Mac and Windows |
---|
1151 | 1264 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1191 | 1304 | |
---|
1192 | 1305 | assert target == objEditor.jTree; |
---|
1193 | 1306 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1307 | + Object3D destinationLeaf; |
---|
1194 | 1308 | try { |
---|
1195 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1309 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1196 | 1310 | } catch (Exception e) { |
---|
1197 | 1311 | System.out.println("destinationPath : " + destinationPath); |
---|
1198 | 1312 | return; |
---|
1199 | 1313 | } |
---|
1200 | 1314 | |
---|
| 1315 | + for (int i=group.selection.size(); --i>=0;) |
---|
| 1316 | + { |
---|
| 1317 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1318 | + |
---|
| 1319 | + // Cannot move into itself |
---|
| 1320 | + if (child == destinationLeaf) |
---|
| 1321 | + return; |
---|
| 1322 | + } |
---|
| 1323 | + |
---|
1201 | 1324 | // june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
1202 | 1325 | // { |
---|
1203 | 1326 | loadClipboard(true); |
---|
.. | .. |
---|
1312 | 1435 | { |
---|
1313 | 1436 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1314 | 1437 | //heightFieldItem.addActionListener(this); |
---|
1315 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1316 | | - gridItem.addActionListener(this); |
---|
1317 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1318 | | - rectoidItem.addActionListener(this); |
---|
1319 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1320 | | - ellipsoidItem.addActionListener(this); |
---|
1321 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1322 | | - coneItem.addActionListener(this); |
---|
1323 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1324 | | - torusItem.addActionListener(this); |
---|
1325 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1326 | | - superItem.addActionListener(this); |
---|
| 1438 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1439 | +// gridItem.addActionListener(this); |
---|
| 1440 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1441 | +// rectoidItem.addActionListener(this); |
---|
| 1442 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1443 | +// ellipsoidItem.addActionListener(this); |
---|
| 1444 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1445 | +// coneItem.addActionListener(this); |
---|
| 1446 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1447 | +// torusItem.addActionListener(this); |
---|
| 1448 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1449 | +// superItem.addActionListener(this); |
---|
| 1450 | + |
---|
| 1451 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1452 | + cameraItem.addActionListener(this); |
---|
| 1453 | + |
---|
| 1454 | + if (!Globals.ADVANCED) |
---|
| 1455 | + { |
---|
1327 | 1456 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1328 | 1457 | kleinItem.addActionListener(this); |
---|
1329 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1330 | | - particleItem.addActionListener(this); |
---|
| 1458 | + } |
---|
| 1459 | + |
---|
| 1460 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1461 | +// particleItem.addActionListener(this); |
---|
1331 | 1462 | if (Globals.ADVANCED) |
---|
1332 | 1463 | { |
---|
1333 | 1464 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1353 | 1484 | } |
---|
1354 | 1485 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1355 | 1486 | bezierItem.addActionListener(this); |
---|
1356 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1357 | | - overlayItem.addActionListener(this); |
---|
1358 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1359 | | - lightItem.addActionListener(this); |
---|
| 1487 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1488 | +// overlayItem.addActionListener(this); |
---|
| 1489 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1490 | +// lightItem.addActionListener(this); |
---|
1360 | 1491 | menu.add("-"); |
---|
1361 | 1492 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1362 | 1493 | //superLoopItem.addActionListener(this); |
---|
1363 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1364 | | - loopItem.addActionListener(this); |
---|
| 1494 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1495 | +// loopItem.addActionListener(this); |
---|
1365 | 1496 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1366 | 1497 | doubleItem.addActionListener(this); |
---|
1367 | 1498 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1377 | 1508 | animationItem.addItemListener(this); |
---|
1378 | 1509 | animationItem.setState(Globals.ANIMATION); |
---|
1379 | 1510 | |
---|
| 1511 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1512 | + archiveItem.addActionListener(this); |
---|
| 1513 | + |
---|
1380 | 1514 | menu.add("-"); |
---|
1381 | 1515 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1382 | 1516 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1389 | 1523 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1390 | 1524 | reduce34MorphItem.addActionListener(this); |
---|
1391 | 1525 | menu.add("-"); |
---|
| 1526 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1527 | + memoryItem.addActionListener(this); |
---|
1392 | 1528 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1393 | 1529 | computeAOItem.addActionListener(this); |
---|
1394 | 1530 | |
---|
.. | .. |
---|
1397 | 1533 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1398 | 1534 | mirrorItem.addActionListener(this); |
---|
1399 | 1535 | menu.add("-"); |
---|
1400 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1401 | | - memoryItem.addActionListener(this); |
---|
1402 | 1536 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1403 | 1537 | analyzeItem.addActionListener(this); |
---|
1404 | 1538 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1546 | 1680 | |
---|
1547 | 1681 | makeSomething(shadow); |
---|
1548 | 1682 | } |
---|
| 1683 | + |
---|
| 1684 | + private void ClearUnpinned() |
---|
| 1685 | + { |
---|
| 1686 | + //for (Object3D obj : listUI) |
---|
| 1687 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1688 | + { |
---|
| 1689 | + Object3D obj = listUI.elementAt(i); |
---|
| 1690 | + if (!obj.pinned) |
---|
| 1691 | + { |
---|
| 1692 | + obj.CloseUI(); |
---|
| 1693 | + listUI.remove(i); |
---|
| 1694 | + } |
---|
| 1695 | + } |
---|
| 1696 | + } |
---|
| 1697 | + |
---|
| 1698 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1699 | + { |
---|
| 1700 | + // if (!(elem instanceof Composite)) |
---|
| 1701 | + // newWindow = false; |
---|
| 1702 | + listUI.add(elem); |
---|
| 1703 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1704 | + System.out.println("edit : " + elem); |
---|
| 1705 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 1706 | + } |
---|
1549 | 1707 | |
---|
1550 | 1708 | /** |
---|
1551 | 1709 | * applyExample |
---|
.. | .. |
---|
1790 | 1948 | { |
---|
1791 | 1949 | ScreenFit(); |
---|
1792 | 1950 | } else |
---|
1793 | | - if (source == switchItem) |
---|
| 1951 | + if (source == switchViewItem) |
---|
1794 | 1952 | { |
---|
1795 | 1953 | cVector v1 = new cVector(); |
---|
1796 | 1954 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
2020 | 2178 | |
---|
2021 | 2179 | group(g); |
---|
2022 | 2180 | } else |
---|
2023 | | - if (source == loopItem) |
---|
| 2181 | + if (source == loopItem || source == loopButton) |
---|
2024 | 2182 | { |
---|
2025 | 2183 | Composite csg = new GroupLeaf(); |
---|
2026 | 2184 | csg.count = 5; |
---|
2027 | 2185 | group(csg); |
---|
2028 | | - Composite child = new cGroup(); |
---|
| 2186 | + Composite child = new cGroup("Branch"); |
---|
2029 | 2187 | csg.addChild(child); |
---|
2030 | 2188 | child.addChild(csg); |
---|
2031 | 2189 | } else |
---|
2032 | 2190 | if (source == doubleItem) |
---|
2033 | 2191 | { |
---|
2034 | | - Composite csg = new GroupLeaf(); |
---|
| 2192 | + Composite csg = new GroupLeaf("Fork"); |
---|
2035 | 2193 | csg.count = 5; |
---|
2036 | 2194 | group(csg); |
---|
2037 | | - Composite child = new cGroup(); |
---|
| 2195 | + Composite child = new cGroup("Branch A"); |
---|
2038 | 2196 | csg.addChild(child); |
---|
2039 | 2197 | child.addChild(csg); |
---|
2040 | | - child = new cGroup(); |
---|
| 2198 | + child = new cGroup("Branch B"); |
---|
2041 | 2199 | csg.addChild(child); |
---|
2042 | 2200 | child.addChild(csg); |
---|
2043 | 2201 | } else |
---|
2044 | 2202 | if (source == tripleItem) |
---|
2045 | 2203 | { |
---|
2046 | | - Composite csg = new GroupLeaf(); |
---|
| 2204 | + Composite csg = new GroupLeaf("Trident"); |
---|
2047 | 2205 | csg.count = 4; |
---|
2048 | 2206 | group(csg); |
---|
2049 | 2207 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2107 | 2265 | } else |
---|
2108 | 2266 | if (source == undoButton) |
---|
2109 | 2267 | { |
---|
| 2268 | + // Go to previous version |
---|
| 2269 | + //if (!Undo()) |
---|
| 2270 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2110 | 2271 | Undo(); |
---|
| 2272 | + } else |
---|
| 2273 | + if (source == restoreButton) |
---|
| 2274 | + { |
---|
| 2275 | + // Restore current version |
---|
| 2276 | + Restore(); |
---|
| 2277 | + } else |
---|
| 2278 | + if (source == replaceButton) |
---|
| 2279 | + { |
---|
| 2280 | + // Overwrite current version |
---|
| 2281 | + Replace(); |
---|
2111 | 2282 | } else |
---|
2112 | 2283 | if (source == redoButton) |
---|
2113 | 2284 | { |
---|
| 2285 | + // Go to next version |
---|
2114 | 2286 | Redo(); |
---|
2115 | 2287 | } else |
---|
2116 | 2288 | if (source == saveButton) |
---|
2117 | 2289 | { |
---|
2118 | | - Save(); |
---|
| 2290 | + // Save a new version |
---|
| 2291 | + if (!Save(true)) |
---|
| 2292 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2119 | 2293 | } else |
---|
2120 | 2294 | if (source == oneStepButton) |
---|
2121 | 2295 | { |
---|
.. | .. |
---|
2124 | 2298 | } else |
---|
2125 | 2299 | if (source == screenfitButton) |
---|
2126 | 2300 | { |
---|
2127 | | - //Reload(lastConverter, lastFilename, true); |
---|
2128 | 2301 | ScreenFit(); |
---|
2129 | 2302 | } else |
---|
2130 | 2303 | if (source == screenfitpointButton) |
---|
2131 | 2304 | { |
---|
2132 | | - //Reload(lastConverter, lastFilename, true); |
---|
2133 | 2305 | ScreenFitPoint(); |
---|
2134 | 2306 | } else |
---|
2135 | 2307 | if (source == snapobjectButton) |
---|
2136 | 2308 | { |
---|
2137 | | - //Reload(lastConverter, lastFilename, true); |
---|
2138 | 2309 | SnapObject(); |
---|
2139 | 2310 | } else |
---|
2140 | 2311 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2498 | 2669 | { |
---|
2499 | 2670 | StepAll(); |
---|
2500 | 2671 | } else |
---|
2501 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2672 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2502 | 2673 | { |
---|
2503 | 2674 | //int indices[] = jList.getSelectedIndices(); |
---|
2504 | 2675 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2510 | 2681 | { |
---|
2511 | 2682 | ClearSelection(true); |
---|
2512 | 2683 | } else |
---|
2513 | | - if (source == grabItem) |
---|
| 2684 | + if (source == grabItem || source == groupButton) |
---|
2514 | 2685 | { |
---|
2515 | | - group(new cGroup(), true); |
---|
| 2686 | + group(new cGroup(), false); // true); |
---|
2516 | 2687 | } else |
---|
2517 | 2688 | if (source == hideItem) |
---|
2518 | 2689 | { |
---|
.. | .. |
---|
2530 | 2701 | { |
---|
2531 | 2702 | makeSomething(new Camera()); |
---|
2532 | 2703 | } else |
---|
2533 | | - if (source == compositeItem) |
---|
| 2704 | + if (source == compositeItem || source == compositeButton) |
---|
2534 | 2705 | { |
---|
2535 | 2706 | group(new Composite()); |
---|
2536 | 2707 | } else |
---|
2537 | | - if (source == randomItem) |
---|
| 2708 | + if (source == switchItem || source == switchButton) |
---|
2538 | 2709 | { |
---|
2539 | 2710 | RandomNode random = new RandomNode(); |
---|
2540 | 2711 | group(random); |
---|
.. | .. |
---|
2636 | 2807 | { |
---|
2637 | 2808 | group(new cLinker()); |
---|
2638 | 2809 | } else |
---|
2639 | | - if (source == textureItem) |
---|
| 2810 | + if (source == textureItem || source == textureButton) |
---|
2640 | 2811 | { |
---|
2641 | 2812 | group(new TextureNode()); |
---|
2642 | 2813 | } else |
---|
.. | .. |
---|
2658 | 2829 | } else |
---|
2659 | 2830 | if (source == ungroupItem || source == ungroupButton) |
---|
2660 | 2831 | { |
---|
2661 | | - //ungroup(); |
---|
| 2832 | + boolean hasRoot = false; |
---|
| 2833 | + |
---|
2662 | 2834 | for (int i=0; i<group.selection.size(); i++) |
---|
2663 | 2835 | { |
---|
2664 | | - Ungroup(group.selection.get(i)); |
---|
| 2836 | + if (group.selection.get(i) == group) |
---|
| 2837 | + { |
---|
| 2838 | + hasRoot = true; |
---|
| 2839 | + break; |
---|
| 2840 | + } |
---|
2665 | 2841 | } |
---|
2666 | 2842 | |
---|
2667 | | - ClearSelection(false); |
---|
2668 | | - |
---|
2669 | | - refreshContents(); |
---|
| 2843 | + if (!hasRoot) |
---|
| 2844 | + { |
---|
| 2845 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2846 | + { |
---|
| 2847 | + Ungroup(group.selection.get(i)); |
---|
| 2848 | + } |
---|
| 2849 | + |
---|
| 2850 | + ClearSelection(false); |
---|
| 2851 | + |
---|
| 2852 | + refreshContents(); |
---|
| 2853 | + } |
---|
2670 | 2854 | } else |
---|
2671 | 2855 | if (source == genUVItem) |
---|
2672 | 2856 | { |
---|
.. | .. |
---|
3258 | 3442 | } else |
---|
3259 | 3443 | if (source == editItem || source == editButton) |
---|
3260 | 3444 | { |
---|
| 3445 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3446 | + { |
---|
| 3447 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3448 | + child.pinned = true; |
---|
| 3449 | + } |
---|
| 3450 | + |
---|
3261 | 3451 | EditSelection(false); |
---|
3262 | 3452 | } else |
---|
3263 | 3453 | if (source == uneditButton) |
---|
.. | .. |
---|
3267 | 3457 | Object3D child = (Object3D)e.nextElement(); |
---|
3268 | 3458 | if(child.editWindow != null) |
---|
3269 | 3459 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3460 | + child.pinned = false; |
---|
3270 | 3461 | child.CloseUI(); |
---|
3271 | 3462 | listUI.remove(child); |
---|
3272 | 3463 | |
---|
.. | .. |
---|
3283 | 3474 | //copy.ClearUI(); |
---|
3284 | 3475 | for (Object3D obj : listUI) |
---|
3285 | 3476 | { |
---|
| 3477 | + obj.pinned = false; |
---|
3286 | 3478 | obj.CloseUI(); |
---|
3287 | 3479 | } |
---|
3288 | 3480 | listUI.clear(); |
---|
.. | .. |
---|
3292 | 3484 | { |
---|
3293 | 3485 | assert(copy == group); |
---|
3294 | 3486 | |
---|
3295 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3487 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3296 | 3488 | |
---|
3297 | 3489 | for (Object3D obj : listUI) |
---|
3298 | 3490 | { |
---|
.. | .. |
---|
3341 | 3533 | } |
---|
3342 | 3534 | |
---|
3343 | 3535 | copy = group; |
---|
| 3536 | + |
---|
| 3537 | + SetUndoStates(); |
---|
| 3538 | + |
---|
3344 | 3539 | //Globals.theRenderer.object = group; |
---|
3345 | 3540 | if(!useclient) |
---|
3346 | 3541 | { |
---|
.. | .. |
---|
3367 | 3562 | currentLayout = sevenButton; |
---|
3368 | 3563 | */ |
---|
3369 | 3564 | radio.layout.doClick(); |
---|
| 3565 | + |
---|
| 3566 | + ClearUnpinned(); |
---|
| 3567 | + //Grafreed.Assert(group != null); |
---|
| 3568 | + //Grafreed.Assert(group.selection != null); |
---|
| 3569 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3570 | + if (group.selection == null || group.selection.size() == 1) |
---|
| 3571 | + EditSelection(false); |
---|
3370 | 3572 | keepparent = group.parent; |
---|
3371 | 3573 | // PARENT = NULL or not??? |
---|
3372 | 3574 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
3380 | 3582 | cameraView.ProtectCamera(); |
---|
3381 | 3583 | cameraView.repaint(); |
---|
3382 | 3584 | return; |
---|
3383 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3585 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3384 | 3586 | { |
---|
3385 | 3587 | cameraView.RevertCamera(); |
---|
3386 | 3588 | cameraView.repaint(); |
---|
.. | .. |
---|
4434 | 4636 | // } |
---|
4435 | 4637 | // } |
---|
4436 | 4638 | |
---|
4437 | | - static boolean allparams = true; |
---|
4438 | | - |
---|
4439 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4440 | | - |
---|
4441 | 4639 | void EditSelection(boolean newWindow) |
---|
4442 | 4640 | { |
---|
| 4641 | + if (group.selection == null) |
---|
| 4642 | + { |
---|
| 4643 | + EditElement(group, newWindow); // ? new |
---|
| 4644 | + return; |
---|
| 4645 | + } |
---|
| 4646 | + |
---|
4443 | 4647 | // aConstraints.gridy = 0; |
---|
4444 | 4648 | for (int i=0; i<group.selection.size(); i++) |
---|
4445 | 4649 | { |
---|
.. | .. |
---|
4450 | 4654 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4451 | 4655 | if(elem != group || !newWindow) |
---|
4452 | 4656 | { |
---|
4453 | | - // if (!(elem instanceof Composite)) |
---|
4454 | | - // newWindow = false; |
---|
4455 | | - listUI.add(elem); |
---|
4456 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4457 | | - System.out.println("edit : " + elem); |
---|
4458 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4657 | + EditElement(elem, newWindow); // ? new |
---|
4459 | 4658 | } |
---|
4460 | 4659 | } |
---|
4461 | 4660 | } |
---|
.. | .. |
---|
4530 | 4729 | //new Exception().printStackTrace(); |
---|
4531 | 4730 | |
---|
4532 | 4731 | freezemodel = true; |
---|
4533 | | - |
---|
| 4732 | + ClearUnpinned(); |
---|
| 4733 | + |
---|
4534 | 4734 | /**/ |
---|
4535 | 4735 | //switch (event.id) |
---|
4536 | 4736 | { |
---|
.. | .. |
---|
4563 | 4763 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4564 | 4764 | // a camera |
---|
4565 | 4765 | { |
---|
4566 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4766 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
4567 | 4767 | { |
---|
4568 | 4768 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4569 | 4769 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4572 | 4772 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4573 | 4773 | } |
---|
4574 | 4774 | |
---|
| 4775 | + if (tps != null && tps.length == 1) |
---|
| 4776 | + { |
---|
| 4777 | + EditSelection(false); |
---|
| 4778 | + } |
---|
| 4779 | + |
---|
| 4780 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4781 | + |
---|
4575 | 4782 | refreshContents(); |
---|
4576 | 4783 | //return true; |
---|
4577 | 4784 | } |
---|
.. | .. |
---|
4581 | 4788 | freezemodel = false; |
---|
4582 | 4789 | } |
---|
4583 | 4790 | |
---|
| 4791 | + void SetPinStates(boolean enabled) |
---|
| 4792 | + { |
---|
| 4793 | + editButton.setEnabled(enabled); |
---|
| 4794 | + uneditButton.setEnabled(enabled); |
---|
| 4795 | + unselectButton.setEnabled(enabled); |
---|
| 4796 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4797 | + } |
---|
| 4798 | + |
---|
4584 | 4799 | void refreshContents(boolean cp) |
---|
4585 | 4800 | { |
---|
4586 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 4801 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4802 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4587 | 4803 | { |
---|
4588 | 4804 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4589 | 4805 | |
---|
.. | .. |
---|
4682 | 4898 | |
---|
4683 | 4899 | if (cut) |
---|
4684 | 4900 | { |
---|
4685 | | - if (Globals.SAVEONMAKE) |
---|
4686 | | - Save(); |
---|
| 4901 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4902 | +// Save(); |
---|
4687 | 4903 | //int indices[] = jList.getSelectedIndices(); |
---|
4688 | 4904 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4689 | 4905 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4786 | 5002 | |
---|
4787 | 5003 | void paste(boolean expand) |
---|
4788 | 5004 | { |
---|
| 5005 | + if (Globals.REPLACEONMAKE) |
---|
| 5006 | + Save(); |
---|
| 5007 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5008 | + Globals.REPLACEONMAKE = false; |
---|
4789 | 5009 | // if (GrafreeD.clipboard == null) |
---|
4790 | 5010 | // return; |
---|
4791 | 5011 | boolean first = true; |
---|
.. | .. |
---|
4845 | 5065 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4846 | 5066 | } |
---|
4847 | 5067 | |
---|
| 5068 | + Globals.REPLACEONMAKE = keep; |
---|
4848 | 5069 | ResetModel(); |
---|
4849 | 5070 | refreshContents(); |
---|
4850 | 5071 | } |
---|
.. | .. |
---|
4980 | 5201 | |
---|
4981 | 5202 | void group(Object3D csg, boolean grab) |
---|
4982 | 5203 | { |
---|
| 5204 | + if (Globals.REPLACEONMAKE) |
---|
| 5205 | + Save(); |
---|
| 5206 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5207 | + Globals.REPLACEONMAKE = false; |
---|
4983 | 5208 | if (//false) // why?? |
---|
4984 | 5209 | !group.selection.isEmpty()) |
---|
4985 | 5210 | { |
---|
.. | .. |
---|
5093 | 5318 | //node.add(csg); |
---|
5094 | 5319 | //makeSomething(node); |
---|
5095 | 5320 | makeSomething(csg); |
---|
| 5321 | + Globals.REPLACEONMAKE = keep; |
---|
5096 | 5322 | } |
---|
5097 | 5323 | |
---|
5098 | 5324 | void Ungroup(Object3D g) |
---|
5099 | 5325 | { |
---|
| 5326 | + if (Globals.REPLACEONMAKE) |
---|
| 5327 | + Save(); |
---|
| 5328 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5329 | + Globals.REPLACEONMAKE = false; |
---|
5100 | 5330 | if (g instanceof HiddenObject) |
---|
5101 | 5331 | { |
---|
5102 | 5332 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
5113 | 5343 | objEditor.makeSomething(g.get(i), false); |
---|
5114 | 5344 | } |
---|
5115 | 5345 | } |
---|
| 5346 | + Globals.REPLACEONMAKE = keep; |
---|
5116 | 5347 | } |
---|
5117 | 5348 | |
---|
5118 | 5349 | void ungroup() |
---|
.. | .. |
---|
5401 | 5632 | cButton clearpanelButton; |
---|
5402 | 5633 | cButton unselectButton; |
---|
5403 | 5634 | |
---|
5404 | | - cButton minButton; |
---|
5405 | | - cButton maxButton; |
---|
5406 | | - cButton fullButton; |
---|
5407 | | - cButton undoButton; |
---|
5408 | | - cButton redoButton; |
---|
| 5635 | + cButton restoreCameraButton; |
---|
| 5636 | + |
---|
5409 | 5637 | cButton saveButton; |
---|
5410 | 5638 | cButton oneStepButton; |
---|
5411 | 5639 | |
---|
5412 | 5640 | cButton groupButton; |
---|
5413 | 5641 | cButton ungroupButton; |
---|
5414 | 5642 | cButton compositeButton; |
---|
| 5643 | + cButton switchButton; |
---|
| 5644 | + cButton loopButton; |
---|
| 5645 | + cButton textureButton; |
---|
5415 | 5646 | |
---|
5416 | 5647 | cButton gridButton; |
---|
5417 | 5648 | cButton boxButton; |
---|
.. | .. |
---|
5444 | 5675 | //JTree jTree; |
---|
5445 | 5676 | private MenuItem lookAtItem; |
---|
5446 | 5677 | private MenuItem lookFromItem; |
---|
5447 | | - private MenuItem switchItem; |
---|
| 5678 | + private MenuItem switchViewItem; |
---|
5448 | 5679 | private MenuItem cutItem; |
---|
5449 | 5680 | private MenuItem undoItem; |
---|
5450 | 5681 | private MenuItem redoItem; |
---|
.. | .. |
---|
5476 | 5707 | private MenuItem pasteLinkItem; |
---|
5477 | 5708 | private MenuItem pasteCloneItem; |
---|
5478 | 5709 | private MenuItem pasteExpandItem; |
---|
5479 | | - private MenuItem clearItem; |
---|
| 5710 | + private MenuItem deleteItem; |
---|
5480 | 5711 | private MenuItem clearAllItem; |
---|
5481 | 5712 | private MenuItem genUVItem; |
---|
5482 | 5713 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5536 | 5767 | private MenuItem frontItem; |
---|
5537 | 5768 | private MenuItem cameraItem; |
---|
5538 | 5769 | private MenuItem compositeItem; |
---|
5539 | | - private MenuItem randomItem; |
---|
| 5770 | + private MenuItem switchItem; |
---|
5540 | 5771 | private MenuItem physicsItem; |
---|
5541 | 5772 | private MenuItem frameselectorItem; |
---|
5542 | 5773 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5610 | 5841 | |
---|
5611 | 5842 | Menu cameraMenu; |
---|
5612 | 5843 | MenuItem editCameraItem; |
---|
5613 | | - MenuItem revertCameraItem; |
---|
| 5844 | + MenuItem restoreCameraItem; |
---|
5614 | 5845 | } |
---|