Normand Briere
2019-06-09 c5b599b48b333b34e554b464aefbca0b9bc66275
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- 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));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,124 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
158
+ duplicateItem.addActionListener(this);
159
+ cloneItem = menu.add(new MenuItem("Clone"));
160
+ cloneItem.addActionListener(this);
161
+ if (Globals.ADVANCED)
162
+ {
163
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
164
+ cloneSupportItem.addActionListener(this);
165
+ }
166
+ menu.add("-");
167
+ cutItem = menu.add(new MenuItem("Cut"));
168
+ cutItem.addActionListener(this);
169
+ copyItem = menu.add(new MenuItem("Copy"));
170
+ copyItem.addActionListener(this);
171
+ pasteItem = menu.add(new MenuItem("Paste"));
172
+ pasteItem.addActionListener(this);
173
+ menu.add("-");
174
+
175
+ menu.add("-");
176
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
177
+ pasteIntoItem.addActionListener(this);
178
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
179
+ pasteLinkItem.addActionListener(this);
180
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
181
+ pasteCloneItem.addActionListener(this);
182
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
183
+// pasteExpandItem.addActionListener(this);
184
+ menu.add("-");
185
+ clearItem = menu.add(new MenuItem("Clear"));
186
+ clearItem.addActionListener(this);
187
+
188
+ if (Globals.ADVANCED)
189
+ {
190
+ // Deletes the cameras...
191
+ clearAllItem = menu.add(new MenuItem("Clear All"));
192
+ clearAllItem.addActionListener(this);
193
+ }
194
+
195
+ menuBar.add(cameraMenu = new Menu("View"));
196
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
197
+ //zBufferItem.addActionListener(this);
198
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
199
+ //normalLensItem.addActionListener(this);
200
+ cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
201
+ revertCameraItem.addActionListener(this);
202
+
203
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
204
+ toggleFullScreenItem.addItemListener(this);
205
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
206
+ cameraMenu.add("-");
207
+
208
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
209
+ toggleTextureItem.addItemListener(this);
210
+ toggleTextureItem.setState(CameraPane.textureon);
211
+
212
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
213
+ toggleSwitchItem.addItemListener(this);
214
+ toggleSwitchItem.setState(CameraPane.SWITCH);
215
+
216
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
217
+ toggleHandleItem.addItemListener(this);
218
+ toggleHandleItem.setState(CameraPane.HANDLES);
219
+
220
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
221
+ togglePaintItem.addItemListener(this);
222
+ togglePaintItem.setState(CameraPane.PAINTMODE);
223
+
224
+ if (Globals.ADVANCED)
225
+ {
226
+ cameraMenu.add("-");
227
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
228
+ toggleLiveItem.addItemListener(this);
229
+ toggleLiveItem.setState(Globals.isLIVE());
230
+
231
+ cameraMenu.add(stepItem = new MenuItem("Step"));
232
+ stepItem.addActionListener(this);
233
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
234
+ // toggleDLItem.addItemListener(this);
235
+ // toggleDLItem.setState(false);
236
+
237
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
238
+ toggleRenderItem.addItemListener(this);
239
+ toggleRenderItem.setState(!CameraPane.frozen);
240
+
241
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
242
+ toggleDebugItem.addItemListener(this);
243
+ toggleDebugItem.setState(CameraPane.DEBUG);
244
+
245
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
246
+ toggleFrustumItem.addItemListener(this);
247
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
248
+
249
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
250
+ toggleFootContactItem.addItemListener(this);
251
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
252
+
253
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
254
+ toggleTimelineItem.addItemListener(this);
255
+ }
256
+
257
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
258
+// toggleRootItem.addItemListener(this);
259
+// toggleRootItem.setState(false);
260
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
261
+// animationItem.addItemListener(this);
262
+// animationItem.setState(CameraPane.ANIMATION);
263
+ cameraMenu.add("-");
264
+ cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
265
+ editCameraItem.addActionListener(this);
266
+
267
+ if (Globals.ADVANCED)
268
+ {
152269 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153270 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154271 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +277,17 @@
160277 lookAtItem.addActionListener(this);
161278 //lookFromItem.addActinoListener(this);
162279 //switchItem.addActionListener(this);
163
- Menu menu;
164
- oe.menuBar.add(menu = new Menu("Edit"));
165
- //editItem = menu.add(new MenuItem("Edit"));
166
- //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
168
- duplicateItem.addActionListener(this);
169
- menu.add("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175
- cutItem = menu.add(new MenuItem("Cut"));
176
- cutItem.addActionListener(this);
177
- copyItem = menu.add(new MenuItem("Copy"));
178
- copyItem.addActionListener(this);
179
- pasteItem = menu.add(new MenuItem("Paste"));
180
- pasteItem.addActionListener(this);
181
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
182
- pasteLinkItem.addActionListener(this);
183
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184
- pasteCloneItem.addActionListener(this);
185
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186
-// pasteExpandItem.addActionListener(this);
187
- clearItem = menu.add(new MenuItem("Clear"));
188
- clearItem.addActionListener(this);
189
- clearAllItem = menu.add(new MenuItem("Clear All"));
190
- clearAllItem.addActionListener(this);
191
-
280
+ }
281
+
192282 oe.menuBar.add(menu = new Menu("Setting"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
283
+ if (Globals.ADVANCED)
284
+ {
197285 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198286 revertMeshItem.addActionListener(this);
199287 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200288 resetreferencesItem.addActionListener(this);
201289 menu.add("-");
290
+ }
202291 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203292 overwriteGeoItem.addActionListener(this);
204293 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +299,26 @@
210299 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211300 overwriteUVItem.addActionListener(this);
212301 menu.add("-");
302
+ if (Globals.ADVANCED)
303
+ {
213304 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214305 generateMeshItem.addActionListener(this);
215306 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216307 poseMeshItem.addActionListener(this);
217308 menu.add("-");
309
+ }
218310 resetsupportItem = menu.add(new MenuItem("Reset support"));
219311 resetsupportItem.addActionListener(this);
220312 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221313 linkverticesItem.addActionListener(this);
222314 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223315 relinkverticesItem.addActionListener(this);
316
+
317
+ if (Globals.ADVANCED)
318
+ {
224319 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225320 setMasterItem.addActionListener(this);
321
+ }
226322
227323 oe.menuBar.add(menu = new Menu("Group"));
228324 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +329,32 @@
233329 frontItem.addActionListener(this);
234330 compositeItem = menu.add(new MenuItem("Composite"));
235331 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
332
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237333 hideItem.addActionListener(this);
238334 ungroupItem = menu.add(new MenuItem("Ungroup"));
239335 ungroupItem.addActionListener(this);
240336 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
337
+ randomItem = menu.add(new MenuItem("Switch node"));
242338 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247339 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248340 switchGeoItem.addActionListener(this);
249341 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250342 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
343
+ morphItem = menu.add(new MenuItem("Morph Group"));
252344 morphItem.addActionListener(this);
345
+
346
+ if (Globals.ADVANCED)
347
+ {
348
+ menu.add("-");
349
+ physicsItem = menu.add(new MenuItem("Physics"));
350
+ physicsItem.addActionListener(this);
351
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
352
+ frameselectorItem.addActionListener(this);
253353 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254354 scriptNodeItem.addActionListener(this);
255355 cameraItem = menu.add(new MenuItem("Camera"));
256356 cameraItem.addActionListener(this);
357
+ }
257358
258359 oe.menuBar.add(menu = new Menu("Object"));
259360 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +369,29 @@
268369 shadowYItem.addActionListener(this);
269370 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270371 shadowZItem.addActionListener(this);
372
+ if (Globals.ADVANCED)
373
+ {
374
+ menu.add("-");
271375 linkerItem = menu.add(new MenuItem("Linker"));
272376 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275377 attributeItem = menu.add(new MenuItem("Attribute"));
276378 attributeItem.addActionListener(this);
379
+ templateItem = menu.add(new MenuItem("Template"));
380
+ templateItem.addActionListener(this);
277381 pointflowItem = menu.add(new MenuItem("Point Flow"));
278382 pointflowItem.addActionListener(this);
383
+ }
279384 menu.add("-");
280385 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281386 resetTransformItem.addActionListener(this);
282387 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283388 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
389
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
390
+ resetCentroidXZItem.addActionListener(this);
391
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
392
+ transformGeometryItem.addActionListener(this);
393
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
394
+ transformChildrenItem.addActionListener(this);
286395
287396 oe.menuBar.add(menu = new Menu("Geometry"));
288397 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +402,11 @@
293402 genNormalsCADItem.addActionListener(this);
294403 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295404 genNormalsMESHItem.addActionListener(this);
405
+ if (Globals.ADVANCED)
406
+ {
296407 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297408 genNormalsMINEItem.addActionListener(this);
409
+ }
298410 stripifyItem = menu.add(new MenuItem("Stripify"));
299411 stripifyItem.addActionListener(this);
300412 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +428,34 @@
316428 reduce34MeshItem.addActionListener(this);
317429 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318430 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321431 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322432 clipMeshItem.addActionListener(this);
433
+
434
+ if (Globals.ADVANCED)
435
+ {
436
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
437
+ smoothMeshItem.addActionListener(this);
438
+ }
323439
324440 oe.menuBar.add(menu = new Menu("Attributes"));
325441 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326442 clearMaterialsItem.addActionListener(this);
443
+ resetAllItem = menu.add(new MenuItem("Reset All"));
444
+ resetAllItem.addActionListener(this);
445
+ stepAllItem = menu.add(new MenuItem("Step All"));
446
+ stepAllItem.addActionListener(this);
327447 menu.add("-");
328448 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329449 liveleavesItem.addActionListener(this);
330450 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331451 unliveleavesItem.addActionListener(this);
452
+ if (Globals.ADVANCED)
453
+ {
332454 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333455 supportleavesItem.addActionListener(this);
334456 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335457 unsupportleavesItem.addActionListener(this);
458
+ }
336459 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337460 hideleavesItem.addActionListener(this);
338461 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +499,22 @@
376499 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377500 sortbynameItem.addActionListener(this);
378501 menu.add("-");
502
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
503
+ shareGeometriesItem.addActionListener(this);
504
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
505
+ mergeGeometriesItem.addActionListener(this);
506
+ if (Globals.ADVANCED)
507
+ {
508
+ // Pretty much the same as duplicate and clone.
379509 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380510 extractGeometriesItem.addActionListener(this);
381511 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382512 cloneGeometriesItem.addActionListener(this);
383
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
384
- shareGeometriesItem.addActionListener(this);
385
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386
- mergeGeometriesItem.addActionListener(this);
513
+ }
387514
388515 oe.menuBar.add(menu = new Menu("Insert"));
389516 buildCreateMenu(menu);
390517
391
-
392
- oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
398
- importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
400
- import3DSItem.addActionListener(this);
401
-
402518 oe.menuBar.add(menu = new Menu("Tools"));
403519 buildToolsMenu(menu);
404520 }
....@@ -433,110 +549,98 @@
433549 oe.radioPanel.add(dummyButton);
434550 oe.buttonGroup.add(dummyButton);
435551 */
436
- aConstraints.gridy += 1;
437
-
438552 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439553
440
- oe.aConstraints.gridwidth = 1;
441
- oe.aConstraints.gridx = 0;
442
-
443
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444
- liveCB.setToolTipText("Enabled animation");
554
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
555
+ liveCB.setToolTipText("Enable animation");
445556 liveCB.addItemListener(this);
446557
447
- oe.aConstraints.gridx += 1;
448
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
558
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
559
+ oneStepButton.setToolTipText("Animate one step forward");
560
+ oneStepButton.addActionListener(this);
561
+
562
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
563
+ fastCB.setToolTipText("Fast mode");
564
+ fastCB.addItemListener(this);
565
+
566
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
449567 trackCB.setToolTipText("Enable tracking");
450568 trackCB.addItemListener(this);
451569
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
570
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
454571 screenfitButton.setToolTipText("Screen fit");
455572 screenfitButton.addActionListener(this);
456
- oe.aConstraints.gridx += 1;
573
+
457574 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
458575 // screenfitpointButton.addActionListener(this);
459
-// oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
461
- snapobjectButton.addActionListener(this);
462
- snapobjectButton.setToolTipText("Snap Object");
463
- oe.aConstraints.gridx += 1;
464576
465
- //aConstraints.gridx = 0;
466
- //aConstraints.gridy += 1;
467
- oe.aConstraints.weighty = 0;
468
- oe.aConstraints.gridwidth = 1;
469
-
470
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
577
+ if (Globals.ADVANCED)
578
+ {
579
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
580
+ snapobjectButton.addActionListener(this);
581
+ snapobjectButton.setToolTipText("Snap Object");
582
+ }
583
+
584
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
471585 flashSelectionButton.setToolTipText("Show selection");
472586 flashSelectionButton.addActionListener(this);
473587
474
- oe.toolbarPanel.add(new cButton(" ", false));
588
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
475589
476
- oe.aConstraints.gridx += 1;
477
- oe.aConstraints.weighty = 0;
478
- oe.aConstraints.gridwidth = 1;
479
-
480
- //
481
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
590
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
482591 twoButton.setToolTipText("Show center view only");
483592 twoButton.addActionListener(this);
484
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
593
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
485594 fourButton.addActionListener(this);
486595 fourButton.setToolTipText("Show left panel only");
487
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
596
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
488597 sixButton.setToolTipText("2-column layout left");
489598 sixButton.addActionListener(this);
490
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
599
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
491600 threeButton.setToolTipText("2-column layout right");
492601 threeButton.addActionListener(this);
493
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
602
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
494603 sevenButton.setToolTipText("3-column layout");
495604 sevenButton.addActionListener(this);
496605 //
497606
498
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
499
- rootButton.setToolTipText("Edit object in new tab");
607
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ rootButton.setToolTipText("Edit selection in new tab");
500609 rootButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
610
+
611
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
503612 closeButton.setToolTipText("Close tab");
504613 closeButton.addActionListener(this);
505614 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
506615 //clearButton.addActionListener(this);
507
- oe.aConstraints.gridx += 1;
508616
509
- oe.aConstraints.gridx = 1; //
510
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
617
+ cGridBag commandsPanel = new cGridBag();
618
+
619
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
+ editButton.setToolTipText("Edit selection");
511621 editButton.addActionListener(this);
512
- oe.aConstraints.gridx += 1;
513
- oe.aConstraints.weighty = 0;
514
- oe.aConstraints.gridwidth = 1;
515622
516
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
623
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
+ uneditButton.setToolTipText("Unedit selection");
517625 uneditButton.addActionListener(this);
518626
519
- oe.aConstraints.gridx += 1;
520
- oe.aConstraints.weighty = 0;
521
- oe.aConstraints.gridwidth = 1;
522
-
523
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
524
- clearPanelButton.addActionListener(this);
525
-
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
627
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
628
+ allParamsButton.setToolTipText("Edit all params");
531629 allParamsButton.addActionListener(this);
532630
533
- oe.aConstraints.gridx += 1;
534
- oe.aConstraints.weighty = 0;
535
- oe.aConstraints.gridwidth = 1;
536
-
537
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
631
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
632
+ clearPanelButton.setToolTipText("Clear edit panel");
633
+ clearPanelButton.addActionListener(this);
634
+
635
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636
+ unselectButton.setToolTipText("Unselect");
538637 unselectButton.addActionListener(this);
539638
639
+ commandsPanel.preferredHeight = 1;
640
+
641
+ oe.treePanel.add(commandsPanel);
642
+ oe.treePanel.Return();
643
+
540644 // oe.aConstraints.gridx += 1;
541645 // oe.aConstraints.weighty = 0;
542646 // oe.aConstraints.gridwidth = 1;
....@@ -548,40 +652,37 @@
548652 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
549653 // gcButton.addActionListener(this);
550654
551
- oe.aConstraints.gridx = 0;
552
- oe.aConstraints.gridy += 1;
553
-
554
- //ctrlPanel.add(objList = new List(5, true));
555
- oe.aConstraints.gridwidth = 100;
556
- // oe.aConstraints.gridheight = 100;
557
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
558
- oe.aConstraints.gridheight = 1;
559
- oe.aConstraints.weighty = 0.5;
560
- oe.aConstraints.gridx = 0;
561
- JScrollPane jSP;
655
+ cGridBag jSPPanel = new cGridBag();
656
+
657
+ JScrollPane jSP;
562658 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
563
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
659
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
564660 ResetModel();
565
- oe.aConstraints.weighty = 0.5;
566
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
567
- oe.aConstraints.gridy += 1;
568
- oe.aConstraints.gridwidth = 1;
661
+
662
+ oe.treePanel.add(jSPPanel);
663
+ oe.treePanel.Return();
569664
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 2;
572
-
573
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
665
+ cGridBag copyOptionsPanel = new cGridBag();
666
+
667
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
668
+ colorCB.setToolTipText("Copy color when dropped");
574669 colorCB.addItemListener(this);
575
- oe.aConstraints.gridx += 2;
576
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
670
+
671
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
672
+ materialCB.setToolTipText("Copy material when dropped");
577673 materialCB.addItemListener(this);
578
- oe.aConstraints.gridx += 2;
579
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
674
+
675
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
676
+ textureCB.setToolTipText("Copy texture when dropped");
580677 textureCB.addItemListener(this);
581678
582
- oe.aConstraints.gridx = 0;
583
- oe.aConstraints.gridy += 1;
679
+ copyOptionsPanel.preferredHeight = 1;
680
+ oe.treePanel.add(copyOptionsPanel);
681
+ oe.treePanel.Return();
584682
683
+// mainPanel.setDividerLocation(0.5); //1.0);
684
+// mainPanel.setResizeWeight(0.5);
685
+
585686 //jList.addListSelectionListener(this);
586687 oe.jTree.addTreeSelectionListener(this);
587688 //jTree.setRootVisible(false);
....@@ -604,45 +705,37 @@
604705 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
605706 }
606707
607
- void AddOptions(JPanel panel, GridBagConstraints constraints)
708
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
608709 {
609
- constraints.gridx = 0;
610
- constraints.gridy = 0;
611
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
- fastCB.setToolTipText("Fast mode");
613
- fastCB.addItemListener(this);
614
- constraints.gridy += 1;
615
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
- supportCB.setToolTipText("Enabled rigging");
617
- supportCB.addItemListener(this);
618
-
619
- // constraints.gridy += 1;
620
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621
- // localCB.addItemListener(this);
622
-
623
- constraints.gridy += 1;
624
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
625
- crowdCB.setToolTipText("Used for crowds");
626
- crowdCB.addItemListener(this);
627
-
628
- constraints.gridy += 1;
629
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
630
- smoothCB.setToolTipText("Snapping delay");
631
- smoothCB.addItemListener(this);
632
-
633
- constraints.gridy += 1;
634
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
635
- slowCB.setToolTipText("Smooth interpolation");
636
- slowCB.addItemListener(this);
637
- constraints.gridy += 1;
638
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
710
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
639711 boxCB.setToolTipText("Display bounding boxes");
640712 boxCB.addItemListener(this);
641
- constraints.gridy += 1;
642
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
713
+
714
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
643715 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644716 zoomBoxCB.addItemListener(this);
645717
718
+ if (true) // Globals.ADVANCED)
719
+ {
720
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
721
+ supportCB.setToolTipText("Enable rigging");
722
+ supportCB.addItemListener(this);
723
+
724
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
725
+ // localCB.addItemListener(this);
726
+
727
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
728
+ crowdCB.setToolTipText("Used for crowds");
729
+ crowdCB.addItemListener(this);
730
+
731
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
732
+ smoothCB.setToolTipText("Snapping delay");
733
+ smoothCB.addItemListener(this);
734
+
735
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
736
+ slowCB.setToolTipText("Smooth interpolation");
737
+ slowCB.addItemListener(this);
738
+
646739 // constraints.gridy += 1;
647740 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648741 // speakerMocapCB.addItemListener(this);
....@@ -650,16 +743,16 @@
650743 if (false)
651744 {
652745 // handled in scripts
653
- constraints.gridy += 1;
654
- panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
746
+ //constraints.gridy += 1;
747
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
655748 speakerCameraCB.addItemListener(this);
656749
657
- constraints.gridy += 1;
658
- panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
750
+ //constraints.gridy += 1;
751
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
659752 speakerFocusCB.addItemListener(this);
660753
661
- constraints.gridy += 1;
662
- panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
754
+ //constraints.gridy += 1;
755
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
663756 smoothfocusCB.addItemListener(this);
664757 }
665758
....@@ -667,14 +760,20 @@
667760 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668761 // debugCB.addItemListener(this);
669762
670
- constraints.gridy += 1;
671
- panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
763
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
672764 oeilCB.addItemListener(this);
673765
674
- constraints.gridy += 1;
675
- panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
766
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
676767 lookAtCB.setToolTipText("Look-at target");
677768 lookAtCB.addItemListener(this);
769
+
770
+ }
771
+
772
+ cGridBag fill = new cGridBag();
773
+
774
+ fill.preferredHeight = 200;
775
+
776
+ panel.add(fill);
678777
679778 }
680779
....@@ -689,6 +788,7 @@
689788 buttonGroup.add(radioButton);
690789 radioButton.doClick();
691790 }
791
+
692792 void SetupViews(ObjEditor oe)
693793 {
694794 oe.SetupViews();
....@@ -905,7 +1005,9 @@
9051005 // objEditor.DropFile((java.io.File[]) object, true);
9061006 // return;
9071007 // }
908
- if (string.charAt(0) == '/')
1008
+
1009
+ // File path for Mac and Windows
1010
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9091011 {
9101012 // file(s)
9111013 String[] names = string.split("\n");
....@@ -932,7 +1034,7 @@
9321034
9331035 flashIt = false;
9341036 CameraPane pane = (CameraPane) target;
935
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1037
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9361038 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9371039
9381040 if (group.selection.size() == 1)
....@@ -959,11 +1061,11 @@
9591061 {
9601062 loadClipboard(true);
9611063 objEditor.jTree.setSelectionPath(destinationPath);
962
- pasteInto(false);
1064
+ pasteInto(false, false);
9631065 } else {
9641066 loadClipboard(false);
9651067 objEditor.jTree.setSelectionPath(destinationPath);
966
- pasteInto(false); // true); // ???
1068
+ pasteInto(false, false); // true); // ???
9671069 }
9681070 }
9691071 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1085,27 +1187,33 @@
10851187 kleinItem.addActionListener(this);
10861188 particleItem = menu.add(new MenuItem("Particle system"));
10871189 particleItem.addActionListener(this);
1190
+ if (Globals.ADVANCED)
1191
+ {
10881192 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10891193 ragdollItem.addActionListener(this);
10901194 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10911195 ragdoll2Item.addActionListener(this);
1196
+ }
10921197 menu.add("-");
1093
- meshItem = menu.add(new MenuItem("Mesh"));
1198
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10941199 meshItem.addActionListener(this);
10951200 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10961201 // meshGroupItem.addActionListener(this);
1202
+ if (Globals.ADVANCED)
1203
+ {
10971204 springItem = menu.add(new MenuItem("Spring"));
10981205 springItem.addActionListener(this);
10991206 flagItem = menu.add(new MenuItem("Flag"));
11001207 flagItem.addActionListener(this);
1101
- bezierItem = menu.add(new MenuItem("Patch"));
1102
- bezierItem.addActionListener(this);
1103
- checkerItem = menu.add(new MenuItem("Checker"));
1104
- checkerItem.addActionListener(this);
11051208 blobItem = menu.add(new MenuItem("Blob"));
11061209 blobItem.addActionListener(this);
11071210 latheItem = menu.add(new MenuItem("Lathe"));
11081211 latheItem.addActionListener(this);
1212
+ }
1213
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1214
+ bezierItem.addActionListener(this);
1215
+ overlayItem = menu.add(new MenuItem("Overlay"));
1216
+ overlayItem.addActionListener(this);
11091217 lightItem = menu.add(new MenuItem("Light"));
11101218 lightItem.addActionListener(this);
11111219 menu.add("-");
....@@ -1115,34 +1223,39 @@
11151223 loopItem.addActionListener(this);
11161224 doubleItem = menu.add(new MenuItem("Fork"));
11171225 doubleItem.addActionListener(this);
1226
+ if (Globals.ADVANCED)
1227
+ {
11181228 tripleItem = menu.add(new MenuItem("Trident"));
11191229 tripleItem.addActionListener(this);
1230
+ }
11201231 }
11211232
11221233 void buildToolsMenu(Menu menu)
11231234 {
11241235 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11251236 animationItem.addItemListener(this);
1126
- animationItem.setState(CameraPane.ANIMATION);
1237
+ animationItem.setState(Globals.ANIMATION);
11271238
11281239 menu.add("-");
11291240 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11301241 parseverticesItem.addActionListener(this);
11311242 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11321243 textureFieldItem.addActionListener(this);
1133
- alignItem = menu.add(new MenuItem("Align"));
1244
+ alignItem = menu.add(new MenuItem("Align Objects"));
11341245 alignItem.addActionListener(this);
1135
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1136
- mirrorItem.addActionListener(this);
11371246 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11381247 reduceMorphItem.addActionListener(this);
11391248 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11401249 reduce34MorphItem.addActionListener(this);
1141
-
1250
+ menu.add("-");
11421251 menu.add(computeAOItem = new MenuItem("Compute AO"));
11431252 computeAOItem.addActionListener(this);
1144
- menu.add("-");
11451253
1254
+ if (Globals.ADVANCED)
1255
+ {
1256
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1257
+ mirrorItem.addActionListener(this);
1258
+ menu.add("-");
11461259 menu.add(memoryItem = new MenuItem("Memory Usage"));
11471260 memoryItem.addActionListener(this);
11481261 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1165,6 +1278,7 @@
11651278 menu.add("-");
11661279 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11671280 editScriptItem.addActionListener(this);
1281
+ }
11681282 }
11691283
11701284 void ScreenFit()
....@@ -1493,9 +1607,9 @@
14931607
14941608 void Overwrite(int mask)
14951609 {
1496
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1610
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14971611 {
1498
- Object3D content = GrafreeD.clipboard.get(0);
1612
+ Object3D content = Grafreed.clipboard.get(0);
14991613
15001614 if (content instanceof cGroup && ((cGroup)content).transientlink )
15011615 content = ((cGroup)content).get(0);
....@@ -1666,7 +1780,7 @@
16661780 {
16671781 makeSomething(new BezierSurface());
16681782 } else
1669
- if (source == checkerItem)
1783
+ if (source == overlayItem)
16701784 {
16711785 /*
16721786 Object3D obj = new BezierSurface(5,8);
....@@ -1800,23 +1914,6 @@
18001914 csg.addChild(child);
18011915 child.addChild(csg);
18021916 } else
1803
-
1804
- if (source == importGFDItem)
1805
- {
1806
- ImportGFD();
1807
- } else
1808
- if (source == importVRMLX3DItem)
1809
- {
1810
- ImportVRMLX3D();
1811
- } else
1812
- if (source == import3DSItem)
1813
- {
1814
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1815
- } else
1816
- if (source == importOBJItem)
1817
- {
1818
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1819
- } else
18201917 if (source == computeAOItem)
18211918 {
18221919 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1835,7 +1932,7 @@
18351932 if (source == invariantsItem)
18361933 {
18371934 System.out.println("Invariants:");
1838
- GrafreeD.grafreeD.universe.invariants();
1935
+ Grafreed.grafreeD.universe.invariants();
18391936 } else
18401937 if (source == memoryItem)
18411938 {
....@@ -1853,6 +1950,11 @@
18531950 if (source == dumpItem)
18541951 {
18551952 DumpObject();
1953
+ } else
1954
+ if (source == oneStepButton)
1955
+ {
1956
+ Globals.ONESTEP = true;
1957
+ cameraView.repaint();
18561958 } else
18571959 if (source == screenfitButton)
18581960 {
....@@ -1905,10 +2007,10 @@
19052007 } else
19062008 if (source == duplicateItem)
19072009 {
1908
- Object3D keep = GrafreeD.clipboard;
2010
+ Object3D keep = Grafreed.clipboard;
19092011 loadClipboard(false);
19102012 paste(false);
1911
- GrafreeD.clipboard = keep;
2013
+ Grafreed.clipboard = keep;
19122014 } else
19132015 if (source == cloneItem)
19142016 {
....@@ -1926,13 +2028,17 @@
19262028 {
19272029 paste(false);
19282030 } else
2031
+ if (source == pasteIntoItem)
2032
+ {
2033
+ pasteInto(true, false);
2034
+ } else
19292035 if (source == pasteLinkItem)
19302036 {
1931
- pasteInto(false);
2037
+ pasteInto(false, false);
19322038 } else
19332039 if (source == pasteCloneItem)
19342040 {
1935
- pasteInto(true);
2041
+ pasteInto(true, true);
19362042 } else
19372043 if (source == pasteExpandItem)
19382044 {
....@@ -2124,9 +2230,9 @@
21242230 // group.selection.get(0).setMasterThis(content); // should be identity
21252231 // refreshContents();
21262232 // }
2127
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2233
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21282234 {
2129
- Object3D content = GrafreeD.clipboard.get(0);
2235
+ Object3D content = Grafreed.clipboard.get(0);
21302236
21312237 if (content instanceof cGroup && ((cGroup)content).transientlink )
21322238 content = ((cGroup)content).get(0);
....@@ -2134,11 +2240,11 @@
21342240 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21352241 for (int i=0; i<group.selection.size(); i++)
21362242 {
2137
- boolean random = CameraPane.RANDOM;
2138
- CameraPane.RANDOM = false; // parse all random nodes
2243
+ boolean random = CameraPane.SWITCH;
2244
+ CameraPane.SWITCH = false; // parse all random nodes
21392245 group.selection.get(i).linkVerticesThis(content);
21402246 // group.selection.get(i).setMasterThis(content); // should be identity
2141
- CameraPane.RANDOM = random;
2247
+ CameraPane.SWITCH = random;
21422248 }
21432249 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21442250 refreshContents();
....@@ -2148,20 +2254,20 @@
21482254 {
21492255 for (int i=0; i<group.selection.size(); i++)
21502256 {
2151
- boolean random = CameraPane.RANDOM;
2152
- CameraPane.RANDOM = false; // parse all random nodes
2257
+ boolean random = CameraPane.SWITCH;
2258
+ CameraPane.SWITCH = false; // parse all random nodes
21532259 group.selection.get(i).linkVerticesThis(null);
2154
- CameraPane.RANDOM = random;
2260
+ CameraPane.SWITCH = random;
21552261 }
21562262
21572263 refreshContents();
21582264 } else
21592265 if (source == relinkverticesItem)
21602266 {
2161
- boolean random = CameraPane.RANDOM;
2162
- CameraPane.RANDOM = false; // parse all random nodes
2267
+ boolean random = CameraPane.SWITCH;
2268
+ CameraPane.SWITCH = false; // parse all random nodes
21632269 group.selection.RelinkToSupport();
2164
- CameraPane.RANDOM = random;
2270
+ CameraPane.SWITCH = random;
21652271
21662272 refreshContents();
21672273 } else
....@@ -2176,9 +2282,9 @@
21762282 } else
21772283 if (source == setMasterItem)
21782284 {
2179
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2285
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21802286 {
2181
- Object3D content = GrafreeD.clipboard.get(0);
2287
+ Object3D content = Grafreed.clipboard.get(0);
21822288
21832289 if (content instanceof cGroup && ((cGroup)content).transientlink )
21842290 content = ((cGroup)content).get(0);
....@@ -2191,9 +2297,9 @@
21912297 {
21922298 if (group.selection.size() == 1)
21932299 {
2194
- if (GrafreeD.clipboard.size() == 1)
2300
+ if (Grafreed.clipboard.size() == 1)
21952301 {
2196
- Object3D content = GrafreeD.clipboard.get(0);
2302
+ Object3D content = Grafreed.clipboard.get(0);
21972303
21982304 if (content instanceof cGroup && ((cGroup)content).transientlink )
21992305 content = ((cGroup)content).get(0);
....@@ -2210,7 +2316,7 @@
22102316 {
22112317 RevertMeshes();
22122318 } else
2213
- if (source == resetMeshItem)
2319
+ if (source == resetAllItem)
22142320 {
22152321 ResetAll();
22162322 } else
....@@ -2259,7 +2365,7 @@
22592365 RandomNode random = new RandomNode();
22602366 group(random);
22612367 if (random.size() > 0)
2262
- random.name = random.get(0).name + "Rnd";
2368
+ random.name = random.get(0).name + "Switch";
22632369 } else
22642370 if (source == physicsItem)
22652371 {
....@@ -2548,9 +2654,13 @@
25482654 {
25492655 SmoothMesh();
25502656 } else
2551
- if (source == transformgeometryItem)
2657
+ if (source == transformGeometryItem)
25522658 {
25532659 TransformGeometry();
2660
+ } else
2661
+ if (source == transformChildrenItem)
2662
+ {
2663
+ TransformChildren();
25542664 } else
25552665 if (source == resetTransformItem)
25562666 {
....@@ -2558,7 +2668,11 @@
25582668 } else
25592669 if (source == resetCentroidItem)
25602670 {
2561
- ResetCentroid();
2671
+ ResetCentroid(true);
2672
+ } else
2673
+ if (source == resetCentroidXZItem)
2674
+ {
2675
+ ResetCentroid(false);
25622676 } else
25632677 if (source == resetParentItem)
25642678 {
....@@ -2720,7 +2834,7 @@
27202834 // centralPanel.setVisible(true);
27212835 // XYZPanel.setVisible(false);
27222836 bigThree.ClearUI();
2723
- bigThree.addComponent(centralPanel);
2837
+ bigThree.add(centralPanel);
27242838 bigThree.FlushUI();
27252839 } else
27262840 if (source == threeButton)
....@@ -2755,8 +2869,8 @@
27552869 // centralPanel.setVisible(true);
27562870 // XYZPanel.setVisible(true);
27572871 bigThree.ClearUI();
2758
- bigThree.addComponent(centralPanel);
2759
- bigThree.addComponent(XYZPanel);
2872
+ bigThree.add(centralPanel);
2873
+ bigThree.add(XYZPanel);
27602874 bigThree.FlushUI();
27612875 } else
27622876 if (source == fourButton)
....@@ -2791,7 +2905,7 @@
27912905 // centralPanel.setVisible(false);
27922906 // XYZPanel.setVisible(false);
27932907 bigThree.ClearUI();
2794
- bigThree.addComponent(scenePanel);
2908
+ bigThree.add(scenePanel);
27952909 bigThree.FlushUI();
27962910 } else
27972911 if (source == sixButton)
....@@ -2826,8 +2940,8 @@
28262940 // centralPanel.setVisible(true);
28272941 // XYZPanel.setVisible(false);
28282942 bigThree.ClearUI();
2829
- bigThree.addComponent(scenePanel);
2830
- bigThree.addComponent(centralPanel);
2943
+ bigThree.add(scenePanel);
2944
+ bigThree.add(centralPanel);
28312945 bigThree.FlushUI();
28322946 } else
28332947 if (source == sevenButton)
....@@ -2862,9 +2976,9 @@
28622976 // centralPanel.setVisible(true);
28632977 // XYZPanel.setVisible(true);
28642978 bigThree.ClearUI();
2865
- bigThree.addComponent(scenePanel);
2866
- bigThree.addComponent(centralPanel);
2867
- bigThree.addComponent(XYZPanel);
2979
+ bigThree.add(scenePanel);
2980
+ bigThree.add(centralPanel);
2981
+ bigThree.add(XYZPanel);
28682982 bigThree.FlushUI();
28692983 } else
28702984 if (source == rootButton)
....@@ -2916,7 +3030,7 @@
29163030
29173031 child.editWindow = null; // ???????????
29183032 }
2919
- objEditor.ctrlPanel.revalidate();
3033
+ objEditor.ctrlPanel.FlushUI();
29203034 //objEditor.jTree.clearSelection();
29213035 //objEditor.ResetSliders();
29223036 refreshContents(true);
....@@ -3000,7 +3114,9 @@
30003114 frontView.object = group;
30013115 sideView.object = group;
30023116 }
3003
- group.editWindow = this;
3117
+
3118
+// fix "+" issue group.editWindow = this;
3119
+
30043120 /*
30053121 currentLayout = radio.layout;
30063122 if (currentLayout == null)
....@@ -3013,7 +3129,20 @@
30133129 //group.attributes = -1;
30143130 ResetModel();
30153131 refreshContents(true);
3016
- }
3132
+ } else if (event.getSource() == editCameraItem)
3133
+ {
3134
+ cameraView.ProtectCamera();
3135
+ cameraView.repaint();
3136
+ return;
3137
+ } else if (event.getSource() == revertCameraItem)
3138
+ {
3139
+ cameraView.RevertCamera();
3140
+ cameraView.repaint();
3141
+ return;
3142
+ // } else if (event.getSource() == textureButton)
3143
+ // {
3144
+ // return; // true;
3145
+ }
30173146 else
30183147 {
30193148 //return super.action(event, arg);
....@@ -3074,6 +3203,28 @@
30743203 refreshContents();
30753204 }
30763205
3206
+ void TransformChildren()
3207
+ {
3208
+ Object3D obj;
3209
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3210
+ {
3211
+ obj = (Object3D)e.nextElement();
3212
+ obj.KeepTextureMatrices();
3213
+ obj.TransformChildren();
3214
+ obj.RestoreTextureMatrices();
3215
+
3216
+// if (obj.parent == null)
3217
+// {
3218
+// System.out.println("NULL PARENT!");
3219
+// new Exception().printStackTrace();
3220
+// }
3221
+// else
3222
+// TouchTransform(obj);
3223
+// //obj.parent.Touch();
3224
+ }
3225
+
3226
+ refreshContents();
3227
+ }
30773228
30783229 void ResetTransform()
30793230 {
....@@ -3186,7 +3337,7 @@
31863337 refreshContents();
31873338 }
31883339
3189
- void ResetCentroid()
3340
+ void ResetCentroid(boolean full)
31903341 {
31913342 Object3D obj;
31923343 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3201,12 +3352,16 @@
32013352 LA.matIdentity(Object3D.mat);
32023353 obj.getBounds(minima, maxima, false);
32033354 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3204
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3355
+ if (full)
3356
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32053357 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32063358 obj.TransformMesh(Object3D.mat);
3359
+
32073360 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3208
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3361
+ if (full)
3362
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32093363 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3364
+
32103365 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32113366 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32123367 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3272,9 +3427,9 @@
32723427 obj = (Object3D)e.nextElement();
32733428
32743429 System.out.println("Object is: " + obj);
3275
- GrafreeD.AnalyzeObject(obj);
3430
+ Grafreed.AnalyzeObject(obj);
32763431 System.out.println("Boundary rep: " + obj.bRep);
3277
- GrafreeD.AnalyzeObject(obj.bRep);
3432
+ Grafreed.AnalyzeObject(obj.bRep);
32783433
32793434 // System.err.println((size/1024) + " KB is the size of " + obj);
32803435 }
....@@ -3488,8 +3643,8 @@
34883643
34893644 void ParseVertices()
34903645 {
3491
- boolean epsequal = GrafreeD.epsequal;
3492
- GrafreeD.epsequal = true;
3646
+ boolean epsequal = Grafreed.epsequal;
3647
+ Grafreed.epsequal = true;
34933648
34943649 for (int i=0; i<group.selection.size(); i++)
34953650 {
....@@ -3514,7 +3669,7 @@
35143669 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35153670 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35163671
3517
- g.add(GrafreeD.clipboard);
3672
+ g.add(Grafreed.clipboard);
35183673
35193674 buffer.add(g);
35203675 }
....@@ -3529,7 +3684,7 @@
35293684 makeSomething(buffer, i==group.selection.size()-1);
35303685 }
35313686
3532
- GrafreeD.epsequal = epsequal;
3687
+ Grafreed.epsequal = epsequal;
35333688
35343689 refreshContents();
35353690 }
....@@ -3547,7 +3702,16 @@
35473702 String pigment = Object3D.GetPigment(tex);
35483703 //String bump = Object3D.GetBump(tex);
35493704
3550
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3705
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3706
+
3707
+ try
3708
+ {
3709
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3710
+ }
3711
+ catch (Exception e)
3712
+ {
3713
+ System.err.println("FAIL: " + node);
3714
+ }
35513715
35523716 double s = v.s;
35533717
....@@ -3635,11 +3799,11 @@
36353799
36363800 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36373801
3638
- boolean random = CameraPane.RANDOM;
3639
- CameraPane.RANDOM = false; // parse all random nodes
3802
+ boolean random = CameraPane.SWITCH;
3803
+ CameraPane.SWITCH = false; // parse all random nodes
36403804 lowres.linkVerticesThis(null);
36413805 lowres.linkVerticesThis(sn);
3642
- CameraPane.RANDOM = random;
3806
+ CameraPane.SWITCH = random;
36433807
36443808 System.err.flush();
36453809
....@@ -3679,7 +3843,7 @@
36793843 return;
36803844
36813845 Object3D poses = group.selection.get(0);
3682
- Object3D ref = GrafreeD.clipboard.get(0);
3846
+ Object3D ref = Grafreed.clipboard.get(0);
36833847
36843848 Object3D newgroup = new Object3D("Po:" + poses.name);
36853849
....@@ -3873,9 +4037,9 @@
38734037
38744038 void ClipMesh()
38754039 {
3876
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4040
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38774041 {
3878
- Object3D content = GrafreeD.clipboard.get(0);
4042
+ Object3D content = Grafreed.clipboard.get(0);
38794043
38804044 if (content instanceof cGroup && ((cGroup)content).transientlink )
38814045 content = ((cGroup)content).get(0);
....@@ -3884,7 +4048,7 @@
38844048 // {
38854049 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38864050 // }
3887
- group.selection.ClipMesh(GrafreeD.clipboard);
4051
+ group.selection.ClipMesh(Grafreed.clipboard);
38884052 }
38894053 // group.selection.ClipMesh(GrafreeD.clipboard);
38904054 System.out.println("DONE.");
....@@ -4019,7 +4183,7 @@
40194183 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40204184
40214185 Object3D elem = (Object3D)group.selection.elementAt(i);
4022
- if(elem != group)
4186
+ if(elem != group || !newWindow)
40234187 {
40244188 // if (!(elem instanceof Composite))
40254189 // newWindow = false;
....@@ -4124,12 +4288,12 @@
41244288 System.err.println("info : " + child.GetPath());
41254289 }
41264290 }
4127
- else
4128
- {
4129
- objEditor.SetMaterial(group); // .GetMaterial());
4130
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4131
- System.err.println("info : " + group.GetPath());
4132
- }
4291
+// else
4292
+// {
4293
+// objEditor.SetMaterial(group); // .GetMaterial());
4294
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4295
+// System.err.println("info : " + group.GetPath());
4296
+// }
41334297
41344298 objEditor.SetText(); // jan 2014
41354299
....@@ -4224,12 +4388,12 @@
42244388 {
42254389 if (group.selection.isEmpty())
42264390 return;
4227
- GrafreeD.clipboardIsTempGroup = false;
4391
+ Grafreed.clipboardIsTempGroup = false;
42284392 Composite tGroup = null;
42294393 if (group.selection.size() > 0) // 1)
42304394 {
42314395 tGroup = new cGroup();
4232
- GrafreeD.clipboardIsTempGroup = true;
4396
+ Grafreed.clipboardIsTempGroup = true;
42334397 }
42344398
42354399 if (cut)
....@@ -4269,16 +4433,16 @@
42694433 //System.out.println("cut " + child);
42704434 //System.out.println("parent = " + child.parent);
42714435 // tmp.addChild(child);
4272
- if (GrafreeD.clipboardIsTempGroup)
4436
+ if (Grafreed.clipboardIsTempGroup)
42734437 tGroup.add/*Child*/(tmp);
42744438 else
4275
- GrafreeD.clipboard = tmp;
4439
+ Grafreed.clipboard = tmp;
42764440 }
42774441 else
4278
- if (GrafreeD.clipboardIsTempGroup)
4442
+ if (Grafreed.clipboardIsTempGroup)
42794443 tGroup.add/*Child*/(child);
42804444 else
4281
- GrafreeD.clipboard = child;
4445
+ Grafreed.clipboard = child;
42824446 }
42834447
42844448 //ResetModel();
....@@ -4310,21 +4474,21 @@
43104474 //System.out.println("cut " + elem);
43114475 //System.out.println("parent = " + elem.parent);
43124476 // tmp.addChild(elem);
4313
- if (GrafreeD.clipboardIsTempGroup)
4477
+ if (Grafreed.clipboardIsTempGroup)
43144478 tGroup.add/*Child*/(tmp);
43154479 else
4316
- GrafreeD.clipboard = tmp;
4480
+ Grafreed.clipboard = tmp;
43174481 }
43184482 else
4319
- if (GrafreeD.clipboardIsTempGroup)
4483
+ if (Grafreed.clipboardIsTempGroup)
43204484 tGroup.add/*Child*/(child);
43214485 else
4322
- GrafreeD.clipboard = child;
4486
+ Grafreed.clipboard = child;
43234487 }
43244488
43254489 }
4326
- if (GrafreeD.clipboardIsTempGroup)
4327
- GrafreeD.clipboard = tGroup;
4490
+ if (Grafreed.clipboardIsTempGroup)
4491
+ Grafreed.clipboard = tGroup;
43284492 if (cut)
43294493 {
43304494 ResetModel();
....@@ -4338,7 +4502,7 @@
43384502 // return;
43394503 boolean first = true;
43404504
4341
- if (GrafreeD.clipboardIsTempGroup)
4505
+ if (Grafreed.clipboardIsTempGroup)
43424506 {
43434507 Composite temp;
43444508
....@@ -4349,7 +4513,7 @@
43494513 temp = (Composite)Applet3D.clipboard.deepCopy();
43504514 */
43514515 Object3D elem;
4352
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4516
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43534517 {
43544518 Object3D child = (Object3D)e.nextElement();
43554519
....@@ -4383,21 +4547,21 @@
43834547 //Object3D cb = Applet3D.clipboard;
43844548 //temp.addChild(cb);
43854549 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4386
- assert(GrafreeD.clipboard.parent == null);
4387
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4388
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4389
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4390
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4550
+ assert(Grafreed.clipboard.parent == null);
4551
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4552
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4553
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4554
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43914555 else
4392
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4393
- GrafreeD.clipboard.get(0).parent = keepparent;
4556
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4557
+ Grafreed.clipboard.get(0).parent = keepparent;
43944558 }
43954559
43964560 ResetModel();
43974561 refreshContents();
43984562 }
43994563
4400
- void pasteInto(boolean copyit)
4564
+ void pasteInto(boolean copyit, boolean clone)
44014565 {
44024566 // if (GrafreeD.clipboard == null)
44034567 // return;
....@@ -4426,15 +4590,22 @@
44264590 if (copyit)
44274591 {
44284592 // paste(false);
4429
- CloneClipboard(false); // sept 2014
4593
+ if (clone)
4594
+ {
4595
+ CloneClipboard(false); // sept 2014
4596
+ }
4597
+ else
4598
+ {
4599
+ paste(false);
4600
+ }
44304601 }
44314602 else
44324603 {
44334604 boolean first = true;
44344605
4435
- if (GrafreeD.clipboardIsTempGroup)
4606
+ if (Grafreed.clipboardIsTempGroup)
44364607 {
4437
- Composite temp = (Composite)GrafreeD.clipboard;
4608
+ Composite temp = (Composite)Grafreed.clipboard;
44384609 Object3D copy;
44394610 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44404611 {
....@@ -4444,7 +4615,7 @@
44444615 }
44454616 } else
44464617 {
4447
- linkSomething(GrafreeD.clipboard); //.get(0));
4618
+ linkSomething(Grafreed.clipboard); //.get(0));
44484619 }
44494620 }
44504621 }
....@@ -4849,21 +5020,6 @@
48495020 }
48505021 */
48515022
4852
- void ImportGFD()
4853
- {
4854
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4855
- browser.show();
4856
- String filename = browser.getFile();
4857
- if (filename != null && filename.length() > 0)
4858
- {
4859
- String fullname = browser.getDirectory() + filename;
4860
-
4861
- //Object3D readobj =
4862
- objEditor.ReadGFD(fullname, objEditor);
4863
- //makeSomething(readobj);
4864
- }
4865
- }
4866
-
48675023 /*
48685024 public void Callback(Object obj)
48695025 {
....@@ -4887,26 +5043,9 @@
48875043 }
48885044 */
48895045
4890
- void ImportVRMLX3D()
4891
- {
4892
- if (GrafreeD.standAlone)
4893
- {
4894
- /**/
4895
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4896
- browser.show();
4897
- String filename = browser.getFile();
4898
- if (filename != null && filename.length() > 0)
4899
- {
4900
- String fullname = browser.getDirectory() + filename;
4901
- LoadVRMLX3D(fullname);
4902
- }
4903
- /**/
4904
- }
4905
- }
4906
-
49075046 String GetFile(String dialogName)
49085047 {
4909
- if (GrafreeD.standAlone)
5048
+ if (Grafreed.standAlone)
49105049 {
49115050 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49125051 browser.show();
....@@ -4970,10 +5109,12 @@
49705109 cButton flashSelectionButton;
49715110 cButton editButton;
49725111 cButton uneditButton;
5112
+ JCheckBox allParamsButton;
49735113 cButton clearpanelButton;
4974
- cButton allParamsButton;
49755114 cButton unselectButton;
49765115
5116
+ cButton oneStepButton;
5117
+
49775118 cButton screenfitButton;
49785119 cButton screenfitpointButton;
49795120 cButton snapobjectButton;
....@@ -5017,7 +5158,7 @@
50175158 private MenuItem linkverticesItem;
50185159 private MenuItem relinkverticesItem;
50195160 private MenuItem setMasterItem;
5020
- private MenuItem resetMeshItem;
5161
+ private MenuItem resetAllItem;
50215162 private MenuItem stepAllItem;
50225163 private MenuItem revertMeshItem;
50235164 private MenuItem poseMeshItem;
....@@ -5028,6 +5169,7 @@
50285169 private MenuItem mergeGeometriesItem;
50295170 private MenuItem copyItem;
50305171 private MenuItem pasteItem;
5172
+ private MenuItem pasteIntoItem;
50315173 private MenuItem pasteLinkItem;
50325174 private MenuItem pasteCloneItem;
50335175 private MenuItem pasteExpandItem;
....@@ -5077,8 +5219,10 @@
50775219 private MenuItem panoTexturesItem;
50785220
50795221 private MenuItem resetCentroidItem;
5080
- private MenuItem transformgeometryItem;
5222
+ private MenuItem resetCentroidXZItem;
50815223 private MenuItem resetTransformItem;
5224
+ private MenuItem transformGeometryItem;
5225
+ private MenuItem transformChildrenItem;
50825226 private MenuItem hideItem;
50835227 private MenuItem grabItem;
50845228 private MenuItem backItem;
....@@ -5125,7 +5269,7 @@
51255269 private MenuItem blobItem;
51265270 private MenuItem latheItem;
51275271 private MenuItem bezierItem;
5128
- private MenuItem checkerItem;
5272
+ private MenuItem overlayItem;
51295273 private MenuItem meshItem;
51305274 // private MenuItem meshGroupItem;
51315275 private MenuItem springItem;
....@@ -5147,11 +5291,6 @@
51475291 private MenuItem doubleItem;
51485292 private MenuItem tripleItem;
51495293
5150
- private MenuItem importGFDItem;
5151
- private MenuItem importVRMLX3DItem;
5152
- private MenuItem import3DSItem;
5153
- private MenuItem importOBJItem;
5154
-
51555294 private MenuItem computeAOItem;
51565295 private MenuItem recompileItem;
51575296 private MenuItem editScriptItem;
....@@ -5161,4 +5300,8 @@
51615300 private MenuItem analyzeItem;
51625301 private MenuItem dumpItem;
51635302 //boolean freezemodel = false;
5303
+
5304
+ Menu cameraMenu;
5305
+ MenuItem editCameraItem;
5306
+ MenuItem revertCameraItem;
51645307 }