Normand Briere
2019-05-05 44b1501b5c4cd60ea67cc3d0971ed53f53b594e6
GroupEditor.java
....@@ -150,6 +150,8 @@
150150
151151 void SetupMenu2(ObjEditor oe)
152152 {
153
+ if (Globals.ADVANCED)
154
+ {
153155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
154156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
155157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -161,17 +163,21 @@
161163 lookAtItem.addActionListener(this);
162164 //lookFromItem.addActinoListener(this);
163165 //switchItem.addActionListener(this);
166
+ }
167
+
164168 Menu menu;
165169 oe.menuBar.add(menu = new Menu("Edit"));
166170 //editItem = menu.add(new MenuItem("Edit"));
167171 //editItem.addActionListener(this);
168172 duplicateItem = menu.add(new MenuItem("Duplicate"));
169173 duplicateItem.addActionListener(this);
170
- menu.add("-");
171174 cloneItem = menu.add(new MenuItem("Clone"));
172175 cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
173178 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
174179 cloneSupportItem.addActionListener(this);
180
+ }
175181 menu.add("-");
176182 cutItem = menu.add(new MenuItem("Cut"));
177183 cutItem.addActionListener(this);
....@@ -179,18 +185,31 @@
179185 copyItem.addActionListener(this);
180186 pasteItem = menu.add(new MenuItem("Paste"));
181187 pasteItem.addActionListener(this);
188
+ menu.add("-");
189
+
190
+ menu.add("-");
191
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
192
+ pasteIntoItem.addActionListener(this);
182193 pasteLinkItem = menu.add(new MenuItem("Paste link"));
183194 pasteLinkItem.addActionListener(this);
184195 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
185196 pasteCloneItem.addActionListener(this);
186197 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
187198 // pasteExpandItem.addActionListener(this);
199
+ menu.add("-");
188200 clearItem = menu.add(new MenuItem("Clear"));
189201 clearItem.addActionListener(this);
202
+
203
+ if (Globals.ADVANCED)
204
+ {
205
+ // Deletes the cameras...
190206 clearAllItem = menu.add(new MenuItem("Clear All"));
191207 clearAllItem.addActionListener(this);
208
+ }
192209
193210 oe.menuBar.add(menu = new Menu("Setting"));
211
+ if (Globals.ADVANCED)
212
+ {
194213 resetMeshItem = menu.add(new MenuItem("Reset All"));
195214 resetMeshItem.addActionListener(this);
196215 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -200,6 +219,7 @@
200219 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201220 resetreferencesItem.addActionListener(this);
202221 menu.add("-");
222
+ }
203223 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204224 overwriteGeoItem.addActionListener(this);
205225 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,19 +231,26 @@
211231 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212232 overwriteUVItem.addActionListener(this);
213233 menu.add("-");
234
+ if (Globals.ADVANCED)
235
+ {
214236 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215237 generateMeshItem.addActionListener(this);
216238 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217239 poseMeshItem.addActionListener(this);
218240 menu.add("-");
241
+ }
219242 resetsupportItem = menu.add(new MenuItem("Reset support"));
220243 resetsupportItem.addActionListener(this);
221244 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222245 linkverticesItem.addActionListener(this);
223246 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224247 relinkverticesItem.addActionListener(this);
248
+
249
+ if (Globals.ADVANCED)
250
+ {
225251 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226252 setMasterItem.addActionListener(this);
253
+ }
227254
228255 oe.menuBar.add(menu = new Menu("Group"));
229256 grabItem = menu.add(new MenuItem("Grab"));
....@@ -234,27 +261,32 @@
234261 frontItem.addActionListener(this);
235262 compositeItem = menu.add(new MenuItem("Composite"));
236263 compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
264
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238265 hideItem.addActionListener(this);
239266 ungroupItem = menu.add(new MenuItem("Ungroup"));
240267 ungroupItem.addActionListener(this);
241268 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
269
+ randomItem = menu.add(new MenuItem("Switch node"));
243270 randomItem.addActionListener(this);
244
- physicsItem = menu.add(new MenuItem("Physics"));
245
- physicsItem.addActionListener(this);
246
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
247
- frameselectorItem.addActionListener(this);
248271 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249272 switchGeoItem.addActionListener(this);
250273 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251274 switchTransfoItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
275
+ morphItem = menu.add(new MenuItem("Morph Group"));
253276 morphItem.addActionListener(this);
277
+
278
+ if (Globals.ADVANCED)
279
+ {
280
+ menu.add("-");
281
+ physicsItem = menu.add(new MenuItem("Physics"));
282
+ physicsItem.addActionListener(this);
283
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
284
+ frameselectorItem.addActionListener(this);
254285 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255286 scriptNodeItem.addActionListener(this);
256287 cameraItem = menu.add(new MenuItem("Camera"));
257288 cameraItem.addActionListener(this);
289
+ }
258290
259291 oe.menuBar.add(menu = new Menu("Object"));
260292 textureItem = menu.add(new MenuItem("Texture"));
....@@ -269,14 +301,18 @@
269301 shadowYItem.addActionListener(this);
270302 shadowZItem = menu.add(new MenuItem("Shadow Z"));
271303 shadowZItem.addActionListener(this);
304
+ if (Globals.ADVANCED)
305
+ {
306
+ menu.add("-");
272307 linkerItem = menu.add(new MenuItem("Linker"));
273308 linkerItem.addActionListener(this);
274
- templateItem = menu.add(new MenuItem("Template"));
275
- templateItem.addActionListener(this);
276309 attributeItem = menu.add(new MenuItem("Attribute"));
277310 attributeItem.addActionListener(this);
311
+ templateItem = menu.add(new MenuItem("Template"));
312
+ templateItem.addActionListener(this);
278313 pointflowItem = menu.add(new MenuItem("Point Flow"));
279314 pointflowItem.addActionListener(this);
315
+ }
280316 menu.add("-");
281317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282318 resetTransformItem.addActionListener(this);
....@@ -294,8 +330,11 @@
294330 genNormalsCADItem.addActionListener(this);
295331 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296332 genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
297335 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298336 genNormalsMINEItem.addActionListener(this);
337
+ }
299338 stripifyItem = menu.add(new MenuItem("Stripify"));
300339 stripifyItem.addActionListener(this);
301340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,10 +356,14 @@
317356 reduce34MeshItem.addActionListener(this);
318357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319358 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
324367
325368 oe.menuBar.add(menu = new Menu("Attributes"));
326369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -330,10 +373,13 @@
330373 liveleavesItem.addActionListener(this);
331374 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332375 unliveleavesItem.addActionListener(this);
376
+ if (Globals.ADVANCED)
377
+ {
333378 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334379 supportleavesItem.addActionListener(this);
335380 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336381 unsupportleavesItem.addActionListener(this);
382
+ }
337383 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338384 hideleavesItem.addActionListener(this);
339385 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,6 +422,8 @@
376422 sortbysizeItem.addActionListener(this);
377423 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378424 sortbynameItem.addActionListener(this);
425
+ if (Globals.ADVANCED)
426
+ {
379427 menu.add("-");
380428 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381429 extractGeometriesItem.addActionListener(this);
....@@ -385,20 +433,23 @@
385433 shareGeometriesItem.addActionListener(this);
386434 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387435 mergeGeometriesItem.addActionListener(this);
436
+ }
388437
389438 oe.menuBar.add(menu = new Menu("Insert"));
390439 buildCreateMenu(menu);
391440
392
-
393441 oe.menuBar.add(menu = new Menu("Include"));
394
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
395
- importGFDItem.addActionListener(this);
396
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
397
- importVRMLX3DItem.addActionListener(this);
398
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
442
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
399443 importOBJItem.addActionListener(this);
400
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
444
+ menu.add("-");
445
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
401446 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);
402453
403454 oe.menuBar.add(menu = new Menu("Tools"));
404455 buildToolsMenu(menu);
....@@ -440,6 +491,14 @@
440491 liveCB.setToolTipText("Enabled animation");
441492 liveCB.addItemListener(this);
442493
494
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
495
+ oneStepButton.setToolTipText("Animate one step forward");
496
+ oneStepButton.addActionListener(this);
497
+
498
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
499
+ fastCB.setToolTipText("Fast mode");
500
+ fastCB.addItemListener(this);
501
+
443502 oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444503 trackCB.setToolTipText("Enable tracking");
445504 trackCB.addItemListener(this);
....@@ -450,17 +509,14 @@
450509
451510 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
452511 // screenfitpointButton.addActionListener(this);
453
-// oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
455
- snapobjectButton.addActionListener(this);
456
- snapobjectButton.setToolTipText("Snap Object");
457
- oe.aConstraints.gridx += 1;
458512
459
- //aConstraints.gridx = 0;
460
- //aConstraints.gridy += 1;
461
- oe.aConstraints.weighty = 0;
462
- oe.aConstraints.gridwidth = 1;
463
-
513
+ if (Globals.ADVANCED)
514
+ {
515
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ snapobjectButton.addActionListener(this);
517
+ snapobjectButton.setToolTipText("Snap Object");
518
+ }
519
+
464520 oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465521 flashSelectionButton.setToolTipText("Show selection");
466522 flashSelectionButton.addActionListener(this);
....@@ -504,13 +560,13 @@
504560 uneditButton.setToolTipText("Unedit selection");
505561 uneditButton.addActionListener(this);
506562
563
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
564
+ allParamsButton.setToolTipText("Edit all params");
565
+ allParamsButton.addActionListener(this);
566
+
507567 commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508568 clearPanelButton.setToolTipText("Clear edit panel");
509569 clearPanelButton.addActionListener(this);
510
-
511
- commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
- allParamsButton.setToolTipText("All params??");
513
- allParamsButton.addActionListener(this);
514570
515571 commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516572 unselectButton.setToolTipText("Unselect");
....@@ -587,43 +643,35 @@
587643
588644 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
589645 {
590
- //constraints.gridx = 0;
591
- //constraints.gridy = 0;
592
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
593
- fastCB.setToolTipText("Fast mode");
594
- fastCB.addItemListener(this);
595
- //constraints.gridy += 1;
596
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
597
- supportCB.setToolTipText("Enabled rigging");
598
- supportCB.addItemListener(this);
599
-
600
- // constraints.gridy += 1;
601
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
602
- // localCB.addItemListener(this);
603
-
604
- //constraints.gridy += 1;
605
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
606
- crowdCB.setToolTipText("Used for crowds");
607
- crowdCB.addItemListener(this);
608
-
609
- //constraints.gridy += 1;
610
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
611
- smoothCB.setToolTipText("Snapping delay");
612
- smoothCB.addItemListener(this);
613
-
614
- //constraints.gridy += 1;
615
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
616
- slowCB.setToolTipText("Smooth interpolation");
617
- slowCB.addItemListener(this);
618
- //constraints.gridy += 1;
619646 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
620647 boxCB.setToolTipText("Display bounding boxes");
621648 boxCB.addItemListener(this);
622
- //constraints.gridy += 1;
649
+
623650 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
624651 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
625652 zoomBoxCB.addItemListener(this);
626653
654
+ if (Globals.ADVANCED)
655
+ {
656
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
657
+ supportCB.setToolTipText("Enable rigging");
658
+ supportCB.addItemListener(this);
659
+
660
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
661
+ // localCB.addItemListener(this);
662
+
663
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
664
+ crowdCB.setToolTipText("Used for crowds");
665
+ crowdCB.addItemListener(this);
666
+
667
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
668
+ smoothCB.setToolTipText("Snapping delay");
669
+ smoothCB.addItemListener(this);
670
+
671
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
672
+ slowCB.setToolTipText("Smooth interpolation");
673
+ slowCB.addItemListener(this);
674
+
627675 // constraints.gridy += 1;
628676 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
629677 // speakerMocapCB.addItemListener(this);
....@@ -648,14 +696,14 @@
648696 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
649697 // debugCB.addItemListener(this);
650698
651
- //constraints.gridy += 1;
652699 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
653700 oeilCB.addItemListener(this);
654701
655
- //constraints.gridy += 1;
656702 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
657703 lookAtCB.setToolTipText("Look-at target");
658704 lookAtCB.addItemListener(this);
705
+
706
+ }
659707
660708 cGridBag fill = new cGridBag();
661709
....@@ -892,7 +940,9 @@
892940 // objEditor.DropFile((java.io.File[]) object, true);
893941 // return;
894942 // }
895
- if (string.charAt(0) == '/')
943
+
944
+ // File path for Mac and Windows
945
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
896946 {
897947 // file(s)
898948 String[] names = string.split("\n");
....@@ -919,7 +969,7 @@
919969
920970 flashIt = false;
921971 CameraPane pane = (CameraPane) target;
922
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
972
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
923973 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
924974
925975 if (group.selection.size() == 1)
....@@ -946,11 +996,11 @@
946996 {
947997 loadClipboard(true);
948998 objEditor.jTree.setSelectionPath(destinationPath);
949
- pasteInto(false);
999
+ pasteInto(false, false);
9501000 } else {
9511001 loadClipboard(false);
9521002 objEditor.jTree.setSelectionPath(destinationPath);
953
- pasteInto(false); // true); // ???
1003
+ pasteInto(false, false); // true); // ???
9541004 }
9551005 }
9561006 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1072,27 +1122,33 @@
10721122 kleinItem.addActionListener(this);
10731123 particleItem = menu.add(new MenuItem("Particle system"));
10741124 particleItem.addActionListener(this);
1125
+ if (Globals.ADVANCED)
1126
+ {
10751127 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10761128 ragdollItem.addActionListener(this);
10771129 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10781130 ragdoll2Item.addActionListener(this);
1131
+ }
10791132 menu.add("-");
1080
- meshItem = menu.add(new MenuItem("Mesh"));
1133
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10811134 meshItem.addActionListener(this);
10821135 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10831136 // meshGroupItem.addActionListener(this);
1137
+ if (Globals.ADVANCED)
1138
+ {
10841139 springItem = menu.add(new MenuItem("Spring"));
10851140 springItem.addActionListener(this);
10861141 flagItem = menu.add(new MenuItem("Flag"));
10871142 flagItem.addActionListener(this);
1088
- bezierItem = menu.add(new MenuItem("Patch"));
1089
- bezierItem.addActionListener(this);
1090
- checkerItem = menu.add(new MenuItem("Checker"));
1091
- checkerItem.addActionListener(this);
10921143 blobItem = menu.add(new MenuItem("Blob"));
10931144 blobItem.addActionListener(this);
10941145 latheItem = menu.add(new MenuItem("Lathe"));
10951146 latheItem.addActionListener(this);
1147
+ }
1148
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1149
+ bezierItem.addActionListener(this);
1150
+ overlayItem = menu.add(new MenuItem("Overlay"));
1151
+ overlayItem.addActionListener(this);
10961152 lightItem = menu.add(new MenuItem("Light"));
10971153 lightItem.addActionListener(this);
10981154 menu.add("-");
....@@ -1102,34 +1158,39 @@
11021158 loopItem.addActionListener(this);
11031159 doubleItem = menu.add(new MenuItem("Fork"));
11041160 doubleItem.addActionListener(this);
1161
+ if (Globals.ADVANCED)
1162
+ {
11051163 tripleItem = menu.add(new MenuItem("Trident"));
11061164 tripleItem.addActionListener(this);
1165
+ }
11071166 }
11081167
11091168 void buildToolsMenu(Menu menu)
11101169 {
11111170 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11121171 animationItem.addItemListener(this);
1113
- animationItem.setState(CameraPane.ANIMATION);
1172
+ animationItem.setState(Globals.ANIMATION);
11141173
11151174 menu.add("-");
11161175 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11171176 parseverticesItem.addActionListener(this);
11181177 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11191178 textureFieldItem.addActionListener(this);
1120
- alignItem = menu.add(new MenuItem("Align"));
1179
+ alignItem = menu.add(new MenuItem("Align Objects"));
11211180 alignItem.addActionListener(this);
1122
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1123
- mirrorItem.addActionListener(this);
11241181 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11251182 reduceMorphItem.addActionListener(this);
11261183 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11271184 reduce34MorphItem.addActionListener(this);
1128
-
1185
+ menu.add("-");
11291186 menu.add(computeAOItem = new MenuItem("Compute AO"));
11301187 computeAOItem.addActionListener(this);
1131
- menu.add("-");
11321188
1189
+ if (Globals.ADVANCED)
1190
+ {
1191
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1192
+ mirrorItem.addActionListener(this);
1193
+ menu.add("-");
11331194 menu.add(memoryItem = new MenuItem("Memory Usage"));
11341195 memoryItem.addActionListener(this);
11351196 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1152,6 +1213,7 @@
11521213 menu.add("-");
11531214 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11541215 editScriptItem.addActionListener(this);
1216
+ }
11551217 }
11561218
11571219 void ScreenFit()
....@@ -1653,7 +1715,7 @@
16531715 {
16541716 makeSomething(new BezierSurface());
16551717 } else
1656
- if (source == checkerItem)
1718
+ if (source == overlayItem)
16571719 {
16581720 /*
16591721 Object3D obj = new BezierSurface(5,8);
....@@ -1802,7 +1864,15 @@
18021864 } else
18031865 if (source == importOBJItem)
18041866 {
1805
- 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
+ }
18061876 } else
18071877 if (source == computeAOItem)
18081878 {
....@@ -1840,6 +1910,11 @@
18401910 if (source == dumpItem)
18411911 {
18421912 DumpObject();
1913
+ } else
1914
+ if (source == oneStepButton)
1915
+ {
1916
+ Globals.ONESTEP = true;
1917
+ cameraView.repaint();
18431918 } else
18441919 if (source == screenfitButton)
18451920 {
....@@ -1913,13 +1988,17 @@
19131988 {
19141989 paste(false);
19151990 } else
1991
+ if (source == pasteIntoItem)
1992
+ {
1993
+ pasteInto(true, false);
1994
+ } else
19161995 if (source == pasteLinkItem)
19171996 {
1918
- pasteInto(false);
1997
+ pasteInto(false, false);
19191998 } else
19201999 if (source == pasteCloneItem)
19212000 {
1922
- pasteInto(true);
2001
+ pasteInto(true, true);
19232002 } else
19242003 if (source == pasteExpandItem)
19252004 {
....@@ -2121,11 +2200,11 @@
21212200 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21222201 for (int i=0; i<group.selection.size(); i++)
21232202 {
2124
- boolean random = CameraPane.RANDOM;
2125
- CameraPane.RANDOM = false; // parse all random nodes
2203
+ boolean random = CameraPane.SWITCH;
2204
+ CameraPane.SWITCH = false; // parse all random nodes
21262205 group.selection.get(i).linkVerticesThis(content);
21272206 // group.selection.get(i).setMasterThis(content); // should be identity
2128
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
21292208 }
21302209 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21312210 refreshContents();
....@@ -2135,20 +2214,20 @@
21352214 {
21362215 for (int i=0; i<group.selection.size(); i++)
21372216 {
2138
- boolean random = CameraPane.RANDOM;
2139
- CameraPane.RANDOM = false; // parse all random nodes
2217
+ boolean random = CameraPane.SWITCH;
2218
+ CameraPane.SWITCH = false; // parse all random nodes
21402219 group.selection.get(i).linkVerticesThis(null);
2141
- CameraPane.RANDOM = random;
2220
+ CameraPane.SWITCH = random;
21422221 }
21432222
21442223 refreshContents();
21452224 } else
21462225 if (source == relinkverticesItem)
21472226 {
2148
- boolean random = CameraPane.RANDOM;
2149
- CameraPane.RANDOM = false; // parse all random nodes
2227
+ boolean random = CameraPane.SWITCH;
2228
+ CameraPane.SWITCH = false; // parse all random nodes
21502229 group.selection.RelinkToSupport();
2151
- CameraPane.RANDOM = random;
2230
+ CameraPane.SWITCH = random;
21522231
21532232 refreshContents();
21542233 } else
....@@ -2246,7 +2325,7 @@
22462325 RandomNode random = new RandomNode();
22472326 group(random);
22482327 if (random.size() > 0)
2249
- random.name = random.get(0).name + "Rnd";
2328
+ random.name = random.get(0).name + "Switch";
22502329 } else
22512330 if (source == physicsItem)
22522331 {
....@@ -2903,7 +2982,7 @@
29032982
29042983 child.editWindow = null; // ???????????
29052984 }
2906
- objEditor.ctrlPanel.validate();
2985
+ objEditor.ctrlPanel.FlushUI();
29072986 //objEditor.jTree.clearSelection();
29082987 //objEditor.ResetSliders();
29092988 refreshContents(true);
....@@ -3622,11 +3701,11 @@
36223701
36233702 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36243703
3625
- boolean random = CameraPane.RANDOM;
3626
- CameraPane.RANDOM = false; // parse all random nodes
3704
+ boolean random = CameraPane.SWITCH;
3705
+ CameraPane.SWITCH = false; // parse all random nodes
36273706 lowres.linkVerticesThis(null);
36283707 lowres.linkVerticesThis(sn);
3629
- CameraPane.RANDOM = random;
3708
+ CameraPane.SWITCH = random;
36303709
36313710 System.err.flush();
36323711
....@@ -4384,7 +4463,7 @@
43844463 refreshContents();
43854464 }
43864465
4387
- void pasteInto(boolean copyit)
4466
+ void pasteInto(boolean copyit, boolean clone)
43884467 {
43894468 // if (GrafreeD.clipboard == null)
43904469 // return;
....@@ -4413,7 +4492,14 @@
44134492 if (copyit)
44144493 {
44154494 // paste(false);
4416
- CloneClipboard(false); // sept 2014
4495
+ if (clone)
4496
+ {
4497
+ CloneClipboard(false); // sept 2014
4498
+ }
4499
+ else
4500
+ {
4501
+ paste(false);
4502
+ }
44174503 }
44184504 else
44194505 {
....@@ -4957,10 +5043,12 @@
49575043 cButton flashSelectionButton;
49585044 cButton editButton;
49595045 cButton uneditButton;
5046
+ JCheckBox allParamsButton;
49605047 cButton clearpanelButton;
4961
- cButton allParamsButton;
49625048 cButton unselectButton;
49635049
5050
+ cButton oneStepButton;
5051
+
49645052 cButton screenfitButton;
49655053 cButton screenfitpointButton;
49665054 cButton snapobjectButton;
....@@ -5015,6 +5103,7 @@
50155103 private MenuItem mergeGeometriesItem;
50165104 private MenuItem copyItem;
50175105 private MenuItem pasteItem;
5106
+ private MenuItem pasteIntoItem;
50185107 private MenuItem pasteLinkItem;
50195108 private MenuItem pasteCloneItem;
50205109 private MenuItem pasteExpandItem;
....@@ -5112,7 +5201,7 @@
51125201 private MenuItem blobItem;
51135202 private MenuItem latheItem;
51145203 private MenuItem bezierItem;
5115
- private MenuItem checkerItem;
5204
+ private MenuItem overlayItem;
51165205 private MenuItem meshItem;
51175206 // private MenuItem meshGroupItem;
51185207 private MenuItem springItem;