Normand Briere
2019-06-24 47cd0f0a3870d843cb758535316060d30f15c811
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,131 @@
148148
149149 //JTextField nameField;
150150
151
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
152152 {
153
+ oe.jTree = new cTree();
154
+
155
+ Menu menu;
156
+ oe.menuBar.add(menu = new Menu("Edit"));
157
+ //editItem = menu.add(new MenuItem("Edit"));
158
+ //editItem.addActionListener(this);
159
+
160
+// undoItem = menu.add(new MenuItem("Undo"));
161
+// undoItem.addActionListener(this);
162
+// redoItem = menu.add(new MenuItem("Redo"));
163
+// redoItem.addActionListener(this);
164
+// menu.add("-");
165
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
166
+ duplicateItem.addActionListener(this);
167
+ cloneItem = menu.add(new MenuItem("Clone"));
168
+ cloneItem.addActionListener(this);
169
+ if (Globals.ADVANCED)
170
+ {
171
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
172
+ cloneSupportItem.addActionListener(this);
173
+ }
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
+
182
+ menu.add("-");
183
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
184
+ pasteIntoItem.addActionListener(this);
185
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
186
+ pasteLinkItem.addActionListener(this);
187
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
188
+ pasteCloneItem.addActionListener(this);
189
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
190
+// pasteExpandItem.addActionListener(this);
191
+ menu.add("-");
192
+ clearItem = menu.add(new MenuItem("Clear"));
193
+ clearItem.addActionListener(this);
194
+
195
+ if (Globals.ADVANCED)
196
+ {
197
+ // Deletes the cameras...
198
+ clearAllItem = menu.add(new MenuItem("Clear All"));
199
+ clearAllItem.addActionListener(this);
200
+ }
201
+
202
+ menuBar.add(cameraMenu = new Menu("View"));
203
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
204
+ //zBufferItem.addActionListener(this);
205
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
206
+ //normalLensItem.addActionListener(this);
207
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
208
+ revertCameraItem.addActionListener(this);
209
+
210
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
211
+ toggleFullScreenItem.addItemListener(this);
212
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
213
+ cameraMenu.add("-");
214
+
215
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
216
+ toggleTextureItem.addItemListener(this);
217
+ toggleTextureItem.setState(CameraPane.textureon);
218
+
219
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
220
+ toggleSwitchItem.addItemListener(this);
221
+ toggleSwitchItem.setState(CameraPane.SWITCH);
222
+
223
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
224
+ toggleHandleItem.addItemListener(this);
225
+ toggleHandleItem.setState(CameraPane.HANDLES);
226
+
227
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
228
+ togglePaintItem.addItemListener(this);
229
+ togglePaintItem.setState(CameraPane.PAINTMODE);
230
+
231
+ if (Globals.ADVANCED)
232
+ {
233
+ cameraMenu.add("-");
234
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
235
+ toggleLiveItem.addItemListener(this);
236
+ toggleLiveItem.setState(Globals.isLIVE());
237
+
238
+ cameraMenu.add(stepItem = new MenuItem("Step"));
239
+ stepItem.addActionListener(this);
240
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
241
+ // toggleDLItem.addItemListener(this);
242
+ // toggleDLItem.setState(false);
243
+
244
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
245
+ toggleRenderItem.addItemListener(this);
246
+ toggleRenderItem.setState(!CameraPane.frozen);
247
+
248
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
249
+ toggleDebugItem.addItemListener(this);
250
+ toggleDebugItem.setState(Globals.DEBUG);
251
+
252
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
253
+ toggleFrustumItem.addItemListener(this);
254
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
255
+
256
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
257
+ toggleFootContactItem.addItemListener(this);
258
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
259
+
260
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
261
+ toggleTimelineItem.addItemListener(this);
262
+ }
263
+
264
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
265
+// toggleRootItem.addItemListener(this);
266
+// toggleRootItem.setState(false);
267
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
268
+// animationItem.addItemListener(this);
269
+// animationItem.setState(CameraPane.ANIMATION);
270
+ cameraMenu.add("-");
271
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
272
+ editCameraItem.addActionListener(this);
273
+
274
+ if (Globals.ADVANCED)
275
+ {
153276 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
154277 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
155278 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -161,45 +284,17 @@
161284 lookAtItem.addActionListener(this);
162285 //lookFromItem.addActinoListener(this);
163286 //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
-
287
+ }
288
+
193289 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);
290
+ if (Globals.ADVANCED)
291
+ {
198292 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
199293 revertMeshItem.addActionListener(this);
200294 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201295 resetreferencesItem.addActionListener(this);
202296 menu.add("-");
297
+ }
203298 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204299 overwriteGeoItem.addActionListener(this);
205300 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,19 +306,26 @@
211306 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212307 overwriteUVItem.addActionListener(this);
213308 menu.add("-");
309
+ if (Globals.ADVANCED)
310
+ {
214311 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215312 generateMeshItem.addActionListener(this);
216313 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217314 poseMeshItem.addActionListener(this);
218315 menu.add("-");
316
+ }
219317 resetsupportItem = menu.add(new MenuItem("Reset support"));
220318 resetsupportItem.addActionListener(this);
221319 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222320 linkverticesItem.addActionListener(this);
223321 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224322 relinkverticesItem.addActionListener(this);
323
+
324
+ if (Globals.ADVANCED)
325
+ {
225326 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226327 setMasterItem.addActionListener(this);
328
+ }
227329
228330 oe.menuBar.add(menu = new Menu("Group"));
229331 grabItem = menu.add(new MenuItem("Grab"));
....@@ -234,27 +336,38 @@
234336 frontItem.addActionListener(this);
235337 compositeItem = menu.add(new MenuItem("Composite"));
236338 compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
339
+
340
+ if (Globals.ADVANCED)
341
+ {
342
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238343 hideItem.addActionListener(this);
344
+ }
239345 ungroupItem = menu.add(new MenuItem("Ungroup"));
240346 ungroupItem.addActionListener(this);
347
+
241348 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
349
+
350
+ randomItem = menu.add(new MenuItem("Switch node"));
243351 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);
352
+ if (Globals.ADVANCED)
353
+ {
248354 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249355 switchGeoItem.addActionListener(this);
250356 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251357 switchTransfoItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
358
+ morphItem = menu.add(new MenuItem("Morph Group"));
253359 morphItem.addActionListener(this);
360
+
361
+ menu.add("-");
362
+ physicsItem = menu.add(new MenuItem("Physics"));
363
+ physicsItem.addActionListener(this);
364
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
365
+ frameselectorItem.addActionListener(this);
254366 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255367 scriptNodeItem.addActionListener(this);
256368 cameraItem = menu.add(new MenuItem("Camera"));
257369 cameraItem.addActionListener(this);
370
+ }
258371
259372 oe.menuBar.add(menu = new Menu("Object"));
260373 textureItem = menu.add(new MenuItem("Texture"));
....@@ -263,27 +376,35 @@
263376 billboardItem.addActionListener(this);
264377 csgItem = menu.add(new MenuItem("CSG"));
265378 csgItem.addActionListener(this);
266
- shadowXItem = menu.add(new MenuItem("Shadow X"));
379
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
267380 shadowXItem.addActionListener(this);
268
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
381
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
269382 shadowYItem.addActionListener(this);
270
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
383
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
271384 shadowZItem.addActionListener(this);
385
+ if (Globals.ADVANCED)
386
+ {
387
+ menu.add("-");
272388 linkerItem = menu.add(new MenuItem("Linker"));
273389 linkerItem.addActionListener(this);
274
- templateItem = menu.add(new MenuItem("Template"));
275
- templateItem.addActionListener(this);
276390 attributeItem = menu.add(new MenuItem("Attribute"));
277391 attributeItem.addActionListener(this);
392
+ templateItem = menu.add(new MenuItem("Template"));
393
+ templateItem.addActionListener(this);
278394 pointflowItem = menu.add(new MenuItem("Point Flow"));
279395 pointflowItem.addActionListener(this);
396
+ }
280397 menu.add("-");
281398 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282399 resetTransformItem.addActionListener(this);
283400 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
284401 resetCentroidItem.addActionListener(this);
285
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
286
- transformgeometryItem.addActionListener(this);
402
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
403
+ resetCentroidXZItem.addActionListener(this);
404
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
405
+ transformGeometryItem.addActionListener(this);
406
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
407
+ transformChildrenItem.addActionListener(this);
287408
288409 oe.menuBar.add(menu = new Menu("Geometry"));
289410 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -294,8 +415,11 @@
294415 genNormalsCADItem.addActionListener(this);
295416 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296417 genNormalsMESHItem.addActionListener(this);
418
+ if (Globals.ADVANCED)
419
+ {
297420 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298421 genNormalsMINEItem.addActionListener(this);
422
+ }
299423 stripifyItem = menu.add(new MenuItem("Stripify"));
300424 stripifyItem.addActionListener(this);
301425 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,23 +441,34 @@
317441 reduce34MeshItem.addActionListener(this);
318442 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319443 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322444 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323445 clipMeshItem.addActionListener(this);
446
+
447
+ if (Globals.ADVANCED)
448
+ {
449
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
450
+ smoothMeshItem.addActionListener(this);
451
+ }
324452
325453 oe.menuBar.add(menu = new Menu("Attributes"));
326454 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
327455 clearMaterialsItem.addActionListener(this);
456
+ resetAllItem = menu.add(new MenuItem("Reset All"));
457
+ resetAllItem.addActionListener(this);
458
+ stepAllItem = menu.add(new MenuItem("Step All"));
459
+ stepAllItem.addActionListener(this);
328460 menu.add("-");
329461 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
330462 liveleavesItem.addActionListener(this);
331463 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332464 unliveleavesItem.addActionListener(this);
465
+ if (Globals.ADVANCED)
466
+ {
333467 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334468 supportleavesItem.addActionListener(this);
335469 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336470 unsupportleavesItem.addActionListener(this);
471
+ }
337472 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338473 hideleavesItem.addActionListener(this);
339474 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -342,6 +477,14 @@
342477 markleavesItem.addActionListener(this);
343478 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
344479 unmarkleavesItem.addActionListener(this);
480
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
481
+ rewindleavesItem.addActionListener(this);
482
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
483
+ unrewindleavesItem.addActionListener(this);
484
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
485
+ randomleavesItem.addActionListener(this);
486
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
487
+ unrandomleavesItem.addActionListener(this);
345488 menu.add("-");
346489 flipVItem = menu.add(new MenuItem("Flip V"));
347490 flipVItem.addActionListener(this);
....@@ -377,35 +520,40 @@
377520 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378521 sortbynameItem.addActionListener(this);
379522 menu.add("-");
523
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
524
+ shareGeometriesItem.addActionListener(this);
525
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
526
+ mergeGeometriesItem.addActionListener(this);
527
+ if (Globals.ADVANCED)
528
+ {
529
+ // Pretty much the same as duplicate and clone.
380530 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381531 extractGeometriesItem.addActionListener(this);
382532 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
383533 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);
534
+ }
388535
389536 oe.menuBar.add(menu = new Menu("Insert"));
390537 buildCreateMenu(menu);
391538
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
-
403539 oe.menuBar.add(menu = new Menu("Tools"));
404540 buildToolsMenu(menu);
405541 }
406542
407543 void SetupUI2(ObjEditor oe)
408544 {
545
+ // June 2019
546
+ if (oe == null)
547
+ {
548
+ //super.SetupUI2(this);
549
+ //return;
550
+ }
551
+
552
+ if (copy != group)
553
+ {
554
+ //super.SetupUI2(this);
555
+ }
556
+
409557 //new Exception().printStackTrace();
410558
411559 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -434,110 +582,171 @@
434582 oe.radioPanel.add(dummyButton);
435583 oe.buttonGroup.add(dummyButton);
436584 */
437
- aConstraints.gridy += 1;
438
-
439585 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440586
441
- oe.aConstraints.gridwidth = 1;
442
- oe.aConstraints.gridx = 0;
587
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588
+ //minButton.setToolTipText("Minimize window");
589
+ //minButton.addActionListener(this);
443590
444
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
445
- liveCB.setToolTipText("Enabled animation");
591
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592
+ maxButton.setToolTipText("Maximize window");
593
+ maxButton.addActionListener(this);
594
+
595
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
+ fullButton.setToolTipText("Full-screen window");
597
+ fullButton.addActionListener(this);
598
+
599
+ oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
+ undoButton.setToolTipText("Undo changes");
601
+ undoButton.addActionListener(this);
602
+
603
+ oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
604
+ redoButton.setToolTipText("Redo changes");
605
+ redoButton.addActionListener(this);
606
+
607
+ oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ saveButton.setToolTipText("Save changes");
609
+ saveButton.addActionListener(this);
610
+
611
+ oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
612
+ liveCB.setToolTipText("Enable animation");
446613 liveCB.addItemListener(this);
447614
448
- oe.aConstraints.gridx += 1;
449
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
615
+ oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
+ oneStepButton.setToolTipText("Animate one step forward");
617
+ oneStepButton.addActionListener(this);
618
+
619
+ oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
620
+ fastCB.setToolTipText("Fast mode");
621
+ fastCB.addItemListener(this);
622
+
623
+ oe.toolboxPanel.Return();
624
+
625
+ oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
450626 trackCB.setToolTipText("Enable tracking");
451627 trackCB.addItemListener(this);
452628
453
- oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
629
+ oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
455630 screenfitButton.setToolTipText("Screen fit");
456631 screenfitButton.addActionListener(this);
457
- oe.aConstraints.gridx += 1;
632
+
458633 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
459634 // screenfitpointButton.addActionListener(this);
460
-// oe.aConstraints.gridx += 1;
461
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
462
- snapobjectButton.addActionListener(this);
463
- snapobjectButton.setToolTipText("Snap Object");
464
- oe.aConstraints.gridx += 1;
465635
466
- //aConstraints.gridx = 0;
467
- //aConstraints.gridy += 1;
468
- oe.aConstraints.weighty = 0;
469
- oe.aConstraints.gridwidth = 1;
470
-
471
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
472
- flashSelectionButton.setToolTipText("Show selection");
636
+ if (Globals.ADVANCED)
637
+ {
638
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ snapobjectButton.addActionListener(this);
640
+ snapobjectButton.setToolTipText("Snap Object");
641
+ }
642
+
643
+ oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644
+ flashSelectionButton.setToolTipText("Highlight selection");
473645 flashSelectionButton.addActionListener(this);
474646
475
- oe.toolbarPanel.add(new cButton(" ", false));
647
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
476648
477
- oe.aConstraints.gridx += 1;
478
- oe.aConstraints.weighty = 0;
479
- oe.aConstraints.gridwidth = 1;
480
-
481
- //
482
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
483650 twoButton.setToolTipText("Show center view only");
484651 twoButton.addActionListener(this);
485
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
652
+ this.fullscreenLayout = twoButton;
653
+
654
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
486655 fourButton.addActionListener(this);
487656 fourButton.setToolTipText("Show left panel only");
488
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
657
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
489658 sixButton.setToolTipText("2-column layout left");
490659 sixButton.addActionListener(this);
491
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
660
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
492661 threeButton.setToolTipText("2-column layout right");
493662 threeButton.addActionListener(this);
494
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
663
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
495664 sevenButton.setToolTipText("3-column layout");
496665 sevenButton.addActionListener(this);
497666 //
498667
499
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
500
- rootButton.setToolTipText("Edit object in new tab");
668
+ oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
669
+ rootButton.setToolTipText("Edit selection in new tab");
501670 rootButton.addActionListener(this);
502
- oe.aConstraints.gridx += 1;
503
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
671
+
672
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
504673 closeButton.setToolTipText("Close tab");
505674 closeButton.addActionListener(this);
506675 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
507676 //clearButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
509
-
510
- oe.aConstraints.gridx = 1; //
511
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
512
- editButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516677
517
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
678
+ // INSERT
679
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
680
+ gridButton.setToolTipText("Create grid");
681
+ gridButton.addActionListener(this);
682
+
683
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
684
+ boxButton.setToolTipText("Create box");
685
+ boxButton.addActionListener(this);
686
+
687
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688
+ sphereButton.setToolTipText("Create sphere");
689
+ sphereButton.addActionListener(this);
690
+
691
+ oe.toolboxPanel.Return();
692
+
693
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
694
+ coneButton.setToolTipText("Create cone");
695
+ coneButton.addActionListener(this);
696
+
697
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
698
+ torusButton.setToolTipText("Create torus");
699
+ torusButton.addActionListener(this);
700
+
701
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
702
+ superButton.setToolTipText("Create superellipsoid");
703
+ superButton.addActionListener(this);
704
+
705
+ if (Globals.ADVANCED)
706
+ {
707
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
708
+ kleinButton.setToolTipText("Create Klein bottle");
709
+ kleinButton.addActionListener(this);
710
+ }
711
+
712
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
713
+ particlesButton.setToolTipText("Create particle system");
714
+ particlesButton.addActionListener(this);
715
+
716
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
717
+ overlayButton.setToolTipText("Create overlay");
718
+ overlayButton.addActionListener(this);
719
+
720
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
721
+ lightButton.setToolTipText("Create light");
722
+ lightButton.addActionListener(this);
723
+
724
+ // EDIT panel
725
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
726
+ editButton.setToolTipText("Edit selection");
727
+ editButton.addActionListener(this);
728
+
729
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
730
+ uneditButton.setToolTipText("Unedit selection");
518731 uneditButton.addActionListener(this);
519732
520
- oe.aConstraints.gridx += 1;
521
- oe.aConstraints.weighty = 0;
522
- oe.aConstraints.gridwidth = 1;
523
-
524
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
525
- clearPanelButton.addActionListener(this);
526
-
527
- oe.aConstraints.gridx += 1;
528
- oe.aConstraints.weighty = 0;
529
- oe.aConstraints.gridwidth = 1;
530
-
531
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
733
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
734
+ allParamsButton.setToolTipText("Edit all params");
532735 allParamsButton.addActionListener(this);
533736
534
- oe.aConstraints.gridx += 1;
535
- oe.aConstraints.weighty = 0;
536
- oe.aConstraints.gridwidth = 1;
537
-
538
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
737
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
738
+ clearPanelButton.setToolTipText("Clear edit panel");
739
+ clearPanelButton.addActionListener(this);
740
+
741
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
742
+ unselectButton.setToolTipText("Unselect");
539743 unselectButton.addActionListener(this);
540744
745
+ editCommandsPanel.preferredHeight = 1;
746
+
747
+// oe.treePanel.add(commandsPanel);
748
+// oe.treePanel.Return();
749
+
541750 // oe.aConstraints.gridx += 1;
542751 // oe.aConstraints.weighty = 0;
543752 // oe.aConstraints.gridwidth = 1;
....@@ -549,40 +758,37 @@
549758 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
550759 // gcButton.addActionListener(this);
551760
552
- oe.aConstraints.gridx = 0;
553
- oe.aConstraints.gridy += 1;
554
-
555
- //ctrlPanel.add(objList = new List(5, true));
556
- oe.aConstraints.gridwidth = 100;
557
- // oe.aConstraints.gridheight = 100;
558
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
559
- oe.aConstraints.gridheight = 1;
560
- oe.aConstraints.weighty = 0.5;
561
- oe.aConstraints.gridx = 0;
562
- JScrollPane jSP;
761
+ cGridBag jSPPanel = new cGridBag();
762
+
763
+ JScrollPane jSP;
563764 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
564
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
765
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
565766 ResetModel();
566
- oe.aConstraints.weighty = 0.5;
567
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
568
- oe.aConstraints.gridy += 1;
569
- oe.aConstraints.gridwidth = 1;
767
+
768
+ oe.treePanel.add(jSPPanel);
769
+ oe.treePanel.Return();
570770
571
- oe.aConstraints.weighty = 0;
572
- oe.aConstraints.gridwidth = 2;
573
-
574
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
771
+ cGridBag copyOptionsPanel = new cGridBag();
772
+
773
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
774
+ colorCB.setToolTipText("Copy color when dropped");
575775 colorCB.addItemListener(this);
576
- oe.aConstraints.gridx += 2;
577
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
776
+
777
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
778
+ materialCB.setToolTipText("Copy material when dropped");
578779 materialCB.addItemListener(this);
579
- oe.aConstraints.gridx += 2;
580
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
780
+
781
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
782
+ textureCB.setToolTipText("Copy texture when dropped");
581783 textureCB.addItemListener(this);
582784
583
- oe.aConstraints.gridx = 0;
584
- oe.aConstraints.gridy += 1;
785
+ copyOptionsPanel.preferredHeight = 1;
786
+ oe.treePanel.add(copyOptionsPanel);
787
+ oe.treePanel.Return();
585788
789
+// mainPanel.setDividerLocation(0.5); //1.0);
790
+// mainPanel.setResizeWeight(0.5);
791
+
586792 //jList.addListSelectionListener(this);
587793 oe.jTree.addTreeSelectionListener(this);
588794 //jTree.setRootVisible(false);
....@@ -607,43 +813,35 @@
607813
608814 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
609815 {
610
- //constraints.gridx = 0;
611
- //constraints.gridy = 0;
612
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
613
- fastCB.setToolTipText("Fast mode");
614
- fastCB.addItemListener(this);
615
- //constraints.gridy += 1;
616
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
617
- supportCB.setToolTipText("Enabled rigging");
618
- supportCB.addItemListener(this);
619
-
620
- // constraints.gridy += 1;
621
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
622
- // localCB.addItemListener(this);
623
-
624
- //constraints.gridy += 1;
625
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
626
- crowdCB.setToolTipText("Used for crowds");
627
- crowdCB.addItemListener(this);
628
-
629
- //constraints.gridy += 1;
630
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
631
- smoothCB.setToolTipText("Snapping delay");
632
- smoothCB.addItemListener(this);
633
-
634
- //constraints.gridy += 1;
635
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
636
- slowCB.setToolTipText("Smooth interpolation");
637
- slowCB.addItemListener(this);
638
- //constraints.gridy += 1;
639816 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
640817 boxCB.setToolTipText("Display bounding boxes");
641818 boxCB.addItemListener(this);
642
- //constraints.gridy += 1;
819
+
643820 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
644821 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
645822 zoomBoxCB.addItemListener(this);
646823
824
+ if (true) // Globals.ADVANCED)
825
+ {
826
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
827
+ supportCB.setToolTipText("Enable rigging");
828
+ supportCB.addItemListener(this);
829
+
830
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
831
+ // localCB.addItemListener(this);
832
+
833
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
834
+ crowdCB.setToolTipText("Used for crowds");
835
+ crowdCB.addItemListener(this);
836
+
837
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
838
+ smoothCB.setToolTipText("Snapping delay");
839
+ smoothCB.addItemListener(this);
840
+
841
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
842
+ slowCB.setToolTipText("Smooth interpolation");
843
+ slowCB.addItemListener(this);
844
+
647845 // constraints.gridy += 1;
648846 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
649847 // speakerMocapCB.addItemListener(this);
....@@ -668,20 +866,46 @@
668866 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
669867 // debugCB.addItemListener(this);
670868
671
- //constraints.gridy += 1;
672869 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
870
+ oeilCB.setToolTipText("Move camera when tracking target");
673871 oeilCB.addItemListener(this);
674872
675
- //constraints.gridy += 1;
873
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
874
+ shadowCB.setToolTipText("Compute shadows when live");
875
+ shadowCB.addItemListener(this);
876
+
877
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
878
+ autosaveCB.setToolTipText("Auto-save on structure change");
879
+ autosaveCB.addItemListener(this);
880
+
881
+ if (Globals.ADVANCED)
882
+ {
676883 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
677884 lookAtCB.setToolTipText("Look-at target");
678885 lookAtCB.addItemListener(this);
886
+ }
887
+
888
+ }
889
+
890
+ cGridBag fill = new cGridBag();
891
+
892
+ fill.preferredHeight = 200;
893
+
894
+ panel.add(fill);
679895
680896 }
681897
682898 void EditObject(Object3D obj)
683899 {
684900 cRadio radioButton = new cRadio(obj.name);
901
+
902
+ // Patch to avoid bug with transparency.
903
+ radioButton.hadMaterial = obj.material != null;
904
+ if (!radioButton.hadMaterial)
905
+ {
906
+ obj.material = new cMaterial();
907
+ }
908
+
685909 radioButton.SetObject(obj);
686910 radioButton.layout = sevenButton;
687911 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -690,8 +914,11 @@
690914 buttonGroup.add(radioButton);
691915 radioButton.doClick();
692916 }
917
+
693918 void SetupViews(ObjEditor oe)
694919 {
920
+ theFrame = this;
921
+
695922 oe.SetupViews();
696923
697924 System.out.println("SetupViews");
....@@ -700,23 +927,26 @@
700927 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
701928 }
702929
703
- JCheckBox liveCB;
704
- JCheckBox supportCB;
705
- JCheckBox localCB;
706
- JCheckBox crowdCB;
707
- JCheckBox smoothCB;
708
- JCheckBox fastCB;
709
- JCheckBox slowCB;
710
- JCheckBox boxCB;
711
- JCheckBox zoomBoxCB;
712
- JCheckBox trackCB;
713
- JCheckBox smoothfocusCB;
930
+ cToggleButton liveCB;
931
+ cCheckBox supportCB;
932
+ cCheckBox localCB;
933
+ cCheckBox crowdCB;
934
+ cCheckBox smoothCB;
935
+ cToggleButton fastCB;
936
+ cCheckBox slowCB;
937
+ cCheckBox boxCB;
938
+ cCheckBox zoomBoxCB;
939
+ cToggleButton trackCB;
940
+ cCheckBox smoothfocusCB;
714941 // JCheckBox speakerMocapCB;
715
- JCheckBox speakerCameraCB;
716
- JCheckBox speakerFocusCB;
717
- JCheckBox debugCB;
718
- JCheckBox oeilCB;
719
- JCheckBox lookAtCB;
942
+ cCheckBox speakerCameraCB;
943
+ cCheckBox speakerFocusCB;
944
+ cCheckBox debugCB;
945
+
946
+ cCheckBox oeilCB;
947
+ cCheckBox shadowCB;
948
+ cCheckBox autosaveCB;
949
+ cCheckBox lookAtCB;
720950
721951 // static int COLOR = 1;
722952 // static int MATERIAL = 2;
....@@ -724,9 +954,9 @@
724954
725955 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
726956
727
- JCheckBox colorCB;
728
- JCheckBox materialCB;
729
- JCheckBox textureCB;
957
+ cCheckBox colorCB;
958
+ cCheckBox materialCB;
959
+ cCheckBox textureCB;
730960
731961 public void itemStateChanged(ItemEvent e)
732962 {
....@@ -754,6 +984,7 @@
754984 } else if(e.getSource() == liveCB)
755985 {
756986 cameraView.ToggleLive();
987
+ refreshContents(false);
757988 }
758989 else if(e.getSource() == supportCB)
759990 {
....@@ -818,6 +1049,14 @@
8181049 {
8191050 cameraView.ToggleOeil();
8201051 }
1052
+ else if(e.getSource() == shadowCB)
1053
+ {
1054
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1055
+ }
1056
+ else if(e.getSource() == autosaveCB)
1057
+ {
1058
+ Globals.SAVEONMAKE ^= true;
1059
+ }
8211060 else if(e.getSource() == lookAtCB)
8221061 {
8231062 cameraView.ToggleLookAt();
....@@ -834,7 +1073,8 @@
8341073
8351074 /**/
8361075 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
837
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1076
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1077
+ TreePath path = objEditor.jTree.getSelectionPath();
8381078 if ((path == null) || (path.getPathCount() <= 1)) {
8391079 // We can't move the root node or an empty selection
8401080 return;
....@@ -906,7 +1146,9 @@
9061146 // objEditor.DropFile((java.io.File[]) object, true);
9071147 // return;
9081148 // }
909
- if (string.charAt(0) == '/')
1149
+
1150
+ // File path for Mac and Windows
1151
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9101152 {
9111153 // file(s)
9121154 String[] names = string.split("\n");
....@@ -933,7 +1175,7 @@
9331175
9341176 flashIt = false;
9351177 CameraPane pane = (CameraPane) target;
936
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1178
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9371179 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9381180
9391181 if (group.selection.size() == 1)
....@@ -956,16 +1198,16 @@
9561198 return;
9571199 }
9581200
959
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
960
- {
1201
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1202
+// {
9611203 loadClipboard(true);
9621204 objEditor.jTree.setSelectionPath(destinationPath);
963
- pasteInto(false);
964
- } else {
965
- loadClipboard(false);
966
- objEditor.jTree.setSelectionPath(destinationPath);
967
- pasteInto(false); // true); // ???
968
- }
1205
+ pasteInto(false, false);
1206
+// } else {
1207
+// loadClipboard(false);
1208
+// objEditor.jTree.setSelectionPath(destinationPath);
1209
+// pasteInto(false, false); // true); // ???
1210
+// }
9691211 }
9701212 public void dropActionChanged(DropTargetDragEvent dtde)
9711213 // Called if the user has modified the current drop gesture
....@@ -1086,27 +1328,33 @@
10861328 kleinItem.addActionListener(this);
10871329 particleItem = menu.add(new MenuItem("Particle system"));
10881330 particleItem.addActionListener(this);
1331
+ if (Globals.ADVANCED)
1332
+ {
10891333 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10901334 ragdollItem.addActionListener(this);
10911335 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10921336 ragdoll2Item.addActionListener(this);
1337
+ }
10931338 menu.add("-");
1094
- meshItem = menu.add(new MenuItem("Mesh"));
1339
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10951340 meshItem.addActionListener(this);
10961341 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10971342 // meshGroupItem.addActionListener(this);
1343
+ if (Globals.ADVANCED)
1344
+ {
10981345 springItem = menu.add(new MenuItem("Spring"));
10991346 springItem.addActionListener(this);
11001347 flagItem = menu.add(new MenuItem("Flag"));
11011348 flagItem.addActionListener(this);
1102
- bezierItem = menu.add(new MenuItem("Patch"));
1103
- bezierItem.addActionListener(this);
1104
- checkerItem = menu.add(new MenuItem("Checker"));
1105
- checkerItem.addActionListener(this);
11061349 blobItem = menu.add(new MenuItem("Blob"));
11071350 blobItem.addActionListener(this);
11081351 latheItem = menu.add(new MenuItem("Lathe"));
11091352 latheItem.addActionListener(this);
1353
+ }
1354
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1355
+ bezierItem.addActionListener(this);
1356
+ overlayItem = menu.add(new MenuItem("Overlay"));
1357
+ overlayItem.addActionListener(this);
11101358 lightItem = menu.add(new MenuItem("Light"));
11111359 lightItem.addActionListener(this);
11121360 menu.add("-");
....@@ -1116,39 +1364,44 @@
11161364 loopItem.addActionListener(this);
11171365 doubleItem = menu.add(new MenuItem("Fork"));
11181366 doubleItem.addActionListener(this);
1367
+ if (Globals.ADVANCED)
1368
+ {
11191369 tripleItem = menu.add(new MenuItem("Trident"));
11201370 tripleItem.addActionListener(this);
1371
+ }
11211372 }
11221373
11231374 void buildToolsMenu(Menu menu)
11241375 {
11251376 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11261377 animationItem.addItemListener(this);
1127
- animationItem.setState(CameraPane.ANIMATION);
1378
+ animationItem.setState(Globals.ANIMATION);
11281379
11291380 menu.add("-");
11301381 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11311382 parseverticesItem.addActionListener(this);
11321383 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11331384 textureFieldItem.addActionListener(this);
1134
- alignItem = menu.add(new MenuItem("Align"));
1385
+ alignItem = menu.add(new MenuItem("Align Objects"));
11351386 alignItem.addActionListener(this);
1136
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1137
- mirrorItem.addActionListener(this);
11381387 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11391388 reduceMorphItem.addActionListener(this);
11401389 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11411390 reduce34MorphItem.addActionListener(this);
1142
-
1391
+ menu.add("-");
11431392 menu.add(computeAOItem = new MenuItem("Compute AO"));
11441393 computeAOItem.addActionListener(this);
1145
- menu.add("-");
11461394
1395
+ if (Globals.ADVANCED)
1396
+ {
1397
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1398
+ mirrorItem.addActionListener(this);
1399
+ menu.add("-");
11471400 menu.add(memoryItem = new MenuItem("Memory Usage"));
11481401 memoryItem.addActionListener(this);
11491402 menu.add(analyzeItem = new MenuItem("Analyze"));
11501403 analyzeItem.addActionListener(this);
1151
- menu.add(dumpItem = new MenuItem("Dump"));
1404
+ menu.add(dumpItem = new MenuItem("Print"));
11521405 dumpItem.addActionListener(this);
11531406 // menu.add(pathItem = new MenuItem("From-to path"));
11541407 // pathItem.addActionListener(this);
....@@ -1166,6 +1419,7 @@
11661419 menu.add("-");
11671420 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11681421 editScriptItem.addActionListener(this);
1422
+ }
11691423 }
11701424
11711425 void ScreenFit()
....@@ -1288,6 +1542,7 @@
12881542 shadow.material = new cMaterial(obj.material);
12891543 shadow.material.diffuse = 0.0001f;
12901544 shadow.material.specular = 0.0001f;
1545
+ //shadow.projectedVertices[1].x = 300;
12911546
12921547 makeSomething(shadow);
12931548 }
....@@ -1494,9 +1749,9 @@
14941749
14951750 void Overwrite(int mask)
14961751 {
1497
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1752
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14981753 {
1499
- Object3D content = GrafreeD.clipboard.get(0);
1754
+ Object3D content = Grafreed.clipboard.get(0);
15001755
15011756 if (content instanceof cGroup && ((cGroup)content).transientlink )
15021757 content = ((cGroup)content).get(0);
....@@ -1544,11 +1799,11 @@
15441799 objEditor.cameraView.renderCamera.setAim(v2, v1);
15451800 objEditor.cameraView.repaint();
15461801 } else
1547
- if (source == rectoidItem)
1802
+ if (source == rectoidItem || source == boxButton)
15481803 {
15491804 makeSomething(new Box());
15501805 } else
1551
- if (source == particleItem)
1806
+ if (source == particleItem || source == particlesButton)
15521807 {
15531808 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15541809 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1627,27 +1882,27 @@
16271882
16281883 makeSomething(obj);
16291884 } else
1630
- if (source == gridItem)
1885
+ if (source == gridItem || source == gridButton)
16311886 {
16321887 makeSomething(new Grid());
16331888 } else
1634
- if (source == ellipsoidItem)
1889
+ if (source == ellipsoidItem || source == sphereButton)
16351890 {
16361891 makeSomething(new Sphere());
16371892 } else
1638
- if (source == coneItem)
1893
+ if (source == coneItem || source == coneButton)
16391894 {
16401895 makeSomething(new Cone());
16411896 } else
1642
- if (source == torusItem)
1897
+ if (source == torusItem || source == torusButton)
16431898 {
16441899 makeSomething(new Torus());
16451900 } else
1646
- if (source == superItem)
1901
+ if (source == superItem || source == superButton)
16471902 {
16481903 makeSomething(new Superellipsoid());
16491904 } else
1650
- if (source == kleinItem)
1905
+ if (source == kleinItem || source == kleinButton)
16511906 {
16521907 makeSomething(new Klein());
16531908 } else
....@@ -1667,7 +1922,7 @@
16671922 {
16681923 makeSomething(new BezierSurface());
16691924 } else
1670
- if (source == checkerItem)
1925
+ if (source == overlayItem || source == overlayButton)
16711926 {
16721927 /*
16731928 Object3D obj = new BezierSurface(5,8);
....@@ -1715,7 +1970,7 @@
17151970 s.setup();
17161971 makeSomething(s);
17171972 } else
1718
- if (source == lightItem)
1973
+ if (source == lightItem || source == lightButton)
17191974 {
17201975 makeSomething(new Light());
17211976 } else
....@@ -1801,23 +2056,6 @@
18012056 csg.addChild(child);
18022057 child.addChild(csg);
18032058 } else
1804
-
1805
- if (source == importGFDItem)
1806
- {
1807
- ImportGFD();
1808
- } else
1809
- if (source == importVRMLX3DItem)
1810
- {
1811
- ImportVRMLX3D();
1812
- } else
1813
- if (source == import3DSItem)
1814
- {
1815
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1816
- } else
1817
- if (source == importOBJItem)
1818
- {
1819
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1820
- } else
18212059 if (source == computeAOItem)
18222060 {
18232061 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1836,7 +2074,7 @@
18362074 if (source == invariantsItem)
18372075 {
18382076 System.out.println("Invariants:");
1839
- GrafreeD.grafreeD.universe.invariants();
2077
+ Grafreed.grafreeD.universe.invariants();
18402078 } else
18412079 if (source == memoryItem)
18422080 {
....@@ -1854,6 +2092,35 @@
18542092 if (source == dumpItem)
18552093 {
18562094 DumpObject();
2095
+ } else
2096
+ if (source == minButton)
2097
+ {
2098
+ Minimize();
2099
+ } else
2100
+ if (source == maxButton)
2101
+ {
2102
+ Maximize();
2103
+ } else
2104
+ if (source == fullButton)
2105
+ {
2106
+ ToggleFullScreen();
2107
+ } else
2108
+ if (source == undoButton)
2109
+ {
2110
+ Undo();
2111
+ } else
2112
+ if (source == redoButton)
2113
+ {
2114
+ Redo();
2115
+ } else
2116
+ if (source == saveButton)
2117
+ {
2118
+ Save();
2119
+ } else
2120
+ if (source == oneStepButton)
2121
+ {
2122
+ Globals.ONESTEP = true;
2123
+ cameraView.repaint();
18572124 } else
18582125 if (source == screenfitButton)
18592126 {
....@@ -1904,12 +2171,20 @@
19042171 {
19052172 loadClipboard(true);
19062173 } else
2174
+ if (source == undoItem)
2175
+ {
2176
+ Undo();
2177
+ } else
2178
+ if (source == redoItem)
2179
+ {
2180
+ Redo();
2181
+ } else
19072182 if (source == duplicateItem)
19082183 {
1909
- Object3D keep = GrafreeD.clipboard;
2184
+ Object3D keep = Grafreed.clipboard;
19102185 loadClipboard(false);
19112186 paste(false);
1912
- GrafreeD.clipboard = keep;
2187
+ Grafreed.clipboard = keep;
19132188 } else
19142189 if (source == cloneItem)
19152190 {
....@@ -1927,13 +2202,17 @@
19272202 {
19282203 paste(false);
19292204 } else
2205
+ if (source == pasteIntoItem)
2206
+ {
2207
+ pasteInto(true, false);
2208
+ } else
19302209 if (source == pasteLinkItem)
19312210 {
1932
- pasteInto(false);
2211
+ pasteInto(false, false);
19332212 } else
19342213 if (source == pasteCloneItem)
19352214 {
1936
- pasteInto(true);
2215
+ pasteInto(true, true);
19372216 } else
19382217 if (source == pasteExpandItem)
19392218 {
....@@ -2125,9 +2404,9 @@
21252404 // group.selection.get(0).setMasterThis(content); // should be identity
21262405 // refreshContents();
21272406 // }
2128
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2407
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21292408 {
2130
- Object3D content = GrafreeD.clipboard.get(0);
2409
+ Object3D content = Grafreed.clipboard.get(0);
21312410
21322411 if (content instanceof cGroup && ((cGroup)content).transientlink )
21332412 content = ((cGroup)content).get(0);
....@@ -2135,11 +2414,11 @@
21352414 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21362415 for (int i=0; i<group.selection.size(); i++)
21372416 {
2138
- boolean random = CameraPane.RANDOM;
2139
- CameraPane.RANDOM = false; // parse all random nodes
2417
+ boolean random = CameraPane.SWITCH;
2418
+ CameraPane.SWITCH = false; // parse all random nodes
21402419 group.selection.get(i).linkVerticesThis(content);
21412420 // group.selection.get(i).setMasterThis(content); // should be identity
2142
- CameraPane.RANDOM = random;
2421
+ CameraPane.SWITCH = random;
21432422 }
21442423 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21452424 refreshContents();
....@@ -2149,20 +2428,20 @@
21492428 {
21502429 for (int i=0; i<group.selection.size(); i++)
21512430 {
2152
- boolean random = CameraPane.RANDOM;
2153
- CameraPane.RANDOM = false; // parse all random nodes
2431
+ boolean random = CameraPane.SWITCH;
2432
+ CameraPane.SWITCH = false; // parse all random nodes
21542433 group.selection.get(i).linkVerticesThis(null);
2155
- CameraPane.RANDOM = random;
2434
+ CameraPane.SWITCH = random;
21562435 }
21572436
21582437 refreshContents();
21592438 } else
21602439 if (source == relinkverticesItem)
21612440 {
2162
- boolean random = CameraPane.RANDOM;
2163
- CameraPane.RANDOM = false; // parse all random nodes
2441
+ boolean random = CameraPane.SWITCH;
2442
+ CameraPane.SWITCH = false; // parse all random nodes
21642443 group.selection.RelinkToSupport();
2165
- CameraPane.RANDOM = random;
2444
+ CameraPane.SWITCH = random;
21662445
21672446 refreshContents();
21682447 } else
....@@ -2177,9 +2456,9 @@
21772456 } else
21782457 if (source == setMasterItem)
21792458 {
2180
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2459
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21812460 {
2182
- Object3D content = GrafreeD.clipboard.get(0);
2461
+ Object3D content = Grafreed.clipboard.get(0);
21832462
21842463 if (content instanceof cGroup && ((cGroup)content).transientlink )
21852464 content = ((cGroup)content).get(0);
....@@ -2192,9 +2471,9 @@
21922471 {
21932472 if (group.selection.size() == 1)
21942473 {
2195
- if (GrafreeD.clipboard.size() == 1)
2474
+ if (Grafreed.clipboard.size() == 1)
21962475 {
2197
- Object3D content = GrafreeD.clipboard.get(0);
2476
+ Object3D content = Grafreed.clipboard.get(0);
21982477
21992478 if (content instanceof cGroup && ((cGroup)content).transientlink )
22002479 content = ((cGroup)content).get(0);
....@@ -2211,7 +2490,7 @@
22112490 {
22122491 RevertMeshes();
22132492 } else
2214
- if (source == resetMeshItem)
2493
+ if (source == resetAllItem)
22152494 {
22162495 ResetAll();
22172496 } else
....@@ -2260,7 +2539,7 @@
22602539 RandomNode random = new RandomNode();
22612540 group(random);
22622541 if (random.size() > 0)
2263
- random.name = random.get(0).name + "Rnd";
2542
+ random.name = random.get(0).name + "Switch";
22642543 } else
22652544 if (source == physicsItem)
22662545 {
....@@ -2377,7 +2656,7 @@
23772656 {
23782657 CastShadow(2);
23792658 } else
2380
- if (source == ungroupItem)
2659
+ if (source == ungroupItem || source == ungroupButton)
23812660 {
23822661 //ungroup();
23832662 for (int i=0; i<group.selection.size(); i++)
....@@ -2399,7 +2678,7 @@
23992678 } else
24002679 if (source == genNormalsMESHItem)
24012680 {
2402
- GenNormals(true); // TODO
2681
+ GenNormalsMESH();
24032682 } else
24042683 if (source == genNormalsORGANItem)
24052684 {
....@@ -2464,6 +2743,22 @@
24642743 if (source == unmarkleavesItem)
24652744 {
24662745 MarkLeaves(false);
2746
+ } else
2747
+ if (source == rewindleavesItem)
2748
+ {
2749
+ RewindLeaves(true);
2750
+ } else
2751
+ if (source == unrewindleavesItem)
2752
+ {
2753
+ RewindLeaves(false);
2754
+ } else
2755
+ if (source == randomleavesItem)
2756
+ {
2757
+ RandomLeaves(true);
2758
+ } else
2759
+ if (source == unrandomleavesItem)
2760
+ {
2761
+ RandomLeaves(false);
24672762 } else
24682763 if (source == flipVItem)
24692764 {
....@@ -2549,9 +2844,13 @@
25492844 {
25502845 SmoothMesh();
25512846 } else
2552
- if (source == transformgeometryItem)
2847
+ if (source == transformGeometryItem)
25532848 {
25542849 TransformGeometry();
2850
+ } else
2851
+ if (source == transformChildrenItem)
2852
+ {
2853
+ TransformChildren();
25552854 } else
25562855 if (source == resetTransformItem)
25572856 {
....@@ -2559,7 +2858,11 @@
25592858 } else
25602859 if (source == resetCentroidItem)
25612860 {
2562
- ResetCentroid();
2861
+ ResetCentroid(true);
2862
+ } else
2863
+ if (source == resetCentroidXZItem)
2864
+ {
2865
+ ResetCentroid(false);
25632866 } else
25642867 if (source == resetParentItem)
25652868 {
....@@ -2691,6 +2994,10 @@
26912994 if (source == twoButton)
26922995 {
26932996 radio.layout = twoButton;
2997
+
2998
+ if (CameraPane.FULLSCREEN)
2999
+ fullscreenLayout = radio.layout;
3000
+
26943001 // bug
26953002 //gridPanel.setDividerLocation(1.0);
26963003 //bigPanel.setDividerLocation(0.0);
....@@ -2723,10 +3030,31 @@
27233030 bigThree.ClearUI();
27243031 bigThree.add(centralPanel);
27253032 bigThree.FlushUI();
3033
+
3034
+ cameraView.requestFocusInWindow();
3035
+
3036
+// refreshContents(true);
3037
+//
3038
+// try
3039
+// {
3040
+// java.awt.Robot bot = new java.awt.Robot();
3041
+// int mask = InputEvent.BUTTON1_MASK;
3042
+// bot.mouseMove(100, 100);
3043
+// bot.mousePress(mask);
3044
+// bot.mouseRelease(mask);
3045
+// }
3046
+// catch (Exception e)
3047
+// {
3048
+//
3049
+// }
3050
+
27263051 } else
27273052 if (source == threeButton)
27283053 {
27293054 radio.layout = threeButton;
3055
+
3056
+ if (CameraPane.FULLSCREEN)
3057
+ fullscreenLayout = radio.layout;
27303058
27313059 // bigThree.remove(scenePanel);
27323060 // bigThree.remove(centralPanel);
....@@ -2759,10 +3087,15 @@
27593087 bigThree.add(centralPanel);
27603088 bigThree.add(XYZPanel);
27613089 bigThree.FlushUI();
3090
+
3091
+ cameraView.requestFocusInWindow();
27623092 } else
27633093 if (source == fourButton)
27643094 {
27653095 radio.layout = fourButton;
3096
+
3097
+ if (CameraPane.FULLSCREEN)
3098
+ fullscreenLayout = radio.layout;
27663099
27673100 // bigThree.remove(scenePanel);
27683101 // bigThree.remove(centralPanel);
....@@ -2794,10 +3127,15 @@
27943127 bigThree.ClearUI();
27953128 bigThree.add(scenePanel);
27963129 bigThree.FlushUI();
3130
+
3131
+ cameraView.requestFocusInWindow();
27973132 } else
27983133 if (source == sixButton)
27993134 {
28003135 radio.layout = sixButton;
3136
+
3137
+ if (CameraPane.FULLSCREEN)
3138
+ fullscreenLayout = radio.layout;
28013139
28023140 // bigThree.remove(scenePanel);
28033141 // bigThree.remove(centralPanel);
....@@ -2830,10 +3168,15 @@
28303168 bigThree.add(scenePanel);
28313169 bigThree.add(centralPanel);
28323170 bigThree.FlushUI();
3171
+
3172
+ cameraView.requestFocusInWindow();
28333173 } else
28343174 if (source == sevenButton)
28353175 {
28363176 radio.layout = sevenButton;
3177
+
3178
+ if (CameraPane.FULLSCREEN)
3179
+ fullscreenLayout = radio.layout;
28373180
28383181 // bigThree.remove(scenePanel);
28393182 // bigThree.remove(centralPanel);
....@@ -2867,6 +3210,8 @@
28673210 bigThree.add(centralPanel);
28683211 bigThree.add(XYZPanel);
28693212 bigThree.FlushUI();
3213
+
3214
+ cameraView.requestFocusInWindow();
28703215 } else
28713216 if (source == rootButton)
28723217 {
....@@ -2878,6 +3223,7 @@
28783223 EditObject(obj);
28793224 }
28803225
3226
+ cameraView.requestFocusInWindow();
28813227 refreshContents(true);
28823228 } else
28833229 if (source == closeButton)
....@@ -2887,18 +3233,27 @@
28873233 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
28883234 {
28893235 ab = (cRadio)e.nextElement();
2890
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3236
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
28913237 {
3238
+ // Patch to avoid bug with transparency.
3239
+ if (!ab.hadMaterial)
3240
+ {
3241
+ ab.object.material = null;
3242
+ }
3243
+
28923244 buttonGroup.remove(ab);
28933245 radioPanel.remove(ab);
28943246
2895
- ab.GetObject().editWindow = null;
3247
+ //ab.GetObject().editWindow = null;
3248
+ ab.GetObject().manipWindow = null;
28963249 // ab.GetObject().objectUI = null; // ?????????
28973250
28983251 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
28993252 break;
29003253 }
29013254 }
3255
+
3256
+ cameraView.requestFocusInWindow();
29023257 refreshContents(true);
29033258 } else
29043259 if (source == editItem || source == editButton)
....@@ -2915,9 +3270,9 @@
29153270 child.CloseUI();
29163271 listUI.remove(child);
29173272
2918
- child.editWindow = null; // ???????????
3273
+ //child.editWindow = null; // ???????????
29193274 }
2920
- objEditor.ctrlPanel.validate();
3275
+ objEditor.ctrlPanel.FlushUI();
29213276 //objEditor.jTree.clearSelection();
29223277 //objEditor.ResetSliders();
29233278 refreshContents(true);
....@@ -3001,7 +3356,11 @@
30013356 frontView.object = group;
30023357 sideView.object = group;
30033358 }
3004
- group.editWindow = this;
3359
+
3360
+// fix "+" issue
3361
+ //group.editWindow = this;
3362
+ group.manipWindow = this;
3363
+
30053364 /*
30063365 currentLayout = radio.layout;
30073366 if (currentLayout == null)
....@@ -3013,8 +3372,23 @@
30133372 //group.parent = null; // ROOT
30143373 //group.attributes = -1;
30153374 ResetModel();
3375
+
3376
+ cameraView.requestFocusInWindow();
30163377 refreshContents(true);
3017
- }
3378
+ } else if (event.getSource() == editCameraItem)
3379
+ {
3380
+ cameraView.ProtectCamera();
3381
+ cameraView.repaint();
3382
+ return;
3383
+ } else if (event.getSource() == revertCameraItem)
3384
+ {
3385
+ cameraView.RevertCamera();
3386
+ cameraView.repaint();
3387
+ return;
3388
+ // } else if (event.getSource() == textureButton)
3389
+ // {
3390
+ // return; // true;
3391
+ }
30183392 else
30193393 {
30203394 //return super.action(event, arg);
....@@ -3023,7 +3397,6 @@
30233397 }
30243398
30253399 boolean useclient = false;
3026
- cRadio radio;
30273400
30283401 void ToggleRoot()
30293402 {
....@@ -3075,6 +3448,28 @@
30753448 refreshContents();
30763449 }
30773450
3451
+ void TransformChildren()
3452
+ {
3453
+ Object3D obj;
3454
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3455
+ {
3456
+ obj = (Object3D)e.nextElement();
3457
+ obj.KeepTextureMatrices();
3458
+ obj.TransformChildren();
3459
+ obj.RestoreTextureMatrices();
3460
+
3461
+// if (obj.parent == null)
3462
+// {
3463
+// System.out.println("NULL PARENT!");
3464
+// new Exception().printStackTrace();
3465
+// }
3466
+// else
3467
+// TouchTransform(obj);
3468
+// //obj.parent.Touch();
3469
+ }
3470
+
3471
+ refreshContents();
3472
+ }
30783473
30793474 void ResetTransform()
30803475 {
....@@ -3187,7 +3582,7 @@
31873582 refreshContents();
31883583 }
31893584
3190
- void ResetCentroid()
3585
+ void ResetCentroid(boolean full)
31913586 {
31923587 Object3D obj;
31933588 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3202,12 +3597,16 @@
32023597 LA.matIdentity(Object3D.mat);
32033598 obj.getBounds(minima, maxima, false);
32043599 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3205
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3600
+ if (full)
3601
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32063602 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32073603 obj.TransformMesh(Object3D.mat);
3604
+
32083605 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3209
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3606
+ if (full)
3607
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32103608 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3609
+
32113610 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32123611 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32133612 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3236,7 +3635,8 @@
32363635
32373636 int size = obj.MemorySize();
32383637
3239
- System.err.println((size/1024) + " KB is the size of " + obj);
3638
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3639
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32403640 }
32413641 }
32423642 catch (Exception e)
....@@ -3273,9 +3673,9 @@
32733673 obj = (Object3D)e.nextElement();
32743674
32753675 System.out.println("Object is: " + obj);
3276
- GrafreeD.AnalyzeObject(obj);
3676
+ Grafreed.AnalyzeObject(obj);
32773677 System.out.println("Boundary rep: " + obj.bRep);
3278
- GrafreeD.AnalyzeObject(obj.bRep);
3678
+ Grafreed.AnalyzeObject(obj.bRep);
32793679
32803680 // System.err.println((size/1024) + " KB is the size of " + obj);
32813681 }
....@@ -3317,6 +3717,13 @@
33173717 void GenNormals(boolean crease)
33183718 {
33193719 group.GenNormalsS(crease);
3720
+
3721
+ refreshContents();
3722
+ }
3723
+
3724
+ void GenNormalsMESH()
3725
+ {
3726
+ group.GenNormalsMeshS();
33203727
33213728 refreshContents();
33223729 }
....@@ -3489,8 +3896,8 @@
34893896
34903897 void ParseVertices()
34913898 {
3492
- boolean epsequal = GrafreeD.epsequal;
3493
- GrafreeD.epsequal = true;
3899
+ boolean epsequal = Grafreed.epsequal;
3900
+ Grafreed.epsequal = true;
34943901
34953902 for (int i=0; i<group.selection.size(); i++)
34963903 {
....@@ -3515,7 +3922,7 @@
35153922 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35163923 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35173924
3518
- g.add(GrafreeD.clipboard);
3925
+ g.add(Grafreed.clipboard);
35193926
35203927 buffer.add(g);
35213928 }
....@@ -3530,7 +3937,7 @@
35303937 makeSomething(buffer, i==group.selection.size()-1);
35313938 }
35323939
3533
- GrafreeD.epsequal = epsequal;
3940
+ Grafreed.epsequal = epsequal;
35343941
35353942 refreshContents();
35363943 }
....@@ -3548,7 +3955,16 @@
35483955 String pigment = Object3D.GetPigment(tex);
35493956 //String bump = Object3D.GetBump(tex);
35503957
3551
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3958
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3959
+
3960
+ try
3961
+ {
3962
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3963
+ }
3964
+ catch (Exception e)
3965
+ {
3966
+ System.err.println("FAIL: " + node);
3967
+ }
35523968
35533969 double s = v.s;
35543970
....@@ -3636,11 +4052,11 @@
36364052
36374053 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36384054
3639
- boolean random = CameraPane.RANDOM;
3640
- CameraPane.RANDOM = false; // parse all random nodes
4055
+ boolean random = CameraPane.SWITCH;
4056
+ CameraPane.SWITCH = false; // parse all random nodes
36414057 lowres.linkVerticesThis(null);
36424058 lowres.linkVerticesThis(sn);
3643
- CameraPane.RANDOM = random;
4059
+ CameraPane.SWITCH = random;
36444060
36454061 System.err.flush();
36464062
....@@ -3680,7 +4096,7 @@
36804096 return;
36814097
36824098 Object3D poses = group.selection.get(0);
3683
- Object3D ref = GrafreeD.clipboard.get(0);
4099
+ Object3D ref = Grafreed.clipboard.get(0);
36844100
36854101 Object3D newgroup = new Object3D("Po:" + poses.name);
36864102
....@@ -3874,9 +4290,9 @@
38744290
38754291 void ClipMesh()
38764292 {
3877
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4293
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38784294 {
3879
- Object3D content = GrafreeD.clipboard.get(0);
4295
+ Object3D content = Grafreed.clipboard.get(0);
38804296
38814297 if (content instanceof cGroup && ((cGroup)content).transientlink )
38824298 content = ((cGroup)content).get(0);
....@@ -3885,7 +4301,7 @@
38854301 // {
38864302 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38874303 // }
3888
- group.selection.ClipMesh(GrafreeD.clipboard);
4304
+ group.selection.ClipMesh(Grafreed.clipboard);
38894305 }
38904306 // group.selection.ClipMesh(GrafreeD.clipboard);
38914307 System.out.println("DONE.");
....@@ -3932,6 +4348,18 @@
39324348 void MarkLeaves(boolean hide)
39334349 {
39344350 group.selection.MarkLeaves(hide);
4351
+ refreshContents();
4352
+ }
4353
+
4354
+ void RewindLeaves(boolean hide)
4355
+ {
4356
+ group.selection.RewindLeaves(hide);
4357
+ refreshContents();
4358
+ }
4359
+
4360
+ void RandomLeaves(boolean hide)
4361
+ {
4362
+ group.selection.RandomLeaves(hide);
39354363 refreshContents();
39364364 }
39374365
....@@ -4017,10 +4445,10 @@
40174445 {
40184446 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
40194447 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4020
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4448
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40214449
40224450 Object3D elem = (Object3D)group.selection.elementAt(i);
4023
- if(elem != group)
4451
+ if(elem != group || !newWindow)
40244452 {
40254453 // if (!(elem instanceof Composite))
40264454 // newWindow = false;
....@@ -4110,7 +4538,6 @@
41104538 //case 702: // Event.LIST_DESELECT
41114539 group.deselectAll();
41124540 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4113
- objEditor.ClearInfo(); // .GetMaterial());
41144541 if (tps != null)
41154542 {
41164543 for (int i=0; i < tps.length; i++)
....@@ -4119,29 +4546,28 @@
41194546
41204547 //if (child.parent != null)
41214548 //child.parent.addSelectee(child);
4549
+ objEditor.SetMaterial(child);
41224550 group.addSelectee(child);
4123
- objEditor.SetMaterial(child); // .GetMaterial());
4124
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4125
- System.err.println("info : " + child.GetPath());
41264551 }
41274552 }
4128
- else
4129
- {
4130
- objEditor.SetMaterial(group); // .GetMaterial());
4131
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4132
- System.err.println("info : " + group.GetPath());
4133
- }
4553
+// else
4554
+// {
4555
+// objEditor.SetMaterial(group); // .GetMaterial());
4556
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4557
+// System.err.println("info : " + group.GetPath());
4558
+// }
41344559
4135
- objEditor.SetText(); // jan 2014
4136
-
4137
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4560
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41384561 CameraPane.flash = true;
41394562
4140
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4563
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41414564 // a camera
41424565 {
4143
- CameraPane.camerachangeframe = 0; // don't refuse it
4144
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4566
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4567
+ {
4568
+ CameraPane.camerachangeframe = 0; // don't refuse it
4569
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4570
+ }
41454571 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41464572 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41474573 }
....@@ -4154,6 +4580,26 @@
41544580
41554581 freezemodel = false;
41564582 }
4583
+
4584
+ void refreshContents(boolean cp)
4585
+ {
4586
+ if (!Globals.MOUSEDRAGGED)
4587
+ {
4588
+ objEditor.ClearInfo(); // .GetMaterial());
4589
+
4590
+ for (int i=0; i < group.selection.Size(); i++)
4591
+ {
4592
+ Object3D child = (Object3D) group.selection.get(i);
4593
+
4594
+ objEditor.AddInfo(child, this, true);
4595
+ System.err.println("info : " + child.GetPath());
4596
+ }
4597
+
4598
+ objEditor.SetText(); // jan 2014
4599
+ }
4600
+
4601
+ super.refreshContents(cp);
4602
+ }
41574603
41584604 void linkSomething(Object3D thing)
41594605 {
....@@ -4225,16 +4671,19 @@
42254671 {
42264672 if (group.selection.isEmpty())
42274673 return;
4228
- GrafreeD.clipboardIsTempGroup = false;
4674
+
4675
+ Grafreed.clipboardIsTempGroup = false;
42294676 Composite tGroup = null;
42304677 if (group.selection.size() > 0) // 1)
42314678 {
42324679 tGroup = new cGroup();
4233
- GrafreeD.clipboardIsTempGroup = true;
4680
+ Grafreed.clipboardIsTempGroup = true;
42344681 }
42354682
42364683 if (cut)
42374684 {
4685
+ if (Globals.SAVEONMAKE)
4686
+ Save();
42384687 //int indices[] = jList.getSelectedIndices();
42394688 //for (int i = indices.length - 1; i >= 0; i--)
42404689 //jList.remove(indices[i]);
....@@ -4270,16 +4719,16 @@
42704719 //System.out.println("cut " + child);
42714720 //System.out.println("parent = " + child.parent);
42724721 // tmp.addChild(child);
4273
- if (GrafreeD.clipboardIsTempGroup)
4722
+ if (Grafreed.clipboardIsTempGroup)
42744723 tGroup.add/*Child*/(tmp);
42754724 else
4276
- GrafreeD.clipboard = tmp;
4725
+ Grafreed.clipboard = tmp;
42774726 }
42784727 else
4279
- if (GrafreeD.clipboardIsTempGroup)
4728
+ if (Grafreed.clipboardIsTempGroup)
42804729 tGroup.add/*Child*/(child);
42814730 else
4282
- GrafreeD.clipboard = child;
4731
+ Grafreed.clipboard = child;
42834732 }
42844733
42854734 //ResetModel();
....@@ -4311,21 +4760,23 @@
43114760 //System.out.println("cut " + elem);
43124761 //System.out.println("parent = " + elem.parent);
43134762 // tmp.addChild(elem);
4314
- if (GrafreeD.clipboardIsTempGroup)
4763
+ if (Grafreed.clipboardIsTempGroup)
43154764 tGroup.add/*Child*/(tmp);
43164765 else
4317
- GrafreeD.clipboard = tmp;
4766
+ Grafreed.clipboard = tmp;
43184767 }
43194768 else
4320
- if (GrafreeD.clipboardIsTempGroup)
4769
+ if (Grafreed.clipboardIsTempGroup)
43214770 tGroup.add/*Child*/(child);
43224771 else
4323
- GrafreeD.clipboard = child;
4772
+ Grafreed.clipboard = child;
43244773 }
43254774
43264775 }
4327
- if (GrafreeD.clipboardIsTempGroup)
4328
- GrafreeD.clipboard = tGroup;
4776
+
4777
+ if (Grafreed.clipboardIsTempGroup)
4778
+ Grafreed.clipboard = tGroup;
4779
+
43294780 if (cut)
43304781 {
43314782 ResetModel();
....@@ -4339,7 +4790,7 @@
43394790 // return;
43404791 boolean first = true;
43414792
4342
- if (GrafreeD.clipboardIsTempGroup)
4793
+ if (Grafreed.clipboardIsTempGroup)
43434794 {
43444795 Composite temp;
43454796
....@@ -4350,7 +4801,7 @@
43504801 temp = (Composite)Applet3D.clipboard.deepCopy();
43514802 */
43524803 Object3D elem;
4353
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4804
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43544805 {
43554806 Object3D child = (Object3D)e.nextElement();
43564807
....@@ -4384,21 +4835,21 @@
43844835 //Object3D cb = Applet3D.clipboard;
43854836 //temp.addChild(cb);
43864837 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4387
- assert(GrafreeD.clipboard.parent == null);
4388
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4389
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4390
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4391
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4838
+ assert(Grafreed.clipboard.parent == null);
4839
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4840
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4841
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4842
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43924843 else
4393
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4394
- GrafreeD.clipboard.get(0).parent = keepparent;
4844
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4845
+ Grafreed.clipboard.get(0).parent = keepparent;
43954846 }
43964847
43974848 ResetModel();
43984849 refreshContents();
43994850 }
44004851
4401
- void pasteInto(boolean copyit)
4852
+ void pasteInto(boolean copyit, boolean clone)
44024853 {
44034854 // if (GrafreeD.clipboard == null)
44044855 // return;
....@@ -4427,15 +4878,22 @@
44274878 if (copyit)
44284879 {
44294880 // paste(false);
4430
- CloneClipboard(false); // sept 2014
4881
+ if (clone)
4882
+ {
4883
+ CloneClipboard(false); // sept 2014
4884
+ }
4885
+ else
4886
+ {
4887
+ paste(false);
4888
+ }
44314889 }
44324890 else
44334891 {
44344892 boolean first = true;
44354893
4436
- if (GrafreeD.clipboardIsTempGroup)
4894
+ if (Grafreed.clipboardIsTempGroup)
44374895 {
4438
- Composite temp = (Composite)GrafreeD.clipboard;
4896
+ Composite temp = (Composite)Grafreed.clipboard;
44394897 Object3D copy;
44404898 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44414899 {
....@@ -4445,7 +4903,7 @@
44454903 }
44464904 } else
44474905 {
4448
- linkSomething(GrafreeD.clipboard); //.get(0));
4906
+ linkSomething(Grafreed.clipboard); //.get(0));
44494907 }
44504908 }
44514909 }
....@@ -4850,21 +5308,6 @@
48505308 }
48515309 */
48525310
4853
- void ImportGFD()
4854
- {
4855
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4856
- browser.show();
4857
- String filename = browser.getFile();
4858
- if (filename != null && filename.length() > 0)
4859
- {
4860
- String fullname = browser.getDirectory() + filename;
4861
-
4862
- //Object3D readobj =
4863
- objEditor.ReadGFD(fullname, objEditor);
4864
- //makeSomething(readobj);
4865
- }
4866
- }
4867
-
48685311 /*
48695312 public void Callback(Object obj)
48705313 {
....@@ -4888,26 +5331,9 @@
48885331 }
48895332 */
48905333
4891
- void ImportVRMLX3D()
4892
- {
4893
- if (GrafreeD.standAlone)
4894
- {
4895
- /**/
4896
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4897
- browser.show();
4898
- String filename = browser.getFile();
4899
- if (filename != null && filename.length() > 0)
4900
- {
4901
- String fullname = browser.getDirectory() + filename;
4902
- LoadVRMLX3D(fullname);
4903
- }
4904
- /**/
4905
- }
4906
- }
4907
-
49085334 String GetFile(String dialogName)
49095335 {
4910
- if (GrafreeD.standAlone)
5336
+ if (Grafreed.standAlone)
49115337 {
49125338 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49135339 browser.show();
....@@ -4971,10 +5397,33 @@
49715397 cButton flashSelectionButton;
49725398 cButton editButton;
49735399 cButton uneditButton;
5400
+ JCheckBox allParamsButton;
49745401 cButton clearpanelButton;
4975
- cButton allParamsButton;
49765402 cButton unselectButton;
49775403
5404
+ cButton minButton;
5405
+ cButton maxButton;
5406
+ cButton fullButton;
5407
+ cButton undoButton;
5408
+ cButton redoButton;
5409
+ cButton saveButton;
5410
+ cButton oneStepButton;
5411
+
5412
+ cButton groupButton;
5413
+ cButton ungroupButton;
5414
+ cButton compositeButton;
5415
+
5416
+ cButton gridButton;
5417
+ cButton boxButton;
5418
+ cButton sphereButton;
5419
+ cButton coneButton;
5420
+ cButton torusButton;
5421
+ cButton superButton;
5422
+ cButton kleinButton;
5423
+ cButton particlesButton;
5424
+ cButton overlayButton;
5425
+ cButton lightButton;
5426
+
49785427 cButton screenfitButton;
49795428 cButton screenfitpointButton;
49805429 cButton snapobjectButton;
....@@ -4985,14 +5434,6 @@
49855434 cButton closeButton;
49865435
49875436 cButton setsupportButton;
4988
-
4989
- cButton twoButton;
4990
- cButton sixButton;
4991
- cButton threeButton;
4992
- cButton sevenButton;
4993
- cButton fourButton; // full panel
4994
- cButton oneButton; // full XYZ
4995
- //cButton currentLayout;
49965437
49975438 //
49985439 //Composite
....@@ -5005,7 +5446,9 @@
50055446 private MenuItem lookFromItem;
50065447 private MenuItem switchItem;
50075448 private MenuItem cutItem;
5008
- private MenuItem duplicateItem;
5449
+ private MenuItem undoItem;
5450
+ private MenuItem redoItem;
5451
+ private JMenuItem duplicateItem;
50095452 private MenuItem cloneItem;
50105453 private MenuItem cloneSupportItem;
50115454 private MenuItem overwriteGeoItem;
....@@ -5018,7 +5461,7 @@
50185461 private MenuItem linkverticesItem;
50195462 private MenuItem relinkverticesItem;
50205463 private MenuItem setMasterItem;
5021
- private MenuItem resetMeshItem;
5464
+ private MenuItem resetAllItem;
50225465 private MenuItem stepAllItem;
50235466 private MenuItem revertMeshItem;
50245467 private MenuItem poseMeshItem;
....@@ -5029,6 +5472,7 @@
50295472 private MenuItem mergeGeometriesItem;
50305473 private MenuItem copyItem;
50315474 private MenuItem pasteItem;
5475
+ private MenuItem pasteIntoItem;
50325476 private MenuItem pasteLinkItem;
50335477 private MenuItem pasteCloneItem;
50345478 private MenuItem pasteExpandItem;
....@@ -5067,6 +5511,10 @@
50675511 private MenuItem showleavesItem;
50685512 private MenuItem markleavesItem;
50695513 private MenuItem unmarkleavesItem;
5514
+ private MenuItem rewindleavesItem;
5515
+ private MenuItem unrewindleavesItem;
5516
+ private MenuItem randomleavesItem;
5517
+ private MenuItem unrandomleavesItem;
50705518
50715519 private MenuItem flipVItem;
50725520 private MenuItem unflipVItem;
....@@ -5078,8 +5526,10 @@
50785526 private MenuItem panoTexturesItem;
50795527
50805528 private MenuItem resetCentroidItem;
5081
- private MenuItem transformgeometryItem;
5529
+ private MenuItem resetCentroidXZItem;
50825530 private MenuItem resetTransformItem;
5531
+ private MenuItem transformGeometryItem;
5532
+ private MenuItem transformChildrenItem;
50835533 private MenuItem hideItem;
50845534 private MenuItem grabItem;
50855535 private MenuItem backItem;
....@@ -5126,7 +5576,7 @@
51265576 private MenuItem blobItem;
51275577 private MenuItem latheItem;
51285578 private MenuItem bezierItem;
5129
- private MenuItem checkerItem;
5579
+ private MenuItem overlayItem;
51305580 private MenuItem meshItem;
51315581 // private MenuItem meshGroupItem;
51325582 private MenuItem springItem;
....@@ -5148,11 +5598,6 @@
51485598 private MenuItem doubleItem;
51495599 private MenuItem tripleItem;
51505600
5151
- private MenuItem importGFDItem;
5152
- private MenuItem importVRMLX3DItem;
5153
- private MenuItem import3DSItem;
5154
- private MenuItem importOBJItem;
5155
-
51565601 private MenuItem computeAOItem;
51575602 private MenuItem recompileItem;
51585603 private MenuItem editScriptItem;
....@@ -5162,4 +5607,8 @@
51625607 private MenuItem analyzeItem;
51635608 private MenuItem dumpItem;
51645609 //boolean freezemodel = false;
5610
+
5611
+ Menu cameraMenu;
5612
+ MenuItem editCameraItem;
5613
+ MenuItem revertCameraItem;
51655614 }