.. | .. |
---|
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")); |
---|
171 | 156 | //editItem.addActionListener(this); |
---|
| 157 | + |
---|
| 158 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 159 | +// undoItem.addActionListener(this); |
---|
| 160 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 161 | +// redoItem.addActionListener(this); |
---|
| 162 | +// menu.add("-"); |
---|
172 | 163 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
173 | 164 | duplicateItem.addActionListener(this); |
---|
174 | 165 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
.. | .. |
---|
206 | 197 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
207 | 198 | clearAllItem.addActionListener(this); |
---|
208 | 199 | } |
---|
| 200 | + |
---|
| 201 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 202 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 203 | + //zBufferItem.addActionListener(this); |
---|
| 204 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 205 | + //normalLensItem.addActionListener(this); |
---|
| 206 | + cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 207 | + revertCameraItem.addActionListener(this); |
---|
| 208 | + |
---|
| 209 | + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 210 | + toggleFullScreenItem.addItemListener(this); |
---|
| 211 | + toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 212 | + cameraMenu.add("-"); |
---|
| 213 | + |
---|
| 214 | + cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 215 | + toggleTextureItem.addItemListener(this); |
---|
| 216 | + toggleTextureItem.setState(CameraPane.textureon); |
---|
| 217 | + |
---|
| 218 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 219 | + toggleSwitchItem.addItemListener(this); |
---|
| 220 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 221 | + |
---|
| 222 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 223 | + toggleHandleItem.addItemListener(this); |
---|
| 224 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 225 | + |
---|
| 226 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 227 | + togglePaintItem.addItemListener(this); |
---|
| 228 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 229 | + |
---|
| 230 | + if (Globals.ADVANCED) |
---|
| 231 | + { |
---|
| 232 | + cameraMenu.add("-"); |
---|
| 233 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 234 | + toggleLiveItem.addItemListener(this); |
---|
| 235 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
209 | 236 | |
---|
| 237 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 238 | + stepItem.addActionListener(this); |
---|
| 239 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 240 | + // toggleDLItem.addItemListener(this); |
---|
| 241 | + // toggleDLItem.setState(false); |
---|
| 242 | + |
---|
| 243 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 244 | + toggleRenderItem.addItemListener(this); |
---|
| 245 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 246 | + |
---|
| 247 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 248 | + toggleDebugItem.addItemListener(this); |
---|
| 249 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
| 250 | + |
---|
| 251 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 252 | + toggleFrustumItem.addItemListener(this); |
---|
| 253 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 254 | + |
---|
| 255 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 256 | + toggleFootContactItem.addItemListener(this); |
---|
| 257 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 258 | + |
---|
| 259 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 260 | + toggleTimelineItem.addItemListener(this); |
---|
| 261 | + } |
---|
| 262 | + |
---|
| 263 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 264 | +// toggleRootItem.addItemListener(this); |
---|
| 265 | +// toggleRootItem.setState(false); |
---|
| 266 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 267 | +// animationItem.addItemListener(this); |
---|
| 268 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 269 | + cameraMenu.add("-"); |
---|
| 270 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 271 | + editCameraItem.addActionListener(this); |
---|
| 272 | + |
---|
| 273 | + if (Globals.ADVANCED) |
---|
| 274 | + { |
---|
| 275 | + oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
| 276 | + //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
| 277 | + //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 278 | + editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
| 279 | + oe.cameraMenu.add("-"); |
---|
| 280 | + openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
| 281 | + openWindowItem.addActionListener(this); |
---|
| 282 | + editLeafItem.addActionListener(this); |
---|
| 283 | + lookAtItem.addActionListener(this); |
---|
| 284 | + //lookFromItem.addActinoListener(this); |
---|
| 285 | + //switchItem.addActionListener(this); |
---|
| 286 | + } |
---|
| 287 | + |
---|
210 | 288 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
211 | 289 | if (Globals.ADVANCED) |
---|
212 | 290 | { |
---|
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 | 291 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
218 | 292 | revertMeshItem.addActionListener(this); |
---|
219 | 293 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
.. | .. |
---|
318 | 392 | resetTransformItem.addActionListener(this); |
---|
319 | 393 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
320 | 394 | resetCentroidItem.addActionListener(this); |
---|
321 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
322 | | - transformgeometryItem.addActionListener(this); |
---|
| 395 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 396 | + resetCentroidXZItem.addActionListener(this); |
---|
| 397 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 398 | + transformGeometryItem.addActionListener(this); |
---|
| 399 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 400 | + transformChildrenItem.addActionListener(this); |
---|
323 | 401 | |
---|
324 | 402 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
325 | 403 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
368 | 446 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
369 | 447 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
370 | 448 | clearMaterialsItem.addActionListener(this); |
---|
| 449 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 450 | + resetAllItem.addActionListener(this); |
---|
| 451 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 452 | + stepAllItem.addActionListener(this); |
---|
371 | 453 | menu.add("-"); |
---|
372 | 454 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
373 | 455 | liveleavesItem.addActionListener(this); |
---|
.. | .. |
---|
388 | 470 | markleavesItem.addActionListener(this); |
---|
389 | 471 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
390 | 472 | unmarkleavesItem.addActionListener(this); |
---|
| 473 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 474 | + rewindleavesItem.addActionListener(this); |
---|
| 475 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 476 | + unrewindleavesItem.addActionListener(this); |
---|
| 477 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 478 | + randomleavesItem.addActionListener(this); |
---|
| 479 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 480 | + unrandomleavesItem.addActionListener(this); |
---|
391 | 481 | menu.add("-"); |
---|
392 | 482 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
393 | 483 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
422 | 512 | sortbysizeItem.addActionListener(this); |
---|
423 | 513 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
424 | 514 | sortbynameItem.addActionListener(this); |
---|
| 515 | + menu.add("-"); |
---|
| 516 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 517 | + shareGeometriesItem.addActionListener(this); |
---|
| 518 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 519 | + mergeGeometriesItem.addActionListener(this); |
---|
425 | 520 | if (Globals.ADVANCED) |
---|
426 | 521 | { |
---|
427 | | - menu.add("-"); |
---|
| 522 | + // Pretty much the same as duplicate and clone. |
---|
428 | 523 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
429 | 524 | extractGeometriesItem.addActionListener(this); |
---|
430 | 525 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
431 | 526 | 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 | 527 | } |
---|
437 | 528 | |
---|
438 | 529 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
439 | 530 | buildCreateMenu(menu); |
---|
440 | 531 | |
---|
441 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
442 | | - importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
443 | | - importOBJItem.addActionListener(this); |
---|
444 | | - menu.add("-"); |
---|
445 | | - import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
446 | | - import3DSItem.addActionListener(this); |
---|
447 | | - menu.add("-"); |
---|
448 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
449 | | - importVRMLX3DItem.addActionListener(this); |
---|
450 | | - menu.add("-"); |
---|
451 | | - importGFDItem = menu.add(new MenuItem("GrafreeD file...")); |
---|
452 | | - importGFDItem.addActionListener(this); |
---|
453 | | - |
---|
454 | 532 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
455 | 533 | buildToolsMenu(menu); |
---|
456 | 534 | } |
---|
457 | 535 | |
---|
458 | 536 | void SetupUI2(ObjEditor oe) |
---|
459 | 537 | { |
---|
| 538 | + // June 2019 |
---|
| 539 | + if (oe == null) |
---|
| 540 | + { |
---|
| 541 | + //super.SetupUI2(this); |
---|
| 542 | + //return; |
---|
| 543 | + } |
---|
| 544 | + |
---|
| 545 | + if (copy != group) |
---|
| 546 | + { |
---|
| 547 | + //super.SetupUI2(this); |
---|
| 548 | + } |
---|
| 549 | + |
---|
460 | 550 | //new Exception().printStackTrace(); |
---|
461 | 551 | |
---|
462 | 552 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
487 | 577 | */ |
---|
488 | 578 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
489 | 579 | |
---|
| 580 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 581 | + //minButton.setToolTipText("Minimize window"); |
---|
| 582 | + //minButton.addActionListener(this); |
---|
| 583 | + |
---|
| 584 | + oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 585 | + maxButton.setToolTipText("Maximize window"); |
---|
| 586 | + maxButton.addActionListener(this); |
---|
| 587 | + |
---|
| 588 | + oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 589 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 590 | + fullButton.addActionListener(this); |
---|
| 591 | + |
---|
| 592 | + oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 593 | + undoButton.setToolTipText("Undo changes"); |
---|
| 594 | + undoButton.addActionListener(this); |
---|
| 595 | + |
---|
| 596 | + oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + redoButton.setToolTipText("Redo changes"); |
---|
| 598 | + redoButton.addActionListener(this); |
---|
| 599 | + |
---|
| 600 | + oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 601 | + saveButton.setToolTipText("Save changes"); |
---|
| 602 | + saveButton.addActionListener(this); |
---|
| 603 | + |
---|
490 | 604 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
491 | | - liveCB.setToolTipText("Enabled animation"); |
---|
| 605 | + liveCB.setToolTipText("Enable animation"); |
---|
492 | 606 | liveCB.addItemListener(this); |
---|
493 | 607 | |
---|
494 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 608 | + oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
495 | 609 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
496 | 610 | oneStepButton.addActionListener(this); |
---|
497 | 611 | |
---|
.. | .. |
---|
499 | 613 | fastCB.setToolTipText("Fast mode"); |
---|
500 | 614 | fastCB.addItemListener(this); |
---|
501 | 615 | |
---|
502 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 616 | + oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
503 | 617 | trackCB.setToolTipText("Enable tracking"); |
---|
504 | 618 | trackCB.addItemListener(this); |
---|
505 | 619 | |
---|
506 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 620 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
507 | 621 | screenfitButton.setToolTipText("Screen fit"); |
---|
508 | 622 | screenfitButton.addActionListener(this); |
---|
509 | 623 | |
---|
.. | .. |
---|
512 | 626 | |
---|
513 | 627 | if (Globals.ADVANCED) |
---|
514 | 628 | { |
---|
515 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 629 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
516 | 630 | snapobjectButton.addActionListener(this); |
---|
517 | 631 | snapobjectButton.setToolTipText("Snap Object"); |
---|
518 | 632 | } |
---|
519 | 633 | |
---|
520 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 634 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
521 | 635 | flashSelectionButton.setToolTipText("Show selection"); |
---|
522 | 636 | flashSelectionButton.addActionListener(this); |
---|
523 | 637 | |
---|
524 | 638 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
525 | 639 | |
---|
526 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 640 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
527 | 641 | twoButton.setToolTipText("Show center view only"); |
---|
528 | 642 | twoButton.addActionListener(this); |
---|
529 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 643 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
530 | 644 | fourButton.addActionListener(this); |
---|
531 | 645 | fourButton.setToolTipText("Show left panel only"); |
---|
532 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 646 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
533 | 647 | sixButton.setToolTipText("2-column layout left"); |
---|
534 | 648 | sixButton.addActionListener(this); |
---|
535 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 649 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
536 | 650 | threeButton.setToolTipText("2-column layout right"); |
---|
537 | 651 | threeButton.addActionListener(this); |
---|
538 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 652 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
539 | 653 | sevenButton.setToolTipText("3-column layout"); |
---|
540 | 654 | sevenButton.addActionListener(this); |
---|
541 | 655 | // |
---|
542 | 656 | |
---|
543 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 657 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
544 | 658 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
545 | 659 | rootButton.addActionListener(this); |
---|
546 | 660 | |
---|
547 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 661 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
548 | 662 | closeButton.setToolTipText("Close tab"); |
---|
549 | 663 | closeButton.addActionListener(this); |
---|
550 | 664 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
552 | 666 | |
---|
553 | 667 | cGridBag commandsPanel = new cGridBag(); |
---|
554 | 668 | |
---|
555 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 669 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
556 | 670 | editButton.setToolTipText("Edit selection"); |
---|
557 | 671 | editButton.addActionListener(this); |
---|
558 | 672 | |
---|
559 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 673 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
560 | 674 | uneditButton.setToolTipText("Unedit selection"); |
---|
561 | 675 | uneditButton.addActionListener(this); |
---|
562 | 676 | |
---|
.. | .. |
---|
564 | 678 | allParamsButton.setToolTipText("Edit all params"); |
---|
565 | 679 | allParamsButton.addActionListener(this); |
---|
566 | 680 | |
---|
567 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 681 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
568 | 682 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
569 | 683 | clearPanelButton.addActionListener(this); |
---|
570 | 684 | |
---|
571 | | - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 685 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
572 | 686 | unselectButton.setToolTipText("Unselect"); |
---|
573 | 687 | unselectButton.addActionListener(this); |
---|
574 | 688 | |
---|
.. | .. |
---|
651 | 765 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
652 | 766 | zoomBoxCB.addItemListener(this); |
---|
653 | 767 | |
---|
654 | | - if (Globals.ADVANCED) |
---|
| 768 | + if (true) // Globals.ADVANCED) |
---|
655 | 769 | { |
---|
656 | 770 | panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
657 | 771 | supportCB.setToolTipText("Enable rigging"); |
---|
.. | .. |
---|
724 | 838 | buttonGroup.add(radioButton); |
---|
725 | 839 | radioButton.doClick(); |
---|
726 | 840 | } |
---|
| 841 | + |
---|
727 | 842 | void SetupViews(ObjEditor oe) |
---|
728 | 843 | { |
---|
| 844 | + theFrame = this; |
---|
| 845 | + |
---|
729 | 846 | oe.SetupViews(); |
---|
730 | 847 | |
---|
731 | 848 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
788 | 905 | } else if(e.getSource() == liveCB) |
---|
789 | 906 | { |
---|
790 | 907 | cameraView.ToggleLive(); |
---|
| 908 | + refreshContents(false); |
---|
791 | 909 | } |
---|
792 | 910 | else if(e.getSource() == supportCB) |
---|
793 | 911 | { |
---|
.. | .. |
---|
969 | 1087 | |
---|
970 | 1088 | flashIt = false; |
---|
971 | 1089 | CameraPane pane = (CameraPane) target; |
---|
972 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1090 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
973 | 1091 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
974 | 1092 | |
---|
975 | 1093 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
1195 | 1313 | memoryItem.addActionListener(this); |
---|
1196 | 1314 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1197 | 1315 | analyzeItem.addActionListener(this); |
---|
1198 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1316 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1199 | 1317 | dumpItem.addActionListener(this); |
---|
1200 | 1318 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1201 | 1319 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1542 | 1660 | |
---|
1543 | 1661 | void Overwrite(int mask) |
---|
1544 | 1662 | { |
---|
1545 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1663 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1546 | 1664 | { |
---|
1547 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1665 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1548 | 1666 | |
---|
1549 | 1667 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1550 | 1668 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1849 | 1967 | csg.addChild(child); |
---|
1850 | 1968 | child.addChild(csg); |
---|
1851 | 1969 | } else |
---|
1852 | | - |
---|
1853 | | - if (source == importGFDItem) |
---|
1854 | | - { |
---|
1855 | | - ImportGFD(); |
---|
1856 | | - } else |
---|
1857 | | - if (source == importVRMLX3DItem) |
---|
1858 | | - { |
---|
1859 | | - ImportVRMLX3D(); |
---|
1860 | | - } else |
---|
1861 | | - if (source == import3DSItem) |
---|
1862 | | - { |
---|
1863 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1864 | | - } else |
---|
1865 | | - if (source == importOBJItem) |
---|
1866 | | - { |
---|
1867 | | - //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1868 | | - FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
1869 | | - browser.setVisible(true); |
---|
1870 | | - String filename = browser.getFile(); |
---|
1871 | | - if (filename != null && filename.length() > 0) |
---|
1872 | | - { |
---|
1873 | | - String fullname = browser.getDirectory() + filename; |
---|
1874 | | - makeSomething(ReadOBJ(fullname), true); |
---|
1875 | | - } |
---|
1876 | | - } else |
---|
1877 | 1970 | if (source == computeAOItem) |
---|
1878 | 1971 | { |
---|
1879 | 1972 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
.. | .. |
---|
1892 | 1985 | if (source == invariantsItem) |
---|
1893 | 1986 | { |
---|
1894 | 1987 | System.out.println("Invariants:"); |
---|
1895 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 1988 | + Grafreed.grafreeD.universe.invariants(); |
---|
1896 | 1989 | } else |
---|
1897 | 1990 | if (source == memoryItem) |
---|
1898 | 1991 | { |
---|
.. | .. |
---|
1910 | 2003 | if (source == dumpItem) |
---|
1911 | 2004 | { |
---|
1912 | 2005 | DumpObject(); |
---|
| 2006 | + } else |
---|
| 2007 | + if (source == minButton) |
---|
| 2008 | + { |
---|
| 2009 | + Minimize(); |
---|
| 2010 | + } else |
---|
| 2011 | + if (source == maxButton) |
---|
| 2012 | + { |
---|
| 2013 | + Maximize(); |
---|
| 2014 | + } else |
---|
| 2015 | + if (source == fullButton) |
---|
| 2016 | + { |
---|
| 2017 | + ToggleFullScreen(); |
---|
| 2018 | + } else |
---|
| 2019 | + if (source == undoButton) |
---|
| 2020 | + { |
---|
| 2021 | + Undo(); |
---|
| 2022 | + } else |
---|
| 2023 | + if (source == redoButton) |
---|
| 2024 | + { |
---|
| 2025 | + Redo(); |
---|
| 2026 | + } else |
---|
| 2027 | + if (source == saveButton) |
---|
| 2028 | + { |
---|
| 2029 | + Save(); |
---|
1913 | 2030 | } else |
---|
1914 | 2031 | if (source == oneStepButton) |
---|
1915 | 2032 | { |
---|
.. | .. |
---|
1965 | 2082 | { |
---|
1966 | 2083 | loadClipboard(true); |
---|
1967 | 2084 | } else |
---|
| 2085 | + if (source == undoItem) |
---|
| 2086 | + { |
---|
| 2087 | + Undo(); |
---|
| 2088 | + } else |
---|
| 2089 | + if (source == redoItem) |
---|
| 2090 | + { |
---|
| 2091 | + Redo(); |
---|
| 2092 | + } else |
---|
1968 | 2093 | if (source == duplicateItem) |
---|
1969 | 2094 | { |
---|
1970 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2095 | + Object3D keep = Grafreed.clipboard; |
---|
1971 | 2096 | loadClipboard(false); |
---|
1972 | 2097 | paste(false); |
---|
1973 | | - GrafreeD.clipboard = keep; |
---|
| 2098 | + Grafreed.clipboard = keep; |
---|
1974 | 2099 | } else |
---|
1975 | 2100 | if (source == cloneItem) |
---|
1976 | 2101 | { |
---|
.. | .. |
---|
2190 | 2315 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2191 | 2316 | // refreshContents(); |
---|
2192 | 2317 | // } |
---|
2193 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2318 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2194 | 2319 | { |
---|
2195 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2320 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2196 | 2321 | |
---|
2197 | 2322 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2198 | 2323 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2242 | 2367 | } else |
---|
2243 | 2368 | if (source == setMasterItem) |
---|
2244 | 2369 | { |
---|
2245 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2370 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2246 | 2371 | { |
---|
2247 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2372 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2248 | 2373 | |
---|
2249 | 2374 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2250 | 2375 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2257 | 2382 | { |
---|
2258 | 2383 | if (group.selection.size() == 1) |
---|
2259 | 2384 | { |
---|
2260 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2385 | + if (Grafreed.clipboard.size() == 1) |
---|
2261 | 2386 | { |
---|
2262 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2387 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2263 | 2388 | |
---|
2264 | 2389 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2265 | 2390 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2276 | 2401 | { |
---|
2277 | 2402 | RevertMeshes(); |
---|
2278 | 2403 | } else |
---|
2279 | | - if (source == resetMeshItem) |
---|
| 2404 | + if (source == resetAllItem) |
---|
2280 | 2405 | { |
---|
2281 | 2406 | ResetAll(); |
---|
2282 | 2407 | } else |
---|
.. | .. |
---|
2464 | 2589 | } else |
---|
2465 | 2590 | if (source == genNormalsMESHItem) |
---|
2466 | 2591 | { |
---|
2467 | | - GenNormals(true); // TODO |
---|
| 2592 | + GenNormalsMESH(); |
---|
2468 | 2593 | } else |
---|
2469 | 2594 | if (source == genNormalsORGANItem) |
---|
2470 | 2595 | { |
---|
.. | .. |
---|
2529 | 2654 | if (source == unmarkleavesItem) |
---|
2530 | 2655 | { |
---|
2531 | 2656 | MarkLeaves(false); |
---|
| 2657 | + } else |
---|
| 2658 | + if (source == rewindleavesItem) |
---|
| 2659 | + { |
---|
| 2660 | + RewindLeaves(true); |
---|
| 2661 | + } else |
---|
| 2662 | + if (source == unrewindleavesItem) |
---|
| 2663 | + { |
---|
| 2664 | + RewindLeaves(false); |
---|
| 2665 | + } else |
---|
| 2666 | + if (source == randomleavesItem) |
---|
| 2667 | + { |
---|
| 2668 | + RandomLeaves(true); |
---|
| 2669 | + } else |
---|
| 2670 | + if (source == unrandomleavesItem) |
---|
| 2671 | + { |
---|
| 2672 | + RandomLeaves(false); |
---|
2532 | 2673 | } else |
---|
2533 | 2674 | if (source == flipVItem) |
---|
2534 | 2675 | { |
---|
.. | .. |
---|
2614 | 2755 | { |
---|
2615 | 2756 | SmoothMesh(); |
---|
2616 | 2757 | } else |
---|
2617 | | - if (source == transformgeometryItem) |
---|
| 2758 | + if (source == transformGeometryItem) |
---|
2618 | 2759 | { |
---|
2619 | 2760 | TransformGeometry(); |
---|
| 2761 | + } else |
---|
| 2762 | + if (source == transformChildrenItem) |
---|
| 2763 | + { |
---|
| 2764 | + TransformChildren(); |
---|
2620 | 2765 | } else |
---|
2621 | 2766 | if (source == resetTransformItem) |
---|
2622 | 2767 | { |
---|
.. | .. |
---|
2624 | 2769 | } else |
---|
2625 | 2770 | if (source == resetCentroidItem) |
---|
2626 | 2771 | { |
---|
2627 | | - ResetCentroid(); |
---|
| 2772 | + ResetCentroid(true); |
---|
| 2773 | + } else |
---|
| 2774 | + if (source == resetCentroidXZItem) |
---|
| 2775 | + { |
---|
| 2776 | + ResetCentroid(false); |
---|
2628 | 2777 | } else |
---|
2629 | 2778 | if (source == resetParentItem) |
---|
2630 | 2779 | { |
---|
.. | .. |
---|
2788 | 2937 | bigThree.ClearUI(); |
---|
2789 | 2938 | bigThree.add(centralPanel); |
---|
2790 | 2939 | bigThree.FlushUI(); |
---|
| 2940 | + |
---|
| 2941 | + cameraView.requestFocusInWindow(); |
---|
| 2942 | + |
---|
| 2943 | +// refreshContents(true); |
---|
| 2944 | +// |
---|
| 2945 | +// try |
---|
| 2946 | +// { |
---|
| 2947 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 2948 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 2949 | +// bot.mouseMove(100, 100); |
---|
| 2950 | +// bot.mousePress(mask); |
---|
| 2951 | +// bot.mouseRelease(mask); |
---|
| 2952 | +// } |
---|
| 2953 | +// catch (Exception e) |
---|
| 2954 | +// { |
---|
| 2955 | +// |
---|
| 2956 | +// } |
---|
| 2957 | + |
---|
2791 | 2958 | } else |
---|
2792 | 2959 | if (source == threeButton) |
---|
2793 | 2960 | { |
---|
.. | .. |
---|
2824 | 2991 | bigThree.add(centralPanel); |
---|
2825 | 2992 | bigThree.add(XYZPanel); |
---|
2826 | 2993 | bigThree.FlushUI(); |
---|
| 2994 | + |
---|
| 2995 | + cameraView.requestFocusInWindow(); |
---|
2827 | 2996 | } else |
---|
2828 | 2997 | if (source == fourButton) |
---|
2829 | 2998 | { |
---|
.. | .. |
---|
2859 | 3028 | bigThree.ClearUI(); |
---|
2860 | 3029 | bigThree.add(scenePanel); |
---|
2861 | 3030 | bigThree.FlushUI(); |
---|
| 3031 | + |
---|
| 3032 | + cameraView.requestFocusInWindow(); |
---|
2862 | 3033 | } else |
---|
2863 | 3034 | if (source == sixButton) |
---|
2864 | 3035 | { |
---|
.. | .. |
---|
2895 | 3066 | bigThree.add(scenePanel); |
---|
2896 | 3067 | bigThree.add(centralPanel); |
---|
2897 | 3068 | bigThree.FlushUI(); |
---|
| 3069 | + |
---|
| 3070 | + cameraView.requestFocusInWindow(); |
---|
2898 | 3071 | } else |
---|
2899 | 3072 | if (source == sevenButton) |
---|
2900 | 3073 | { |
---|
.. | .. |
---|
2932 | 3105 | bigThree.add(centralPanel); |
---|
2933 | 3106 | bigThree.add(XYZPanel); |
---|
2934 | 3107 | bigThree.FlushUI(); |
---|
| 3108 | + |
---|
| 3109 | + cameraView.requestFocusInWindow(); |
---|
2935 | 3110 | } else |
---|
2936 | 3111 | if (source == rootButton) |
---|
2937 | 3112 | { |
---|
.. | .. |
---|
2943 | 3118 | EditObject(obj); |
---|
2944 | 3119 | } |
---|
2945 | 3120 | |
---|
| 3121 | + cameraView.requestFocusInWindow(); |
---|
2946 | 3122 | refreshContents(true); |
---|
2947 | 3123 | } else |
---|
2948 | 3124 | if (source == closeButton) |
---|
.. | .. |
---|
2964 | 3140 | break; |
---|
2965 | 3141 | } |
---|
2966 | 3142 | } |
---|
| 3143 | + |
---|
| 3144 | + cameraView.requestFocusInWindow(); |
---|
2967 | 3145 | refreshContents(true); |
---|
2968 | 3146 | } else |
---|
2969 | 3147 | if (source == editItem || source == editButton) |
---|
.. | .. |
---|
2980 | 3158 | child.CloseUI(); |
---|
2981 | 3159 | listUI.remove(child); |
---|
2982 | 3160 | |
---|
2983 | | - child.editWindow = null; // ??????????? |
---|
| 3161 | + //child.editWindow = null; // ??????????? |
---|
2984 | 3162 | } |
---|
2985 | 3163 | objEditor.ctrlPanel.FlushUI(); |
---|
2986 | 3164 | //objEditor.jTree.clearSelection(); |
---|
.. | .. |
---|
3066 | 3244 | frontView.object = group; |
---|
3067 | 3245 | sideView.object = group; |
---|
3068 | 3246 | } |
---|
3069 | | - group.editWindow = this; |
---|
| 3247 | + |
---|
| 3248 | +// fix "+" issue |
---|
| 3249 | + //group.editWindow = this; |
---|
| 3250 | + |
---|
3070 | 3251 | /* |
---|
3071 | 3252 | currentLayout = radio.layout; |
---|
3072 | 3253 | if (currentLayout == null) |
---|
.. | .. |
---|
3078 | 3259 | //group.parent = null; // ROOT |
---|
3079 | 3260 | //group.attributes = -1; |
---|
3080 | 3261 | ResetModel(); |
---|
| 3262 | + |
---|
| 3263 | + cameraView.requestFocusInWindow(); |
---|
3081 | 3264 | refreshContents(true); |
---|
3082 | | - } |
---|
| 3265 | + } else if (event.getSource() == editCameraItem) |
---|
| 3266 | + { |
---|
| 3267 | + cameraView.ProtectCamera(); |
---|
| 3268 | + cameraView.repaint(); |
---|
| 3269 | + return; |
---|
| 3270 | + } else if (event.getSource() == revertCameraItem) |
---|
| 3271 | + { |
---|
| 3272 | + cameraView.RevertCamera(); |
---|
| 3273 | + cameraView.repaint(); |
---|
| 3274 | + return; |
---|
| 3275 | + // } else if (event.getSource() == textureButton) |
---|
| 3276 | + // { |
---|
| 3277 | + // return; // true; |
---|
| 3278 | + } |
---|
3083 | 3279 | else |
---|
3084 | 3280 | { |
---|
3085 | 3281 | //return super.action(event, arg); |
---|
.. | .. |
---|
3088 | 3284 | } |
---|
3089 | 3285 | |
---|
3090 | 3286 | boolean useclient = false; |
---|
3091 | | - cRadio radio; |
---|
3092 | 3287 | |
---|
3093 | 3288 | void ToggleRoot() |
---|
3094 | 3289 | { |
---|
.. | .. |
---|
3140 | 3335 | refreshContents(); |
---|
3141 | 3336 | } |
---|
3142 | 3337 | |
---|
| 3338 | + void TransformChildren() |
---|
| 3339 | + { |
---|
| 3340 | + Object3D obj; |
---|
| 3341 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3342 | + { |
---|
| 3343 | + obj = (Object3D)e.nextElement(); |
---|
| 3344 | + obj.KeepTextureMatrices(); |
---|
| 3345 | + obj.TransformChildren(); |
---|
| 3346 | + obj.RestoreTextureMatrices(); |
---|
| 3347 | + |
---|
| 3348 | +// if (obj.parent == null) |
---|
| 3349 | +// { |
---|
| 3350 | +// System.out.println("NULL PARENT!"); |
---|
| 3351 | +// new Exception().printStackTrace(); |
---|
| 3352 | +// } |
---|
| 3353 | +// else |
---|
| 3354 | +// TouchTransform(obj); |
---|
| 3355 | +// //obj.parent.Touch(); |
---|
| 3356 | + } |
---|
| 3357 | + |
---|
| 3358 | + refreshContents(); |
---|
| 3359 | + } |
---|
3143 | 3360 | |
---|
3144 | 3361 | void ResetTransform() |
---|
3145 | 3362 | { |
---|
.. | .. |
---|
3252 | 3469 | refreshContents(); |
---|
3253 | 3470 | } |
---|
3254 | 3471 | |
---|
3255 | | - void ResetCentroid() |
---|
| 3472 | + void ResetCentroid(boolean full) |
---|
3256 | 3473 | { |
---|
3257 | 3474 | Object3D obj; |
---|
3258 | 3475 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3267 | 3484 | LA.matIdentity(Object3D.mat); |
---|
3268 | 3485 | obj.getBounds(minima, maxima, false); |
---|
3269 | 3486 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3270 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3487 | + if (full) |
---|
| 3488 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3271 | 3489 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3272 | 3490 | obj.TransformMesh(Object3D.mat); |
---|
| 3491 | + |
---|
3273 | 3492 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3274 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3493 | + if (full) |
---|
| 3494 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3275 | 3495 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3496 | + |
---|
3276 | 3497 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3277 | 3498 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3278 | 3499 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3301 | 3522 | |
---|
3302 | 3523 | int size = obj.MemorySize(); |
---|
3303 | 3524 | |
---|
3304 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3525 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3526 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3305 | 3527 | } |
---|
3306 | 3528 | } |
---|
3307 | 3529 | catch (Exception e) |
---|
.. | .. |
---|
3338 | 3560 | obj = (Object3D)e.nextElement(); |
---|
3339 | 3561 | |
---|
3340 | 3562 | System.out.println("Object is: " + obj); |
---|
3341 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3563 | + Grafreed.AnalyzeObject(obj); |
---|
3342 | 3564 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3343 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3565 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3344 | 3566 | |
---|
3345 | 3567 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3346 | 3568 | } |
---|
.. | .. |
---|
3382 | 3604 | void GenNormals(boolean crease) |
---|
3383 | 3605 | { |
---|
3384 | 3606 | group.GenNormalsS(crease); |
---|
| 3607 | + |
---|
| 3608 | + refreshContents(); |
---|
| 3609 | + } |
---|
| 3610 | + |
---|
| 3611 | + void GenNormalsMESH() |
---|
| 3612 | + { |
---|
| 3613 | + group.GenNormalsMeshS(); |
---|
3385 | 3614 | |
---|
3386 | 3615 | refreshContents(); |
---|
3387 | 3616 | } |
---|
.. | .. |
---|
3554 | 3783 | |
---|
3555 | 3784 | void ParseVertices() |
---|
3556 | 3785 | { |
---|
3557 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3558 | | - GrafreeD.epsequal = true; |
---|
| 3786 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3787 | + Grafreed.epsequal = true; |
---|
3559 | 3788 | |
---|
3560 | 3789 | for (int i=0; i<group.selection.size(); i++) |
---|
3561 | 3790 | { |
---|
.. | .. |
---|
3580 | 3809 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3581 | 3810 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3582 | 3811 | |
---|
3583 | | - g.add(GrafreeD.clipboard); |
---|
| 3812 | + g.add(Grafreed.clipboard); |
---|
3584 | 3813 | |
---|
3585 | 3814 | buffer.add(g); |
---|
3586 | 3815 | } |
---|
.. | .. |
---|
3595 | 3824 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3596 | 3825 | } |
---|
3597 | 3826 | |
---|
3598 | | - GrafreeD.epsequal = epsequal; |
---|
| 3827 | + Grafreed.epsequal = epsequal; |
---|
3599 | 3828 | |
---|
3600 | 3829 | refreshContents(); |
---|
3601 | 3830 | } |
---|
.. | .. |
---|
3613 | 3842 | String pigment = Object3D.GetPigment(tex); |
---|
3614 | 3843 | //String bump = Object3D.GetBump(tex); |
---|
3615 | 3844 | |
---|
3616 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3845 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3846 | + |
---|
| 3847 | + try |
---|
| 3848 | + { |
---|
| 3849 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3850 | + } |
---|
| 3851 | + catch (Exception e) |
---|
| 3852 | + { |
---|
| 3853 | + System.err.println("FAIL: " + node); |
---|
| 3854 | + } |
---|
3617 | 3855 | |
---|
3618 | 3856 | double s = v.s; |
---|
3619 | 3857 | |
---|
.. | .. |
---|
3745 | 3983 | return; |
---|
3746 | 3984 | |
---|
3747 | 3985 | Object3D poses = group.selection.get(0); |
---|
3748 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 3986 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3749 | 3987 | |
---|
3750 | 3988 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3751 | 3989 | |
---|
.. | .. |
---|
3939 | 4177 | |
---|
3940 | 4178 | void ClipMesh() |
---|
3941 | 4179 | { |
---|
3942 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4180 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3943 | 4181 | { |
---|
3944 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4182 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3945 | 4183 | |
---|
3946 | 4184 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3947 | 4185 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3950 | 4188 | // { |
---|
3951 | 4189 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3952 | 4190 | // } |
---|
3953 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4191 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3954 | 4192 | } |
---|
3955 | 4193 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3956 | 4194 | System.out.println("DONE."); |
---|
.. | .. |
---|
3997 | 4235 | void MarkLeaves(boolean hide) |
---|
3998 | 4236 | { |
---|
3999 | 4237 | group.selection.MarkLeaves(hide); |
---|
| 4238 | + refreshContents(); |
---|
| 4239 | + } |
---|
| 4240 | + |
---|
| 4241 | + void RewindLeaves(boolean hide) |
---|
| 4242 | + { |
---|
| 4243 | + group.selection.RewindLeaves(hide); |
---|
| 4244 | + refreshContents(); |
---|
| 4245 | + } |
---|
| 4246 | + |
---|
| 4247 | + void RandomLeaves(boolean hide) |
---|
| 4248 | + { |
---|
| 4249 | + group.selection.RandomLeaves(hide); |
---|
4000 | 4250 | refreshContents(); |
---|
4001 | 4251 | } |
---|
4002 | 4252 | |
---|
.. | .. |
---|
4085 | 4335 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4086 | 4336 | |
---|
4087 | 4337 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4088 | | - if(elem != group) |
---|
| 4338 | + if(elem != group || !newWindow) |
---|
4089 | 4339 | { |
---|
4090 | 4340 | // if (!(elem instanceof Composite)) |
---|
4091 | 4341 | // newWindow = false; |
---|
.. | .. |
---|
4175 | 4425 | //case 702: // Event.LIST_DESELECT |
---|
4176 | 4426 | group.deselectAll(); |
---|
4177 | 4427 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4178 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4179 | 4428 | if (tps != null) |
---|
4180 | 4429 | { |
---|
4181 | 4430 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4184 | 4433 | |
---|
4185 | 4434 | //if (child.parent != null) |
---|
4186 | 4435 | //child.parent.addSelectee(child); |
---|
| 4436 | + objEditor.SetMaterial(child); |
---|
4187 | 4437 | group.addSelectee(child); |
---|
4188 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4189 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4190 | | - System.err.println("info : " + child.GetPath()); |
---|
4191 | 4438 | } |
---|
4192 | 4439 | } |
---|
4193 | 4440 | // else |
---|
.. | .. |
---|
4197 | 4444 | // System.err.println("info : " + group.GetPath()); |
---|
4198 | 4445 | // } |
---|
4199 | 4446 | |
---|
4200 | | - objEditor.SetText(); // jan 2014 |
---|
4201 | | - |
---|
4202 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4447 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4203 | 4448 | CameraPane.flash = true; |
---|
4204 | 4449 | |
---|
4205 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4450 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4206 | 4451 | // a camera |
---|
4207 | 4452 | { |
---|
4208 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4209 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4453 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4454 | + { |
---|
| 4455 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4456 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4457 | + } |
---|
4210 | 4458 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4211 | 4459 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4212 | 4460 | } |
---|
.. | .. |
---|
4219 | 4467 | |
---|
4220 | 4468 | freezemodel = false; |
---|
4221 | 4469 | } |
---|
| 4470 | + |
---|
| 4471 | + void refreshContents(boolean cp) |
---|
| 4472 | + { |
---|
| 4473 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4474 | + { |
---|
| 4475 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4476 | + |
---|
| 4477 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4478 | + { |
---|
| 4479 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4480 | + |
---|
| 4481 | + objEditor.AddInfo(child, this, true); |
---|
| 4482 | + System.err.println("info : " + child.GetPath()); |
---|
| 4483 | + } |
---|
| 4484 | + |
---|
| 4485 | + objEditor.SetText(); // jan 2014 |
---|
| 4486 | + } |
---|
| 4487 | + |
---|
| 4488 | + super.refreshContents(cp); |
---|
| 4489 | + } |
---|
4222 | 4490 | |
---|
4223 | 4491 | void linkSomething(Object3D thing) |
---|
4224 | 4492 | { |
---|
.. | .. |
---|
4290 | 4558 | { |
---|
4291 | 4559 | if (group.selection.isEmpty()) |
---|
4292 | 4560 | return; |
---|
4293 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4561 | + |
---|
| 4562 | + Grafreed.clipboardIsTempGroup = false; |
---|
4294 | 4563 | Composite tGroup = null; |
---|
4295 | 4564 | if (group.selection.size() > 0) // 1) |
---|
4296 | 4565 | { |
---|
4297 | 4566 | tGroup = new cGroup(); |
---|
4298 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4567 | + Grafreed.clipboardIsTempGroup = true; |
---|
4299 | 4568 | } |
---|
4300 | 4569 | |
---|
4301 | 4570 | if (cut) |
---|
4302 | 4571 | { |
---|
| 4572 | + Save(); |
---|
4303 | 4573 | //int indices[] = jList.getSelectedIndices(); |
---|
4304 | 4574 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4305 | 4575 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4335 | 4605 | //System.out.println("cut " + child); |
---|
4336 | 4606 | //System.out.println("parent = " + child.parent); |
---|
4337 | 4607 | // tmp.addChild(child); |
---|
4338 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4608 | + if (Grafreed.clipboardIsTempGroup) |
---|
4339 | 4609 | tGroup.add/*Child*/(tmp); |
---|
4340 | 4610 | else |
---|
4341 | | - GrafreeD.clipboard = tmp; |
---|
| 4611 | + Grafreed.clipboard = tmp; |
---|
4342 | 4612 | } |
---|
4343 | 4613 | else |
---|
4344 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4614 | + if (Grafreed.clipboardIsTempGroup) |
---|
4345 | 4615 | tGroup.add/*Child*/(child); |
---|
4346 | 4616 | else |
---|
4347 | | - GrafreeD.clipboard = child; |
---|
| 4617 | + Grafreed.clipboard = child; |
---|
4348 | 4618 | } |
---|
4349 | 4619 | |
---|
4350 | 4620 | //ResetModel(); |
---|
.. | .. |
---|
4376 | 4646 | //System.out.println("cut " + elem); |
---|
4377 | 4647 | //System.out.println("parent = " + elem.parent); |
---|
4378 | 4648 | // tmp.addChild(elem); |
---|
4379 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4649 | + if (Grafreed.clipboardIsTempGroup) |
---|
4380 | 4650 | tGroup.add/*Child*/(tmp); |
---|
4381 | 4651 | else |
---|
4382 | | - GrafreeD.clipboard = tmp; |
---|
| 4652 | + Grafreed.clipboard = tmp; |
---|
4383 | 4653 | } |
---|
4384 | 4654 | else |
---|
4385 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4655 | + if (Grafreed.clipboardIsTempGroup) |
---|
4386 | 4656 | tGroup.add/*Child*/(child); |
---|
4387 | 4657 | else |
---|
4388 | | - GrafreeD.clipboard = child; |
---|
| 4658 | + Grafreed.clipboard = child; |
---|
4389 | 4659 | } |
---|
4390 | 4660 | |
---|
4391 | 4661 | } |
---|
4392 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4393 | | - GrafreeD.clipboard = tGroup; |
---|
| 4662 | + |
---|
| 4663 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4664 | + Grafreed.clipboard = tGroup; |
---|
| 4665 | + |
---|
4394 | 4666 | if (cut) |
---|
4395 | 4667 | { |
---|
4396 | 4668 | ResetModel(); |
---|
.. | .. |
---|
4404 | 4676 | // return; |
---|
4405 | 4677 | boolean first = true; |
---|
4406 | 4678 | |
---|
4407 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4679 | + if (Grafreed.clipboardIsTempGroup) |
---|
4408 | 4680 | { |
---|
4409 | 4681 | Composite temp; |
---|
4410 | 4682 | |
---|
.. | .. |
---|
4415 | 4687 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4416 | 4688 | */ |
---|
4417 | 4689 | Object3D elem; |
---|
4418 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4690 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4419 | 4691 | { |
---|
4420 | 4692 | Object3D child = (Object3D)e.nextElement(); |
---|
4421 | 4693 | |
---|
.. | .. |
---|
4449 | 4721 | //Object3D cb = Applet3D.clipboard; |
---|
4450 | 4722 | //temp.addChild(cb); |
---|
4451 | 4723 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4452 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4453 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4454 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4455 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4456 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4724 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4725 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4726 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4727 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4728 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4457 | 4729 | else |
---|
4458 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4459 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4730 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4731 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4460 | 4732 | } |
---|
4461 | 4733 | |
---|
4462 | 4734 | ResetModel(); |
---|
.. | .. |
---|
4505 | 4777 | { |
---|
4506 | 4778 | boolean first = true; |
---|
4507 | 4779 | |
---|
4508 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4780 | + if (Grafreed.clipboardIsTempGroup) |
---|
4509 | 4781 | { |
---|
4510 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4782 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4511 | 4783 | Object3D copy; |
---|
4512 | 4784 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4513 | 4785 | { |
---|
.. | .. |
---|
4517 | 4789 | } |
---|
4518 | 4790 | } else |
---|
4519 | 4791 | { |
---|
4520 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4792 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4521 | 4793 | } |
---|
4522 | 4794 | } |
---|
4523 | 4795 | } |
---|
.. | .. |
---|
4922 | 5194 | } |
---|
4923 | 5195 | */ |
---|
4924 | 5196 | |
---|
4925 | | - void ImportGFD() |
---|
4926 | | - { |
---|
4927 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4928 | | - browser.show(); |
---|
4929 | | - String filename = browser.getFile(); |
---|
4930 | | - if (filename != null && filename.length() > 0) |
---|
4931 | | - { |
---|
4932 | | - String fullname = browser.getDirectory() + filename; |
---|
4933 | | - |
---|
4934 | | - //Object3D readobj = |
---|
4935 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4936 | | - //makeSomething(readobj); |
---|
4937 | | - } |
---|
4938 | | - } |
---|
4939 | | - |
---|
4940 | 5197 | /* |
---|
4941 | 5198 | public void Callback(Object obj) |
---|
4942 | 5199 | { |
---|
.. | .. |
---|
4960 | 5217 | } |
---|
4961 | 5218 | */ |
---|
4962 | 5219 | |
---|
4963 | | - void ImportVRMLX3D() |
---|
4964 | | - { |
---|
4965 | | - if (GrafreeD.standAlone) |
---|
4966 | | - { |
---|
4967 | | - /**/ |
---|
4968 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4969 | | - browser.show(); |
---|
4970 | | - String filename = browser.getFile(); |
---|
4971 | | - if (filename != null && filename.length() > 0) |
---|
4972 | | - { |
---|
4973 | | - String fullname = browser.getDirectory() + filename; |
---|
4974 | | - LoadVRMLX3D(fullname); |
---|
4975 | | - } |
---|
4976 | | - /**/ |
---|
4977 | | - } |
---|
4978 | | - } |
---|
4979 | | - |
---|
4980 | 5220 | String GetFile(String dialogName) |
---|
4981 | 5221 | { |
---|
4982 | | - if (GrafreeD.standAlone) |
---|
| 5222 | + if (Grafreed.standAlone) |
---|
4983 | 5223 | { |
---|
4984 | 5224 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4985 | 5225 | browser.show(); |
---|
.. | .. |
---|
5047 | 5287 | cButton clearpanelButton; |
---|
5048 | 5288 | cButton unselectButton; |
---|
5049 | 5289 | |
---|
| 5290 | + cButton minButton; |
---|
| 5291 | + cButton maxButton; |
---|
| 5292 | + cButton fullButton; |
---|
| 5293 | + cButton undoButton; |
---|
| 5294 | + cButton redoButton; |
---|
| 5295 | + cButton saveButton; |
---|
5050 | 5296 | cButton oneStepButton; |
---|
5051 | 5297 | |
---|
5052 | 5298 | cButton screenfitButton; |
---|
.. | .. |
---|
5060 | 5306 | |
---|
5061 | 5307 | cButton setsupportButton; |
---|
5062 | 5308 | |
---|
5063 | | - cButton twoButton; |
---|
5064 | | - cButton sixButton; |
---|
5065 | | - cButton threeButton; |
---|
5066 | | - cButton sevenButton; |
---|
5067 | | - cButton fourButton; // full panel |
---|
5068 | | - cButton oneButton; // full XYZ |
---|
5069 | | - //cButton currentLayout; |
---|
5070 | | - |
---|
5071 | 5309 | // |
---|
5072 | 5310 | //Composite |
---|
5073 | 5311 | Object3D // to do !! |
---|
.. | .. |
---|
5079 | 5317 | private MenuItem lookFromItem; |
---|
5080 | 5318 | private MenuItem switchItem; |
---|
5081 | 5319 | private MenuItem cutItem; |
---|
| 5320 | + private MenuItem undoItem; |
---|
| 5321 | + private MenuItem redoItem; |
---|
5082 | 5322 | private MenuItem duplicateItem; |
---|
5083 | 5323 | private MenuItem cloneItem; |
---|
5084 | 5324 | private MenuItem cloneSupportItem; |
---|
.. | .. |
---|
5092 | 5332 | private MenuItem linkverticesItem; |
---|
5093 | 5333 | private MenuItem relinkverticesItem; |
---|
5094 | 5334 | private MenuItem setMasterItem; |
---|
5095 | | - private MenuItem resetMeshItem; |
---|
| 5335 | + private MenuItem resetAllItem; |
---|
5096 | 5336 | private MenuItem stepAllItem; |
---|
5097 | 5337 | private MenuItem revertMeshItem; |
---|
5098 | 5338 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5142 | 5382 | private MenuItem showleavesItem; |
---|
5143 | 5383 | private MenuItem markleavesItem; |
---|
5144 | 5384 | private MenuItem unmarkleavesItem; |
---|
| 5385 | + private MenuItem rewindleavesItem; |
---|
| 5386 | + private MenuItem unrewindleavesItem; |
---|
| 5387 | + private MenuItem randomleavesItem; |
---|
| 5388 | + private MenuItem unrandomleavesItem; |
---|
5145 | 5389 | |
---|
5146 | 5390 | private MenuItem flipVItem; |
---|
5147 | 5391 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5153 | 5397 | private MenuItem panoTexturesItem; |
---|
5154 | 5398 | |
---|
5155 | 5399 | private MenuItem resetCentroidItem; |
---|
5156 | | - private MenuItem transformgeometryItem; |
---|
| 5400 | + private MenuItem resetCentroidXZItem; |
---|
5157 | 5401 | private MenuItem resetTransformItem; |
---|
| 5402 | + private MenuItem transformGeometryItem; |
---|
| 5403 | + private MenuItem transformChildrenItem; |
---|
5158 | 5404 | private MenuItem hideItem; |
---|
5159 | 5405 | private MenuItem grabItem; |
---|
5160 | 5406 | private MenuItem backItem; |
---|
.. | .. |
---|
5223 | 5469 | private MenuItem doubleItem; |
---|
5224 | 5470 | private MenuItem tripleItem; |
---|
5225 | 5471 | |
---|
5226 | | - private MenuItem importGFDItem; |
---|
5227 | | - private MenuItem importVRMLX3DItem; |
---|
5228 | | - private MenuItem import3DSItem; |
---|
5229 | | - private MenuItem importOBJItem; |
---|
5230 | | - |
---|
5231 | 5472 | private MenuItem computeAOItem; |
---|
5232 | 5473 | private MenuItem recompileItem; |
---|
5233 | 5474 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5237 | 5478 | private MenuItem analyzeItem; |
---|
5238 | 5479 | private MenuItem dumpItem; |
---|
5239 | 5480 | //boolean freezemodel = false; |
---|
| 5481 | + |
---|
| 5482 | + Menu cameraMenu; |
---|
| 5483 | + MenuItem editCameraItem; |
---|
| 5484 | + MenuItem revertCameraItem; |
---|
5240 | 5485 | } |
---|