Normand Briere
2019-05-13 f924d3e00db476c06f55f3d5aaef307e17575340
GroupEditor.java
....@@ -98,14 +98,14 @@
9898
9999 void CloneClipboard(boolean supports)
100100 {
101
- assert(GrafreeD.clipboard.parent == null);
102
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
103
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
104
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
105
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
106106 else
107
- makeSomething(CloneObject(GrafreeD.clipboard, false));
108
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
109109 }
110110
111111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -119,7 +119,7 @@
119119 // obj.support = null;
120120 if (!supports)
121121 obj.SaveSupports();
122
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
123123 obj.parent = parent;
124124 // obj.support = support;
125125 // clone.support = support; // aout 2013
....@@ -318,8 +318,12 @@
318318 resetTransformItem.addActionListener(this);
319319 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
320320 resetCentroidItem.addActionListener(this);
321
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
- transformgeometryItem.addActionListener(this);
321
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
322
+ resetCentroidXZItem.addActionListener(this);
323
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
324
+ transformGeometryItem.addActionListener(this);
325
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
326
+ transformChildrenItem.addActionListener(this);
323327
324328 oe.menuBar.add(menu = new Menu("Geometry"));
325329 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -422,17 +426,18 @@
422426 sortbysizeItem.addActionListener(this);
423427 sortbynameItem = menu.add(new MenuItem("Sort by name"));
424428 sortbynameItem.addActionListener(this);
429
+ menu.add("-");
430
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
431
+ shareGeometriesItem.addActionListener(this);
432
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
433
+ mergeGeometriesItem.addActionListener(this);
425434 if (Globals.ADVANCED)
426435 {
427
- menu.add("-");
436
+ // Pretty much the same as duplicate and clone.
428437 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
429438 extractGeometriesItem.addActionListener(this);
430439 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
431440 cloneGeometriesItem.addActionListener(this);
432
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
433
- shareGeometriesItem.addActionListener(this);
434
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
435
- mergeGeometriesItem.addActionListener(this);
436441 }
437442
438443 oe.menuBar.add(menu = new Menu("Insert"));
....@@ -491,7 +496,7 @@
491496 liveCB.setToolTipText("Enabled animation");
492497 liveCB.addItemListener(this);
493498
494
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
499
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
495500 oneStepButton.setToolTipText("Animate one step forward");
496501 oneStepButton.addActionListener(this);
497502
....@@ -503,7 +508,7 @@
503508 trackCB.setToolTipText("Enable tracking");
504509 trackCB.addItemListener(this);
505510
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
511
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
507512 screenfitButton.setToolTipText("Screen fit");
508513 screenfitButton.addActionListener(this);
509514
....@@ -512,39 +517,39 @@
512517
513518 if (Globals.ADVANCED)
514519 {
515
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
516521 snapobjectButton.addActionListener(this);
517522 snapobjectButton.setToolTipText("Snap Object");
518523 }
519524
520
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
525
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521526 flashSelectionButton.setToolTipText("Show selection");
522527 flashSelectionButton.addActionListener(this);
523528
524529 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525530
526
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
531
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
527532 twoButton.setToolTipText("Show center view only");
528533 twoButton.addActionListener(this);
529
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
534
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
530535 fourButton.addActionListener(this);
531536 fourButton.setToolTipText("Show left panel only");
532
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
537
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
533538 sixButton.setToolTipText("2-column layout left");
534539 sixButton.addActionListener(this);
535
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
540
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
536541 threeButton.setToolTipText("2-column layout right");
537542 threeButton.addActionListener(this);
538
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
539544 sevenButton.setToolTipText("3-column layout");
540545 sevenButton.addActionListener(this);
541546 //
542547
543
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
548
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
544549 rootButton.setToolTipText("Edit selection in new tab");
545550 rootButton.addActionListener(this);
546551
547
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
552
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
548553 closeButton.setToolTipText("Close tab");
549554 closeButton.addActionListener(this);
550555 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -552,11 +557,11 @@
552557
553558 cGridBag commandsPanel = new cGridBag();
554559
555
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
560
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
556561 editButton.setToolTipText("Edit selection");
557562 editButton.addActionListener(this);
558563
559
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
564
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
560565 uneditButton.setToolTipText("Unedit selection");
561566 uneditButton.addActionListener(this);
562567
....@@ -564,11 +569,11 @@
564569 allParamsButton.setToolTipText("Edit all params");
565570 allParamsButton.addActionListener(this);
566571
567
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
572
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
568573 clearPanelButton.setToolTipText("Clear edit panel");
569574 clearPanelButton.addActionListener(this);
570575
571
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
576
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
572577 unselectButton.setToolTipText("Unselect");
573578 unselectButton.addActionListener(this);
574579
....@@ -651,7 +656,7 @@
651656 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
652657 zoomBoxCB.addItemListener(this);
653658
654
- if (Globals.ADVANCED)
659
+ if (true) // Globals.ADVANCED)
655660 {
656661 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
657662 supportCB.setToolTipText("Enable rigging");
....@@ -940,7 +945,9 @@
940945 // objEditor.DropFile((java.io.File[]) object, true);
941946 // return;
942947 // }
943
- if (string.charAt(0) == '/')
948
+
949
+ // File path for Mac and Windows
950
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
944951 {
945952 // file(s)
946953 String[] names = string.split("\n");
....@@ -967,7 +974,7 @@
967974
968975 flashIt = false;
969976 CameraPane pane = (CameraPane) target;
970
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
977
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
971978 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
972979
973980 if (group.selection.size() == 1)
....@@ -1540,9 +1547,9 @@
15401547
15411548 void Overwrite(int mask)
15421549 {
1543
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1550
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15441551 {
1545
- Object3D content = GrafreeD.clipboard.get(0);
1552
+ Object3D content = Grafreed.clipboard.get(0);
15461553
15471554 if (content instanceof cGroup && ((cGroup)content).transientlink )
15481555 content = ((cGroup)content).get(0);
....@@ -1890,7 +1897,7 @@
18901897 if (source == invariantsItem)
18911898 {
18921899 System.out.println("Invariants:");
1893
- GrafreeD.grafreeD.universe.invariants();
1900
+ Grafreed.grafreeD.universe.invariants();
18941901 } else
18951902 if (source == memoryItem)
18961903 {
....@@ -1965,10 +1972,10 @@
19651972 } else
19661973 if (source == duplicateItem)
19671974 {
1968
- Object3D keep = GrafreeD.clipboard;
1975
+ Object3D keep = Grafreed.clipboard;
19691976 loadClipboard(false);
19701977 paste(false);
1971
- GrafreeD.clipboard = keep;
1978
+ Grafreed.clipboard = keep;
19721979 } else
19731980 if (source == cloneItem)
19741981 {
....@@ -2188,9 +2195,9 @@
21882195 // group.selection.get(0).setMasterThis(content); // should be identity
21892196 // refreshContents();
21902197 // }
2191
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2198
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21922199 {
2193
- Object3D content = GrafreeD.clipboard.get(0);
2200
+ Object3D content = Grafreed.clipboard.get(0);
21942201
21952202 if (content instanceof cGroup && ((cGroup)content).transientlink )
21962203 content = ((cGroup)content).get(0);
....@@ -2240,9 +2247,9 @@
22402247 } else
22412248 if (source == setMasterItem)
22422249 {
2243
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2250
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22442251 {
2245
- Object3D content = GrafreeD.clipboard.get(0);
2252
+ Object3D content = Grafreed.clipboard.get(0);
22462253
22472254 if (content instanceof cGroup && ((cGroup)content).transientlink )
22482255 content = ((cGroup)content).get(0);
....@@ -2255,9 +2262,9 @@
22552262 {
22562263 if (group.selection.size() == 1)
22572264 {
2258
- if (GrafreeD.clipboard.size() == 1)
2265
+ if (Grafreed.clipboard.size() == 1)
22592266 {
2260
- Object3D content = GrafreeD.clipboard.get(0);
2267
+ Object3D content = Grafreed.clipboard.get(0);
22612268
22622269 if (content instanceof cGroup && ((cGroup)content).transientlink )
22632270 content = ((cGroup)content).get(0);
....@@ -2612,9 +2619,13 @@
26122619 {
26132620 SmoothMesh();
26142621 } else
2615
- if (source == transformgeometryItem)
2622
+ if (source == transformGeometryItem)
26162623 {
26172624 TransformGeometry();
2625
+ } else
2626
+ if (source == transformChildrenItem)
2627
+ {
2628
+ TransformChildren();
26182629 } else
26192630 if (source == resetTransformItem)
26202631 {
....@@ -2622,7 +2633,11 @@
26222633 } else
26232634 if (source == resetCentroidItem)
26242635 {
2625
- ResetCentroid();
2636
+ ResetCentroid(true);
2637
+ } else
2638
+ if (source == resetCentroidXZItem)
2639
+ {
2640
+ ResetCentroid(false);
26262641 } else
26272642 if (source == resetParentItem)
26282643 {
....@@ -3138,6 +3153,28 @@
31383153 refreshContents();
31393154 }
31403155
3156
+ void TransformChildren()
3157
+ {
3158
+ Object3D obj;
3159
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3160
+ {
3161
+ obj = (Object3D)e.nextElement();
3162
+ obj.KeepTextureMatrices();
3163
+ obj.TransformChildren();
3164
+ obj.RestoreTextureMatrices();
3165
+
3166
+// if (obj.parent == null)
3167
+// {
3168
+// System.out.println("NULL PARENT!");
3169
+// new Exception().printStackTrace();
3170
+// }
3171
+// else
3172
+// TouchTransform(obj);
3173
+// //obj.parent.Touch();
3174
+ }
3175
+
3176
+ refreshContents();
3177
+ }
31413178
31423179 void ResetTransform()
31433180 {
....@@ -3250,7 +3287,7 @@
32503287 refreshContents();
32513288 }
32523289
3253
- void ResetCentroid()
3290
+ void ResetCentroid(boolean full)
32543291 {
32553292 Object3D obj;
32563293 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3265,12 +3302,16 @@
32653302 LA.matIdentity(Object3D.mat);
32663303 obj.getBounds(minima, maxima, false);
32673304 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3268
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3305
+ if (full)
3306
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32693307 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32703308 obj.TransformMesh(Object3D.mat);
3309
+
32713310 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3272
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3311
+ if (full)
3312
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32733313 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3314
+
32743315 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32753316 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32763317 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3336,9 +3377,9 @@
33363377 obj = (Object3D)e.nextElement();
33373378
33383379 System.out.println("Object is: " + obj);
3339
- GrafreeD.AnalyzeObject(obj);
3380
+ Grafreed.AnalyzeObject(obj);
33403381 System.out.println("Boundary rep: " + obj.bRep);
3341
- GrafreeD.AnalyzeObject(obj.bRep);
3382
+ Grafreed.AnalyzeObject(obj.bRep);
33423383
33433384 // System.err.println((size/1024) + " KB is the size of " + obj);
33443385 }
....@@ -3552,8 +3593,8 @@
35523593
35533594 void ParseVertices()
35543595 {
3555
- boolean epsequal = GrafreeD.epsequal;
3556
- GrafreeD.epsequal = true;
3596
+ boolean epsequal = Grafreed.epsequal;
3597
+ Grafreed.epsequal = true;
35573598
35583599 for (int i=0; i<group.selection.size(); i++)
35593600 {
....@@ -3578,7 +3619,7 @@
35783619 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35793620 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35803621
3581
- g.add(GrafreeD.clipboard);
3622
+ g.add(Grafreed.clipboard);
35823623
35833624 buffer.add(g);
35843625 }
....@@ -3593,7 +3634,7 @@
35933634 makeSomething(buffer, i==group.selection.size()-1);
35943635 }
35953636
3596
- GrafreeD.epsequal = epsequal;
3637
+ Grafreed.epsequal = epsequal;
35973638
35983639 refreshContents();
35993640 }
....@@ -3743,7 +3784,7 @@
37433784 return;
37443785
37453786 Object3D poses = group.selection.get(0);
3746
- Object3D ref = GrafreeD.clipboard.get(0);
3787
+ Object3D ref = Grafreed.clipboard.get(0);
37473788
37483789 Object3D newgroup = new Object3D("Po:" + poses.name);
37493790
....@@ -3937,9 +3978,9 @@
39373978
39383979 void ClipMesh()
39393980 {
3940
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3981
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39413982 {
3942
- Object3D content = GrafreeD.clipboard.get(0);
3983
+ Object3D content = Grafreed.clipboard.get(0);
39433984
39443985 if (content instanceof cGroup && ((cGroup)content).transientlink )
39453986 content = ((cGroup)content).get(0);
....@@ -3948,7 +3989,7 @@
39483989 // {
39493990 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39503991 // }
3951
- group.selection.ClipMesh(GrafreeD.clipboard);
3992
+ group.selection.ClipMesh(Grafreed.clipboard);
39523993 }
39533994 // group.selection.ClipMesh(GrafreeD.clipboard);
39543995 System.out.println("DONE.");
....@@ -4288,12 +4329,12 @@
42884329 {
42894330 if (group.selection.isEmpty())
42904331 return;
4291
- GrafreeD.clipboardIsTempGroup = false;
4332
+ Grafreed.clipboardIsTempGroup = false;
42924333 Composite tGroup = null;
42934334 if (group.selection.size() > 0) // 1)
42944335 {
42954336 tGroup = new cGroup();
4296
- GrafreeD.clipboardIsTempGroup = true;
4337
+ Grafreed.clipboardIsTempGroup = true;
42974338 }
42984339
42994340 if (cut)
....@@ -4333,16 +4374,16 @@
43334374 //System.out.println("cut " + child);
43344375 //System.out.println("parent = " + child.parent);
43354376 // tmp.addChild(child);
4336
- if (GrafreeD.clipboardIsTempGroup)
4377
+ if (Grafreed.clipboardIsTempGroup)
43374378 tGroup.add/*Child*/(tmp);
43384379 else
4339
- GrafreeD.clipboard = tmp;
4380
+ Grafreed.clipboard = tmp;
43404381 }
43414382 else
4342
- if (GrafreeD.clipboardIsTempGroup)
4383
+ if (Grafreed.clipboardIsTempGroup)
43434384 tGroup.add/*Child*/(child);
43444385 else
4345
- GrafreeD.clipboard = child;
4386
+ Grafreed.clipboard = child;
43464387 }
43474388
43484389 //ResetModel();
....@@ -4374,21 +4415,21 @@
43744415 //System.out.println("cut " + elem);
43754416 //System.out.println("parent = " + elem.parent);
43764417 // tmp.addChild(elem);
4377
- if (GrafreeD.clipboardIsTempGroup)
4418
+ if (Grafreed.clipboardIsTempGroup)
43784419 tGroup.add/*Child*/(tmp);
43794420 else
4380
- GrafreeD.clipboard = tmp;
4421
+ Grafreed.clipboard = tmp;
43814422 }
43824423 else
4383
- if (GrafreeD.clipboardIsTempGroup)
4424
+ if (Grafreed.clipboardIsTempGroup)
43844425 tGroup.add/*Child*/(child);
43854426 else
4386
- GrafreeD.clipboard = child;
4427
+ Grafreed.clipboard = child;
43874428 }
43884429
43894430 }
4390
- if (GrafreeD.clipboardIsTempGroup)
4391
- GrafreeD.clipboard = tGroup;
4431
+ if (Grafreed.clipboardIsTempGroup)
4432
+ Grafreed.clipboard = tGroup;
43924433 if (cut)
43934434 {
43944435 ResetModel();
....@@ -4402,7 +4443,7 @@
44024443 // return;
44034444 boolean first = true;
44044445
4405
- if (GrafreeD.clipboardIsTempGroup)
4446
+ if (Grafreed.clipboardIsTempGroup)
44064447 {
44074448 Composite temp;
44084449
....@@ -4413,7 +4454,7 @@
44134454 temp = (Composite)Applet3D.clipboard.deepCopy();
44144455 */
44154456 Object3D elem;
4416
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4457
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
44174458 {
44184459 Object3D child = (Object3D)e.nextElement();
44194460
....@@ -4447,14 +4488,14 @@
44474488 //Object3D cb = Applet3D.clipboard;
44484489 //temp.addChild(cb);
44494490 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4450
- assert(GrafreeD.clipboard.parent == null);
4451
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4452
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4453
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4454
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4491
+ assert(Grafreed.clipboard.parent == null);
4492
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4493
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4494
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4495
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
44554496 else
4456
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4457
- GrafreeD.clipboard.get(0).parent = keepparent;
4497
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4498
+ Grafreed.clipboard.get(0).parent = keepparent;
44584499 }
44594500
44604501 ResetModel();
....@@ -4503,9 +4544,9 @@
45034544 {
45044545 boolean first = true;
45054546
4506
- if (GrafreeD.clipboardIsTempGroup)
4547
+ if (Grafreed.clipboardIsTempGroup)
45074548 {
4508
- Composite temp = (Composite)GrafreeD.clipboard;
4549
+ Composite temp = (Composite)Grafreed.clipboard;
45094550 Object3D copy;
45104551 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
45114552 {
....@@ -4515,7 +4556,7 @@
45154556 }
45164557 } else
45174558 {
4518
- linkSomething(GrafreeD.clipboard); //.get(0));
4559
+ linkSomething(Grafreed.clipboard); //.get(0));
45194560 }
45204561 }
45214562 }
....@@ -4960,7 +5001,7 @@
49605001
49615002 void ImportVRMLX3D()
49625003 {
4963
- if (GrafreeD.standAlone)
5004
+ if (Grafreed.standAlone)
49645005 {
49655006 /**/
49665007 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4977,7 +5018,7 @@
49775018
49785019 String GetFile(String dialogName)
49795020 {
4980
- if (GrafreeD.standAlone)
5021
+ if (Grafreed.standAlone)
49815022 {
49825023 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49835024 browser.show();
....@@ -5151,8 +5192,10 @@
51515192 private MenuItem panoTexturesItem;
51525193
51535194 private MenuItem resetCentroidItem;
5154
- private MenuItem transformgeometryItem;
5195
+ private MenuItem resetCentroidXZItem;
51555196 private MenuItem resetTransformItem;
5197
+ private MenuItem transformGeometryItem;
5198
+ private MenuItem transformChildrenItem;
51565199 private MenuItem hideItem;
51575200 private MenuItem grabItem;
51585201 private MenuItem backItem;