.. | .. |
---|
150 | 150 | |
---|
151 | 151 | void SetupMenu2(GroupEditor oe) |
---|
152 | 152 | { |
---|
| 153 | + oe.jTree = new cTree(); |
---|
| 154 | + |
---|
153 | 155 | Menu menu; |
---|
154 | 156 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
155 | 157 | //editItem = menu.add(new MenuItem("Edit")); |
---|
.. | .. |
---|
160 | 162 | // redoItem = menu.add(new MenuItem("Redo")); |
---|
161 | 163 | // redoItem.addActionListener(this); |
---|
162 | 164 | // menu.add("-"); |
---|
163 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 165 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
164 | 166 | duplicateItem.addActionListener(this); |
---|
165 | 167 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
166 | 168 | cloneItem.addActionListener(this); |
---|
.. | .. |
---|
176 | 178 | copyItem.addActionListener(this); |
---|
177 | 179 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
178 | 180 | pasteItem.addActionListener(this); |
---|
179 | | - menu.add("-"); |
---|
180 | 181 | |
---|
181 | 182 | menu.add("-"); |
---|
182 | 183 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
.. | .. |
---|
203 | 204 | //zBufferItem.addActionListener(this); |
---|
204 | 205 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
205 | 206 | //normalLensItem.addActionListener(this); |
---|
206 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
207 | | - revertCameraItem.addActionListener(this); |
---|
| 207 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 208 | + restoreCameraItem.addActionListener(this); |
---|
208 | 209 | |
---|
209 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
210 | | - toggleFullScreenItem.addItemListener(this); |
---|
211 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
212 | | - cameraMenu.add("-"); |
---|
| 210 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 211 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 212 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 213 | +// cameraMenu.add("-"); |
---|
| 214 | +// |
---|
| 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); |
---|
213 | 222 | |
---|
214 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
215 | | - toggleTextureItem.addItemListener(this); |
---|
216 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
217 | | - |
---|
218 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
219 | | - toggleSwitchItem.addItemListener(this); |
---|
220 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
221 | | - |
---|
222 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 223 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
223 | 224 | toggleHandleItem.addItemListener(this); |
---|
224 | 225 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
225 | 226 | |
---|
.. | .. |
---|
274 | 275 | { |
---|
275 | 276 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
276 | 277 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
277 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 278 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
278 | 279 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
279 | 280 | oe.cameraMenu.add("-"); |
---|
280 | 281 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
282 | 283 | editLeafItem.addActionListener(this); |
---|
283 | 284 | lookAtItem.addActionListener(this); |
---|
284 | 285 | //lookFromItem.addActinoListener(this); |
---|
285 | | - //switchItem.addActionListener(this); |
---|
| 286 | + //switchViewItem.addActionListener(this); |
---|
286 | 287 | } |
---|
287 | 288 | |
---|
288 | 289 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
327 | 328 | } |
---|
328 | 329 | |
---|
329 | 330 | oe.menuBar.add(menu = new Menu("Group")); |
---|
330 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
331 | | - grabItem.addActionListener(this); |
---|
| 331 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 332 | +// grabItem.addActionListener(this); |
---|
332 | 333 | backItem = menu.add(new MenuItem("Back")); |
---|
333 | 334 | backItem.addActionListener(this); |
---|
334 | 335 | frontItem = menu.add(new MenuItem("Front")); |
---|
335 | 336 | frontItem.addActionListener(this); |
---|
336 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
337 | | - compositeItem.addActionListener(this); |
---|
| 337 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 338 | +// compositeItem.addActionListener(this); |
---|
| 339 | + |
---|
| 340 | + if (Globals.ADVANCED) |
---|
| 341 | + { |
---|
338 | 342 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
339 | 343 | hideItem.addActionListener(this); |
---|
| 344 | + } |
---|
340 | 345 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
341 | 346 | ungroupItem.addActionListener(this); |
---|
342 | | - menu.add("-"); |
---|
343 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
344 | | - randomItem.addActionListener(this); |
---|
| 347 | + |
---|
| 348 | +// menu.add("-"); |
---|
| 349 | +// |
---|
| 350 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 351 | +// switchItem.addActionListener(this); |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
345 | 354 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
346 | 355 | switchGeoItem.addActionListener(this); |
---|
347 | 356 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
.. | .. |
---|
349 | 358 | morphItem = menu.add(new MenuItem("Morph Group")); |
---|
350 | 359 | morphItem.addActionListener(this); |
---|
351 | 360 | |
---|
352 | | - if (Globals.ADVANCED) |
---|
353 | | - { |
---|
354 | 361 | menu.add("-"); |
---|
355 | 362 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
356 | 363 | physicsItem.addActionListener(this); |
---|
.. | .. |
---|
358 | 365 | frameselectorItem.addActionListener(this); |
---|
359 | 366 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
360 | 367 | scriptNodeItem.addActionListener(this); |
---|
361 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
362 | | - cameraItem.addActionListener(this); |
---|
363 | 368 | } |
---|
364 | 369 | |
---|
365 | 370 | oe.menuBar.add(menu = new Menu("Object")); |
---|
366 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
367 | | - textureItem.addActionListener(this); |
---|
| 371 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 372 | +// textureItem.addActionListener(this); |
---|
368 | 373 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
369 | 374 | billboardItem.addActionListener(this); |
---|
370 | 375 | csgItem = menu.add(new MenuItem("CSG")); |
---|
371 | 376 | csgItem.addActionListener(this); |
---|
372 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 377 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
373 | 378 | shadowXItem.addActionListener(this); |
---|
374 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 379 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
375 | 380 | shadowYItem.addActionListener(this); |
---|
376 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 381 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
377 | 382 | shadowZItem.addActionListener(this); |
---|
378 | 383 | if (Globals.ADVANCED) |
---|
379 | 384 | { |
---|
.. | .. |
---|
575 | 580 | oe.radioPanel.add(dummyButton); |
---|
576 | 581 | oe.buttonGroup.add(dummyButton); |
---|
577 | 582 | */ |
---|
| 583 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 584 | + |
---|
| 585 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 586 | + |
---|
578 | 587 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
579 | 588 | |
---|
580 | 589 | //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
581 | 590 | //minButton.setToolTipText("Minimize window"); |
---|
582 | 591 | //minButton.addActionListener(this); |
---|
583 | 592 | |
---|
584 | | - oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 593 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
585 | 594 | maxButton.setToolTipText("Maximize window"); |
---|
586 | 595 | maxButton.addActionListener(this); |
---|
587 | 596 | |
---|
588 | | - oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
589 | 598 | fullButton.setToolTipText("Full-screen window"); |
---|
590 | 599 | fullButton.addActionListener(this); |
---|
591 | 600 | |
---|
592 | | - oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 601 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 603 | + restoreCameraButton.addActionListener(this); |
---|
| 604 | + |
---|
| 605 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
593 | 606 | undoButton.setToolTipText("Undo changes"); |
---|
594 | 607 | undoButton.addActionListener(this); |
---|
| 608 | + undoButton.setEnabled(false); |
---|
595 | 609 | |
---|
596 | | - oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 610 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
597 | 611 | redoButton.setToolTipText("Redo changes"); |
---|
598 | 612 | redoButton.addActionListener(this); |
---|
| 613 | + redoButton.setEnabled(false); |
---|
599 | 614 | |
---|
600 | | - oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 615 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
601 | 616 | saveButton.setToolTipText("Save changes"); |
---|
602 | 617 | saveButton.addActionListener(this); |
---|
603 | 618 | |
---|
604 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 619 | + copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
605 | 620 | liveCB.setToolTipText("Enable animation"); |
---|
606 | 621 | liveCB.addItemListener(this); |
---|
607 | 622 | |
---|
608 | | - oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 623 | + copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
609 | 624 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
610 | 625 | oneStepButton.addActionListener(this); |
---|
611 | 626 | |
---|
612 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 627 | + copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
613 | 628 | fastCB.setToolTipText("Fast mode"); |
---|
614 | 629 | fastCB.addItemListener(this); |
---|
615 | 630 | |
---|
616 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
617 | | - trackCB.setToolTipText("Enable tracking"); |
---|
618 | | - trackCB.addItemListener(this); |
---|
619 | | - |
---|
620 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 631 | + //oe.toolboxPanel.Return(); |
---|
| 632 | + |
---|
| 633 | + copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
621 | 634 | screenfitButton.setToolTipText("Screen fit"); |
---|
622 | 635 | screenfitButton.addActionListener(this); |
---|
| 636 | + |
---|
| 637 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 638 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 639 | +// trackCB.addItemListener(this); |
---|
623 | 640 | |
---|
624 | 641 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
625 | 642 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
631 | 648 | snapobjectButton.setToolTipText("Snap Object"); |
---|
632 | 649 | } |
---|
633 | 650 | |
---|
634 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
635 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
636 | | - flashSelectionButton.addActionListener(this); |
---|
| 651 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
637 | 652 | |
---|
638 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
639 | | - |
---|
640 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 653 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
641 | 654 | twoButton.setToolTipText("Show center view only"); |
---|
642 | 655 | twoButton.addActionListener(this); |
---|
643 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 656 | + this.fullscreenLayout = twoButton; |
---|
| 657 | + |
---|
| 658 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
644 | 659 | fourButton.addActionListener(this); |
---|
645 | 660 | fourButton.setToolTipText("Show left panel only"); |
---|
646 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 661 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
647 | 662 | sixButton.setToolTipText("2-column layout left"); |
---|
648 | 663 | sixButton.addActionListener(this); |
---|
649 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 664 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | 665 | threeButton.setToolTipText("2-column layout right"); |
---|
651 | 666 | threeButton.addActionListener(this); |
---|
652 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 667 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
653 | 668 | sevenButton.setToolTipText("3-column layout"); |
---|
654 | 669 | sevenButton.addActionListener(this); |
---|
655 | 670 | // |
---|
656 | 671 | |
---|
657 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 672 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
658 | 673 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
659 | 674 | rootButton.addActionListener(this); |
---|
660 | 675 | |
---|
661 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 676 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
662 | 677 | closeButton.setToolTipText("Close tab"); |
---|
663 | 678 | closeButton.addActionListener(this); |
---|
664 | 679 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
665 | 680 | //clearButton.addActionListener(this); |
---|
666 | | - |
---|
667 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 681 | + |
---|
| 682 | + // INSERT |
---|
| 683 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 684 | + gridButton.setToolTipText("Create grid"); |
---|
| 685 | + gridButton.addActionListener(this); |
---|
| 686 | + |
---|
| 687 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 688 | + boxButton.setToolTipText("Create box"); |
---|
| 689 | + boxButton.addActionListener(this); |
---|
| 690 | + |
---|
| 691 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 692 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 693 | + sphereButton.addActionListener(this); |
---|
| 694 | + |
---|
| 695 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 696 | + coneButton.setToolTipText("Create cone"); |
---|
| 697 | + coneButton.addActionListener(this); |
---|
| 698 | + |
---|
| 699 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 700 | + torusButton.setToolTipText("Create torus"); |
---|
| 701 | + torusButton.addActionListener(this); |
---|
| 702 | + |
---|
| 703 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 704 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 705 | + superButton.addActionListener(this); |
---|
| 706 | + |
---|
| 707 | + if (Globals.ADVANCED) |
---|
| 708 | + { |
---|
| 709 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 710 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 711 | + kleinButton.addActionListener(this); |
---|
| 712 | + } |
---|
668 | 713 | |
---|
669 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
670 | | - editButton.setToolTipText("Edit selection"); |
---|
| 714 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 715 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 716 | + particlesButton.addActionListener(this); |
---|
| 717 | + |
---|
| 718 | + oe.toolboxPanel.Return(); |
---|
| 719 | + |
---|
| 720 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 721 | + groupButton.setToolTipText("Create group"); |
---|
| 722 | + groupButton.addActionListener(this); |
---|
| 723 | + |
---|
| 724 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 725 | + compositeButton.setToolTipText("Create composite"); |
---|
| 726 | + compositeButton.addActionListener(this); |
---|
| 727 | + |
---|
| 728 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 729 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 730 | + switchButton.addActionListener(this); |
---|
| 731 | + |
---|
| 732 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 733 | + loopButton.setToolTipText("Create loop"); |
---|
| 734 | + loopButton.addActionListener(this); |
---|
| 735 | + |
---|
| 736 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 737 | + textureButton.setToolTipText("Create texture"); |
---|
| 738 | + textureButton.addActionListener(this); |
---|
| 739 | + |
---|
| 740 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 741 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 742 | + overlayButton.addActionListener(this); |
---|
| 743 | + |
---|
| 744 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 745 | + lightButton.setToolTipText("Create light"); |
---|
| 746 | + lightButton.addActionListener(this); |
---|
| 747 | + |
---|
| 748 | + for (int i=6; --i>=0;) |
---|
| 749 | + { |
---|
| 750 | + oe.toolboxPanel.Return(); |
---|
| 751 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 752 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 753 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 754 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 755 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 756 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 757 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 758 | + } |
---|
| 759 | + |
---|
| 760 | + // EDIT panel |
---|
| 761 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 762 | + editButton.setToolTipText("Pin selection controls"); |
---|
671 | 763 | editButton.addActionListener(this); |
---|
672 | 764 | |
---|
673 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
674 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 765 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 766 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
675 | 767 | uneditButton.addActionListener(this); |
---|
676 | 768 | |
---|
677 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
678 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 769 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 770 | + allParamsButton.setToolTipText("Show all controle"); |
---|
679 | 771 | allParamsButton.addActionListener(this); |
---|
680 | 772 | |
---|
681 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 773 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
682 | 774 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
683 | 775 | clearPanelButton.addActionListener(this); |
---|
684 | 776 | |
---|
685 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 777 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
686 | 778 | unselectButton.setToolTipText("Unselect"); |
---|
687 | 779 | unselectButton.addActionListener(this); |
---|
688 | 780 | |
---|
689 | | - commandsPanel.preferredHeight = 1; |
---|
| 781 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 782 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 783 | + flashSelectionButton.addActionListener(this); |
---|
690 | 784 | |
---|
691 | | - oe.treePanel.add(commandsPanel); |
---|
692 | | - oe.treePanel.Return(); |
---|
| 785 | + editCommandsPanel.preferredHeight = 1; |
---|
| 786 | + |
---|
| 787 | + SetPinStates(false); |
---|
| 788 | +// oe.treePanel.add(commandsPanel); |
---|
| 789 | +// oe.treePanel.Return(); |
---|
693 | 790 | |
---|
694 | 791 | // oe.aConstraints.gridx += 1; |
---|
695 | 792 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
706 | 803 | |
---|
707 | 804 | JScrollPane jSP; |
---|
708 | 805 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
709 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 806 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
710 | 807 | ResetModel(); |
---|
711 | 808 | |
---|
712 | 809 | oe.treePanel.add(jSPPanel); |
---|
713 | 810 | oe.treePanel.Return(); |
---|
714 | 811 | |
---|
715 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
716 | | - |
---|
717 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
718 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
719 | | - colorCB.addItemListener(this); |
---|
720 | | - |
---|
721 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
722 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
723 | | - materialCB.addItemListener(this); |
---|
724 | | - |
---|
725 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
726 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
727 | | - textureCB.addItemListener(this); |
---|
728 | | - |
---|
729 | | - copyOptionsPanel.preferredHeight = 1; |
---|
730 | 812 | oe.treePanel.add(copyOptionsPanel); |
---|
731 | 813 | oe.treePanel.Return(); |
---|
732 | 814 | |
---|
.. | .. |
---|
757 | 839 | |
---|
758 | 840 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
759 | 841 | { |
---|
| 842 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 843 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 844 | + colorCB.addItemListener(this); |
---|
| 845 | + |
---|
| 846 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 847 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 848 | + materialCB.addItemListener(this); |
---|
| 849 | + |
---|
| 850 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 851 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 852 | + textureCB.addItemListener(this); |
---|
| 853 | + |
---|
| 854 | + panel.Return(); |
---|
| 855 | + |
---|
760 | 856 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
761 | 857 | boxCB.setToolTipText("Display bounding boxes"); |
---|
762 | 858 | boxCB.addItemListener(this); |
---|
763 | 859 | |
---|
764 | 860 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
765 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 861 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
766 | 862 | zoomBoxCB.addItemListener(this); |
---|
767 | 863 | |
---|
768 | 864 | if (true) // Globals.ADVANCED) |
---|
769 | 865 | { |
---|
770 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
771 | | - supportCB.setToolTipText("Enable rigging"); |
---|
772 | | - supportCB.addItemListener(this); |
---|
| 866 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 867 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 868 | +// supportCB.addItemListener(this); |
---|
| 869 | + |
---|
| 870 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 871 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 872 | + freezeCB.addItemListener(this); |
---|
773 | 873 | |
---|
774 | 874 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
775 | 875 | // localCB.addItemListener(this); |
---|
776 | 876 | |
---|
| 877 | + panel.Return(); |
---|
| 878 | + |
---|
777 | 879 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
778 | 880 | crowdCB.setToolTipText("Used for crowds"); |
---|
779 | 881 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
790 | 892 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
791 | 893 | // speakerMocapCB.addItemListener(this); |
---|
792 | 894 | |
---|
| 895 | + panel.Return(); |
---|
| 896 | + |
---|
793 | 897 | if (false) |
---|
794 | 898 | { |
---|
795 | 899 | // handled in scripts |
---|
.. | .. |
---|
804 | 908 | //constraints.gridy += 1; |
---|
805 | 909 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
806 | 910 | smoothfocusCB.addItemListener(this); |
---|
| 911 | + panel.Return(); |
---|
807 | 912 | } |
---|
808 | 913 | |
---|
809 | 914 | //constraints.gridx += 1; |
---|
810 | 915 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
811 | 916 | // debugCB.addItemListener(this); |
---|
812 | 917 | |
---|
| 918 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 919 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 920 | + trackCB.addItemListener(this); |
---|
| 921 | + |
---|
813 | 922 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 923 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
814 | 924 | oeilCB.addItemListener(this); |
---|
815 | 925 | |
---|
| 926 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 927 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 928 | + shadowCB.addItemListener(this); |
---|
| 929 | + |
---|
| 930 | + panel.Return(); |
---|
| 931 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 932 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 933 | + toggleTextureCB.addItemListener(this); |
---|
| 934 | + |
---|
| 935 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 936 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 937 | + toggleSwitchCB.addItemListener(this); |
---|
| 938 | + |
---|
| 939 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 940 | + autosaveCB.setToolTipText("On structure change"); |
---|
| 941 | + autosaveCB.addItemListener(this); |
---|
| 942 | + |
---|
| 943 | + panel.Return(); |
---|
| 944 | + if (Globals.ADVANCED) |
---|
| 945 | + { |
---|
816 | 946 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
817 | 947 | lookAtCB.setToolTipText("Look-at target"); |
---|
818 | 948 | lookAtCB.addItemListener(this); |
---|
| 949 | + } |
---|
819 | 950 | |
---|
820 | 951 | } |
---|
821 | 952 | |
---|
822 | 953 | cGridBag fill = new cGridBag(); |
---|
823 | | - |
---|
824 | 954 | fill.preferredHeight = 200; |
---|
| 955 | + cGridBag fill2 = new cGridBag(); |
---|
| 956 | + fill2.preferredHeight = 200; |
---|
| 957 | + cGridBag fill3 = new cGridBag(); |
---|
| 958 | + fill3.preferredHeight = 200; |
---|
825 | 959 | |
---|
826 | 960 | panel.add(fill); |
---|
| 961 | + panel.add(fill2); |
---|
| 962 | + panel.add(fill3); |
---|
827 | 963 | |
---|
828 | 964 | } |
---|
829 | 965 | |
---|
830 | 966 | void EditObject(Object3D obj) |
---|
831 | 967 | { |
---|
832 | 968 | cRadio radioButton = new cRadio(obj.name); |
---|
| 969 | + |
---|
| 970 | + // Patch to avoid bug with transparency. |
---|
| 971 | + radioButton.hadMaterial = obj.material != null; |
---|
| 972 | + if (!radioButton.hadMaterial) |
---|
| 973 | + { |
---|
| 974 | + obj.material = new cMaterial(); |
---|
| 975 | + } |
---|
| 976 | + |
---|
833 | 977 | radioButton.SetObject(obj); |
---|
834 | 978 | radioButton.layout = sevenButton; |
---|
835 | 979 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
851 | 995 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
852 | 996 | } |
---|
853 | 997 | |
---|
854 | | - JCheckBox liveCB; |
---|
855 | | - JCheckBox supportCB; |
---|
856 | | - JCheckBox localCB; |
---|
857 | | - JCheckBox crowdCB; |
---|
858 | | - JCheckBox smoothCB; |
---|
859 | | - JCheckBox fastCB; |
---|
860 | | - JCheckBox slowCB; |
---|
861 | | - JCheckBox boxCB; |
---|
862 | | - JCheckBox zoomBoxCB; |
---|
863 | | - JCheckBox trackCB; |
---|
864 | | - JCheckBox smoothfocusCB; |
---|
| 998 | + cToggleButton liveCB; |
---|
| 999 | + cCheckBox supportCB; |
---|
| 1000 | + cCheckBox localCB; |
---|
| 1001 | + cCheckBox crowdCB; |
---|
| 1002 | + cCheckBox smoothCB; |
---|
| 1003 | + cToggleButton fastCB; |
---|
| 1004 | + cCheckBox slowCB; |
---|
| 1005 | + cCheckBox boxCB; |
---|
| 1006 | + cCheckBox zoomBoxCB; |
---|
| 1007 | + cCheckBox freezeCB; |
---|
| 1008 | + //cToggleButton trackCB; |
---|
| 1009 | + cCheckBox trackCB; |
---|
| 1010 | + cCheckBox smoothfocusCB; |
---|
865 | 1011 | // JCheckBox speakerMocapCB; |
---|
866 | | - JCheckBox speakerCameraCB; |
---|
867 | | - JCheckBox speakerFocusCB; |
---|
868 | | - JCheckBox debugCB; |
---|
869 | | - JCheckBox oeilCB; |
---|
870 | | - JCheckBox lookAtCB; |
---|
| 1012 | + cCheckBox speakerCameraCB; |
---|
| 1013 | + cCheckBox speakerFocusCB; |
---|
| 1014 | + cCheckBox debugCB; |
---|
| 1015 | + |
---|
| 1016 | + cCheckBox oeilCB; |
---|
| 1017 | + cCheckBox shadowCB; |
---|
| 1018 | + cCheckBox autosaveCB; |
---|
| 1019 | + cCheckBox lookAtCB; |
---|
871 | 1020 | |
---|
872 | 1021 | // static int COLOR = 1; |
---|
873 | 1022 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
875 | 1024 | |
---|
876 | 1025 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
877 | 1026 | |
---|
878 | | - JCheckBox colorCB; |
---|
879 | | - JCheckBox materialCB; |
---|
880 | | - JCheckBox textureCB; |
---|
| 1027 | + cCheckBox colorCB; |
---|
| 1028 | + cCheckBox materialCB; |
---|
| 1029 | + cCheckBox textureCB; |
---|
881 | 1030 | |
---|
882 | 1031 | public void itemStateChanged(ItemEvent e) |
---|
883 | 1032 | { |
---|
.. | .. |
---|
970 | 1119 | { |
---|
971 | 1120 | cameraView.ToggleOeil(); |
---|
972 | 1121 | } |
---|
| 1122 | + else if(e.getSource() == shadowCB) |
---|
| 1123 | + { |
---|
| 1124 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1125 | + } |
---|
| 1126 | + else if(e.getSource() == freezeCB) |
---|
| 1127 | + { |
---|
| 1128 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1129 | + } |
---|
| 1130 | + else if(e.getSource() == autosaveCB) |
---|
| 1131 | + { |
---|
| 1132 | + Globals.SAVEONMAKE ^= true; |
---|
| 1133 | + } |
---|
973 | 1134 | else if(e.getSource() == lookAtCB) |
---|
974 | 1135 | { |
---|
975 | 1136 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
986 | 1147 | |
---|
987 | 1148 | /**/ |
---|
988 | 1149 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
989 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1150 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1151 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
990 | 1152 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
991 | 1153 | // We can't move the root node or an empty selection |
---|
992 | 1154 | return; |
---|
.. | .. |
---|
1103 | 1265 | |
---|
1104 | 1266 | assert target == objEditor.jTree; |
---|
1105 | 1267 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1268 | + Object3D destinationLeaf; |
---|
1106 | 1269 | try { |
---|
1107 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1270 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1108 | 1271 | } catch (Exception e) { |
---|
1109 | 1272 | System.out.println("destinationPath : " + destinationPath); |
---|
1110 | 1273 | return; |
---|
1111 | 1274 | } |
---|
1112 | 1275 | |
---|
1113 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1276 | + for (int i=group.selection.size(); --i>=0;) |
---|
1114 | 1277 | { |
---|
| 1278 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1279 | + |
---|
| 1280 | + // Cannot move into itself |
---|
| 1281 | + if (child == destinationLeaf) |
---|
| 1282 | + return; |
---|
| 1283 | + } |
---|
| 1284 | + |
---|
| 1285 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1286 | +// { |
---|
1115 | 1287 | loadClipboard(true); |
---|
1116 | 1288 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
1117 | 1289 | pasteInto(false, false); |
---|
1118 | | - } else { |
---|
1119 | | - loadClipboard(false); |
---|
1120 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1121 | | - pasteInto(false, false); // true); // ??? |
---|
1122 | | - } |
---|
| 1290 | +// } else { |
---|
| 1291 | +// loadClipboard(false); |
---|
| 1292 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1293 | +// pasteInto(false, false); // true); // ??? |
---|
| 1294 | +// } |
---|
1123 | 1295 | } |
---|
1124 | 1296 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1125 | 1297 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1224 | 1396 | { |
---|
1225 | 1397 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1226 | 1398 | //heightFieldItem.addActionListener(this); |
---|
1227 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1228 | | - gridItem.addActionListener(this); |
---|
1229 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1230 | | - rectoidItem.addActionListener(this); |
---|
1231 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1232 | | - ellipsoidItem.addActionListener(this); |
---|
1233 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1234 | | - coneItem.addActionListener(this); |
---|
1235 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1236 | | - torusItem.addActionListener(this); |
---|
1237 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1238 | | - superItem.addActionListener(this); |
---|
| 1399 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1400 | +// gridItem.addActionListener(this); |
---|
| 1401 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1402 | +// rectoidItem.addActionListener(this); |
---|
| 1403 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1404 | +// ellipsoidItem.addActionListener(this); |
---|
| 1405 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1406 | +// coneItem.addActionListener(this); |
---|
| 1407 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1408 | +// torusItem.addActionListener(this); |
---|
| 1409 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1410 | +// superItem.addActionListener(this); |
---|
| 1411 | + |
---|
| 1412 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1413 | + cameraItem.addActionListener(this); |
---|
| 1414 | + |
---|
| 1415 | + if (!Globals.ADVANCED) |
---|
| 1416 | + { |
---|
1239 | 1417 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1240 | 1418 | kleinItem.addActionListener(this); |
---|
1241 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1242 | | - particleItem.addActionListener(this); |
---|
| 1419 | + } |
---|
| 1420 | + |
---|
| 1421 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1422 | +// particleItem.addActionListener(this); |
---|
1243 | 1423 | if (Globals.ADVANCED) |
---|
1244 | 1424 | { |
---|
1245 | 1425 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1265 | 1445 | } |
---|
1266 | 1446 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1267 | 1447 | bezierItem.addActionListener(this); |
---|
1268 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1269 | | - overlayItem.addActionListener(this); |
---|
1270 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1271 | | - lightItem.addActionListener(this); |
---|
| 1448 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1449 | +// overlayItem.addActionListener(this); |
---|
| 1450 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1451 | +// lightItem.addActionListener(this); |
---|
1272 | 1452 | menu.add("-"); |
---|
1273 | 1453 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1274 | 1454 | //superLoopItem.addActionListener(this); |
---|
1275 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1276 | | - loopItem.addActionListener(this); |
---|
| 1455 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1456 | +// loopItem.addActionListener(this); |
---|
1277 | 1457 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1278 | 1458 | doubleItem.addActionListener(this); |
---|
1279 | 1459 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1454 | 1634 | shadow.material = new cMaterial(obj.material); |
---|
1455 | 1635 | shadow.material.diffuse = 0.0001f; |
---|
1456 | 1636 | shadow.material.specular = 0.0001f; |
---|
| 1637 | + //shadow.projectedVertices[1].x = 300; |
---|
1457 | 1638 | |
---|
1458 | 1639 | makeSomething(shadow); |
---|
1459 | 1640 | } |
---|
| 1641 | + |
---|
| 1642 | + private void ClearUnpinned() |
---|
| 1643 | + { |
---|
| 1644 | + //for (Object3D obj : listUI) |
---|
| 1645 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1646 | + { |
---|
| 1647 | + Object3D obj = listUI.elementAt(i); |
---|
| 1648 | + if (!obj.pinned) |
---|
| 1649 | + { |
---|
| 1650 | + obj.CloseUI(); |
---|
| 1651 | + listUI.remove(i); |
---|
| 1652 | + } |
---|
| 1653 | + } |
---|
| 1654 | + } |
---|
1460 | 1655 | |
---|
1461 | 1656 | /** |
---|
1462 | 1657 | * applyExample |
---|
.. | .. |
---|
1701 | 1896 | { |
---|
1702 | 1897 | ScreenFit(); |
---|
1703 | 1898 | } else |
---|
1704 | | - if (source == switchItem) |
---|
| 1899 | + if (source == switchViewItem) |
---|
1705 | 1900 | { |
---|
1706 | 1901 | cVector v1 = new cVector(); |
---|
1707 | 1902 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1710 | 1905 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1711 | 1906 | objEditor.cameraView.repaint(); |
---|
1712 | 1907 | } else |
---|
1713 | | - if (source == rectoidItem) |
---|
| 1908 | + if (source == rectoidItem || source == boxButton) |
---|
1714 | 1909 | { |
---|
1715 | 1910 | makeSomething(new Box()); |
---|
1716 | 1911 | } else |
---|
1717 | | - if (source == particleItem) |
---|
| 1912 | + if (source == particleItem || source == particlesButton) |
---|
1718 | 1913 | { |
---|
1719 | 1914 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1720 | 1915 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1793 | 1988 | |
---|
1794 | 1989 | makeSomething(obj); |
---|
1795 | 1990 | } else |
---|
1796 | | - if (source == gridItem) |
---|
| 1991 | + if (source == gridItem || source == gridButton) |
---|
1797 | 1992 | { |
---|
1798 | 1993 | makeSomething(new Grid()); |
---|
1799 | 1994 | } else |
---|
1800 | | - if (source == ellipsoidItem) |
---|
| 1995 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1801 | 1996 | { |
---|
1802 | 1997 | makeSomething(new Sphere()); |
---|
1803 | 1998 | } else |
---|
1804 | | - if (source == coneItem) |
---|
| 1999 | + if (source == coneItem || source == coneButton) |
---|
1805 | 2000 | { |
---|
1806 | 2001 | makeSomething(new Cone()); |
---|
1807 | 2002 | } else |
---|
1808 | | - if (source == torusItem) |
---|
| 2003 | + if (source == torusItem || source == torusButton) |
---|
1809 | 2004 | { |
---|
1810 | 2005 | makeSomething(new Torus()); |
---|
1811 | 2006 | } else |
---|
1812 | | - if (source == superItem) |
---|
| 2007 | + if (source == superItem || source == superButton) |
---|
1813 | 2008 | { |
---|
1814 | 2009 | makeSomething(new Superellipsoid()); |
---|
1815 | 2010 | } else |
---|
1816 | | - if (source == kleinItem) |
---|
| 2011 | + if (source == kleinItem || source == kleinButton) |
---|
1817 | 2012 | { |
---|
1818 | 2013 | makeSomething(new Klein()); |
---|
1819 | 2014 | } else |
---|
.. | .. |
---|
1833 | 2028 | { |
---|
1834 | 2029 | makeSomething(new BezierSurface()); |
---|
1835 | 2030 | } else |
---|
1836 | | - if (source == overlayItem) |
---|
| 2031 | + if (source == overlayItem || source == overlayButton) |
---|
1837 | 2032 | { |
---|
1838 | 2033 | /* |
---|
1839 | 2034 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1881 | 2076 | s.setup(); |
---|
1882 | 2077 | makeSomething(s); |
---|
1883 | 2078 | } else |
---|
1884 | | - if (source == lightItem) |
---|
| 2079 | + if (source == lightItem || source == lightButton) |
---|
1885 | 2080 | { |
---|
1886 | 2081 | makeSomething(new Light()); |
---|
1887 | 2082 | } else |
---|
.. | .. |
---|
1931 | 2126 | |
---|
1932 | 2127 | group(g); |
---|
1933 | 2128 | } else |
---|
1934 | | - if (source == loopItem) |
---|
| 2129 | + if (source == loopItem || source == loopButton) |
---|
1935 | 2130 | { |
---|
1936 | 2131 | Composite csg = new GroupLeaf(); |
---|
1937 | 2132 | csg.count = 5; |
---|
1938 | 2133 | group(csg); |
---|
1939 | | - Composite child = new cGroup(); |
---|
| 2134 | + Composite child = new cGroup("Branch"); |
---|
1940 | 2135 | csg.addChild(child); |
---|
1941 | 2136 | child.addChild(csg); |
---|
1942 | 2137 | } else |
---|
1943 | 2138 | if (source == doubleItem) |
---|
1944 | 2139 | { |
---|
1945 | | - Composite csg = new GroupLeaf(); |
---|
| 2140 | + Composite csg = new GroupLeaf("Fork"); |
---|
1946 | 2141 | csg.count = 5; |
---|
1947 | 2142 | group(csg); |
---|
1948 | | - Composite child = new cGroup(); |
---|
| 2143 | + Composite child = new cGroup("Branch A"); |
---|
1949 | 2144 | csg.addChild(child); |
---|
1950 | 2145 | child.addChild(csg); |
---|
1951 | | - child = new cGroup(); |
---|
| 2146 | + child = new cGroup("Branch B"); |
---|
1952 | 2147 | csg.addChild(child); |
---|
1953 | 2148 | child.addChild(csg); |
---|
1954 | 2149 | } else |
---|
1955 | 2150 | if (source == tripleItem) |
---|
1956 | 2151 | { |
---|
1957 | | - Composite csg = new GroupLeaf(); |
---|
| 2152 | + Composite csg = new GroupLeaf("Trident"); |
---|
1958 | 2153 | csg.count = 4; |
---|
1959 | 2154 | group(csg); |
---|
1960 | 2155 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2421 | 2616 | { |
---|
2422 | 2617 | ClearSelection(true); |
---|
2423 | 2618 | } else |
---|
2424 | | - if (source == grabItem) |
---|
| 2619 | + if (source == grabItem || source == groupButton) |
---|
2425 | 2620 | { |
---|
2426 | | - group(new cGroup(), true); |
---|
| 2621 | + group(new cGroup(), false); // true); |
---|
2427 | 2622 | } else |
---|
2428 | 2623 | if (source == hideItem) |
---|
2429 | 2624 | { |
---|
.. | .. |
---|
2441 | 2636 | { |
---|
2442 | 2637 | makeSomething(new Camera()); |
---|
2443 | 2638 | } else |
---|
2444 | | - if (source == compositeItem) |
---|
| 2639 | + if (source == compositeItem || source == compositeButton) |
---|
2445 | 2640 | { |
---|
2446 | 2641 | group(new Composite()); |
---|
2447 | 2642 | } else |
---|
2448 | | - if (source == randomItem) |
---|
| 2643 | + if (source == switchItem || source == switchButton) |
---|
2449 | 2644 | { |
---|
2450 | 2645 | RandomNode random = new RandomNode(); |
---|
2451 | 2646 | group(random); |
---|
.. | .. |
---|
2547 | 2742 | { |
---|
2548 | 2743 | group(new cLinker()); |
---|
2549 | 2744 | } else |
---|
2550 | | - if (source == textureItem) |
---|
| 2745 | + if (source == textureItem || source == textureButton) |
---|
2551 | 2746 | { |
---|
2552 | 2747 | group(new TextureNode()); |
---|
2553 | 2748 | } else |
---|
.. | .. |
---|
2567 | 2762 | { |
---|
2568 | 2763 | CastShadow(2); |
---|
2569 | 2764 | } else |
---|
2570 | | - if (source == ungroupItem) |
---|
| 2765 | + if (source == ungroupItem || source == ungroupButton) |
---|
2571 | 2766 | { |
---|
2572 | | - //ungroup(); |
---|
| 2767 | + boolean hasRoot = false; |
---|
| 2768 | + |
---|
2573 | 2769 | for (int i=0; i<group.selection.size(); i++) |
---|
2574 | 2770 | { |
---|
2575 | | - Ungroup(group.selection.get(i)); |
---|
| 2771 | + if (group.selection.get(i) == group) |
---|
| 2772 | + { |
---|
| 2773 | + hasRoot = true; |
---|
| 2774 | + break; |
---|
| 2775 | + } |
---|
2576 | 2776 | } |
---|
2577 | 2777 | |
---|
2578 | | - ClearSelection(false); |
---|
2579 | | - |
---|
2580 | | - refreshContents(); |
---|
| 2778 | + if (!hasRoot) |
---|
| 2779 | + { |
---|
| 2780 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2781 | + { |
---|
| 2782 | + Ungroup(group.selection.get(i)); |
---|
| 2783 | + } |
---|
| 2784 | + |
---|
| 2785 | + ClearSelection(false); |
---|
| 2786 | + |
---|
| 2787 | + refreshContents(); |
---|
| 2788 | + } |
---|
2581 | 2789 | } else |
---|
2582 | 2790 | if (source == genUVItem) |
---|
2583 | 2791 | { |
---|
.. | .. |
---|
2905 | 3113 | if (source == twoButton) |
---|
2906 | 3114 | { |
---|
2907 | 3115 | radio.layout = twoButton; |
---|
| 3116 | + |
---|
| 3117 | + if (CameraPane.FULLSCREEN) |
---|
| 3118 | + fullscreenLayout = radio.layout; |
---|
| 3119 | + |
---|
2908 | 3120 | // bug |
---|
2909 | 3121 | //gridPanel.setDividerLocation(1.0); |
---|
2910 | 3122 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2960 | 3172 | { |
---|
2961 | 3173 | radio.layout = threeButton; |
---|
2962 | 3174 | |
---|
| 3175 | + if (CameraPane.FULLSCREEN) |
---|
| 3176 | + fullscreenLayout = radio.layout; |
---|
| 3177 | + |
---|
2963 | 3178 | // bigThree.remove(scenePanel); |
---|
2964 | 3179 | // bigThree.remove(centralPanel); |
---|
2965 | 3180 | // bigThree.remove(XYZPanel); |
---|
.. | .. |
---|
2998 | 3213 | { |
---|
2999 | 3214 | radio.layout = fourButton; |
---|
3000 | 3215 | |
---|
| 3216 | + if (CameraPane.FULLSCREEN) |
---|
| 3217 | + fullscreenLayout = radio.layout; |
---|
| 3218 | + |
---|
3001 | 3219 | // bigThree.remove(scenePanel); |
---|
3002 | 3220 | // bigThree.remove(centralPanel); |
---|
3003 | 3221 | // bigThree.remove(XYZPanel); |
---|
.. | .. |
---|
3034 | 3252 | if (source == sixButton) |
---|
3035 | 3253 | { |
---|
3036 | 3254 | radio.layout = sixButton; |
---|
| 3255 | + |
---|
| 3256 | + if (CameraPane.FULLSCREEN) |
---|
| 3257 | + fullscreenLayout = radio.layout; |
---|
3037 | 3258 | |
---|
3038 | 3259 | // bigThree.remove(scenePanel); |
---|
3039 | 3260 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3072 | 3293 | if (source == sevenButton) |
---|
3073 | 3294 | { |
---|
3074 | 3295 | radio.layout = sevenButton; |
---|
| 3296 | + |
---|
| 3297 | + if (CameraPane.FULLSCREEN) |
---|
| 3298 | + fullscreenLayout = radio.layout; |
---|
3075 | 3299 | |
---|
3076 | 3300 | // bigThree.remove(scenePanel); |
---|
3077 | 3301 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3128 | 3352 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3129 | 3353 | { |
---|
3130 | 3354 | ab = (cRadio)e.nextElement(); |
---|
3131 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3355 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3132 | 3356 | { |
---|
| 3357 | + // Patch to avoid bug with transparency. |
---|
| 3358 | + if (!ab.hadMaterial) |
---|
| 3359 | + { |
---|
| 3360 | + ab.object.material = null; |
---|
| 3361 | + } |
---|
| 3362 | + |
---|
3133 | 3363 | buttonGroup.remove(ab); |
---|
3134 | 3364 | radioPanel.remove(ab); |
---|
3135 | 3365 | |
---|
3136 | | - ab.GetObject().editWindow = null; |
---|
| 3366 | + //ab.GetObject().editWindow = null; |
---|
| 3367 | + ab.GetObject().manipWindow = null; |
---|
3137 | 3368 | // ab.GetObject().objectUI = null; // ????????? |
---|
3138 | 3369 | |
---|
3139 | 3370 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
.. | .. |
---|
3146 | 3377 | } else |
---|
3147 | 3378 | if (source == editItem || source == editButton) |
---|
3148 | 3379 | { |
---|
| 3380 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3381 | + { |
---|
| 3382 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3383 | + child.pinned = true; |
---|
| 3384 | + } |
---|
| 3385 | + |
---|
3149 | 3386 | EditSelection(false); |
---|
3150 | 3387 | } else |
---|
3151 | 3388 | if (source == uneditButton) |
---|
.. | .. |
---|
3155 | 3392 | Object3D child = (Object3D)e.nextElement(); |
---|
3156 | 3393 | if(child.editWindow != null) |
---|
3157 | 3394 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3395 | + child.pinned = false; |
---|
3158 | 3396 | child.CloseUI(); |
---|
3159 | 3397 | listUI.remove(child); |
---|
3160 | 3398 | |
---|
.. | .. |
---|
3171 | 3409 | //copy.ClearUI(); |
---|
3172 | 3410 | for (Object3D obj : listUI) |
---|
3173 | 3411 | { |
---|
| 3412 | + obj.pinned = false; |
---|
3174 | 3413 | obj.CloseUI(); |
---|
3175 | 3414 | } |
---|
3176 | 3415 | listUI.clear(); |
---|
.. | .. |
---|
3180 | 3419 | { |
---|
3181 | 3420 | assert(copy == group); |
---|
3182 | 3421 | |
---|
3183 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3422 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3184 | 3423 | |
---|
3185 | 3424 | for (Object3D obj : listUI) |
---|
3186 | 3425 | { |
---|
.. | .. |
---|
3247 | 3486 | |
---|
3248 | 3487 | // fix "+" issue |
---|
3249 | 3488 | //group.editWindow = this; |
---|
| 3489 | + group.manipWindow = this; |
---|
3250 | 3490 | |
---|
3251 | 3491 | /* |
---|
3252 | 3492 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3254 | 3494 | currentLayout = sevenButton; |
---|
3255 | 3495 | */ |
---|
3256 | 3496 | radio.layout.doClick(); |
---|
| 3497 | + |
---|
| 3498 | + ClearUnpinned(); |
---|
| 3499 | + SetPinStates(group.selection.size() > 0); |
---|
| 3500 | + if (group.selection.size() == 1) |
---|
| 3501 | + EditSelection(false); |
---|
3257 | 3502 | keepparent = group.parent; |
---|
3258 | 3503 | // PARENT = NULL or not??? |
---|
3259 | 3504 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
3267 | 3512 | cameraView.ProtectCamera(); |
---|
3268 | 3513 | cameraView.repaint(); |
---|
3269 | 3514 | return; |
---|
3270 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3515 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3271 | 3516 | { |
---|
3272 | 3517 | cameraView.RevertCamera(); |
---|
3273 | 3518 | cameraView.repaint(); |
---|
.. | .. |
---|
4321 | 4566 | // } |
---|
4322 | 4567 | // } |
---|
4323 | 4568 | |
---|
4324 | | - static boolean allparams = true; |
---|
4325 | | - |
---|
4326 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4327 | | - |
---|
4328 | 4569 | void EditSelection(boolean newWindow) |
---|
4329 | 4570 | { |
---|
4330 | 4571 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
4332 | 4573 | { |
---|
4333 | 4574 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4334 | 4575 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4335 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4576 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4336 | 4577 | |
---|
4337 | 4578 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4338 | 4579 | if(elem != group || !newWindow) |
---|
.. | .. |
---|
4417 | 4658 | //new Exception().printStackTrace(); |
---|
4418 | 4659 | |
---|
4419 | 4660 | freezemodel = true; |
---|
4420 | | - |
---|
| 4661 | + ClearUnpinned(); |
---|
| 4662 | + |
---|
4421 | 4663 | /**/ |
---|
4422 | 4664 | //switch (event.id) |
---|
4423 | 4665 | { |
---|
.. | .. |
---|
4450 | 4692 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4451 | 4693 | // a camera |
---|
4452 | 4694 | { |
---|
4453 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4695 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
4454 | 4696 | { |
---|
4455 | 4697 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4456 | 4698 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4459 | 4701 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4460 | 4702 | } |
---|
4461 | 4703 | |
---|
| 4704 | + if (tps != null && tps.length == 1) |
---|
| 4705 | + { |
---|
| 4706 | + EditSelection(false); |
---|
| 4707 | + } |
---|
| 4708 | + |
---|
| 4709 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4710 | + |
---|
4462 | 4711 | refreshContents(); |
---|
4463 | 4712 | //return true; |
---|
4464 | 4713 | } |
---|
.. | .. |
---|
4468 | 4717 | freezemodel = false; |
---|
4469 | 4718 | } |
---|
4470 | 4719 | |
---|
| 4720 | + void SetPinStates(boolean enabled) |
---|
| 4721 | + { |
---|
| 4722 | + editButton.setEnabled(enabled); |
---|
| 4723 | + uneditButton.setEnabled(enabled); |
---|
| 4724 | + unselectButton.setEnabled(enabled); |
---|
| 4725 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4726 | + } |
---|
| 4727 | + |
---|
4471 | 4728 | void refreshContents(boolean cp) |
---|
4472 | 4729 | { |
---|
4473 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 4730 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4731 | + if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
4474 | 4732 | { |
---|
4475 | 4733 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4476 | 4734 | |
---|
.. | .. |
---|
4569 | 4827 | |
---|
4570 | 4828 | if (cut) |
---|
4571 | 4829 | { |
---|
| 4830 | + if (Globals.SAVEONMAKE) |
---|
4572 | 4831 | Save(); |
---|
4573 | 4832 | //int indices[] = jList.getSelectedIndices(); |
---|
4574 | 4833 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
5287 | 5546 | cButton clearpanelButton; |
---|
5288 | 5547 | cButton unselectButton; |
---|
5289 | 5548 | |
---|
5290 | | - cButton minButton; |
---|
5291 | | - cButton maxButton; |
---|
5292 | | - cButton fullButton; |
---|
5293 | | - cButton undoButton; |
---|
5294 | | - cButton redoButton; |
---|
| 5549 | + cButton restoreCameraButton; |
---|
| 5550 | + |
---|
5295 | 5551 | cButton saveButton; |
---|
5296 | 5552 | cButton oneStepButton; |
---|
| 5553 | + |
---|
| 5554 | + cButton groupButton; |
---|
| 5555 | + cButton ungroupButton; |
---|
| 5556 | + cButton compositeButton; |
---|
| 5557 | + cButton switchButton; |
---|
| 5558 | + cButton loopButton; |
---|
| 5559 | + cButton textureButton; |
---|
| 5560 | + |
---|
| 5561 | + cButton gridButton; |
---|
| 5562 | + cButton boxButton; |
---|
| 5563 | + cButton sphereButton; |
---|
| 5564 | + cButton coneButton; |
---|
| 5565 | + cButton torusButton; |
---|
| 5566 | + cButton superButton; |
---|
| 5567 | + cButton kleinButton; |
---|
| 5568 | + cButton particlesButton; |
---|
| 5569 | + cButton overlayButton; |
---|
| 5570 | + cButton lightButton; |
---|
5297 | 5571 | |
---|
5298 | 5572 | cButton screenfitButton; |
---|
5299 | 5573 | cButton screenfitpointButton; |
---|
.. | .. |
---|
5315 | 5589 | //JTree jTree; |
---|
5316 | 5590 | private MenuItem lookAtItem; |
---|
5317 | 5591 | private MenuItem lookFromItem; |
---|
5318 | | - private MenuItem switchItem; |
---|
| 5592 | + private MenuItem switchViewItem; |
---|
5319 | 5593 | private MenuItem cutItem; |
---|
5320 | 5594 | private MenuItem undoItem; |
---|
5321 | 5595 | private MenuItem redoItem; |
---|
5322 | | - private MenuItem duplicateItem; |
---|
| 5596 | + private JMenuItem duplicateItem; |
---|
5323 | 5597 | private MenuItem cloneItem; |
---|
5324 | 5598 | private MenuItem cloneSupportItem; |
---|
5325 | 5599 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5407 | 5681 | private MenuItem frontItem; |
---|
5408 | 5682 | private MenuItem cameraItem; |
---|
5409 | 5683 | private MenuItem compositeItem; |
---|
5410 | | - private MenuItem randomItem; |
---|
| 5684 | + private MenuItem switchItem; |
---|
5411 | 5685 | private MenuItem physicsItem; |
---|
5412 | 5686 | private MenuItem frameselectorItem; |
---|
5413 | 5687 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5481 | 5755 | |
---|
5482 | 5756 | Menu cameraMenu; |
---|
5483 | 5757 | MenuItem editCameraItem; |
---|
5484 | | - MenuItem revertCameraItem; |
---|
| 5758 | + MenuItem restoreCameraItem; |
---|
5485 | 5759 | } |
---|