.. | .. |
---|
84 | 84 | |
---|
85 | 85 | void CloneSelection(boolean supports) |
---|
86 | 86 | { |
---|
| 87 | + if (Globals.SAVEONMAKE) |
---|
| 88 | + Save(); |
---|
| 89 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 90 | + Globals.SAVEONMAKE = false; |
---|
87 | 91 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 92 | //Object3D obj; |
---|
89 | 93 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 98 | |
---|
95 | 99 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 100 | } |
---|
| 101 | + Globals.SAVEONMAKE = keep; |
---|
97 | 102 | } |
---|
98 | 103 | |
---|
99 | 104 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
150 | 155 | |
---|
151 | 156 | void SetupMenu2(GroupEditor oe) |
---|
152 | 157 | { |
---|
| 158 | + oe.jTree = new cTree(); |
---|
| 159 | + |
---|
153 | 160 | Menu menu; |
---|
154 | 161 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
155 | 162 | //editItem = menu.add(new MenuItem("Edit")); |
---|
.. | .. |
---|
160 | 167 | // redoItem = menu.add(new MenuItem("Redo")); |
---|
161 | 168 | // redoItem.addActionListener(this); |
---|
162 | 169 | // menu.add("-"); |
---|
163 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 170 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
164 | 171 | duplicateItem.addActionListener(this); |
---|
165 | 172 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
166 | 173 | cloneItem.addActionListener(this); |
---|
.. | .. |
---|
176 | 183 | copyItem.addActionListener(this); |
---|
177 | 184 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
178 | 185 | pasteItem.addActionListener(this); |
---|
179 | | - menu.add("-"); |
---|
180 | 186 | |
---|
181 | 187 | menu.add("-"); |
---|
182 | 188 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
.. | .. |
---|
203 | 209 | //zBufferItem.addActionListener(this); |
---|
204 | 210 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
205 | 211 | //normalLensItem.addActionListener(this); |
---|
206 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
207 | | - revertCameraItem.addActionListener(this); |
---|
| 212 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 213 | + restoreCameraItem.addActionListener(this); |
---|
208 | 214 | |
---|
209 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
210 | | - toggleFullScreenItem.addItemListener(this); |
---|
211 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
212 | | - cameraMenu.add("-"); |
---|
| 215 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 216 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 217 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 218 | +// cameraMenu.add("-"); |
---|
| 219 | +// |
---|
| 220 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 221 | +// toggleTextureItem.addItemListener(this); |
---|
| 222 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 223 | +// |
---|
| 224 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 225 | +// toggleSwitchItem.addItemListener(this); |
---|
| 226 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
213 | 227 | |
---|
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")); |
---|
| 228 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
223 | 229 | toggleHandleItem.addItemListener(this); |
---|
224 | 230 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
225 | 231 | |
---|
.. | .. |
---|
246 | 252 | |
---|
247 | 253 | cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
248 | 254 | toggleDebugItem.addItemListener(this); |
---|
249 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 255 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
250 | 256 | |
---|
251 | 257 | cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
252 | 258 | toggleFrustumItem.addItemListener(this); |
---|
.. | .. |
---|
274 | 280 | { |
---|
275 | 281 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
276 | 282 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
277 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 283 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
278 | 284 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
279 | 285 | oe.cameraMenu.add("-"); |
---|
280 | 286 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
282 | 288 | editLeafItem.addActionListener(this); |
---|
283 | 289 | lookAtItem.addActionListener(this); |
---|
284 | 290 | //lookFromItem.addActinoListener(this); |
---|
285 | | - //switchItem.addActionListener(this); |
---|
| 291 | + //switchViewItem.addActionListener(this); |
---|
286 | 292 | } |
---|
287 | 293 | |
---|
288 | 294 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
327 | 333 | } |
---|
328 | 334 | |
---|
329 | 335 | oe.menuBar.add(menu = new Menu("Group")); |
---|
330 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
331 | | - grabItem.addActionListener(this); |
---|
| 336 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 337 | +// grabItem.addActionListener(this); |
---|
332 | 338 | backItem = menu.add(new MenuItem("Back")); |
---|
333 | 339 | backItem.addActionListener(this); |
---|
334 | 340 | frontItem = menu.add(new MenuItem("Front")); |
---|
335 | 341 | frontItem.addActionListener(this); |
---|
336 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
337 | | - compositeItem.addActionListener(this); |
---|
| 342 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 343 | +// compositeItem.addActionListener(this); |
---|
| 344 | + |
---|
| 345 | + if (Globals.ADVANCED) |
---|
| 346 | + { |
---|
338 | 347 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
339 | 348 | hideItem.addActionListener(this); |
---|
| 349 | + } |
---|
340 | 350 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
341 | 351 | ungroupItem.addActionListener(this); |
---|
342 | | - menu.add("-"); |
---|
343 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
344 | | - randomItem.addActionListener(this); |
---|
| 352 | + |
---|
| 353 | +// menu.add("-"); |
---|
| 354 | +// |
---|
| 355 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 356 | +// switchItem.addActionListener(this); |
---|
| 357 | + if (Globals.ADVANCED) |
---|
| 358 | + { |
---|
345 | 359 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
346 | 360 | switchGeoItem.addActionListener(this); |
---|
347 | 361 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
.. | .. |
---|
349 | 363 | morphItem = menu.add(new MenuItem("Morph Group")); |
---|
350 | 364 | morphItem.addActionListener(this); |
---|
351 | 365 | |
---|
352 | | - if (Globals.ADVANCED) |
---|
353 | | - { |
---|
354 | 366 | menu.add("-"); |
---|
355 | 367 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
356 | 368 | physicsItem.addActionListener(this); |
---|
.. | .. |
---|
358 | 370 | frameselectorItem.addActionListener(this); |
---|
359 | 371 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
360 | 372 | scriptNodeItem.addActionListener(this); |
---|
361 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
362 | | - cameraItem.addActionListener(this); |
---|
363 | 373 | } |
---|
364 | 374 | |
---|
365 | 375 | oe.menuBar.add(menu = new Menu("Object")); |
---|
366 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
367 | | - textureItem.addActionListener(this); |
---|
| 376 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 377 | +// textureItem.addActionListener(this); |
---|
368 | 378 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
369 | 379 | billboardItem.addActionListener(this); |
---|
370 | 380 | csgItem = menu.add(new MenuItem("CSG")); |
---|
371 | 381 | csgItem.addActionListener(this); |
---|
372 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 382 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
373 | 383 | shadowXItem.addActionListener(this); |
---|
374 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 384 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
375 | 385 | shadowYItem.addActionListener(this); |
---|
376 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 386 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
377 | 387 | shadowZItem.addActionListener(this); |
---|
| 388 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 389 | + attributeItem.addActionListener(this); |
---|
| 390 | + |
---|
378 | 391 | if (Globals.ADVANCED) |
---|
379 | 392 | { |
---|
380 | 393 | menu.add("-"); |
---|
381 | 394 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
382 | 395 | linkerItem.addActionListener(this); |
---|
383 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
384 | | - attributeItem.addActionListener(this); |
---|
385 | 396 | templateItem = menu.add(new MenuItem("Template")); |
---|
386 | 397 | templateItem.addActionListener(this); |
---|
387 | 398 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
470 | 481 | markleavesItem.addActionListener(this); |
---|
471 | 482 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
472 | 483 | unmarkleavesItem.addActionListener(this); |
---|
| 484 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 485 | + rewindleavesItem.addActionListener(this); |
---|
| 486 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 487 | + unrewindleavesItem.addActionListener(this); |
---|
| 488 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 489 | + randomleavesItem.addActionListener(this); |
---|
| 490 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 491 | + unrandomleavesItem.addActionListener(this); |
---|
473 | 492 | menu.add("-"); |
---|
474 | 493 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
475 | 494 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
527 | 546 | |
---|
528 | 547 | void SetupUI2(ObjEditor oe) |
---|
529 | 548 | { |
---|
| 549 | + // June 2019 |
---|
| 550 | + if (oe == null) |
---|
| 551 | + { |
---|
| 552 | + //super.SetupUI2(this); |
---|
| 553 | + //return; |
---|
| 554 | + } |
---|
| 555 | + |
---|
| 556 | + if (copy != group) |
---|
| 557 | + { |
---|
| 558 | + //super.SetupUI2(this); |
---|
| 559 | + } |
---|
| 560 | + |
---|
530 | 561 | //new Exception().printStackTrace(); |
---|
531 | 562 | |
---|
532 | 563 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
555 | 586 | oe.radioPanel.add(dummyButton); |
---|
556 | 587 | oe.buttonGroup.add(dummyButton); |
---|
557 | 588 | */ |
---|
| 589 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 590 | + |
---|
| 591 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 592 | + |
---|
558 | 593 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
559 | 594 | |
---|
560 | | - oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 595 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + //minButton.setToolTipText("Minimize window"); |
---|
| 597 | + //minButton.addActionListener(this); |
---|
| 598 | + |
---|
| 599 | + if (Globals.ADVANCED) |
---|
| 600 | + { |
---|
| 601 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + maxButton.setToolTipText("Maximize window"); |
---|
| 603 | + maxButton.addActionListener(this); |
---|
| 604 | + } |
---|
| 605 | + |
---|
| 606 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 607 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 608 | + fullButton.addActionListener(this); |
---|
| 609 | + |
---|
| 610 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 611 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 612 | + screenfitButton.addActionListener(this); |
---|
| 613 | + |
---|
| 614 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 615 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 616 | + restoreCameraButton.addActionListener(this); |
---|
| 617 | + |
---|
| 618 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
561 | 619 | undoButton.setToolTipText("Undo changes"); |
---|
562 | 620 | undoButton.addActionListener(this); |
---|
| 621 | + undoButton.setEnabled(false); |
---|
563 | 622 | |
---|
564 | | - oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 623 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
565 | 624 | redoButton.setToolTipText("Redo changes"); |
---|
566 | 625 | redoButton.addActionListener(this); |
---|
| 626 | + redoButton.setEnabled(false); |
---|
567 | 627 | |
---|
568 | | - oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 628 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
569 | 629 | saveButton.setToolTipText("Save changes"); |
---|
570 | 630 | saveButton.addActionListener(this); |
---|
571 | 631 | |
---|
572 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 632 | + copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
573 | 633 | liveCB.setToolTipText("Enable animation"); |
---|
574 | 634 | liveCB.addItemListener(this); |
---|
575 | 635 | |
---|
576 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 636 | + copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
577 | 637 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
578 | 638 | oneStepButton.addActionListener(this); |
---|
579 | 639 | |
---|
580 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 640 | + copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
581 | 641 | fastCB.setToolTipText("Fast mode"); |
---|
582 | 642 | fastCB.addItemListener(this); |
---|
583 | 643 | |
---|
584 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
585 | | - trackCB.setToolTipText("Enable tracking"); |
---|
586 | | - trackCB.addItemListener(this); |
---|
587 | | - |
---|
588 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
589 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
590 | | - screenfitButton.addActionListener(this); |
---|
| 644 | + //oe.toolboxPanel.Return(); |
---|
| 645 | + |
---|
| 646 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 647 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 648 | +// trackCB.addItemListener(this); |
---|
591 | 649 | |
---|
592 | 650 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
593 | 651 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
599 | 657 | snapobjectButton.setToolTipText("Snap Object"); |
---|
600 | 658 | } |
---|
601 | 659 | |
---|
602 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
603 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
604 | | - flashSelectionButton.addActionListener(this); |
---|
| 660 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
605 | 661 | |
---|
606 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
607 | | - |
---|
608 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 662 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
609 | 663 | twoButton.setToolTipText("Show center view only"); |
---|
610 | 664 | twoButton.addActionListener(this); |
---|
611 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 665 | + this.fullscreenLayout = twoButton; |
---|
| 666 | + |
---|
| 667 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
612 | 668 | fourButton.addActionListener(this); |
---|
613 | 669 | fourButton.setToolTipText("Show left panel only"); |
---|
614 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 670 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
615 | 671 | sixButton.setToolTipText("2-column layout left"); |
---|
616 | 672 | sixButton.addActionListener(this); |
---|
617 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 673 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
618 | 674 | threeButton.setToolTipText("2-column layout right"); |
---|
619 | 675 | threeButton.addActionListener(this); |
---|
620 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 676 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
621 | 677 | sevenButton.setToolTipText("3-column layout"); |
---|
622 | 678 | sevenButton.addActionListener(this); |
---|
623 | 679 | // |
---|
624 | 680 | |
---|
625 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 681 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
626 | 682 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
627 | 683 | rootButton.addActionListener(this); |
---|
628 | 684 | |
---|
629 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 685 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
630 | 686 | closeButton.setToolTipText("Close tab"); |
---|
631 | 687 | closeButton.addActionListener(this); |
---|
632 | 688 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
633 | 689 | //clearButton.addActionListener(this); |
---|
634 | | - |
---|
635 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 690 | + |
---|
| 691 | + // INSERT |
---|
| 692 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + gridButton.setToolTipText("Create grid"); |
---|
| 694 | + gridButton.addActionListener(this); |
---|
| 695 | + |
---|
| 696 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 697 | + boxButton.setToolTipText("Create box"); |
---|
| 698 | + boxButton.addActionListener(this); |
---|
| 699 | + |
---|
| 700 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 701 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 702 | + sphereButton.addActionListener(this); |
---|
| 703 | + |
---|
| 704 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 705 | + coneButton.setToolTipText("Create cone"); |
---|
| 706 | + coneButton.addActionListener(this); |
---|
| 707 | + |
---|
| 708 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 709 | + torusButton.setToolTipText("Create torus"); |
---|
| 710 | + torusButton.addActionListener(this); |
---|
| 711 | + |
---|
| 712 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 713 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 714 | + superButton.addActionListener(this); |
---|
| 715 | + |
---|
| 716 | + if (Globals.ADVANCED) |
---|
| 717 | + { |
---|
| 718 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 719 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 720 | + kleinButton.addActionListener(this); |
---|
| 721 | + } |
---|
636 | 722 | |
---|
637 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
638 | | - editButton.setToolTipText("Edit selection"); |
---|
| 723 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 724 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 725 | + particlesButton.addActionListener(this); |
---|
| 726 | + |
---|
| 727 | + oe.toolboxPanel.Return(); |
---|
| 728 | + |
---|
| 729 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 730 | + groupButton.setToolTipText("Create group"); |
---|
| 731 | + groupButton.addActionListener(this); |
---|
| 732 | + |
---|
| 733 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 734 | + compositeButton.setToolTipText("Create composite"); |
---|
| 735 | + compositeButton.addActionListener(this); |
---|
| 736 | + |
---|
| 737 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 738 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 739 | + switchButton.addActionListener(this); |
---|
| 740 | + |
---|
| 741 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 742 | + loopButton.setToolTipText("Create loop"); |
---|
| 743 | + loopButton.addActionListener(this); |
---|
| 744 | + |
---|
| 745 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 746 | + textureButton.setToolTipText("Create texture"); |
---|
| 747 | + textureButton.addActionListener(this); |
---|
| 748 | + |
---|
| 749 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 750 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 751 | + overlayButton.addActionListener(this); |
---|
| 752 | + |
---|
| 753 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 754 | + lightButton.setToolTipText("Create light"); |
---|
| 755 | + lightButton.addActionListener(this); |
---|
| 756 | + |
---|
| 757 | + for (int i=6; --i>=0;) |
---|
| 758 | + { |
---|
| 759 | + oe.toolboxPanel.Return(); |
---|
| 760 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 761 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 762 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 763 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 764 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 765 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 766 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 767 | + } |
---|
| 768 | + |
---|
| 769 | + // EDIT panel |
---|
| 770 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 771 | + editButton.setToolTipText("Pin selection controls"); |
---|
639 | 772 | editButton.addActionListener(this); |
---|
640 | 773 | |
---|
641 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
642 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 774 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 775 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
643 | 776 | uneditButton.addActionListener(this); |
---|
644 | 777 | |
---|
645 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
646 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 778 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 779 | + allParamsButton.setToolTipText("Show all controle"); |
---|
647 | 780 | allParamsButton.addActionListener(this); |
---|
648 | 781 | |
---|
649 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 782 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | 783 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
651 | 784 | clearPanelButton.addActionListener(this); |
---|
652 | 785 | |
---|
653 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 786 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | 787 | unselectButton.setToolTipText("Unselect"); |
---|
655 | 788 | unselectButton.addActionListener(this); |
---|
656 | 789 | |
---|
657 | | - commandsPanel.preferredHeight = 1; |
---|
| 790 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 791 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 792 | + flashSelectionButton.addActionListener(this); |
---|
658 | 793 | |
---|
659 | | - oe.treePanel.add(commandsPanel); |
---|
660 | | - oe.treePanel.Return(); |
---|
| 794 | + editCommandsPanel.preferredHeight = 1; |
---|
| 795 | + |
---|
| 796 | + SetPinStates(false); |
---|
| 797 | +// oe.treePanel.add(commandsPanel); |
---|
| 798 | +// oe.treePanel.Return(); |
---|
661 | 799 | |
---|
662 | 800 | // oe.aConstraints.gridx += 1; |
---|
663 | 801 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
674 | 812 | |
---|
675 | 813 | JScrollPane jSP; |
---|
676 | 814 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
677 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 815 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
678 | 816 | ResetModel(); |
---|
679 | 817 | |
---|
680 | 818 | oe.treePanel.add(jSPPanel); |
---|
681 | 819 | oe.treePanel.Return(); |
---|
682 | 820 | |
---|
683 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
684 | | - |
---|
685 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
686 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
687 | | - colorCB.addItemListener(this); |
---|
688 | | - |
---|
689 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
690 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
691 | | - materialCB.addItemListener(this); |
---|
692 | | - |
---|
693 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
694 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
695 | | - textureCB.addItemListener(this); |
---|
696 | | - |
---|
697 | | - copyOptionsPanel.preferredHeight = 1; |
---|
698 | 821 | oe.treePanel.add(copyOptionsPanel); |
---|
699 | 822 | oe.treePanel.Return(); |
---|
700 | 823 | |
---|
.. | .. |
---|
725 | 848 | |
---|
726 | 849 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
727 | 850 | { |
---|
| 851 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 852 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 853 | + colorCB.addItemListener(this); |
---|
| 854 | + |
---|
| 855 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 856 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 857 | + materialCB.addItemListener(this); |
---|
| 858 | + |
---|
| 859 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 860 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 861 | + textureCB.addItemListener(this); |
---|
| 862 | + |
---|
| 863 | + panel.Return(); |
---|
| 864 | + |
---|
728 | 865 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
729 | 866 | boxCB.setToolTipText("Display bounding boxes"); |
---|
730 | 867 | boxCB.addItemListener(this); |
---|
731 | 868 | |
---|
732 | 869 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
733 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 870 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
734 | 871 | zoomBoxCB.addItemListener(this); |
---|
735 | 872 | |
---|
736 | 873 | if (true) // Globals.ADVANCED) |
---|
737 | 874 | { |
---|
738 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
739 | | - supportCB.setToolTipText("Enable rigging"); |
---|
740 | | - supportCB.addItemListener(this); |
---|
| 875 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 876 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 877 | +// supportCB.addItemListener(this); |
---|
| 878 | + |
---|
| 879 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 880 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 881 | + freezeCB.addItemListener(this); |
---|
741 | 882 | |
---|
742 | 883 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
743 | 884 | // localCB.addItemListener(this); |
---|
744 | 885 | |
---|
| 886 | + panel.Return(); |
---|
| 887 | + |
---|
745 | 888 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
746 | 889 | crowdCB.setToolTipText("Used for crowds"); |
---|
747 | 890 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
758 | 901 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
759 | 902 | // speakerMocapCB.addItemListener(this); |
---|
760 | 903 | |
---|
| 904 | + panel.Return(); |
---|
| 905 | + |
---|
761 | 906 | if (false) |
---|
762 | 907 | { |
---|
763 | 908 | // handled in scripts |
---|
.. | .. |
---|
772 | 917 | //constraints.gridy += 1; |
---|
773 | 918 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
774 | 919 | smoothfocusCB.addItemListener(this); |
---|
| 920 | + panel.Return(); |
---|
775 | 921 | } |
---|
776 | 922 | |
---|
777 | 923 | //constraints.gridx += 1; |
---|
778 | 924 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
779 | 925 | // debugCB.addItemListener(this); |
---|
780 | 926 | |
---|
| 927 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 928 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 929 | + trackCB.addItemListener(this); |
---|
| 930 | + |
---|
781 | 931 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 932 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
782 | 933 | oeilCB.addItemListener(this); |
---|
783 | 934 | |
---|
| 935 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 936 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 937 | + shadowCB.addItemListener(this); |
---|
| 938 | + |
---|
| 939 | + panel.Return(); |
---|
| 940 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 941 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 942 | + toggleTextureCB.addItemListener(this); |
---|
| 943 | + |
---|
| 944 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 945 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 946 | + toggleSwitchCB.addItemListener(this); |
---|
| 947 | + |
---|
| 948 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 949 | + autosaveCB.setToolTipText("On structure change"); |
---|
| 950 | + autosaveCB.addItemListener(this); |
---|
| 951 | + |
---|
| 952 | + panel.Return(); |
---|
| 953 | + if (Globals.ADVANCED) |
---|
| 954 | + { |
---|
784 | 955 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
785 | 956 | lookAtCB.setToolTipText("Look-at target"); |
---|
786 | 957 | lookAtCB.addItemListener(this); |
---|
| 958 | + } |
---|
787 | 959 | |
---|
788 | 960 | } |
---|
789 | 961 | |
---|
790 | 962 | cGridBag fill = new cGridBag(); |
---|
791 | | - |
---|
792 | 963 | fill.preferredHeight = 200; |
---|
| 964 | + cGridBag fill2 = new cGridBag(); |
---|
| 965 | + fill2.preferredHeight = 200; |
---|
| 966 | + cGridBag fill3 = new cGridBag(); |
---|
| 967 | + fill3.preferredHeight = 200; |
---|
793 | 968 | |
---|
794 | 969 | panel.add(fill); |
---|
| 970 | + panel.add(fill2); |
---|
| 971 | + panel.add(fill3); |
---|
795 | 972 | |
---|
796 | 973 | } |
---|
797 | 974 | |
---|
798 | 975 | void EditObject(Object3D obj) |
---|
799 | 976 | { |
---|
800 | 977 | cRadio radioButton = new cRadio(obj.name); |
---|
| 978 | + |
---|
| 979 | + // June 2019. Patch to avoid bug with transparency. |
---|
| 980 | + radioButton.hadMaterial = obj.material != null; |
---|
| 981 | + if (!radioButton.hadMaterial) |
---|
| 982 | + { |
---|
| 983 | + obj.material = new cMaterial(); |
---|
| 984 | + } |
---|
| 985 | + |
---|
801 | 986 | radioButton.SetObject(obj); |
---|
802 | 987 | radioButton.layout = sevenButton; |
---|
803 | 988 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
809 | 994 | |
---|
810 | 995 | void SetupViews(ObjEditor oe) |
---|
811 | 996 | { |
---|
| 997 | + theFrame = this; |
---|
| 998 | + |
---|
812 | 999 | oe.SetupViews(); |
---|
813 | 1000 | |
---|
814 | 1001 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
817 | 1004 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
818 | 1005 | } |
---|
819 | 1006 | |
---|
820 | | - JCheckBox liveCB; |
---|
821 | | - JCheckBox supportCB; |
---|
822 | | - JCheckBox localCB; |
---|
823 | | - JCheckBox crowdCB; |
---|
824 | | - JCheckBox smoothCB; |
---|
825 | | - JCheckBox fastCB; |
---|
826 | | - JCheckBox slowCB; |
---|
827 | | - JCheckBox boxCB; |
---|
828 | | - JCheckBox zoomBoxCB; |
---|
829 | | - JCheckBox trackCB; |
---|
830 | | - JCheckBox smoothfocusCB; |
---|
| 1007 | + cToggleButton liveCB; |
---|
| 1008 | + cCheckBox supportCB; |
---|
| 1009 | + cCheckBox localCB; |
---|
| 1010 | + cCheckBox crowdCB; |
---|
| 1011 | + cCheckBox smoothCB; |
---|
| 1012 | + cToggleButton fastCB; |
---|
| 1013 | + cCheckBox slowCB; |
---|
| 1014 | + cCheckBox boxCB; |
---|
| 1015 | + cCheckBox zoomBoxCB; |
---|
| 1016 | + cCheckBox freezeCB; |
---|
| 1017 | + //cToggleButton trackCB; |
---|
| 1018 | + cCheckBox trackCB; |
---|
| 1019 | + cCheckBox smoothfocusCB; |
---|
831 | 1020 | // JCheckBox speakerMocapCB; |
---|
832 | | - JCheckBox speakerCameraCB; |
---|
833 | | - JCheckBox speakerFocusCB; |
---|
834 | | - JCheckBox debugCB; |
---|
835 | | - JCheckBox oeilCB; |
---|
836 | | - JCheckBox lookAtCB; |
---|
| 1021 | + cCheckBox speakerCameraCB; |
---|
| 1022 | + cCheckBox speakerFocusCB; |
---|
| 1023 | + cCheckBox debugCB; |
---|
| 1024 | + |
---|
| 1025 | + cCheckBox oeilCB; |
---|
| 1026 | + cCheckBox shadowCB; |
---|
| 1027 | + cCheckBox autosaveCB; |
---|
| 1028 | + cCheckBox lookAtCB; |
---|
837 | 1029 | |
---|
838 | 1030 | // static int COLOR = 1; |
---|
839 | 1031 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
841 | 1033 | |
---|
842 | 1034 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
843 | 1035 | |
---|
844 | | - JCheckBox colorCB; |
---|
845 | | - JCheckBox materialCB; |
---|
846 | | - JCheckBox textureCB; |
---|
| 1036 | + cCheckBox colorCB; |
---|
| 1037 | + cCheckBox materialCB; |
---|
| 1038 | + cCheckBox textureCB; |
---|
847 | 1039 | |
---|
848 | 1040 | public void itemStateChanged(ItemEvent e) |
---|
849 | 1041 | { |
---|
.. | .. |
---|
871 | 1063 | } else if(e.getSource() == liveCB) |
---|
872 | 1064 | { |
---|
873 | 1065 | cameraView.ToggleLive(); |
---|
| 1066 | + refreshContents(false); |
---|
874 | 1067 | } |
---|
875 | 1068 | else if(e.getSource() == supportCB) |
---|
876 | 1069 | { |
---|
.. | .. |
---|
935 | 1128 | { |
---|
936 | 1129 | cameraView.ToggleOeil(); |
---|
937 | 1130 | } |
---|
| 1131 | + else if(e.getSource() == shadowCB) |
---|
| 1132 | + { |
---|
| 1133 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1134 | + } |
---|
| 1135 | + else if(e.getSource() == freezeCB) |
---|
| 1136 | + { |
---|
| 1137 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1138 | + } |
---|
| 1139 | + else if(e.getSource() == autosaveCB) |
---|
| 1140 | + { |
---|
| 1141 | + Globals.SAVEONMAKE ^= true; |
---|
| 1142 | + } |
---|
938 | 1143 | else if(e.getSource() == lookAtCB) |
---|
939 | 1144 | { |
---|
940 | 1145 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
951 | 1156 | |
---|
952 | 1157 | /**/ |
---|
953 | 1158 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
954 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1159 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1160 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
955 | 1161 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
956 | 1162 | // We can't move the root node or an empty selection |
---|
957 | 1163 | return; |
---|
.. | .. |
---|
1014 | 1220 | } |
---|
1015 | 1221 | } |
---|
1016 | 1222 | |
---|
1017 | | - String string = (String) object; |
---|
1018 | | - |
---|
1019 | 1223 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1020 | 1224 | // if( object instanceof java.io.File[]) |
---|
1021 | 1225 | // { |
---|
.. | .. |
---|
1023 | 1227 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1024 | 1228 | // return; |
---|
1025 | 1229 | // } |
---|
| 1230 | + |
---|
| 1231 | + String string = object.toString(); |
---|
1026 | 1232 | |
---|
1027 | 1233 | // File path for Mac and Windows |
---|
1028 | 1234 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1068 | 1274 | |
---|
1069 | 1275 | assert target == objEditor.jTree; |
---|
1070 | 1276 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1277 | + Object3D destinationLeaf; |
---|
1071 | 1278 | try { |
---|
1072 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1279 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1073 | 1280 | } catch (Exception e) { |
---|
1074 | 1281 | System.out.println("destinationPath : " + destinationPath); |
---|
1075 | 1282 | return; |
---|
1076 | 1283 | } |
---|
1077 | 1284 | |
---|
1078 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1285 | + for (int i=group.selection.size(); --i>=0;) |
---|
1079 | 1286 | { |
---|
| 1287 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1288 | + |
---|
| 1289 | + // Cannot move into itself |
---|
| 1290 | + if (child == destinationLeaf) |
---|
| 1291 | + return; |
---|
| 1292 | + } |
---|
| 1293 | + |
---|
| 1294 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1295 | +// { |
---|
1080 | 1296 | loadClipboard(true); |
---|
1081 | 1297 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
1082 | 1298 | pasteInto(false, false); |
---|
1083 | | - } else { |
---|
1084 | | - loadClipboard(false); |
---|
1085 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1086 | | - pasteInto(false, false); // true); // ??? |
---|
1087 | | - } |
---|
| 1299 | +// } else { |
---|
| 1300 | +// loadClipboard(false); |
---|
| 1301 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1302 | +// pasteInto(false, false); // true); // ??? |
---|
| 1303 | +// } |
---|
1088 | 1304 | } |
---|
1089 | 1305 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1090 | 1306 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1189 | 1405 | { |
---|
1190 | 1406 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1191 | 1407 | //heightFieldItem.addActionListener(this); |
---|
1192 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1193 | | - gridItem.addActionListener(this); |
---|
1194 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1195 | | - rectoidItem.addActionListener(this); |
---|
1196 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1197 | | - ellipsoidItem.addActionListener(this); |
---|
1198 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1199 | | - coneItem.addActionListener(this); |
---|
1200 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1201 | | - torusItem.addActionListener(this); |
---|
1202 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1203 | | - superItem.addActionListener(this); |
---|
| 1408 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1409 | +// gridItem.addActionListener(this); |
---|
| 1410 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1411 | +// rectoidItem.addActionListener(this); |
---|
| 1412 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1413 | +// ellipsoidItem.addActionListener(this); |
---|
| 1414 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1415 | +// coneItem.addActionListener(this); |
---|
| 1416 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1417 | +// torusItem.addActionListener(this); |
---|
| 1418 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1419 | +// superItem.addActionListener(this); |
---|
| 1420 | + |
---|
| 1421 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1422 | + cameraItem.addActionListener(this); |
---|
| 1423 | + |
---|
| 1424 | + if (!Globals.ADVANCED) |
---|
| 1425 | + { |
---|
1204 | 1426 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1205 | 1427 | kleinItem.addActionListener(this); |
---|
1206 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1207 | | - particleItem.addActionListener(this); |
---|
| 1428 | + } |
---|
| 1429 | + |
---|
| 1430 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1431 | +// particleItem.addActionListener(this); |
---|
1208 | 1432 | if (Globals.ADVANCED) |
---|
1209 | 1433 | { |
---|
1210 | 1434 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1230 | 1454 | } |
---|
1231 | 1455 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1232 | 1456 | bezierItem.addActionListener(this); |
---|
1233 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1234 | | - overlayItem.addActionListener(this); |
---|
1235 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1236 | | - lightItem.addActionListener(this); |
---|
| 1457 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1458 | +// overlayItem.addActionListener(this); |
---|
| 1459 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1460 | +// lightItem.addActionListener(this); |
---|
1237 | 1461 | menu.add("-"); |
---|
1238 | 1462 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1239 | 1463 | //superLoopItem.addActionListener(this); |
---|
1240 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1241 | | - loopItem.addActionListener(this); |
---|
| 1464 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1465 | +// loopItem.addActionListener(this); |
---|
1242 | 1466 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1243 | 1467 | doubleItem.addActionListener(this); |
---|
1244 | 1468 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1254 | 1478 | animationItem.addItemListener(this); |
---|
1255 | 1479 | animationItem.setState(Globals.ANIMATION); |
---|
1256 | 1480 | |
---|
| 1481 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1482 | + archiveItem.addActionListener(this); |
---|
| 1483 | + |
---|
1257 | 1484 | menu.add("-"); |
---|
1258 | 1485 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1259 | 1486 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1266 | 1493 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1267 | 1494 | reduce34MorphItem.addActionListener(this); |
---|
1268 | 1495 | menu.add("-"); |
---|
| 1496 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1497 | + memoryItem.addActionListener(this); |
---|
1269 | 1498 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1270 | 1499 | computeAOItem.addActionListener(this); |
---|
1271 | 1500 | |
---|
.. | .. |
---|
1274 | 1503 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1275 | 1504 | mirrorItem.addActionListener(this); |
---|
1276 | 1505 | menu.add("-"); |
---|
1277 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1278 | | - memoryItem.addActionListener(this); |
---|
1279 | 1506 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1280 | 1507 | analyzeItem.addActionListener(this); |
---|
1281 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1508 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1282 | 1509 | dumpItem.addActionListener(this); |
---|
1283 | 1510 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1284 | 1511 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1419 | 1646 | shadow.material = new cMaterial(obj.material); |
---|
1420 | 1647 | shadow.material.diffuse = 0.0001f; |
---|
1421 | 1648 | shadow.material.specular = 0.0001f; |
---|
| 1649 | + //shadow.projectedVertices[1].x = 300; |
---|
1422 | 1650 | |
---|
1423 | 1651 | makeSomething(shadow); |
---|
1424 | 1652 | } |
---|
| 1653 | + |
---|
| 1654 | + private void ClearUnpinned() |
---|
| 1655 | + { |
---|
| 1656 | + //for (Object3D obj : listUI) |
---|
| 1657 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1658 | + { |
---|
| 1659 | + Object3D obj = listUI.elementAt(i); |
---|
| 1660 | + if (!obj.pinned) |
---|
| 1661 | + { |
---|
| 1662 | + obj.CloseUI(); |
---|
| 1663 | + listUI.remove(i); |
---|
| 1664 | + } |
---|
| 1665 | + } |
---|
| 1666 | + } |
---|
1425 | 1667 | |
---|
1426 | 1668 | /** |
---|
1427 | 1669 | * applyExample |
---|
.. | .. |
---|
1666 | 1908 | { |
---|
1667 | 1909 | ScreenFit(); |
---|
1668 | 1910 | } else |
---|
1669 | | - if (source == switchItem) |
---|
| 1911 | + if (source == switchViewItem) |
---|
1670 | 1912 | { |
---|
1671 | 1913 | cVector v1 = new cVector(); |
---|
1672 | 1914 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1675 | 1917 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1676 | 1918 | objEditor.cameraView.repaint(); |
---|
1677 | 1919 | } else |
---|
1678 | | - if (source == rectoidItem) |
---|
| 1920 | + if (source == rectoidItem || source == boxButton) |
---|
1679 | 1921 | { |
---|
1680 | 1922 | makeSomething(new Box()); |
---|
1681 | 1923 | } else |
---|
1682 | | - if (source == particleItem) |
---|
| 1924 | + if (source == particleItem || source == particlesButton) |
---|
1683 | 1925 | { |
---|
1684 | 1926 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1685 | 1927 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1758 | 2000 | |
---|
1759 | 2001 | makeSomething(obj); |
---|
1760 | 2002 | } else |
---|
1761 | | - if (source == gridItem) |
---|
| 2003 | + if (source == gridItem || source == gridButton) |
---|
1762 | 2004 | { |
---|
1763 | 2005 | makeSomething(new Grid()); |
---|
1764 | 2006 | } else |
---|
1765 | | - if (source == ellipsoidItem) |
---|
| 2007 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1766 | 2008 | { |
---|
1767 | 2009 | makeSomething(new Sphere()); |
---|
1768 | 2010 | } else |
---|
1769 | | - if (source == coneItem) |
---|
| 2011 | + if (source == coneItem || source == coneButton) |
---|
1770 | 2012 | { |
---|
1771 | 2013 | makeSomething(new Cone()); |
---|
1772 | 2014 | } else |
---|
1773 | | - if (source == torusItem) |
---|
| 2015 | + if (source == torusItem || source == torusButton) |
---|
1774 | 2016 | { |
---|
1775 | 2017 | makeSomething(new Torus()); |
---|
1776 | 2018 | } else |
---|
1777 | | - if (source == superItem) |
---|
| 2019 | + if (source == superItem || source == superButton) |
---|
1778 | 2020 | { |
---|
1779 | 2021 | makeSomething(new Superellipsoid()); |
---|
1780 | 2022 | } else |
---|
1781 | | - if (source == kleinItem) |
---|
| 2023 | + if (source == kleinItem || source == kleinButton) |
---|
1782 | 2024 | { |
---|
1783 | 2025 | makeSomething(new Klein()); |
---|
1784 | 2026 | } else |
---|
.. | .. |
---|
1798 | 2040 | { |
---|
1799 | 2041 | makeSomething(new BezierSurface()); |
---|
1800 | 2042 | } else |
---|
1801 | | - if (source == overlayItem) |
---|
| 2043 | + if (source == overlayItem || source == overlayButton) |
---|
1802 | 2044 | { |
---|
1803 | 2045 | /* |
---|
1804 | 2046 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1846 | 2088 | s.setup(); |
---|
1847 | 2089 | makeSomething(s); |
---|
1848 | 2090 | } else |
---|
1849 | | - if (source == lightItem) |
---|
| 2091 | + if (source == lightItem || source == lightButton) |
---|
1850 | 2092 | { |
---|
1851 | 2093 | makeSomething(new Light()); |
---|
1852 | 2094 | } else |
---|
.. | .. |
---|
1896 | 2138 | |
---|
1897 | 2139 | group(g); |
---|
1898 | 2140 | } else |
---|
1899 | | - if (source == loopItem) |
---|
| 2141 | + if (source == loopItem || source == loopButton) |
---|
1900 | 2142 | { |
---|
1901 | 2143 | Composite csg = new GroupLeaf(); |
---|
1902 | 2144 | csg.count = 5; |
---|
1903 | 2145 | group(csg); |
---|
1904 | | - Composite child = new cGroup(); |
---|
| 2146 | + Composite child = new cGroup("Branch"); |
---|
1905 | 2147 | csg.addChild(child); |
---|
1906 | 2148 | child.addChild(csg); |
---|
1907 | 2149 | } else |
---|
1908 | 2150 | if (source == doubleItem) |
---|
1909 | 2151 | { |
---|
1910 | | - Composite csg = new GroupLeaf(); |
---|
| 2152 | + Composite csg = new GroupLeaf("Fork"); |
---|
1911 | 2153 | csg.count = 5; |
---|
1912 | 2154 | group(csg); |
---|
1913 | | - Composite child = new cGroup(); |
---|
| 2155 | + Composite child = new cGroup("Branch A"); |
---|
1914 | 2156 | csg.addChild(child); |
---|
1915 | 2157 | child.addChild(csg); |
---|
1916 | | - child = new cGroup(); |
---|
| 2158 | + child = new cGroup("Branch B"); |
---|
1917 | 2159 | csg.addChild(child); |
---|
1918 | 2160 | child.addChild(csg); |
---|
1919 | 2161 | } else |
---|
1920 | 2162 | if (source == tripleItem) |
---|
1921 | 2163 | { |
---|
1922 | | - Composite csg = new GroupLeaf(); |
---|
| 2164 | + Composite csg = new GroupLeaf("Trident"); |
---|
1923 | 2165 | csg.count = 4; |
---|
1924 | 2166 | group(csg); |
---|
1925 | 2167 | Composite child = new cGroup(); |
---|
.. | .. |
---|
1969 | 2211 | { |
---|
1970 | 2212 | DumpObject(); |
---|
1971 | 2213 | } else |
---|
| 2214 | + if (source == minButton) |
---|
| 2215 | + { |
---|
| 2216 | + Minimize(); |
---|
| 2217 | + } else |
---|
| 2218 | + if (source == maxButton) |
---|
| 2219 | + { |
---|
| 2220 | + Maximize(); |
---|
| 2221 | + } else |
---|
| 2222 | + if (source == fullButton) |
---|
| 2223 | + { |
---|
| 2224 | + ToggleFullScreen(); |
---|
| 2225 | + } else |
---|
1972 | 2226 | if (source == undoButton) |
---|
1973 | 2227 | { |
---|
1974 | | - Undo(); |
---|
| 2228 | + if (!Undo()) |
---|
| 2229 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
1975 | 2230 | } else |
---|
1976 | 2231 | if (source == redoButton) |
---|
1977 | 2232 | { |
---|
.. | .. |
---|
1979 | 2234 | } else |
---|
1980 | 2235 | if (source == saveButton) |
---|
1981 | 2236 | { |
---|
1982 | | - Save(); |
---|
| 2237 | + if (!Save(true)) |
---|
| 2238 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
1983 | 2239 | } else |
---|
1984 | 2240 | if (source == oneStepButton) |
---|
1985 | 2241 | { |
---|
.. | .. |
---|
1988 | 2244 | } else |
---|
1989 | 2245 | if (source == screenfitButton) |
---|
1990 | 2246 | { |
---|
1991 | | - //Reload(lastConverter, lastFilename, true); |
---|
1992 | 2247 | ScreenFit(); |
---|
1993 | 2248 | } else |
---|
1994 | 2249 | if (source == screenfitpointButton) |
---|
1995 | 2250 | { |
---|
1996 | | - //Reload(lastConverter, lastFilename, true); |
---|
1997 | 2251 | ScreenFitPoint(); |
---|
1998 | 2252 | } else |
---|
1999 | 2253 | if (source == snapobjectButton) |
---|
2000 | 2254 | { |
---|
2001 | | - //Reload(lastConverter, lastFilename, true); |
---|
2002 | 2255 | SnapObject(); |
---|
2003 | 2256 | } else |
---|
2004 | 2257 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2374 | 2627 | { |
---|
2375 | 2628 | ClearSelection(true); |
---|
2376 | 2629 | } else |
---|
2377 | | - if (source == grabItem) |
---|
| 2630 | + if (source == grabItem || source == groupButton) |
---|
2378 | 2631 | { |
---|
2379 | | - group(new cGroup(), true); |
---|
| 2632 | + group(new cGroup(), false); // true); |
---|
2380 | 2633 | } else |
---|
2381 | 2634 | if (source == hideItem) |
---|
2382 | 2635 | { |
---|
.. | .. |
---|
2394 | 2647 | { |
---|
2395 | 2648 | makeSomething(new Camera()); |
---|
2396 | 2649 | } else |
---|
2397 | | - if (source == compositeItem) |
---|
| 2650 | + if (source == compositeItem || source == compositeButton) |
---|
2398 | 2651 | { |
---|
2399 | 2652 | group(new Composite()); |
---|
2400 | 2653 | } else |
---|
2401 | | - if (source == randomItem) |
---|
| 2654 | + if (source == switchItem || source == switchButton) |
---|
2402 | 2655 | { |
---|
2403 | 2656 | RandomNode random = new RandomNode(); |
---|
2404 | 2657 | group(random); |
---|
.. | .. |
---|
2500 | 2753 | { |
---|
2501 | 2754 | group(new cLinker()); |
---|
2502 | 2755 | } else |
---|
2503 | | - if (source == textureItem) |
---|
| 2756 | + if (source == textureItem || source == textureButton) |
---|
2504 | 2757 | { |
---|
2505 | 2758 | group(new TextureNode()); |
---|
2506 | 2759 | } else |
---|
.. | .. |
---|
2520 | 2773 | { |
---|
2521 | 2774 | CastShadow(2); |
---|
2522 | 2775 | } else |
---|
2523 | | - if (source == ungroupItem) |
---|
| 2776 | + if (source == ungroupItem || source == ungroupButton) |
---|
2524 | 2777 | { |
---|
2525 | | - //ungroup(); |
---|
| 2778 | + boolean hasRoot = false; |
---|
| 2779 | + |
---|
2526 | 2780 | for (int i=0; i<group.selection.size(); i++) |
---|
2527 | 2781 | { |
---|
2528 | | - Ungroup(group.selection.get(i)); |
---|
| 2782 | + if (group.selection.get(i) == group) |
---|
| 2783 | + { |
---|
| 2784 | + hasRoot = true; |
---|
| 2785 | + break; |
---|
| 2786 | + } |
---|
2529 | 2787 | } |
---|
2530 | 2788 | |
---|
2531 | | - ClearSelection(false); |
---|
2532 | | - |
---|
2533 | | - refreshContents(); |
---|
| 2789 | + if (!hasRoot) |
---|
| 2790 | + { |
---|
| 2791 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2792 | + { |
---|
| 2793 | + Ungroup(group.selection.get(i)); |
---|
| 2794 | + } |
---|
| 2795 | + |
---|
| 2796 | + ClearSelection(false); |
---|
| 2797 | + |
---|
| 2798 | + refreshContents(); |
---|
| 2799 | + } |
---|
2534 | 2800 | } else |
---|
2535 | 2801 | if (source == genUVItem) |
---|
2536 | 2802 | { |
---|
.. | .. |
---|
2607 | 2873 | if (source == unmarkleavesItem) |
---|
2608 | 2874 | { |
---|
2609 | 2875 | MarkLeaves(false); |
---|
| 2876 | + } else |
---|
| 2877 | + if (source == rewindleavesItem) |
---|
| 2878 | + { |
---|
| 2879 | + RewindLeaves(true); |
---|
| 2880 | + } else |
---|
| 2881 | + if (source == unrewindleavesItem) |
---|
| 2882 | + { |
---|
| 2883 | + RewindLeaves(false); |
---|
| 2884 | + } else |
---|
| 2885 | + if (source == randomleavesItem) |
---|
| 2886 | + { |
---|
| 2887 | + RandomLeaves(true); |
---|
| 2888 | + } else |
---|
| 2889 | + if (source == unrandomleavesItem) |
---|
| 2890 | + { |
---|
| 2891 | + RandomLeaves(false); |
---|
2610 | 2892 | } else |
---|
2611 | 2893 | if (source == flipVItem) |
---|
2612 | 2894 | { |
---|
.. | .. |
---|
2842 | 3124 | if (source == twoButton) |
---|
2843 | 3125 | { |
---|
2844 | 3126 | radio.layout = twoButton; |
---|
| 3127 | + |
---|
| 3128 | + if (CameraPane.FULLSCREEN) |
---|
| 3129 | + fullscreenLayout = radio.layout; |
---|
| 3130 | + |
---|
2845 | 3131 | // bug |
---|
2846 | 3132 | //gridPanel.setDividerLocation(1.0); |
---|
2847 | 3133 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2874 | 3160 | bigThree.ClearUI(); |
---|
2875 | 3161 | bigThree.add(centralPanel); |
---|
2876 | 3162 | bigThree.FlushUI(); |
---|
| 3163 | + |
---|
| 3164 | + cameraView.requestFocusInWindow(); |
---|
| 3165 | + |
---|
| 3166 | +// refreshContents(true); |
---|
| 3167 | +// |
---|
| 3168 | +// try |
---|
| 3169 | +// { |
---|
| 3170 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3171 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3172 | +// bot.mouseMove(100, 100); |
---|
| 3173 | +// bot.mousePress(mask); |
---|
| 3174 | +// bot.mouseRelease(mask); |
---|
| 3175 | +// } |
---|
| 3176 | +// catch (Exception e) |
---|
| 3177 | +// { |
---|
| 3178 | +// |
---|
| 3179 | +// } |
---|
| 3180 | + |
---|
2877 | 3181 | } else |
---|
2878 | 3182 | if (source == threeButton) |
---|
2879 | 3183 | { |
---|
2880 | 3184 | radio.layout = threeButton; |
---|
| 3185 | + |
---|
| 3186 | + if (CameraPane.FULLSCREEN) |
---|
| 3187 | + fullscreenLayout = radio.layout; |
---|
2881 | 3188 | |
---|
2882 | 3189 | // bigThree.remove(scenePanel); |
---|
2883 | 3190 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2910 | 3217 | bigThree.add(centralPanel); |
---|
2911 | 3218 | bigThree.add(XYZPanel); |
---|
2912 | 3219 | bigThree.FlushUI(); |
---|
| 3220 | + |
---|
| 3221 | + cameraView.requestFocusInWindow(); |
---|
2913 | 3222 | } else |
---|
2914 | 3223 | if (source == fourButton) |
---|
2915 | 3224 | { |
---|
2916 | 3225 | radio.layout = fourButton; |
---|
| 3226 | + |
---|
| 3227 | + if (CameraPane.FULLSCREEN) |
---|
| 3228 | + fullscreenLayout = radio.layout; |
---|
2917 | 3229 | |
---|
2918 | 3230 | // bigThree.remove(scenePanel); |
---|
2919 | 3231 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2945 | 3257 | bigThree.ClearUI(); |
---|
2946 | 3258 | bigThree.add(scenePanel); |
---|
2947 | 3259 | bigThree.FlushUI(); |
---|
| 3260 | + |
---|
| 3261 | + cameraView.requestFocusInWindow(); |
---|
2948 | 3262 | } else |
---|
2949 | 3263 | if (source == sixButton) |
---|
2950 | 3264 | { |
---|
2951 | 3265 | radio.layout = sixButton; |
---|
| 3266 | + |
---|
| 3267 | + if (CameraPane.FULLSCREEN) |
---|
| 3268 | + fullscreenLayout = radio.layout; |
---|
2952 | 3269 | |
---|
2953 | 3270 | // bigThree.remove(scenePanel); |
---|
2954 | 3271 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2981 | 3298 | bigThree.add(scenePanel); |
---|
2982 | 3299 | bigThree.add(centralPanel); |
---|
2983 | 3300 | bigThree.FlushUI(); |
---|
| 3301 | + |
---|
| 3302 | + cameraView.requestFocusInWindow(); |
---|
2984 | 3303 | } else |
---|
2985 | 3304 | if (source == sevenButton) |
---|
2986 | 3305 | { |
---|
2987 | 3306 | radio.layout = sevenButton; |
---|
| 3307 | + |
---|
| 3308 | + if (CameraPane.FULLSCREEN) |
---|
| 3309 | + fullscreenLayout = radio.layout; |
---|
2988 | 3310 | |
---|
2989 | 3311 | // bigThree.remove(scenePanel); |
---|
2990 | 3312 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3018 | 3340 | bigThree.add(centralPanel); |
---|
3019 | 3341 | bigThree.add(XYZPanel); |
---|
3020 | 3342 | bigThree.FlushUI(); |
---|
| 3343 | + |
---|
| 3344 | + cameraView.requestFocusInWindow(); |
---|
3021 | 3345 | } else |
---|
3022 | 3346 | if (source == rootButton) |
---|
3023 | 3347 | { |
---|
.. | .. |
---|
3029 | 3353 | EditObject(obj); |
---|
3030 | 3354 | } |
---|
3031 | 3355 | |
---|
| 3356 | + cameraView.requestFocusInWindow(); |
---|
3032 | 3357 | refreshContents(true); |
---|
3033 | 3358 | } else |
---|
3034 | 3359 | if (source == closeButton) |
---|
.. | .. |
---|
3038 | 3363 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3039 | 3364 | { |
---|
3040 | 3365 | ab = (cRadio)e.nextElement(); |
---|
3041 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3366 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3042 | 3367 | { |
---|
| 3368 | + // Patch to avoid bug with transparency. |
---|
| 3369 | + if (!ab.hadMaterial) |
---|
| 3370 | + { |
---|
| 3371 | + ab.object.material = null; |
---|
| 3372 | + } |
---|
| 3373 | + |
---|
3043 | 3374 | buttonGroup.remove(ab); |
---|
3044 | 3375 | radioPanel.remove(ab); |
---|
3045 | 3376 | |
---|
3046 | | - ab.GetObject().editWindow = null; |
---|
| 3377 | + //ab.GetObject().editWindow = null; |
---|
| 3378 | + ab.GetObject().manipWindow = null; |
---|
3047 | 3379 | // ab.GetObject().objectUI = null; // ????????? |
---|
3048 | 3380 | |
---|
3049 | 3381 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
3050 | 3382 | break; |
---|
3051 | 3383 | } |
---|
3052 | 3384 | } |
---|
| 3385 | + |
---|
| 3386 | + cameraView.requestFocusInWindow(); |
---|
3053 | 3387 | refreshContents(true); |
---|
3054 | 3388 | } else |
---|
3055 | 3389 | if (source == editItem || source == editButton) |
---|
3056 | 3390 | { |
---|
| 3391 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3392 | + { |
---|
| 3393 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3394 | + child.pinned = true; |
---|
| 3395 | + } |
---|
| 3396 | + |
---|
3057 | 3397 | EditSelection(false); |
---|
3058 | 3398 | } else |
---|
3059 | 3399 | if (source == uneditButton) |
---|
.. | .. |
---|
3063 | 3403 | Object3D child = (Object3D)e.nextElement(); |
---|
3064 | 3404 | if(child.editWindow != null) |
---|
3065 | 3405 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3406 | + child.pinned = false; |
---|
3066 | 3407 | child.CloseUI(); |
---|
3067 | 3408 | listUI.remove(child); |
---|
3068 | 3409 | |
---|
.. | .. |
---|
3079 | 3420 | //copy.ClearUI(); |
---|
3080 | 3421 | for (Object3D obj : listUI) |
---|
3081 | 3422 | { |
---|
| 3423 | + obj.pinned = false; |
---|
3082 | 3424 | obj.CloseUI(); |
---|
3083 | 3425 | } |
---|
3084 | 3426 | listUI.clear(); |
---|
.. | .. |
---|
3088 | 3430 | { |
---|
3089 | 3431 | assert(copy == group); |
---|
3090 | 3432 | |
---|
3091 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3433 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3092 | 3434 | |
---|
3093 | 3435 | for (Object3D obj : listUI) |
---|
3094 | 3436 | { |
---|
.. | .. |
---|
3154 | 3496 | } |
---|
3155 | 3497 | |
---|
3156 | 3498 | // fix "+" issue |
---|
3157 | | - group.editWindow = this; |
---|
| 3499 | + //group.editWindow = this; |
---|
| 3500 | + group.manipWindow = this; |
---|
3158 | 3501 | |
---|
3159 | 3502 | /* |
---|
3160 | 3503 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3162 | 3505 | currentLayout = sevenButton; |
---|
3163 | 3506 | */ |
---|
3164 | 3507 | radio.layout.doClick(); |
---|
| 3508 | + |
---|
| 3509 | + ClearUnpinned(); |
---|
| 3510 | + SetPinStates(group.selection.size() > 0); |
---|
| 3511 | + if (group.selection.size() == 1) |
---|
| 3512 | + EditSelection(false); |
---|
3165 | 3513 | keepparent = group.parent; |
---|
3166 | 3514 | // PARENT = NULL or not??? |
---|
3167 | 3515 | //group.parent = null; // ROOT |
---|
3168 | 3516 | //group.attributes = -1; |
---|
3169 | 3517 | ResetModel(); |
---|
| 3518 | + |
---|
| 3519 | + cameraView.requestFocusInWindow(); |
---|
3170 | 3520 | refreshContents(true); |
---|
3171 | 3521 | } else if (event.getSource() == editCameraItem) |
---|
3172 | 3522 | { |
---|
3173 | 3523 | cameraView.ProtectCamera(); |
---|
3174 | 3524 | cameraView.repaint(); |
---|
3175 | 3525 | return; |
---|
3176 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3526 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3177 | 3527 | { |
---|
3178 | 3528 | cameraView.RevertCamera(); |
---|
3179 | 3529 | cameraView.repaint(); |
---|
.. | .. |
---|
3190 | 3540 | } |
---|
3191 | 3541 | |
---|
3192 | 3542 | boolean useclient = false; |
---|
3193 | | - cRadio radio; |
---|
3194 | 3543 | |
---|
3195 | 3544 | void ToggleRoot() |
---|
3196 | 3545 | { |
---|
.. | .. |
---|
4145 | 4494 | refreshContents(); |
---|
4146 | 4495 | } |
---|
4147 | 4496 | |
---|
| 4497 | + void RewindLeaves(boolean hide) |
---|
| 4498 | + { |
---|
| 4499 | + group.selection.RewindLeaves(hide); |
---|
| 4500 | + refreshContents(); |
---|
| 4501 | + } |
---|
| 4502 | + |
---|
| 4503 | + void RandomLeaves(boolean hide) |
---|
| 4504 | + { |
---|
| 4505 | + group.selection.RandomLeaves(hide); |
---|
| 4506 | + refreshContents(); |
---|
| 4507 | + } |
---|
| 4508 | + |
---|
4148 | 4509 | void SetTexRes(int tr) |
---|
4149 | 4510 | { |
---|
4150 | 4511 | group.selection.SetTexRes(tr); |
---|
.. | .. |
---|
4216 | 4577 | // } |
---|
4217 | 4578 | // } |
---|
4218 | 4579 | |
---|
4219 | | - static boolean allparams = true; |
---|
4220 | | - |
---|
4221 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4222 | | - |
---|
4223 | 4580 | void EditSelection(boolean newWindow) |
---|
4224 | 4581 | { |
---|
4225 | 4582 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
4227 | 4584 | { |
---|
4228 | 4585 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4229 | 4586 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4230 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4587 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4231 | 4588 | |
---|
4232 | 4589 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4233 | 4590 | if(elem != group || !newWindow) |
---|
.. | .. |
---|
4312 | 4669 | //new Exception().printStackTrace(); |
---|
4313 | 4670 | |
---|
4314 | 4671 | freezemodel = true; |
---|
4315 | | - |
---|
| 4672 | + ClearUnpinned(); |
---|
| 4673 | + |
---|
4316 | 4674 | /**/ |
---|
4317 | 4675 | //switch (event.id) |
---|
4318 | 4676 | { |
---|
.. | .. |
---|
4320 | 4678 | //case 702: // Event.LIST_DESELECT |
---|
4321 | 4679 | group.deselectAll(); |
---|
4322 | 4680 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4323 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4324 | 4681 | if (tps != null) |
---|
4325 | 4682 | { |
---|
4326 | 4683 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4329 | 4686 | |
---|
4330 | 4687 | //if (child.parent != null) |
---|
4331 | 4688 | //child.parent.addSelectee(child); |
---|
| 4689 | + objEditor.SetMaterial(child); |
---|
4332 | 4690 | group.addSelectee(child); |
---|
4333 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4334 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4335 | | - System.err.println("info : " + child.GetPath()); |
---|
4336 | 4691 | } |
---|
4337 | 4692 | } |
---|
4338 | 4693 | // else |
---|
.. | .. |
---|
4342 | 4697 | // System.err.println("info : " + group.GetPath()); |
---|
4343 | 4698 | // } |
---|
4344 | 4699 | |
---|
4345 | | - objEditor.SetText(); // jan 2014 |
---|
4346 | | - |
---|
4347 | 4700 | if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4348 | 4701 | CameraPane.flash = true; |
---|
4349 | 4702 | |
---|
4350 | 4703 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4351 | 4704 | // a camera |
---|
4352 | 4705 | { |
---|
4353 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4706 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
4354 | 4707 | { |
---|
4355 | 4708 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4356 | 4709 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4359 | 4712 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4360 | 4713 | } |
---|
4361 | 4714 | |
---|
| 4715 | + if (tps != null && tps.length == 1) |
---|
| 4716 | + { |
---|
| 4717 | + EditSelection(false); |
---|
| 4718 | + } |
---|
| 4719 | + |
---|
| 4720 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4721 | + |
---|
4362 | 4722 | refreshContents(); |
---|
4363 | 4723 | //return true; |
---|
4364 | 4724 | } |
---|
.. | .. |
---|
4367 | 4727 | |
---|
4368 | 4728 | freezemodel = false; |
---|
4369 | 4729 | } |
---|
| 4730 | + |
---|
| 4731 | + void SetPinStates(boolean enabled) |
---|
| 4732 | + { |
---|
| 4733 | + editButton.setEnabled(enabled); |
---|
| 4734 | + uneditButton.setEnabled(enabled); |
---|
| 4735 | + unselectButton.setEnabled(enabled); |
---|
| 4736 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4737 | + } |
---|
| 4738 | + |
---|
| 4739 | + void refreshContents(boolean cp) |
---|
| 4740 | + { |
---|
| 4741 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4742 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
| 4743 | + { |
---|
| 4744 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4745 | + |
---|
| 4746 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4747 | + { |
---|
| 4748 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4749 | + |
---|
| 4750 | + objEditor.AddInfo(child, this, true); |
---|
| 4751 | + System.err.println("info : " + child.GetPath()); |
---|
| 4752 | + } |
---|
| 4753 | + |
---|
| 4754 | + objEditor.SetText(); // jan 2014 |
---|
| 4755 | + } |
---|
| 4756 | + |
---|
| 4757 | + super.refreshContents(cp); |
---|
| 4758 | + } |
---|
4370 | 4759 | |
---|
4371 | 4760 | void linkSomething(Object3D thing) |
---|
4372 | 4761 | { |
---|
.. | .. |
---|
4449 | 4838 | |
---|
4450 | 4839 | if (cut) |
---|
4451 | 4840 | { |
---|
4452 | | - Save(); |
---|
| 4841 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4842 | +// Save(); |
---|
4453 | 4843 | //int indices[] = jList.getSelectedIndices(); |
---|
4454 | 4844 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4455 | 4845 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4552 | 4942 | |
---|
4553 | 4943 | void paste(boolean expand) |
---|
4554 | 4944 | { |
---|
| 4945 | + if (Globals.SAVEONMAKE) |
---|
| 4946 | + Save(); |
---|
| 4947 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 4948 | + Globals.SAVEONMAKE = false; |
---|
4555 | 4949 | // if (GrafreeD.clipboard == null) |
---|
4556 | 4950 | // return; |
---|
4557 | 4951 | boolean first = true; |
---|
.. | .. |
---|
4611 | 5005 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4612 | 5006 | } |
---|
4613 | 5007 | |
---|
| 5008 | + Globals.SAVEONMAKE = keep; |
---|
4614 | 5009 | ResetModel(); |
---|
4615 | 5010 | refreshContents(); |
---|
4616 | 5011 | } |
---|
.. | .. |
---|
4746 | 5141 | |
---|
4747 | 5142 | void group(Object3D csg, boolean grab) |
---|
4748 | 5143 | { |
---|
| 5144 | + if (Globals.SAVEONMAKE) |
---|
| 5145 | + Save(); |
---|
| 5146 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 5147 | + Globals.SAVEONMAKE = false; |
---|
4749 | 5148 | if (//false) // why?? |
---|
4750 | 5149 | !group.selection.isEmpty()) |
---|
4751 | 5150 | { |
---|
.. | .. |
---|
4859 | 5258 | //node.add(csg); |
---|
4860 | 5259 | //makeSomething(node); |
---|
4861 | 5260 | makeSomething(csg); |
---|
| 5261 | + Globals.SAVEONMAKE = keep; |
---|
4862 | 5262 | } |
---|
4863 | 5263 | |
---|
4864 | 5264 | void Ungroup(Object3D g) |
---|
4865 | 5265 | { |
---|
| 5266 | + if (Globals.SAVEONMAKE) |
---|
| 5267 | + Save(); |
---|
| 5268 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 5269 | + Globals.SAVEONMAKE = false; |
---|
4866 | 5270 | if (g instanceof HiddenObject) |
---|
4867 | 5271 | { |
---|
4868 | 5272 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
4879 | 5283 | objEditor.makeSomething(g.get(i), false); |
---|
4880 | 5284 | } |
---|
4881 | 5285 | } |
---|
| 5286 | + Globals.SAVEONMAKE = keep; |
---|
4882 | 5287 | } |
---|
4883 | 5288 | |
---|
4884 | 5289 | void ungroup() |
---|
.. | .. |
---|
5167 | 5572 | cButton clearpanelButton; |
---|
5168 | 5573 | cButton unselectButton; |
---|
5169 | 5574 | |
---|
| 5575 | + cButton restoreCameraButton; |
---|
| 5576 | + |
---|
5170 | 5577 | cButton saveButton; |
---|
5171 | | - cButton undoButton; |
---|
5172 | | - cButton redoButton; |
---|
5173 | 5578 | cButton oneStepButton; |
---|
| 5579 | + |
---|
| 5580 | + cButton groupButton; |
---|
| 5581 | + cButton ungroupButton; |
---|
| 5582 | + cButton compositeButton; |
---|
| 5583 | + cButton switchButton; |
---|
| 5584 | + cButton loopButton; |
---|
| 5585 | + cButton textureButton; |
---|
| 5586 | + |
---|
| 5587 | + cButton gridButton; |
---|
| 5588 | + cButton boxButton; |
---|
| 5589 | + cButton sphereButton; |
---|
| 5590 | + cButton coneButton; |
---|
| 5591 | + cButton torusButton; |
---|
| 5592 | + cButton superButton; |
---|
| 5593 | + cButton kleinButton; |
---|
| 5594 | + cButton particlesButton; |
---|
| 5595 | + cButton overlayButton; |
---|
| 5596 | + cButton lightButton; |
---|
5174 | 5597 | |
---|
5175 | 5598 | cButton screenfitButton; |
---|
5176 | 5599 | cButton screenfitpointButton; |
---|
.. | .. |
---|
5183 | 5606 | |
---|
5184 | 5607 | cButton setsupportButton; |
---|
5185 | 5608 | |
---|
5186 | | - cButton twoButton; |
---|
5187 | | - cButton sixButton; |
---|
5188 | | - cButton threeButton; |
---|
5189 | | - cButton sevenButton; |
---|
5190 | | - cButton fourButton; // full panel |
---|
5191 | | - cButton oneButton; // full XYZ |
---|
5192 | | - //cButton currentLayout; |
---|
5193 | | - |
---|
5194 | 5609 | // |
---|
5195 | 5610 | //Composite |
---|
5196 | 5611 | Object3D // to do !! |
---|
.. | .. |
---|
5200 | 5615 | //JTree jTree; |
---|
5201 | 5616 | private MenuItem lookAtItem; |
---|
5202 | 5617 | private MenuItem lookFromItem; |
---|
5203 | | - private MenuItem switchItem; |
---|
| 5618 | + private MenuItem switchViewItem; |
---|
5204 | 5619 | private MenuItem cutItem; |
---|
5205 | 5620 | private MenuItem undoItem; |
---|
5206 | 5621 | private MenuItem redoItem; |
---|
5207 | | - private MenuItem duplicateItem; |
---|
| 5622 | + private JMenuItem duplicateItem; |
---|
5208 | 5623 | private MenuItem cloneItem; |
---|
5209 | 5624 | private MenuItem cloneSupportItem; |
---|
5210 | 5625 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5267 | 5682 | private MenuItem showleavesItem; |
---|
5268 | 5683 | private MenuItem markleavesItem; |
---|
5269 | 5684 | private MenuItem unmarkleavesItem; |
---|
| 5685 | + private MenuItem rewindleavesItem; |
---|
| 5686 | + private MenuItem unrewindleavesItem; |
---|
| 5687 | + private MenuItem randomleavesItem; |
---|
| 5688 | + private MenuItem unrandomleavesItem; |
---|
5270 | 5689 | |
---|
5271 | 5690 | private MenuItem flipVItem; |
---|
5272 | 5691 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5288 | 5707 | private MenuItem frontItem; |
---|
5289 | 5708 | private MenuItem cameraItem; |
---|
5290 | 5709 | private MenuItem compositeItem; |
---|
5291 | | - private MenuItem randomItem; |
---|
| 5710 | + private MenuItem switchItem; |
---|
5292 | 5711 | private MenuItem physicsItem; |
---|
5293 | 5712 | private MenuItem frameselectorItem; |
---|
5294 | 5713 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5362 | 5781 | |
---|
5363 | 5782 | Menu cameraMenu; |
---|
5364 | 5783 | MenuItem editCameraItem; |
---|
5365 | | - MenuItem revertCameraItem; |
---|
| 5784 | + MenuItem restoreCameraItem; |
---|
5366 | 5785 | } |
---|