.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
.. | .. |
---|
83 | 84 | |
---|
84 | 85 | void CloneSelection(boolean supports) |
---|
85 | 86 | { |
---|
86 | | - // Object3D keep = GraphreeD.clipboard; |
---|
| 87 | + // Object3D keep = GrafreeD.clipboard; |
---|
87 | 88 | //Object3D obj; |
---|
88 | 89 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
89 | 90 | { |
---|
.. | .. |
---|
97 | 98 | |
---|
98 | 99 | void CloneClipboard(boolean supports) |
---|
99 | 100 | { |
---|
100 | | - assert(GraphreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
102 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GraphreeD.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)); |
---|
105 | 106 | else |
---|
106 | | - makeSomething(CloneObject(GraphreeD.clipboard, false)); |
---|
107 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 107 | + makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
| 108 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
108 | 109 | } |
---|
109 | 110 | |
---|
110 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 119 | // obj.support = null; |
---|
119 | 120 | if (!supports) |
---|
120 | 121 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GraphreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
122 | 123 | obj.parent = parent; |
---|
123 | 124 | // obj.support = support; |
---|
124 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
219 | 220 | resetsupportItem.addActionListener(this); |
---|
220 | 221 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 222 | linkverticesItem.addActionListener(this); |
---|
| 223 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 224 | + relinkverticesItem.addActionListener(this); |
---|
222 | 225 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
223 | 226 | setMasterItem.addActionListener(this); |
---|
224 | 227 | |
---|
225 | 228 | oe.menuBar.add(menu = new Menu("Group")); |
---|
226 | 229 | grabItem = menu.add(new MenuItem("Grab")); |
---|
227 | 230 | grabItem.addActionListener(this); |
---|
228 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
229 | | - frontItem.addActionListener(this); |
---|
230 | 231 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 232 | backItem.addActionListener(this); |
---|
| 233 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 234 | + frontItem.addActionListener(this); |
---|
232 | 235 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 236 | compositeItem.addActionListener(this); |
---|
| 237 | + hideItem = menu.add(new MenuItem("Hide")); |
---|
| 238 | + hideItem.addActionListener(this); |
---|
| 239 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 240 | + ungroupItem.addActionListener(this); |
---|
234 | 241 | menu.add("-"); |
---|
235 | 242 | randomItem = menu.add(new MenuItem("Random")); |
---|
236 | 243 | randomItem.addActionListener(this); |
---|
.. | .. |
---|
252 | 259 | oe.menuBar.add(menu = new Menu("Object")); |
---|
253 | 260 | textureItem = menu.add(new MenuItem("Texture")); |
---|
254 | 261 | textureItem.addActionListener(this); |
---|
| 262 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 263 | + billboardItem.addActionListener(this); |
---|
255 | 264 | csgItem = menu.add(new MenuItem("CSG")); |
---|
256 | 265 | csgItem.addActionListener(this); |
---|
257 | 266 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
269 | 278 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
270 | 279 | pointflowItem.addActionListener(this); |
---|
271 | 280 | menu.add("-"); |
---|
272 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
273 | | - transformgeometryItem.addActionListener(this); |
---|
274 | 281 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
275 | 282 | resetTransformItem.addActionListener(this); |
---|
276 | 283 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
277 | 284 | resetCentroidItem.addActionListener(this); |
---|
278 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
279 | | - ungroupItem.addActionListener(this); |
---|
| 285 | + transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 286 | + transformgeometryItem.addActionListener(this); |
---|
280 | 287 | |
---|
281 | 288 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
282 | 289 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
285 | 292 | genNormalsORGANItem.addActionListener(this); |
---|
286 | 293 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
287 | 294 | genNormalsCADItem.addActionListener(this); |
---|
| 295 | + genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
| 296 | + genNormalsMESHItem.addActionListener(this); |
---|
| 297 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 298 | + genNormalsMINEItem.addActionListener(this); |
---|
288 | 299 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
289 | 300 | stripifyItem.addActionListener(this); |
---|
290 | 301 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
380 | 391 | |
---|
381 | 392 | |
---|
382 | 393 | oe.menuBar.add(menu = new Menu("Include")); |
---|
383 | | - importGFDItem = menu.add(new MenuItem("GraphreeD Object...")); |
---|
| 394 | + importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
384 | 395 | importGFDItem.addActionListener(this); |
---|
385 | 396 | importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
386 | 397 | importVRMLX3DItem.addActionListener(this); |
---|
.. | .. |
---|
423 | 434 | oe.radioPanel.add(dummyButton); |
---|
424 | 435 | oe.buttonGroup.add(dummyButton); |
---|
425 | 436 | */ |
---|
426 | | - aConstraints.gridy += 1; |
---|
427 | | - oe.aConstraints.gridwidth = 1; |
---|
428 | | - oe.aConstraints.gridx = 0; |
---|
| 437 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
429 | 438 | |
---|
430 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 439 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 440 | + liveCB.setToolTipText("Enabled animation"); |
---|
431 | 441 | liveCB.addItemListener(this); |
---|
432 | 442 | |
---|
433 | | - oe.aConstraints.gridx += 1; |
---|
434 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
435 | | - supportCB.addItemListener(this); |
---|
436 | | - |
---|
437 | | - // oe.aConstraints.gridx += 1; |
---|
438 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
439 | | - // localCB.addItemListener(this); |
---|
440 | | - |
---|
441 | | - oe.aConstraints.gridx += 1; |
---|
442 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
443 | | - crowdCB.addItemListener(this); |
---|
444 | | - |
---|
445 | | - oe.aConstraints.gridx += 1; |
---|
446 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
447 | | - smoothCB.addItemListener(this); |
---|
448 | | - |
---|
449 | | - oe.aConstraints.gridx += 1; |
---|
450 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints); |
---|
| 443 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 444 | + fastCB.setToolTipText("Fast mode"); |
---|
451 | 445 | fastCB.addItemListener(this); |
---|
452 | | - oe.aConstraints.gridx += 1; |
---|
453 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
454 | | - slowCB.addItemListener(this); |
---|
455 | | - oe.aConstraints.gridx += 1; |
---|
456 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
457 | | - boxCB.addItemListener(this); |
---|
458 | | - |
---|
459 | | -// oe.aConstraints.gridx += 1; |
---|
460 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
461 | | -// speakerMocapCB.addItemListener(this); |
---|
462 | | - |
---|
463 | | - if (false) |
---|
464 | | - { |
---|
465 | | - // handled in scripts |
---|
466 | | - oe.aConstraints.gridx += 1; |
---|
467 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
468 | | - speakerCameraCB.addItemListener(this); |
---|
469 | | - |
---|
470 | | - oe.aConstraints.gridx += 1; |
---|
471 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
472 | | - speakerFocusCB.addItemListener(this); |
---|
473 | | - |
---|
474 | | - oe.aConstraints.gridx += 1; |
---|
475 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
476 | | - smoothfocusCB.addItemListener(this); |
---|
477 | | - } |
---|
478 | | - |
---|
479 | | -//oe.aConstraints.gridx += 1; |
---|
480 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
481 | | -// debugCB.addItemListener(this); |
---|
482 | | - |
---|
483 | | - oe.aConstraints.gridx += 1; |
---|
484 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
485 | | - oeilCB.addItemListener(this); |
---|
486 | | - |
---|
487 | | - oe.aConstraints.gridx += 1; |
---|
488 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
489 | | - lookAtCB.addItemListener(this); |
---|
490 | | - |
---|
491 | | - oe.aConstraints.gridx += 1; |
---|
492 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 446 | + |
---|
| 447 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 448 | + trackCB.setToolTipText("Enable tracking"); |
---|
493 | 449 | trackCB.addItemListener(this); |
---|
494 | 450 | |
---|
495 | | - oe.aConstraints.gridx += 1; |
---|
496 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 451 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 452 | + screenfitButton.setToolTipText("Screen fit"); |
---|
497 | 453 | screenfitButton.addActionListener(this); |
---|
498 | | - oe.aConstraints.gridx += 1; |
---|
| 454 | + |
---|
499 | 455 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
500 | 456 | // screenfitpointButton.addActionListener(this); |
---|
501 | 457 | // oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
| 458 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
503 | 459 | snapobjectButton.addActionListener(this); |
---|
| 460 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
504 | 461 | oe.aConstraints.gridx += 1; |
---|
505 | 462 | |
---|
506 | 463 | //aConstraints.gridx = 0; |
---|
.. | .. |
---|
508 | 465 | oe.aConstraints.weighty = 0; |
---|
509 | 466 | oe.aConstraints.gridwidth = 1; |
---|
510 | 467 | |
---|
511 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 468 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 469 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
512 | 470 | flashSelectionButton.addActionListener(this); |
---|
513 | | - oe.aConstraints.gridx += 1; |
---|
514 | | - oe.aConstraints.weighty = 0; |
---|
515 | | - oe.aConstraints.gridwidth = 1; |
---|
516 | 471 | |
---|
517 | | - // |
---|
518 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 472 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 473 | + |
---|
| 474 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 475 | + twoButton.setToolTipText("Show center view only"); |
---|
519 | 476 | twoButton.addActionListener(this); |
---|
520 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 477 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
521 | 478 | fourButton.addActionListener(this); |
---|
522 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 479 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 480 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 481 | + sixButton.setToolTipText("2-column layout left"); |
---|
523 | 482 | sixButton.addActionListener(this); |
---|
524 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 483 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 484 | + threeButton.setToolTipText("2-column layout right"); |
---|
525 | 485 | threeButton.addActionListener(this); |
---|
526 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 486 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 487 | + sevenButton.setToolTipText("3-column layout"); |
---|
527 | 488 | sevenButton.addActionListener(this); |
---|
528 | 489 | // |
---|
529 | 490 | |
---|
530 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 491 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 492 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
531 | 493 | rootButton.addActionListener(this); |
---|
532 | | - oe.aConstraints.gridx += 1; |
---|
533 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 494 | + |
---|
| 495 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 496 | + closeButton.setToolTipText("Close tab"); |
---|
534 | 497 | closeButton.addActionListener(this); |
---|
535 | 498 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
536 | 499 | //clearButton.addActionListener(this); |
---|
537 | | - oe.aConstraints.gridx += 1; |
---|
538 | 500 | |
---|
539 | | - oe.aConstraints.gridx = 1; // |
---|
540 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 501 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 502 | + |
---|
| 503 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 504 | + editButton.setToolTipText("Edit selection"); |
---|
541 | 505 | editButton.addActionListener(this); |
---|
542 | | - oe.aConstraints.gridx += 1; |
---|
543 | | - oe.aConstraints.weighty = 0; |
---|
544 | | - oe.aConstraints.gridwidth = 1; |
---|
545 | 506 | |
---|
546 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 507 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 508 | + uneditButton.setToolTipText("Unedit selection"); |
---|
547 | 509 | uneditButton.addActionListener(this); |
---|
548 | 510 | |
---|
549 | | - oe.aConstraints.gridx += 1; |
---|
550 | | - oe.aConstraints.weighty = 0; |
---|
551 | | - oe.aConstraints.gridwidth = 1; |
---|
552 | | - |
---|
553 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
| 511 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 512 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
554 | 513 | clearPanelButton.addActionListener(this); |
---|
555 | 514 | |
---|
556 | | - oe.aConstraints.gridx += 1; |
---|
557 | | - oe.aConstraints.weighty = 0; |
---|
558 | | - oe.aConstraints.gridwidth = 1; |
---|
559 | | - |
---|
560 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 515 | + commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 516 | + allParamsButton.setToolTipText("All params??"); |
---|
561 | 517 | allParamsButton.addActionListener(this); |
---|
562 | 518 | |
---|
563 | | - oe.aConstraints.gridx += 1; |
---|
564 | | - oe.aConstraints.weighty = 0; |
---|
565 | | - oe.aConstraints.gridwidth = 1; |
---|
566 | | - |
---|
567 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 519 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 520 | + unselectButton.setToolTipText("Unselect"); |
---|
568 | 521 | unselectButton.addActionListener(this); |
---|
569 | 522 | |
---|
| 523 | + commandsPanel.preferredHeight = 1; |
---|
| 524 | + |
---|
| 525 | + oe.treePanel.add(commandsPanel); |
---|
| 526 | + oe.treePanel.Return(); |
---|
| 527 | + |
---|
570 | 528 | // oe.aConstraints.gridx += 1; |
---|
571 | 529 | // oe.aConstraints.weighty = 0; |
---|
572 | 530 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
578 | 536 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
579 | 537 | // gcButton.addActionListener(this); |
---|
580 | 538 | |
---|
581 | | - oe.aConstraints.gridx = 0; |
---|
582 | | - oe.aConstraints.gridy += 1; |
---|
583 | | - |
---|
584 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
585 | | - oe.aConstraints.gridwidth = 100; |
---|
586 | | - // oe.aConstraints.gridheight = 100; |
---|
587 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
588 | | - oe.aConstraints.gridheight = 1; |
---|
589 | | - oe.aConstraints.weighty = 0.5; |
---|
590 | | - oe.aConstraints.gridx = 0; |
---|
591 | | - JScrollPane jSP; |
---|
| 539 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 540 | + |
---|
| 541 | + JScrollPane jSP; |
---|
592 | 542 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
593 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 543 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
594 | 544 | ResetModel(); |
---|
595 | | - oe.aConstraints.weighty = 0.5; |
---|
596 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
597 | | - oe.aConstraints.gridy += 1; |
---|
598 | | - oe.aConstraints.gridwidth = 1; |
---|
| 545 | + |
---|
| 546 | + oe.treePanel.add(jSPPanel); |
---|
| 547 | + oe.treePanel.Return(); |
---|
599 | 548 | |
---|
600 | | - oe.aConstraints.weighty = 0; |
---|
601 | | - oe.aConstraints.gridwidth = 2; |
---|
602 | | - |
---|
603 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
| 549 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 550 | + |
---|
| 551 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 552 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
604 | 553 | colorCB.addItemListener(this); |
---|
605 | | - oe.aConstraints.gridx += 2; |
---|
606 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 554 | + |
---|
| 555 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 556 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
607 | 557 | materialCB.addItemListener(this); |
---|
608 | | - oe.aConstraints.gridx += 2; |
---|
609 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 558 | + |
---|
| 559 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 560 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
610 | 561 | textureCB.addItemListener(this); |
---|
611 | 562 | |
---|
612 | | - oe.aConstraints.gridx = 0; |
---|
613 | | - oe.aConstraints.gridy += 1; |
---|
| 563 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 564 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 565 | + oe.treePanel.Return(); |
---|
614 | 566 | |
---|
| 567 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 568 | +// mainPanel.setResizeWeight(0.5); |
---|
| 569 | + |
---|
615 | 570 | //jList.addListSelectionListener(this); |
---|
616 | 571 | oe.jTree.addTreeSelectionListener(this); |
---|
617 | 572 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
633 | 588 | radio.layout = sevenButton; |
---|
634 | 589 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
635 | 590 | } |
---|
| 591 | + |
---|
| 592 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 593 | + { |
---|
| 594 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 595 | + supportCB.setToolTipText("Enabled rigging"); |
---|
| 596 | + supportCB.addItemListener(this); |
---|
| 597 | + |
---|
| 598 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 599 | + // localCB.addItemListener(this); |
---|
| 600 | + |
---|
| 601 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 602 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 603 | + crowdCB.addItemListener(this); |
---|
| 604 | + |
---|
| 605 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 606 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 607 | + smoothCB.addItemListener(this); |
---|
| 608 | + |
---|
| 609 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 610 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 611 | + slowCB.addItemListener(this); |
---|
| 612 | + |
---|
| 613 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 614 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 615 | + boxCB.addItemListener(this); |
---|
| 616 | + |
---|
| 617 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 618 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 619 | + zoomBoxCB.addItemListener(this); |
---|
| 620 | + |
---|
| 621 | +// constraints.gridy += 1; |
---|
| 622 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 623 | +// speakerMocapCB.addItemListener(this); |
---|
| 624 | + |
---|
| 625 | + if (false) |
---|
| 626 | + { |
---|
| 627 | + // handled in scripts |
---|
| 628 | + //constraints.gridy += 1; |
---|
| 629 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 630 | + speakerCameraCB.addItemListener(this); |
---|
| 631 | + |
---|
| 632 | + //constraints.gridy += 1; |
---|
| 633 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 634 | + speakerFocusCB.addItemListener(this); |
---|
| 635 | + |
---|
| 636 | + //constraints.gridy += 1; |
---|
| 637 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 638 | + smoothfocusCB.addItemListener(this); |
---|
| 639 | + } |
---|
| 640 | + |
---|
| 641 | +//constraints.gridx += 1; |
---|
| 642 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 643 | +// debugCB.addItemListener(this); |
---|
| 644 | + |
---|
| 645 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 646 | + oeilCB.addItemListener(this); |
---|
| 647 | + |
---|
| 648 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 649 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 650 | + lookAtCB.addItemListener(this); |
---|
| 651 | + |
---|
| 652 | + cGridBag fill = new cGridBag(); |
---|
| 653 | + |
---|
| 654 | + fill.preferredHeight = 200; |
---|
| 655 | + |
---|
| 656 | + panel.add(fill); |
---|
| 657 | + |
---|
| 658 | + } |
---|
636 | 659 | |
---|
637 | 660 | void EditObject(Object3D obj) |
---|
638 | 661 | { |
---|
639 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
640 | | - dummyButton.SetObject(obj); |
---|
641 | | - dummyButton.layout = sevenButton; |
---|
642 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
643 | | - dummyButton.addActionListener(this); |
---|
644 | | - radioPanel.add(dummyButton); |
---|
645 | | - buttonGroup.add(dummyButton); |
---|
646 | | - dummyButton.doClick(); |
---|
| 662 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 663 | + radioButton.SetObject(obj); |
---|
| 664 | + radioButton.layout = sevenButton; |
---|
| 665 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 666 | + radioButton.addActionListener(this); |
---|
| 667 | + radioPanel.add(radioButton); |
---|
| 668 | + buttonGroup.add(radioButton); |
---|
| 669 | + radioButton.doClick(); |
---|
647 | 670 | } |
---|
648 | 671 | void SetupViews(ObjEditor oe) |
---|
649 | 672 | { |
---|
.. | .. |
---|
663 | 686 | JCheckBox fastCB; |
---|
664 | 687 | JCheckBox slowCB; |
---|
665 | 688 | JCheckBox boxCB; |
---|
| 689 | + JCheckBox zoomBoxCB; |
---|
666 | 690 | JCheckBox trackCB; |
---|
667 | 691 | JCheckBox smoothfocusCB; |
---|
668 | 692 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
705 | 729 | dropAttributes |= Object3D.TEXTURE; |
---|
706 | 730 | else |
---|
707 | 731 | dropAttributes &= ~Object3D.TEXTURE; |
---|
708 | | - } |
---|
709 | | - else if(e.getSource() == liveCB) |
---|
| 732 | + } else if(e.getSource() == liveCB) |
---|
710 | 733 | { |
---|
711 | 734 | cameraView.ToggleLive(); |
---|
712 | 735 | } |
---|
.. | .. |
---|
743 | 766 | Recompile(); |
---|
744 | 767 | cameraView.repaint(); |
---|
745 | 768 | // refreshContents(); |
---|
| 769 | + } |
---|
| 770 | + else if(e.getSource() == zoomBoxCB) |
---|
| 771 | + { |
---|
| 772 | + cameraView.ToggleZoomBoxMode(); |
---|
746 | 773 | } |
---|
747 | 774 | else if(e.getSource() == smoothfocusCB) |
---|
748 | 775 | { |
---|
.. | .. |
---|
1033 | 1060 | torusItem.addActionListener(this); |
---|
1034 | 1061 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1035 | 1062 | superItem.addActionListener(this); |
---|
| 1063 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1064 | + kleinItem.addActionListener(this); |
---|
1036 | 1065 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1037 | 1066 | particleItem.addActionListener(this); |
---|
1038 | 1067 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1073 | 1102 | { |
---|
1074 | 1103 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1075 | 1104 | animationItem.addItemListener(this); |
---|
1076 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1105 | + animationItem.setState(Globals.ANIMATION); |
---|
1077 | 1106 | |
---|
1078 | 1107 | menu.add("-"); |
---|
1079 | 1108 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
.. | .. |
---|
1106 | 1135 | resetParentItem.addActionListener(this); |
---|
1107 | 1136 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1108 | 1137 | repairParentItem.addActionListener(this); |
---|
| 1138 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1139 | + repairShadowItem.addActionListener(this); |
---|
1109 | 1140 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1110 | 1141 | invariantsItem.addActionListener(this); |
---|
1111 | 1142 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1441 | 1472 | |
---|
1442 | 1473 | void Overwrite(int mask) |
---|
1443 | 1474 | { |
---|
1444 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1475 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1445 | 1476 | { |
---|
1446 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1477 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1447 | 1478 | |
---|
1448 | 1479 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1449 | 1480 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1466 | 1497 | // |
---|
1467 | 1498 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1468 | 1499 | { |
---|
| 1500 | + Object source = event.getSource(); |
---|
1469 | 1501 | /* |
---|
1470 | 1502 | if (event.getSource() == nameField) |
---|
1471 | 1503 | { |
---|
.. | .. |
---|
1477 | 1509 | } |
---|
1478 | 1510 | else |
---|
1479 | 1511 | */ |
---|
1480 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1512 | + if (source == lookAtItem || source == lookFromItem) |
---|
1481 | 1513 | { |
---|
1482 | 1514 | ScreenFit(); |
---|
1483 | 1515 | } else |
---|
1484 | | - if (event.getSource() == switchItem) |
---|
| 1516 | + if (source == switchItem) |
---|
1485 | 1517 | { |
---|
1486 | 1518 | cVector v1 = new cVector(); |
---|
1487 | 1519 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1490 | 1522 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1491 | 1523 | objEditor.cameraView.repaint(); |
---|
1492 | 1524 | } else |
---|
1493 | | - if (event.getSource() == rectoidItem) |
---|
| 1525 | + if (source == rectoidItem) |
---|
1494 | 1526 | { |
---|
1495 | 1527 | makeSomething(new Box()); |
---|
1496 | 1528 | } else |
---|
1497 | | - if (event.getSource() == particleItem) |
---|
| 1529 | + if (source == particleItem) |
---|
1498 | 1530 | { |
---|
1499 | 1531 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1500 | 1532 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1515 | 1547 | applyExample(particleGeom, "SMOKE"); |
---|
1516 | 1548 | makeSomething(particleGeom); |
---|
1517 | 1549 | } else |
---|
1518 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1550 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1519 | 1551 | { |
---|
1520 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1552 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1521 | 1553 | |
---|
1522 | 1554 | ragdoll.toParent = LA.newMatrix(); |
---|
1523 | 1555 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1535 | 1567 | } else |
---|
1536 | 1568 | /* |
---|
1537 | 1569 | */ |
---|
1538 | | - if (event.getSource() == heightFieldItem) |
---|
| 1570 | + if (source == heightFieldItem) |
---|
1539 | 1571 | { |
---|
1540 | 1572 | Object3D obj = new Object3D(); |
---|
1541 | 1573 | |
---|
.. | .. |
---|
1573 | 1605 | |
---|
1574 | 1606 | makeSomething(obj); |
---|
1575 | 1607 | } else |
---|
1576 | | - if (event.getSource() == gridItem) |
---|
| 1608 | + if (source == gridItem) |
---|
1577 | 1609 | { |
---|
1578 | 1610 | makeSomething(new Grid()); |
---|
1579 | 1611 | } else |
---|
1580 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1612 | + if (source == ellipsoidItem) |
---|
1581 | 1613 | { |
---|
1582 | 1614 | makeSomething(new Sphere()); |
---|
1583 | 1615 | } else |
---|
1584 | | - if (event.getSource() == coneItem) |
---|
| 1616 | + if (source == coneItem) |
---|
1585 | 1617 | { |
---|
1586 | 1618 | makeSomething(new Cone()); |
---|
1587 | 1619 | } else |
---|
1588 | | - if (event.getSource() == torusItem) |
---|
| 1620 | + if (source == torusItem) |
---|
1589 | 1621 | { |
---|
1590 | 1622 | makeSomething(new Torus()); |
---|
1591 | 1623 | } else |
---|
1592 | | - if (event.getSource() == superItem) |
---|
| 1624 | + if (source == superItem) |
---|
1593 | 1625 | { |
---|
1594 | 1626 | makeSomething(new Superellipsoid()); |
---|
1595 | 1627 | } else |
---|
1596 | | - if (event.getSource() == blobItem) |
---|
| 1628 | + if (source == kleinItem) |
---|
| 1629 | + { |
---|
| 1630 | + makeSomething(new Klein()); |
---|
| 1631 | + } else |
---|
| 1632 | + if (source == blobItem) |
---|
1597 | 1633 | { |
---|
1598 | 1634 | Blob blob = new Blob(); |
---|
1599 | 1635 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1601 | 1637 | //blob.retile(); |
---|
1602 | 1638 | makeSomething(blob); |
---|
1603 | 1639 | } else |
---|
1604 | | - if (event.getSource() == latheItem) |
---|
| 1640 | + if (source == latheItem) |
---|
1605 | 1641 | { |
---|
1606 | 1642 | makeSomething(new Lathe()); |
---|
1607 | 1643 | } else |
---|
1608 | | - if (event.getSource() == bezierItem) |
---|
| 1644 | + if (source == bezierItem) |
---|
1609 | 1645 | { |
---|
1610 | 1646 | makeSomething(new BezierSurface()); |
---|
1611 | 1647 | } else |
---|
1612 | | - if (event.getSource() == checkerItem) |
---|
| 1648 | + if (source == checkerItem) |
---|
1613 | 1649 | { |
---|
1614 | 1650 | /* |
---|
1615 | 1651 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1624 | 1660 | */ |
---|
1625 | 1661 | makeSomething(new Checker()); |
---|
1626 | 1662 | } else |
---|
1627 | | - if (event.getSource() == meshItem) |
---|
| 1663 | + if (source == meshItem) |
---|
1628 | 1664 | { |
---|
1629 | 1665 | Object3D itemtomake = new Object3D(); |
---|
1630 | 1666 | Object3D child; |
---|
.. | .. |
---|
1645 | 1681 | makeSomething(child); |
---|
1646 | 1682 | } |
---|
1647 | 1683 | } else |
---|
1648 | | - if (event.getSource() == springItem) |
---|
| 1684 | + if (source == springItem) |
---|
1649 | 1685 | { |
---|
1650 | 1686 | cSpring s = new cSpring(); |
---|
1651 | 1687 | s.setup(); |
---|
1652 | 1688 | makeSomething(s); |
---|
1653 | 1689 | } else |
---|
1654 | | - if (event.getSource() == flagItem) |
---|
| 1690 | + if (source == flagItem) |
---|
1655 | 1691 | { |
---|
1656 | 1692 | cSpring s = new cFlag(); |
---|
1657 | 1693 | s.setup(); |
---|
1658 | 1694 | makeSomething(s); |
---|
1659 | 1695 | } else |
---|
1660 | | - if (event.getSource() == lightItem) |
---|
| 1696 | + if (source == lightItem) |
---|
1661 | 1697 | { |
---|
1662 | 1698 | makeSomething(new Light()); |
---|
1663 | 1699 | } else |
---|
1664 | | - if (event.getSource() == csgItem) |
---|
| 1700 | + if (source == csgItem) |
---|
1665 | 1701 | { |
---|
1666 | 1702 | group(new CSG()); |
---|
1667 | 1703 | } else |
---|
1668 | | - if (event.getSource() == templateItem) |
---|
| 1704 | + if (source == templateItem) |
---|
1669 | 1705 | { |
---|
1670 | 1706 | group(new cTemplate()); |
---|
1671 | 1707 | } else |
---|
1672 | | - if (event.getSource() == attributeItem) |
---|
| 1708 | + if (source == attributeItem) |
---|
1673 | 1709 | { |
---|
1674 | 1710 | makeSomething(new Attribute()); |
---|
1675 | 1711 | } else |
---|
1676 | | - if (event.getSource() == pointflowItem) |
---|
| 1712 | + if (source == pointflowItem) |
---|
1677 | 1713 | { |
---|
1678 | 1714 | makeSomething(new PointFlow()); |
---|
1679 | 1715 | } else |
---|
.. | .. |
---|
1685 | 1721 | } else |
---|
1686 | 1722 | */ |
---|
1687 | 1723 | |
---|
1688 | | - if (event.getSource() == superLoopItem) |
---|
| 1724 | + if (source == superLoopItem) |
---|
1689 | 1725 | { |
---|
1690 | 1726 | Composite g = new cGroup(); |
---|
1691 | 1727 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1707 | 1743 | |
---|
1708 | 1744 | group(g); |
---|
1709 | 1745 | } else |
---|
1710 | | - if (event.getSource() == loopItem) |
---|
| 1746 | + if (source == loopItem) |
---|
1711 | 1747 | { |
---|
1712 | 1748 | Composite csg = new GroupLeaf(); |
---|
1713 | 1749 | csg.count = 5; |
---|
.. | .. |
---|
1716 | 1752 | csg.addChild(child); |
---|
1717 | 1753 | child.addChild(csg); |
---|
1718 | 1754 | } else |
---|
1719 | | - if (event.getSource() == doubleItem) |
---|
| 1755 | + if (source == doubleItem) |
---|
1720 | 1756 | { |
---|
1721 | 1757 | Composite csg = new GroupLeaf(); |
---|
1722 | 1758 | csg.count = 5; |
---|
.. | .. |
---|
1728 | 1764 | csg.addChild(child); |
---|
1729 | 1765 | child.addChild(csg); |
---|
1730 | 1766 | } else |
---|
1731 | | - if (event.getSource() == tripleItem) |
---|
| 1767 | + if (source == tripleItem) |
---|
1732 | 1768 | { |
---|
1733 | 1769 | Composite csg = new GroupLeaf(); |
---|
1734 | 1770 | csg.count = 4; |
---|
.. | .. |
---|
1744 | 1780 | child.addChild(csg); |
---|
1745 | 1781 | } else |
---|
1746 | 1782 | |
---|
1747 | | - if (event.getSource() == importGFDItem) |
---|
| 1783 | + if (source == importGFDItem) |
---|
1748 | 1784 | { |
---|
1749 | 1785 | ImportGFD(); |
---|
1750 | 1786 | } else |
---|
1751 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1787 | + if (source == importVRMLX3DItem) |
---|
1752 | 1788 | { |
---|
1753 | 1789 | ImportVRMLX3D(); |
---|
1754 | 1790 | } else |
---|
1755 | | - if (event.getSource() == import3DSItem) |
---|
| 1791 | + if (source == import3DSItem) |
---|
1756 | 1792 | { |
---|
1757 | 1793 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1758 | 1794 | } else |
---|
1759 | | - if (event.getSource() == importOBJItem) |
---|
| 1795 | + if (source == importOBJItem) |
---|
1760 | 1796 | { |
---|
1761 | 1797 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1762 | 1798 | } else |
---|
1763 | | - if (event.getSource() == computeAOItem) |
---|
| 1799 | + if (source == computeAOItem) |
---|
1764 | 1800 | { |
---|
1765 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1766 | | - CameraPane.theRenderer.repaint(); |
---|
| 1801 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1802 | + Globals.theRenderer.repaint(); |
---|
1767 | 1803 | } else |
---|
1768 | | - if (event.getSource() == recompileItem) |
---|
| 1804 | + if (source == recompileItem) |
---|
1769 | 1805 | { |
---|
1770 | 1806 | Recompile(); |
---|
1771 | 1807 | refreshContents(); |
---|
1772 | 1808 | } else |
---|
1773 | | - if (event.getSource() == editScriptItem) |
---|
| 1809 | + if (source == editScriptItem) |
---|
1774 | 1810 | { |
---|
1775 | 1811 | OpenDialog(); |
---|
1776 | 1812 | refreshContents(); |
---|
1777 | 1813 | } else |
---|
1778 | | - if (event.getSource() == invariantsItem) |
---|
| 1814 | + if (source == invariantsItem) |
---|
1779 | 1815 | { |
---|
1780 | 1816 | System.out.println("Invariants:"); |
---|
1781 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1817 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1782 | 1818 | } else |
---|
1783 | | - if (event.getSource() == memoryItem) |
---|
| 1819 | + if (source == memoryItem) |
---|
1784 | 1820 | { |
---|
1785 | 1821 | //System.out.println("Invariants:"); |
---|
1786 | 1822 | PrintMemory(); |
---|
1787 | 1823 | } else |
---|
1788 | | - if (event.getSource() == pathItem) |
---|
| 1824 | + if (source == pathItem) |
---|
1789 | 1825 | { |
---|
1790 | 1826 | PrintPath(); |
---|
1791 | 1827 | } else |
---|
1792 | | - if (event.getSource() == analyzeItem) |
---|
| 1828 | + if (source == analyzeItem) |
---|
1793 | 1829 | { |
---|
1794 | 1830 | AnalyzeObject(); |
---|
1795 | 1831 | } else |
---|
1796 | | - if (event.getSource() == dumpItem) |
---|
| 1832 | + if (source == dumpItem) |
---|
1797 | 1833 | { |
---|
1798 | 1834 | DumpObject(); |
---|
1799 | 1835 | } else |
---|
1800 | | - if (event.getSource() == screenfitButton) |
---|
| 1836 | + if (source == screenfitButton) |
---|
1801 | 1837 | { |
---|
1802 | 1838 | //Reload(lastConverter, lastFilename, true); |
---|
1803 | 1839 | ScreenFit(); |
---|
1804 | 1840 | } else |
---|
1805 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1841 | + if (source == screenfitpointButton) |
---|
1806 | 1842 | { |
---|
1807 | 1843 | //Reload(lastConverter, lastFilename, true); |
---|
1808 | 1844 | ScreenFitPoint(); |
---|
1809 | 1845 | } else |
---|
1810 | | - if (event.getSource() == snapobjectButton) |
---|
| 1846 | + if (source == snapobjectButton) |
---|
1811 | 1847 | { |
---|
1812 | 1848 | //Reload(lastConverter, lastFilename, true); |
---|
1813 | 1849 | SnapObject(); |
---|
.. | .. |
---|
1818 | 1854 | // Recompile(); |
---|
1819 | 1855 | // refreshContents(); |
---|
1820 | 1856 | // } else |
---|
1821 | | - if (event.getSource() == gcButton) |
---|
| 1857 | + if (source == gcButton) |
---|
1822 | 1858 | { |
---|
1823 | 1859 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1824 | 1860 | System.gc(); |
---|
1825 | 1861 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1826 | 1862 | } else |
---|
1827 | | - if (event.getSource() == editLeafItem) |
---|
| 1863 | + if (source == editLeafItem) |
---|
1828 | 1864 | { |
---|
1829 | 1865 | Object3D obj; |
---|
1830 | 1866 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1838 | 1874 | } |
---|
1839 | 1875 | refreshContents(true); |
---|
1840 | 1876 | } else |
---|
1841 | | - if (event.getSource() == openWindowItem) |
---|
| 1877 | + if (source == openWindowItem) |
---|
1842 | 1878 | { |
---|
1843 | 1879 | EditSelection(true); |
---|
1844 | 1880 | } else |
---|
1845 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1881 | + if (source == cutItem || source == clearButton) |
---|
1846 | 1882 | { |
---|
1847 | 1883 | loadClipboard(true); |
---|
1848 | 1884 | } else |
---|
1849 | | - if (event.getSource() == duplicateItem) |
---|
| 1885 | + if (source == duplicateItem) |
---|
1850 | 1886 | { |
---|
1851 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1887 | + Object3D keep = GrafreeD.clipboard; |
---|
1852 | 1888 | loadClipboard(false); |
---|
1853 | 1889 | paste(false); |
---|
1854 | | - GraphreeD.clipboard = keep; |
---|
| 1890 | + GrafreeD.clipboard = keep; |
---|
1855 | 1891 | } else |
---|
1856 | | - if (event.getSource() == cloneItem) |
---|
| 1892 | + if (source == cloneItem) |
---|
1857 | 1893 | { |
---|
1858 | 1894 | CloneSelection(false); |
---|
1859 | 1895 | } else |
---|
1860 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1896 | + if (source == cloneSupportItem) |
---|
1861 | 1897 | { |
---|
1862 | 1898 | CloneSelection(true); |
---|
1863 | 1899 | } else |
---|
1864 | | - if (event.getSource() == copyItem) |
---|
| 1900 | + if (source == copyItem) |
---|
1865 | 1901 | { |
---|
1866 | 1902 | loadClipboard(false); |
---|
1867 | 1903 | } else |
---|
1868 | | - if (event.getSource() == pasteItem) |
---|
| 1904 | + if (source == pasteItem) |
---|
1869 | 1905 | { |
---|
1870 | 1906 | paste(false); |
---|
1871 | 1907 | } else |
---|
1872 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1908 | + if (source == pasteLinkItem) |
---|
1873 | 1909 | { |
---|
1874 | 1910 | pasteInto(false); |
---|
1875 | 1911 | } else |
---|
1876 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1912 | + if (source == pasteCloneItem) |
---|
1877 | 1913 | { |
---|
1878 | 1914 | pasteInto(true); |
---|
1879 | 1915 | } else |
---|
1880 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1916 | + if (source == pasteExpandItem) |
---|
1881 | 1917 | { |
---|
1882 | 1918 | paste(true); |
---|
1883 | 1919 | } else |
---|
1884 | | - if (event.getSource() == synchronizeItem) |
---|
| 1920 | + if (source == synchronizeItem) |
---|
1885 | 1921 | { |
---|
1886 | 1922 | Overwrite(Object3D.TRANSFORM); |
---|
1887 | 1923 | } else |
---|
1888 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1924 | + if (source == overwriteNameItem) |
---|
1889 | 1925 | { |
---|
1890 | 1926 | Overwrite(Object3D.NAME); |
---|
1891 | 1927 | } else |
---|
1892 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1928 | + if (source == overwriteUVItem) |
---|
1893 | 1929 | { |
---|
1894 | 1930 | Overwrite(Object3D.UV); |
---|
1895 | 1931 | } else |
---|
1896 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1932 | + if (source == overwriteMatItem) |
---|
1897 | 1933 | { |
---|
| 1934 | + /* july 2015 |
---|
1898 | 1935 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1899 | | - Overwrite(Object3D.MATERIAL); |
---|
| 1936 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1900 | 1937 | else |
---|
1901 | 1938 | { |
---|
1902 | 1939 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1908 | 1945 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1909 | 1946 | } |
---|
1910 | 1947 | } |
---|
| 1948 | + */ |
---|
| 1949 | + |
---|
| 1950 | + Overwrite(dropAttributes); |
---|
1911 | 1951 | } |
---|
1912 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 1952 | + if (source == overwriteGeoItem) |
---|
1913 | 1953 | { |
---|
1914 | 1954 | Overwrite(Object3D.GEOMETRY); |
---|
1915 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1955 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1916 | 1956 | // { |
---|
1917 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1957 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1918 | 1958 | // |
---|
1919 | 1959 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1920 | 1960 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1926 | 1966 | // refreshContents(); |
---|
1927 | 1967 | // } |
---|
1928 | 1968 | } else |
---|
1929 | | - if (event.getSource() == generateMeshItem) |
---|
| 1969 | + if (source == generateMeshItem) |
---|
1930 | 1970 | { |
---|
1931 | 1971 | //if (group.selection.size() == 1) |
---|
1932 | 1972 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1937 | 1977 | ResetModel(); |
---|
1938 | 1978 | refreshContents(); |
---|
1939 | 1979 | } else |
---|
1940 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 1980 | + if (source == extractGeometriesItem) |
---|
1941 | 1981 | { |
---|
1942 | 1982 | boolean one = false; |
---|
1943 | 1983 | |
---|
.. | .. |
---|
1964 | 2004 | ResetModel(); |
---|
1965 | 2005 | refreshContents(); |
---|
1966 | 2006 | } else |
---|
1967 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2007 | + if (source == cloneGeometriesItem) |
---|
1968 | 2008 | { |
---|
1969 | 2009 | boolean one = false; |
---|
1970 | 2010 | |
---|
.. | .. |
---|
1990 | 2030 | ResetModel(); |
---|
1991 | 2031 | refreshContents(); |
---|
1992 | 2032 | } else |
---|
1993 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2033 | + if (source == shareGeometriesItem) |
---|
1994 | 2034 | { |
---|
1995 | 2035 | boolean one = false; |
---|
1996 | 2036 | |
---|
1997 | 2037 | if (group.selection.size() == 1) |
---|
1998 | 2038 | one = true; |
---|
1999 | 2039 | |
---|
| 2040 | + Object3D merge = null; |
---|
| 2041 | + |
---|
2000 | 2042 | Object3D content = new cGroup(); |
---|
2001 | 2043 | |
---|
2002 | 2044 | for (int i=0; i<group.selection.size(); i++) |
---|
2003 | 2045 | { |
---|
2004 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2046 | + merge = new Merge(group.selection.get(i)); |
---|
2005 | 2047 | |
---|
2006 | 2048 | if (one) |
---|
2007 | | - makeSomething(sel, false); |
---|
| 2049 | + makeSomething(merge, false); |
---|
2008 | 2050 | else |
---|
2009 | | - content.addChild(sel); |
---|
| 2051 | + content.addChild(merge); |
---|
2010 | 2052 | } |
---|
2011 | 2053 | |
---|
2012 | 2054 | if (!one) |
---|
2013 | | - makeSomething(content, false); |
---|
2014 | | - |
---|
2015 | | - ResetModel(); |
---|
2016 | | - refreshContents(); |
---|
| 2055 | + makeSomething(content, true); |
---|
| 2056 | + else |
---|
| 2057 | + { |
---|
| 2058 | + ResetModel(); |
---|
| 2059 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2060 | + refreshContents(); |
---|
| 2061 | + } |
---|
2017 | 2062 | } else |
---|
2018 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2063 | + if (source == mergeGeometriesItem) |
---|
2019 | 2064 | { |
---|
2020 | 2065 | boolean one = false; |
---|
2021 | 2066 | |
---|
.. | .. |
---|
2045 | 2090 | ResetModel(); |
---|
2046 | 2091 | refreshContents(); |
---|
2047 | 2092 | } else |
---|
2048 | | - if (event.getSource() == linkverticesItem) |
---|
| 2093 | + if (source == linkverticesItem) |
---|
2049 | 2094 | { |
---|
2050 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2095 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2051 | 2096 | // { |
---|
2052 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2097 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2053 | 2098 | // |
---|
2054 | 2099 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2055 | 2100 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2058 | 2103 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2059 | 2104 | // refreshContents(); |
---|
2060 | 2105 | // } |
---|
2061 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2106 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2062 | 2107 | { |
---|
2063 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2108 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2064 | 2109 | |
---|
2065 | 2110 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2066 | 2111 | content = ((cGroup)content).get(0); |
---|
2067 | 2112 | |
---|
2068 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2113 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2069 | 2114 | for (int i=0; i<group.selection.size(); i++) |
---|
2070 | 2115 | { |
---|
2071 | 2116 | boolean random = CameraPane.RANDOM; |
---|
.. | .. |
---|
2074 | 2119 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2075 | 2120 | CameraPane.RANDOM = random; |
---|
2076 | 2121 | } |
---|
2077 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2122 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2078 | 2123 | refreshContents(); |
---|
2079 | 2124 | } |
---|
2080 | 2125 | } else |
---|
2081 | | - if (event.getSource() == resetsupportItem) |
---|
| 2126 | + if (source == resetsupportItem) |
---|
2082 | 2127 | { |
---|
2083 | 2128 | for (int i=0; i<group.selection.size(); i++) |
---|
2084 | 2129 | { |
---|
.. | .. |
---|
2090 | 2135 | |
---|
2091 | 2136 | refreshContents(); |
---|
2092 | 2137 | } else |
---|
2093 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2138 | + if (source == relinkverticesItem) |
---|
| 2139 | + { |
---|
| 2140 | + boolean random = CameraPane.RANDOM; |
---|
| 2141 | + CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2142 | + group.selection.RelinkToSupport(); |
---|
| 2143 | + CameraPane.RANDOM = random; |
---|
| 2144 | + |
---|
| 2145 | + refreshContents(); |
---|
| 2146 | + } else |
---|
| 2147 | + if (source == resetreferencesItem) |
---|
2094 | 2148 | { |
---|
2095 | 2149 | for (int i=0; i<group.selection.size(); i++) |
---|
2096 | 2150 | { |
---|
.. | .. |
---|
2099 | 2153 | |
---|
2100 | 2154 | refreshContents(); |
---|
2101 | 2155 | } else |
---|
2102 | | - if (event.getSource() == setMasterItem) |
---|
| 2156 | + if (source == setMasterItem) |
---|
2103 | 2157 | { |
---|
2104 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2158 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2105 | 2159 | { |
---|
2106 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2160 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2107 | 2161 | |
---|
2108 | 2162 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2109 | 2163 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2112 | 2166 | refreshContents(); |
---|
2113 | 2167 | } |
---|
2114 | 2168 | } else |
---|
2115 | | - if (event.getSource() == poseMeshItem) |
---|
| 2169 | + if (source == poseMeshItem) |
---|
2116 | 2170 | { |
---|
2117 | 2171 | if (group.selection.size() == 1) |
---|
2118 | 2172 | { |
---|
2119 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2173 | + if (GrafreeD.clipboard.size() == 1) |
---|
2120 | 2174 | { |
---|
2121 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2175 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2122 | 2176 | |
---|
2123 | 2177 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2124 | 2178 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2131 | 2185 | } |
---|
2132 | 2186 | |
---|
2133 | 2187 | } else |
---|
2134 | | - if (event.getSource() == revertMeshItem) |
---|
| 2188 | + if (source == revertMeshItem) |
---|
2135 | 2189 | { |
---|
2136 | 2190 | RevertMeshes(); |
---|
2137 | 2191 | } else |
---|
2138 | | - if (event.getSource() == resetMeshItem) |
---|
| 2192 | + if (source == resetMeshItem) |
---|
2139 | 2193 | { |
---|
2140 | 2194 | ResetAll(); |
---|
2141 | 2195 | } else |
---|
2142 | | - if (event.getSource() == stepAllItem) |
---|
| 2196 | + if (source == stepAllItem) |
---|
2143 | 2197 | { |
---|
2144 | 2198 | StepAll(); |
---|
2145 | 2199 | } else |
---|
2146 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2200 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2147 | 2201 | { |
---|
2148 | 2202 | //int indices[] = jList.getSelectedIndices(); |
---|
2149 | 2203 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2151 | 2205 | |
---|
2152 | 2206 | ClearSelection(false); |
---|
2153 | 2207 | } else |
---|
2154 | | - if (event.getSource() == clearAllItem) |
---|
| 2208 | + if (source == clearAllItem) |
---|
2155 | 2209 | { |
---|
2156 | 2210 | ClearSelection(true); |
---|
2157 | 2211 | } else |
---|
2158 | | - if (event.getSource() == grabItem) |
---|
| 2212 | + if (source == grabItem) |
---|
2159 | 2213 | { |
---|
2160 | 2214 | group(new cGroup(), true); |
---|
2161 | 2215 | } else |
---|
2162 | | - if (event.getSource() == frontItem) |
---|
| 2216 | + if (source == hideItem) |
---|
| 2217 | + { |
---|
| 2218 | + group(new HiddenObject()); |
---|
| 2219 | + } else |
---|
| 2220 | + if (source == frontItem) |
---|
2163 | 2221 | { |
---|
2164 | 2222 | front(); |
---|
2165 | 2223 | } else |
---|
2166 | | - if (event.getSource() == backItem) |
---|
| 2224 | + if (source == backItem) |
---|
2167 | 2225 | { |
---|
2168 | 2226 | back(); |
---|
2169 | 2227 | } else |
---|
2170 | | - if (event.getSource() == cameraItem) |
---|
| 2228 | + if (source == cameraItem) |
---|
2171 | 2229 | { |
---|
2172 | 2230 | makeSomething(new Camera()); |
---|
2173 | 2231 | } else |
---|
2174 | | - if (event.getSource() == compositeItem) |
---|
| 2232 | + if (source == compositeItem) |
---|
2175 | 2233 | { |
---|
2176 | 2234 | group(new Composite()); |
---|
2177 | 2235 | } else |
---|
2178 | | - if (event.getSource() == randomItem) |
---|
| 2236 | + if (source == randomItem) |
---|
2179 | 2237 | { |
---|
2180 | 2238 | RandomNode random = new RandomNode(); |
---|
2181 | 2239 | group(random); |
---|
2182 | 2240 | if (random.size() > 0) |
---|
2183 | 2241 | random.name = random.get(0).name + "Rnd"; |
---|
2184 | 2242 | } else |
---|
2185 | | - if (event.getSource() == physicsItem) |
---|
| 2243 | + if (source == physicsItem) |
---|
2186 | 2244 | { |
---|
2187 | 2245 | group(new PhysicsNode()); |
---|
2188 | 2246 | } else |
---|
2189 | | - if (event.getSource() == frameselectorItem) |
---|
| 2247 | + if (source == frameselectorItem) |
---|
2190 | 2248 | { |
---|
2191 | 2249 | for (int i=0; i<group.selection.size(); i++) |
---|
2192 | 2250 | { |
---|
.. | .. |
---|
2198 | 2256 | ResetModel(); |
---|
2199 | 2257 | refreshContents(); |
---|
2200 | 2258 | } else |
---|
2201 | | - if (event.getSource() == switchGeoItem) |
---|
| 2259 | + if (source == switchGeoItem) |
---|
2202 | 2260 | { |
---|
2203 | 2261 | for (int i=0; i<group.selection.size(); i++) |
---|
2204 | 2262 | { |
---|
.. | .. |
---|
2210 | 2268 | ResetModel(); |
---|
2211 | 2269 | refreshContents(); |
---|
2212 | 2270 | } else |
---|
2213 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2271 | + if (source == switchTransfoItem) |
---|
2214 | 2272 | { |
---|
2215 | 2273 | for (int i=0; i<group.selection.size(); i++) |
---|
2216 | 2274 | { |
---|
.. | .. |
---|
2222 | 2280 | ResetModel(); |
---|
2223 | 2281 | refreshContents(); |
---|
2224 | 2282 | } else |
---|
2225 | | - if (event.getSource() == morphItem) |
---|
| 2283 | + if (source == morphItem) |
---|
2226 | 2284 | { |
---|
2227 | 2285 | for (int i=0; i<group.selection.size(); i++) |
---|
2228 | 2286 | { |
---|
.. | .. |
---|
2234 | 2292 | ResetModel(); |
---|
2235 | 2293 | refreshContents(); |
---|
2236 | 2294 | } else |
---|
2237 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2295 | + if (source == scriptNodeItem) |
---|
2238 | 2296 | { |
---|
2239 | 2297 | boolean atleastone = false; |
---|
2240 | 2298 | |
---|
.. | .. |
---|
2273 | 2331 | } |
---|
2274 | 2332 | } |
---|
2275 | 2333 | } else |
---|
2276 | | - if (event.getSource() == linkerItem) |
---|
| 2334 | + if (source == linkerItem) |
---|
2277 | 2335 | { |
---|
2278 | 2336 | group(new cLinker()); |
---|
2279 | 2337 | } else |
---|
2280 | | - if (event.getSource() == textureItem) |
---|
| 2338 | + if (source == textureItem) |
---|
2281 | 2339 | { |
---|
2282 | 2340 | group(new TextureNode()); |
---|
2283 | 2341 | } else |
---|
2284 | | - if (event.getSource() == shadowXItem) |
---|
| 2342 | + if (source == billboardItem) |
---|
| 2343 | + { |
---|
| 2344 | + group(new BillboardNode()); |
---|
| 2345 | + } else |
---|
| 2346 | + if (source == shadowXItem) |
---|
2285 | 2347 | { |
---|
2286 | 2348 | CastShadow(0); |
---|
2287 | 2349 | } else |
---|
2288 | | - if (event.getSource() == shadowYItem) |
---|
| 2350 | + if (source == shadowYItem) |
---|
2289 | 2351 | { |
---|
2290 | 2352 | CastShadow(1); |
---|
2291 | 2353 | } else |
---|
2292 | | - if (event.getSource() == shadowZItem) |
---|
| 2354 | + if (source == shadowZItem) |
---|
2293 | 2355 | { |
---|
2294 | 2356 | CastShadow(2); |
---|
2295 | 2357 | } else |
---|
2296 | | - if (event.getSource() == ungroupItem) |
---|
| 2358 | + if (source == ungroupItem) |
---|
2297 | 2359 | { |
---|
2298 | | - ungroup(); |
---|
| 2360 | + //ungroup(); |
---|
| 2361 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2362 | + { |
---|
| 2363 | + Ungroup(group.selection.get(i)); |
---|
| 2364 | + } |
---|
| 2365 | + |
---|
| 2366 | + ClearSelection(false); |
---|
| 2367 | + |
---|
| 2368 | + refreshContents(); |
---|
2299 | 2369 | } else |
---|
2300 | | - if (event.getSource() == genUVItem) |
---|
| 2370 | + if (source == genUVItem) |
---|
2301 | 2371 | { |
---|
2302 | 2372 | GenUV(); |
---|
2303 | 2373 | } else |
---|
2304 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2374 | + if (source == genNormalsCADItem) |
---|
2305 | 2375 | { |
---|
2306 | 2376 | GenNormals(true); |
---|
2307 | 2377 | } else |
---|
2308 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2378 | + if (source == genNormalsMESHItem) |
---|
| 2379 | + { |
---|
| 2380 | + GenNormals(true); // TODO |
---|
| 2381 | + } else |
---|
| 2382 | + if (source == genNormalsORGANItem) |
---|
2309 | 2383 | { |
---|
2310 | 2384 | GenNormals(false); |
---|
2311 | 2385 | } else |
---|
2312 | | - if (event.getSource() == stripifyItem) |
---|
| 2386 | + if (source == genNormalsMINEItem) |
---|
| 2387 | + { |
---|
| 2388 | + GenNormalsMINE(); |
---|
| 2389 | + } else |
---|
| 2390 | + if (source == stripifyItem) |
---|
2313 | 2391 | { |
---|
2314 | 2392 | Stripify(); |
---|
2315 | 2393 | } else |
---|
2316 | | - if (event.getSource() == unstripifyItem) |
---|
| 2394 | + if (source == unstripifyItem) |
---|
2317 | 2395 | { |
---|
2318 | 2396 | Unstripify(); |
---|
2319 | 2397 | } else |
---|
2320 | | - if (event.getSource() == trimItem) |
---|
| 2398 | + if (source == trimItem) |
---|
2321 | 2399 | { |
---|
2322 | 2400 | Trim(); |
---|
2323 | 2401 | } else |
---|
2324 | | - if (event.getSource() == untrimItem) |
---|
| 2402 | + if (source == untrimItem) |
---|
2325 | 2403 | { |
---|
2326 | 2404 | Untrim(); |
---|
2327 | 2405 | } else |
---|
2328 | | - if (event.getSource() == clearColorsItem) |
---|
| 2406 | + if (source == clearColorsItem) |
---|
2329 | 2407 | { |
---|
2330 | 2408 | ClearColors(); |
---|
2331 | 2409 | } else |
---|
2332 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2410 | + if (source == clearMaterialsItem) |
---|
2333 | 2411 | { |
---|
2334 | 2412 | ClearMaterials(); |
---|
2335 | 2413 | } else |
---|
2336 | | - if (event.getSource() == liveleavesItem) |
---|
| 2414 | + if (source == liveleavesItem) |
---|
2337 | 2415 | { |
---|
2338 | 2416 | LiveLeaves(true); |
---|
2339 | 2417 | } else |
---|
2340 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2418 | + if (source == unliveleavesItem) |
---|
2341 | 2419 | { |
---|
2342 | 2420 | LiveLeaves(false); |
---|
2343 | 2421 | } else |
---|
2344 | | - if (event.getSource() == supportleavesItem) |
---|
| 2422 | + if (source == supportleavesItem) |
---|
2345 | 2423 | { |
---|
2346 | 2424 | SupportLeaves(true); |
---|
2347 | 2425 | } else |
---|
2348 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2426 | + if (source == unsupportleavesItem) |
---|
2349 | 2427 | { |
---|
2350 | 2428 | SupportLeaves(false); |
---|
2351 | 2429 | } else |
---|
2352 | | - if (event.getSource() == hideleavesItem) |
---|
| 2430 | + if (source == hideleavesItem) |
---|
2353 | 2431 | { |
---|
2354 | 2432 | HideLeaves(true); |
---|
2355 | 2433 | } else |
---|
2356 | | - if (event.getSource() == showleavesItem) |
---|
| 2434 | + if (source == showleavesItem) |
---|
2357 | 2435 | { |
---|
2358 | 2436 | HideLeaves(false); |
---|
2359 | 2437 | } else |
---|
2360 | | - if (event.getSource() == markleavesItem) |
---|
| 2438 | + if (source == markleavesItem) |
---|
2361 | 2439 | { |
---|
2362 | 2440 | MarkLeaves(true); |
---|
2363 | 2441 | } else |
---|
2364 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2442 | + if (source == unmarkleavesItem) |
---|
2365 | 2443 | { |
---|
2366 | 2444 | MarkLeaves(false); |
---|
2367 | 2445 | } else |
---|
2368 | | - if (event.getSource() == flipVItem) |
---|
| 2446 | + if (source == flipVItem) |
---|
2369 | 2447 | { |
---|
2370 | 2448 | FlipV(true); |
---|
2371 | 2449 | } else |
---|
2372 | | - if (event.getSource() == unflipVItem) |
---|
| 2450 | + if (source == unflipVItem) |
---|
2373 | 2451 | { |
---|
2374 | 2452 | FlipV(false); |
---|
2375 | 2453 | } else |
---|
2376 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2454 | + if (source == lowTexturesItem) |
---|
2377 | 2455 | { |
---|
2378 | 2456 | SetTexRes(0); |
---|
2379 | 2457 | } else |
---|
2380 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2458 | + if (source == normalTexturesItem) |
---|
2381 | 2459 | { |
---|
2382 | 2460 | SetTexRes(1); |
---|
2383 | 2461 | } else |
---|
2384 | | - if (event.getSource() == highTexturesItem) |
---|
| 2462 | + if (source == highTexturesItem) |
---|
2385 | 2463 | { |
---|
2386 | 2464 | SetTexRes(2); |
---|
2387 | 2465 | } else |
---|
2388 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2466 | + if (source == veryhighTexturesItem) |
---|
2389 | 2467 | { |
---|
2390 | 2468 | SetTexRes(3); |
---|
2391 | 2469 | } else |
---|
2392 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2470 | + if (source == maxTexturesItem) |
---|
2393 | 2471 | { |
---|
2394 | 2472 | SetTexRes(4); |
---|
2395 | 2473 | } else |
---|
2396 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2474 | + if (source == panoTexturesItem) |
---|
2397 | 2475 | { |
---|
2398 | 2476 | SetTexRes(5); |
---|
2399 | 2477 | } else |
---|
2400 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2478 | + if (source == reverseNormalsItem) |
---|
2401 | 2479 | { |
---|
2402 | 2480 | ReverseNormals(); |
---|
2403 | 2481 | } else |
---|
2404 | | - if (event.getSource() == parseverticesItem) |
---|
| 2482 | + if (source == parseverticesItem) |
---|
2405 | 2483 | { |
---|
2406 | 2484 | ParseVertices(); |
---|
2407 | 2485 | } else |
---|
2408 | | - if (event.getSource() == textureFieldItem) |
---|
| 2486 | + if (source == textureFieldItem) |
---|
2409 | 2487 | { |
---|
2410 | 2488 | TextureVertices(); |
---|
2411 | 2489 | } else |
---|
2412 | | - if (event.getSource() == alignItem) |
---|
| 2490 | + if (source == alignItem) |
---|
2413 | 2491 | { |
---|
2414 | 2492 | Align(); |
---|
2415 | 2493 | } else |
---|
2416 | | - if (event.getSource() == mirrorItem) |
---|
| 2494 | + if (source == mirrorItem) |
---|
2417 | 2495 | { |
---|
2418 | 2496 | MirrorPoses(); |
---|
2419 | 2497 | } else |
---|
2420 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2498 | + if (source == reduceMorphItem) |
---|
2421 | 2499 | { |
---|
2422 | 2500 | MeshReduction(false); |
---|
2423 | 2501 | } else |
---|
2424 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2502 | + if (source == reduce34MorphItem) |
---|
2425 | 2503 | { |
---|
2426 | 2504 | MeshReduction(true); |
---|
2427 | 2505 | } else |
---|
2428 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2506 | + if (source == reverseTrianglesItem) |
---|
2429 | 2507 | { |
---|
2430 | 2508 | ReverseTriangles(); |
---|
2431 | 2509 | } else |
---|
2432 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2510 | + if (source == reduceMeshItem) |
---|
2433 | 2511 | { |
---|
2434 | 2512 | ReduceMesh(false); |
---|
2435 | 2513 | } else |
---|
2436 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2514 | + if (source == reduce34MeshItem) |
---|
2437 | 2515 | { |
---|
2438 | 2516 | ReduceMesh(true); |
---|
2439 | 2517 | } else |
---|
2440 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2518 | + if (source == increaseMeshItem) |
---|
2441 | 2519 | { |
---|
2442 | 2520 | IncreaseMesh(); |
---|
2443 | 2521 | } else |
---|
2444 | | - if (event.getSource() == clipMeshItem) |
---|
| 2522 | + if (source == clipMeshItem) |
---|
2445 | 2523 | { |
---|
2446 | 2524 | ClipMesh(); |
---|
2447 | 2525 | } else |
---|
2448 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2526 | + if (source == smoothMeshItem) |
---|
2449 | 2527 | { |
---|
2450 | 2528 | SmoothMesh(); |
---|
2451 | 2529 | } else |
---|
2452 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2530 | + if (source == transformgeometryItem) |
---|
2453 | 2531 | { |
---|
2454 | 2532 | TransformGeometry(); |
---|
2455 | 2533 | } else |
---|
2456 | | - if (event.getSource() == resetTransformItem) |
---|
| 2534 | + if (source == resetTransformItem) |
---|
2457 | 2535 | { |
---|
2458 | 2536 | ResetTransform(); |
---|
2459 | 2537 | } else |
---|
2460 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2538 | + if (source == resetCentroidItem) |
---|
2461 | 2539 | { |
---|
2462 | 2540 | ResetCentroid(); |
---|
2463 | 2541 | } else |
---|
2464 | | - if (event.getSource() == resetParentItem) |
---|
| 2542 | + if (source == resetParentItem) |
---|
2465 | 2543 | { |
---|
2466 | 2544 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2467 | 2545 | { |
---|
.. | .. |
---|
2471 | 2549 | |
---|
2472 | 2550 | refreshContents(); |
---|
2473 | 2551 | } else |
---|
2474 | | - if (event.getSource() == repairParentItem) |
---|
| 2552 | + if (source == repairParentItem) |
---|
2475 | 2553 | { |
---|
2476 | 2554 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2477 | 2555 | { |
---|
.. | .. |
---|
2485 | 2563 | |
---|
2486 | 2564 | refreshContents(); |
---|
2487 | 2565 | } else |
---|
2488 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2566 | + if (source == repairShadowItem) |
---|
| 2567 | + { |
---|
| 2568 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2569 | + { |
---|
| 2570 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2571 | + obj.RepairShadow(); |
---|
| 2572 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2573 | +// { |
---|
| 2574 | +// obj.get(i).parent = obj; |
---|
| 2575 | +// } |
---|
| 2576 | + } |
---|
| 2577 | + |
---|
| 2578 | + refreshContents(); |
---|
| 2579 | + } else |
---|
| 2580 | + if (source == sortbysizeItem) |
---|
2489 | 2581 | { |
---|
2490 | 2582 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2491 | 2583 | { |
---|
.. | .. |
---|
2497 | 2589 | ResetModel(); |
---|
2498 | 2590 | refreshContents(); |
---|
2499 | 2591 | } else |
---|
2500 | | - if (event.getSource() == sortbynameItem) |
---|
| 2592 | + if (source == sortbynameItem) |
---|
2501 | 2593 | { |
---|
2502 | 2594 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2503 | 2595 | { |
---|
.. | .. |
---|
2509 | 2601 | ResetModel(); |
---|
2510 | 2602 | refreshContents(); |
---|
2511 | 2603 | } else |
---|
2512 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2604 | + if (source == attachPigmentItem) |
---|
2513 | 2605 | { |
---|
2514 | 2606 | String texture = GetFile("Attach pigment"); |
---|
2515 | 2607 | Object3D obj; |
---|
.. | .. |
---|
2521 | 2613 | |
---|
2522 | 2614 | refreshContents(); |
---|
2523 | 2615 | } else |
---|
2524 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2616 | + if (source == detachPigmentItem) |
---|
2525 | 2617 | { |
---|
2526 | 2618 | Object3D obj; |
---|
2527 | 2619 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2532 | 2624 | |
---|
2533 | 2625 | refreshContents(); |
---|
2534 | 2626 | } else |
---|
2535 | | - if (event.getSource() == attachBumpItem) |
---|
| 2627 | + if (source == attachBumpItem) |
---|
2536 | 2628 | { |
---|
2537 | 2629 | String texture = GetFile("Attach bump"); |
---|
2538 | 2630 | Object3D obj; |
---|
.. | .. |
---|
2544 | 2636 | |
---|
2545 | 2637 | refreshContents(); |
---|
2546 | 2638 | } else |
---|
2547 | | - if (event.getSource() == detachBumpItem) |
---|
| 2639 | + if (source == detachBumpItem) |
---|
2548 | 2640 | { |
---|
2549 | 2641 | Object3D obj; |
---|
2550 | 2642 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2555 | 2647 | |
---|
2556 | 2648 | refreshContents(); |
---|
2557 | 2649 | } else |
---|
2558 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2650 | + if (source == pigmentBumpItem) |
---|
2559 | 2651 | { |
---|
2560 | 2652 | Object3D obj; |
---|
2561 | 2653 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2566 | 2658 | |
---|
2567 | 2659 | refreshContents(); |
---|
2568 | 2660 | } else |
---|
2569 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2661 | + if (source == flashSelectionButton) |
---|
2570 | 2662 | { |
---|
2571 | 2663 | CameraPane.flash = true; |
---|
2572 | 2664 | refreshContents(); |
---|
2573 | 2665 | } else |
---|
2574 | | - if (event.getSource() == oneButton) |
---|
| 2666 | + if (source == oneButton) |
---|
2575 | 2667 | { |
---|
2576 | 2668 | } else |
---|
2577 | | - if (event.getSource() == twoButton) |
---|
| 2669 | + if (source == twoButton) |
---|
2578 | 2670 | { |
---|
2579 | 2671 | radio.layout = twoButton; |
---|
2580 | 2672 | // bug |
---|
2581 | 2673 | //gridPanel.setDividerLocation(1.0); |
---|
2582 | 2674 | //bigPanel.setDividerLocation(0.0); |
---|
2583 | | - bigThree.remove(jtp); |
---|
2584 | | - bigThree.remove(cameraPanel); |
---|
2585 | | - bigThree.remove(XYZPanel); |
---|
2586 | | - aWindowConstraints.gridx = 0; |
---|
2587 | | - aWindowConstraints.gridy = 0; |
---|
2588 | | - aWindowConstraints.gridwidth = 1; |
---|
2589 | | - // aConstraints.gridheight = 3; |
---|
2590 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2591 | | - aWindowConstraints.weightx = 0; |
---|
2592 | | - aWindowConstraints.weighty = 1; |
---|
2593 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2594 | | - aWindowConstraints.weightx = 1; |
---|
2595 | | - aWindowConstraints.gridwidth = 3; |
---|
2596 | | - // aConstraints.gridheight = 3; |
---|
2597 | | - aWindowConstraints.gridx = 1; |
---|
2598 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2599 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2600 | | - aWindowConstraints.weightx = 0; |
---|
2601 | | - aWindowConstraints.gridx = 4; |
---|
2602 | | - aWindowConstraints.gridwidth = 1; |
---|
2603 | | - // aConstraints.gridheight = 3; |
---|
2604 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2605 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2606 | | - bigThree.revalidate(); |
---|
| 2675 | +// bigThree.remove(scenePanel); |
---|
| 2676 | +// bigThree.remove(centralPanel); |
---|
| 2677 | +// bigThree.remove(XYZPanel); |
---|
| 2678 | +// aWindowConstraints.gridx = 0; |
---|
| 2679 | +// aWindowConstraints.gridy = 0; |
---|
| 2680 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2681 | +// // aConstraints.gridheight = 3; |
---|
| 2682 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2683 | +// aWindowConstraints.weightx = 0; |
---|
| 2684 | +// aWindowConstraints.weighty = 1; |
---|
| 2685 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2686 | +// aWindowConstraints.weightx = 1; |
---|
| 2687 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2688 | +// // aConstraints.gridheight = 3; |
---|
| 2689 | +// aWindowConstraints.gridx = 1; |
---|
| 2690 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2691 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2692 | +// aWindowConstraints.weightx = 0; |
---|
| 2693 | +// aWindowConstraints.gridx = 4; |
---|
| 2694 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2695 | +// // aConstraints.gridheight = 3; |
---|
| 2696 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2697 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2698 | +// scenePanel.setVisible(false); |
---|
| 2699 | +// centralPanel.setVisible(true); |
---|
| 2700 | +// XYZPanel.setVisible(false); |
---|
| 2701 | + bigThree.ClearUI(); |
---|
| 2702 | + bigThree.add(centralPanel); |
---|
| 2703 | + bigThree.FlushUI(); |
---|
2607 | 2704 | } else |
---|
2608 | | - if (event.getSource() == threeButton) |
---|
| 2705 | + if (source == threeButton) |
---|
2609 | 2706 | { |
---|
2610 | 2707 | radio.layout = threeButton; |
---|
2611 | | - bigThree.remove(jtp); |
---|
2612 | | - bigThree.remove(cameraPanel); |
---|
2613 | | - bigThree.remove(XYZPanel); |
---|
2614 | | - aWindowConstraints.gridx = 0; |
---|
2615 | | - aWindowConstraints.gridy = 0; |
---|
2616 | | - aWindowConstraints.gridwidth = 1; |
---|
2617 | | - // aConstraints.gridheight = 3; |
---|
2618 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2619 | | - aWindowConstraints.weightx = 0; |
---|
2620 | | - aWindowConstraints.weighty = 1; |
---|
2621 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2622 | | - aWindowConstraints.weightx = 1; |
---|
2623 | | - aWindowConstraints.gridwidth = 3; |
---|
2624 | | - // aConstraints.gridheight = 3; |
---|
2625 | | - aWindowConstraints.gridx = 1; |
---|
2626 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2627 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2628 | | - aWindowConstraints.weightx = 0; |
---|
2629 | | - aWindowConstraints.gridx = 4; |
---|
2630 | | - aWindowConstraints.gridwidth = 1; |
---|
2631 | | - // aConstraints.gridheight = 3; |
---|
2632 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2633 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2634 | | - bigThree.revalidate(); |
---|
| 2708 | + |
---|
| 2709 | +// bigThree.remove(scenePanel); |
---|
| 2710 | +// bigThree.remove(centralPanel); |
---|
| 2711 | +// bigThree.remove(XYZPanel); |
---|
| 2712 | +// aWindowConstraints.gridx = 0; |
---|
| 2713 | +// aWindowConstraints.gridy = 0; |
---|
| 2714 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2715 | +// // aConstraints.gridheight = 3; |
---|
| 2716 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2717 | +// aWindowConstraints.weightx = 0; |
---|
| 2718 | +// aWindowConstraints.weighty = 1; |
---|
| 2719 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2720 | +// aWindowConstraints.weightx = 1; |
---|
| 2721 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2722 | +// // aConstraints.gridheight = 3; |
---|
| 2723 | +// aWindowConstraints.gridx = 1; |
---|
| 2724 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2725 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2726 | +// aWindowConstraints.weightx = 0; |
---|
| 2727 | +// aWindowConstraints.gridx = 4; |
---|
| 2728 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2729 | +// // aConstraints.gridheight = 3; |
---|
| 2730 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2731 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2732 | +// bigThree.validate(); |
---|
| 2733 | +// scenePanel.setVisible(false); |
---|
| 2734 | +// centralPanel.setVisible(true); |
---|
| 2735 | +// XYZPanel.setVisible(true); |
---|
| 2736 | + bigThree.ClearUI(); |
---|
| 2737 | + bigThree.add(centralPanel); |
---|
| 2738 | + bigThree.add(XYZPanel); |
---|
| 2739 | + bigThree.FlushUI(); |
---|
2635 | 2740 | } else |
---|
2636 | | - if (event.getSource() == fourButton) |
---|
| 2741 | + if (source == fourButton) |
---|
2637 | 2742 | { |
---|
2638 | 2743 | radio.layout = fourButton; |
---|
2639 | | - bigThree.remove(jtp); |
---|
2640 | | - bigThree.remove(cameraPanel); |
---|
2641 | | - bigThree.remove(XYZPanel); |
---|
2642 | | - aWindowConstraints.gridx = 0; |
---|
2643 | | - aWindowConstraints.gridy = 0; |
---|
2644 | | - aWindowConstraints.gridwidth = 1; |
---|
2645 | | - // aWindowConstraints.gridheight = 3; |
---|
2646 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2647 | | - aWindowConstraints.weightx = 1; |
---|
2648 | | - aWindowConstraints.weighty = 1; |
---|
2649 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2650 | | - aWindowConstraints.weightx = 1; |
---|
2651 | | - aWindowConstraints.gridwidth = 3; |
---|
2652 | | - // aConstraints.gridheight = 3; |
---|
2653 | | - aWindowConstraints.gridx = 1; |
---|
2654 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2655 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2656 | | - aWindowConstraints.weightx = 0; |
---|
2657 | | - aWindowConstraints.gridx = 4; |
---|
2658 | | - aWindowConstraints.gridwidth = 1; |
---|
2659 | | - // aWindowConstraints.gridheight = 3; |
---|
2660 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2661 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2662 | | - bigThree.revalidate(); |
---|
| 2744 | + |
---|
| 2745 | +// bigThree.remove(scenePanel); |
---|
| 2746 | +// bigThree.remove(centralPanel); |
---|
| 2747 | +// bigThree.remove(XYZPanel); |
---|
| 2748 | +// aWindowConstraints.gridx = 0; |
---|
| 2749 | +// aWindowConstraints.gridy = 0; |
---|
| 2750 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2751 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2752 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2753 | +// aWindowConstraints.weightx = 1; |
---|
| 2754 | +// aWindowConstraints.weighty = 1; |
---|
| 2755 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2756 | +// aWindowConstraints.weightx = 1; |
---|
| 2757 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2758 | +// // aConstraints.gridheight = 3; |
---|
| 2759 | +// aWindowConstraints.gridx = 1; |
---|
| 2760 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2761 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2762 | +// aWindowConstraints.weightx = 0; |
---|
| 2763 | +// aWindowConstraints.gridx = 4; |
---|
| 2764 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2765 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2766 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2767 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2768 | +// bigThree.validate(); |
---|
| 2769 | +// scenePanel.setVisible(true); |
---|
| 2770 | +// centralPanel.setVisible(false); |
---|
| 2771 | +// XYZPanel.setVisible(false); |
---|
| 2772 | + bigThree.ClearUI(); |
---|
| 2773 | + bigThree.add(scenePanel); |
---|
| 2774 | + bigThree.FlushUI(); |
---|
2663 | 2775 | } else |
---|
2664 | | - if (event.getSource() == sixButton) |
---|
| 2776 | + if (source == sixButton) |
---|
2665 | 2777 | { |
---|
2666 | 2778 | radio.layout = sixButton; |
---|
2667 | | - bigThree.remove(jtp); |
---|
2668 | | - bigThree.remove(cameraPanel); |
---|
2669 | | - bigThree.remove(XYZPanel); |
---|
2670 | | - aWindowConstraints.gridx = 0; |
---|
2671 | | - aWindowConstraints.gridy = 0; |
---|
2672 | | - aWindowConstraints.gridwidth = 1; |
---|
2673 | | - // aConstraints.gridheight = 3; |
---|
2674 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2675 | | - aWindowConstraints.weightx = 0; |
---|
2676 | | - aWindowConstraints.weighty = 1; |
---|
2677 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2678 | | - aWindowConstraints.weightx = 1; |
---|
2679 | | - aWindowConstraints.gridwidth = 3; |
---|
2680 | | - // aWindowConstraints.gridheight = 3; |
---|
2681 | | - aWindowConstraints.gridx = 1; |
---|
2682 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2683 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2684 | | - aWindowConstraints.weightx = 0; |
---|
2685 | | - aWindowConstraints.gridx = 4; |
---|
2686 | | - aWindowConstraints.gridwidth = 1; |
---|
2687 | | - // aWindowConstraints.gridheight = 3; |
---|
2688 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2689 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2690 | | - bigThree.revalidate(); |
---|
| 2779 | + |
---|
| 2780 | +// bigThree.remove(scenePanel); |
---|
| 2781 | +// bigThree.remove(centralPanel); |
---|
| 2782 | +// bigThree.remove(XYZPanel); |
---|
| 2783 | +// aWindowConstraints.gridx = 0; |
---|
| 2784 | +// aWindowConstraints.gridy = 0; |
---|
| 2785 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2786 | +// // aConstraints.gridheight = 3; |
---|
| 2787 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2788 | +// aWindowConstraints.weightx = 0; |
---|
| 2789 | +// aWindowConstraints.weighty = 1; |
---|
| 2790 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2791 | +// aWindowConstraints.weightx = 1; |
---|
| 2792 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2793 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2794 | +// aWindowConstraints.gridx = 1; |
---|
| 2795 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2796 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2797 | +// aWindowConstraints.weightx = 0; |
---|
| 2798 | +// aWindowConstraints.gridx = 4; |
---|
| 2799 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2800 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2801 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2802 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2803 | +// bigThree.validate(); |
---|
| 2804 | +// scenePanel.setVisible(true); |
---|
| 2805 | +// centralPanel.setVisible(true); |
---|
| 2806 | +// XYZPanel.setVisible(false); |
---|
| 2807 | + bigThree.ClearUI(); |
---|
| 2808 | + bigThree.add(scenePanel); |
---|
| 2809 | + bigThree.add(centralPanel); |
---|
| 2810 | + bigThree.FlushUI(); |
---|
2691 | 2811 | } else |
---|
2692 | | - if (event.getSource() == sevenButton) |
---|
| 2812 | + if (source == sevenButton) |
---|
2693 | 2813 | { |
---|
2694 | 2814 | radio.layout = sevenButton; |
---|
2695 | | - bigThree.remove(jtp); |
---|
2696 | | - bigThree.remove(cameraPanel); |
---|
2697 | | - bigThree.remove(XYZPanel); |
---|
2698 | | - aWindowConstraints.gridx = 0; |
---|
2699 | | - aWindowConstraints.gridy = 0; |
---|
2700 | | - aWindowConstraints.gridwidth = 1; |
---|
2701 | | - // aWindowConstraints.gridheight = 3; |
---|
2702 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2703 | | - aWindowConstraints.weightx = 0; |
---|
2704 | | - aWindowConstraints.weighty = 1; |
---|
2705 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2706 | | - aWindowConstraints.weightx = 1; |
---|
2707 | | - aWindowConstraints.gridwidth = 3; |
---|
2708 | | - // aWindowConstraints.gridheight = 3; |
---|
2709 | | - aWindowConstraints.gridx = 1; |
---|
2710 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2711 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2712 | | - aWindowConstraints.weightx = 0; |
---|
2713 | | - aWindowConstraints.gridx = 4; |
---|
2714 | | - aWindowConstraints.gridwidth = 1; |
---|
2715 | | - // aConstraints.gridheight = 3; |
---|
2716 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2717 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2718 | | - bigThree.revalidate(); |
---|
| 2815 | + |
---|
| 2816 | +// bigThree.remove(scenePanel); |
---|
| 2817 | +// bigThree.remove(centralPanel); |
---|
| 2818 | +// bigThree.remove(XYZPanel); |
---|
| 2819 | +// aWindowConstraints.gridx = 0; |
---|
| 2820 | +// aWindowConstraints.gridy = 0; |
---|
| 2821 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2822 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2823 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2824 | +// aWindowConstraints.weightx = 0; |
---|
| 2825 | +// aWindowConstraints.weighty = 1; |
---|
| 2826 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2827 | +// aWindowConstraints.weightx = 1; |
---|
| 2828 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2829 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2830 | +// aWindowConstraints.gridx = 1; |
---|
| 2831 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2832 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2833 | +// aWindowConstraints.weightx = 0; |
---|
| 2834 | +// aWindowConstraints.gridx = 4; |
---|
| 2835 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2836 | +// // aConstraints.gridheight = 3; |
---|
| 2837 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2838 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2839 | +// bigThree.validate(); |
---|
| 2840 | +// scenePanel.setVisible(true); |
---|
| 2841 | +// centralPanel.setVisible(true); |
---|
| 2842 | +// XYZPanel.setVisible(true); |
---|
| 2843 | + bigThree.ClearUI(); |
---|
| 2844 | + bigThree.add(scenePanel); |
---|
| 2845 | + bigThree.add(centralPanel); |
---|
| 2846 | + bigThree.add(XYZPanel); |
---|
| 2847 | + bigThree.FlushUI(); |
---|
2719 | 2848 | } else |
---|
2720 | | - if (event.getSource() == rootButton) |
---|
| 2849 | + if (source == rootButton) |
---|
2721 | 2850 | { |
---|
2722 | 2851 | Object3D obj; |
---|
2723 | 2852 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2729 | 2858 | |
---|
2730 | 2859 | refreshContents(true); |
---|
2731 | 2860 | } else |
---|
2732 | | - if (event.getSource() == closeButton) |
---|
| 2861 | + if (source == closeButton) |
---|
2733 | 2862 | { |
---|
2734 | 2863 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2735 | 2864 | cRadio ab; |
---|
.. | .. |
---|
2750 | 2879 | } |
---|
2751 | 2880 | refreshContents(true); |
---|
2752 | 2881 | } else |
---|
2753 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2882 | + if (source == editItem || source == editButton) |
---|
2754 | 2883 | { |
---|
2755 | 2884 | EditSelection(false); |
---|
2756 | 2885 | } else |
---|
2757 | | - if (event.getSource() == uneditButton) |
---|
| 2886 | + if (source == uneditButton) |
---|
2758 | 2887 | { |
---|
2759 | 2888 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2760 | 2889 | { |
---|
.. | .. |
---|
2766 | 2895 | |
---|
2767 | 2896 | child.editWindow = null; // ??????????? |
---|
2768 | 2897 | } |
---|
2769 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2898 | + objEditor.ctrlPanel.validate(); |
---|
2770 | 2899 | //objEditor.jTree.clearSelection(); |
---|
2771 | 2900 | //objEditor.ResetSliders(); |
---|
2772 | 2901 | refreshContents(true); |
---|
2773 | 2902 | } else |
---|
2774 | | - if (event.getSource() == clearPanelButton) |
---|
| 2903 | + if (source == clearPanelButton) |
---|
2775 | 2904 | { |
---|
2776 | 2905 | assert(copy == group); |
---|
2777 | 2906 | //copy.ClearUI(); |
---|
.. | .. |
---|
2782 | 2911 | listUI.clear(); |
---|
2783 | 2912 | refreshContents(true); |
---|
2784 | 2913 | } else |
---|
2785 | | - if (event.getSource() == allParamsButton) |
---|
| 2914 | + if (source == allParamsButton) |
---|
2786 | 2915 | { |
---|
2787 | 2916 | assert(copy == group); |
---|
2788 | 2917 | |
---|
.. | .. |
---|
2803 | 2932 | |
---|
2804 | 2933 | refreshContents(true); |
---|
2805 | 2934 | } else |
---|
2806 | | - if (event.getSource() == unselectButton) |
---|
| 2935 | + if (source == unselectButton) |
---|
2807 | 2936 | { |
---|
2808 | 2937 | objEditor.jTree.clearSelection(); |
---|
2809 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 2938 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2810 | 2939 | objEditor.ResetSliders(); |
---|
2811 | 2940 | refreshContents(true); |
---|
2812 | 2941 | } else |
---|
2813 | | - if(event.getSource() instanceof cRadio) |
---|
| 2942 | + if(source instanceof cRadio) |
---|
2814 | 2943 | { |
---|
2815 | 2944 | group.parent = keepparent; |
---|
2816 | 2945 | group.attributes = 0; |
---|
2817 | 2946 | //group.editWindow = null; |
---|
2818 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 2947 | + /*cRadio*/ radio = (cRadio)source; |
---|
2819 | 2948 | Object3D obj = radio.GetObject(); |
---|
2820 | 2949 | System.out.println("Edit " + obj); |
---|
2821 | 2950 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2835 | 2964 | } |
---|
2836 | 2965 | |
---|
2837 | 2966 | copy = group; |
---|
2838 | | - //CameraPane.theRenderer.object = group; |
---|
| 2967 | + //Globals.theRenderer.object = group; |
---|
2839 | 2968 | if(!useclient) |
---|
2840 | 2969 | { |
---|
2841 | 2970 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2844 | 2973 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2845 | 2974 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2846 | 2975 | cameraView.object = group; |
---|
2847 | | - cameraView.lighttouched = true; |
---|
| 2976 | + //cameraView.lighttouched = true; |
---|
| 2977 | + Globals.lighttouched = true; |
---|
2848 | 2978 | topView.object = group; |
---|
2849 | 2979 | frontView.object = group; |
---|
2850 | 2980 | sideView.object = group; |
---|
.. | .. |
---|
2880 | 3010 | if (useclient) |
---|
2881 | 3011 | { |
---|
2882 | 3012 | cameraView.object = client; |
---|
2883 | | - cameraView.lighttouched = true; |
---|
| 3013 | + Globals.lighttouched = true; |
---|
2884 | 3014 | //topView.object = client; |
---|
2885 | 3015 | //frontView.object = client; |
---|
2886 | 3016 | //sideView.object = client; |
---|
.. | .. |
---|
2888 | 3018 | else |
---|
2889 | 3019 | { |
---|
2890 | 3020 | cameraView.object = group; |
---|
2891 | | - cameraView.lighttouched = true; |
---|
| 3021 | + Globals.lighttouched = true; |
---|
2892 | 3022 | //topView.object = group; |
---|
2893 | 3023 | //frontView.object = group; |
---|
2894 | 3024 | //sideView.object = group; |
---|
.. | .. |
---|
3121 | 3251 | obj = (Object3D)e.nextElement(); |
---|
3122 | 3252 | |
---|
3123 | 3253 | System.out.println("Object is: " + obj); |
---|
3124 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3254 | + GrafreeD.AnalyzeObject(obj); |
---|
3125 | 3255 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3126 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3256 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3127 | 3257 | |
---|
3128 | 3258 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3129 | 3259 | } |
---|
.. | .. |
---|
3165 | 3295 | void GenNormals(boolean crease) |
---|
3166 | 3296 | { |
---|
3167 | 3297 | group.GenNormalsS(crease); |
---|
| 3298 | + |
---|
| 3299 | + refreshContents(); |
---|
| 3300 | + } |
---|
| 3301 | + |
---|
| 3302 | + void GenNormalsMINE() |
---|
| 3303 | + { |
---|
| 3304 | + group.selection.GenNormalsMINE(); |
---|
3168 | 3305 | |
---|
3169 | 3306 | refreshContents(); |
---|
3170 | 3307 | } |
---|
.. | .. |
---|
3250 | 3387 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3251 | 3388 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3252 | 3389 | // |
---|
3253 | | -// g.add(GraphreeD.clipboard); |
---|
| 3390 | +// g.add(GrafreeD.clipboard); |
---|
3254 | 3391 | // |
---|
3255 | 3392 | // buffer.add(g); |
---|
3256 | 3393 | // } |
---|
.. | .. |
---|
3269 | 3406 | // nodes = new Object3D(); |
---|
3270 | 3407 | // vertices = new Vector<Vertex>(); |
---|
3271 | 3408 | // |
---|
3272 | | -// boolean epsequal = GraphreeD.epsequal; |
---|
3273 | | -// GraphreeD.epsequal = true; |
---|
| 3409 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3410 | +// GrafreeD.epsequal = true; |
---|
3274 | 3411 | // |
---|
3275 | 3412 | // for (int i=0; i<group.selection.size(); i++) |
---|
3276 | 3413 | // { |
---|
.. | .. |
---|
3311 | 3448 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3312 | 3449 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3313 | 3450 | // |
---|
3314 | | -// g.add(GraphreeD.clipboard); |
---|
| 3451 | +// g.add(GrafreeD.clipboard); |
---|
3315 | 3452 | // |
---|
3316 | 3453 | // buffer.add(g); |
---|
3317 | 3454 | // } |
---|
.. | .. |
---|
3319 | 3456 | // makeSomething(buffer, i==group.selection.size()-1); |
---|
3320 | 3457 | // } |
---|
3321 | 3458 | // |
---|
3322 | | -// GraphreeD.epsequal = epsequal; |
---|
| 3459 | +// GrafreeD.epsequal = epsequal; |
---|
3323 | 3460 | // |
---|
3324 | 3461 | // //buffer = null; |
---|
3325 | 3462 | // temprep = null; |
---|
.. | .. |
---|
3330 | 3467 | |
---|
3331 | 3468 | void ParseVertices() |
---|
3332 | 3469 | { |
---|
3333 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3334 | | - GraphreeD.epsequal = true; |
---|
| 3470 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3471 | + GrafreeD.epsequal = true; |
---|
3335 | 3472 | |
---|
3336 | 3473 | for (int i=0; i<group.selection.size(); i++) |
---|
3337 | 3474 | { |
---|
.. | .. |
---|
3356 | 3493 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3357 | 3494 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3358 | 3495 | |
---|
3359 | | - g.add(GraphreeD.clipboard); |
---|
| 3496 | + g.add(GrafreeD.clipboard); |
---|
3360 | 3497 | |
---|
3361 | 3498 | buffer.add(g); |
---|
3362 | 3499 | } |
---|
.. | .. |
---|
3371 | 3508 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3372 | 3509 | } |
---|
3373 | 3510 | |
---|
3374 | | - GraphreeD.epsequal = epsequal; |
---|
| 3511 | + GrafreeD.epsequal = epsequal; |
---|
3375 | 3512 | |
---|
3376 | 3513 | refreshContents(); |
---|
3377 | 3514 | } |
---|
.. | .. |
---|
3389 | 3526 | String pigment = Object3D.GetPigment(tex); |
---|
3390 | 3527 | //String bump = Object3D.GetBump(tex); |
---|
3391 | 3528 | |
---|
3392 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3529 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
3393 | 3530 | |
---|
3394 | 3531 | double s = v.s; |
---|
3395 | 3532 | |
---|
.. | .. |
---|
3416 | 3553 | scale /= 3; |
---|
3417 | 3554 | |
---|
3418 | 3555 | scale /= 0xFF; |
---|
3419 | | - scale /= 4; |
---|
| 3556 | + // c'est quoi ca? scale /= 4; |
---|
3420 | 3557 | |
---|
3421 | 3558 | //v.AO = scale; |
---|
3422 | 3559 | |
---|
.. | .. |
---|
3437 | 3574 | |
---|
3438 | 3575 | void Align() |
---|
3439 | 3576 | { |
---|
| 3577 | + if (group.selection.size() == 0) |
---|
| 3578 | + return; |
---|
| 3579 | + |
---|
| 3580 | + cVector bbmin = new cVector(); |
---|
| 3581 | + cVector bbmax = new cVector(); |
---|
| 3582 | + |
---|
| 3583 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3584 | + |
---|
| 3585 | + double dx = bbmax.x - bbmin.x; |
---|
| 3586 | + double dy = bbmax.y - bbmin.y; |
---|
| 3587 | + double dz = bbmax.z - bbmin.z; |
---|
| 3588 | + |
---|
| 3589 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3590 | + |
---|
3440 | 3591 | for (int i=0; i<group.selection.size(); i++) |
---|
3441 | 3592 | { |
---|
3442 | 3593 | Object3D obj = group.selection.get(i); |
---|
3443 | 3594 | |
---|
3444 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3445 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3595 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3596 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3446 | 3597 | } |
---|
3447 | 3598 | |
---|
3448 | 3599 | refreshContents(); |
---|
.. | .. |
---|
3455 | 3606 | // ref.SaveSupports(); |
---|
3456 | 3607 | // Object3D par = ref.parent; |
---|
3457 | 3608 | // ref.parent = null; |
---|
3458 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3609 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3459 | 3610 | // ref.parent = par; |
---|
3460 | 3611 | // ref.RestoreSupports(); |
---|
3461 | 3612 | |
---|
.. | .. |
---|
3485 | 3636 | // lowres.SaveSupports(); |
---|
3486 | 3637 | // par = lowres.parent; |
---|
3487 | 3638 | // lowres.parent = null; |
---|
3488 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3639 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3489 | 3640 | Object3D newlow = CloneObject(lowres, false); |
---|
3490 | 3641 | newlow.name = sn.switchobject.get(i).name; |
---|
3491 | 3642 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3507 | 3658 | return; |
---|
3508 | 3659 | |
---|
3509 | 3660 | Object3D poses = group.selection.get(0); |
---|
3510 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3661 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3511 | 3662 | |
---|
3512 | 3663 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3513 | 3664 | |
---|
.. | .. |
---|
3676 | 3827 | group.selection.RelinkToSupport(); // july 2014 |
---|
3677 | 3828 | System.out.println("DONE."); |
---|
3678 | 3829 | refreshContents(); |
---|
3679 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3830 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3680 | 3831 | } |
---|
3681 | 3832 | |
---|
3682 | 3833 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3701 | 3852 | |
---|
3702 | 3853 | void ClipMesh() |
---|
3703 | 3854 | { |
---|
3704 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3855 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3705 | 3856 | { |
---|
3706 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3857 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3707 | 3858 | |
---|
3708 | 3859 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3709 | 3860 | content = ((cGroup)content).get(0); |
---|
3710 | 3861 | |
---|
3711 | 3862 | // for (int i=0; i<group.selection.size(); i++) |
---|
3712 | 3863 | // { |
---|
3713 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3864 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3714 | 3865 | // } |
---|
3715 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3866 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3716 | 3867 | } |
---|
3717 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3868 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3718 | 3869 | System.out.println("DONE."); |
---|
3719 | 3870 | refreshContents(); |
---|
3720 | 3871 | } |
---|
.. | .. |
---|
3952 | 4103 | System.err.println("info : " + child.GetPath()); |
---|
3953 | 4104 | } |
---|
3954 | 4105 | } |
---|
3955 | | - else |
---|
3956 | | - { |
---|
3957 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3958 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3959 | | - System.err.println("info : " + group.GetPath()); |
---|
3960 | | - } |
---|
| 4106 | +// else |
---|
| 4107 | +// { |
---|
| 4108 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4109 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4110 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4111 | +// } |
---|
3961 | 4112 | |
---|
3962 | 4113 | objEditor.SetText(); // jan 2014 |
---|
3963 | 4114 | |
---|
3964 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4115 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3965 | 4116 | CameraPane.flash = true; |
---|
3966 | 4117 | |
---|
3967 | 4118 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3968 | 4119 | // a camera |
---|
3969 | 4120 | { |
---|
3970 | 4121 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
3971 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
3972 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
3973 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4122 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4123 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4124 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3974 | 4125 | } |
---|
3975 | 4126 | |
---|
3976 | 4127 | refreshContents(); |
---|
.. | .. |
---|
4052 | 4203 | { |
---|
4053 | 4204 | if (group.selection.isEmpty()) |
---|
4054 | 4205 | return; |
---|
4055 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4206 | + GrafreeD.clipboardIsTempGroup = false; |
---|
4056 | 4207 | Composite tGroup = null; |
---|
4057 | 4208 | if (group.selection.size() > 0) // 1) |
---|
4058 | 4209 | { |
---|
4059 | 4210 | tGroup = new cGroup(); |
---|
4060 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4211 | + GrafreeD.clipboardIsTempGroup = true; |
---|
4061 | 4212 | } |
---|
4062 | 4213 | |
---|
4063 | 4214 | if (cut) |
---|
.. | .. |
---|
4097 | 4248 | //System.out.println("cut " + child); |
---|
4098 | 4249 | //System.out.println("parent = " + child.parent); |
---|
4099 | 4250 | // tmp.addChild(child); |
---|
4100 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4251 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4101 | 4252 | tGroup.add/*Child*/(tmp); |
---|
4102 | 4253 | else |
---|
4103 | | - GraphreeD.clipboard = tmp; |
---|
| 4254 | + GrafreeD.clipboard = tmp; |
---|
4104 | 4255 | } |
---|
4105 | 4256 | else |
---|
4106 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4257 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4107 | 4258 | tGroup.add/*Child*/(child); |
---|
4108 | 4259 | else |
---|
4109 | | - GraphreeD.clipboard = child; |
---|
| 4260 | + GrafreeD.clipboard = child; |
---|
4110 | 4261 | } |
---|
4111 | 4262 | |
---|
4112 | 4263 | //ResetModel(); |
---|
.. | .. |
---|
4138 | 4289 | //System.out.println("cut " + elem); |
---|
4139 | 4290 | //System.out.println("parent = " + elem.parent); |
---|
4140 | 4291 | // tmp.addChild(elem); |
---|
4141 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4292 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4142 | 4293 | tGroup.add/*Child*/(tmp); |
---|
4143 | 4294 | else |
---|
4144 | | - GraphreeD.clipboard = tmp; |
---|
| 4295 | + GrafreeD.clipboard = tmp; |
---|
4145 | 4296 | } |
---|
4146 | 4297 | else |
---|
4147 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4298 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4148 | 4299 | tGroup.add/*Child*/(child); |
---|
4149 | 4300 | else |
---|
4150 | | - GraphreeD.clipboard = child; |
---|
| 4301 | + GrafreeD.clipboard = child; |
---|
4151 | 4302 | } |
---|
4152 | 4303 | |
---|
4153 | 4304 | } |
---|
4154 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
4155 | | - GraphreeD.clipboard = tGroup; |
---|
| 4305 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4306 | + GrafreeD.clipboard = tGroup; |
---|
4156 | 4307 | if (cut) |
---|
4157 | 4308 | { |
---|
4158 | 4309 | ResetModel(); |
---|
.. | .. |
---|
4162 | 4313 | |
---|
4163 | 4314 | void paste(boolean expand) |
---|
4164 | 4315 | { |
---|
4165 | | - // if (GraphreeD.clipboard == null) |
---|
| 4316 | + // if (GrafreeD.clipboard == null) |
---|
4166 | 4317 | // return; |
---|
4167 | 4318 | boolean first = true; |
---|
4168 | 4319 | |
---|
4169 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4320 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4170 | 4321 | { |
---|
4171 | 4322 | Composite temp; |
---|
4172 | 4323 | |
---|
.. | .. |
---|
4177 | 4328 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4178 | 4329 | */ |
---|
4179 | 4330 | Object3D elem; |
---|
4180 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4331 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4181 | 4332 | { |
---|
4182 | 4333 | Object3D child = (Object3D)e.nextElement(); |
---|
4183 | 4334 | |
---|
.. | .. |
---|
4191 | 4342 | else |
---|
4192 | 4343 | elem = child.deepCopy(); // ? |
---|
4193 | 4344 | child.parent = keepparent; |
---|
4194 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4345 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4195 | 4346 | // elem = elem.get(0); |
---|
4196 | 4347 | makeSomething(elem, true); // ?? first); |
---|
4197 | 4348 | //group.addChild(elem); |
---|
.. | .. |
---|
4211 | 4362 | //Object3D cb = Applet3D.clipboard; |
---|
4212 | 4363 | //temp.addChild(cb); |
---|
4213 | 4364 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4214 | | - assert(GraphreeD.clipboard.parent == null); |
---|
4215 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
4216 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4217 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
4218 | | - makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy()); |
---|
| 4365 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4366 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4367 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4368 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4369 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4219 | 4370 | else |
---|
4220 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4221 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4371 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4372 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4222 | 4373 | } |
---|
4223 | 4374 | |
---|
4224 | 4375 | ResetModel(); |
---|
.. | .. |
---|
4227 | 4378 | |
---|
4228 | 4379 | void pasteInto(boolean copyit) |
---|
4229 | 4380 | { |
---|
4230 | | -// if (GraphreeD.clipboard == null) |
---|
| 4381 | +// if (GrafreeD.clipboard == null) |
---|
4231 | 4382 | // return; |
---|
4232 | 4383 | |
---|
4233 | 4384 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4260 | 4411 | { |
---|
4261 | 4412 | boolean first = true; |
---|
4262 | 4413 | |
---|
4263 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4414 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4264 | 4415 | { |
---|
4265 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4416 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4266 | 4417 | Object3D copy; |
---|
4267 | 4418 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4268 | 4419 | { |
---|
.. | .. |
---|
4272 | 4423 | } |
---|
4273 | 4424 | } else |
---|
4274 | 4425 | { |
---|
4275 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4426 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4276 | 4427 | } |
---|
4277 | 4428 | } |
---|
4278 | 4429 | } |
---|
.. | .. |
---|
4464 | 4615 | makeSomething(csg); |
---|
4465 | 4616 | } |
---|
4466 | 4617 | |
---|
| 4618 | + void Ungroup(Object3D g) |
---|
| 4619 | + { |
---|
| 4620 | + if (g instanceof HiddenObject) |
---|
| 4621 | + { |
---|
| 4622 | + HiddenObject h = (HiddenObject) g; |
---|
| 4623 | + |
---|
| 4624 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4625 | + { |
---|
| 4626 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4627 | + } |
---|
| 4628 | + } |
---|
| 4629 | + else |
---|
| 4630 | + { |
---|
| 4631 | + for (int i=0; i<g.Size(); i++) |
---|
| 4632 | + { |
---|
| 4633 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4634 | + } |
---|
| 4635 | + } |
---|
| 4636 | + } |
---|
| 4637 | + |
---|
4467 | 4638 | void ungroup() |
---|
4468 | 4639 | { |
---|
4469 | 4640 | /* |
---|
.. | .. |
---|
4659 | 4830 | |
---|
4660 | 4831 | void ImportGFD() |
---|
4661 | 4832 | { |
---|
4662 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4833 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4663 | 4834 | browser.show(); |
---|
4664 | 4835 | String filename = browser.getFile(); |
---|
4665 | 4836 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4697 | 4868 | |
---|
4698 | 4869 | void ImportVRMLX3D() |
---|
4699 | 4870 | { |
---|
4700 | | - if (GraphreeD.standAlone) |
---|
| 4871 | + if (GrafreeD.standAlone) |
---|
4701 | 4872 | { |
---|
4702 | 4873 | /**/ |
---|
4703 | 4874 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4714 | 4885 | |
---|
4715 | 4886 | String GetFile(String dialogName) |
---|
4716 | 4887 | { |
---|
4717 | | - if (GraphreeD.standAlone) |
---|
| 4888 | + if (GrafreeD.standAlone) |
---|
4718 | 4889 | { |
---|
4719 | 4890 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4720 | 4891 | browser.show(); |
---|
.. | .. |
---|
4823 | 4994 | private MenuItem resetsupportItem; |
---|
4824 | 4995 | private MenuItem resetreferencesItem; |
---|
4825 | 4996 | private MenuItem linkverticesItem; |
---|
| 4997 | + private MenuItem relinkverticesItem; |
---|
4826 | 4998 | private MenuItem setMasterItem; |
---|
4827 | 4999 | private MenuItem resetMeshItem; |
---|
4828 | 5000 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4841 | 5013 | private MenuItem clearItem; |
---|
4842 | 5014 | private MenuItem clearAllItem; |
---|
4843 | 5015 | private MenuItem genUVItem; |
---|
| 5016 | + private MenuItem genNormalsMESHItem; |
---|
4844 | 5017 | private MenuItem genNormalsCADItem; |
---|
4845 | 5018 | private MenuItem genNormalsORGANItem; |
---|
| 5019 | + private MenuItem genNormalsMINEItem; |
---|
4846 | 5020 | private MenuItem stripifyItem; |
---|
4847 | 5021 | private MenuItem unstripifyItem; |
---|
4848 | 5022 | private MenuItem trimItem; |
---|
.. | .. |
---|
4884 | 5058 | private MenuItem resetCentroidItem; |
---|
4885 | 5059 | private MenuItem transformgeometryItem; |
---|
4886 | 5060 | private MenuItem resetTransformItem; |
---|
| 5061 | + private MenuItem hideItem; |
---|
4887 | 5062 | private MenuItem grabItem; |
---|
4888 | 5063 | private MenuItem backItem; |
---|
4889 | 5064 | private MenuItem frontItem; |
---|
.. | .. |
---|
4904 | 5079 | |
---|
4905 | 5080 | private MenuItem resetParentItem; |
---|
4906 | 5081 | private MenuItem repairParentItem; |
---|
| 5082 | + private MenuItem repairShadowItem; |
---|
4907 | 5083 | private MenuItem sortbysizeItem; |
---|
4908 | 5084 | private MenuItem sortbynameItem; |
---|
4909 | 5085 | |
---|
.. | .. |
---|
4924 | 5100 | private MenuItem coneItem; |
---|
4925 | 5101 | private MenuItem torusItem; |
---|
4926 | 5102 | private MenuItem superItem; |
---|
| 5103 | + private MenuItem kleinItem; |
---|
4927 | 5104 | private MenuItem blobItem; |
---|
4928 | 5105 | private MenuItem latheItem; |
---|
4929 | 5106 | private MenuItem bezierItem; |
---|
.. | .. |
---|
4936 | 5113 | private MenuItem csgItem; |
---|
4937 | 5114 | private MenuItem templateItem; |
---|
4938 | 5115 | private MenuItem textureItem; |
---|
| 5116 | + private MenuItem billboardItem; |
---|
4939 | 5117 | private MenuItem shadowXItem; |
---|
4940 | 5118 | private MenuItem shadowYItem; |
---|
4941 | 5119 | private MenuItem shadowZItem; |
---|