Normand Briere
2019-06-11 d0dc7ff35d71919d503ae35592478b173cf3cfd3
GroupEditor.java
....@@ -74,7 +74,7 @@
7474 this.copy = this.group = copy;
7575 //selectees = this.group.selectees;
7676
77
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7878 SetupUI2(objEditor);
7979 objEditor.SetupUI(true);
8080 SetupViews(objEditor);
....@@ -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
....@@ -148,8 +148,130 @@
148148
149149 //JTextField nameField;
150150
151
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
152152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
163
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
164
+ duplicateItem.addActionListener(this);
165
+ cloneItem = menu.add(new MenuItem("Clone"));
166
+ cloneItem.addActionListener(this);
167
+ if (Globals.ADVANCED)
168
+ {
169
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
170
+ cloneSupportItem.addActionListener(this);
171
+ }
172
+ menu.add("-");
173
+ cutItem = menu.add(new MenuItem("Cut"));
174
+ cutItem.addActionListener(this);
175
+ copyItem = menu.add(new MenuItem("Copy"));
176
+ copyItem.addActionListener(this);
177
+ pasteItem = menu.add(new MenuItem("Paste"));
178
+ pasteItem.addActionListener(this);
179
+ menu.add("-");
180
+
181
+ menu.add("-");
182
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
183
+ pasteIntoItem.addActionListener(this);
184
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
185
+ pasteLinkItem.addActionListener(this);
186
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
187
+ pasteCloneItem.addActionListener(this);
188
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189
+// pasteExpandItem.addActionListener(this);
190
+ menu.add("-");
191
+ clearItem = menu.add(new MenuItem("Clear"));
192
+ clearItem.addActionListener(this);
193
+
194
+ if (Globals.ADVANCED)
195
+ {
196
+ // Deletes the cameras...
197
+ clearAllItem = menu.add(new MenuItem("Clear All"));
198
+ clearAllItem.addActionListener(this);
199
+ }
200
+
201
+ menuBar.add(cameraMenu = new Menu("View"));
202
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
203
+ //zBufferItem.addActionListener(this);
204
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205
+ //normalLensItem.addActionListener(this);
206
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
+ revertCameraItem.addActionListener(this);
208
+
209
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
+ toggleFullScreenItem.addItemListener(this);
211
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
+ cameraMenu.add("-");
213
+
214
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
+ toggleTextureItem.addItemListener(this);
216
+ toggleTextureItem.setState(CameraPane.textureon);
217
+
218
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
+ toggleSwitchItem.addItemListener(this);
220
+ toggleSwitchItem.setState(CameraPane.SWITCH);
221
+
222
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
223
+ toggleHandleItem.addItemListener(this);
224
+ toggleHandleItem.setState(CameraPane.HANDLES);
225
+
226
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
227
+ togglePaintItem.addItemListener(this);
228
+ togglePaintItem.setState(CameraPane.PAINTMODE);
229
+
230
+ if (Globals.ADVANCED)
231
+ {
232
+ cameraMenu.add("-");
233
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
234
+ toggleLiveItem.addItemListener(this);
235
+ toggleLiveItem.setState(Globals.isLIVE());
236
+
237
+ cameraMenu.add(stepItem = new MenuItem("Step"));
238
+ stepItem.addActionListener(this);
239
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
240
+ // toggleDLItem.addItemListener(this);
241
+ // toggleDLItem.setState(false);
242
+
243
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
244
+ toggleRenderItem.addItemListener(this);
245
+ toggleRenderItem.setState(!CameraPane.frozen);
246
+
247
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248
+ toggleDebugItem.addItemListener(this);
249
+ toggleDebugItem.setState(CameraPane.DEBUG);
250
+
251
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252
+ toggleFrustumItem.addItemListener(this);
253
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
254
+
255
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
256
+ toggleFootContactItem.addItemListener(this);
257
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
258
+
259
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
260
+ toggleTimelineItem.addItemListener(this);
261
+ }
262
+
263
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
264
+// toggleRootItem.addItemListener(this);
265
+// toggleRootItem.setState(false);
266
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
267
+// animationItem.addItemListener(this);
268
+// animationItem.setState(CameraPane.ANIMATION);
269
+ cameraMenu.add("-");
270
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
271
+ editCameraItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
153275 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
154276 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
155277 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -161,45 +283,17 @@
161283 lookAtItem.addActionListener(this);
162284 //lookFromItem.addActinoListener(this);
163285 //switchItem.addActionListener(this);
164
- Menu menu;
165
- oe.menuBar.add(menu = new Menu("Edit"));
166
- //editItem = menu.add(new MenuItem("Edit"));
167
- //editItem.addActionListener(this);
168
- duplicateItem = menu.add(new MenuItem("Duplicate"));
169
- duplicateItem.addActionListener(this);
170
- menu.add("-");
171
- cloneItem = menu.add(new MenuItem("Clone"));
172
- cloneItem.addActionListener(this);
173
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
174
- cloneSupportItem.addActionListener(this);
175
- menu.add("-");
176
- cutItem = menu.add(new MenuItem("Cut"));
177
- cutItem.addActionListener(this);
178
- copyItem = menu.add(new MenuItem("Copy"));
179
- copyItem.addActionListener(this);
180
- pasteItem = menu.add(new MenuItem("Paste"));
181
- pasteItem.addActionListener(this);
182
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
183
- pasteLinkItem.addActionListener(this);
184
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
185
- pasteCloneItem.addActionListener(this);
186
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
187
-// pasteExpandItem.addActionListener(this);
188
- clearItem = menu.add(new MenuItem("Clear"));
189
- clearItem.addActionListener(this);
190
- clearAllItem = menu.add(new MenuItem("Clear All"));
191
- clearAllItem.addActionListener(this);
192
-
286
+ }
287
+
193288 oe.menuBar.add(menu = new Menu("Setting"));
194
- resetMeshItem = menu.add(new MenuItem("Reset All"));
195
- resetMeshItem.addActionListener(this);
196
- stepAllItem = menu.add(new MenuItem("Step All"));
197
- stepAllItem.addActionListener(this);
289
+ if (Globals.ADVANCED)
290
+ {
198291 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
199292 revertMeshItem.addActionListener(this);
200293 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201294 resetreferencesItem.addActionListener(this);
202295 menu.add("-");
296
+ }
203297 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204298 overwriteGeoItem.addActionListener(this);
205299 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,19 +305,26 @@
211305 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212306 overwriteUVItem.addActionListener(this);
213307 menu.add("-");
308
+ if (Globals.ADVANCED)
309
+ {
214310 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215311 generateMeshItem.addActionListener(this);
216312 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217313 poseMeshItem.addActionListener(this);
218314 menu.add("-");
315
+ }
219316 resetsupportItem = menu.add(new MenuItem("Reset support"));
220317 resetsupportItem.addActionListener(this);
221318 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222319 linkverticesItem.addActionListener(this);
223320 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224321 relinkverticesItem.addActionListener(this);
322
+
323
+ if (Globals.ADVANCED)
324
+ {
225325 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226326 setMasterItem.addActionListener(this);
327
+ }
227328
228329 oe.menuBar.add(menu = new Menu("Group"));
229330 grabItem = menu.add(new MenuItem("Grab"));
....@@ -234,27 +335,32 @@
234335 frontItem.addActionListener(this);
235336 compositeItem = menu.add(new MenuItem("Composite"));
236337 compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
338
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238339 hideItem.addActionListener(this);
239340 ungroupItem = menu.add(new MenuItem("Ungroup"));
240341 ungroupItem.addActionListener(this);
241342 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
343
+ randomItem = menu.add(new MenuItem("Switch node"));
243344 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);
248345 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249346 switchGeoItem.addActionListener(this);
250347 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251348 switchTransfoItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
349
+ morphItem = menu.add(new MenuItem("Morph Group"));
253350 morphItem.addActionListener(this);
351
+
352
+ if (Globals.ADVANCED)
353
+ {
354
+ menu.add("-");
355
+ physicsItem = menu.add(new MenuItem("Physics"));
356
+ physicsItem.addActionListener(this);
357
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
358
+ frameselectorItem.addActionListener(this);
254359 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255360 scriptNodeItem.addActionListener(this);
256361 cameraItem = menu.add(new MenuItem("Camera"));
257362 cameraItem.addActionListener(this);
363
+ }
258364
259365 oe.menuBar.add(menu = new Menu("Object"));
260366 textureItem = menu.add(new MenuItem("Texture"));
....@@ -269,21 +375,29 @@
269375 shadowYItem.addActionListener(this);
270376 shadowZItem = menu.add(new MenuItem("Shadow Z"));
271377 shadowZItem.addActionListener(this);
378
+ if (Globals.ADVANCED)
379
+ {
380
+ menu.add("-");
272381 linkerItem = menu.add(new MenuItem("Linker"));
273382 linkerItem.addActionListener(this);
274
- templateItem = menu.add(new MenuItem("Template"));
275
- templateItem.addActionListener(this);
276383 attributeItem = menu.add(new MenuItem("Attribute"));
277384 attributeItem.addActionListener(this);
385
+ templateItem = menu.add(new MenuItem("Template"));
386
+ templateItem.addActionListener(this);
278387 pointflowItem = menu.add(new MenuItem("Point Flow"));
279388 pointflowItem.addActionListener(this);
389
+ }
280390 menu.add("-");
281391 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282392 resetTransformItem.addActionListener(this);
283393 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
284394 resetCentroidItem.addActionListener(this);
285
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
286
- transformgeometryItem.addActionListener(this);
395
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
396
+ resetCentroidXZItem.addActionListener(this);
397
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
398
+ transformGeometryItem.addActionListener(this);
399
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
400
+ transformChildrenItem.addActionListener(this);
287401
288402 oe.menuBar.add(menu = new Menu("Geometry"));
289403 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -294,8 +408,11 @@
294408 genNormalsCADItem.addActionListener(this);
295409 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296410 genNormalsMESHItem.addActionListener(this);
411
+ if (Globals.ADVANCED)
412
+ {
297413 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298414 genNormalsMINEItem.addActionListener(this);
415
+ }
299416 stripifyItem = menu.add(new MenuItem("Stripify"));
300417 stripifyItem.addActionListener(this);
301418 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,23 +434,34 @@
317434 reduce34MeshItem.addActionListener(this);
318435 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319436 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322437 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323438 clipMeshItem.addActionListener(this);
439
+
440
+ if (Globals.ADVANCED)
441
+ {
442
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
443
+ smoothMeshItem.addActionListener(this);
444
+ }
324445
325446 oe.menuBar.add(menu = new Menu("Attributes"));
326447 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
327448 clearMaterialsItem.addActionListener(this);
449
+ resetAllItem = menu.add(new MenuItem("Reset All"));
450
+ resetAllItem.addActionListener(this);
451
+ stepAllItem = menu.add(new MenuItem("Step All"));
452
+ stepAllItem.addActionListener(this);
328453 menu.add("-");
329454 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
330455 liveleavesItem.addActionListener(this);
331456 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332457 unliveleavesItem.addActionListener(this);
458
+ if (Globals.ADVANCED)
459
+ {
333460 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334461 supportleavesItem.addActionListener(this);
335462 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336463 unsupportleavesItem.addActionListener(this);
464
+ }
337465 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338466 hideleavesItem.addActionListener(this);
339467 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -377,29 +505,22 @@
377505 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378506 sortbynameItem.addActionListener(this);
379507 menu.add("-");
508
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
509
+ shareGeometriesItem.addActionListener(this);
510
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
511
+ mergeGeometriesItem.addActionListener(this);
512
+ if (Globals.ADVANCED)
513
+ {
514
+ // Pretty much the same as duplicate and clone.
380515 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381516 extractGeometriesItem.addActionListener(this);
382517 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
383518 cloneGeometriesItem.addActionListener(this);
384
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
385
- shareGeometriesItem.addActionListener(this);
386
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387
- mergeGeometriesItem.addActionListener(this);
519
+ }
388520
389521 oe.menuBar.add(menu = new Menu("Insert"));
390522 buildCreateMenu(menu);
391523
392
-
393
- 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..."));
399
- importOBJItem.addActionListener(this);
400
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
401
- import3DSItem.addActionListener(this);
402
-
403524 oe.menuBar.add(menu = new Menu("Tools"));
404525 buildToolsMenu(menu);
405526 }
....@@ -436,96 +557,108 @@
436557 */
437558 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438559
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
440
- liveCB.setToolTipText("Enabled animation");
560
+ oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ undoButton.setToolTipText("Undo changes");
562
+ undoButton.addActionListener(this);
563
+
564
+ oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ redoButton.setToolTipText("Redo changes");
566
+ redoButton.addActionListener(this);
567
+
568
+ oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
+ saveButton.setToolTipText("Save changes");
570
+ saveButton.addActionListener(this);
571
+
572
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
573
+ liveCB.setToolTipText("Enable animation");
441574 liveCB.addItemListener(this);
442575
443
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
576
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
+ oneStepButton.setToolTipText("Animate one step forward");
578
+ oneStepButton.addActionListener(this);
579
+
580
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
581
+ fastCB.setToolTipText("Fast mode");
582
+ fastCB.addItemListener(this);
583
+
584
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444585 trackCB.setToolTipText("Enable tracking");
445586 trackCB.addItemListener(this);
446587
447
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
588
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
448589 screenfitButton.setToolTipText("Screen fit");
449590 screenfitButton.addActionListener(this);
450591
451592 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
452593 // 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;
458594
459
- //aConstraints.gridx = 0;
460
- //aConstraints.gridy += 1;
461
- oe.aConstraints.weighty = 0;
462
- oe.aConstraints.gridwidth = 1;
463
-
464
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
595
+ if (Globals.ADVANCED)
596
+ {
597
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598
+ snapobjectButton.addActionListener(this);
599
+ snapobjectButton.setToolTipText("Snap Object");
600
+ }
601
+
602
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
465603 flashSelectionButton.setToolTipText("Show selection");
466604 flashSelectionButton.addActionListener(this);
467605
468606 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
469607
470
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
608
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
471609 twoButton.setToolTipText("Show center view only");
472610 twoButton.addActionListener(this);
473
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
611
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
474612 fourButton.addActionListener(this);
475613 fourButton.setToolTipText("Show left panel only");
476
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
614
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
477615 sixButton.setToolTipText("2-column layout left");
478616 sixButton.addActionListener(this);
479
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
617
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
480618 threeButton.setToolTipText("2-column layout right");
481619 threeButton.addActionListener(this);
482
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
620
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
483621 sevenButton.setToolTipText("3-column layout");
484622 sevenButton.addActionListener(this);
485623 //
486624
487
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- rootButton.setToolTipText("Edit object in new tab");
625
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
626
+ rootButton.setToolTipText("Edit selection in new tab");
489627 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
628
+
629
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
492630 closeButton.setToolTipText("Close tab");
493631 closeButton.addActionListener(this);
494632 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495633 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497634
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
635
+ cGridBag commandsPanel = new cGridBag();
636
+
637
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
638
+ editButton.setToolTipText("Edit selection");
500639 editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504640
505
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
641
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ uneditButton.setToolTipText("Unedit selection");
506643 uneditButton.addActionListener(this);
507644
508
- oe.aConstraints.gridx += 1;
509
- oe.aConstraints.weighty = 0;
510
- oe.aConstraints.gridwidth = 1;
511
-
512
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
513
- clearPanelButton.addActionListener(this);
514
-
515
- oe.aConstraints.gridx += 1;
516
- oe.aConstraints.weighty = 0;
517
- oe.aConstraints.gridwidth = 1;
518
-
519
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
645
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
646
+ allParamsButton.setToolTipText("Edit all params");
520647 allParamsButton.addActionListener(this);
521648
522
- oe.aConstraints.gridx += 1;
523
- oe.aConstraints.weighty = 0;
524
- oe.aConstraints.gridwidth = 1;
525
-
526
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
649
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
+ clearPanelButton.setToolTipText("Clear edit panel");
651
+ clearPanelButton.addActionListener(this);
652
+
653
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
+ unselectButton.setToolTipText("Unselect");
527655 unselectButton.addActionListener(this);
528656
657
+ commandsPanel.preferredHeight = 1;
658
+
659
+ oe.treePanel.add(commandsPanel);
660
+ oe.treePanel.Return();
661
+
529662 // oe.aConstraints.gridx += 1;
530663 // oe.aConstraints.weighty = 0;
531664 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +670,37 @@
537670 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538671 // gcButton.addActionListener(this);
539672
540
- oe.aConstraints.gridx = 0;
541
- oe.aConstraints.gridy += 1;
542
-
543
- //ctrlPanel.add(objList = new List(5, true));
544
- oe.aConstraints.gridwidth = 100;
545
- // oe.aConstraints.gridheight = 100;
546
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
547
- oe.aConstraints.gridheight = 1;
548
- oe.aConstraints.weighty = 0.5;
549
- oe.aConstraints.gridx = 0;
550
- JScrollPane jSP;
673
+ cGridBag jSPPanel = new cGridBag();
674
+
675
+ JScrollPane jSP;
551676 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
552
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
677
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
553678 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
679
+
680
+ oe.treePanel.add(jSPPanel);
681
+ oe.treePanel.Return();
558682
559
- oe.aConstraints.weighty = 0;
560
- oe.aConstraints.gridwidth = 2;
561
-
562
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
683
+ cGridBag copyOptionsPanel = new cGridBag();
684
+
685
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
686
+ colorCB.setToolTipText("Copy color when dropped");
563687 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
688
+
689
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
690
+ materialCB.setToolTipText("Copy material when dropped");
566691 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
692
+
693
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
694
+ textureCB.setToolTipText("Copy texture when dropped");
569695 textureCB.addItemListener(this);
570696
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
697
+ copyOptionsPanel.preferredHeight = 1;
698
+ oe.treePanel.add(copyOptionsPanel);
699
+ oe.treePanel.Return();
573700
701
+// mainPanel.setDividerLocation(0.5); //1.0);
702
+// mainPanel.setResizeWeight(0.5);
703
+
574704 //jList.addListSelectionListener(this);
575705 oe.jTree.addTreeSelectionListener(this);
576706 //jTree.setRootVisible(false);
....@@ -595,43 +725,35 @@
595725
596726 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597727 {
598
- //constraints.gridx = 0;
599
- //constraints.gridy = 0;
600
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
601
- fastCB.setToolTipText("Fast mode");
602
- fastCB.addItemListener(this);
603
- //constraints.gridy += 1;
604
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
605
- supportCB.setToolTipText("Enabled rigging");
606
- supportCB.addItemListener(this);
607
-
608
- // constraints.gridy += 1;
609
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
610
- // localCB.addItemListener(this);
611
-
612
- //constraints.gridy += 1;
613
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
614
- crowdCB.setToolTipText("Used for crowds");
615
- crowdCB.addItemListener(this);
616
-
617
- //constraints.gridy += 1;
618
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
619
- smoothCB.setToolTipText("Snapping delay");
620
- smoothCB.addItemListener(this);
621
-
622
- //constraints.gridy += 1;
623
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
624
- slowCB.setToolTipText("Smooth interpolation");
625
- slowCB.addItemListener(this);
626
- //constraints.gridy += 1;
627728 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628729 boxCB.setToolTipText("Display bounding boxes");
629730 boxCB.addItemListener(this);
630
- //constraints.gridy += 1;
731
+
631732 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632733 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633734 zoomBoxCB.addItemListener(this);
634735
736
+ if (true) // Globals.ADVANCED)
737
+ {
738
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
739
+ supportCB.setToolTipText("Enable rigging");
740
+ supportCB.addItemListener(this);
741
+
742
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
743
+ // localCB.addItemListener(this);
744
+
745
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
746
+ crowdCB.setToolTipText("Used for crowds");
747
+ crowdCB.addItemListener(this);
748
+
749
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
750
+ smoothCB.setToolTipText("Snapping delay");
751
+ smoothCB.addItemListener(this);
752
+
753
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
754
+ slowCB.setToolTipText("Smooth interpolation");
755
+ slowCB.addItemListener(this);
756
+
635757 // constraints.gridy += 1;
636758 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
637759 // speakerMocapCB.addItemListener(this);
....@@ -656,14 +778,20 @@
656778 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657779 // debugCB.addItemListener(this);
658780
659
- //constraints.gridy += 1;
660781 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
661782 oeilCB.addItemListener(this);
662783
663
- //constraints.gridy += 1;
664784 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665785 lookAtCB.setToolTipText("Look-at target");
666786 lookAtCB.addItemListener(this);
787
+
788
+ }
789
+
790
+ cGridBag fill = new cGridBag();
791
+
792
+ fill.preferredHeight = 200;
793
+
794
+ panel.add(fill);
667795
668796 }
669797
....@@ -678,6 +806,7 @@
678806 buttonGroup.add(radioButton);
679807 radioButton.doClick();
680808 }
809
+
681810 void SetupViews(ObjEditor oe)
682811 {
683812 oe.SetupViews();
....@@ -894,7 +1023,9 @@
8941023 // objEditor.DropFile((java.io.File[]) object, true);
8951024 // return;
8961025 // }
897
- if (string.charAt(0) == '/')
1026
+
1027
+ // File path for Mac and Windows
1028
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8981029 {
8991030 // file(s)
9001031 String[] names = string.split("\n");
....@@ -921,7 +1052,7 @@
9211052
9221053 flashIt = false;
9231054 CameraPane pane = (CameraPane) target;
924
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1055
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9251056 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9261057
9271058 if (group.selection.size() == 1)
....@@ -948,11 +1079,11 @@
9481079 {
9491080 loadClipboard(true);
9501081 objEditor.jTree.setSelectionPath(destinationPath);
951
- pasteInto(false);
1082
+ pasteInto(false, false);
9521083 } else {
9531084 loadClipboard(false);
9541085 objEditor.jTree.setSelectionPath(destinationPath);
955
- pasteInto(false); // true); // ???
1086
+ pasteInto(false, false); // true); // ???
9561087 }
9571088 }
9581089 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1074,27 +1205,33 @@
10741205 kleinItem.addActionListener(this);
10751206 particleItem = menu.add(new MenuItem("Particle system"));
10761207 particleItem.addActionListener(this);
1208
+ if (Globals.ADVANCED)
1209
+ {
10771210 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10781211 ragdollItem.addActionListener(this);
10791212 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10801213 ragdoll2Item.addActionListener(this);
1214
+ }
10811215 menu.add("-");
1082
- meshItem = menu.add(new MenuItem("Mesh"));
1216
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10831217 meshItem.addActionListener(this);
10841218 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10851219 // meshGroupItem.addActionListener(this);
1220
+ if (Globals.ADVANCED)
1221
+ {
10861222 springItem = menu.add(new MenuItem("Spring"));
10871223 springItem.addActionListener(this);
10881224 flagItem = menu.add(new MenuItem("Flag"));
10891225 flagItem.addActionListener(this);
1090
- bezierItem = menu.add(new MenuItem("Patch"));
1091
- bezierItem.addActionListener(this);
1092
- checkerItem = menu.add(new MenuItem("Checker"));
1093
- checkerItem.addActionListener(this);
10941226 blobItem = menu.add(new MenuItem("Blob"));
10951227 blobItem.addActionListener(this);
10961228 latheItem = menu.add(new MenuItem("Lathe"));
10971229 latheItem.addActionListener(this);
1230
+ }
1231
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1232
+ bezierItem.addActionListener(this);
1233
+ overlayItem = menu.add(new MenuItem("Overlay"));
1234
+ overlayItem.addActionListener(this);
10981235 lightItem = menu.add(new MenuItem("Light"));
10991236 lightItem.addActionListener(this);
11001237 menu.add("-");
....@@ -1104,34 +1241,39 @@
11041241 loopItem.addActionListener(this);
11051242 doubleItem = menu.add(new MenuItem("Fork"));
11061243 doubleItem.addActionListener(this);
1244
+ if (Globals.ADVANCED)
1245
+ {
11071246 tripleItem = menu.add(new MenuItem("Trident"));
11081247 tripleItem.addActionListener(this);
1248
+ }
11091249 }
11101250
11111251 void buildToolsMenu(Menu menu)
11121252 {
11131253 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11141254 animationItem.addItemListener(this);
1115
- animationItem.setState(CameraPane.ANIMATION);
1255
+ animationItem.setState(Globals.ANIMATION);
11161256
11171257 menu.add("-");
11181258 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11191259 parseverticesItem.addActionListener(this);
11201260 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11211261 textureFieldItem.addActionListener(this);
1122
- alignItem = menu.add(new MenuItem("Align"));
1262
+ alignItem = menu.add(new MenuItem("Align Objects"));
11231263 alignItem.addActionListener(this);
1124
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1125
- mirrorItem.addActionListener(this);
11261264 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11271265 reduceMorphItem.addActionListener(this);
11281266 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11291267 reduce34MorphItem.addActionListener(this);
1130
-
1268
+ menu.add("-");
11311269 menu.add(computeAOItem = new MenuItem("Compute AO"));
11321270 computeAOItem.addActionListener(this);
1133
- menu.add("-");
11341271
1272
+ if (Globals.ADVANCED)
1273
+ {
1274
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1275
+ mirrorItem.addActionListener(this);
1276
+ menu.add("-");
11351277 menu.add(memoryItem = new MenuItem("Memory Usage"));
11361278 memoryItem.addActionListener(this);
11371279 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1154,6 +1296,7 @@
11541296 menu.add("-");
11551297 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11561298 editScriptItem.addActionListener(this);
1299
+ }
11571300 }
11581301
11591302 void ScreenFit()
....@@ -1482,9 +1625,9 @@
14821625
14831626 void Overwrite(int mask)
14841627 {
1485
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1628
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14861629 {
1487
- Object3D content = GrafreeD.clipboard.get(0);
1630
+ Object3D content = Grafreed.clipboard.get(0);
14881631
14891632 if (content instanceof cGroup && ((cGroup)content).transientlink )
14901633 content = ((cGroup)content).get(0);
....@@ -1655,7 +1798,7 @@
16551798 {
16561799 makeSomething(new BezierSurface());
16571800 } else
1658
- if (source == checkerItem)
1801
+ if (source == overlayItem)
16591802 {
16601803 /*
16611804 Object3D obj = new BezierSurface(5,8);
....@@ -1789,23 +1932,6 @@
17891932 csg.addChild(child);
17901933 child.addChild(csg);
17911934 } else
1792
-
1793
- if (source == importGFDItem)
1794
- {
1795
- ImportGFD();
1796
- } else
1797
- if (source == importVRMLX3DItem)
1798
- {
1799
- ImportVRMLX3D();
1800
- } else
1801
- if (source == import3DSItem)
1802
- {
1803
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1804
- } else
1805
- if (source == importOBJItem)
1806
- {
1807
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1808
- } else
18091935 if (source == computeAOItem)
18101936 {
18111937 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1824,7 +1950,7 @@
18241950 if (source == invariantsItem)
18251951 {
18261952 System.out.println("Invariants:");
1827
- GrafreeD.grafreeD.universe.invariants();
1953
+ Grafreed.grafreeD.universe.invariants();
18281954 } else
18291955 if (source == memoryItem)
18301956 {
....@@ -1842,6 +1968,23 @@
18421968 if (source == dumpItem)
18431969 {
18441970 DumpObject();
1971
+ } else
1972
+ if (source == undoButton)
1973
+ {
1974
+ Undo();
1975
+ } else
1976
+ if (source == redoButton)
1977
+ {
1978
+ Redo();
1979
+ } else
1980
+ if (source == saveButton)
1981
+ {
1982
+ Save();
1983
+ } else
1984
+ if (source == oneStepButton)
1985
+ {
1986
+ Globals.ONESTEP = true;
1987
+ cameraView.repaint();
18451988 } else
18461989 if (source == screenfitButton)
18471990 {
....@@ -1892,12 +2035,20 @@
18922035 {
18932036 loadClipboard(true);
18942037 } else
2038
+ if (source == undoItem)
2039
+ {
2040
+ Undo();
2041
+ } else
2042
+ if (source == redoItem)
2043
+ {
2044
+ Redo();
2045
+ } else
18952046 if (source == duplicateItem)
18962047 {
1897
- Object3D keep = GrafreeD.clipboard;
2048
+ Object3D keep = Grafreed.clipboard;
18982049 loadClipboard(false);
18992050 paste(false);
1900
- GrafreeD.clipboard = keep;
2051
+ Grafreed.clipboard = keep;
19012052 } else
19022053 if (source == cloneItem)
19032054 {
....@@ -1915,13 +2066,17 @@
19152066 {
19162067 paste(false);
19172068 } else
2069
+ if (source == pasteIntoItem)
2070
+ {
2071
+ pasteInto(true, false);
2072
+ } else
19182073 if (source == pasteLinkItem)
19192074 {
1920
- pasteInto(false);
2075
+ pasteInto(false, false);
19212076 } else
19222077 if (source == pasteCloneItem)
19232078 {
1924
- pasteInto(true);
2079
+ pasteInto(true, true);
19252080 } else
19262081 if (source == pasteExpandItem)
19272082 {
....@@ -2113,9 +2268,9 @@
21132268 // group.selection.get(0).setMasterThis(content); // should be identity
21142269 // refreshContents();
21152270 // }
2116
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2271
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21172272 {
2118
- Object3D content = GrafreeD.clipboard.get(0);
2273
+ Object3D content = Grafreed.clipboard.get(0);
21192274
21202275 if (content instanceof cGroup && ((cGroup)content).transientlink )
21212276 content = ((cGroup)content).get(0);
....@@ -2123,11 +2278,11 @@
21232278 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21242279 for (int i=0; i<group.selection.size(); i++)
21252280 {
2126
- boolean random = CameraPane.RANDOM;
2127
- CameraPane.RANDOM = false; // parse all random nodes
2281
+ boolean random = CameraPane.SWITCH;
2282
+ CameraPane.SWITCH = false; // parse all random nodes
21282283 group.selection.get(i).linkVerticesThis(content);
21292284 // group.selection.get(i).setMasterThis(content); // should be identity
2130
- CameraPane.RANDOM = random;
2285
+ CameraPane.SWITCH = random;
21312286 }
21322287 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21332288 refreshContents();
....@@ -2137,20 +2292,20 @@
21372292 {
21382293 for (int i=0; i<group.selection.size(); i++)
21392294 {
2140
- boolean random = CameraPane.RANDOM;
2141
- CameraPane.RANDOM = false; // parse all random nodes
2295
+ boolean random = CameraPane.SWITCH;
2296
+ CameraPane.SWITCH = false; // parse all random nodes
21422297 group.selection.get(i).linkVerticesThis(null);
2143
- CameraPane.RANDOM = random;
2298
+ CameraPane.SWITCH = random;
21442299 }
21452300
21462301 refreshContents();
21472302 } else
21482303 if (source == relinkverticesItem)
21492304 {
2150
- boolean random = CameraPane.RANDOM;
2151
- CameraPane.RANDOM = false; // parse all random nodes
2305
+ boolean random = CameraPane.SWITCH;
2306
+ CameraPane.SWITCH = false; // parse all random nodes
21522307 group.selection.RelinkToSupport();
2153
- CameraPane.RANDOM = random;
2308
+ CameraPane.SWITCH = random;
21542309
21552310 refreshContents();
21562311 } else
....@@ -2165,9 +2320,9 @@
21652320 } else
21662321 if (source == setMasterItem)
21672322 {
2168
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2323
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21692324 {
2170
- Object3D content = GrafreeD.clipboard.get(0);
2325
+ Object3D content = Grafreed.clipboard.get(0);
21712326
21722327 if (content instanceof cGroup && ((cGroup)content).transientlink )
21732328 content = ((cGroup)content).get(0);
....@@ -2180,9 +2335,9 @@
21802335 {
21812336 if (group.selection.size() == 1)
21822337 {
2183
- if (GrafreeD.clipboard.size() == 1)
2338
+ if (Grafreed.clipboard.size() == 1)
21842339 {
2185
- Object3D content = GrafreeD.clipboard.get(0);
2340
+ Object3D content = Grafreed.clipboard.get(0);
21862341
21872342 if (content instanceof cGroup && ((cGroup)content).transientlink )
21882343 content = ((cGroup)content).get(0);
....@@ -2199,7 +2354,7 @@
21992354 {
22002355 RevertMeshes();
22012356 } else
2202
- if (source == resetMeshItem)
2357
+ if (source == resetAllItem)
22032358 {
22042359 ResetAll();
22052360 } else
....@@ -2248,7 +2403,7 @@
22482403 RandomNode random = new RandomNode();
22492404 group(random);
22502405 if (random.size() > 0)
2251
- random.name = random.get(0).name + "Rnd";
2406
+ random.name = random.get(0).name + "Switch";
22522407 } else
22532408 if (source == physicsItem)
22542409 {
....@@ -2537,9 +2692,13 @@
25372692 {
25382693 SmoothMesh();
25392694 } else
2540
- if (source == transformgeometryItem)
2695
+ if (source == transformGeometryItem)
25412696 {
25422697 TransformGeometry();
2698
+ } else
2699
+ if (source == transformChildrenItem)
2700
+ {
2701
+ TransformChildren();
25432702 } else
25442703 if (source == resetTransformItem)
25452704 {
....@@ -2547,7 +2706,11 @@
25472706 } else
25482707 if (source == resetCentroidItem)
25492708 {
2550
- ResetCentroid();
2709
+ ResetCentroid(true);
2710
+ } else
2711
+ if (source == resetCentroidXZItem)
2712
+ {
2713
+ ResetCentroid(false);
25512714 } else
25522715 if (source == resetParentItem)
25532716 {
....@@ -2903,9 +3066,9 @@
29033066 child.CloseUI();
29043067 listUI.remove(child);
29053068
2906
- child.editWindow = null; // ???????????
3069
+ //child.editWindow = null; // ???????????
29073070 }
2908
- objEditor.ctrlPanel.validate();
3071
+ objEditor.ctrlPanel.FlushUI();
29093072 //objEditor.jTree.clearSelection();
29103073 //objEditor.ResetSliders();
29113074 refreshContents(true);
....@@ -2989,7 +3152,10 @@
29893152 frontView.object = group;
29903153 sideView.object = group;
29913154 }
3155
+
3156
+// fix "+" issue
29923157 group.editWindow = this;
3158
+
29933159 /*
29943160 currentLayout = radio.layout;
29953161 if (currentLayout == null)
....@@ -3002,7 +3168,20 @@
30023168 //group.attributes = -1;
30033169 ResetModel();
30043170 refreshContents(true);
3005
- }
3171
+ } else if (event.getSource() == editCameraItem)
3172
+ {
3173
+ cameraView.ProtectCamera();
3174
+ cameraView.repaint();
3175
+ return;
3176
+ } else if (event.getSource() == revertCameraItem)
3177
+ {
3178
+ cameraView.RevertCamera();
3179
+ cameraView.repaint();
3180
+ return;
3181
+ // } else if (event.getSource() == textureButton)
3182
+ // {
3183
+ // return; // true;
3184
+ }
30063185 else
30073186 {
30083187 //return super.action(event, arg);
....@@ -3063,6 +3242,28 @@
30633242 refreshContents();
30643243 }
30653244
3245
+ void TransformChildren()
3246
+ {
3247
+ Object3D obj;
3248
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3249
+ {
3250
+ obj = (Object3D)e.nextElement();
3251
+ obj.KeepTextureMatrices();
3252
+ obj.TransformChildren();
3253
+ obj.RestoreTextureMatrices();
3254
+
3255
+// if (obj.parent == null)
3256
+// {
3257
+// System.out.println("NULL PARENT!");
3258
+// new Exception().printStackTrace();
3259
+// }
3260
+// else
3261
+// TouchTransform(obj);
3262
+// //obj.parent.Touch();
3263
+ }
3264
+
3265
+ refreshContents();
3266
+ }
30663267
30673268 void ResetTransform()
30683269 {
....@@ -3175,7 +3376,7 @@
31753376 refreshContents();
31763377 }
31773378
3178
- void ResetCentroid()
3379
+ void ResetCentroid(boolean full)
31793380 {
31803381 Object3D obj;
31813382 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3190,12 +3391,16 @@
31903391 LA.matIdentity(Object3D.mat);
31913392 obj.getBounds(minima, maxima, false);
31923393 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3193
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3394
+ if (full)
3395
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31943396 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31953397 obj.TransformMesh(Object3D.mat);
3398
+
31963399 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3197
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3400
+ if (full)
3401
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31983402 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3403
+
31993404 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32003405 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32013406 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3224,7 +3429,8 @@
32243429
32253430 int size = obj.MemorySize();
32263431
3227
- System.err.println((size/1024) + " KB is the size of " + obj);
3432
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3433
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32283434 }
32293435 }
32303436 catch (Exception e)
....@@ -3261,9 +3467,9 @@
32613467 obj = (Object3D)e.nextElement();
32623468
32633469 System.out.println("Object is: " + obj);
3264
- GrafreeD.AnalyzeObject(obj);
3470
+ Grafreed.AnalyzeObject(obj);
32653471 System.out.println("Boundary rep: " + obj.bRep);
3266
- GrafreeD.AnalyzeObject(obj.bRep);
3472
+ Grafreed.AnalyzeObject(obj.bRep);
32673473
32683474 // System.err.println((size/1024) + " KB is the size of " + obj);
32693475 }
....@@ -3477,8 +3683,8 @@
34773683
34783684 void ParseVertices()
34793685 {
3480
- boolean epsequal = GrafreeD.epsequal;
3481
- GrafreeD.epsequal = true;
3686
+ boolean epsequal = Grafreed.epsequal;
3687
+ Grafreed.epsequal = true;
34823688
34833689 for (int i=0; i<group.selection.size(); i++)
34843690 {
....@@ -3503,7 +3709,7 @@
35033709 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35043710 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35053711
3506
- g.add(GrafreeD.clipboard);
3712
+ g.add(Grafreed.clipboard);
35073713
35083714 buffer.add(g);
35093715 }
....@@ -3518,7 +3724,7 @@
35183724 makeSomething(buffer, i==group.selection.size()-1);
35193725 }
35203726
3521
- GrafreeD.epsequal = epsequal;
3727
+ Grafreed.epsequal = epsequal;
35223728
35233729 refreshContents();
35243730 }
....@@ -3536,7 +3742,16 @@
35363742 String pigment = Object3D.GetPigment(tex);
35373743 //String bump = Object3D.GetBump(tex);
35383744
3539
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3745
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3746
+
3747
+ try
3748
+ {
3749
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3750
+ }
3751
+ catch (Exception e)
3752
+ {
3753
+ System.err.println("FAIL: " + node);
3754
+ }
35403755
35413756 double s = v.s;
35423757
....@@ -3624,11 +3839,11 @@
36243839
36253840 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36263841
3627
- boolean random = CameraPane.RANDOM;
3628
- CameraPane.RANDOM = false; // parse all random nodes
3842
+ boolean random = CameraPane.SWITCH;
3843
+ CameraPane.SWITCH = false; // parse all random nodes
36293844 lowres.linkVerticesThis(null);
36303845 lowres.linkVerticesThis(sn);
3631
- CameraPane.RANDOM = random;
3846
+ CameraPane.SWITCH = random;
36323847
36333848 System.err.flush();
36343849
....@@ -3668,7 +3883,7 @@
36683883 return;
36693884
36703885 Object3D poses = group.selection.get(0);
3671
- Object3D ref = GrafreeD.clipboard.get(0);
3886
+ Object3D ref = Grafreed.clipboard.get(0);
36723887
36733888 Object3D newgroup = new Object3D("Po:" + poses.name);
36743889
....@@ -3862,9 +4077,9 @@
38624077
38634078 void ClipMesh()
38644079 {
3865
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4080
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38664081 {
3867
- Object3D content = GrafreeD.clipboard.get(0);
4082
+ Object3D content = Grafreed.clipboard.get(0);
38684083
38694084 if (content instanceof cGroup && ((cGroup)content).transientlink )
38704085 content = ((cGroup)content).get(0);
....@@ -3873,7 +4088,7 @@
38734088 // {
38744089 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38754090 // }
3876
- group.selection.ClipMesh(GrafreeD.clipboard);
4091
+ group.selection.ClipMesh(Grafreed.clipboard);
38774092 }
38784093 // group.selection.ClipMesh(GrafreeD.clipboard);
38794094 System.out.println("DONE.");
....@@ -4008,7 +4223,7 @@
40084223 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40094224
40104225 Object3D elem = (Object3D)group.selection.elementAt(i);
4011
- if(elem != group)
4226
+ if(elem != group || !newWindow)
40124227 {
40134228 // if (!(elem instanceof Composite))
40144229 // newWindow = false;
....@@ -4113,23 +4328,26 @@
41134328 System.err.println("info : " + child.GetPath());
41144329 }
41154330 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4331
+// else
4332
+// {
4333
+// objEditor.SetMaterial(group); // .GetMaterial());
4334
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4335
+// System.err.println("info : " + group.GetPath());
4336
+// }
41224337
41234338 objEditor.SetText(); // jan 2014
41244339
4125
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4340
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41264341 CameraPane.flash = true;
41274342
4128
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4343
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41294344 // a camera
41304345 {
4131
- CameraPane.camerachangeframe = 0; // don't refuse it
4132
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4346
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4347
+ {
4348
+ CameraPane.camerachangeframe = 0; // don't refuse it
4349
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4350
+ }
41334351 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41344352 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41354353 }
....@@ -4213,16 +4431,18 @@
42134431 {
42144432 if (group.selection.isEmpty())
42154433 return;
4216
- GrafreeD.clipboardIsTempGroup = false;
4434
+
4435
+ Grafreed.clipboardIsTempGroup = false;
42174436 Composite tGroup = null;
42184437 if (group.selection.size() > 0) // 1)
42194438 {
42204439 tGroup = new cGroup();
4221
- GrafreeD.clipboardIsTempGroup = true;
4440
+ Grafreed.clipboardIsTempGroup = true;
42224441 }
42234442
42244443 if (cut)
42254444 {
4445
+ Save();
42264446 //int indices[] = jList.getSelectedIndices();
42274447 //for (int i = indices.length - 1; i >= 0; i--)
42284448 //jList.remove(indices[i]);
....@@ -4258,16 +4478,16 @@
42584478 //System.out.println("cut " + child);
42594479 //System.out.println("parent = " + child.parent);
42604480 // tmp.addChild(child);
4261
- if (GrafreeD.clipboardIsTempGroup)
4481
+ if (Grafreed.clipboardIsTempGroup)
42624482 tGroup.add/*Child*/(tmp);
42634483 else
4264
- GrafreeD.clipboard = tmp;
4484
+ Grafreed.clipboard = tmp;
42654485 }
42664486 else
4267
- if (GrafreeD.clipboardIsTempGroup)
4487
+ if (Grafreed.clipboardIsTempGroup)
42684488 tGroup.add/*Child*/(child);
42694489 else
4270
- GrafreeD.clipboard = child;
4490
+ Grafreed.clipboard = child;
42714491 }
42724492
42734493 //ResetModel();
....@@ -4299,21 +4519,23 @@
42994519 //System.out.println("cut " + elem);
43004520 //System.out.println("parent = " + elem.parent);
43014521 // tmp.addChild(elem);
4302
- if (GrafreeD.clipboardIsTempGroup)
4522
+ if (Grafreed.clipboardIsTempGroup)
43034523 tGroup.add/*Child*/(tmp);
43044524 else
4305
- GrafreeD.clipboard = tmp;
4525
+ Grafreed.clipboard = tmp;
43064526 }
43074527 else
4308
- if (GrafreeD.clipboardIsTempGroup)
4528
+ if (Grafreed.clipboardIsTempGroup)
43094529 tGroup.add/*Child*/(child);
43104530 else
4311
- GrafreeD.clipboard = child;
4531
+ Grafreed.clipboard = child;
43124532 }
43134533
43144534 }
4315
- if (GrafreeD.clipboardIsTempGroup)
4316
- GrafreeD.clipboard = tGroup;
4535
+
4536
+ if (Grafreed.clipboardIsTempGroup)
4537
+ Grafreed.clipboard = tGroup;
4538
+
43174539 if (cut)
43184540 {
43194541 ResetModel();
....@@ -4327,7 +4549,7 @@
43274549 // return;
43284550 boolean first = true;
43294551
4330
- if (GrafreeD.clipboardIsTempGroup)
4552
+ if (Grafreed.clipboardIsTempGroup)
43314553 {
43324554 Composite temp;
43334555
....@@ -4338,7 +4560,7 @@
43384560 temp = (Composite)Applet3D.clipboard.deepCopy();
43394561 */
43404562 Object3D elem;
4341
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4563
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43424564 {
43434565 Object3D child = (Object3D)e.nextElement();
43444566
....@@ -4372,21 +4594,21 @@
43724594 //Object3D cb = Applet3D.clipboard;
43734595 //temp.addChild(cb);
43744596 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4375
- assert(GrafreeD.clipboard.parent == null);
4376
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4377
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4378
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4379
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4597
+ assert(Grafreed.clipboard.parent == null);
4598
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4599
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4600
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4601
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43804602 else
4381
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4382
- GrafreeD.clipboard.get(0).parent = keepparent;
4603
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4604
+ Grafreed.clipboard.get(0).parent = keepparent;
43834605 }
43844606
43854607 ResetModel();
43864608 refreshContents();
43874609 }
43884610
4389
- void pasteInto(boolean copyit)
4611
+ void pasteInto(boolean copyit, boolean clone)
43904612 {
43914613 // if (GrafreeD.clipboard == null)
43924614 // return;
....@@ -4415,15 +4637,22 @@
44154637 if (copyit)
44164638 {
44174639 // paste(false);
4418
- CloneClipboard(false); // sept 2014
4640
+ if (clone)
4641
+ {
4642
+ CloneClipboard(false); // sept 2014
4643
+ }
4644
+ else
4645
+ {
4646
+ paste(false);
4647
+ }
44194648 }
44204649 else
44214650 {
44224651 boolean first = true;
44234652
4424
- if (GrafreeD.clipboardIsTempGroup)
4653
+ if (Grafreed.clipboardIsTempGroup)
44254654 {
4426
- Composite temp = (Composite)GrafreeD.clipboard;
4655
+ Composite temp = (Composite)Grafreed.clipboard;
44274656 Object3D copy;
44284657 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44294658 {
....@@ -4433,7 +4662,7 @@
44334662 }
44344663 } else
44354664 {
4436
- linkSomething(GrafreeD.clipboard); //.get(0));
4665
+ linkSomething(Grafreed.clipboard); //.get(0));
44374666 }
44384667 }
44394668 }
....@@ -4838,21 +5067,6 @@
48385067 }
48395068 */
48405069
4841
- void ImportGFD()
4842
- {
4843
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4844
- browser.show();
4845
- String filename = browser.getFile();
4846
- if (filename != null && filename.length() > 0)
4847
- {
4848
- String fullname = browser.getDirectory() + filename;
4849
-
4850
- //Object3D readobj =
4851
- objEditor.ReadGFD(fullname, objEditor);
4852
- //makeSomething(readobj);
4853
- }
4854
- }
4855
-
48565070 /*
48575071 public void Callback(Object obj)
48585072 {
....@@ -4876,26 +5090,9 @@
48765090 }
48775091 */
48785092
4879
- void ImportVRMLX3D()
4880
- {
4881
- if (GrafreeD.standAlone)
4882
- {
4883
- /**/
4884
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4885
- browser.show();
4886
- String filename = browser.getFile();
4887
- if (filename != null && filename.length() > 0)
4888
- {
4889
- String fullname = browser.getDirectory() + filename;
4890
- LoadVRMLX3D(fullname);
4891
- }
4892
- /**/
4893
- }
4894
- }
4895
-
48965093 String GetFile(String dialogName)
48975094 {
4898
- if (GrafreeD.standAlone)
5095
+ if (Grafreed.standAlone)
48995096 {
49005097 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49015098 browser.show();
....@@ -4959,10 +5156,15 @@
49595156 cButton flashSelectionButton;
49605157 cButton editButton;
49615158 cButton uneditButton;
5159
+ JCheckBox allParamsButton;
49625160 cButton clearpanelButton;
4963
- cButton allParamsButton;
49645161 cButton unselectButton;
49655162
5163
+ cButton saveButton;
5164
+ cButton undoButton;
5165
+ cButton redoButton;
5166
+ cButton oneStepButton;
5167
+
49665168 cButton screenfitButton;
49675169 cButton screenfitpointButton;
49685170 cButton snapobjectButton;
....@@ -4993,6 +5195,8 @@
49935195 private MenuItem lookFromItem;
49945196 private MenuItem switchItem;
49955197 private MenuItem cutItem;
5198
+ private MenuItem undoItem;
5199
+ private MenuItem redoItem;
49965200 private MenuItem duplicateItem;
49975201 private MenuItem cloneItem;
49985202 private MenuItem cloneSupportItem;
....@@ -5006,7 +5210,7 @@
50065210 private MenuItem linkverticesItem;
50075211 private MenuItem relinkverticesItem;
50085212 private MenuItem setMasterItem;
5009
- private MenuItem resetMeshItem;
5213
+ private MenuItem resetAllItem;
50105214 private MenuItem stepAllItem;
50115215 private MenuItem revertMeshItem;
50125216 private MenuItem poseMeshItem;
....@@ -5017,6 +5221,7 @@
50175221 private MenuItem mergeGeometriesItem;
50185222 private MenuItem copyItem;
50195223 private MenuItem pasteItem;
5224
+ private MenuItem pasteIntoItem;
50205225 private MenuItem pasteLinkItem;
50215226 private MenuItem pasteCloneItem;
50225227 private MenuItem pasteExpandItem;
....@@ -5066,8 +5271,10 @@
50665271 private MenuItem panoTexturesItem;
50675272
50685273 private MenuItem resetCentroidItem;
5069
- private MenuItem transformgeometryItem;
5274
+ private MenuItem resetCentroidXZItem;
50705275 private MenuItem resetTransformItem;
5276
+ private MenuItem transformGeometryItem;
5277
+ private MenuItem transformChildrenItem;
50715278 private MenuItem hideItem;
50725279 private MenuItem grabItem;
50735280 private MenuItem backItem;
....@@ -5114,7 +5321,7 @@
51145321 private MenuItem blobItem;
51155322 private MenuItem latheItem;
51165323 private MenuItem bezierItem;
5117
- private MenuItem checkerItem;
5324
+ private MenuItem overlayItem;
51185325 private MenuItem meshItem;
51195326 // private MenuItem meshGroupItem;
51205327 private MenuItem springItem;
....@@ -5136,11 +5343,6 @@
51365343 private MenuItem doubleItem;
51375344 private MenuItem tripleItem;
51385345
5139
- private MenuItem importGFDItem;
5140
- private MenuItem importVRMLX3DItem;
5141
- private MenuItem import3DSItem;
5142
- private MenuItem importOBJItem;
5143
-
51445346 private MenuItem computeAOItem;
51455347 private MenuItem recompileItem;
51465348 private MenuItem editScriptItem;
....@@ -5150,4 +5352,8 @@
51505352 private MenuItem analyzeItem;
51515353 private MenuItem dumpItem;
51525354 //boolean freezemodel = false;
5355
+
5356
+ Menu cameraMenu;
5357
+ MenuItem editCameraItem;
5358
+ MenuItem revertCameraItem;
51535359 }