.. | .. |
---|
74 | 74 | this.copy = this.group = copy; |
---|
75 | 75 | //selectees = this.group.selectees; |
---|
76 | 76 | |
---|
77 | | - SetupMenu2(objEditor); |
---|
| 77 | + SetupMenu2(this); //objEditor); |
---|
78 | 78 | SetupUI2(objEditor); |
---|
79 | 79 | objEditor.SetupUI(true); |
---|
80 | 80 | SetupViews(objEditor); |
---|
.. | .. |
---|
98 | 98 | |
---|
99 | 99 | void CloneClipboard(boolean supports) |
---|
100 | 100 | { |
---|
101 | | - assert(GrafreeD.clipboard.parent == null); |
---|
102 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
103 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
104 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
105 | | - makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
| 101 | + assert(Grafreed.clipboard.parent == null); |
---|
| 102 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 103 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 104 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 105 | + makeSomething(CloneObject(Grafreed.clipboard.get(0), false)); |
---|
106 | 106 | else |
---|
107 | | - makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
108 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 107 | + makeSomething(CloneObject(Grafreed.clipboard, false)); |
---|
| 108 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
109 | 109 | } |
---|
110 | 110 | |
---|
111 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
119 | 119 | // obj.support = null; |
---|
120 | 120 | if (!supports) |
---|
121 | 121 | obj.SaveSupports(); |
---|
122 | | - Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
123 | 123 | obj.parent = parent; |
---|
124 | 124 | // obj.support = support; |
---|
125 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
148 | 148 | |
---|
149 | 149 | //JTextField nameField; |
---|
150 | 150 | |
---|
151 | | - void SetupMenu2(ObjEditor oe) |
---|
| 151 | + void SetupMenu2(GroupEditor oe) |
---|
152 | 152 | { |
---|
153 | | - if (Globals.ADVANCED) |
---|
154 | | - { |
---|
155 | | - oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
156 | | - //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
157 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
158 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
159 | | - oe.cameraMenu.add("-"); |
---|
160 | | - openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
161 | | - openWindowItem.addActionListener(this); |
---|
162 | | - editLeafItem.addActionListener(this); |
---|
163 | | - lookAtItem.addActionListener(this); |
---|
164 | | - //lookFromItem.addActinoListener(this); |
---|
165 | | - //switchItem.addActionListener(this); |
---|
166 | | - } |
---|
167 | | - |
---|
168 | 153 | Menu menu; |
---|
169 | 154 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
170 | 155 | //editItem = menu.add(new MenuItem("Edit")); |
---|
.. | .. |
---|
206 | 191 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
207 | 192 | clearAllItem.addActionListener(this); |
---|
208 | 193 | } |
---|
| 194 | + |
---|
| 195 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 196 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 197 | + //zBufferItem.addActionListener(this); |
---|
| 198 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 199 | + //normalLensItem.addActionListener(this); |
---|
| 200 | + cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
| 201 | + revertCameraItem.addActionListener(this); |
---|
| 202 | + |
---|
| 203 | + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 204 | + toggleFullScreenItem.addItemListener(this); |
---|
| 205 | + toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 206 | + cameraMenu.add("-"); |
---|
| 207 | + |
---|
| 208 | + cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 209 | + toggleTextureItem.addItemListener(this); |
---|
| 210 | + toggleTextureItem.setState(CameraPane.textureon); |
---|
| 211 | + |
---|
| 212 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 213 | + toggleSwitchItem.addItemListener(this); |
---|
| 214 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 215 | + |
---|
| 216 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 217 | + toggleHandleItem.addItemListener(this); |
---|
| 218 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 219 | + |
---|
| 220 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 221 | + togglePaintItem.addItemListener(this); |
---|
| 222 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 223 | + |
---|
| 224 | + if (Globals.ADVANCED) |
---|
| 225 | + { |
---|
| 226 | + cameraMenu.add("-"); |
---|
| 227 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 228 | + toggleLiveItem.addItemListener(this); |
---|
| 229 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
209 | 230 | |
---|
| 231 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 232 | + stepItem.addActionListener(this); |
---|
| 233 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 234 | + // toggleDLItem.addItemListener(this); |
---|
| 235 | + // toggleDLItem.setState(false); |
---|
| 236 | + |
---|
| 237 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 238 | + toggleRenderItem.addItemListener(this); |
---|
| 239 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 240 | + |
---|
| 241 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 242 | + toggleDebugItem.addItemListener(this); |
---|
| 243 | + toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 244 | + |
---|
| 245 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 246 | + toggleFrustumItem.addItemListener(this); |
---|
| 247 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 248 | + |
---|
| 249 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 250 | + toggleFootContactItem.addItemListener(this); |
---|
| 251 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 252 | + |
---|
| 253 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 254 | + toggleTimelineItem.addItemListener(this); |
---|
| 255 | + } |
---|
| 256 | + |
---|
| 257 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 258 | +// toggleRootItem.addItemListener(this); |
---|
| 259 | +// toggleRootItem.setState(false); |
---|
| 260 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 261 | +// animationItem.addItemListener(this); |
---|
| 262 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 263 | + cameraMenu.add("-"); |
---|
| 264 | + cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
| 265 | + editCameraItem.addActionListener(this); |
---|
| 266 | + |
---|
| 267 | + if (Globals.ADVANCED) |
---|
| 268 | + { |
---|
| 269 | + oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
| 270 | + //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
| 271 | + //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 272 | + editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
| 273 | + oe.cameraMenu.add("-"); |
---|
| 274 | + openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
| 275 | + openWindowItem.addActionListener(this); |
---|
| 276 | + editLeafItem.addActionListener(this); |
---|
| 277 | + lookAtItem.addActionListener(this); |
---|
| 278 | + //lookFromItem.addActinoListener(this); |
---|
| 279 | + //switchItem.addActionListener(this); |
---|
| 280 | + } |
---|
| 281 | + |
---|
210 | 282 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
211 | 283 | if (Globals.ADVANCED) |
---|
212 | 284 | { |
---|
213 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
214 | | - resetMeshItem.addActionListener(this); |
---|
215 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
216 | | - stepAllItem.addActionListener(this); |
---|
217 | 285 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
218 | 286 | revertMeshItem.addActionListener(this); |
---|
219 | 287 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
.. | .. |
---|
318 | 386 | resetTransformItem.addActionListener(this); |
---|
319 | 387 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
320 | 388 | resetCentroidItem.addActionListener(this); |
---|
321 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
322 | | - transformgeometryItem.addActionListener(this); |
---|
| 389 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 390 | + resetCentroidXZItem.addActionListener(this); |
---|
| 391 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 392 | + transformGeometryItem.addActionListener(this); |
---|
| 393 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 394 | + transformChildrenItem.addActionListener(this); |
---|
323 | 395 | |
---|
324 | 396 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
325 | 397 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
368 | 440 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
369 | 441 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
370 | 442 | clearMaterialsItem.addActionListener(this); |
---|
| 443 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 444 | + resetAllItem.addActionListener(this); |
---|
| 445 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 446 | + stepAllItem.addActionListener(this); |
---|
371 | 447 | menu.add("-"); |
---|
372 | 448 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
373 | 449 | liveleavesItem.addActionListener(this); |
---|
.. | .. |
---|
422 | 498 | sortbysizeItem.addActionListener(this); |
---|
423 | 499 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
424 | 500 | sortbynameItem.addActionListener(this); |
---|
| 501 | + menu.add("-"); |
---|
| 502 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 503 | + shareGeometriesItem.addActionListener(this); |
---|
| 504 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 505 | + mergeGeometriesItem.addActionListener(this); |
---|
425 | 506 | if (Globals.ADVANCED) |
---|
426 | 507 | { |
---|
427 | | - menu.add("-"); |
---|
| 508 | + // Pretty much the same as duplicate and clone. |
---|
428 | 509 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
429 | 510 | extractGeometriesItem.addActionListener(this); |
---|
430 | 511 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
431 | 512 | cloneGeometriesItem.addActionListener(this); |
---|
432 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
433 | | - shareGeometriesItem.addActionListener(this); |
---|
434 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
435 | | - mergeGeometriesItem.addActionListener(this); |
---|
436 | 513 | } |
---|
437 | 514 | |
---|
438 | 515 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
439 | 516 | buildCreateMenu(menu); |
---|
440 | 517 | |
---|
441 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
442 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
443 | | - importGFDItem.addActionListener(this); |
---|
444 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
445 | | - importVRMLX3DItem.addActionListener(this); |
---|
446 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
447 | | - importOBJItem.addActionListener(this); |
---|
448 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
449 | | - import3DSItem.addActionListener(this); |
---|
450 | | - |
---|
451 | 518 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
452 | 519 | buildToolsMenu(menu); |
---|
453 | 520 | } |
---|
.. | .. |
---|
485 | 552 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
486 | 553 | |
---|
487 | 554 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
488 | | - liveCB.setToolTipText("Enabled animation"); |
---|
| 555 | + liveCB.setToolTipText("Enable animation"); |
---|
489 | 556 | liveCB.addItemListener(this); |
---|
490 | 557 | |
---|
491 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 558 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
492 | 559 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
493 | 560 | oneStepButton.addActionListener(this); |
---|
494 | 561 | |
---|
.. | .. |
---|
500 | 567 | trackCB.setToolTipText("Enable tracking"); |
---|
501 | 568 | trackCB.addItemListener(this); |
---|
502 | 569 | |
---|
503 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 570 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | 571 | screenfitButton.setToolTipText("Screen fit"); |
---|
505 | 572 | screenfitButton.addActionListener(this); |
---|
506 | 573 | |
---|
.. | .. |
---|
509 | 576 | |
---|
510 | 577 | if (Globals.ADVANCED) |
---|
511 | 578 | { |
---|
512 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 579 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
513 | 580 | snapobjectButton.addActionListener(this); |
---|
514 | 581 | snapobjectButton.setToolTipText("Snap Object"); |
---|
515 | 582 | } |
---|
516 | 583 | |
---|
517 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 584 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
518 | 585 | flashSelectionButton.setToolTipText("Show selection"); |
---|
519 | 586 | flashSelectionButton.addActionListener(this); |
---|
520 | 587 | |
---|
521 | 588 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
522 | 589 | |
---|
523 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 590 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
524 | 591 | twoButton.setToolTipText("Show center view only"); |
---|
525 | 592 | twoButton.addActionListener(this); |
---|
526 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 593 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
527 | 594 | fourButton.addActionListener(this); |
---|
528 | 595 | fourButton.setToolTipText("Show left panel only"); |
---|
529 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
530 | 597 | sixButton.setToolTipText("2-column layout left"); |
---|
531 | 598 | sixButton.addActionListener(this); |
---|
532 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 599 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
533 | 600 | threeButton.setToolTipText("2-column layout right"); |
---|
534 | 601 | threeButton.addActionListener(this); |
---|
535 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
536 | 603 | sevenButton.setToolTipText("3-column layout"); |
---|
537 | 604 | sevenButton.addActionListener(this); |
---|
538 | 605 | // |
---|
539 | 606 | |
---|
540 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 607 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
541 | 608 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
542 | 609 | rootButton.addActionListener(this); |
---|
543 | 610 | |
---|
544 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 611 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
545 | 612 | closeButton.setToolTipText("Close tab"); |
---|
546 | 613 | closeButton.addActionListener(this); |
---|
547 | 614 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
549 | 616 | |
---|
550 | 617 | cGridBag commandsPanel = new cGridBag(); |
---|
551 | 618 | |
---|
552 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 619 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
553 | 620 | editButton.setToolTipText("Edit selection"); |
---|
554 | 621 | editButton.addActionListener(this); |
---|
555 | 622 | |
---|
556 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 623 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
557 | 624 | uneditButton.setToolTipText("Unedit selection"); |
---|
558 | 625 | uneditButton.addActionListener(this); |
---|
559 | 626 | |
---|
.. | .. |
---|
561 | 628 | allParamsButton.setToolTipText("Edit all params"); |
---|
562 | 629 | allParamsButton.addActionListener(this); |
---|
563 | 630 | |
---|
564 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 631 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
565 | 632 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
566 | 633 | clearPanelButton.addActionListener(this); |
---|
567 | 634 | |
---|
568 | | - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 635 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
569 | 636 | unselectButton.setToolTipText("Unselect"); |
---|
570 | 637 | unselectButton.addActionListener(this); |
---|
571 | 638 | |
---|
.. | .. |
---|
648 | 715 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
649 | 716 | zoomBoxCB.addItemListener(this); |
---|
650 | 717 | |
---|
651 | | - if (Globals.ADVANCED) |
---|
| 718 | + if (true) // Globals.ADVANCED) |
---|
652 | 719 | { |
---|
653 | 720 | panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
654 | 721 | supportCB.setToolTipText("Enable rigging"); |
---|
.. | .. |
---|
721 | 788 | buttonGroup.add(radioButton); |
---|
722 | 789 | radioButton.doClick(); |
---|
723 | 790 | } |
---|
| 791 | + |
---|
724 | 792 | void SetupViews(ObjEditor oe) |
---|
725 | 793 | { |
---|
726 | 794 | oe.SetupViews(); |
---|
.. | .. |
---|
937 | 1005 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
938 | 1006 | // return; |
---|
939 | 1007 | // } |
---|
940 | | - if (string.charAt(0) == '/') |
---|
| 1008 | + |
---|
| 1009 | + // File path for Mac and Windows |
---|
| 1010 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
941 | 1011 | { |
---|
942 | 1012 | // file(s) |
---|
943 | 1013 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
964 | 1034 | |
---|
965 | 1035 | flashIt = false; |
---|
966 | 1036 | CameraPane pane = (CameraPane) target; |
---|
967 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1037 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
968 | 1038 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
969 | 1039 | |
---|
970 | 1040 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
1537 | 1607 | |
---|
1538 | 1608 | void Overwrite(int mask) |
---|
1539 | 1609 | { |
---|
1540 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1610 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1541 | 1611 | { |
---|
1542 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1612 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1543 | 1613 | |
---|
1544 | 1614 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1545 | 1615 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1844 | 1914 | csg.addChild(child); |
---|
1845 | 1915 | child.addChild(csg); |
---|
1846 | 1916 | } else |
---|
1847 | | - |
---|
1848 | | - if (source == importGFDItem) |
---|
1849 | | - { |
---|
1850 | | - ImportGFD(); |
---|
1851 | | - } else |
---|
1852 | | - if (source == importVRMLX3DItem) |
---|
1853 | | - { |
---|
1854 | | - ImportVRMLX3D(); |
---|
1855 | | - } else |
---|
1856 | | - if (source == import3DSItem) |
---|
1857 | | - { |
---|
1858 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1859 | | - } else |
---|
1860 | | - if (source == importOBJItem) |
---|
1861 | | - { |
---|
1862 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1863 | | - } else |
---|
1864 | 1917 | if (source == computeAOItem) |
---|
1865 | 1918 | { |
---|
1866 | 1919 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
.. | .. |
---|
1879 | 1932 | if (source == invariantsItem) |
---|
1880 | 1933 | { |
---|
1881 | 1934 | System.out.println("Invariants:"); |
---|
1882 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 1935 | + Grafreed.grafreeD.universe.invariants(); |
---|
1883 | 1936 | } else |
---|
1884 | 1937 | if (source == memoryItem) |
---|
1885 | 1938 | { |
---|
.. | .. |
---|
1954 | 2007 | } else |
---|
1955 | 2008 | if (source == duplicateItem) |
---|
1956 | 2009 | { |
---|
1957 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2010 | + Object3D keep = Grafreed.clipboard; |
---|
1958 | 2011 | loadClipboard(false); |
---|
1959 | 2012 | paste(false); |
---|
1960 | | - GrafreeD.clipboard = keep; |
---|
| 2013 | + Grafreed.clipboard = keep; |
---|
1961 | 2014 | } else |
---|
1962 | 2015 | if (source == cloneItem) |
---|
1963 | 2016 | { |
---|
.. | .. |
---|
2177 | 2230 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2178 | 2231 | // refreshContents(); |
---|
2179 | 2232 | // } |
---|
2180 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2233 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2181 | 2234 | { |
---|
2182 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2235 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2183 | 2236 | |
---|
2184 | 2237 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2185 | 2238 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2229 | 2282 | } else |
---|
2230 | 2283 | if (source == setMasterItem) |
---|
2231 | 2284 | { |
---|
2232 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2285 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2233 | 2286 | { |
---|
2234 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2287 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2235 | 2288 | |
---|
2236 | 2289 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2237 | 2290 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2244 | 2297 | { |
---|
2245 | 2298 | if (group.selection.size() == 1) |
---|
2246 | 2299 | { |
---|
2247 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2300 | + if (Grafreed.clipboard.size() == 1) |
---|
2248 | 2301 | { |
---|
2249 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2302 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2250 | 2303 | |
---|
2251 | 2304 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2252 | 2305 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2263 | 2316 | { |
---|
2264 | 2317 | RevertMeshes(); |
---|
2265 | 2318 | } else |
---|
2266 | | - if (source == resetMeshItem) |
---|
| 2319 | + if (source == resetAllItem) |
---|
2267 | 2320 | { |
---|
2268 | 2321 | ResetAll(); |
---|
2269 | 2322 | } else |
---|
.. | .. |
---|
2601 | 2654 | { |
---|
2602 | 2655 | SmoothMesh(); |
---|
2603 | 2656 | } else |
---|
2604 | | - if (source == transformgeometryItem) |
---|
| 2657 | + if (source == transformGeometryItem) |
---|
2605 | 2658 | { |
---|
2606 | 2659 | TransformGeometry(); |
---|
| 2660 | + } else |
---|
| 2661 | + if (source == transformChildrenItem) |
---|
| 2662 | + { |
---|
| 2663 | + TransformChildren(); |
---|
2607 | 2664 | } else |
---|
2608 | 2665 | if (source == resetTransformItem) |
---|
2609 | 2666 | { |
---|
.. | .. |
---|
2611 | 2668 | } else |
---|
2612 | 2669 | if (source == resetCentroidItem) |
---|
2613 | 2670 | { |
---|
2614 | | - ResetCentroid(); |
---|
| 2671 | + ResetCentroid(true); |
---|
| 2672 | + } else |
---|
| 2673 | + if (source == resetCentroidXZItem) |
---|
| 2674 | + { |
---|
| 2675 | + ResetCentroid(false); |
---|
2615 | 2676 | } else |
---|
2616 | 2677 | if (source == resetParentItem) |
---|
2617 | 2678 | { |
---|
.. | .. |
---|
3053 | 3114 | frontView.object = group; |
---|
3054 | 3115 | sideView.object = group; |
---|
3055 | 3116 | } |
---|
3056 | | - group.editWindow = this; |
---|
| 3117 | + |
---|
| 3118 | +// fix "+" issue group.editWindow = this; |
---|
| 3119 | + |
---|
3057 | 3120 | /* |
---|
3058 | 3121 | currentLayout = radio.layout; |
---|
3059 | 3122 | if (currentLayout == null) |
---|
.. | .. |
---|
3066 | 3129 | //group.attributes = -1; |
---|
3067 | 3130 | ResetModel(); |
---|
3068 | 3131 | refreshContents(true); |
---|
3069 | | - } |
---|
| 3132 | + } else if (event.getSource() == editCameraItem) |
---|
| 3133 | + { |
---|
| 3134 | + cameraView.ProtectCamera(); |
---|
| 3135 | + cameraView.repaint(); |
---|
| 3136 | + return; |
---|
| 3137 | + } else if (event.getSource() == revertCameraItem) |
---|
| 3138 | + { |
---|
| 3139 | + cameraView.RevertCamera(); |
---|
| 3140 | + cameraView.repaint(); |
---|
| 3141 | + return; |
---|
| 3142 | + // } else if (event.getSource() == textureButton) |
---|
| 3143 | + // { |
---|
| 3144 | + // return; // true; |
---|
| 3145 | + } |
---|
3070 | 3146 | else |
---|
3071 | 3147 | { |
---|
3072 | 3148 | //return super.action(event, arg); |
---|
.. | .. |
---|
3127 | 3203 | refreshContents(); |
---|
3128 | 3204 | } |
---|
3129 | 3205 | |
---|
| 3206 | + void TransformChildren() |
---|
| 3207 | + { |
---|
| 3208 | + Object3D obj; |
---|
| 3209 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3210 | + { |
---|
| 3211 | + obj = (Object3D)e.nextElement(); |
---|
| 3212 | + obj.KeepTextureMatrices(); |
---|
| 3213 | + obj.TransformChildren(); |
---|
| 3214 | + obj.RestoreTextureMatrices(); |
---|
| 3215 | + |
---|
| 3216 | +// if (obj.parent == null) |
---|
| 3217 | +// { |
---|
| 3218 | +// System.out.println("NULL PARENT!"); |
---|
| 3219 | +// new Exception().printStackTrace(); |
---|
| 3220 | +// } |
---|
| 3221 | +// else |
---|
| 3222 | +// TouchTransform(obj); |
---|
| 3223 | +// //obj.parent.Touch(); |
---|
| 3224 | + } |
---|
| 3225 | + |
---|
| 3226 | + refreshContents(); |
---|
| 3227 | + } |
---|
3130 | 3228 | |
---|
3131 | 3229 | void ResetTransform() |
---|
3132 | 3230 | { |
---|
.. | .. |
---|
3239 | 3337 | refreshContents(); |
---|
3240 | 3338 | } |
---|
3241 | 3339 | |
---|
3242 | | - void ResetCentroid() |
---|
| 3340 | + void ResetCentroid(boolean full) |
---|
3243 | 3341 | { |
---|
3244 | 3342 | Object3D obj; |
---|
3245 | 3343 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3254 | 3352 | LA.matIdentity(Object3D.mat); |
---|
3255 | 3353 | obj.getBounds(minima, maxima, false); |
---|
3256 | 3354 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3257 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3355 | + if (full) |
---|
| 3356 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3258 | 3357 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3259 | 3358 | obj.TransformMesh(Object3D.mat); |
---|
| 3359 | + |
---|
3260 | 3360 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3261 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3361 | + if (full) |
---|
| 3362 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3262 | 3363 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3364 | + |
---|
3263 | 3365 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3264 | 3366 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3265 | 3367 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3325 | 3427 | obj = (Object3D)e.nextElement(); |
---|
3326 | 3428 | |
---|
3327 | 3429 | System.out.println("Object is: " + obj); |
---|
3328 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3430 | + Grafreed.AnalyzeObject(obj); |
---|
3329 | 3431 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3330 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3432 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3331 | 3433 | |
---|
3332 | 3434 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3333 | 3435 | } |
---|
.. | .. |
---|
3541 | 3643 | |
---|
3542 | 3644 | void ParseVertices() |
---|
3543 | 3645 | { |
---|
3544 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3545 | | - GrafreeD.epsequal = true; |
---|
| 3646 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3647 | + Grafreed.epsequal = true; |
---|
3546 | 3648 | |
---|
3547 | 3649 | for (int i=0; i<group.selection.size(); i++) |
---|
3548 | 3650 | { |
---|
.. | .. |
---|
3567 | 3669 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3568 | 3670 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3569 | 3671 | |
---|
3570 | | - g.add(GrafreeD.clipboard); |
---|
| 3672 | + g.add(Grafreed.clipboard); |
---|
3571 | 3673 | |
---|
3572 | 3674 | buffer.add(g); |
---|
3573 | 3675 | } |
---|
.. | .. |
---|
3582 | 3684 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3583 | 3685 | } |
---|
3584 | 3686 | |
---|
3585 | | - GrafreeD.epsequal = epsequal; |
---|
| 3687 | + Grafreed.epsequal = epsequal; |
---|
3586 | 3688 | |
---|
3587 | 3689 | refreshContents(); |
---|
3588 | 3690 | } |
---|
.. | .. |
---|
3600 | 3702 | String pigment = Object3D.GetPigment(tex); |
---|
3601 | 3703 | //String bump = Object3D.GetBump(tex); |
---|
3602 | 3704 | |
---|
3603 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3705 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3706 | + |
---|
| 3707 | + try |
---|
| 3708 | + { |
---|
| 3709 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3710 | + } |
---|
| 3711 | + catch (Exception e) |
---|
| 3712 | + { |
---|
| 3713 | + System.err.println("FAIL: " + node); |
---|
| 3714 | + } |
---|
3604 | 3715 | |
---|
3605 | 3716 | double s = v.s; |
---|
3606 | 3717 | |
---|
.. | .. |
---|
3732 | 3843 | return; |
---|
3733 | 3844 | |
---|
3734 | 3845 | Object3D poses = group.selection.get(0); |
---|
3735 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 3846 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3736 | 3847 | |
---|
3737 | 3848 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3738 | 3849 | |
---|
.. | .. |
---|
3926 | 4037 | |
---|
3927 | 4038 | void ClipMesh() |
---|
3928 | 4039 | { |
---|
3929 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4040 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3930 | 4041 | { |
---|
3931 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4042 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3932 | 4043 | |
---|
3933 | 4044 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3934 | 4045 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3937 | 4048 | // { |
---|
3938 | 4049 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3939 | 4050 | // } |
---|
3940 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4051 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3941 | 4052 | } |
---|
3942 | 4053 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3943 | 4054 | System.out.println("DONE."); |
---|
.. | .. |
---|
4072 | 4183 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4073 | 4184 | |
---|
4074 | 4185 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4075 | | - if(elem != group) |
---|
| 4186 | + if(elem != group || !newWindow) |
---|
4076 | 4187 | { |
---|
4077 | 4188 | // if (!(elem instanceof Composite)) |
---|
4078 | 4189 | // newWindow = false; |
---|
.. | .. |
---|
4277 | 4388 | { |
---|
4278 | 4389 | if (group.selection.isEmpty()) |
---|
4279 | 4390 | return; |
---|
4280 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4391 | + Grafreed.clipboardIsTempGroup = false; |
---|
4281 | 4392 | Composite tGroup = null; |
---|
4282 | 4393 | if (group.selection.size() > 0) // 1) |
---|
4283 | 4394 | { |
---|
4284 | 4395 | tGroup = new cGroup(); |
---|
4285 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4396 | + Grafreed.clipboardIsTempGroup = true; |
---|
4286 | 4397 | } |
---|
4287 | 4398 | |
---|
4288 | 4399 | if (cut) |
---|
.. | .. |
---|
4322 | 4433 | //System.out.println("cut " + child); |
---|
4323 | 4434 | //System.out.println("parent = " + child.parent); |
---|
4324 | 4435 | // tmp.addChild(child); |
---|
4325 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4436 | + if (Grafreed.clipboardIsTempGroup) |
---|
4326 | 4437 | tGroup.add/*Child*/(tmp); |
---|
4327 | 4438 | else |
---|
4328 | | - GrafreeD.clipboard = tmp; |
---|
| 4439 | + Grafreed.clipboard = tmp; |
---|
4329 | 4440 | } |
---|
4330 | 4441 | else |
---|
4331 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4442 | + if (Grafreed.clipboardIsTempGroup) |
---|
4332 | 4443 | tGroup.add/*Child*/(child); |
---|
4333 | 4444 | else |
---|
4334 | | - GrafreeD.clipboard = child; |
---|
| 4445 | + Grafreed.clipboard = child; |
---|
4335 | 4446 | } |
---|
4336 | 4447 | |
---|
4337 | 4448 | //ResetModel(); |
---|
.. | .. |
---|
4363 | 4474 | //System.out.println("cut " + elem); |
---|
4364 | 4475 | //System.out.println("parent = " + elem.parent); |
---|
4365 | 4476 | // tmp.addChild(elem); |
---|
4366 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4477 | + if (Grafreed.clipboardIsTempGroup) |
---|
4367 | 4478 | tGroup.add/*Child*/(tmp); |
---|
4368 | 4479 | else |
---|
4369 | | - GrafreeD.clipboard = tmp; |
---|
| 4480 | + Grafreed.clipboard = tmp; |
---|
4370 | 4481 | } |
---|
4371 | 4482 | else |
---|
4372 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4483 | + if (Grafreed.clipboardIsTempGroup) |
---|
4373 | 4484 | tGroup.add/*Child*/(child); |
---|
4374 | 4485 | else |
---|
4375 | | - GrafreeD.clipboard = child; |
---|
| 4486 | + Grafreed.clipboard = child; |
---|
4376 | 4487 | } |
---|
4377 | 4488 | |
---|
4378 | 4489 | } |
---|
4379 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4380 | | - GrafreeD.clipboard = tGroup; |
---|
| 4490 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4491 | + Grafreed.clipboard = tGroup; |
---|
4381 | 4492 | if (cut) |
---|
4382 | 4493 | { |
---|
4383 | 4494 | ResetModel(); |
---|
.. | .. |
---|
4391 | 4502 | // return; |
---|
4392 | 4503 | boolean first = true; |
---|
4393 | 4504 | |
---|
4394 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4505 | + if (Grafreed.clipboardIsTempGroup) |
---|
4395 | 4506 | { |
---|
4396 | 4507 | Composite temp; |
---|
4397 | 4508 | |
---|
.. | .. |
---|
4402 | 4513 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4403 | 4514 | */ |
---|
4404 | 4515 | Object3D elem; |
---|
4405 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4516 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4406 | 4517 | { |
---|
4407 | 4518 | Object3D child = (Object3D)e.nextElement(); |
---|
4408 | 4519 | |
---|
.. | .. |
---|
4436 | 4547 | //Object3D cb = Applet3D.clipboard; |
---|
4437 | 4548 | //temp.addChild(cb); |
---|
4438 | 4549 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4439 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4440 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4441 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4442 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4443 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4550 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4551 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4552 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4553 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4554 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4444 | 4555 | else |
---|
4445 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4446 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4556 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4557 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4447 | 4558 | } |
---|
4448 | 4559 | |
---|
4449 | 4560 | ResetModel(); |
---|
.. | .. |
---|
4492 | 4603 | { |
---|
4493 | 4604 | boolean first = true; |
---|
4494 | 4605 | |
---|
4495 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4606 | + if (Grafreed.clipboardIsTempGroup) |
---|
4496 | 4607 | { |
---|
4497 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4608 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4498 | 4609 | Object3D copy; |
---|
4499 | 4610 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4500 | 4611 | { |
---|
.. | .. |
---|
4504 | 4615 | } |
---|
4505 | 4616 | } else |
---|
4506 | 4617 | { |
---|
4507 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4618 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4508 | 4619 | } |
---|
4509 | 4620 | } |
---|
4510 | 4621 | } |
---|
.. | .. |
---|
4909 | 5020 | } |
---|
4910 | 5021 | */ |
---|
4911 | 5022 | |
---|
4912 | | - void ImportGFD() |
---|
4913 | | - { |
---|
4914 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4915 | | - browser.show(); |
---|
4916 | | - String filename = browser.getFile(); |
---|
4917 | | - if (filename != null && filename.length() > 0) |
---|
4918 | | - { |
---|
4919 | | - String fullname = browser.getDirectory() + filename; |
---|
4920 | | - |
---|
4921 | | - //Object3D readobj = |
---|
4922 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4923 | | - //makeSomething(readobj); |
---|
4924 | | - } |
---|
4925 | | - } |
---|
4926 | | - |
---|
4927 | 5023 | /* |
---|
4928 | 5024 | public void Callback(Object obj) |
---|
4929 | 5025 | { |
---|
.. | .. |
---|
4947 | 5043 | } |
---|
4948 | 5044 | */ |
---|
4949 | 5045 | |
---|
4950 | | - void ImportVRMLX3D() |
---|
4951 | | - { |
---|
4952 | | - if (GrafreeD.standAlone) |
---|
4953 | | - { |
---|
4954 | | - /**/ |
---|
4955 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4956 | | - browser.show(); |
---|
4957 | | - String filename = browser.getFile(); |
---|
4958 | | - if (filename != null && filename.length() > 0) |
---|
4959 | | - { |
---|
4960 | | - String fullname = browser.getDirectory() + filename; |
---|
4961 | | - LoadVRMLX3D(fullname); |
---|
4962 | | - } |
---|
4963 | | - /**/ |
---|
4964 | | - } |
---|
4965 | | - } |
---|
4966 | | - |
---|
4967 | 5046 | String GetFile(String dialogName) |
---|
4968 | 5047 | { |
---|
4969 | | - if (GrafreeD.standAlone) |
---|
| 5048 | + if (Grafreed.standAlone) |
---|
4970 | 5049 | { |
---|
4971 | 5050 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4972 | 5051 | browser.show(); |
---|
.. | .. |
---|
5079 | 5158 | private MenuItem linkverticesItem; |
---|
5080 | 5159 | private MenuItem relinkverticesItem; |
---|
5081 | 5160 | private MenuItem setMasterItem; |
---|
5082 | | - private MenuItem resetMeshItem; |
---|
| 5161 | + private MenuItem resetAllItem; |
---|
5083 | 5162 | private MenuItem stepAllItem; |
---|
5084 | 5163 | private MenuItem revertMeshItem; |
---|
5085 | 5164 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5140 | 5219 | private MenuItem panoTexturesItem; |
---|
5141 | 5220 | |
---|
5142 | 5221 | private MenuItem resetCentroidItem; |
---|
5143 | | - private MenuItem transformgeometryItem; |
---|
| 5222 | + private MenuItem resetCentroidXZItem; |
---|
5144 | 5223 | private MenuItem resetTransformItem; |
---|
| 5224 | + private MenuItem transformGeometryItem; |
---|
| 5225 | + private MenuItem transformChildrenItem; |
---|
5145 | 5226 | private MenuItem hideItem; |
---|
5146 | 5227 | private MenuItem grabItem; |
---|
5147 | 5228 | private MenuItem backItem; |
---|
.. | .. |
---|
5210 | 5291 | private MenuItem doubleItem; |
---|
5211 | 5292 | private MenuItem tripleItem; |
---|
5212 | 5293 | |
---|
5213 | | - private MenuItem importGFDItem; |
---|
5214 | | - private MenuItem importVRMLX3DItem; |
---|
5215 | | - private MenuItem import3DSItem; |
---|
5216 | | - private MenuItem importOBJItem; |
---|
5217 | | - |
---|
5218 | 5294 | private MenuItem computeAOItem; |
---|
5219 | 5295 | private MenuItem recompileItem; |
---|
5220 | 5296 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5224 | 5300 | private MenuItem analyzeItem; |
---|
5225 | 5301 | private MenuItem dumpItem; |
---|
5226 | 5302 | //boolean freezemodel = false; |
---|
| 5303 | + |
---|
| 5304 | + Menu cameraMenu; |
---|
| 5305 | + MenuItem editCameraItem; |
---|
| 5306 | + MenuItem revertCameraItem; |
---|
5227 | 5307 | } |
---|