Normand Briere
2019-06-09 cd87df088b1850ba0c90beb6c866c443e4eaf3b9
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
....@@ -210,10 +210,6 @@
210210 oe.menuBar.add(menu = new Menu("Setting"));
211211 if (Globals.ADVANCED)
212212 {
213
- resetMeshItem = menu.add(new MenuItem("Reset All"));
214
- resetMeshItem.addActionListener(this);
215
- stepAllItem = menu.add(new MenuItem("Step All"));
216
- stepAllItem.addActionListener(this);
217213 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
218214 revertMeshItem.addActionListener(this);
219215 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
....@@ -318,8 +314,12 @@
318314 resetTransformItem.addActionListener(this);
319315 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
320316 resetCentroidItem.addActionListener(this);
321
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
- transformgeometryItem.addActionListener(this);
317
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
318
+ resetCentroidXZItem.addActionListener(this);
319
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
320
+ transformGeometryItem.addActionListener(this);
321
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
322
+ transformChildrenItem.addActionListener(this);
323323
324324 oe.menuBar.add(menu = new Menu("Geometry"));
325325 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -368,6 +368,10 @@
368368 oe.menuBar.add(menu = new Menu("Attributes"));
369369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
370370 clearMaterialsItem.addActionListener(this);
371
+ resetAllItem = menu.add(new MenuItem("Reset All"));
372
+ resetAllItem.addActionListener(this);
373
+ stepAllItem = menu.add(new MenuItem("Step All"));
374
+ stepAllItem.addActionListener(this);
371375 menu.add("-");
372376 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
373377 liveleavesItem.addActionListener(this);
....@@ -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"));
....@@ -488,10 +493,10 @@
488493 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
489494
490495 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
491
- liveCB.setToolTipText("Enabled animation");
496
+ liveCB.setToolTipText("Enable 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");
....@@ -1542,9 +1547,9 @@
15421547
15431548 void Overwrite(int mask)
15441549 {
1545
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1550
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15461551 {
1547
- Object3D content = GrafreeD.clipboard.get(0);
1552
+ Object3D content = Grafreed.clipboard.get(0);
15481553
15491554 if (content instanceof cGroup && ((cGroup)content).transientlink )
15501555 content = ((cGroup)content).get(0);
....@@ -1892,7 +1897,7 @@
18921897 if (source == invariantsItem)
18931898 {
18941899 System.out.println("Invariants:");
1895
- GrafreeD.grafreeD.universe.invariants();
1900
+ Grafreed.grafreeD.universe.invariants();
18961901 } else
18971902 if (source == memoryItem)
18981903 {
....@@ -1967,10 +1972,10 @@
19671972 } else
19681973 if (source == duplicateItem)
19691974 {
1970
- Object3D keep = GrafreeD.clipboard;
1975
+ Object3D keep = Grafreed.clipboard;
19711976 loadClipboard(false);
19721977 paste(false);
1973
- GrafreeD.clipboard = keep;
1978
+ Grafreed.clipboard = keep;
19741979 } else
19751980 if (source == cloneItem)
19761981 {
....@@ -2190,9 +2195,9 @@
21902195 // group.selection.get(0).setMasterThis(content); // should be identity
21912196 // refreshContents();
21922197 // }
2193
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2198
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21942199 {
2195
- Object3D content = GrafreeD.clipboard.get(0);
2200
+ Object3D content = Grafreed.clipboard.get(0);
21962201
21972202 if (content instanceof cGroup && ((cGroup)content).transientlink )
21982203 content = ((cGroup)content).get(0);
....@@ -2242,9 +2247,9 @@
22422247 } else
22432248 if (source == setMasterItem)
22442249 {
2245
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2250
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22462251 {
2247
- Object3D content = GrafreeD.clipboard.get(0);
2252
+ Object3D content = Grafreed.clipboard.get(0);
22482253
22492254 if (content instanceof cGroup && ((cGroup)content).transientlink )
22502255 content = ((cGroup)content).get(0);
....@@ -2257,9 +2262,9 @@
22572262 {
22582263 if (group.selection.size() == 1)
22592264 {
2260
- if (GrafreeD.clipboard.size() == 1)
2265
+ if (Grafreed.clipboard.size() == 1)
22612266 {
2262
- Object3D content = GrafreeD.clipboard.get(0);
2267
+ Object3D content = Grafreed.clipboard.get(0);
22632268
22642269 if (content instanceof cGroup && ((cGroup)content).transientlink )
22652270 content = ((cGroup)content).get(0);
....@@ -2276,7 +2281,7 @@
22762281 {
22772282 RevertMeshes();
22782283 } else
2279
- if (source == resetMeshItem)
2284
+ if (source == resetAllItem)
22802285 {
22812286 ResetAll();
22822287 } else
....@@ -2614,9 +2619,13 @@
26142619 {
26152620 SmoothMesh();
26162621 } else
2617
- if (source == transformgeometryItem)
2622
+ if (source == transformGeometryItem)
26182623 {
26192624 TransformGeometry();
2625
+ } else
2626
+ if (source == transformChildrenItem)
2627
+ {
2628
+ TransformChildren();
26202629 } else
26212630 if (source == resetTransformItem)
26222631 {
....@@ -2624,7 +2633,11 @@
26242633 } else
26252634 if (source == resetCentroidItem)
26262635 {
2627
- ResetCentroid();
2636
+ ResetCentroid(true);
2637
+ } else
2638
+ if (source == resetCentroidXZItem)
2639
+ {
2640
+ ResetCentroid(false);
26282641 } else
26292642 if (source == resetParentItem)
26302643 {
....@@ -3140,6 +3153,28 @@
31403153 refreshContents();
31413154 }
31423155
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
+ }
31433178
31443179 void ResetTransform()
31453180 {
....@@ -3252,7 +3287,7 @@
32523287 refreshContents();
32533288 }
32543289
3255
- void ResetCentroid()
3290
+ void ResetCentroid(boolean full)
32563291 {
32573292 Object3D obj;
32583293 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3267,12 +3302,16 @@
32673302 LA.matIdentity(Object3D.mat);
32683303 obj.getBounds(minima, maxima, false);
32693304 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3270
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3305
+ if (full)
3306
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32713307 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32723308 obj.TransformMesh(Object3D.mat);
3309
+
32733310 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3274
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3311
+ if (full)
3312
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32753313 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3314
+
32763315 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32773316 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32783317 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3338,9 +3377,9 @@
33383377 obj = (Object3D)e.nextElement();
33393378
33403379 System.out.println("Object is: " + obj);
3341
- GrafreeD.AnalyzeObject(obj);
3380
+ Grafreed.AnalyzeObject(obj);
33423381 System.out.println("Boundary rep: " + obj.bRep);
3343
- GrafreeD.AnalyzeObject(obj.bRep);
3382
+ Grafreed.AnalyzeObject(obj.bRep);
33443383
33453384 // System.err.println((size/1024) + " KB is the size of " + obj);
33463385 }
....@@ -3554,8 +3593,8 @@
35543593
35553594 void ParseVertices()
35563595 {
3557
- boolean epsequal = GrafreeD.epsequal;
3558
- GrafreeD.epsequal = true;
3596
+ boolean epsequal = Grafreed.epsequal;
3597
+ Grafreed.epsequal = true;
35593598
35603599 for (int i=0; i<group.selection.size(); i++)
35613600 {
....@@ -3580,7 +3619,7 @@
35803619 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35813620 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35823621
3583
- g.add(GrafreeD.clipboard);
3622
+ g.add(Grafreed.clipboard);
35843623
35853624 buffer.add(g);
35863625 }
....@@ -3595,7 +3634,7 @@
35953634 makeSomething(buffer, i==group.selection.size()-1);
35963635 }
35973636
3598
- GrafreeD.epsequal = epsequal;
3637
+ Grafreed.epsequal = epsequal;
35993638
36003639 refreshContents();
36013640 }
....@@ -3613,7 +3652,16 @@
36133652 String pigment = Object3D.GetPigment(tex);
36143653 //String bump = Object3D.GetBump(tex);
36153654
3616
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3655
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3656
+
3657
+ try
3658
+ {
3659
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3660
+ }
3661
+ catch (Exception e)
3662
+ {
3663
+ System.err.println("FAIL: " + node);
3664
+ }
36173665
36183666 double s = v.s;
36193667
....@@ -3745,7 +3793,7 @@
37453793 return;
37463794
37473795 Object3D poses = group.selection.get(0);
3748
- Object3D ref = GrafreeD.clipboard.get(0);
3796
+ Object3D ref = Grafreed.clipboard.get(0);
37493797
37503798 Object3D newgroup = new Object3D("Po:" + poses.name);
37513799
....@@ -3939,9 +3987,9 @@
39393987
39403988 void ClipMesh()
39413989 {
3942
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3990
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39433991 {
3944
- Object3D content = GrafreeD.clipboard.get(0);
3992
+ Object3D content = Grafreed.clipboard.get(0);
39453993
39463994 if (content instanceof cGroup && ((cGroup)content).transientlink )
39473995 content = ((cGroup)content).get(0);
....@@ -3950,7 +3998,7 @@
39503998 // {
39513999 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39524000 // }
3953
- group.selection.ClipMesh(GrafreeD.clipboard);
4001
+ group.selection.ClipMesh(Grafreed.clipboard);
39544002 }
39554003 // group.selection.ClipMesh(GrafreeD.clipboard);
39564004 System.out.println("DONE.");
....@@ -4290,12 +4338,12 @@
42904338 {
42914339 if (group.selection.isEmpty())
42924340 return;
4293
- GrafreeD.clipboardIsTempGroup = false;
4341
+ Grafreed.clipboardIsTempGroup = false;
42944342 Composite tGroup = null;
42954343 if (group.selection.size() > 0) // 1)
42964344 {
42974345 tGroup = new cGroup();
4298
- GrafreeD.clipboardIsTempGroup = true;
4346
+ Grafreed.clipboardIsTempGroup = true;
42994347 }
43004348
43014349 if (cut)
....@@ -4335,16 +4383,16 @@
43354383 //System.out.println("cut " + child);
43364384 //System.out.println("parent = " + child.parent);
43374385 // tmp.addChild(child);
4338
- if (GrafreeD.clipboardIsTempGroup)
4386
+ if (Grafreed.clipboardIsTempGroup)
43394387 tGroup.add/*Child*/(tmp);
43404388 else
4341
- GrafreeD.clipboard = tmp;
4389
+ Grafreed.clipboard = tmp;
43424390 }
43434391 else
4344
- if (GrafreeD.clipboardIsTempGroup)
4392
+ if (Grafreed.clipboardIsTempGroup)
43454393 tGroup.add/*Child*/(child);
43464394 else
4347
- GrafreeD.clipboard = child;
4395
+ Grafreed.clipboard = child;
43484396 }
43494397
43504398 //ResetModel();
....@@ -4376,21 +4424,21 @@
43764424 //System.out.println("cut " + elem);
43774425 //System.out.println("parent = " + elem.parent);
43784426 // tmp.addChild(elem);
4379
- if (GrafreeD.clipboardIsTempGroup)
4427
+ if (Grafreed.clipboardIsTempGroup)
43804428 tGroup.add/*Child*/(tmp);
43814429 else
4382
- GrafreeD.clipboard = tmp;
4430
+ Grafreed.clipboard = tmp;
43834431 }
43844432 else
4385
- if (GrafreeD.clipboardIsTempGroup)
4433
+ if (Grafreed.clipboardIsTempGroup)
43864434 tGroup.add/*Child*/(child);
43874435 else
4388
- GrafreeD.clipboard = child;
4436
+ Grafreed.clipboard = child;
43894437 }
43904438
43914439 }
4392
- if (GrafreeD.clipboardIsTempGroup)
4393
- GrafreeD.clipboard = tGroup;
4440
+ if (Grafreed.clipboardIsTempGroup)
4441
+ Grafreed.clipboard = tGroup;
43944442 if (cut)
43954443 {
43964444 ResetModel();
....@@ -4404,7 +4452,7 @@
44044452 // return;
44054453 boolean first = true;
44064454
4407
- if (GrafreeD.clipboardIsTempGroup)
4455
+ if (Grafreed.clipboardIsTempGroup)
44084456 {
44094457 Composite temp;
44104458
....@@ -4415,7 +4463,7 @@
44154463 temp = (Composite)Applet3D.clipboard.deepCopy();
44164464 */
44174465 Object3D elem;
4418
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4466
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
44194467 {
44204468 Object3D child = (Object3D)e.nextElement();
44214469
....@@ -4449,14 +4497,14 @@
44494497 //Object3D cb = Applet3D.clipboard;
44504498 //temp.addChild(cb);
44514499 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4452
- assert(GrafreeD.clipboard.parent == null);
4453
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4454
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4455
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4456
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4500
+ assert(Grafreed.clipboard.parent == null);
4501
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4502
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4503
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4504
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
44574505 else
4458
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4459
- GrafreeD.clipboard.get(0).parent = keepparent;
4506
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4507
+ Grafreed.clipboard.get(0).parent = keepparent;
44604508 }
44614509
44624510 ResetModel();
....@@ -4505,9 +4553,9 @@
45054553 {
45064554 boolean first = true;
45074555
4508
- if (GrafreeD.clipboardIsTempGroup)
4556
+ if (Grafreed.clipboardIsTempGroup)
45094557 {
4510
- Composite temp = (Composite)GrafreeD.clipboard;
4558
+ Composite temp = (Composite)Grafreed.clipboard;
45114559 Object3D copy;
45124560 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
45134561 {
....@@ -4517,7 +4565,7 @@
45174565 }
45184566 } else
45194567 {
4520
- linkSomething(GrafreeD.clipboard); //.get(0));
4568
+ linkSomething(Grafreed.clipboard); //.get(0));
45214569 }
45224570 }
45234571 }
....@@ -4962,7 +5010,7 @@
49625010
49635011 void ImportVRMLX3D()
49645012 {
4965
- if (GrafreeD.standAlone)
5013
+ if (Grafreed.standAlone)
49665014 {
49675015 /**/
49685016 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4979,7 +5027,7 @@
49795027
49805028 String GetFile(String dialogName)
49815029 {
4982
- if (GrafreeD.standAlone)
5030
+ if (Grafreed.standAlone)
49835031 {
49845032 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49855033 browser.show();
....@@ -5092,7 +5140,7 @@
50925140 private MenuItem linkverticesItem;
50935141 private MenuItem relinkverticesItem;
50945142 private MenuItem setMasterItem;
5095
- private MenuItem resetMeshItem;
5143
+ private MenuItem resetAllItem;
50965144 private MenuItem stepAllItem;
50975145 private MenuItem revertMeshItem;
50985146 private MenuItem poseMeshItem;
....@@ -5153,8 +5201,10 @@
51535201 private MenuItem panoTexturesItem;
51545202
51555203 private MenuItem resetCentroidItem;
5156
- private MenuItem transformgeometryItem;
5204
+ private MenuItem resetCentroidXZItem;
51575205 private MenuItem resetTransformItem;
5206
+ private MenuItem transformGeometryItem;
5207
+ private MenuItem transformChildrenItem;
51585208 private MenuItem hideItem;
51595209 private MenuItem grabItem;
51605210 private MenuItem backItem;