.. | .. |
---|
84 | 84 | |
---|
85 | 85 | void CloneSelection(boolean supports) |
---|
86 | 86 | { |
---|
| 87 | + if (Globals.REPLACEONMAKE) |
---|
| 88 | + Save(); |
---|
| 89 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 90 | + Globals.REPLACEONMAKE = 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.REPLACEONMAKE = 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); |
---|
.. | .. |
---|
525 | 544 | buildToolsMenu(menu); |
---|
526 | 545 | } |
---|
527 | 546 | |
---|
| 547 | + |
---|
528 | 548 | void SetupUI2(ObjEditor oe) |
---|
529 | 549 | { |
---|
| 550 | + // June 2019 |
---|
| 551 | + if (oe == null) |
---|
| 552 | + { |
---|
| 553 | + //super.SetupUI2(this); |
---|
| 554 | + //return; |
---|
| 555 | + } |
---|
| 556 | + |
---|
| 557 | + if (copy != group) |
---|
| 558 | + { |
---|
| 559 | + //super.SetupUI2(this); |
---|
| 560 | + } |
---|
| 561 | + |
---|
530 | 562 | //new Exception().printStackTrace(); |
---|
531 | 563 | |
---|
532 | 564 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
555 | 587 | oe.radioPanel.add(dummyButton); |
---|
556 | 588 | oe.buttonGroup.add(dummyButton); |
---|
557 | 589 | */ |
---|
| 590 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 591 | + |
---|
| 592 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 593 | + |
---|
558 | 594 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
559 | 595 | |
---|
560 | | - oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
561 | | - undoButton.setToolTipText("Undo changes"); |
---|
562 | | - undoButton.addActionListener(this); |
---|
| 596 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + //minButton.setToolTipText("Minimize window"); |
---|
| 598 | + //minButton.addActionListener(this); |
---|
563 | 599 | |
---|
564 | | - oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
565 | | - redoButton.setToolTipText("Redo changes"); |
---|
566 | | - redoButton.addActionListener(this); |
---|
| 600 | + if (Globals.ADVANCED) |
---|
| 601 | + { |
---|
| 602 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 603 | + maxButton.setToolTipText("Maximize window"); |
---|
| 604 | + maxButton.addActionListener(this); |
---|
| 605 | + } |
---|
567 | 606 | |
---|
568 | | - oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
569 | | - saveButton.setToolTipText("Save changes"); |
---|
| 607 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 608 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 609 | + fullButton.addActionListener(this); |
---|
| 610 | + |
---|
| 611 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 612 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 613 | + screenfitButton.addActionListener(this); |
---|
| 614 | + |
---|
| 615 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 616 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 617 | + restoreCameraButton.addActionListener(this); |
---|
| 618 | + |
---|
| 619 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 620 | + saveButton.setToolTipText("New version"); |
---|
570 | 621 | saveButton.addActionListener(this); |
---|
| 622 | + |
---|
| 623 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 624 | + undoButton.setToolTipText("Previous version"); |
---|
| 625 | + undoButton.addActionListener(this); |
---|
| 626 | + undoButton.setEnabled(false); |
---|
571 | 627 | |
---|
572 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 628 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 629 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 630 | + restoreButton.setToolTipText("Restore current"); |
---|
| 631 | + restoreButton.addActionListener(this); |
---|
| 632 | + restoreButton.setEnabled(false); |
---|
| 633 | + |
---|
| 634 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 635 | + replaceButton.setToolTipText("Replace current"); |
---|
| 636 | + replaceButton.addActionListener(this); |
---|
| 637 | + replaceButton.setEnabled(false); |
---|
| 638 | + |
---|
| 639 | + copyOptionsPanel.add(updown); |
---|
| 640 | + |
---|
| 641 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 642 | + redoButton.setToolTipText("Next version"); |
---|
| 643 | + redoButton.addActionListener(this); |
---|
| 644 | + redoButton.setEnabled(false); |
---|
| 645 | + |
---|
| 646 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
573 | 647 | liveCB.setToolTipText("Enable animation"); |
---|
574 | 648 | liveCB.addItemListener(this); |
---|
575 | 649 | |
---|
576 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 650 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
577 | 651 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
578 | 652 | oneStepButton.addActionListener(this); |
---|
579 | 653 | |
---|
580 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 654 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
581 | 655 | fastCB.setToolTipText("Fast mode"); |
---|
582 | 656 | fastCB.addItemListener(this); |
---|
583 | 657 | |
---|
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); |
---|
| 658 | + //oe.toolboxPanel.Return(); |
---|
| 659 | + |
---|
| 660 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 661 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 662 | +// trackCB.addItemListener(this); |
---|
591 | 663 | |
---|
592 | 664 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
593 | 665 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
599 | 671 | snapobjectButton.setToolTipText("Snap Object"); |
---|
600 | 672 | } |
---|
601 | 673 | |
---|
602 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
603 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
604 | | - flashSelectionButton.addActionListener(this); |
---|
| 674 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
605 | 675 | |
---|
606 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
607 | | - |
---|
608 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 676 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
609 | 677 | twoButton.setToolTipText("Show center view only"); |
---|
610 | 678 | twoButton.addActionListener(this); |
---|
611 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 679 | + this.fullscreenLayout = twoButton; |
---|
| 680 | + |
---|
| 681 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
612 | 682 | fourButton.addActionListener(this); |
---|
613 | 683 | fourButton.setToolTipText("Show left panel only"); |
---|
614 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 684 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
615 | 685 | sixButton.setToolTipText("2-column layout left"); |
---|
616 | 686 | sixButton.addActionListener(this); |
---|
617 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 687 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
618 | 688 | threeButton.setToolTipText("2-column layout right"); |
---|
619 | 689 | threeButton.addActionListener(this); |
---|
620 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 690 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
621 | 691 | sevenButton.setToolTipText("3-column layout"); |
---|
622 | 692 | sevenButton.addActionListener(this); |
---|
623 | 693 | // |
---|
624 | 694 | |
---|
625 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 695 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
626 | 696 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
627 | 697 | rootButton.addActionListener(this); |
---|
628 | 698 | |
---|
629 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 699 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
630 | 700 | closeButton.setToolTipText("Close tab"); |
---|
631 | 701 | closeButton.addActionListener(this); |
---|
632 | 702 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
633 | 703 | //clearButton.addActionListener(this); |
---|
634 | | - |
---|
635 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 704 | + |
---|
| 705 | + // INSERT |
---|
| 706 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 707 | + gridButton.setToolTipText("Create grid"); |
---|
| 708 | + gridButton.addActionListener(this); |
---|
| 709 | + |
---|
| 710 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 711 | + boxButton.setToolTipText("Create box"); |
---|
| 712 | + boxButton.addActionListener(this); |
---|
| 713 | + |
---|
| 714 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 715 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 716 | + sphereButton.addActionListener(this); |
---|
| 717 | + |
---|
| 718 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 719 | + coneButton.setToolTipText("Create cone"); |
---|
| 720 | + coneButton.addActionListener(this); |
---|
| 721 | + |
---|
| 722 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 723 | + torusButton.setToolTipText("Create torus"); |
---|
| 724 | + torusButton.addActionListener(this); |
---|
| 725 | + |
---|
| 726 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 727 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 728 | + superButton.addActionListener(this); |
---|
| 729 | + |
---|
| 730 | + if (Globals.ADVANCED) |
---|
| 731 | + { |
---|
| 732 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 733 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 734 | + kleinButton.addActionListener(this); |
---|
| 735 | + } |
---|
636 | 736 | |
---|
637 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
638 | | - editButton.setToolTipText("Edit selection"); |
---|
| 737 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 738 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 739 | + particlesButton.addActionListener(this); |
---|
| 740 | + |
---|
| 741 | + oe.toolboxPanel.Return(); |
---|
| 742 | + |
---|
| 743 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 744 | + groupButton.setToolTipText("Create group"); |
---|
| 745 | + groupButton.addActionListener(this); |
---|
| 746 | + |
---|
| 747 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 748 | + compositeButton.setToolTipText("Create composite"); |
---|
| 749 | + compositeButton.addActionListener(this); |
---|
| 750 | + |
---|
| 751 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 752 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 753 | + switchButton.addActionListener(this); |
---|
| 754 | + |
---|
| 755 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 756 | + loopButton.setToolTipText("Create loop"); |
---|
| 757 | + loopButton.addActionListener(this); |
---|
| 758 | + |
---|
| 759 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 760 | + textureButton.setToolTipText("Create texture"); |
---|
| 761 | + textureButton.addActionListener(this); |
---|
| 762 | + |
---|
| 763 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 764 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 765 | + overlayButton.addActionListener(this); |
---|
| 766 | + |
---|
| 767 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 768 | + lightButton.setToolTipText("Create light"); |
---|
| 769 | + lightButton.addActionListener(this); |
---|
| 770 | + |
---|
| 771 | + for (int i=6; --i>=0;) |
---|
| 772 | + { |
---|
| 773 | + oe.toolboxPanel.Return(); |
---|
| 774 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 775 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 776 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 777 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 778 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 779 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 780 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 781 | + } |
---|
| 782 | + |
---|
| 783 | + // EDIT panel |
---|
| 784 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 785 | + editButton.setToolTipText("Pin selection controls"); |
---|
639 | 786 | editButton.addActionListener(this); |
---|
640 | 787 | |
---|
641 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
642 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 788 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 789 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
643 | 790 | uneditButton.addActionListener(this); |
---|
644 | 791 | |
---|
645 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
646 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 792 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 793 | + allParamsButton.setToolTipText("Show all controle"); |
---|
647 | 794 | allParamsButton.addActionListener(this); |
---|
648 | 795 | |
---|
649 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 796 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | 797 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
651 | 798 | clearPanelButton.addActionListener(this); |
---|
652 | 799 | |
---|
653 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 800 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | 801 | unselectButton.setToolTipText("Unselect"); |
---|
655 | 802 | unselectButton.addActionListener(this); |
---|
656 | 803 | |
---|
657 | | - commandsPanel.preferredHeight = 1; |
---|
| 804 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 805 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 806 | + flashSelectionButton.addActionListener(this); |
---|
658 | 807 | |
---|
659 | | - oe.treePanel.add(commandsPanel); |
---|
660 | | - oe.treePanel.Return(); |
---|
| 808 | + editCommandsPanel.preferredHeight = 1; |
---|
| 809 | + |
---|
| 810 | + SetPinStates(false); |
---|
| 811 | +// oe.treePanel.add(commandsPanel); |
---|
| 812 | +// oe.treePanel.Return(); |
---|
661 | 813 | |
---|
662 | 814 | // oe.aConstraints.gridx += 1; |
---|
663 | 815 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
674 | 826 | |
---|
675 | 827 | JScrollPane jSP; |
---|
676 | 828 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
677 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 829 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
678 | 830 | ResetModel(); |
---|
679 | 831 | |
---|
680 | 832 | oe.treePanel.add(jSPPanel); |
---|
681 | 833 | oe.treePanel.Return(); |
---|
682 | 834 | |
---|
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 | 835 | oe.treePanel.add(copyOptionsPanel); |
---|
699 | 836 | oe.treePanel.Return(); |
---|
| 837 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 10, 0); |
---|
| 838 | + versionField = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 839 | + sliderPane.preferredHeight = 1; |
---|
700 | 840 | |
---|
701 | 841 | // mainPanel.setDividerLocation(0.5); //1.0); |
---|
702 | 842 | // mainPanel.setResizeWeight(0.5); |
---|
.. | .. |
---|
725 | 865 | |
---|
726 | 866 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
727 | 867 | { |
---|
| 868 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 869 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 870 | + colorCB.addItemListener(this); |
---|
| 871 | + |
---|
| 872 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 873 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 874 | + materialCB.addItemListener(this); |
---|
| 875 | + |
---|
| 876 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 877 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 878 | + textureCB.addItemListener(this); |
---|
| 879 | + |
---|
| 880 | + panel.Return(); |
---|
| 881 | + |
---|
728 | 882 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
729 | 883 | boxCB.setToolTipText("Display bounding boxes"); |
---|
730 | 884 | boxCB.addItemListener(this); |
---|
731 | 885 | |
---|
732 | 886 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
733 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 887 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
734 | 888 | zoomBoxCB.addItemListener(this); |
---|
735 | 889 | |
---|
736 | 890 | if (true) // Globals.ADVANCED) |
---|
737 | 891 | { |
---|
738 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
739 | | - supportCB.setToolTipText("Enable rigging"); |
---|
740 | | - supportCB.addItemListener(this); |
---|
| 892 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 893 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 894 | +// supportCB.addItemListener(this); |
---|
| 895 | + |
---|
| 896 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 897 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 898 | + freezeCB.addItemListener(this); |
---|
741 | 899 | |
---|
742 | 900 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
743 | 901 | // localCB.addItemListener(this); |
---|
744 | 902 | |
---|
| 903 | + panel.Return(); |
---|
| 904 | + |
---|
745 | 905 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
746 | 906 | crowdCB.setToolTipText("Used for crowds"); |
---|
747 | 907 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
758 | 918 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
759 | 919 | // speakerMocapCB.addItemListener(this); |
---|
760 | 920 | |
---|
| 921 | + panel.Return(); |
---|
| 922 | + |
---|
761 | 923 | if (false) |
---|
762 | 924 | { |
---|
763 | 925 | // handled in scripts |
---|
.. | .. |
---|
772 | 934 | //constraints.gridy += 1; |
---|
773 | 935 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
774 | 936 | smoothfocusCB.addItemListener(this); |
---|
| 937 | + panel.Return(); |
---|
775 | 938 | } |
---|
776 | 939 | |
---|
777 | 940 | //constraints.gridx += 1; |
---|
778 | 941 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
779 | 942 | // debugCB.addItemListener(this); |
---|
780 | 943 | |
---|
| 944 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 945 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 946 | + trackCB.addItemListener(this); |
---|
| 947 | + |
---|
781 | 948 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 949 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
782 | 950 | oeilCB.addItemListener(this); |
---|
783 | 951 | |
---|
| 952 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 953 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 954 | + shadowCB.addItemListener(this); |
---|
| 955 | + |
---|
| 956 | + panel.Return(); |
---|
| 957 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 958 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 959 | + toggleTextureCB.addItemListener(this); |
---|
| 960 | + |
---|
| 961 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 962 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 963 | + toggleSwitchCB.addItemListener(this); |
---|
| 964 | + |
---|
| 965 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 966 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 967 | + autokeepCB.addItemListener(this); |
---|
| 968 | + |
---|
| 969 | + panel.Return(); |
---|
| 970 | + if (Globals.ADVANCED) |
---|
| 971 | + { |
---|
784 | 972 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
785 | 973 | lookAtCB.setToolTipText("Look-at target"); |
---|
786 | 974 | lookAtCB.addItemListener(this); |
---|
| 975 | + } |
---|
787 | 976 | |
---|
788 | 977 | } |
---|
789 | 978 | |
---|
790 | 979 | cGridBag fill = new cGridBag(); |
---|
791 | | - |
---|
792 | 980 | fill.preferredHeight = 200; |
---|
| 981 | + cGridBag fill2 = new cGridBag(); |
---|
| 982 | + fill2.preferredHeight = 200; |
---|
| 983 | + cGridBag fill3 = new cGridBag(); |
---|
| 984 | + fill3.preferredHeight = 200; |
---|
793 | 985 | |
---|
794 | 986 | panel.add(fill); |
---|
| 987 | + panel.add(fill2); |
---|
| 988 | + panel.add(fill3); |
---|
795 | 989 | |
---|
796 | 990 | } |
---|
797 | 991 | |
---|
798 | 992 | void EditObject(Object3D obj) |
---|
799 | 993 | { |
---|
800 | 994 | cRadio radioButton = new cRadio(obj.name); |
---|
| 995 | + |
---|
| 996 | + // June 2019. Patch to avoid bug with transparency. |
---|
| 997 | + radioButton.hadMaterial = obj.material != null; |
---|
| 998 | + if (!radioButton.hadMaterial) |
---|
| 999 | + { |
---|
| 1000 | + obj.material = new cMaterial(); |
---|
| 1001 | + } |
---|
| 1002 | + |
---|
801 | 1003 | radioButton.SetObject(obj); |
---|
802 | 1004 | radioButton.layout = sevenButton; |
---|
803 | 1005 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
809 | 1011 | |
---|
810 | 1012 | void SetupViews(ObjEditor oe) |
---|
811 | 1013 | { |
---|
| 1014 | + theFrame = this; |
---|
| 1015 | + |
---|
812 | 1016 | oe.SetupViews(); |
---|
813 | 1017 | |
---|
814 | 1018 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
817 | 1021 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
818 | 1022 | } |
---|
819 | 1023 | |
---|
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; |
---|
| 1024 | + cToggleButton liveCB; |
---|
| 1025 | + cCheckBox supportCB; |
---|
| 1026 | + cCheckBox localCB; |
---|
| 1027 | + cCheckBox crowdCB; |
---|
| 1028 | + cCheckBox smoothCB; |
---|
| 1029 | + cToggleButton fastCB; |
---|
| 1030 | + cCheckBox slowCB; |
---|
| 1031 | + cCheckBox boxCB; |
---|
| 1032 | + cCheckBox zoomBoxCB; |
---|
| 1033 | + cCheckBox freezeCB; |
---|
| 1034 | + //cToggleButton trackCB; |
---|
| 1035 | + cCheckBox trackCB; |
---|
| 1036 | + cCheckBox smoothfocusCB; |
---|
831 | 1037 | // JCheckBox speakerMocapCB; |
---|
832 | | - JCheckBox speakerCameraCB; |
---|
833 | | - JCheckBox speakerFocusCB; |
---|
834 | | - JCheckBox debugCB; |
---|
835 | | - JCheckBox oeilCB; |
---|
836 | | - JCheckBox lookAtCB; |
---|
| 1038 | + cCheckBox speakerCameraCB; |
---|
| 1039 | + cCheckBox speakerFocusCB; |
---|
| 1040 | + cCheckBox debugCB; |
---|
| 1041 | + |
---|
| 1042 | + cCheckBox oeilCB; |
---|
| 1043 | + cCheckBox shadowCB; |
---|
| 1044 | + cCheckBox autokeepCB; |
---|
| 1045 | + cCheckBox lookAtCB; |
---|
837 | 1046 | |
---|
838 | 1047 | // static int COLOR = 1; |
---|
839 | 1048 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
841 | 1050 | |
---|
842 | 1051 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
843 | 1052 | |
---|
844 | | - JCheckBox colorCB; |
---|
845 | | - JCheckBox materialCB; |
---|
846 | | - JCheckBox textureCB; |
---|
| 1053 | + cCheckBox colorCB; |
---|
| 1054 | + cCheckBox materialCB; |
---|
| 1055 | + cCheckBox textureCB; |
---|
847 | 1056 | |
---|
848 | 1057 | public void itemStateChanged(ItemEvent e) |
---|
849 | 1058 | { |
---|
.. | .. |
---|
936 | 1145 | { |
---|
937 | 1146 | cameraView.ToggleOeil(); |
---|
938 | 1147 | } |
---|
| 1148 | + else if(e.getSource() == shadowCB) |
---|
| 1149 | + { |
---|
| 1150 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1151 | + } |
---|
| 1152 | + else if(e.getSource() == freezeCB) |
---|
| 1153 | + { |
---|
| 1154 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1155 | + } |
---|
| 1156 | + else if(e.getSource() == autokeepCB) |
---|
| 1157 | + { |
---|
| 1158 | + Globals.REPLACEONMAKE ^= true; |
---|
| 1159 | + } |
---|
939 | 1160 | else if(e.getSource() == lookAtCB) |
---|
940 | 1161 | { |
---|
941 | 1162 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
952 | 1173 | |
---|
953 | 1174 | /**/ |
---|
954 | 1175 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
955 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1176 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1177 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
956 | 1178 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
957 | 1179 | // We can't move the root node or an empty selection |
---|
958 | 1180 | return; |
---|
.. | .. |
---|
1015 | 1237 | } |
---|
1016 | 1238 | } |
---|
1017 | 1239 | |
---|
1018 | | - String string = (String) object; |
---|
1019 | | - |
---|
1020 | 1240 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1021 | 1241 | // if( object instanceof java.io.File[]) |
---|
1022 | 1242 | // { |
---|
.. | .. |
---|
1024 | 1244 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1025 | 1245 | // return; |
---|
1026 | 1246 | // } |
---|
| 1247 | + |
---|
| 1248 | + String string = object.toString(); |
---|
1027 | 1249 | |
---|
1028 | 1250 | // File path for Mac and Windows |
---|
1029 | 1251 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1069 | 1291 | |
---|
1070 | 1292 | assert target == objEditor.jTree; |
---|
1071 | 1293 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1294 | + Object3D destinationLeaf; |
---|
1072 | 1295 | try { |
---|
1073 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1296 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1074 | 1297 | } catch (Exception e) { |
---|
1075 | 1298 | System.out.println("destinationPath : " + destinationPath); |
---|
1076 | 1299 | return; |
---|
1077 | 1300 | } |
---|
1078 | 1301 | |
---|
1079 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1302 | + for (int i=group.selection.size(); --i>=0;) |
---|
1080 | 1303 | { |
---|
| 1304 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1305 | + |
---|
| 1306 | + // Cannot move into itself |
---|
| 1307 | + if (child == destinationLeaf) |
---|
| 1308 | + return; |
---|
| 1309 | + } |
---|
| 1310 | + |
---|
| 1311 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1312 | +// { |
---|
1081 | 1313 | loadClipboard(true); |
---|
1082 | 1314 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
1083 | 1315 | pasteInto(false, false); |
---|
1084 | | - } else { |
---|
1085 | | - loadClipboard(false); |
---|
1086 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1087 | | - pasteInto(false, false); // true); // ??? |
---|
1088 | | - } |
---|
| 1316 | +// } else { |
---|
| 1317 | +// loadClipboard(false); |
---|
| 1318 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1319 | +// pasteInto(false, false); // true); // ??? |
---|
| 1320 | +// } |
---|
1089 | 1321 | } |
---|
1090 | 1322 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1091 | 1323 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1190 | 1422 | { |
---|
1191 | 1423 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1192 | 1424 | //heightFieldItem.addActionListener(this); |
---|
1193 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1194 | | - gridItem.addActionListener(this); |
---|
1195 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1196 | | - rectoidItem.addActionListener(this); |
---|
1197 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1198 | | - ellipsoidItem.addActionListener(this); |
---|
1199 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1200 | | - coneItem.addActionListener(this); |
---|
1201 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1202 | | - torusItem.addActionListener(this); |
---|
1203 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1204 | | - superItem.addActionListener(this); |
---|
| 1425 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1426 | +// gridItem.addActionListener(this); |
---|
| 1427 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1428 | +// rectoidItem.addActionListener(this); |
---|
| 1429 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1430 | +// ellipsoidItem.addActionListener(this); |
---|
| 1431 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1432 | +// coneItem.addActionListener(this); |
---|
| 1433 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1434 | +// torusItem.addActionListener(this); |
---|
| 1435 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1436 | +// superItem.addActionListener(this); |
---|
| 1437 | + |
---|
| 1438 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1439 | + cameraItem.addActionListener(this); |
---|
| 1440 | + |
---|
| 1441 | + if (!Globals.ADVANCED) |
---|
| 1442 | + { |
---|
1205 | 1443 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1206 | 1444 | kleinItem.addActionListener(this); |
---|
1207 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1208 | | - particleItem.addActionListener(this); |
---|
| 1445 | + } |
---|
| 1446 | + |
---|
| 1447 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1448 | +// particleItem.addActionListener(this); |
---|
1209 | 1449 | if (Globals.ADVANCED) |
---|
1210 | 1450 | { |
---|
1211 | 1451 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1231 | 1471 | } |
---|
1232 | 1472 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1233 | 1473 | bezierItem.addActionListener(this); |
---|
1234 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1235 | | - overlayItem.addActionListener(this); |
---|
1236 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1237 | | - lightItem.addActionListener(this); |
---|
| 1474 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1475 | +// overlayItem.addActionListener(this); |
---|
| 1476 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1477 | +// lightItem.addActionListener(this); |
---|
1238 | 1478 | menu.add("-"); |
---|
1239 | 1479 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1240 | 1480 | //superLoopItem.addActionListener(this); |
---|
1241 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1242 | | - loopItem.addActionListener(this); |
---|
| 1481 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1482 | +// loopItem.addActionListener(this); |
---|
1243 | 1483 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1244 | 1484 | doubleItem.addActionListener(this); |
---|
1245 | 1485 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1255 | 1495 | animationItem.addItemListener(this); |
---|
1256 | 1496 | animationItem.setState(Globals.ANIMATION); |
---|
1257 | 1497 | |
---|
| 1498 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1499 | + archiveItem.addActionListener(this); |
---|
| 1500 | + |
---|
1258 | 1501 | menu.add("-"); |
---|
1259 | 1502 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1260 | 1503 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1267 | 1510 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1268 | 1511 | reduce34MorphItem.addActionListener(this); |
---|
1269 | 1512 | menu.add("-"); |
---|
| 1513 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1514 | + memoryItem.addActionListener(this); |
---|
1270 | 1515 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1271 | 1516 | computeAOItem.addActionListener(this); |
---|
1272 | 1517 | |
---|
.. | .. |
---|
1275 | 1520 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1276 | 1521 | mirrorItem.addActionListener(this); |
---|
1277 | 1522 | menu.add("-"); |
---|
1278 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1279 | | - memoryItem.addActionListener(this); |
---|
1280 | 1523 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1281 | 1524 | analyzeItem.addActionListener(this); |
---|
1282 | 1525 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1420 | 1663 | shadow.material = new cMaterial(obj.material); |
---|
1421 | 1664 | shadow.material.diffuse = 0.0001f; |
---|
1422 | 1665 | shadow.material.specular = 0.0001f; |
---|
| 1666 | + //shadow.projectedVertices[1].x = 300; |
---|
1423 | 1667 | |
---|
1424 | 1668 | makeSomething(shadow); |
---|
1425 | 1669 | } |
---|
| 1670 | + |
---|
| 1671 | + private void ClearUnpinned() |
---|
| 1672 | + { |
---|
| 1673 | + //for (Object3D obj : listUI) |
---|
| 1674 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1675 | + { |
---|
| 1676 | + Object3D obj = listUI.elementAt(i); |
---|
| 1677 | + if (!obj.pinned) |
---|
| 1678 | + { |
---|
| 1679 | + obj.CloseUI(); |
---|
| 1680 | + listUI.remove(i); |
---|
| 1681 | + } |
---|
| 1682 | + } |
---|
| 1683 | + } |
---|
1426 | 1684 | |
---|
1427 | 1685 | /** |
---|
1428 | 1686 | * applyExample |
---|
.. | .. |
---|
1667 | 1925 | { |
---|
1668 | 1926 | ScreenFit(); |
---|
1669 | 1927 | } else |
---|
1670 | | - if (source == switchItem) |
---|
| 1928 | + if (source == switchViewItem) |
---|
1671 | 1929 | { |
---|
1672 | 1930 | cVector v1 = new cVector(); |
---|
1673 | 1931 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1676 | 1934 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1677 | 1935 | objEditor.cameraView.repaint(); |
---|
1678 | 1936 | } else |
---|
1679 | | - if (source == rectoidItem) |
---|
| 1937 | + if (source == rectoidItem || source == boxButton) |
---|
1680 | 1938 | { |
---|
1681 | 1939 | makeSomething(new Box()); |
---|
1682 | 1940 | } else |
---|
1683 | | - if (source == particleItem) |
---|
| 1941 | + if (source == particleItem || source == particlesButton) |
---|
1684 | 1942 | { |
---|
1685 | 1943 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1686 | 1944 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1759 | 2017 | |
---|
1760 | 2018 | makeSomething(obj); |
---|
1761 | 2019 | } else |
---|
1762 | | - if (source == gridItem) |
---|
| 2020 | + if (source == gridItem || source == gridButton) |
---|
1763 | 2021 | { |
---|
1764 | 2022 | makeSomething(new Grid()); |
---|
1765 | 2023 | } else |
---|
1766 | | - if (source == ellipsoidItem) |
---|
| 2024 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1767 | 2025 | { |
---|
1768 | 2026 | makeSomething(new Sphere()); |
---|
1769 | 2027 | } else |
---|
1770 | | - if (source == coneItem) |
---|
| 2028 | + if (source == coneItem || source == coneButton) |
---|
1771 | 2029 | { |
---|
1772 | 2030 | makeSomething(new Cone()); |
---|
1773 | 2031 | } else |
---|
1774 | | - if (source == torusItem) |
---|
| 2032 | + if (source == torusItem || source == torusButton) |
---|
1775 | 2033 | { |
---|
1776 | 2034 | makeSomething(new Torus()); |
---|
1777 | 2035 | } else |
---|
1778 | | - if (source == superItem) |
---|
| 2036 | + if (source == superItem || source == superButton) |
---|
1779 | 2037 | { |
---|
1780 | 2038 | makeSomething(new Superellipsoid()); |
---|
1781 | 2039 | } else |
---|
1782 | | - if (source == kleinItem) |
---|
| 2040 | + if (source == kleinItem || source == kleinButton) |
---|
1783 | 2041 | { |
---|
1784 | 2042 | makeSomething(new Klein()); |
---|
1785 | 2043 | } else |
---|
.. | .. |
---|
1799 | 2057 | { |
---|
1800 | 2058 | makeSomething(new BezierSurface()); |
---|
1801 | 2059 | } else |
---|
1802 | | - if (source == overlayItem) |
---|
| 2060 | + if (source == overlayItem || source == overlayButton) |
---|
1803 | 2061 | { |
---|
1804 | 2062 | /* |
---|
1805 | 2063 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1847 | 2105 | s.setup(); |
---|
1848 | 2106 | makeSomething(s); |
---|
1849 | 2107 | } else |
---|
1850 | | - if (source == lightItem) |
---|
| 2108 | + if (source == lightItem || source == lightButton) |
---|
1851 | 2109 | { |
---|
1852 | 2110 | makeSomething(new Light()); |
---|
1853 | 2111 | } else |
---|
.. | .. |
---|
1897 | 2155 | |
---|
1898 | 2156 | group(g); |
---|
1899 | 2157 | } else |
---|
1900 | | - if (source == loopItem) |
---|
| 2158 | + if (source == loopItem || source == loopButton) |
---|
1901 | 2159 | { |
---|
1902 | 2160 | Composite csg = new GroupLeaf(); |
---|
1903 | 2161 | csg.count = 5; |
---|
1904 | 2162 | group(csg); |
---|
1905 | | - Composite child = new cGroup(); |
---|
| 2163 | + Composite child = new cGroup("Branch"); |
---|
1906 | 2164 | csg.addChild(child); |
---|
1907 | 2165 | child.addChild(csg); |
---|
1908 | 2166 | } else |
---|
1909 | 2167 | if (source == doubleItem) |
---|
1910 | 2168 | { |
---|
1911 | | - Composite csg = new GroupLeaf(); |
---|
| 2169 | + Composite csg = new GroupLeaf("Fork"); |
---|
1912 | 2170 | csg.count = 5; |
---|
1913 | 2171 | group(csg); |
---|
1914 | | - Composite child = new cGroup(); |
---|
| 2172 | + Composite child = new cGroup("Branch A"); |
---|
1915 | 2173 | csg.addChild(child); |
---|
1916 | 2174 | child.addChild(csg); |
---|
1917 | | - child = new cGroup(); |
---|
| 2175 | + child = new cGroup("Branch B"); |
---|
1918 | 2176 | csg.addChild(child); |
---|
1919 | 2177 | child.addChild(csg); |
---|
1920 | 2178 | } else |
---|
1921 | 2179 | if (source == tripleItem) |
---|
1922 | 2180 | { |
---|
1923 | | - Composite csg = new GroupLeaf(); |
---|
| 2181 | + Composite csg = new GroupLeaf("Trident"); |
---|
1924 | 2182 | csg.count = 4; |
---|
1925 | 2183 | group(csg); |
---|
1926 | 2184 | Composite child = new cGroup(); |
---|
.. | .. |
---|
1970 | 2228 | { |
---|
1971 | 2229 | DumpObject(); |
---|
1972 | 2230 | } else |
---|
| 2231 | + if (source == minButton) |
---|
| 2232 | + { |
---|
| 2233 | + Minimize(); |
---|
| 2234 | + } else |
---|
| 2235 | + if (source == maxButton) |
---|
| 2236 | + { |
---|
| 2237 | + Maximize(); |
---|
| 2238 | + } else |
---|
| 2239 | + if (source == fullButton) |
---|
| 2240 | + { |
---|
| 2241 | + ToggleFullScreen(); |
---|
| 2242 | + } else |
---|
1973 | 2243 | if (source == undoButton) |
---|
1974 | 2244 | { |
---|
| 2245 | + // Go to previous version |
---|
| 2246 | + //if (!Undo()) |
---|
| 2247 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
1975 | 2248 | Undo(); |
---|
| 2249 | + } else |
---|
| 2250 | + if (source == restoreButton) |
---|
| 2251 | + { |
---|
| 2252 | + // Restore current version |
---|
| 2253 | + Restore(); |
---|
| 2254 | + } else |
---|
| 2255 | + if (source == replaceButton) |
---|
| 2256 | + { |
---|
| 2257 | + // Overwrite current version |
---|
| 2258 | + Replace(); |
---|
1976 | 2259 | } else |
---|
1977 | 2260 | if (source == redoButton) |
---|
1978 | 2261 | { |
---|
| 2262 | + // Go to next version |
---|
1979 | 2263 | Redo(); |
---|
1980 | 2264 | } else |
---|
1981 | 2265 | if (source == saveButton) |
---|
1982 | 2266 | { |
---|
1983 | | - Save(); |
---|
| 2267 | + // Save a new version |
---|
| 2268 | + if (!Save(true)) |
---|
| 2269 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
1984 | 2270 | } else |
---|
1985 | 2271 | if (source == oneStepButton) |
---|
1986 | 2272 | { |
---|
.. | .. |
---|
1989 | 2275 | } else |
---|
1990 | 2276 | if (source == screenfitButton) |
---|
1991 | 2277 | { |
---|
1992 | | - //Reload(lastConverter, lastFilename, true); |
---|
1993 | 2278 | ScreenFit(); |
---|
1994 | 2279 | } else |
---|
1995 | 2280 | if (source == screenfitpointButton) |
---|
1996 | 2281 | { |
---|
1997 | | - //Reload(lastConverter, lastFilename, true); |
---|
1998 | 2282 | ScreenFitPoint(); |
---|
1999 | 2283 | } else |
---|
2000 | 2284 | if (source == snapobjectButton) |
---|
2001 | 2285 | { |
---|
2002 | | - //Reload(lastConverter, lastFilename, true); |
---|
2003 | 2286 | SnapObject(); |
---|
2004 | 2287 | } else |
---|
2005 | 2288 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2375 | 2658 | { |
---|
2376 | 2659 | ClearSelection(true); |
---|
2377 | 2660 | } else |
---|
2378 | | - if (source == grabItem) |
---|
| 2661 | + if (source == grabItem || source == groupButton) |
---|
2379 | 2662 | { |
---|
2380 | | - group(new cGroup(), true); |
---|
| 2663 | + group(new cGroup(), false); // true); |
---|
2381 | 2664 | } else |
---|
2382 | 2665 | if (source == hideItem) |
---|
2383 | 2666 | { |
---|
.. | .. |
---|
2395 | 2678 | { |
---|
2396 | 2679 | makeSomething(new Camera()); |
---|
2397 | 2680 | } else |
---|
2398 | | - if (source == compositeItem) |
---|
| 2681 | + if (source == compositeItem || source == compositeButton) |
---|
2399 | 2682 | { |
---|
2400 | 2683 | group(new Composite()); |
---|
2401 | 2684 | } else |
---|
2402 | | - if (source == randomItem) |
---|
| 2685 | + if (source == switchItem || source == switchButton) |
---|
2403 | 2686 | { |
---|
2404 | 2687 | RandomNode random = new RandomNode(); |
---|
2405 | 2688 | group(random); |
---|
.. | .. |
---|
2501 | 2784 | { |
---|
2502 | 2785 | group(new cLinker()); |
---|
2503 | 2786 | } else |
---|
2504 | | - if (source == textureItem) |
---|
| 2787 | + if (source == textureItem || source == textureButton) |
---|
2505 | 2788 | { |
---|
2506 | 2789 | group(new TextureNode()); |
---|
2507 | 2790 | } else |
---|
.. | .. |
---|
2521 | 2804 | { |
---|
2522 | 2805 | CastShadow(2); |
---|
2523 | 2806 | } else |
---|
2524 | | - if (source == ungroupItem) |
---|
| 2807 | + if (source == ungroupItem || source == ungroupButton) |
---|
2525 | 2808 | { |
---|
2526 | | - //ungroup(); |
---|
| 2809 | + boolean hasRoot = false; |
---|
| 2810 | + |
---|
2527 | 2811 | for (int i=0; i<group.selection.size(); i++) |
---|
2528 | 2812 | { |
---|
2529 | | - Ungroup(group.selection.get(i)); |
---|
| 2813 | + if (group.selection.get(i) == group) |
---|
| 2814 | + { |
---|
| 2815 | + hasRoot = true; |
---|
| 2816 | + break; |
---|
| 2817 | + } |
---|
2530 | 2818 | } |
---|
2531 | 2819 | |
---|
2532 | | - ClearSelection(false); |
---|
2533 | | - |
---|
2534 | | - refreshContents(); |
---|
| 2820 | + if (!hasRoot) |
---|
| 2821 | + { |
---|
| 2822 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2823 | + { |
---|
| 2824 | + Ungroup(group.selection.get(i)); |
---|
| 2825 | + } |
---|
| 2826 | + |
---|
| 2827 | + ClearSelection(false); |
---|
| 2828 | + |
---|
| 2829 | + refreshContents(); |
---|
| 2830 | + } |
---|
2535 | 2831 | } else |
---|
2536 | 2832 | if (source == genUVItem) |
---|
2537 | 2833 | { |
---|
.. | .. |
---|
2608 | 2904 | if (source == unmarkleavesItem) |
---|
2609 | 2905 | { |
---|
2610 | 2906 | MarkLeaves(false); |
---|
| 2907 | + } else |
---|
| 2908 | + if (source == rewindleavesItem) |
---|
| 2909 | + { |
---|
| 2910 | + RewindLeaves(true); |
---|
| 2911 | + } else |
---|
| 2912 | + if (source == unrewindleavesItem) |
---|
| 2913 | + { |
---|
| 2914 | + RewindLeaves(false); |
---|
| 2915 | + } else |
---|
| 2916 | + if (source == randomleavesItem) |
---|
| 2917 | + { |
---|
| 2918 | + RandomLeaves(true); |
---|
| 2919 | + } else |
---|
| 2920 | + if (source == unrandomleavesItem) |
---|
| 2921 | + { |
---|
| 2922 | + RandomLeaves(false); |
---|
2611 | 2923 | } else |
---|
2612 | 2924 | if (source == flipVItem) |
---|
2613 | 2925 | { |
---|
.. | .. |
---|
2843 | 3155 | if (source == twoButton) |
---|
2844 | 3156 | { |
---|
2845 | 3157 | radio.layout = twoButton; |
---|
| 3158 | + |
---|
| 3159 | + if (CameraPane.FULLSCREEN) |
---|
| 3160 | + fullscreenLayout = radio.layout; |
---|
| 3161 | + |
---|
2846 | 3162 | // bug |
---|
2847 | 3163 | //gridPanel.setDividerLocation(1.0); |
---|
2848 | 3164 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2875 | 3191 | bigThree.ClearUI(); |
---|
2876 | 3192 | bigThree.add(centralPanel); |
---|
2877 | 3193 | bigThree.FlushUI(); |
---|
| 3194 | + |
---|
| 3195 | + cameraView.requestFocusInWindow(); |
---|
| 3196 | + |
---|
| 3197 | +// refreshContents(true); |
---|
| 3198 | +// |
---|
| 3199 | +// try |
---|
| 3200 | +// { |
---|
| 3201 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3202 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3203 | +// bot.mouseMove(100, 100); |
---|
| 3204 | +// bot.mousePress(mask); |
---|
| 3205 | +// bot.mouseRelease(mask); |
---|
| 3206 | +// } |
---|
| 3207 | +// catch (Exception e) |
---|
| 3208 | +// { |
---|
| 3209 | +// |
---|
| 3210 | +// } |
---|
| 3211 | + |
---|
2878 | 3212 | } else |
---|
2879 | 3213 | if (source == threeButton) |
---|
2880 | 3214 | { |
---|
2881 | 3215 | radio.layout = threeButton; |
---|
| 3216 | + |
---|
| 3217 | + if (CameraPane.FULLSCREEN) |
---|
| 3218 | + fullscreenLayout = radio.layout; |
---|
2882 | 3219 | |
---|
2883 | 3220 | // bigThree.remove(scenePanel); |
---|
2884 | 3221 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2911 | 3248 | bigThree.add(centralPanel); |
---|
2912 | 3249 | bigThree.add(XYZPanel); |
---|
2913 | 3250 | bigThree.FlushUI(); |
---|
| 3251 | + |
---|
| 3252 | + cameraView.requestFocusInWindow(); |
---|
2914 | 3253 | } else |
---|
2915 | 3254 | if (source == fourButton) |
---|
2916 | 3255 | { |
---|
2917 | 3256 | radio.layout = fourButton; |
---|
| 3257 | + |
---|
| 3258 | + if (CameraPane.FULLSCREEN) |
---|
| 3259 | + fullscreenLayout = radio.layout; |
---|
2918 | 3260 | |
---|
2919 | 3261 | // bigThree.remove(scenePanel); |
---|
2920 | 3262 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2946 | 3288 | bigThree.ClearUI(); |
---|
2947 | 3289 | bigThree.add(scenePanel); |
---|
2948 | 3290 | bigThree.FlushUI(); |
---|
| 3291 | + |
---|
| 3292 | + cameraView.requestFocusInWindow(); |
---|
2949 | 3293 | } else |
---|
2950 | 3294 | if (source == sixButton) |
---|
2951 | 3295 | { |
---|
2952 | 3296 | radio.layout = sixButton; |
---|
| 3297 | + |
---|
| 3298 | + if (CameraPane.FULLSCREEN) |
---|
| 3299 | + fullscreenLayout = radio.layout; |
---|
2953 | 3300 | |
---|
2954 | 3301 | // bigThree.remove(scenePanel); |
---|
2955 | 3302 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2982 | 3329 | bigThree.add(scenePanel); |
---|
2983 | 3330 | bigThree.add(centralPanel); |
---|
2984 | 3331 | bigThree.FlushUI(); |
---|
| 3332 | + |
---|
| 3333 | + cameraView.requestFocusInWindow(); |
---|
2985 | 3334 | } else |
---|
2986 | 3335 | if (source == sevenButton) |
---|
2987 | 3336 | { |
---|
2988 | 3337 | radio.layout = sevenButton; |
---|
| 3338 | + |
---|
| 3339 | + if (CameraPane.FULLSCREEN) |
---|
| 3340 | + fullscreenLayout = radio.layout; |
---|
2989 | 3341 | |
---|
2990 | 3342 | // bigThree.remove(scenePanel); |
---|
2991 | 3343 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3019 | 3371 | bigThree.add(centralPanel); |
---|
3020 | 3372 | bigThree.add(XYZPanel); |
---|
3021 | 3373 | bigThree.FlushUI(); |
---|
| 3374 | + |
---|
| 3375 | + cameraView.requestFocusInWindow(); |
---|
3022 | 3376 | } else |
---|
3023 | 3377 | if (source == rootButton) |
---|
3024 | 3378 | { |
---|
.. | .. |
---|
3030 | 3384 | EditObject(obj); |
---|
3031 | 3385 | } |
---|
3032 | 3386 | |
---|
| 3387 | + cameraView.requestFocusInWindow(); |
---|
3033 | 3388 | refreshContents(true); |
---|
3034 | 3389 | } else |
---|
3035 | 3390 | if (source == closeButton) |
---|
.. | .. |
---|
3039 | 3394 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3040 | 3395 | { |
---|
3041 | 3396 | ab = (cRadio)e.nextElement(); |
---|
3042 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3397 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3043 | 3398 | { |
---|
| 3399 | + // Patch to avoid bug with transparency. |
---|
| 3400 | + if (!ab.hadMaterial) |
---|
| 3401 | + { |
---|
| 3402 | + ab.object.material = null; |
---|
| 3403 | + } |
---|
| 3404 | + |
---|
3044 | 3405 | buttonGroup.remove(ab); |
---|
3045 | 3406 | radioPanel.remove(ab); |
---|
3046 | 3407 | |
---|
3047 | | - ab.GetObject().editWindow = null; |
---|
| 3408 | + //ab.GetObject().editWindow = null; |
---|
| 3409 | + ab.GetObject().manipWindow = null; |
---|
3048 | 3410 | // ab.GetObject().objectUI = null; // ????????? |
---|
3049 | 3411 | |
---|
3050 | 3412 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
3051 | 3413 | break; |
---|
3052 | 3414 | } |
---|
3053 | 3415 | } |
---|
| 3416 | + |
---|
| 3417 | + cameraView.requestFocusInWindow(); |
---|
3054 | 3418 | refreshContents(true); |
---|
3055 | 3419 | } else |
---|
3056 | 3420 | if (source == editItem || source == editButton) |
---|
3057 | 3421 | { |
---|
| 3422 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3423 | + { |
---|
| 3424 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3425 | + child.pinned = true; |
---|
| 3426 | + } |
---|
| 3427 | + |
---|
3058 | 3428 | EditSelection(false); |
---|
3059 | 3429 | } else |
---|
3060 | 3430 | if (source == uneditButton) |
---|
.. | .. |
---|
3064 | 3434 | Object3D child = (Object3D)e.nextElement(); |
---|
3065 | 3435 | if(child.editWindow != null) |
---|
3066 | 3436 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3437 | + child.pinned = false; |
---|
3067 | 3438 | child.CloseUI(); |
---|
3068 | 3439 | listUI.remove(child); |
---|
3069 | 3440 | |
---|
.. | .. |
---|
3080 | 3451 | //copy.ClearUI(); |
---|
3081 | 3452 | for (Object3D obj : listUI) |
---|
3082 | 3453 | { |
---|
| 3454 | + obj.pinned = false; |
---|
3083 | 3455 | obj.CloseUI(); |
---|
3084 | 3456 | } |
---|
3085 | 3457 | listUI.clear(); |
---|
.. | .. |
---|
3089 | 3461 | { |
---|
3090 | 3462 | assert(copy == group); |
---|
3091 | 3463 | |
---|
3092 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3464 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3093 | 3465 | |
---|
3094 | 3466 | for (Object3D obj : listUI) |
---|
3095 | 3467 | { |
---|
.. | .. |
---|
3138 | 3510 | } |
---|
3139 | 3511 | |
---|
3140 | 3512 | copy = group; |
---|
| 3513 | + |
---|
| 3514 | + SetUndoStates(); |
---|
| 3515 | + |
---|
3141 | 3516 | //Globals.theRenderer.object = group; |
---|
3142 | 3517 | if(!useclient) |
---|
3143 | 3518 | { |
---|
.. | .. |
---|
3155 | 3530 | } |
---|
3156 | 3531 | |
---|
3157 | 3532 | // fix "+" issue |
---|
3158 | | - group.editWindow = this; |
---|
| 3533 | + //group.editWindow = this; |
---|
| 3534 | + group.manipWindow = this; |
---|
3159 | 3535 | |
---|
3160 | 3536 | /* |
---|
3161 | 3537 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3163 | 3539 | currentLayout = sevenButton; |
---|
3164 | 3540 | */ |
---|
3165 | 3541 | radio.layout.doClick(); |
---|
| 3542 | + |
---|
| 3543 | + ClearUnpinned(); |
---|
| 3544 | + SetPinStates(group.selection.size() > 0); |
---|
| 3545 | + if (group.selection.size() == 1) |
---|
| 3546 | + EditSelection(false); |
---|
3166 | 3547 | keepparent = group.parent; |
---|
3167 | 3548 | // PARENT = NULL or not??? |
---|
3168 | 3549 | //group.parent = null; // ROOT |
---|
3169 | 3550 | //group.attributes = -1; |
---|
3170 | 3551 | ResetModel(); |
---|
| 3552 | + |
---|
| 3553 | + cameraView.requestFocusInWindow(); |
---|
3171 | 3554 | refreshContents(true); |
---|
3172 | 3555 | } else if (event.getSource() == editCameraItem) |
---|
3173 | 3556 | { |
---|
3174 | 3557 | cameraView.ProtectCamera(); |
---|
3175 | 3558 | cameraView.repaint(); |
---|
3176 | 3559 | return; |
---|
3177 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3560 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3178 | 3561 | { |
---|
3179 | 3562 | cameraView.RevertCamera(); |
---|
3180 | 3563 | cameraView.repaint(); |
---|
.. | .. |
---|
3191 | 3574 | } |
---|
3192 | 3575 | |
---|
3193 | 3576 | boolean useclient = false; |
---|
3194 | | - cRadio radio; |
---|
3195 | 3577 | |
---|
3196 | 3578 | void ToggleRoot() |
---|
3197 | 3579 | { |
---|
.. | .. |
---|
4146 | 4528 | refreshContents(); |
---|
4147 | 4529 | } |
---|
4148 | 4530 | |
---|
| 4531 | + void RewindLeaves(boolean hide) |
---|
| 4532 | + { |
---|
| 4533 | + group.selection.RewindLeaves(hide); |
---|
| 4534 | + refreshContents(); |
---|
| 4535 | + } |
---|
| 4536 | + |
---|
| 4537 | + void RandomLeaves(boolean hide) |
---|
| 4538 | + { |
---|
| 4539 | + group.selection.RandomLeaves(hide); |
---|
| 4540 | + refreshContents(); |
---|
| 4541 | + } |
---|
| 4542 | + |
---|
4149 | 4543 | void SetTexRes(int tr) |
---|
4150 | 4544 | { |
---|
4151 | 4545 | group.selection.SetTexRes(tr); |
---|
.. | .. |
---|
4217 | 4611 | // } |
---|
4218 | 4612 | // } |
---|
4219 | 4613 | |
---|
4220 | | - static boolean allparams = true; |
---|
4221 | | - |
---|
4222 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4223 | | - |
---|
4224 | 4614 | void EditSelection(boolean newWindow) |
---|
4225 | 4615 | { |
---|
4226 | 4616 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
4228 | 4618 | { |
---|
4229 | 4619 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4230 | 4620 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4231 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4621 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4232 | 4622 | |
---|
4233 | 4623 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4234 | 4624 | if(elem != group || !newWindow) |
---|
.. | .. |
---|
4313 | 4703 | //new Exception().printStackTrace(); |
---|
4314 | 4704 | |
---|
4315 | 4705 | freezemodel = true; |
---|
4316 | | - |
---|
| 4706 | + ClearUnpinned(); |
---|
| 4707 | + |
---|
4317 | 4708 | /**/ |
---|
4318 | 4709 | //switch (event.id) |
---|
4319 | 4710 | { |
---|
.. | .. |
---|
4329 | 4720 | |
---|
4330 | 4721 | //if (child.parent != null) |
---|
4331 | 4722 | //child.parent.addSelectee(child); |
---|
| 4723 | + objEditor.SetMaterial(child); |
---|
4332 | 4724 | group.addSelectee(child); |
---|
4333 | 4725 | } |
---|
4334 | 4726 | } |
---|
.. | .. |
---|
4345 | 4737 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4346 | 4738 | // a camera |
---|
4347 | 4739 | { |
---|
4348 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4740 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
4349 | 4741 | { |
---|
4350 | 4742 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4351 | 4743 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4354 | 4746 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4355 | 4747 | } |
---|
4356 | 4748 | |
---|
| 4749 | + if (tps != null && tps.length == 1) |
---|
| 4750 | + { |
---|
| 4751 | + EditSelection(false); |
---|
| 4752 | + } |
---|
| 4753 | + |
---|
| 4754 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4755 | + |
---|
4357 | 4756 | refreshContents(); |
---|
4358 | 4757 | //return true; |
---|
4359 | 4758 | } |
---|
.. | .. |
---|
4363 | 4762 | freezemodel = false; |
---|
4364 | 4763 | } |
---|
4365 | 4764 | |
---|
| 4765 | + void SetPinStates(boolean enabled) |
---|
| 4766 | + { |
---|
| 4767 | + editButton.setEnabled(enabled); |
---|
| 4768 | + uneditButton.setEnabled(enabled); |
---|
| 4769 | + unselectButton.setEnabled(enabled); |
---|
| 4770 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4771 | + } |
---|
| 4772 | + |
---|
4366 | 4773 | void refreshContents(boolean cp) |
---|
4367 | 4774 | { |
---|
4368 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 4775 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4776 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4369 | 4777 | { |
---|
4370 | 4778 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4371 | 4779 | |
---|
4372 | | - for (int i=0; i < group.selection.size(); i++) |
---|
| 4780 | + for (int i=0; i < group.selection.Size(); i++) |
---|
4373 | 4781 | { |
---|
4374 | | - Object3D child = (Object3D) group.selection.reserve(i); |
---|
| 4782 | + Object3D child = (Object3D) group.selection.get(i); |
---|
4375 | 4783 | |
---|
4376 | | - objEditor.SetMaterial(child); |
---|
4377 | 4784 | objEditor.AddInfo(child, this, true); |
---|
4378 | 4785 | System.err.println("info : " + child.GetPath()); |
---|
4379 | | - |
---|
4380 | | - group.selection.release(i); |
---|
4381 | 4786 | } |
---|
4382 | 4787 | |
---|
4383 | 4788 | objEditor.SetText(); // jan 2014 |
---|
.. | .. |
---|
4467 | 4872 | |
---|
4468 | 4873 | if (cut) |
---|
4469 | 4874 | { |
---|
4470 | | - Save(); |
---|
| 4875 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4876 | +// Save(); |
---|
4471 | 4877 | //int indices[] = jList.getSelectedIndices(); |
---|
4472 | 4878 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4473 | 4879 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4570 | 4976 | |
---|
4571 | 4977 | void paste(boolean expand) |
---|
4572 | 4978 | { |
---|
| 4979 | + if (Globals.REPLACEONMAKE) |
---|
| 4980 | + Save(); |
---|
| 4981 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 4982 | + Globals.REPLACEONMAKE = false; |
---|
4573 | 4983 | // if (GrafreeD.clipboard == null) |
---|
4574 | 4984 | // return; |
---|
4575 | 4985 | boolean first = true; |
---|
.. | .. |
---|
4629 | 5039 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4630 | 5040 | } |
---|
4631 | 5041 | |
---|
| 5042 | + Globals.REPLACEONMAKE = keep; |
---|
4632 | 5043 | ResetModel(); |
---|
4633 | 5044 | refreshContents(); |
---|
4634 | 5045 | } |
---|
.. | .. |
---|
4764 | 5175 | |
---|
4765 | 5176 | void group(Object3D csg, boolean grab) |
---|
4766 | 5177 | { |
---|
| 5178 | + if (Globals.REPLACEONMAKE) |
---|
| 5179 | + Save(); |
---|
| 5180 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5181 | + Globals.REPLACEONMAKE = false; |
---|
4767 | 5182 | if (//false) // why?? |
---|
4768 | 5183 | !group.selection.isEmpty()) |
---|
4769 | 5184 | { |
---|
.. | .. |
---|
4877 | 5292 | //node.add(csg); |
---|
4878 | 5293 | //makeSomething(node); |
---|
4879 | 5294 | makeSomething(csg); |
---|
| 5295 | + Globals.REPLACEONMAKE = keep; |
---|
4880 | 5296 | } |
---|
4881 | 5297 | |
---|
4882 | 5298 | void Ungroup(Object3D g) |
---|
4883 | 5299 | { |
---|
| 5300 | + if (Globals.REPLACEONMAKE) |
---|
| 5301 | + Save(); |
---|
| 5302 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5303 | + Globals.REPLACEONMAKE = false; |
---|
4884 | 5304 | if (g instanceof HiddenObject) |
---|
4885 | 5305 | { |
---|
4886 | 5306 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
4897 | 5317 | objEditor.makeSomething(g.get(i), false); |
---|
4898 | 5318 | } |
---|
4899 | 5319 | } |
---|
| 5320 | + Globals.REPLACEONMAKE = keep; |
---|
4900 | 5321 | } |
---|
4901 | 5322 | |
---|
4902 | 5323 | void ungroup() |
---|
.. | .. |
---|
5185 | 5606 | cButton clearpanelButton; |
---|
5186 | 5607 | cButton unselectButton; |
---|
5187 | 5608 | |
---|
| 5609 | + cButton restoreCameraButton; |
---|
| 5610 | + |
---|
5188 | 5611 | cButton saveButton; |
---|
5189 | | - cButton undoButton; |
---|
5190 | | - cButton redoButton; |
---|
5191 | 5612 | cButton oneStepButton; |
---|
| 5613 | + |
---|
| 5614 | + cButton groupButton; |
---|
| 5615 | + cButton ungroupButton; |
---|
| 5616 | + cButton compositeButton; |
---|
| 5617 | + cButton switchButton; |
---|
| 5618 | + cButton loopButton; |
---|
| 5619 | + cButton textureButton; |
---|
| 5620 | + |
---|
| 5621 | + cButton gridButton; |
---|
| 5622 | + cButton boxButton; |
---|
| 5623 | + cButton sphereButton; |
---|
| 5624 | + cButton coneButton; |
---|
| 5625 | + cButton torusButton; |
---|
| 5626 | + cButton superButton; |
---|
| 5627 | + cButton kleinButton; |
---|
| 5628 | + cButton particlesButton; |
---|
| 5629 | + cButton overlayButton; |
---|
| 5630 | + cButton lightButton; |
---|
5192 | 5631 | |
---|
5193 | 5632 | cButton screenfitButton; |
---|
5194 | 5633 | cButton screenfitpointButton; |
---|
.. | .. |
---|
5201 | 5640 | |
---|
5202 | 5641 | cButton setsupportButton; |
---|
5203 | 5642 | |
---|
5204 | | - cButton twoButton; |
---|
5205 | | - cButton sixButton; |
---|
5206 | | - cButton threeButton; |
---|
5207 | | - cButton sevenButton; |
---|
5208 | | - cButton fourButton; // full panel |
---|
5209 | | - cButton oneButton; // full XYZ |
---|
5210 | | - //cButton currentLayout; |
---|
5211 | | - |
---|
5212 | 5643 | // |
---|
5213 | 5644 | //Composite |
---|
5214 | 5645 | Object3D // to do !! |
---|
.. | .. |
---|
5218 | 5649 | //JTree jTree; |
---|
5219 | 5650 | private MenuItem lookAtItem; |
---|
5220 | 5651 | private MenuItem lookFromItem; |
---|
5221 | | - private MenuItem switchItem; |
---|
| 5652 | + private MenuItem switchViewItem; |
---|
5222 | 5653 | private MenuItem cutItem; |
---|
5223 | 5654 | private MenuItem undoItem; |
---|
5224 | 5655 | private MenuItem redoItem; |
---|
5225 | | - private MenuItem duplicateItem; |
---|
| 5656 | + private JMenuItem duplicateItem; |
---|
5226 | 5657 | private MenuItem cloneItem; |
---|
5227 | 5658 | private MenuItem cloneSupportItem; |
---|
5228 | 5659 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5285 | 5716 | private MenuItem showleavesItem; |
---|
5286 | 5717 | private MenuItem markleavesItem; |
---|
5287 | 5718 | private MenuItem unmarkleavesItem; |
---|
| 5719 | + private MenuItem rewindleavesItem; |
---|
| 5720 | + private MenuItem unrewindleavesItem; |
---|
| 5721 | + private MenuItem randomleavesItem; |
---|
| 5722 | + private MenuItem unrandomleavesItem; |
---|
5288 | 5723 | |
---|
5289 | 5724 | private MenuItem flipVItem; |
---|
5290 | 5725 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5306 | 5741 | private MenuItem frontItem; |
---|
5307 | 5742 | private MenuItem cameraItem; |
---|
5308 | 5743 | private MenuItem compositeItem; |
---|
5309 | | - private MenuItem randomItem; |
---|
| 5744 | + private MenuItem switchItem; |
---|
5310 | 5745 | private MenuItem physicsItem; |
---|
5311 | 5746 | private MenuItem frameselectorItem; |
---|
5312 | 5747 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5380 | 5815 | |
---|
5381 | 5816 | Menu cameraMenu; |
---|
5382 | 5817 | MenuItem editCameraItem; |
---|
5383 | | - MenuItem revertCameraItem; |
---|
| 5818 | + MenuItem restoreCameraItem; |
---|
5384 | 5819 | } |
---|