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());
....@@ -436,96 +584,169 @@
436584 */
437585 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438586
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
440
- liveCB.setToolTipText("Enabled animation");
587
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588
+ //minButton.setToolTipText("Minimize window");
589
+ //minButton.addActionListener(this);
590
+
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");
441613 liveCB.addItemListener(this);
442614
443
- 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);
444626 trackCB.setToolTipText("Enable tracking");
445627 trackCB.addItemListener(this);
446628
447
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
629
+ oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
448630 screenfitButton.setToolTipText("Screen fit");
449631 screenfitButton.addActionListener(this);
450632
451633 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
452634 // 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;
458635
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);
465
- 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");
466645 flashSelectionButton.addActionListener(this);
467646
468
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
647
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
469648
470
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
471650 twoButton.setToolTipText("Show center view only");
472651 twoButton.addActionListener(this);
473
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
652
+ this.fullscreenLayout = twoButton;
653
+
654
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
474655 fourButton.addActionListener(this);
475656 fourButton.setToolTipText("Show left panel only");
476
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
657
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
477658 sixButton.setToolTipText("2-column layout left");
478659 sixButton.addActionListener(this);
479
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
660
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
480661 threeButton.setToolTipText("2-column layout right");
481662 threeButton.addActionListener(this);
482
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
663
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
483664 sevenButton.setToolTipText("3-column layout");
484665 sevenButton.addActionListener(this);
485666 //
486667
487
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- 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");
489670 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
671
+
672
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
492673 closeButton.setToolTipText("Close tab");
493674 closeButton.addActionListener(this);
494675 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495676 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497
-
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
500
- editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504677
505
- 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");
506731 uneditButton.addActionListener(this);
507732
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);
733
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
734
+ allParamsButton.setToolTipText("Edit all params");
520735 allParamsButton.addActionListener(this);
521736
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);
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");
527743 unselectButton.addActionListener(this);
528744
745
+ editCommandsPanel.preferredHeight = 1;
746
+
747
+// oe.treePanel.add(commandsPanel);
748
+// oe.treePanel.Return();
749
+
529750 // oe.aConstraints.gridx += 1;
530751 // oe.aConstraints.weighty = 0;
531752 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +758,37 @@
537758 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538759 // gcButton.addActionListener(this);
539760
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;
761
+ cGridBag jSPPanel = new cGridBag();
762
+
763
+ JScrollPane jSP;
551764 //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);
765
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
553766 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
767
+
768
+ oe.treePanel.add(jSPPanel);
769
+ oe.treePanel.Return();
558770
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);
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");
563775 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- 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");
566779 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- 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");
569783 textureCB.addItemListener(this);
570784
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
785
+ copyOptionsPanel.preferredHeight = 1;
786
+ oe.treePanel.add(copyOptionsPanel);
787
+ oe.treePanel.Return();
573788
789
+// mainPanel.setDividerLocation(0.5); //1.0);
790
+// mainPanel.setResizeWeight(0.5);
791
+
574792 //jList.addListSelectionListener(this);
575793 oe.jTree.addTreeSelectionListener(this);
576794 //jTree.setRootVisible(false);
....@@ -595,43 +813,35 @@
595813
596814 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597815 {
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;
627816 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628817 boxCB.setToolTipText("Display bounding boxes");
629818 boxCB.addItemListener(this);
630
- //constraints.gridy += 1;
819
+
631820 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632821 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633822 zoomBoxCB.addItemListener(this);
634823
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
+
635845 // constraints.gridy += 1;
636846 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
637847 // speakerMocapCB.addItemListener(this);
....@@ -656,20 +866,46 @@
656866 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657867 // debugCB.addItemListener(this);
658868
659
- //constraints.gridy += 1;
660869 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
870
+ oeilCB.setToolTipText("Move camera when tracking target");
661871 oeilCB.addItemListener(this);
662872
663
- //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
+ {
664883 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665884 lookAtCB.setToolTipText("Look-at target");
666885 lookAtCB.addItemListener(this);
886
+ }
887
+
888
+ }
889
+
890
+ cGridBag fill = new cGridBag();
891
+
892
+ fill.preferredHeight = 200;
893
+
894
+ panel.add(fill);
667895
668896 }
669897
670898 void EditObject(Object3D obj)
671899 {
672900 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
+
673909 radioButton.SetObject(obj);
674910 radioButton.layout = sevenButton;
675911 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -678,8 +914,11 @@
678914 buttonGroup.add(radioButton);
679915 radioButton.doClick();
680916 }
917
+
681918 void SetupViews(ObjEditor oe)
682919 {
920
+ theFrame = this;
921
+
683922 oe.SetupViews();
684923
685924 System.out.println("SetupViews");
....@@ -688,23 +927,26 @@
688927 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
689928 }
690929
691
- JCheckBox liveCB;
692
- JCheckBox supportCB;
693
- JCheckBox localCB;
694
- JCheckBox crowdCB;
695
- JCheckBox smoothCB;
696
- JCheckBox fastCB;
697
- JCheckBox slowCB;
698
- JCheckBox boxCB;
699
- JCheckBox zoomBoxCB;
700
- JCheckBox trackCB;
701
- 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;
702941 // JCheckBox speakerMocapCB;
703
- JCheckBox speakerCameraCB;
704
- JCheckBox speakerFocusCB;
705
- JCheckBox debugCB;
706
- JCheckBox oeilCB;
707
- JCheckBox lookAtCB;
942
+ cCheckBox speakerCameraCB;
943
+ cCheckBox speakerFocusCB;
944
+ cCheckBox debugCB;
945
+
946
+ cCheckBox oeilCB;
947
+ cCheckBox shadowCB;
948
+ cCheckBox autosaveCB;
949
+ cCheckBox lookAtCB;
708950
709951 // static int COLOR = 1;
710952 // static int MATERIAL = 2;
....@@ -712,9 +954,9 @@
712954
713955 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
714956
715
- JCheckBox colorCB;
716
- JCheckBox materialCB;
717
- JCheckBox textureCB;
957
+ cCheckBox colorCB;
958
+ cCheckBox materialCB;
959
+ cCheckBox textureCB;
718960
719961 public void itemStateChanged(ItemEvent e)
720962 {
....@@ -742,6 +984,7 @@
742984 } else if(e.getSource() == liveCB)
743985 {
744986 cameraView.ToggleLive();
987
+ refreshContents(false);
745988 }
746989 else if(e.getSource() == supportCB)
747990 {
....@@ -806,6 +1049,14 @@
8061049 {
8071050 cameraView.ToggleOeil();
8081051 }
1052
+ else if(e.getSource() == shadowCB)
1053
+ {
1054
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1055
+ }
1056
+ else if(e.getSource() == autosaveCB)
1057
+ {
1058
+ Globals.SAVEONMAKE ^= true;
1059
+ }
8091060 else if(e.getSource() == lookAtCB)
8101061 {
8111062 cameraView.ToggleLookAt();
....@@ -822,7 +1073,8 @@
8221073
8231074 /**/
8241075 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
825
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1076
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1077
+ TreePath path = objEditor.jTree.getSelectionPath();
8261078 if ((path == null) || (path.getPathCount() <= 1)) {
8271079 // We can't move the root node or an empty selection
8281080 return;
....@@ -894,7 +1146,9 @@
8941146 // objEditor.DropFile((java.io.File[]) object, true);
8951147 // return;
8961148 // }
897
- if (string.charAt(0) == '/')
1149
+
1150
+ // File path for Mac and Windows
1151
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8981152 {
8991153 // file(s)
9001154 String[] names = string.split("\n");
....@@ -921,7 +1175,7 @@
9211175
9221176 flashIt = false;
9231177 CameraPane pane = (CameraPane) target;
924
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1178
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9251179 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9261180
9271181 if (group.selection.size() == 1)
....@@ -944,16 +1198,16 @@
9441198 return;
9451199 }
9461200
947
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
948
- {
1201
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1202
+// {
9491203 loadClipboard(true);
9501204 objEditor.jTree.setSelectionPath(destinationPath);
951
- pasteInto(false);
952
- } else {
953
- loadClipboard(false);
954
- objEditor.jTree.setSelectionPath(destinationPath);
955
- pasteInto(false); // true); // ???
956
- }
1205
+ pasteInto(false, false);
1206
+// } else {
1207
+// loadClipboard(false);
1208
+// objEditor.jTree.setSelectionPath(destinationPath);
1209
+// pasteInto(false, false); // true); // ???
1210
+// }
9571211 }
9581212 public void dropActionChanged(DropTargetDragEvent dtde)
9591213 // Called if the user has modified the current drop gesture
....@@ -1074,27 +1328,33 @@
10741328 kleinItem.addActionListener(this);
10751329 particleItem = menu.add(new MenuItem("Particle system"));
10761330 particleItem.addActionListener(this);
1331
+ if (Globals.ADVANCED)
1332
+ {
10771333 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10781334 ragdollItem.addActionListener(this);
10791335 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10801336 ragdoll2Item.addActionListener(this);
1337
+ }
10811338 menu.add("-");
1082
- meshItem = menu.add(new MenuItem("Mesh"));
1339
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10831340 meshItem.addActionListener(this);
10841341 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10851342 // meshGroupItem.addActionListener(this);
1343
+ if (Globals.ADVANCED)
1344
+ {
10861345 springItem = menu.add(new MenuItem("Spring"));
10871346 springItem.addActionListener(this);
10881347 flagItem = menu.add(new MenuItem("Flag"));
10891348 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);
10941349 blobItem = menu.add(new MenuItem("Blob"));
10951350 blobItem.addActionListener(this);
10961351 latheItem = menu.add(new MenuItem("Lathe"));
10971352 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);
10981358 lightItem = menu.add(new MenuItem("Light"));
10991359 lightItem.addActionListener(this);
11001360 menu.add("-");
....@@ -1104,39 +1364,44 @@
11041364 loopItem.addActionListener(this);
11051365 doubleItem = menu.add(new MenuItem("Fork"));
11061366 doubleItem.addActionListener(this);
1367
+ if (Globals.ADVANCED)
1368
+ {
11071369 tripleItem = menu.add(new MenuItem("Trident"));
11081370 tripleItem.addActionListener(this);
1371
+ }
11091372 }
11101373
11111374 void buildToolsMenu(Menu menu)
11121375 {
11131376 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11141377 animationItem.addItemListener(this);
1115
- animationItem.setState(CameraPane.ANIMATION);
1378
+ animationItem.setState(Globals.ANIMATION);
11161379
11171380 menu.add("-");
11181381 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11191382 parseverticesItem.addActionListener(this);
11201383 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11211384 textureFieldItem.addActionListener(this);
1122
- alignItem = menu.add(new MenuItem("Align"));
1385
+ alignItem = menu.add(new MenuItem("Align Objects"));
11231386 alignItem.addActionListener(this);
1124
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1125
- mirrorItem.addActionListener(this);
11261387 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11271388 reduceMorphItem.addActionListener(this);
11281389 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11291390 reduce34MorphItem.addActionListener(this);
1130
-
1391
+ menu.add("-");
11311392 menu.add(computeAOItem = new MenuItem("Compute AO"));
11321393 computeAOItem.addActionListener(this);
1133
- menu.add("-");
11341394
1395
+ if (Globals.ADVANCED)
1396
+ {
1397
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1398
+ mirrorItem.addActionListener(this);
1399
+ menu.add("-");
11351400 menu.add(memoryItem = new MenuItem("Memory Usage"));
11361401 memoryItem.addActionListener(this);
11371402 menu.add(analyzeItem = new MenuItem("Analyze"));
11381403 analyzeItem.addActionListener(this);
1139
- menu.add(dumpItem = new MenuItem("Dump"));
1404
+ menu.add(dumpItem = new MenuItem("Print"));
11401405 dumpItem.addActionListener(this);
11411406 // menu.add(pathItem = new MenuItem("From-to path"));
11421407 // pathItem.addActionListener(this);
....@@ -1154,6 +1419,7 @@
11541419 menu.add("-");
11551420 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11561421 editScriptItem.addActionListener(this);
1422
+ }
11571423 }
11581424
11591425 void ScreenFit()
....@@ -1276,6 +1542,7 @@
12761542 shadow.material = new cMaterial(obj.material);
12771543 shadow.material.diffuse = 0.0001f;
12781544 shadow.material.specular = 0.0001f;
1545
+ //shadow.projectedVertices[1].x = 300;
12791546
12801547 makeSomething(shadow);
12811548 }
....@@ -1482,9 +1749,9 @@
14821749
14831750 void Overwrite(int mask)
14841751 {
1485
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1752
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14861753 {
1487
- Object3D content = GrafreeD.clipboard.get(0);
1754
+ Object3D content = Grafreed.clipboard.get(0);
14881755
14891756 if (content instanceof cGroup && ((cGroup)content).transientlink )
14901757 content = ((cGroup)content).get(0);
....@@ -1532,11 +1799,11 @@
15321799 objEditor.cameraView.renderCamera.setAim(v2, v1);
15331800 objEditor.cameraView.repaint();
15341801 } else
1535
- if (source == rectoidItem)
1802
+ if (source == rectoidItem || source == boxButton)
15361803 {
15371804 makeSomething(new Box());
15381805 } else
1539
- if (source == particleItem)
1806
+ if (source == particleItem || source == particlesButton)
15401807 {
15411808 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15421809 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1615,27 +1882,27 @@
16151882
16161883 makeSomething(obj);
16171884 } else
1618
- if (source == gridItem)
1885
+ if (source == gridItem || source == gridButton)
16191886 {
16201887 makeSomething(new Grid());
16211888 } else
1622
- if (source == ellipsoidItem)
1889
+ if (source == ellipsoidItem || source == sphereButton)
16231890 {
16241891 makeSomething(new Sphere());
16251892 } else
1626
- if (source == coneItem)
1893
+ if (source == coneItem || source == coneButton)
16271894 {
16281895 makeSomething(new Cone());
16291896 } else
1630
- if (source == torusItem)
1897
+ if (source == torusItem || source == torusButton)
16311898 {
16321899 makeSomething(new Torus());
16331900 } else
1634
- if (source == superItem)
1901
+ if (source == superItem || source == superButton)
16351902 {
16361903 makeSomething(new Superellipsoid());
16371904 } else
1638
- if (source == kleinItem)
1905
+ if (source == kleinItem || source == kleinButton)
16391906 {
16401907 makeSomething(new Klein());
16411908 } else
....@@ -1655,7 +1922,7 @@
16551922 {
16561923 makeSomething(new BezierSurface());
16571924 } else
1658
- if (source == checkerItem)
1925
+ if (source == overlayItem || source == overlayButton)
16591926 {
16601927 /*
16611928 Object3D obj = new BezierSurface(5,8);
....@@ -1703,7 +1970,7 @@
17031970 s.setup();
17041971 makeSomething(s);
17051972 } else
1706
- if (source == lightItem)
1973
+ if (source == lightItem || source == lightButton)
17071974 {
17081975 makeSomething(new Light());
17091976 } else
....@@ -1789,23 +2056,6 @@
17892056 csg.addChild(child);
17902057 child.addChild(csg);
17912058 } 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
18092059 if (source == computeAOItem)
18102060 {
18112061 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1824,7 +2074,7 @@
18242074 if (source == invariantsItem)
18252075 {
18262076 System.out.println("Invariants:");
1827
- GrafreeD.grafreeD.universe.invariants();
2077
+ Grafreed.grafreeD.universe.invariants();
18282078 } else
18292079 if (source == memoryItem)
18302080 {
....@@ -1842,6 +2092,35 @@
18422092 if (source == dumpItem)
18432093 {
18442094 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();
18452124 } else
18462125 if (source == screenfitButton)
18472126 {
....@@ -1892,12 +2171,20 @@
18922171 {
18932172 loadClipboard(true);
18942173 } else
2174
+ if (source == undoItem)
2175
+ {
2176
+ Undo();
2177
+ } else
2178
+ if (source == redoItem)
2179
+ {
2180
+ Redo();
2181
+ } else
18952182 if (source == duplicateItem)
18962183 {
1897
- Object3D keep = GrafreeD.clipboard;
2184
+ Object3D keep = Grafreed.clipboard;
18982185 loadClipboard(false);
18992186 paste(false);
1900
- GrafreeD.clipboard = keep;
2187
+ Grafreed.clipboard = keep;
19012188 } else
19022189 if (source == cloneItem)
19032190 {
....@@ -1915,13 +2202,17 @@
19152202 {
19162203 paste(false);
19172204 } else
2205
+ if (source == pasteIntoItem)
2206
+ {
2207
+ pasteInto(true, false);
2208
+ } else
19182209 if (source == pasteLinkItem)
19192210 {
1920
- pasteInto(false);
2211
+ pasteInto(false, false);
19212212 } else
19222213 if (source == pasteCloneItem)
19232214 {
1924
- pasteInto(true);
2215
+ pasteInto(true, true);
19252216 } else
19262217 if (source == pasteExpandItem)
19272218 {
....@@ -2113,9 +2404,9 @@
21132404 // group.selection.get(0).setMasterThis(content); // should be identity
21142405 // refreshContents();
21152406 // }
2116
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2407
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21172408 {
2118
- Object3D content = GrafreeD.clipboard.get(0);
2409
+ Object3D content = Grafreed.clipboard.get(0);
21192410
21202411 if (content instanceof cGroup && ((cGroup)content).transientlink )
21212412 content = ((cGroup)content).get(0);
....@@ -2123,11 +2414,11 @@
21232414 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21242415 for (int i=0; i<group.selection.size(); i++)
21252416 {
2126
- boolean random = CameraPane.RANDOM;
2127
- CameraPane.RANDOM = false; // parse all random nodes
2417
+ boolean random = CameraPane.SWITCH;
2418
+ CameraPane.SWITCH = false; // parse all random nodes
21282419 group.selection.get(i).linkVerticesThis(content);
21292420 // group.selection.get(i).setMasterThis(content); // should be identity
2130
- CameraPane.RANDOM = random;
2421
+ CameraPane.SWITCH = random;
21312422 }
21322423 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21332424 refreshContents();
....@@ -2137,20 +2428,20 @@
21372428 {
21382429 for (int i=0; i<group.selection.size(); i++)
21392430 {
2140
- boolean random = CameraPane.RANDOM;
2141
- CameraPane.RANDOM = false; // parse all random nodes
2431
+ boolean random = CameraPane.SWITCH;
2432
+ CameraPane.SWITCH = false; // parse all random nodes
21422433 group.selection.get(i).linkVerticesThis(null);
2143
- CameraPane.RANDOM = random;
2434
+ CameraPane.SWITCH = random;
21442435 }
21452436
21462437 refreshContents();
21472438 } else
21482439 if (source == relinkverticesItem)
21492440 {
2150
- boolean random = CameraPane.RANDOM;
2151
- CameraPane.RANDOM = false; // parse all random nodes
2441
+ boolean random = CameraPane.SWITCH;
2442
+ CameraPane.SWITCH = false; // parse all random nodes
21522443 group.selection.RelinkToSupport();
2153
- CameraPane.RANDOM = random;
2444
+ CameraPane.SWITCH = random;
21542445
21552446 refreshContents();
21562447 } else
....@@ -2165,9 +2456,9 @@
21652456 } else
21662457 if (source == setMasterItem)
21672458 {
2168
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2459
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21692460 {
2170
- Object3D content = GrafreeD.clipboard.get(0);
2461
+ Object3D content = Grafreed.clipboard.get(0);
21712462
21722463 if (content instanceof cGroup && ((cGroup)content).transientlink )
21732464 content = ((cGroup)content).get(0);
....@@ -2180,9 +2471,9 @@
21802471 {
21812472 if (group.selection.size() == 1)
21822473 {
2183
- if (GrafreeD.clipboard.size() == 1)
2474
+ if (Grafreed.clipboard.size() == 1)
21842475 {
2185
- Object3D content = GrafreeD.clipboard.get(0);
2476
+ Object3D content = Grafreed.clipboard.get(0);
21862477
21872478 if (content instanceof cGroup && ((cGroup)content).transientlink )
21882479 content = ((cGroup)content).get(0);
....@@ -2199,7 +2490,7 @@
21992490 {
22002491 RevertMeshes();
22012492 } else
2202
- if (source == resetMeshItem)
2493
+ if (source == resetAllItem)
22032494 {
22042495 ResetAll();
22052496 } else
....@@ -2248,7 +2539,7 @@
22482539 RandomNode random = new RandomNode();
22492540 group(random);
22502541 if (random.size() > 0)
2251
- random.name = random.get(0).name + "Rnd";
2542
+ random.name = random.get(0).name + "Switch";
22522543 } else
22532544 if (source == physicsItem)
22542545 {
....@@ -2365,7 +2656,7 @@
23652656 {
23662657 CastShadow(2);
23672658 } else
2368
- if (source == ungroupItem)
2659
+ if (source == ungroupItem || source == ungroupButton)
23692660 {
23702661 //ungroup();
23712662 for (int i=0; i<group.selection.size(); i++)
....@@ -2387,7 +2678,7 @@
23872678 } else
23882679 if (source == genNormalsMESHItem)
23892680 {
2390
- GenNormals(true); // TODO
2681
+ GenNormalsMESH();
23912682 } else
23922683 if (source == genNormalsORGANItem)
23932684 {
....@@ -2452,6 +2743,22 @@
24522743 if (source == unmarkleavesItem)
24532744 {
24542745 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);
24552762 } else
24562763 if (source == flipVItem)
24572764 {
....@@ -2537,9 +2844,13 @@
25372844 {
25382845 SmoothMesh();
25392846 } else
2540
- if (source == transformgeometryItem)
2847
+ if (source == transformGeometryItem)
25412848 {
25422849 TransformGeometry();
2850
+ } else
2851
+ if (source == transformChildrenItem)
2852
+ {
2853
+ TransformChildren();
25432854 } else
25442855 if (source == resetTransformItem)
25452856 {
....@@ -2547,7 +2858,11 @@
25472858 } else
25482859 if (source == resetCentroidItem)
25492860 {
2550
- ResetCentroid();
2861
+ ResetCentroid(true);
2862
+ } else
2863
+ if (source == resetCentroidXZItem)
2864
+ {
2865
+ ResetCentroid(false);
25512866 } else
25522867 if (source == resetParentItem)
25532868 {
....@@ -2679,6 +2994,10 @@
26792994 if (source == twoButton)
26802995 {
26812996 radio.layout = twoButton;
2997
+
2998
+ if (CameraPane.FULLSCREEN)
2999
+ fullscreenLayout = radio.layout;
3000
+
26823001 // bug
26833002 //gridPanel.setDividerLocation(1.0);
26843003 //bigPanel.setDividerLocation(0.0);
....@@ -2711,10 +3030,31 @@
27113030 bigThree.ClearUI();
27123031 bigThree.add(centralPanel);
27133032 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
+
27143051 } else
27153052 if (source == threeButton)
27163053 {
27173054 radio.layout = threeButton;
3055
+
3056
+ if (CameraPane.FULLSCREEN)
3057
+ fullscreenLayout = radio.layout;
27183058
27193059 // bigThree.remove(scenePanel);
27203060 // bigThree.remove(centralPanel);
....@@ -2747,10 +3087,15 @@
27473087 bigThree.add(centralPanel);
27483088 bigThree.add(XYZPanel);
27493089 bigThree.FlushUI();
3090
+
3091
+ cameraView.requestFocusInWindow();
27503092 } else
27513093 if (source == fourButton)
27523094 {
27533095 radio.layout = fourButton;
3096
+
3097
+ if (CameraPane.FULLSCREEN)
3098
+ fullscreenLayout = radio.layout;
27543099
27553100 // bigThree.remove(scenePanel);
27563101 // bigThree.remove(centralPanel);
....@@ -2782,10 +3127,15 @@
27823127 bigThree.ClearUI();
27833128 bigThree.add(scenePanel);
27843129 bigThree.FlushUI();
3130
+
3131
+ cameraView.requestFocusInWindow();
27853132 } else
27863133 if (source == sixButton)
27873134 {
27883135 radio.layout = sixButton;
3136
+
3137
+ if (CameraPane.FULLSCREEN)
3138
+ fullscreenLayout = radio.layout;
27893139
27903140 // bigThree.remove(scenePanel);
27913141 // bigThree.remove(centralPanel);
....@@ -2818,10 +3168,15 @@
28183168 bigThree.add(scenePanel);
28193169 bigThree.add(centralPanel);
28203170 bigThree.FlushUI();
3171
+
3172
+ cameraView.requestFocusInWindow();
28213173 } else
28223174 if (source == sevenButton)
28233175 {
28243176 radio.layout = sevenButton;
3177
+
3178
+ if (CameraPane.FULLSCREEN)
3179
+ fullscreenLayout = radio.layout;
28253180
28263181 // bigThree.remove(scenePanel);
28273182 // bigThree.remove(centralPanel);
....@@ -2855,6 +3210,8 @@
28553210 bigThree.add(centralPanel);
28563211 bigThree.add(XYZPanel);
28573212 bigThree.FlushUI();
3213
+
3214
+ cameraView.requestFocusInWindow();
28583215 } else
28593216 if (source == rootButton)
28603217 {
....@@ -2866,6 +3223,7 @@
28663223 EditObject(obj);
28673224 }
28683225
3226
+ cameraView.requestFocusInWindow();
28693227 refreshContents(true);
28703228 } else
28713229 if (source == closeButton)
....@@ -2875,18 +3233,27 @@
28753233 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
28763234 {
28773235 ab = (cRadio)e.nextElement();
2878
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3236
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
28793237 {
3238
+ // Patch to avoid bug with transparency.
3239
+ if (!ab.hadMaterial)
3240
+ {
3241
+ ab.object.material = null;
3242
+ }
3243
+
28803244 buttonGroup.remove(ab);
28813245 radioPanel.remove(ab);
28823246
2883
- ab.GetObject().editWindow = null;
3247
+ //ab.GetObject().editWindow = null;
3248
+ ab.GetObject().manipWindow = null;
28843249 // ab.GetObject().objectUI = null; // ?????????
28853250
28863251 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
28873252 break;
28883253 }
28893254 }
3255
+
3256
+ cameraView.requestFocusInWindow();
28903257 refreshContents(true);
28913258 } else
28923259 if (source == editItem || source == editButton)
....@@ -2903,9 +3270,9 @@
29033270 child.CloseUI();
29043271 listUI.remove(child);
29053272
2906
- child.editWindow = null; // ???????????
3273
+ //child.editWindow = null; // ???????????
29073274 }
2908
- objEditor.ctrlPanel.validate();
3275
+ objEditor.ctrlPanel.FlushUI();
29093276 //objEditor.jTree.clearSelection();
29103277 //objEditor.ResetSliders();
29113278 refreshContents(true);
....@@ -2989,7 +3356,11 @@
29893356 frontView.object = group;
29903357 sideView.object = group;
29913358 }
2992
- group.editWindow = this;
3359
+
3360
+// fix "+" issue
3361
+ //group.editWindow = this;
3362
+ group.manipWindow = this;
3363
+
29933364 /*
29943365 currentLayout = radio.layout;
29953366 if (currentLayout == null)
....@@ -3001,8 +3372,23 @@
30013372 //group.parent = null; // ROOT
30023373 //group.attributes = -1;
30033374 ResetModel();
3375
+
3376
+ cameraView.requestFocusInWindow();
30043377 refreshContents(true);
3005
- }
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
+ }
30063392 else
30073393 {
30083394 //return super.action(event, arg);
....@@ -3011,7 +3397,6 @@
30113397 }
30123398
30133399 boolean useclient = false;
3014
- cRadio radio;
30153400
30163401 void ToggleRoot()
30173402 {
....@@ -3063,6 +3448,28 @@
30633448 refreshContents();
30643449 }
30653450
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
+ }
30663473
30673474 void ResetTransform()
30683475 {
....@@ -3175,7 +3582,7 @@
31753582 refreshContents();
31763583 }
31773584
3178
- void ResetCentroid()
3585
+ void ResetCentroid(boolean full)
31793586 {
31803587 Object3D obj;
31813588 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3190,12 +3597,16 @@
31903597 LA.matIdentity(Object3D.mat);
31913598 obj.getBounds(minima, maxima, false);
31923599 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3193
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3600
+ if (full)
3601
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31943602 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31953603 obj.TransformMesh(Object3D.mat);
3604
+
31963605 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3197
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3606
+ if (full)
3607
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31983608 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3609
+
31993610 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32003611 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32013612 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3224,7 +3635,8 @@
32243635
32253636 int size = obj.MemorySize();
32263637
3227
- 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)");
32283640 }
32293641 }
32303642 catch (Exception e)
....@@ -3261,9 +3673,9 @@
32613673 obj = (Object3D)e.nextElement();
32623674
32633675 System.out.println("Object is: " + obj);
3264
- GrafreeD.AnalyzeObject(obj);
3676
+ Grafreed.AnalyzeObject(obj);
32653677 System.out.println("Boundary rep: " + obj.bRep);
3266
- GrafreeD.AnalyzeObject(obj.bRep);
3678
+ Grafreed.AnalyzeObject(obj.bRep);
32673679
32683680 // System.err.println((size/1024) + " KB is the size of " + obj);
32693681 }
....@@ -3305,6 +3717,13 @@
33053717 void GenNormals(boolean crease)
33063718 {
33073719 group.GenNormalsS(crease);
3720
+
3721
+ refreshContents();
3722
+ }
3723
+
3724
+ void GenNormalsMESH()
3725
+ {
3726
+ group.GenNormalsMeshS();
33083727
33093728 refreshContents();
33103729 }
....@@ -3477,8 +3896,8 @@
34773896
34783897 void ParseVertices()
34793898 {
3480
- boolean epsequal = GrafreeD.epsequal;
3481
- GrafreeD.epsequal = true;
3899
+ boolean epsequal = Grafreed.epsequal;
3900
+ Grafreed.epsequal = true;
34823901
34833902 for (int i=0; i<group.selection.size(); i++)
34843903 {
....@@ -3503,7 +3922,7 @@
35033922 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35043923 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35053924
3506
- g.add(GrafreeD.clipboard);
3925
+ g.add(Grafreed.clipboard);
35073926
35083927 buffer.add(g);
35093928 }
....@@ -3518,7 +3937,7 @@
35183937 makeSomething(buffer, i==group.selection.size()-1);
35193938 }
35203939
3521
- GrafreeD.epsequal = epsequal;
3940
+ Grafreed.epsequal = epsequal;
35223941
35233942 refreshContents();
35243943 }
....@@ -3536,7 +3955,16 @@
35363955 String pigment = Object3D.GetPigment(tex);
35373956 //String bump = Object3D.GetBump(tex);
35383957
3539
- 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
+ }
35403968
35413969 double s = v.s;
35423970
....@@ -3624,11 +4052,11 @@
36244052
36254053 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36264054
3627
- boolean random = CameraPane.RANDOM;
3628
- CameraPane.RANDOM = false; // parse all random nodes
4055
+ boolean random = CameraPane.SWITCH;
4056
+ CameraPane.SWITCH = false; // parse all random nodes
36294057 lowres.linkVerticesThis(null);
36304058 lowres.linkVerticesThis(sn);
3631
- CameraPane.RANDOM = random;
4059
+ CameraPane.SWITCH = random;
36324060
36334061 System.err.flush();
36344062
....@@ -3668,7 +4096,7 @@
36684096 return;
36694097
36704098 Object3D poses = group.selection.get(0);
3671
- Object3D ref = GrafreeD.clipboard.get(0);
4099
+ Object3D ref = Grafreed.clipboard.get(0);
36724100
36734101 Object3D newgroup = new Object3D("Po:" + poses.name);
36744102
....@@ -3862,9 +4290,9 @@
38624290
38634291 void ClipMesh()
38644292 {
3865
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4293
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38664294 {
3867
- Object3D content = GrafreeD.clipboard.get(0);
4295
+ Object3D content = Grafreed.clipboard.get(0);
38684296
38694297 if (content instanceof cGroup && ((cGroup)content).transientlink )
38704298 content = ((cGroup)content).get(0);
....@@ -3873,7 +4301,7 @@
38734301 // {
38744302 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38754303 // }
3876
- group.selection.ClipMesh(GrafreeD.clipboard);
4304
+ group.selection.ClipMesh(Grafreed.clipboard);
38774305 }
38784306 // group.selection.ClipMesh(GrafreeD.clipboard);
38794307 System.out.println("DONE.");
....@@ -3920,6 +4348,18 @@
39204348 void MarkLeaves(boolean hide)
39214349 {
39224350 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);
39234363 refreshContents();
39244364 }
39254365
....@@ -4005,10 +4445,10 @@
40054445 {
40064446 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
40074447 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4008
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4448
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40094449
40104450 Object3D elem = (Object3D)group.selection.elementAt(i);
4011
- if(elem != group)
4451
+ if(elem != group || !newWindow)
40124452 {
40134453 // if (!(elem instanceof Composite))
40144454 // newWindow = false;
....@@ -4098,7 +4538,6 @@
40984538 //case 702: // Event.LIST_DESELECT
40994539 group.deselectAll();
41004540 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4101
- objEditor.ClearInfo(); // .GetMaterial());
41024541 if (tps != null)
41034542 {
41044543 for (int i=0; i < tps.length; i++)
....@@ -4107,29 +4546,28 @@
41074546
41084547 //if (child.parent != null)
41094548 //child.parent.addSelectee(child);
4549
+ objEditor.SetMaterial(child);
41104550 group.addSelectee(child);
4111
- objEditor.SetMaterial(child); // .GetMaterial());
4112
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4113
- System.err.println("info : " + child.GetPath());
41144551 }
41154552 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4553
+// else
4554
+// {
4555
+// objEditor.SetMaterial(group); // .GetMaterial());
4556
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4557
+// System.err.println("info : " + group.GetPath());
4558
+// }
41224559
4123
- objEditor.SetText(); // jan 2014
4124
-
4125
- 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))
41264561 CameraPane.flash = true;
41274562
4128
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4563
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41294564 // a camera
41304565 {
4131
- CameraPane.camerachangeframe = 0; // don't refuse it
4132
- 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
+ }
41334571 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41344572 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41354573 }
....@@ -4142,6 +4580,26 @@
41424580
41434581 freezemodel = false;
41444582 }
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
+ }
41454603
41464604 void linkSomething(Object3D thing)
41474605 {
....@@ -4213,16 +4671,19 @@
42134671 {
42144672 if (group.selection.isEmpty())
42154673 return;
4216
- GrafreeD.clipboardIsTempGroup = false;
4674
+
4675
+ Grafreed.clipboardIsTempGroup = false;
42174676 Composite tGroup = null;
42184677 if (group.selection.size() > 0) // 1)
42194678 {
42204679 tGroup = new cGroup();
4221
- GrafreeD.clipboardIsTempGroup = true;
4680
+ Grafreed.clipboardIsTempGroup = true;
42224681 }
42234682
42244683 if (cut)
42254684 {
4685
+ if (Globals.SAVEONMAKE)
4686
+ Save();
42264687 //int indices[] = jList.getSelectedIndices();
42274688 //for (int i = indices.length - 1; i >= 0; i--)
42284689 //jList.remove(indices[i]);
....@@ -4258,16 +4719,16 @@
42584719 //System.out.println("cut " + child);
42594720 //System.out.println("parent = " + child.parent);
42604721 // tmp.addChild(child);
4261
- if (GrafreeD.clipboardIsTempGroup)
4722
+ if (Grafreed.clipboardIsTempGroup)
42624723 tGroup.add/*Child*/(tmp);
42634724 else
4264
- GrafreeD.clipboard = tmp;
4725
+ Grafreed.clipboard = tmp;
42654726 }
42664727 else
4267
- if (GrafreeD.clipboardIsTempGroup)
4728
+ if (Grafreed.clipboardIsTempGroup)
42684729 tGroup.add/*Child*/(child);
42694730 else
4270
- GrafreeD.clipboard = child;
4731
+ Grafreed.clipboard = child;
42714732 }
42724733
42734734 //ResetModel();
....@@ -4299,21 +4760,23 @@
42994760 //System.out.println("cut " + elem);
43004761 //System.out.println("parent = " + elem.parent);
43014762 // tmp.addChild(elem);
4302
- if (GrafreeD.clipboardIsTempGroup)
4763
+ if (Grafreed.clipboardIsTempGroup)
43034764 tGroup.add/*Child*/(tmp);
43044765 else
4305
- GrafreeD.clipboard = tmp;
4766
+ Grafreed.clipboard = tmp;
43064767 }
43074768 else
4308
- if (GrafreeD.clipboardIsTempGroup)
4769
+ if (Grafreed.clipboardIsTempGroup)
43094770 tGroup.add/*Child*/(child);
43104771 else
4311
- GrafreeD.clipboard = child;
4772
+ Grafreed.clipboard = child;
43124773 }
43134774
43144775 }
4315
- if (GrafreeD.clipboardIsTempGroup)
4316
- GrafreeD.clipboard = tGroup;
4776
+
4777
+ if (Grafreed.clipboardIsTempGroup)
4778
+ Grafreed.clipboard = tGroup;
4779
+
43174780 if (cut)
43184781 {
43194782 ResetModel();
....@@ -4327,7 +4790,7 @@
43274790 // return;
43284791 boolean first = true;
43294792
4330
- if (GrafreeD.clipboardIsTempGroup)
4793
+ if (Grafreed.clipboardIsTempGroup)
43314794 {
43324795 Composite temp;
43334796
....@@ -4338,7 +4801,7 @@
43384801 temp = (Composite)Applet3D.clipboard.deepCopy();
43394802 */
43404803 Object3D elem;
4341
- 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))
43424805 {
43434806 Object3D child = (Object3D)e.nextElement();
43444807
....@@ -4372,21 +4835,21 @@
43724835 //Object3D cb = Applet3D.clipboard;
43734836 //temp.addChild(cb);
43744837 //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());
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());
43804843 else
4381
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4382
- GrafreeD.clipboard.get(0).parent = keepparent;
4844
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4845
+ Grafreed.clipboard.get(0).parent = keepparent;
43834846 }
43844847
43854848 ResetModel();
43864849 refreshContents();
43874850 }
43884851
4389
- void pasteInto(boolean copyit)
4852
+ void pasteInto(boolean copyit, boolean clone)
43904853 {
43914854 // if (GrafreeD.clipboard == null)
43924855 // return;
....@@ -4415,15 +4878,22 @@
44154878 if (copyit)
44164879 {
44174880 // paste(false);
4418
- CloneClipboard(false); // sept 2014
4881
+ if (clone)
4882
+ {
4883
+ CloneClipboard(false); // sept 2014
4884
+ }
4885
+ else
4886
+ {
4887
+ paste(false);
4888
+ }
44194889 }
44204890 else
44214891 {
44224892 boolean first = true;
44234893
4424
- if (GrafreeD.clipboardIsTempGroup)
4894
+ if (Grafreed.clipboardIsTempGroup)
44254895 {
4426
- Composite temp = (Composite)GrafreeD.clipboard;
4896
+ Composite temp = (Composite)Grafreed.clipboard;
44274897 Object3D copy;
44284898 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44294899 {
....@@ -4433,7 +4903,7 @@
44334903 }
44344904 } else
44354905 {
4436
- linkSomething(GrafreeD.clipboard); //.get(0));
4906
+ linkSomething(Grafreed.clipboard); //.get(0));
44374907 }
44384908 }
44394909 }
....@@ -4838,21 +5308,6 @@
48385308 }
48395309 */
48405310
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
-
48565311 /*
48575312 public void Callback(Object obj)
48585313 {
....@@ -4876,26 +5331,9 @@
48765331 }
48775332 */
48785333
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
-
48965334 String GetFile(String dialogName)
48975335 {
4898
- if (GrafreeD.standAlone)
5336
+ if (Grafreed.standAlone)
48995337 {
49005338 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49015339 browser.show();
....@@ -4959,10 +5397,33 @@
49595397 cButton flashSelectionButton;
49605398 cButton editButton;
49615399 cButton uneditButton;
5400
+ JCheckBox allParamsButton;
49625401 cButton clearpanelButton;
4963
- cButton allParamsButton;
49645402 cButton unselectButton;
49655403
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
+
49665427 cButton screenfitButton;
49675428 cButton screenfitpointButton;
49685429 cButton snapobjectButton;
....@@ -4973,14 +5434,6 @@
49735434 cButton closeButton;
49745435
49755436 cButton setsupportButton;
4976
-
4977
- cButton twoButton;
4978
- cButton sixButton;
4979
- cButton threeButton;
4980
- cButton sevenButton;
4981
- cButton fourButton; // full panel
4982
- cButton oneButton; // full XYZ
4983
- //cButton currentLayout;
49845437
49855438 //
49865439 //Composite
....@@ -4993,7 +5446,9 @@
49935446 private MenuItem lookFromItem;
49945447 private MenuItem switchItem;
49955448 private MenuItem cutItem;
4996
- private MenuItem duplicateItem;
5449
+ private MenuItem undoItem;
5450
+ private MenuItem redoItem;
5451
+ private JMenuItem duplicateItem;
49975452 private MenuItem cloneItem;
49985453 private MenuItem cloneSupportItem;
49995454 private MenuItem overwriteGeoItem;
....@@ -5006,7 +5461,7 @@
50065461 private MenuItem linkverticesItem;
50075462 private MenuItem relinkverticesItem;
50085463 private MenuItem setMasterItem;
5009
- private MenuItem resetMeshItem;
5464
+ private MenuItem resetAllItem;
50105465 private MenuItem stepAllItem;
50115466 private MenuItem revertMeshItem;
50125467 private MenuItem poseMeshItem;
....@@ -5017,6 +5472,7 @@
50175472 private MenuItem mergeGeometriesItem;
50185473 private MenuItem copyItem;
50195474 private MenuItem pasteItem;
5475
+ private MenuItem pasteIntoItem;
50205476 private MenuItem pasteLinkItem;
50215477 private MenuItem pasteCloneItem;
50225478 private MenuItem pasteExpandItem;
....@@ -5055,6 +5511,10 @@
50555511 private MenuItem showleavesItem;
50565512 private MenuItem markleavesItem;
50575513 private MenuItem unmarkleavesItem;
5514
+ private MenuItem rewindleavesItem;
5515
+ private MenuItem unrewindleavesItem;
5516
+ private MenuItem randomleavesItem;
5517
+ private MenuItem unrandomleavesItem;
50585518
50595519 private MenuItem flipVItem;
50605520 private MenuItem unflipVItem;
....@@ -5066,8 +5526,10 @@
50665526 private MenuItem panoTexturesItem;
50675527
50685528 private MenuItem resetCentroidItem;
5069
- private MenuItem transformgeometryItem;
5529
+ private MenuItem resetCentroidXZItem;
50705530 private MenuItem resetTransformItem;
5531
+ private MenuItem transformGeometryItem;
5532
+ private MenuItem transformChildrenItem;
50715533 private MenuItem hideItem;
50725534 private MenuItem grabItem;
50735535 private MenuItem backItem;
....@@ -5114,7 +5576,7 @@
51145576 private MenuItem blobItem;
51155577 private MenuItem latheItem;
51165578 private MenuItem bezierItem;
5117
- private MenuItem checkerItem;
5579
+ private MenuItem overlayItem;
51185580 private MenuItem meshItem;
51195581 // private MenuItem meshGroupItem;
51205582 private MenuItem springItem;
....@@ -5136,11 +5598,6 @@
51365598 private MenuItem doubleItem;
51375599 private MenuItem tripleItem;
51385600
5139
- private MenuItem importGFDItem;
5140
- private MenuItem importVRMLX3DItem;
5141
- private MenuItem import3DSItem;
5142
- private MenuItem importOBJItem;
5143
-
51445601 private MenuItem computeAOItem;
51455602 private MenuItem recompileItem;
51465603 private MenuItem editScriptItem;
....@@ -5150,4 +5607,8 @@
51505607 private MenuItem analyzeItem;
51515608 private MenuItem dumpItem;
51525609 //boolean freezemodel = false;
5610
+
5611
+ Menu cameraMenu;
5612
+ MenuItem editCameraItem;
5613
+ MenuItem revertCameraItem;
51535614 }