Normand Briere
2019-05-05 623dc0fa8cbd9473830a1786f6d49fa808a09439
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
....@@ -171,6 +171,14 @@
171171 //editItem.addActionListener(this);
172172 duplicateItem = menu.add(new MenuItem("Duplicate"));
173173 duplicateItem.addActionListener(this);
174
+ cloneItem = menu.add(new MenuItem("Clone"));
175
+ cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
178
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
179
+ cloneSupportItem.addActionListener(this);
180
+ }
181
+ menu.add("-");
174182 cutItem = menu.add(new MenuItem("Cut"));
175183 cutItem.addActionListener(this);
176184 copyItem = menu.add(new MenuItem("Copy"));
....@@ -178,10 +186,7 @@
178186 pasteItem = menu.add(new MenuItem("Paste"));
179187 pasteItem.addActionListener(this);
180188 menu.add("-");
181
- cloneItem = menu.add(new MenuItem("Clone"));
182
- cloneItem.addActionListener(this);
183
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
184
- cloneSupportItem.addActionListener(this);
189
+
185190 menu.add("-");
186191 pasteIntoItem = menu.add(new MenuItem("Paste into"));
187192 pasteIntoItem.addActionListener(this);
....@@ -272,6 +277,7 @@
272277
273278 if (Globals.ADVANCED)
274279 {
280
+ menu.add("-");
275281 physicsItem = menu.add(new MenuItem("Physics"));
276282 physicsItem.addActionListener(this);
277283 frameselectorItem = menu.add(new MenuItem("Frame Selector"));
....@@ -297,6 +303,7 @@
297303 shadowZItem.addActionListener(this);
298304 if (Globals.ADVANCED)
299305 {
306
+ menu.add("-");
300307 linkerItem = menu.add(new MenuItem("Linker"));
301308 linkerItem.addActionListener(this);
302309 attributeItem = menu.add(new MenuItem("Attribute"));
....@@ -305,8 +312,8 @@
305312 templateItem.addActionListener(this);
306313 pointflowItem = menu.add(new MenuItem("Point Flow"));
307314 pointflowItem.addActionListener(this);
308
- menu.add("-");
309315 }
316
+ menu.add("-");
310317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
311318 resetTransformItem.addActionListener(this);
312319 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
....@@ -432,14 +439,17 @@
432439 buildCreateMenu(menu);
433440
434441 oe.menuBar.add(menu = new Menu("Include"));
435
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
436
- importGFDItem.addActionListener(this);
437
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
438
- importVRMLX3DItem.addActionListener(this);
439
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
442
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
440443 importOBJItem.addActionListener(this);
441
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
444
+ menu.add("-");
445
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
442446 import3DSItem.addActionListener(this);
447
+ menu.add("-");
448
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
449
+ importVRMLX3DItem.addActionListener(this);
450
+ menu.add("-");
451
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
452
+ importGFDItem.addActionListener(this);
443453
444454 oe.menuBar.add(menu = new Menu("Tools"));
445455 buildToolsMenu(menu);
....@@ -481,7 +491,7 @@
481491 liveCB.setToolTipText("Enabled animation");
482492 liveCB.addItemListener(this);
483493
484
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
494
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
485495 oneStepButton.setToolTipText("Animate one step forward");
486496 oneStepButton.addActionListener(this);
487497
....@@ -493,7 +503,7 @@
493503 trackCB.setToolTipText("Enable tracking");
494504 trackCB.addItemListener(this);
495505
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
506
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
497507 screenfitButton.setToolTipText("Screen fit");
498508 screenfitButton.addActionListener(this);
499509
....@@ -502,39 +512,39 @@
502512
503513 if (Globals.ADVANCED)
504514 {
505
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
515
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
506516 snapobjectButton.addActionListener(this);
507517 snapobjectButton.setToolTipText("Snap Object");
508518 }
509519
510
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
511521 flashSelectionButton.setToolTipText("Show selection");
512522 flashSelectionButton.addActionListener(this);
513523
514524 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
515525
516
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
526
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
517527 twoButton.setToolTipText("Show center view only");
518528 twoButton.addActionListener(this);
519
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
520530 fourButton.addActionListener(this);
521531 fourButton.setToolTipText("Show left panel only");
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
532
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
523533 sixButton.setToolTipText("2-column layout left");
524534 sixButton.addActionListener(this);
525
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
535
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
526536 threeButton.setToolTipText("2-column layout right");
527537 threeButton.addActionListener(this);
528
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
538
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
529539 sevenButton.setToolTipText("3-column layout");
530540 sevenButton.addActionListener(this);
531541 //
532542
533
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
534544 rootButton.setToolTipText("Edit selection in new tab");
535545 rootButton.addActionListener(this);
536546
537
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
547
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
538548 closeButton.setToolTipText("Close tab");
539549 closeButton.addActionListener(this);
540550 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -542,11 +552,11 @@
542552
543553 cGridBag commandsPanel = new cGridBag();
544554
545
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
555
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
546556 editButton.setToolTipText("Edit selection");
547557 editButton.addActionListener(this);
548558
549
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
559
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
550560 uneditButton.setToolTipText("Unedit selection");
551561 uneditButton.addActionListener(this);
552562
....@@ -554,11 +564,11 @@
554564 allParamsButton.setToolTipText("Edit all params");
555565 allParamsButton.addActionListener(this);
556566
557
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
567
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
558568 clearPanelButton.setToolTipText("Clear edit panel");
559569 clearPanelButton.addActionListener(this);
560570
561
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
571
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
562572 unselectButton.setToolTipText("Unselect");
563573 unselectButton.addActionListener(this);
564574
....@@ -930,7 +940,9 @@
930940 // objEditor.DropFile((java.io.File[]) object, true);
931941 // return;
932942 // }
933
- if (string.charAt(0) == '/')
943
+
944
+ // File path for Mac and Windows
945
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
934946 {
935947 // file(s)
936948 String[] names = string.split("\n");
....@@ -957,7 +969,7 @@
957969
958970 flashIt = false;
959971 CameraPane pane = (CameraPane) target;
960
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
972
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
961973 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
962974
963975 if (group.selection.size() == 1)
....@@ -1164,13 +1176,13 @@
11641176 parseverticesItem.addActionListener(this);
11651177 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11661178 textureFieldItem.addActionListener(this);
1167
- alignItem = menu.add(new MenuItem("Align Object"));
1179
+ alignItem = menu.add(new MenuItem("Align Objects"));
11681180 alignItem.addActionListener(this);
11691181 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11701182 reduceMorphItem.addActionListener(this);
11711183 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11721184 reduce34MorphItem.addActionListener(this);
1173
-
1185
+ menu.add("-");
11741186 menu.add(computeAOItem = new MenuItem("Compute AO"));
11751187 computeAOItem.addActionListener(this);
11761188
....@@ -1530,9 +1542,9 @@
15301542
15311543 void Overwrite(int mask)
15321544 {
1533
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1545
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15341546 {
1535
- Object3D content = GrafreeD.clipboard.get(0);
1547
+ Object3D content = Grafreed.clipboard.get(0);
15361548
15371549 if (content instanceof cGroup && ((cGroup)content).transientlink )
15381550 content = ((cGroup)content).get(0);
....@@ -1852,7 +1864,15 @@
18521864 } else
18531865 if (source == importOBJItem)
18541866 {
1855
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1867
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1868
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1869
+ browser.setVisible(true);
1870
+ String filename = browser.getFile();
1871
+ if (filename != null && filename.length() > 0)
1872
+ {
1873
+ String fullname = browser.getDirectory() + filename;
1874
+ makeSomething(ReadOBJ(fullname), true);
1875
+ }
18561876 } else
18571877 if (source == computeAOItem)
18581878 {
....@@ -1872,7 +1892,7 @@
18721892 if (source == invariantsItem)
18731893 {
18741894 System.out.println("Invariants:");
1875
- GrafreeD.grafreeD.universe.invariants();
1895
+ Grafreed.grafreeD.universe.invariants();
18761896 } else
18771897 if (source == memoryItem)
18781898 {
....@@ -1947,10 +1967,10 @@
19471967 } else
19481968 if (source == duplicateItem)
19491969 {
1950
- Object3D keep = GrafreeD.clipboard;
1970
+ Object3D keep = Grafreed.clipboard;
19511971 loadClipboard(false);
19521972 paste(false);
1953
- GrafreeD.clipboard = keep;
1973
+ Grafreed.clipboard = keep;
19541974 } else
19551975 if (source == cloneItem)
19561976 {
....@@ -2170,9 +2190,9 @@
21702190 // group.selection.get(0).setMasterThis(content); // should be identity
21712191 // refreshContents();
21722192 // }
2173
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2193
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21742194 {
2175
- Object3D content = GrafreeD.clipboard.get(0);
2195
+ Object3D content = Grafreed.clipboard.get(0);
21762196
21772197 if (content instanceof cGroup && ((cGroup)content).transientlink )
21782198 content = ((cGroup)content).get(0);
....@@ -2222,9 +2242,9 @@
22222242 } else
22232243 if (source == setMasterItem)
22242244 {
2225
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2245
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22262246 {
2227
- Object3D content = GrafreeD.clipboard.get(0);
2247
+ Object3D content = Grafreed.clipboard.get(0);
22282248
22292249 if (content instanceof cGroup && ((cGroup)content).transientlink )
22302250 content = ((cGroup)content).get(0);
....@@ -2237,9 +2257,9 @@
22372257 {
22382258 if (group.selection.size() == 1)
22392259 {
2240
- if (GrafreeD.clipboard.size() == 1)
2260
+ if (Grafreed.clipboard.size() == 1)
22412261 {
2242
- Object3D content = GrafreeD.clipboard.get(0);
2262
+ Object3D content = Grafreed.clipboard.get(0);
22432263
22442264 if (content instanceof cGroup && ((cGroup)content).transientlink )
22452265 content = ((cGroup)content).get(0);
....@@ -3318,9 +3338,9 @@
33183338 obj = (Object3D)e.nextElement();
33193339
33203340 System.out.println("Object is: " + obj);
3321
- GrafreeD.AnalyzeObject(obj);
3341
+ Grafreed.AnalyzeObject(obj);
33223342 System.out.println("Boundary rep: " + obj.bRep);
3323
- GrafreeD.AnalyzeObject(obj.bRep);
3343
+ Grafreed.AnalyzeObject(obj.bRep);
33243344
33253345 // System.err.println((size/1024) + " KB is the size of " + obj);
33263346 }
....@@ -3534,8 +3554,8 @@
35343554
35353555 void ParseVertices()
35363556 {
3537
- boolean epsequal = GrafreeD.epsequal;
3538
- GrafreeD.epsequal = true;
3557
+ boolean epsequal = Grafreed.epsequal;
3558
+ Grafreed.epsequal = true;
35393559
35403560 for (int i=0; i<group.selection.size(); i++)
35413561 {
....@@ -3560,7 +3580,7 @@
35603580 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35613581 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35623582
3563
- g.add(GrafreeD.clipboard);
3583
+ g.add(Grafreed.clipboard);
35643584
35653585 buffer.add(g);
35663586 }
....@@ -3575,7 +3595,7 @@
35753595 makeSomething(buffer, i==group.selection.size()-1);
35763596 }
35773597
3578
- GrafreeD.epsequal = epsequal;
3598
+ Grafreed.epsequal = epsequal;
35793599
35803600 refreshContents();
35813601 }
....@@ -3725,7 +3745,7 @@
37253745 return;
37263746
37273747 Object3D poses = group.selection.get(0);
3728
- Object3D ref = GrafreeD.clipboard.get(0);
3748
+ Object3D ref = Grafreed.clipboard.get(0);
37293749
37303750 Object3D newgroup = new Object3D("Po:" + poses.name);
37313751
....@@ -3919,9 +3939,9 @@
39193939
39203940 void ClipMesh()
39213941 {
3922
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3942
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39233943 {
3924
- Object3D content = GrafreeD.clipboard.get(0);
3944
+ Object3D content = Grafreed.clipboard.get(0);
39253945
39263946 if (content instanceof cGroup && ((cGroup)content).transientlink )
39273947 content = ((cGroup)content).get(0);
....@@ -3930,7 +3950,7 @@
39303950 // {
39313951 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39323952 // }
3933
- group.selection.ClipMesh(GrafreeD.clipboard);
3953
+ group.selection.ClipMesh(Grafreed.clipboard);
39343954 }
39353955 // group.selection.ClipMesh(GrafreeD.clipboard);
39363956 System.out.println("DONE.");
....@@ -4270,12 +4290,12 @@
42704290 {
42714291 if (group.selection.isEmpty())
42724292 return;
4273
- GrafreeD.clipboardIsTempGroup = false;
4293
+ Grafreed.clipboardIsTempGroup = false;
42744294 Composite tGroup = null;
42754295 if (group.selection.size() > 0) // 1)
42764296 {
42774297 tGroup = new cGroup();
4278
- GrafreeD.clipboardIsTempGroup = true;
4298
+ Grafreed.clipboardIsTempGroup = true;
42794299 }
42804300
42814301 if (cut)
....@@ -4315,16 +4335,16 @@
43154335 //System.out.println("cut " + child);
43164336 //System.out.println("parent = " + child.parent);
43174337 // tmp.addChild(child);
4318
- if (GrafreeD.clipboardIsTempGroup)
4338
+ if (Grafreed.clipboardIsTempGroup)
43194339 tGroup.add/*Child*/(tmp);
43204340 else
4321
- GrafreeD.clipboard = tmp;
4341
+ Grafreed.clipboard = tmp;
43224342 }
43234343 else
4324
- if (GrafreeD.clipboardIsTempGroup)
4344
+ if (Grafreed.clipboardIsTempGroup)
43254345 tGroup.add/*Child*/(child);
43264346 else
4327
- GrafreeD.clipboard = child;
4347
+ Grafreed.clipboard = child;
43284348 }
43294349
43304350 //ResetModel();
....@@ -4356,21 +4376,21 @@
43564376 //System.out.println("cut " + elem);
43574377 //System.out.println("parent = " + elem.parent);
43584378 // tmp.addChild(elem);
4359
- if (GrafreeD.clipboardIsTempGroup)
4379
+ if (Grafreed.clipboardIsTempGroup)
43604380 tGroup.add/*Child*/(tmp);
43614381 else
4362
- GrafreeD.clipboard = tmp;
4382
+ Grafreed.clipboard = tmp;
43634383 }
43644384 else
4365
- if (GrafreeD.clipboardIsTempGroup)
4385
+ if (Grafreed.clipboardIsTempGroup)
43664386 tGroup.add/*Child*/(child);
43674387 else
4368
- GrafreeD.clipboard = child;
4388
+ Grafreed.clipboard = child;
43694389 }
43704390
43714391 }
4372
- if (GrafreeD.clipboardIsTempGroup)
4373
- GrafreeD.clipboard = tGroup;
4392
+ if (Grafreed.clipboardIsTempGroup)
4393
+ Grafreed.clipboard = tGroup;
43744394 if (cut)
43754395 {
43764396 ResetModel();
....@@ -4384,7 +4404,7 @@
43844404 // return;
43854405 boolean first = true;
43864406
4387
- if (GrafreeD.clipboardIsTempGroup)
4407
+ if (Grafreed.clipboardIsTempGroup)
43884408 {
43894409 Composite temp;
43904410
....@@ -4395,7 +4415,7 @@
43954415 temp = (Composite)Applet3D.clipboard.deepCopy();
43964416 */
43974417 Object3D elem;
4398
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4418
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43994419 {
44004420 Object3D child = (Object3D)e.nextElement();
44014421
....@@ -4429,14 +4449,14 @@
44294449 //Object3D cb = Applet3D.clipboard;
44304450 //temp.addChild(cb);
44314451 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4432
- assert(GrafreeD.clipboard.parent == null);
4433
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4434
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4435
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4436
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
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());
44374457 else
4438
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4439
- GrafreeD.clipboard.get(0).parent = keepparent;
4458
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4459
+ Grafreed.clipboard.get(0).parent = keepparent;
44404460 }
44414461
44424462 ResetModel();
....@@ -4485,9 +4505,9 @@
44854505 {
44864506 boolean first = true;
44874507
4488
- if (GrafreeD.clipboardIsTempGroup)
4508
+ if (Grafreed.clipboardIsTempGroup)
44894509 {
4490
- Composite temp = (Composite)GrafreeD.clipboard;
4510
+ Composite temp = (Composite)Grafreed.clipboard;
44914511 Object3D copy;
44924512 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44934513 {
....@@ -4497,7 +4517,7 @@
44974517 }
44984518 } else
44994519 {
4500
- linkSomething(GrafreeD.clipboard); //.get(0));
4520
+ linkSomething(Grafreed.clipboard); //.get(0));
45014521 }
45024522 }
45034523 }
....@@ -4942,7 +4962,7 @@
49424962
49434963 void ImportVRMLX3D()
49444964 {
4945
- if (GrafreeD.standAlone)
4965
+ if (Grafreed.standAlone)
49464966 {
49474967 /**/
49484968 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4959,7 +4979,7 @@
49594979
49604980 String GetFile(String dialogName)
49614981 {
4962
- if (GrafreeD.standAlone)
4982
+ if (Grafreed.standAlone)
49634983 {
49644984 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49654985 browser.show();