Normand Briere
2019-06-23 8088590686a45e71278f9a52bb9cc37943dc0c37
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -83,7 +84,7 @@
8384
8485 void CloneSelection(boolean supports)
8586 {
86
- // Object3D keep = GraphreeD.clipboard;
87
+ // Object3D keep = GrafreeD.clipboard;
8788 //Object3D obj;
8889 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
8990 {
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GraphreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
102
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GraphreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GraphreeD.clipboard, false));
107
- GraphreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GraphreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,130 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
163
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
164
+ duplicateItem.addActionListener(this);
165
+ cloneItem = menu.add(new MenuItem("Clone"));
166
+ cloneItem.addActionListener(this);
167
+ if (Globals.ADVANCED)
168
+ {
169
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
170
+ cloneSupportItem.addActionListener(this);
171
+ }
172
+ menu.add("-");
173
+ cutItem = menu.add(new MenuItem("Cut"));
174
+ cutItem.addActionListener(this);
175
+ copyItem = menu.add(new MenuItem("Copy"));
176
+ copyItem.addActionListener(this);
177
+ pasteItem = menu.add(new MenuItem("Paste"));
178
+ pasteItem.addActionListener(this);
179
+ menu.add("-");
180
+
181
+ menu.add("-");
182
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
183
+ pasteIntoItem.addActionListener(this);
184
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
185
+ pasteLinkItem.addActionListener(this);
186
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
187
+ pasteCloneItem.addActionListener(this);
188
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189
+// pasteExpandItem.addActionListener(this);
190
+ menu.add("-");
191
+ clearItem = menu.add(new MenuItem("Clear"));
192
+ clearItem.addActionListener(this);
193
+
194
+ if (Globals.ADVANCED)
195
+ {
196
+ // Deletes the cameras...
197
+ clearAllItem = menu.add(new MenuItem("Clear All"));
198
+ clearAllItem.addActionListener(this);
199
+ }
200
+
201
+ menuBar.add(cameraMenu = new Menu("View"));
202
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
203
+ //zBufferItem.addActionListener(this);
204
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205
+ //normalLensItem.addActionListener(this);
206
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
+ revertCameraItem.addActionListener(this);
208
+
209
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
+ toggleFullScreenItem.addItemListener(this);
211
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
+ cameraMenu.add("-");
213
+
214
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
+ toggleTextureItem.addItemListener(this);
216
+ toggleTextureItem.setState(CameraPane.textureon);
217
+
218
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
+ toggleSwitchItem.addItemListener(this);
220
+ toggleSwitchItem.setState(CameraPane.SWITCH);
221
+
222
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
223
+ toggleHandleItem.addItemListener(this);
224
+ toggleHandleItem.setState(CameraPane.HANDLES);
225
+
226
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
227
+ togglePaintItem.addItemListener(this);
228
+ togglePaintItem.setState(CameraPane.PAINTMODE);
229
+
230
+ if (Globals.ADVANCED)
231
+ {
232
+ cameraMenu.add("-");
233
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
234
+ toggleLiveItem.addItemListener(this);
235
+ toggleLiveItem.setState(Globals.isLIVE());
236
+
237
+ cameraMenu.add(stepItem = new MenuItem("Step"));
238
+ stepItem.addActionListener(this);
239
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
240
+ // toggleDLItem.addItemListener(this);
241
+ // toggleDLItem.setState(false);
242
+
243
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
244
+ toggleRenderItem.addItemListener(this);
245
+ toggleRenderItem.setState(!CameraPane.frozen);
246
+
247
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248
+ toggleDebugItem.addItemListener(this);
249
+ toggleDebugItem.setState(Globals.DEBUG);
250
+
251
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252
+ toggleFrustumItem.addItemListener(this);
253
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
254
+
255
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
256
+ toggleFootContactItem.addItemListener(this);
257
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
258
+
259
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
260
+ toggleTimelineItem.addItemListener(this);
261
+ }
262
+
263
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
264
+// toggleRootItem.addItemListener(this);
265
+// toggleRootItem.setState(false);
266
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
267
+// animationItem.addItemListener(this);
268
+// animationItem.setState(CameraPane.ANIMATION);
269
+ cameraMenu.add("-");
270
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
271
+ editCameraItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
152275 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153276 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154277 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +283,17 @@
160283 lookAtItem.addActionListener(this);
161284 //lookFromItem.addActinoListener(this);
162285 //switchItem.addActionListener(this);
163
- Menu menu;
164
- oe.menuBar.add(menu = new Menu("Edit"));
165
- //editItem = menu.add(new MenuItem("Edit"));
166
- //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
168
- duplicateItem.addActionListener(this);
169
- menu.add("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175
- cutItem = menu.add(new MenuItem("Cut"));
176
- cutItem.addActionListener(this);
177
- copyItem = menu.add(new MenuItem("Copy"));
178
- copyItem.addActionListener(this);
179
- pasteItem = menu.add(new MenuItem("Paste"));
180
- pasteItem.addActionListener(this);
181
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
182
- pasteLinkItem.addActionListener(this);
183
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184
- pasteCloneItem.addActionListener(this);
185
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186
-// pasteExpandItem.addActionListener(this);
187
- clearItem = menu.add(new MenuItem("Clear"));
188
- clearItem.addActionListener(this);
189
- clearAllItem = menu.add(new MenuItem("Clear All"));
190
- clearAllItem.addActionListener(this);
191
-
286
+ }
287
+
192288 oe.menuBar.add(menu = new Menu("Setting"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
289
+ if (Globals.ADVANCED)
290
+ {
197291 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198292 revertMeshItem.addActionListener(this);
199293 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200294 resetreferencesItem.addActionListener(this);
201295 menu.add("-");
296
+ }
202297 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203298 overwriteGeoItem.addActionListener(this);
204299 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,48 +305,68 @@
210305 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211306 overwriteUVItem.addActionListener(this);
212307 menu.add("-");
308
+ if (Globals.ADVANCED)
309
+ {
213310 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214311 generateMeshItem.addActionListener(this);
215312 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216313 poseMeshItem.addActionListener(this);
217314 menu.add("-");
315
+ }
218316 resetsupportItem = menu.add(new MenuItem("Reset support"));
219317 resetsupportItem.addActionListener(this);
220318 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221319 linkverticesItem.addActionListener(this);
320
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
321
+ relinkverticesItem.addActionListener(this);
322
+
323
+ if (Globals.ADVANCED)
324
+ {
222325 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223326 setMasterItem.addActionListener(this);
327
+ }
224328
225329 oe.menuBar.add(menu = new Menu("Group"));
226330 grabItem = menu.add(new MenuItem("Grab"));
227331 grabItem.addActionListener(this);
228
- frontItem = menu.add(new MenuItem("Front"));
229
- frontItem.addActionListener(this);
230332 backItem = menu.add(new MenuItem("Back"));
231333 backItem.addActionListener(this);
334
+ frontItem = menu.add(new MenuItem("Front"));
335
+ frontItem.addActionListener(this);
232336 compositeItem = menu.add(new MenuItem("Composite"));
233337 compositeItem.addActionListener(this);
338
+ hideItem = menu.add(new MenuItem("Hidden Group"));
339
+ hideItem.addActionListener(this);
340
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
341
+ ungroupItem.addActionListener(this);
234342 menu.add("-");
235
- randomItem = menu.add(new MenuItem("Random"));
343
+ randomItem = menu.add(new MenuItem("Switch node"));
236344 randomItem.addActionListener(this);
237
- physicsItem = menu.add(new MenuItem("Physics"));
238
- physicsItem.addActionListener(this);
239
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
240
- frameselectorItem.addActionListener(this);
241345 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
242346 switchGeoItem.addActionListener(this);
243347 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
244348 switchTransfoItem.addActionListener(this);
245
- morphItem = menu.add(new MenuItem("Morph"));
349
+ morphItem = menu.add(new MenuItem("Morph Group"));
246350 morphItem.addActionListener(this);
351
+
352
+ if (Globals.ADVANCED)
353
+ {
354
+ menu.add("-");
355
+ physicsItem = menu.add(new MenuItem("Physics"));
356
+ physicsItem.addActionListener(this);
357
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
358
+ frameselectorItem.addActionListener(this);
247359 scriptNodeItem = menu.add(new MenuItem("Script Node"));
248360 scriptNodeItem.addActionListener(this);
249361 cameraItem = menu.add(new MenuItem("Camera"));
250362 cameraItem.addActionListener(this);
363
+ }
251364
252365 oe.menuBar.add(menu = new Menu("Object"));
253366 textureItem = menu.add(new MenuItem("Texture"));
254367 textureItem.addActionListener(this);
368
+ billboardItem = menu.add(new MenuItem("Billboard"));
369
+ billboardItem.addActionListener(this);
255370 csgItem = menu.add(new MenuItem("CSG"));
256371 csgItem.addActionListener(this);
257372 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -260,23 +375,29 @@
260375 shadowYItem.addActionListener(this);
261376 shadowZItem = menu.add(new MenuItem("Shadow Z"));
262377 shadowZItem.addActionListener(this);
378
+ if (Globals.ADVANCED)
379
+ {
380
+ menu.add("-");
263381 linkerItem = menu.add(new MenuItem("Linker"));
264382 linkerItem.addActionListener(this);
265
- templateItem = menu.add(new MenuItem("Template"));
266
- templateItem.addActionListener(this);
267383 attributeItem = menu.add(new MenuItem("Attribute"));
268384 attributeItem.addActionListener(this);
385
+ templateItem = menu.add(new MenuItem("Template"));
386
+ templateItem.addActionListener(this);
269387 pointflowItem = menu.add(new MenuItem("Point Flow"));
270388 pointflowItem.addActionListener(this);
389
+ }
271390 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
274391 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275392 resetTransformItem.addActionListener(this);
276393 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277394 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
395
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
396
+ resetCentroidXZItem.addActionListener(this);
397
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
398
+ transformGeometryItem.addActionListener(this);
399
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
400
+ transformChildrenItem.addActionListener(this);
280401
281402 oe.menuBar.add(menu = new Menu("Geometry"));
282403 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -285,6 +406,13 @@
285406 genNormalsORGANItem.addActionListener(this);
286407 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
287408 genNormalsCADItem.addActionListener(this);
409
+ genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
410
+ genNormalsMESHItem.addActionListener(this);
411
+ if (Globals.ADVANCED)
412
+ {
413
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
414
+ genNormalsMINEItem.addActionListener(this);
415
+ }
288416 stripifyItem = menu.add(new MenuItem("Stripify"));
289417 stripifyItem.addActionListener(this);
290418 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -306,23 +434,34 @@
306434 reduce34MeshItem.addActionListener(this);
307435 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
308436 increaseMeshItem.addActionListener(this);
309
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
310
- smoothMeshItem.addActionListener(this);
311437 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
312438 clipMeshItem.addActionListener(this);
439
+
440
+ if (Globals.ADVANCED)
441
+ {
442
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
443
+ smoothMeshItem.addActionListener(this);
444
+ }
313445
314446 oe.menuBar.add(menu = new Menu("Attributes"));
315447 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
316448 clearMaterialsItem.addActionListener(this);
449
+ resetAllItem = menu.add(new MenuItem("Reset All"));
450
+ resetAllItem.addActionListener(this);
451
+ stepAllItem = menu.add(new MenuItem("Step All"));
452
+ stepAllItem.addActionListener(this);
317453 menu.add("-");
318454 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
319455 liveleavesItem.addActionListener(this);
320456 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
321457 unliveleavesItem.addActionListener(this);
458
+ if (Globals.ADVANCED)
459
+ {
322460 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
323461 supportleavesItem.addActionListener(this);
324462 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
325463 unsupportleavesItem.addActionListener(this);
464
+ }
326465 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
327466 hideleavesItem.addActionListener(this);
328467 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -331,6 +470,14 @@
331470 markleavesItem.addActionListener(this);
332471 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
333472 unmarkleavesItem.addActionListener(this);
473
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
474
+ rewindleavesItem.addActionListener(this);
475
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
476
+ unrewindleavesItem.addActionListener(this);
477
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
478
+ randomleavesItem.addActionListener(this);
479
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
480
+ unrandomleavesItem.addActionListener(this);
334481 menu.add("-");
335482 flipVItem = menu.add(new MenuItem("Flip V"));
336483 flipVItem.addActionListener(this);
....@@ -366,35 +513,40 @@
366513 sortbynameItem = menu.add(new MenuItem("Sort by name"));
367514 sortbynameItem.addActionListener(this);
368515 menu.add("-");
516
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
517
+ shareGeometriesItem.addActionListener(this);
518
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
519
+ mergeGeometriesItem.addActionListener(this);
520
+ if (Globals.ADVANCED)
521
+ {
522
+ // Pretty much the same as duplicate and clone.
369523 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
370524 extractGeometriesItem.addActionListener(this);
371525 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
372526 cloneGeometriesItem.addActionListener(this);
373
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
374
- shareGeometriesItem.addActionListener(this);
375
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
376
- mergeGeometriesItem.addActionListener(this);
527
+ }
377528
378529 oe.menuBar.add(menu = new Menu("Insert"));
379530 buildCreateMenu(menu);
380531
381
-
382
- oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GraphreeD Object..."));
384
- importGFDItem.addActionListener(this);
385
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386
- importVRMLX3DItem.addActionListener(this);
387
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
388
- importOBJItem.addActionListener(this);
389
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
390
- import3DSItem.addActionListener(this);
391
-
392532 oe.menuBar.add(menu = new Menu("Tools"));
393533 buildToolsMenu(menu);
394534 }
395535
396536 void SetupUI2(ObjEditor oe)
397537 {
538
+ // June 2019
539
+ if (oe == null)
540
+ {
541
+ //super.SetupUI2(this);
542
+ //return;
543
+ }
544
+
545
+ if (copy != group)
546
+ {
547
+ //super.SetupUI2(this);
548
+ }
549
+
398550 //new Exception().printStackTrace();
399551
400552 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -423,150 +575,122 @@
423575 oe.radioPanel.add(dummyButton);
424576 oe.buttonGroup.add(dummyButton);
425577 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
578
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429579
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
580
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
581
+ //minButton.setToolTipText("Minimize window");
582
+ //minButton.addActionListener(this);
583
+
584
+ oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
+ maxButton.setToolTipText("Maximize window");
586
+ maxButton.addActionListener(this);
587
+
588
+ oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
589
+ fullButton.setToolTipText("Full-screen window");
590
+ fullButton.addActionListener(this);
591
+
592
+ oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
593
+ undoButton.setToolTipText("Undo changes");
594
+ undoButton.addActionListener(this);
595
+
596
+ oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
+ redoButton.setToolTipText("Redo changes");
598
+ redoButton.addActionListener(this);
599
+
600
+ oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
601
+ saveButton.setToolTipText("Save changes");
602
+ saveButton.addActionListener(this);
603
+
604
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
605
+ liveCB.setToolTipText("Enable animation");
431606 liveCB.addItemListener(this);
432607
433
- oe.aConstraints.gridx += 1;
434
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
435
- supportCB.addItemListener(this);
436
-
437
- // oe.aConstraints.gridx += 1;
438
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
439
- // localCB.addItemListener(this);
440
-
441
- oe.aConstraints.gridx += 1;
442
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
443
- crowdCB.addItemListener(this);
444
-
445
- oe.aConstraints.gridx += 1;
446
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
447
- smoothCB.addItemListener(this);
448
-
449
- oe.aConstraints.gridx += 1;
450
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
608
+ oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
+ oneStepButton.setToolTipText("Animate one step forward");
610
+ oneStepButton.addActionListener(this);
611
+
612
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
613
+ fastCB.setToolTipText("Fast mode");
451614 fastCB.addItemListener(this);
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
454
- slowCB.addItemListener(this);
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
457
- boxCB.addItemListener(this);
458
-
459
-// oe.aConstraints.gridx += 1;
460
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
461
-// speakerMocapCB.addItemListener(this);
462
-
463
- if (false)
464
- {
465
- // handled in scripts
466
- oe.aConstraints.gridx += 1;
467
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
468
- speakerCameraCB.addItemListener(this);
469
-
470
- oe.aConstraints.gridx += 1;
471
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
472
- speakerFocusCB.addItemListener(this);
473
-
474
- oe.aConstraints.gridx += 1;
475
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
476
- smoothfocusCB.addItemListener(this);
477
- }
478
-
479
-//oe.aConstraints.gridx += 1;
480
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
481
-// debugCB.addItemListener(this);
482
-
483
- oe.aConstraints.gridx += 1;
484
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
485
- oeilCB.addItemListener(this);
486
-
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
489
- lookAtCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
615
+
616
+ oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints);
617
+ trackCB.setToolTipText("Enable tracking");
493618 trackCB.addItemListener(this);
494619
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
620
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
621
+ screenfitButton.setToolTipText("Screen fit");
497622 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
623
+
499624 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500625 // screenfitpointButton.addActionListener(this);
501
-// oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
503
- snapobjectButton.addActionListener(this);
504
- oe.aConstraints.gridx += 1;
505626
506
- //aConstraints.gridx = 0;
507
- //aConstraints.gridy += 1;
508
- oe.aConstraints.weighty = 0;
509
- oe.aConstraints.gridwidth = 1;
510
-
511
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
627
+ if (Globals.ADVANCED)
628
+ {
629
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
+ snapobjectButton.addActionListener(this);
631
+ snapobjectButton.setToolTipText("Snap Object");
632
+ }
633
+
634
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
635
+ flashSelectionButton.setToolTipText("Show selection");
512636 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516637
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
638
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
639
+
640
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641
+ twoButton.setToolTipText("Show center view only");
519642 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
643
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521644 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
645
+ fourButton.setToolTipText("Show left panel only");
646
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
647
+ sixButton.setToolTipText("2-column layout left");
523648 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
+ threeButton.setToolTipText("2-column layout right");
525651 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
652
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
653
+ sevenButton.setToolTipText("3-column layout");
527654 sevenButton.addActionListener(this);
528655 //
529656
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
657
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
658
+ rootButton.setToolTipText("Edit selection in new tab");
531659 rootButton.addActionListener(this);
532
- oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
660
+
661
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
+ closeButton.setToolTipText("Close tab");
534663 closeButton.addActionListener(this);
535664 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536665 //clearButton.addActionListener(this);
537
- oe.aConstraints.gridx += 1;
538666
539
- oe.aConstraints.gridx = 1; //
540
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
667
+ cGridBag commandsPanel = new cGridBag();
668
+
669
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ editButton.setToolTipText("Edit selection");
541671 editButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545672
546
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
673
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
674
+ uneditButton.setToolTipText("Unedit selection");
547675 uneditButton.addActionListener(this);
548676
549
- oe.aConstraints.gridx += 1;
550
- oe.aConstraints.weighty = 0;
551
- oe.aConstraints.gridwidth = 1;
552
-
553
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
554
- clearPanelButton.addActionListener(this);
555
-
556
- oe.aConstraints.gridx += 1;
557
- oe.aConstraints.weighty = 0;
558
- oe.aConstraints.gridwidth = 1;
559
-
560
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
677
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
678
+ allParamsButton.setToolTipText("Edit all params");
561679 allParamsButton.addActionListener(this);
562680
563
- oe.aConstraints.gridx += 1;
564
- oe.aConstraints.weighty = 0;
565
- oe.aConstraints.gridwidth = 1;
566
-
567
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
681
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682
+ clearPanelButton.setToolTipText("Clear edit panel");
683
+ clearPanelButton.addActionListener(this);
684
+
685
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
686
+ unselectButton.setToolTipText("Unselect");
568687 unselectButton.addActionListener(this);
569688
689
+ commandsPanel.preferredHeight = 1;
690
+
691
+ oe.treePanel.add(commandsPanel);
692
+ oe.treePanel.Return();
693
+
570694 // oe.aConstraints.gridx += 1;
571695 // oe.aConstraints.weighty = 0;
572696 // oe.aConstraints.gridwidth = 1;
....@@ -578,40 +702,37 @@
578702 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
579703 // gcButton.addActionListener(this);
580704
581
- oe.aConstraints.gridx = 0;
582
- oe.aConstraints.gridy += 1;
583
-
584
- //ctrlPanel.add(objList = new List(5, true));
585
- oe.aConstraints.gridwidth = 100;
586
- // oe.aConstraints.gridheight = 100;
587
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
588
- oe.aConstraints.gridheight = 1;
589
- oe.aConstraints.weighty = 0.5;
590
- oe.aConstraints.gridx = 0;
591
- JScrollPane jSP;
705
+ cGridBag jSPPanel = new cGridBag();
706
+
707
+ JScrollPane jSP;
592708 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
593
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
709
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
594710 ResetModel();
595
- oe.aConstraints.weighty = 0.5;
596
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
597
- oe.aConstraints.gridy += 1;
598
- oe.aConstraints.gridwidth = 1;
711
+
712
+ oe.treePanel.add(jSPPanel);
713
+ oe.treePanel.Return();
599714
600
- oe.aConstraints.weighty = 0;
601
- oe.aConstraints.gridwidth = 2;
602
-
603
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
715
+ cGridBag copyOptionsPanel = new cGridBag();
716
+
717
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
718
+ colorCB.setToolTipText("Copy color when dropped");
604719 colorCB.addItemListener(this);
605
- oe.aConstraints.gridx += 2;
606
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
720
+
721
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
722
+ materialCB.setToolTipText("Copy material when dropped");
607723 materialCB.addItemListener(this);
608
- oe.aConstraints.gridx += 2;
609
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
724
+
725
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
726
+ textureCB.setToolTipText("Copy texture when dropped");
610727 textureCB.addItemListener(this);
611728
612
- oe.aConstraints.gridx = 0;
613
- oe.aConstraints.gridy += 1;
729
+ copyOptionsPanel.preferredHeight = 1;
730
+ oe.treePanel.add(copyOptionsPanel);
731
+ oe.treePanel.Return();
614732
733
+// mainPanel.setDividerLocation(0.5); //1.0);
734
+// mainPanel.setResizeWeight(0.5);
735
+
615736 //jList.addListSelectionListener(this);
616737 oe.jTree.addTreeSelectionListener(this);
617738 //jTree.setRootVisible(false);
....@@ -633,20 +754,95 @@
633754 radio.layout = sevenButton;
634755 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635756 }
757
+
758
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
759
+ {
760
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
761
+ boxCB.setToolTipText("Display bounding boxes");
762
+ boxCB.addItemListener(this);
763
+
764
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
765
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
766
+ zoomBoxCB.addItemListener(this);
767
+
768
+ if (true) // Globals.ADVANCED)
769
+ {
770
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
771
+ supportCB.setToolTipText("Enable rigging");
772
+ supportCB.addItemListener(this);
773
+
774
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
775
+ // localCB.addItemListener(this);
776
+
777
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
778
+ crowdCB.setToolTipText("Used for crowds");
779
+ crowdCB.addItemListener(this);
780
+
781
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
782
+ smoothCB.setToolTipText("Snapping delay");
783
+ smoothCB.addItemListener(this);
784
+
785
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
786
+ slowCB.setToolTipText("Smooth interpolation");
787
+ slowCB.addItemListener(this);
788
+
789
+// constraints.gridy += 1;
790
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
791
+// speakerMocapCB.addItemListener(this);
792
+
793
+ if (false)
794
+ {
795
+ // handled in scripts
796
+ //constraints.gridy += 1;
797
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
798
+ speakerCameraCB.addItemListener(this);
799
+
800
+ //constraints.gridy += 1;
801
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
802
+ speakerFocusCB.addItemListener(this);
803
+
804
+ //constraints.gridy += 1;
805
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
806
+ smoothfocusCB.addItemListener(this);
807
+ }
808
+
809
+//constraints.gridx += 1;
810
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
811
+// debugCB.addItemListener(this);
812
+
813
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
814
+ oeilCB.addItemListener(this);
815
+
816
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
817
+ lookAtCB.setToolTipText("Look-at target");
818
+ lookAtCB.addItemListener(this);
819
+
820
+ }
821
+
822
+ cGridBag fill = new cGridBag();
823
+
824
+ fill.preferredHeight = 200;
825
+
826
+ panel.add(fill);
827
+
828
+ }
636829
637830 void EditObject(Object3D obj)
638831 {
639
- cRadio dummyButton = new cRadio(obj.name);
640
- dummyButton.SetObject(obj);
641
- dummyButton.layout = sevenButton;
642
- dummyButton.SetCamera(cameraView.renderCamera, false);
643
- dummyButton.addActionListener(this);
644
- radioPanel.add(dummyButton);
645
- buttonGroup.add(dummyButton);
646
- dummyButton.doClick();
832
+ cRadio radioButton = new cRadio(obj.name);
833
+ radioButton.SetObject(obj);
834
+ radioButton.layout = sevenButton;
835
+ radioButton.SetCamera(cameraView.renderCamera, false);
836
+ radioButton.addActionListener(this);
837
+ radioPanel.add(radioButton);
838
+ buttonGroup.add(radioButton);
839
+ radioButton.doClick();
647840 }
841
+
648842 void SetupViews(ObjEditor oe)
649843 {
844
+ theFrame = this;
845
+
650846 oe.SetupViews();
651847
652848 System.out.println("SetupViews");
....@@ -663,6 +859,7 @@
663859 JCheckBox fastCB;
664860 JCheckBox slowCB;
665861 JCheckBox boxCB;
862
+ JCheckBox zoomBoxCB;
666863 JCheckBox trackCB;
667864 JCheckBox smoothfocusCB;
668865 // JCheckBox speakerMocapCB;
....@@ -705,10 +902,10 @@
705902 dropAttributes |= Object3D.TEXTURE;
706903 else
707904 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
905
+ } else if(e.getSource() == liveCB)
710906 {
711907 cameraView.ToggleLive();
908
+ refreshContents(false);
712909 }
713910 else if(e.getSource() == supportCB)
714911 {
....@@ -743,6 +940,10 @@
743940 Recompile();
744941 cameraView.repaint();
745942 // refreshContents();
943
+ }
944
+ else if(e.getSource() == zoomBoxCB)
945
+ {
946
+ cameraView.ToggleZoomBoxMode();
746947 }
747948 else if(e.getSource() == smoothfocusCB)
748949 {
....@@ -857,7 +1058,9 @@
8571058 // objEditor.DropFile((java.io.File[]) object, true);
8581059 // return;
8591060 // }
860
- if (string.charAt(0) == '/')
1061
+
1062
+ // File path for Mac and Windows
1063
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8611064 {
8621065 // file(s)
8631066 String[] names = string.split("\n");
....@@ -884,7 +1087,7 @@
8841087
8851088 flashIt = false;
8861089 CameraPane pane = (CameraPane) target;
887
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1090
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
8881091 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
8891092
8901093 if (group.selection.size() == 1)
....@@ -911,11 +1114,11 @@
9111114 {
9121115 loadClipboard(true);
9131116 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
1117
+ pasteInto(false, false);
9151118 } else {
9161119 loadClipboard(false);
9171120 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
1121
+ pasteInto(false, false); // true); // ???
9191122 }
9201123 }
9211124 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1236,37 @@
10331236 torusItem.addActionListener(this);
10341237 superItem = menu.add(new MenuItem("Superellipsoid"));
10351238 superItem.addActionListener(this);
1239
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1240
+ kleinItem.addActionListener(this);
10361241 particleItem = menu.add(new MenuItem("Particle system"));
10371242 particleItem.addActionListener(this);
1243
+ if (Globals.ADVANCED)
1244
+ {
10381245 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391246 ragdollItem.addActionListener(this);
10401247 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411248 ragdoll2Item.addActionListener(this);
1249
+ }
10421250 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1251
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441252 meshItem.addActionListener(this);
10451253 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461254 // meshGroupItem.addActionListener(this);
1255
+ if (Globals.ADVANCED)
1256
+ {
10471257 springItem = menu.add(new MenuItem("Spring"));
10481258 springItem.addActionListener(this);
10491259 flagItem = menu.add(new MenuItem("Flag"));
10501260 flagItem.addActionListener(this);
1051
- bezierItem = menu.add(new MenuItem("Patch"));
1052
- bezierItem.addActionListener(this);
1053
- checkerItem = menu.add(new MenuItem("Checker"));
1054
- checkerItem.addActionListener(this);
10551261 blobItem = menu.add(new MenuItem("Blob"));
10561262 blobItem.addActionListener(this);
10571263 latheItem = menu.add(new MenuItem("Lathe"));
10581264 latheItem.addActionListener(this);
1265
+ }
1266
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1267
+ bezierItem.addActionListener(this);
1268
+ overlayItem = menu.add(new MenuItem("Overlay"));
1269
+ overlayItem.addActionListener(this);
10591270 lightItem = menu.add(new MenuItem("Light"));
10601271 lightItem.addActionListener(this);
10611272 menu.add("-");
....@@ -1065,39 +1276,44 @@
10651276 loopItem.addActionListener(this);
10661277 doubleItem = menu.add(new MenuItem("Fork"));
10671278 doubleItem.addActionListener(this);
1279
+ if (Globals.ADVANCED)
1280
+ {
10681281 tripleItem = menu.add(new MenuItem("Trident"));
10691282 tripleItem.addActionListener(this);
1283
+ }
10701284 }
10711285
10721286 void buildToolsMenu(Menu menu)
10731287 {
10741288 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751289 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1290
+ animationItem.setState(Globals.ANIMATION);
10771291
10781292 menu.add("-");
10791293 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801294 parseverticesItem.addActionListener(this);
10811295 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821296 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1297
+ alignItem = menu.add(new MenuItem("Align Objects"));
10841298 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871299 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881300 reduceMorphItem.addActionListener(this);
10891301 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10901302 reduce34MorphItem.addActionListener(this);
1091
-
1303
+ menu.add("-");
10921304 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931305 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951306
1307
+ if (Globals.ADVANCED)
1308
+ {
1309
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1310
+ mirrorItem.addActionListener(this);
1311
+ menu.add("-");
10961312 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971313 memoryItem.addActionListener(this);
10981314 menu.add(analyzeItem = new MenuItem("Analyze"));
10991315 analyzeItem.addActionListener(this);
1100
- menu.add(dumpItem = new MenuItem("Dump"));
1316
+ menu.add(dumpItem = new MenuItem("Print"));
11011317 dumpItem.addActionListener(this);
11021318 // menu.add(pathItem = new MenuItem("From-to path"));
11031319 // pathItem.addActionListener(this);
....@@ -1106,6 +1322,8 @@
11061322 resetParentItem.addActionListener(this);
11071323 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081324 repairParentItem.addActionListener(this);
1325
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1326
+ repairShadowItem.addActionListener(this);
11091327 menu.add(invariantsItem = new MenuItem("Invariants"));
11101328 invariantsItem.addActionListener(this);
11111329 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1331,7 @@
11131331 menu.add("-");
11141332 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151333 editScriptItem.addActionListener(this);
1334
+ }
11161335 }
11171336
11181337 void ScreenFit()
....@@ -1441,9 +1660,9 @@
14411660
14421661 void Overwrite(int mask)
14431662 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1663
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14451664 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1665
+ Object3D content = Grafreed.clipboard.get(0);
14471666
14481667 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491668 content = ((cGroup)content).get(0);
....@@ -1466,6 +1685,7 @@
14661685 //
14671686 public void actionPerformed(ActionEvent event) // , Object arg)
14681687 {
1688
+ Object source = event.getSource();
14691689 /*
14701690 if (event.getSource() == nameField)
14711691 {
....@@ -1477,11 +1697,11 @@
14771697 }
14781698 else
14791699 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1700
+ if (source == lookAtItem || source == lookFromItem)
14811701 {
14821702 ScreenFit();
14831703 } else
1484
- if (event.getSource() == switchItem)
1704
+ if (source == switchItem)
14851705 {
14861706 cVector v1 = new cVector();
14871707 cVector v2 = new cVector();
....@@ -1490,11 +1710,11 @@
14901710 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911711 objEditor.cameraView.repaint();
14921712 } else
1493
- if (event.getSource() == rectoidItem)
1713
+ if (source == rectoidItem)
14941714 {
14951715 makeSomething(new Box());
14961716 } else
1497
- if (event.getSource() == particleItem)
1717
+ if (source == particleItem)
14981718 {
14991719 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001720 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1735,9 @@
15151735 applyExample(particleGeom, "SMOKE");
15161736 makeSomething(particleGeom);
15171737 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1738
+ if (source == ragdollItem || source == ragdoll2Item)
15191739 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1740
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211741
15221742 ragdoll.toParent = LA.newMatrix();
15231743 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1755,7 @@
15351755 } else
15361756 /*
15371757 */
1538
- if (event.getSource() == heightFieldItem)
1758
+ if (source == heightFieldItem)
15391759 {
15401760 Object3D obj = new Object3D();
15411761
....@@ -1573,27 +1793,31 @@
15731793
15741794 makeSomething(obj);
15751795 } else
1576
- if (event.getSource() == gridItem)
1796
+ if (source == gridItem)
15771797 {
15781798 makeSomething(new Grid());
15791799 } else
1580
- if (event.getSource() == ellipsoidItem)
1800
+ if (source == ellipsoidItem)
15811801 {
15821802 makeSomething(new Sphere());
15831803 } else
1584
- if (event.getSource() == coneItem)
1804
+ if (source == coneItem)
15851805 {
15861806 makeSomething(new Cone());
15871807 } else
1588
- if (event.getSource() == torusItem)
1808
+ if (source == torusItem)
15891809 {
15901810 makeSomething(new Torus());
15911811 } else
1592
- if (event.getSource() == superItem)
1812
+ if (source == superItem)
15931813 {
15941814 makeSomething(new Superellipsoid());
15951815 } else
1596
- if (event.getSource() == blobItem)
1816
+ if (source == kleinItem)
1817
+ {
1818
+ makeSomething(new Klein());
1819
+ } else
1820
+ if (source == blobItem)
15971821 {
15981822 Blob blob = new Blob();
15991823 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1825,15 @@
16011825 //blob.retile();
16021826 makeSomething(blob);
16031827 } else
1604
- if (event.getSource() == latheItem)
1828
+ if (source == latheItem)
16051829 {
16061830 makeSomething(new Lathe());
16071831 } else
1608
- if (event.getSource() == bezierItem)
1832
+ if (source == bezierItem)
16091833 {
16101834 makeSomething(new BezierSurface());
16111835 } else
1612
- if (event.getSource() == checkerItem)
1836
+ if (source == overlayItem)
16131837 {
16141838 /*
16151839 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1848,7 @@
16241848 */
16251849 makeSomething(new Checker());
16261850 } else
1627
- if (event.getSource() == meshItem)
1851
+ if (source == meshItem)
16281852 {
16291853 Object3D itemtomake = new Object3D();
16301854 Object3D child;
....@@ -1645,35 +1869,35 @@
16451869 makeSomething(child);
16461870 }
16471871 } else
1648
- if (event.getSource() == springItem)
1872
+ if (source == springItem)
16491873 {
16501874 cSpring s = new cSpring();
16511875 s.setup();
16521876 makeSomething(s);
16531877 } else
1654
- if (event.getSource() == flagItem)
1878
+ if (source == flagItem)
16551879 {
16561880 cSpring s = new cFlag();
16571881 s.setup();
16581882 makeSomething(s);
16591883 } else
1660
- if (event.getSource() == lightItem)
1884
+ if (source == lightItem)
16611885 {
16621886 makeSomething(new Light());
16631887 } else
1664
- if (event.getSource() == csgItem)
1888
+ if (source == csgItem)
16651889 {
16661890 group(new CSG());
16671891 } else
1668
- if (event.getSource() == templateItem)
1892
+ if (source == templateItem)
16691893 {
16701894 group(new cTemplate());
16711895 } else
1672
- if (event.getSource() == attributeItem)
1896
+ if (source == attributeItem)
16731897 {
16741898 makeSomething(new Attribute());
16751899 } else
1676
- if (event.getSource() == pointflowItem)
1900
+ if (source == pointflowItem)
16771901 {
16781902 makeSomething(new PointFlow());
16791903 } else
....@@ -1685,7 +1909,7 @@
16851909 } else
16861910 */
16871911
1688
- if (event.getSource() == superLoopItem)
1912
+ if (source == superLoopItem)
16891913 {
16901914 Composite g = new cGroup();
16911915 for (int i=0; i<15; i++)
....@@ -1707,7 +1931,7 @@
17071931
17081932 group(g);
17091933 } else
1710
- if (event.getSource() == loopItem)
1934
+ if (source == loopItem)
17111935 {
17121936 Composite csg = new GroupLeaf();
17131937 csg.count = 5;
....@@ -1716,7 +1940,7 @@
17161940 csg.addChild(child);
17171941 child.addChild(csg);
17181942 } else
1719
- if (event.getSource() == doubleItem)
1943
+ if (source == doubleItem)
17201944 {
17211945 Composite csg = new GroupLeaf();
17221946 csg.count = 5;
....@@ -1728,7 +1952,7 @@
17281952 csg.addChild(child);
17291953 child.addChild(csg);
17301954 } else
1731
- if (event.getSource() == tripleItem)
1955
+ if (source == tripleItem)
17321956 {
17331957 Composite csg = new GroupLeaf();
17341958 csg.count = 4;
....@@ -1743,71 +1967,83 @@
17431967 csg.addChild(child);
17441968 child.addChild(csg);
17451969 } else
1746
-
1747
- if (event.getSource() == importGFDItem)
1970
+ if (source == computeAOItem)
17481971 {
1749
- ImportGFD();
1972
+ Globals.drawMode = CameraPane.OCCLUSION;
1973
+ Globals.theRenderer.repaint();
17501974 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1752
- {
1753
- ImportVRMLX3D();
1754
- } else
1755
- if (event.getSource() == import3DSItem)
1756
- {
1757
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1758
- } else
1759
- if (event.getSource() == importOBJItem)
1760
- {
1761
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1762
- } else
1763
- if (event.getSource() == computeAOItem)
1764
- {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1767
- } else
1768
- if (event.getSource() == recompileItem)
1975
+ if (source == recompileItem)
17691976 {
17701977 Recompile();
17711978 refreshContents();
17721979 } else
1773
- if (event.getSource() == editScriptItem)
1980
+ if (source == editScriptItem)
17741981 {
17751982 OpenDialog();
17761983 refreshContents();
17771984 } else
1778
- if (event.getSource() == invariantsItem)
1985
+ if (source == invariantsItem)
17791986 {
17801987 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1988
+ Grafreed.grafreeD.universe.invariants();
17821989 } else
1783
- if (event.getSource() == memoryItem)
1990
+ if (source == memoryItem)
17841991 {
17851992 //System.out.println("Invariants:");
17861993 PrintMemory();
17871994 } else
1788
- if (event.getSource() == pathItem)
1995
+ if (source == pathItem)
17891996 {
17901997 PrintPath();
17911998 } else
1792
- if (event.getSource() == analyzeItem)
1999
+ if (source == analyzeItem)
17932000 {
17942001 AnalyzeObject();
17952002 } else
1796
- if (event.getSource() == dumpItem)
2003
+ if (source == dumpItem)
17972004 {
17982005 DumpObject();
17992006 } else
1800
- if (event.getSource() == screenfitButton)
2007
+ if (source == minButton)
2008
+ {
2009
+ Minimize();
2010
+ } else
2011
+ if (source == maxButton)
2012
+ {
2013
+ Maximize();
2014
+ } else
2015
+ if (source == fullButton)
2016
+ {
2017
+ ToggleFullScreen();
2018
+ } else
2019
+ if (source == undoButton)
2020
+ {
2021
+ Undo();
2022
+ } else
2023
+ if (source == redoButton)
2024
+ {
2025
+ Redo();
2026
+ } else
2027
+ if (source == saveButton)
2028
+ {
2029
+ Save();
2030
+ } else
2031
+ if (source == oneStepButton)
2032
+ {
2033
+ Globals.ONESTEP = true;
2034
+ cameraView.repaint();
2035
+ } else
2036
+ if (source == screenfitButton)
18012037 {
18022038 //Reload(lastConverter, lastFilename, true);
18032039 ScreenFit();
18042040 } else
1805
- if (event.getSource() == screenfitpointButton)
2041
+ if (source == screenfitpointButton)
18062042 {
18072043 //Reload(lastConverter, lastFilename, true);
18082044 ScreenFitPoint();
18092045 } else
1810
- if (event.getSource() == snapobjectButton)
2046
+ if (source == snapobjectButton)
18112047 {
18122048 //Reload(lastConverter, lastFilename, true);
18132049 SnapObject();
....@@ -1818,13 +2054,13 @@
18182054 // Recompile();
18192055 // refreshContents();
18202056 // } else
1821
- if (event.getSource() == gcButton)
2057
+ if (source == gcButton)
18222058 {
18232059 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18242060 System.gc();
18252061 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18262062 } else
1827
- if (event.getSource() == editLeafItem)
2063
+ if (source == editLeafItem)
18282064 {
18292065 Object3D obj;
18302066 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +2074,78 @@
18382074 }
18392075 refreshContents(true);
18402076 } else
1841
- if (event.getSource() == openWindowItem)
2077
+ if (source == openWindowItem)
18422078 {
18432079 EditSelection(true);
18442080 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2081
+ if (source == cutItem || source == clearButton)
18462082 {
18472083 loadClipboard(true);
18482084 } else
1849
- if (event.getSource() == duplicateItem)
2085
+ if (source == undoItem)
18502086 {
1851
- Object3D keep = GraphreeD.clipboard;
2087
+ Undo();
2088
+ } else
2089
+ if (source == redoItem)
2090
+ {
2091
+ Redo();
2092
+ } else
2093
+ if (source == duplicateItem)
2094
+ {
2095
+ Object3D keep = Grafreed.clipboard;
18522096 loadClipboard(false);
18532097 paste(false);
1854
- GraphreeD.clipboard = keep;
2098
+ Grafreed.clipboard = keep;
18552099 } else
1856
- if (event.getSource() == cloneItem)
2100
+ if (source == cloneItem)
18572101 {
18582102 CloneSelection(false);
18592103 } else
1860
- if (event.getSource() == cloneSupportItem)
2104
+ if (source == cloneSupportItem)
18612105 {
18622106 CloneSelection(true);
18632107 } else
1864
- if (event.getSource() == copyItem)
2108
+ if (source == copyItem)
18652109 {
18662110 loadClipboard(false);
18672111 } else
1868
- if (event.getSource() == pasteItem)
2112
+ if (source == pasteItem)
18692113 {
18702114 paste(false);
18712115 } else
1872
- if (event.getSource() == pasteLinkItem)
2116
+ if (source == pasteIntoItem)
18732117 {
1874
- pasteInto(false);
2118
+ pasteInto(true, false);
18752119 } else
1876
- if (event.getSource() == pasteCloneItem)
2120
+ if (source == pasteLinkItem)
18772121 {
1878
- pasteInto(true);
2122
+ pasteInto(false, false);
18792123 } else
1880
- if (event.getSource() == pasteExpandItem)
2124
+ if (source == pasteCloneItem)
2125
+ {
2126
+ pasteInto(true, true);
2127
+ } else
2128
+ if (source == pasteExpandItem)
18812129 {
18822130 paste(true);
18832131 } else
1884
- if (event.getSource() == synchronizeItem)
2132
+ if (source == synchronizeItem)
18852133 {
18862134 Overwrite(Object3D.TRANSFORM);
18872135 } else
1888
- if (event.getSource() == overwriteNameItem)
2136
+ if (source == overwriteNameItem)
18892137 {
18902138 Overwrite(Object3D.NAME);
18912139 } else
1892
- if (event.getSource() == overwriteUVItem)
2140
+ if (source == overwriteUVItem)
18932141 {
18942142 Overwrite(Object3D.UV);
18952143 } else
1896
- if (event.getSource() == overwriteMatItem)
2144
+ if (source == overwriteMatItem)
18972145 {
2146
+ /* july 2015
18982147 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
2148
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19002149 else
19012150 {
19022151 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +2157,16 @@
19082157 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19092158 }
19102159 }
2160
+ */
2161
+
2162
+ Overwrite(dropAttributes);
19112163 }
1912
- if (event.getSource() == overwriteGeoItem)
2164
+ if (source == overwriteGeoItem)
19132165 {
19142166 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2167
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19162168 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
2169
+// Object3D content = GrafreeD.clipboard.get(0);
19182170 //
19192171 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19202172 // content = ((cGroup)content).get(0);
....@@ -1926,7 +2178,7 @@
19262178 // refreshContents();
19272179 // }
19282180 } else
1929
- if (event.getSource() == generateMeshItem)
2181
+ if (source == generateMeshItem)
19302182 {
19312183 //if (group.selection.size() == 1)
19322184 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +2189,7 @@
19372189 ResetModel();
19382190 refreshContents();
19392191 } else
1940
- if (event.getSource() == extractGeometriesItem)
2192
+ if (source == extractGeometriesItem)
19412193 {
19422194 boolean one = false;
19432195
....@@ -1964,7 +2216,7 @@
19642216 ResetModel();
19652217 refreshContents();
19662218 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2219
+ if (source == cloneGeometriesItem)
19682220 {
19692221 boolean one = false;
19702222
....@@ -1990,32 +2242,37 @@
19902242 ResetModel();
19912243 refreshContents();
19922244 } else
1993
- if (event.getSource() == shareGeometriesItem)
2245
+ if (source == shareGeometriesItem)
19942246 {
19952247 boolean one = false;
19962248
19972249 if (group.selection.size() == 1)
19982250 one = true;
19992251
2252
+ Object3D merge = null;
2253
+
20002254 Object3D content = new cGroup();
20012255
20022256 for (int i=0; i<group.selection.size(); i++)
20032257 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2258
+ merge = new Merge(group.selection.get(i));
20052259
20062260 if (one)
2007
- makeSomething(sel, false);
2261
+ makeSomething(merge, false);
20082262 else
2009
- content.addChild(sel);
2263
+ content.addChild(merge);
20102264 }
20112265
20122266 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2267
+ makeSomething(content, true);
2268
+ else
2269
+ {
2270
+ ResetModel();
2271
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2272
+ refreshContents();
2273
+ }
20172274 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2275
+ if (source == mergeGeometriesItem)
20192276 {
20202277 boolean one = false;
20212278
....@@ -2045,11 +2302,11 @@
20452302 ResetModel();
20462303 refreshContents();
20472304 } else
2048
- if (event.getSource() == linkverticesItem)
2305
+ if (source == linkverticesItem)
20492306 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2307
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512308 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2309
+// Object3D content = GrafreeD.clipboard.get(0);
20532310 //
20542311 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552312 // content = ((cGroup)content).get(0);
....@@ -2058,39 +2315,48 @@
20582315 // group.selection.get(0).setMasterThis(content); // should be identity
20592316 // refreshContents();
20602317 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2318
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20622319 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2320
+ Object3D content = Grafreed.clipboard.get(0);
20642321
20652322 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662323 content = ((cGroup)content).get(0);
20672324
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2325
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692326 for (int i=0; i<group.selection.size(); i++)
20702327 {
2071
- boolean random = CameraPane.RANDOM;
2072
- CameraPane.RANDOM = false; // parse all random nodes
2328
+ boolean random = CameraPane.SWITCH;
2329
+ CameraPane.SWITCH = false; // parse all random nodes
20732330 group.selection.get(i).linkVerticesThis(content);
20742331 // group.selection.get(i).setMasterThis(content); // should be identity
2075
- CameraPane.RANDOM = random;
2332
+ CameraPane.SWITCH = random;
20762333 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2334
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782335 refreshContents();
20792336 }
20802337 } else
2081
- if (event.getSource() == resetsupportItem)
2338
+ if (source == resetsupportItem)
20822339 {
20832340 for (int i=0; i<group.selection.size(); i++)
20842341 {
2085
- boolean random = CameraPane.RANDOM;
2086
- CameraPane.RANDOM = false; // parse all random nodes
2342
+ boolean random = CameraPane.SWITCH;
2343
+ CameraPane.SWITCH = false; // parse all random nodes
20872344 group.selection.get(i).linkVerticesThis(null);
2088
- CameraPane.RANDOM = random;
2345
+ CameraPane.SWITCH = random;
20892346 }
20902347
20912348 refreshContents();
20922349 } else
2093
- if (event.getSource() == resetreferencesItem)
2350
+ if (source == relinkverticesItem)
2351
+ {
2352
+ boolean random = CameraPane.SWITCH;
2353
+ CameraPane.SWITCH = false; // parse all random nodes
2354
+ group.selection.RelinkToSupport();
2355
+ CameraPane.SWITCH = random;
2356
+
2357
+ refreshContents();
2358
+ } else
2359
+ if (source == resetreferencesItem)
20942360 {
20952361 for (int i=0; i<group.selection.size(); i++)
20962362 {
....@@ -2099,11 +2365,11 @@
20992365
21002366 refreshContents();
21012367 } else
2102
- if (event.getSource() == setMasterItem)
2368
+ if (source == setMasterItem)
21032369 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2370
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21052371 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2372
+ Object3D content = Grafreed.clipboard.get(0);
21072373
21082374 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092375 content = ((cGroup)content).get(0);
....@@ -2112,13 +2378,13 @@
21122378 refreshContents();
21132379 }
21142380 } else
2115
- if (event.getSource() == poseMeshItem)
2381
+ if (source == poseMeshItem)
21162382 {
21172383 if (group.selection.size() == 1)
21182384 {
2119
- if (GraphreeD.clipboard.size() == 1)
2385
+ if (Grafreed.clipboard.size() == 1)
21202386 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2387
+ Object3D content = Grafreed.clipboard.get(0);
21222388
21232389 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242390 content = ((cGroup)content).get(0);
....@@ -2131,19 +2397,19 @@
21312397 }
21322398
21332399 } else
2134
- if (event.getSource() == revertMeshItem)
2400
+ if (source == revertMeshItem)
21352401 {
21362402 RevertMeshes();
21372403 } else
2138
- if (event.getSource() == resetMeshItem)
2404
+ if (source == resetAllItem)
21392405 {
21402406 ResetAll();
21412407 } else
2142
- if (event.getSource() == stepAllItem)
2408
+ if (source == stepAllItem)
21432409 {
21442410 StepAll();
21452411 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2412
+ if (source == clearItem) // || event.getSource() == clearButton)
21472413 {
21482414 //int indices[] = jList.getSelectedIndices();
21492415 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2417,46 @@
21512417
21522418 ClearSelection(false);
21532419 } else
2154
- if (event.getSource() == clearAllItem)
2420
+ if (source == clearAllItem)
21552421 {
21562422 ClearSelection(true);
21572423 } else
2158
- if (event.getSource() == grabItem)
2424
+ if (source == grabItem)
21592425 {
21602426 group(new cGroup(), true);
21612427 } else
2162
- if (event.getSource() == frontItem)
2428
+ if (source == hideItem)
2429
+ {
2430
+ group(new HiddenObject());
2431
+ } else
2432
+ if (source == frontItem)
21632433 {
21642434 front();
21652435 } else
2166
- if (event.getSource() == backItem)
2436
+ if (source == backItem)
21672437 {
21682438 back();
21692439 } else
2170
- if (event.getSource() == cameraItem)
2440
+ if (source == cameraItem)
21712441 {
21722442 makeSomething(new Camera());
21732443 } else
2174
- if (event.getSource() == compositeItem)
2444
+ if (source == compositeItem)
21752445 {
21762446 group(new Composite());
21772447 } else
2178
- if (event.getSource() == randomItem)
2448
+ if (source == randomItem)
21792449 {
21802450 RandomNode random = new RandomNode();
21812451 group(random);
21822452 if (random.size() > 0)
2183
- random.name = random.get(0).name + "Rnd";
2453
+ random.name = random.get(0).name + "Switch";
21842454 } else
2185
- if (event.getSource() == physicsItem)
2455
+ if (source == physicsItem)
21862456 {
21872457 group(new PhysicsNode());
21882458 } else
2189
- if (event.getSource() == frameselectorItem)
2459
+ if (source == frameselectorItem)
21902460 {
21912461 for (int i=0; i<group.selection.size(); i++)
21922462 {
....@@ -2198,7 +2468,7 @@
21982468 ResetModel();
21992469 refreshContents();
22002470 } else
2201
- if (event.getSource() == switchGeoItem)
2471
+ if (source == switchGeoItem)
22022472 {
22032473 for (int i=0; i<group.selection.size(); i++)
22042474 {
....@@ -2210,7 +2480,7 @@
22102480 ResetModel();
22112481 refreshContents();
22122482 } else
2213
- if (event.getSource() == switchTransfoItem)
2483
+ if (source == switchTransfoItem)
22142484 {
22152485 for (int i=0; i<group.selection.size(); i++)
22162486 {
....@@ -2222,7 +2492,7 @@
22222492 ResetModel();
22232493 refreshContents();
22242494 } else
2225
- if (event.getSource() == morphItem)
2495
+ if (source == morphItem)
22262496 {
22272497 for (int i=0; i<group.selection.size(); i++)
22282498 {
....@@ -2234,7 +2504,7 @@
22342504 ResetModel();
22352505 refreshContents();
22362506 } else
2237
- if (event.getSource() == scriptNodeItem)
2507
+ if (source == scriptNodeItem)
22382508 {
22392509 boolean atleastone = false;
22402510
....@@ -2273,195 +2543,239 @@
22732543 }
22742544 }
22752545 } else
2276
- if (event.getSource() == linkerItem)
2546
+ if (source == linkerItem)
22772547 {
22782548 group(new cLinker());
22792549 } else
2280
- if (event.getSource() == textureItem)
2550
+ if (source == textureItem)
22812551 {
22822552 group(new TextureNode());
22832553 } else
2284
- if (event.getSource() == shadowXItem)
2554
+ if (source == billboardItem)
2555
+ {
2556
+ group(new BillboardNode());
2557
+ } else
2558
+ if (source == shadowXItem)
22852559 {
22862560 CastShadow(0);
22872561 } else
2288
- if (event.getSource() == shadowYItem)
2562
+ if (source == shadowYItem)
22892563 {
22902564 CastShadow(1);
22912565 } else
2292
- if (event.getSource() == shadowZItem)
2566
+ if (source == shadowZItem)
22932567 {
22942568 CastShadow(2);
22952569 } else
2296
- if (event.getSource() == ungroupItem)
2570
+ if (source == ungroupItem)
22972571 {
2298
- ungroup();
2572
+ //ungroup();
2573
+ for (int i=0; i<group.selection.size(); i++)
2574
+ {
2575
+ Ungroup(group.selection.get(i));
2576
+ }
2577
+
2578
+ ClearSelection(false);
2579
+
2580
+ refreshContents();
22992581 } else
2300
- if (event.getSource() == genUVItem)
2582
+ if (source == genUVItem)
23012583 {
23022584 GenUV();
23032585 } else
2304
- if (event.getSource() == genNormalsCADItem)
2586
+ if (source == genNormalsCADItem)
23052587 {
23062588 GenNormals(true);
23072589 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2590
+ if (source == genNormalsMESHItem)
2591
+ {
2592
+ GenNormalsMESH();
2593
+ } else
2594
+ if (source == genNormalsORGANItem)
23092595 {
23102596 GenNormals(false);
23112597 } else
2312
- if (event.getSource() == stripifyItem)
2598
+ if (source == genNormalsMINEItem)
2599
+ {
2600
+ GenNormalsMINE();
2601
+ } else
2602
+ if (source == stripifyItem)
23132603 {
23142604 Stripify();
23152605 } else
2316
- if (event.getSource() == unstripifyItem)
2606
+ if (source == unstripifyItem)
23172607 {
23182608 Unstripify();
23192609 } else
2320
- if (event.getSource() == trimItem)
2610
+ if (source == trimItem)
23212611 {
23222612 Trim();
23232613 } else
2324
- if (event.getSource() == untrimItem)
2614
+ if (source == untrimItem)
23252615 {
23262616 Untrim();
23272617 } else
2328
- if (event.getSource() == clearColorsItem)
2618
+ if (source == clearColorsItem)
23292619 {
23302620 ClearColors();
23312621 } else
2332
- if (event.getSource() == clearMaterialsItem)
2622
+ if (source == clearMaterialsItem)
23332623 {
23342624 ClearMaterials();
23352625 } else
2336
- if (event.getSource() == liveleavesItem)
2626
+ if (source == liveleavesItem)
23372627 {
23382628 LiveLeaves(true);
23392629 } else
2340
- if (event.getSource() == unliveleavesItem)
2630
+ if (source == unliveleavesItem)
23412631 {
23422632 LiveLeaves(false);
23432633 } else
2344
- if (event.getSource() == supportleavesItem)
2634
+ if (source == supportleavesItem)
23452635 {
23462636 SupportLeaves(true);
23472637 } else
2348
- if (event.getSource() == unsupportleavesItem)
2638
+ if (source == unsupportleavesItem)
23492639 {
23502640 SupportLeaves(false);
23512641 } else
2352
- if (event.getSource() == hideleavesItem)
2642
+ if (source == hideleavesItem)
23532643 {
23542644 HideLeaves(true);
23552645 } else
2356
- if (event.getSource() == showleavesItem)
2646
+ if (source == showleavesItem)
23572647 {
23582648 HideLeaves(false);
23592649 } else
2360
- if (event.getSource() == markleavesItem)
2650
+ if (source == markleavesItem)
23612651 {
23622652 MarkLeaves(true);
23632653 } else
2364
- if (event.getSource() == unmarkleavesItem)
2654
+ if (source == unmarkleavesItem)
23652655 {
23662656 MarkLeaves(false);
23672657 } else
2368
- if (event.getSource() == flipVItem)
2658
+ if (source == rewindleavesItem)
2659
+ {
2660
+ RewindLeaves(true);
2661
+ } else
2662
+ if (source == unrewindleavesItem)
2663
+ {
2664
+ RewindLeaves(false);
2665
+ } else
2666
+ if (source == randomleavesItem)
2667
+ {
2668
+ RandomLeaves(true);
2669
+ } else
2670
+ if (source == unrandomleavesItem)
2671
+ {
2672
+ RandomLeaves(false);
2673
+ } else
2674
+ if (source == flipVItem)
23692675 {
23702676 FlipV(true);
23712677 } else
2372
- if (event.getSource() == unflipVItem)
2678
+ if (source == unflipVItem)
23732679 {
23742680 FlipV(false);
23752681 } else
2376
- if (event.getSource() == lowTexturesItem)
2682
+ if (source == lowTexturesItem)
23772683 {
23782684 SetTexRes(0);
23792685 } else
2380
- if (event.getSource() == normalTexturesItem)
2686
+ if (source == normalTexturesItem)
23812687 {
23822688 SetTexRes(1);
23832689 } else
2384
- if (event.getSource() == highTexturesItem)
2690
+ if (source == highTexturesItem)
23852691 {
23862692 SetTexRes(2);
23872693 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2694
+ if (source == veryhighTexturesItem)
23892695 {
23902696 SetTexRes(3);
23912697 } else
2392
- if (event.getSource() == maxTexturesItem)
2698
+ if (source == maxTexturesItem)
23932699 {
23942700 SetTexRes(4);
23952701 } else
2396
- if (event.getSource() == panoTexturesItem)
2702
+ if (source == panoTexturesItem)
23972703 {
23982704 SetTexRes(5);
23992705 } else
2400
- if (event.getSource() == reverseNormalsItem)
2706
+ if (source == reverseNormalsItem)
24012707 {
24022708 ReverseNormals();
24032709 } else
2404
- if (event.getSource() == parseverticesItem)
2710
+ if (source == parseverticesItem)
24052711 {
24062712 ParseVertices();
24072713 } else
2408
- if (event.getSource() == textureFieldItem)
2714
+ if (source == textureFieldItem)
24092715 {
24102716 TextureVertices();
24112717 } else
2412
- if (event.getSource() == alignItem)
2718
+ if (source == alignItem)
24132719 {
24142720 Align();
24152721 } else
2416
- if (event.getSource() == mirrorItem)
2722
+ if (source == mirrorItem)
24172723 {
24182724 MirrorPoses();
24192725 } else
2420
- if (event.getSource() == reduceMorphItem)
2726
+ if (source == reduceMorphItem)
24212727 {
24222728 MeshReduction(false);
24232729 } else
2424
- if (event.getSource() == reduce34MorphItem)
2730
+ if (source == reduce34MorphItem)
24252731 {
24262732 MeshReduction(true);
24272733 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2734
+ if (source == reverseTrianglesItem)
24292735 {
24302736 ReverseTriangles();
24312737 } else
2432
- if (event.getSource() == reduceMeshItem)
2738
+ if (source == reduceMeshItem)
24332739 {
24342740 ReduceMesh(false);
24352741 } else
2436
- if (event.getSource() == reduce34MeshItem)
2742
+ if (source == reduce34MeshItem)
24372743 {
24382744 ReduceMesh(true);
24392745 } else
2440
- if (event.getSource() == increaseMeshItem)
2746
+ if (source == increaseMeshItem)
24412747 {
24422748 IncreaseMesh();
24432749 } else
2444
- if (event.getSource() == clipMeshItem)
2750
+ if (source == clipMeshItem)
24452751 {
24462752 ClipMesh();
24472753 } else
2448
- if (event.getSource() == smoothMeshItem)
2754
+ if (source == smoothMeshItem)
24492755 {
24502756 SmoothMesh();
24512757 } else
2452
- if (event.getSource() == transformgeometryItem)
2758
+ if (source == transformGeometryItem)
24532759 {
24542760 TransformGeometry();
24552761 } else
2456
- if (event.getSource() == resetTransformItem)
2762
+ if (source == transformChildrenItem)
2763
+ {
2764
+ TransformChildren();
2765
+ } else
2766
+ if (source == resetTransformItem)
24572767 {
24582768 ResetTransform();
24592769 } else
2460
- if (event.getSource() == resetCentroidItem)
2770
+ if (source == resetCentroidItem)
24612771 {
2462
- ResetCentroid();
2772
+ ResetCentroid(true);
24632773 } else
2464
- if (event.getSource() == resetParentItem)
2774
+ if (source == resetCentroidXZItem)
2775
+ {
2776
+ ResetCentroid(false);
2777
+ } else
2778
+ if (source == resetParentItem)
24652779 {
24662780 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672781 {
....@@ -2471,7 +2785,7 @@
24712785
24722786 refreshContents();
24732787 } else
2474
- if (event.getSource() == repairParentItem)
2788
+ if (source == repairParentItem)
24752789 {
24762790 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772791 {
....@@ -2485,7 +2799,21 @@
24852799
24862800 refreshContents();
24872801 } else
2488
- if (event.getSource() == sortbysizeItem)
2802
+ if (source == repairShadowItem)
2803
+ {
2804
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2805
+ {
2806
+ Object3D obj = (Object3D)e.nextElement();
2807
+ obj.RepairShadow();
2808
+// for (int i=0; i<obj.size(); i++)
2809
+// {
2810
+// obj.get(i).parent = obj;
2811
+// }
2812
+ }
2813
+
2814
+ refreshContents();
2815
+ } else
2816
+ if (source == sortbysizeItem)
24892817 {
24902818 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912819 {
....@@ -2497,7 +2825,7 @@
24972825 ResetModel();
24982826 refreshContents();
24992827 } else
2500
- if (event.getSource() == sortbynameItem)
2828
+ if (source == sortbynameItem)
25012829 {
25022830 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032831 {
....@@ -2509,7 +2837,7 @@
25092837 ResetModel();
25102838 refreshContents();
25112839 } else
2512
- if (event.getSource() == attachPigmentItem)
2840
+ if (source == attachPigmentItem)
25132841 {
25142842 String texture = GetFile("Attach pigment");
25152843 Object3D obj;
....@@ -2521,7 +2849,7 @@
25212849
25222850 refreshContents();
25232851 } else
2524
- if (event.getSource() == detachPigmentItem)
2852
+ if (source == detachPigmentItem)
25252853 {
25262854 Object3D obj;
25272855 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2860,7 @@
25322860
25332861 refreshContents();
25342862 } else
2535
- if (event.getSource() == attachBumpItem)
2863
+ if (source == attachBumpItem)
25362864 {
25372865 String texture = GetFile("Attach bump");
25382866 Object3D obj;
....@@ -2544,7 +2872,7 @@
25442872
25452873 refreshContents();
25462874 } else
2547
- if (event.getSource() == detachBumpItem)
2875
+ if (source == detachBumpItem)
25482876 {
25492877 Object3D obj;
25502878 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2883,7 @@
25552883
25562884 refreshContents();
25572885 } else
2558
- if (event.getSource() == pigmentBumpItem)
2886
+ if (source == pigmentBumpItem)
25592887 {
25602888 Object3D obj;
25612889 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2894,221 @@
25662894
25672895 refreshContents();
25682896 } else
2569
- if (event.getSource() == flashSelectionButton)
2897
+ if (source == flashSelectionButton)
25702898 {
25712899 CameraPane.flash = true;
25722900 refreshContents();
25732901 } else
2574
- if (event.getSource() == oneButton)
2902
+ if (source == oneButton)
25752903 {
25762904 } else
2577
- if (event.getSource() == twoButton)
2905
+ if (source == twoButton)
25782906 {
25792907 radio.layout = twoButton;
25802908 // bug
25812909 //gridPanel.setDividerLocation(1.0);
25822910 //bigPanel.setDividerLocation(0.0);
2583
- bigThree.remove(jtp);
2584
- bigThree.remove(cameraPanel);
2585
- bigThree.remove(XYZPanel);
2586
- aWindowConstraints.gridx = 0;
2587
- aWindowConstraints.gridy = 0;
2588
- aWindowConstraints.gridwidth = 1;
2589
- // aConstraints.gridheight = 3;
2590
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2591
- aWindowConstraints.weightx = 0;
2592
- aWindowConstraints.weighty = 1;
2593
- //bigThree.add(jtp, aWindowConstraints);
2594
- aWindowConstraints.weightx = 1;
2595
- aWindowConstraints.gridwidth = 3;
2596
- // aConstraints.gridheight = 3;
2597
- aWindowConstraints.gridx = 1;
2598
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2599
- bigThree.add(cameraPanel, aWindowConstraints);
2600
- aWindowConstraints.weightx = 0;
2601
- aWindowConstraints.gridx = 4;
2602
- aWindowConstraints.gridwidth = 1;
2603
- // aConstraints.gridheight = 3;
2604
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2605
- //bigThree.add(XYZPanel, aWindowConstraints);
2606
- bigThree.revalidate();
2911
+// bigThree.remove(scenePanel);
2912
+// bigThree.remove(centralPanel);
2913
+// bigThree.remove(XYZPanel);
2914
+// aWindowConstraints.gridx = 0;
2915
+// aWindowConstraints.gridy = 0;
2916
+// aWindowConstraints.gridwidth = 1;
2917
+// // aConstraints.gridheight = 3;
2918
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2919
+// aWindowConstraints.weightx = 0;
2920
+// aWindowConstraints.weighty = 1;
2921
+// //bigThree.add(jtp, aWindowConstraints);
2922
+// aWindowConstraints.weightx = 1;
2923
+// aWindowConstraints.gridwidth = 3;
2924
+// // aConstraints.gridheight = 3;
2925
+// aWindowConstraints.gridx = 1;
2926
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2927
+// bigThree.add(centralPanel, aWindowConstraints);
2928
+// aWindowConstraints.weightx = 0;
2929
+// aWindowConstraints.gridx = 4;
2930
+// aWindowConstraints.gridwidth = 1;
2931
+// // aConstraints.gridheight = 3;
2932
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2933
+// //bigThree.add(XYZPanel, aWindowConstraints);
2934
+// scenePanel.setVisible(false);
2935
+// centralPanel.setVisible(true);
2936
+// XYZPanel.setVisible(false);
2937
+ bigThree.ClearUI();
2938
+ bigThree.add(centralPanel);
2939
+ bigThree.FlushUI();
2940
+
2941
+ cameraView.requestFocusInWindow();
2942
+
2943
+// refreshContents(true);
2944
+//
2945
+// try
2946
+// {
2947
+// java.awt.Robot bot = new java.awt.Robot();
2948
+// int mask = InputEvent.BUTTON1_MASK;
2949
+// bot.mouseMove(100, 100);
2950
+// bot.mousePress(mask);
2951
+// bot.mouseRelease(mask);
2952
+// }
2953
+// catch (Exception e)
2954
+// {
2955
+//
2956
+// }
2957
+
26072958 } else
2608
- if (event.getSource() == threeButton)
2959
+ if (source == threeButton)
26092960 {
26102961 radio.layout = threeButton;
2611
- bigThree.remove(jtp);
2612
- bigThree.remove(cameraPanel);
2613
- bigThree.remove(XYZPanel);
2614
- aWindowConstraints.gridx = 0;
2615
- aWindowConstraints.gridy = 0;
2616
- aWindowConstraints.gridwidth = 1;
2617
- // aConstraints.gridheight = 3;
2618
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2619
- aWindowConstraints.weightx = 0;
2620
- aWindowConstraints.weighty = 1;
2621
- //bigThree.add(jtp, aWindowConstraints);
2622
- aWindowConstraints.weightx = 1;
2623
- aWindowConstraints.gridwidth = 3;
2624
- // aConstraints.gridheight = 3;
2625
- aWindowConstraints.gridx = 1;
2626
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2627
- bigThree.add(cameraPanel, aWindowConstraints);
2628
- aWindowConstraints.weightx = 0;
2629
- aWindowConstraints.gridx = 4;
2630
- aWindowConstraints.gridwidth = 1;
2631
- // aConstraints.gridheight = 3;
2632
- aConstraints.fill = GridBagConstraints.VERTICAL;
2633
- bigThree.add(XYZPanel, aWindowConstraints);
2634
- bigThree.revalidate();
2962
+
2963
+// bigThree.remove(scenePanel);
2964
+// bigThree.remove(centralPanel);
2965
+// bigThree.remove(XYZPanel);
2966
+// aWindowConstraints.gridx = 0;
2967
+// aWindowConstraints.gridy = 0;
2968
+// aWindowConstraints.gridwidth = 1;
2969
+// // aConstraints.gridheight = 3;
2970
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2971
+// aWindowConstraints.weightx = 0;
2972
+// aWindowConstraints.weighty = 1;
2973
+// //bigThree.add(jtp, aWindowConstraints);
2974
+// aWindowConstraints.weightx = 1;
2975
+// aWindowConstraints.gridwidth = 3;
2976
+// // aConstraints.gridheight = 3;
2977
+// aWindowConstraints.gridx = 1;
2978
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2979
+// bigThree.add(centralPanel, aWindowConstraints);
2980
+// aWindowConstraints.weightx = 0;
2981
+// aWindowConstraints.gridx = 4;
2982
+// aWindowConstraints.gridwidth = 1;
2983
+// // aConstraints.gridheight = 3;
2984
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2985
+// bigThree.add(XYZPanel, aWindowConstraints);
2986
+// bigThree.validate();
2987
+// scenePanel.setVisible(false);
2988
+// centralPanel.setVisible(true);
2989
+// XYZPanel.setVisible(true);
2990
+ bigThree.ClearUI();
2991
+ bigThree.add(centralPanel);
2992
+ bigThree.add(XYZPanel);
2993
+ bigThree.FlushUI();
2994
+
2995
+ cameraView.requestFocusInWindow();
26352996 } else
2636
- if (event.getSource() == fourButton)
2997
+ if (source == fourButton)
26372998 {
26382999 radio.layout = fourButton;
2639
- bigThree.remove(jtp);
2640
- bigThree.remove(cameraPanel);
2641
- bigThree.remove(XYZPanel);
2642
- aWindowConstraints.gridx = 0;
2643
- aWindowConstraints.gridy = 0;
2644
- aWindowConstraints.gridwidth = 1;
2645
- // aWindowConstraints.gridheight = 3;
2646
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2647
- aWindowConstraints.weightx = 1;
2648
- aWindowConstraints.weighty = 1;
2649
- bigThree.add(jtp, aWindowConstraints);
2650
- aWindowConstraints.weightx = 1;
2651
- aWindowConstraints.gridwidth = 3;
2652
- // aConstraints.gridheight = 3;
2653
- aWindowConstraints.gridx = 1;
2654
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2655
- //bigThree.add(cameraPanel, aWindowConstraints);
2656
- aWindowConstraints.weightx = 0;
2657
- aWindowConstraints.gridx = 4;
2658
- aWindowConstraints.gridwidth = 1;
2659
- // aWindowConstraints.gridheight = 3;
2660
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2661
- //bigThree.add(XYZPanel, aWindowConstraints);
2662
- bigThree.revalidate();
3000
+
3001
+// bigThree.remove(scenePanel);
3002
+// bigThree.remove(centralPanel);
3003
+// bigThree.remove(XYZPanel);
3004
+// aWindowConstraints.gridx = 0;
3005
+// aWindowConstraints.gridy = 0;
3006
+// aWindowConstraints.gridwidth = 1;
3007
+// // aWindowConstraints.gridheight = 3;
3008
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3009
+// aWindowConstraints.weightx = 1;
3010
+// aWindowConstraints.weighty = 1;
3011
+// bigThree.add(scenePanel, aWindowConstraints);
3012
+// aWindowConstraints.weightx = 1;
3013
+// aWindowConstraints.gridwidth = 3;
3014
+// // aConstraints.gridheight = 3;
3015
+// aWindowConstraints.gridx = 1;
3016
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3017
+// //bigThree.add(cameraPanel, aWindowConstraints);
3018
+// aWindowConstraints.weightx = 0;
3019
+// aWindowConstraints.gridx = 4;
3020
+// aWindowConstraints.gridwidth = 1;
3021
+// // aWindowConstraints.gridheight = 3;
3022
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3023
+// //bigThree.add(XYZPanel, aWindowConstraints);
3024
+// bigThree.validate();
3025
+// scenePanel.setVisible(true);
3026
+// centralPanel.setVisible(false);
3027
+// XYZPanel.setVisible(false);
3028
+ bigThree.ClearUI();
3029
+ bigThree.add(scenePanel);
3030
+ bigThree.FlushUI();
3031
+
3032
+ cameraView.requestFocusInWindow();
26633033 } else
2664
- if (event.getSource() == sixButton)
3034
+ if (source == sixButton)
26653035 {
26663036 radio.layout = sixButton;
2667
- bigThree.remove(jtp);
2668
- bigThree.remove(cameraPanel);
2669
- bigThree.remove(XYZPanel);
2670
- aWindowConstraints.gridx = 0;
2671
- aWindowConstraints.gridy = 0;
2672
- aWindowConstraints.gridwidth = 1;
2673
- // aConstraints.gridheight = 3;
2674
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2675
- aWindowConstraints.weightx = 0;
2676
- aWindowConstraints.weighty = 1;
2677
- bigThree.add(jtp, aWindowConstraints);
2678
- aWindowConstraints.weightx = 1;
2679
- aWindowConstraints.gridwidth = 3;
2680
- // aWindowConstraints.gridheight = 3;
2681
- aWindowConstraints.gridx = 1;
2682
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2683
- bigThree.add(cameraPanel, aWindowConstraints);
2684
- aWindowConstraints.weightx = 0;
2685
- aWindowConstraints.gridx = 4;
2686
- aWindowConstraints.gridwidth = 1;
2687
- // aWindowConstraints.gridheight = 3;
2688
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2689
- //bigThree.add(XYZPanel, aConstraints);
2690
- bigThree.revalidate();
3037
+
3038
+// bigThree.remove(scenePanel);
3039
+// bigThree.remove(centralPanel);
3040
+// bigThree.remove(XYZPanel);
3041
+// aWindowConstraints.gridx = 0;
3042
+// aWindowConstraints.gridy = 0;
3043
+// aWindowConstraints.gridwidth = 1;
3044
+// // aConstraints.gridheight = 3;
3045
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3046
+// aWindowConstraints.weightx = 0;
3047
+// aWindowConstraints.weighty = 1;
3048
+// bigThree.add(scenePanel, aWindowConstraints);
3049
+// aWindowConstraints.weightx = 1;
3050
+// aWindowConstraints.gridwidth = 3;
3051
+// // aWindowConstraints.gridheight = 3;
3052
+// aWindowConstraints.gridx = 1;
3053
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3054
+// bigThree.add(centralPanel, aWindowConstraints);
3055
+// aWindowConstraints.weightx = 0;
3056
+// aWindowConstraints.gridx = 4;
3057
+// aWindowConstraints.gridwidth = 1;
3058
+// // aWindowConstraints.gridheight = 3;
3059
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3060
+// //bigThree.add(XYZPanel, aConstraints);
3061
+// bigThree.validate();
3062
+// scenePanel.setVisible(true);
3063
+// centralPanel.setVisible(true);
3064
+// XYZPanel.setVisible(false);
3065
+ bigThree.ClearUI();
3066
+ bigThree.add(scenePanel);
3067
+ bigThree.add(centralPanel);
3068
+ bigThree.FlushUI();
3069
+
3070
+ cameraView.requestFocusInWindow();
26913071 } else
2692
- if (event.getSource() == sevenButton)
3072
+ if (source == sevenButton)
26933073 {
26943074 radio.layout = sevenButton;
2695
- bigThree.remove(jtp);
2696
- bigThree.remove(cameraPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aWindowConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aWindowConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(cameraPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- bigThree.add(XYZPanel, aWindowConstraints);
2718
- bigThree.revalidate();
3075
+
3076
+// bigThree.remove(scenePanel);
3077
+// bigThree.remove(centralPanel);
3078
+// bigThree.remove(XYZPanel);
3079
+// aWindowConstraints.gridx = 0;
3080
+// aWindowConstraints.gridy = 0;
3081
+// aWindowConstraints.gridwidth = 1;
3082
+// // aWindowConstraints.gridheight = 3;
3083
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3084
+// aWindowConstraints.weightx = 0;
3085
+// aWindowConstraints.weighty = 1;
3086
+// bigThree.add(scenePanel, aWindowConstraints);
3087
+// aWindowConstraints.weightx = 1;
3088
+// aWindowConstraints.gridwidth = 3;
3089
+// // aWindowConstraints.gridheight = 3;
3090
+// aWindowConstraints.gridx = 1;
3091
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3092
+// bigThree.add(centralPanel, aWindowConstraints);
3093
+// aWindowConstraints.weightx = 0;
3094
+// aWindowConstraints.gridx = 4;
3095
+// aWindowConstraints.gridwidth = 1;
3096
+// // aConstraints.gridheight = 3;
3097
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3098
+// bigThree.add(XYZPanel, aWindowConstraints);
3099
+// bigThree.validate();
3100
+// scenePanel.setVisible(true);
3101
+// centralPanel.setVisible(true);
3102
+// XYZPanel.setVisible(true);
3103
+ bigThree.ClearUI();
3104
+ bigThree.add(scenePanel);
3105
+ bigThree.add(centralPanel);
3106
+ bigThree.add(XYZPanel);
3107
+ bigThree.FlushUI();
3108
+
3109
+ cameraView.requestFocusInWindow();
27193110 } else
2720
- if (event.getSource() == rootButton)
3111
+ if (source == rootButton)
27213112 {
27223113 Object3D obj;
27233114 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2727,9 +3118,10 @@
27273118 EditObject(obj);
27283119 }
27293120
3121
+ cameraView.requestFocusInWindow();
27303122 refreshContents(true);
27313123 } else
2732
- if (event.getSource() == closeButton)
3124
+ if (source == closeButton)
27333125 {
27343126 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27353127 cRadio ab;
....@@ -2748,13 +3140,15 @@
27483140 break;
27493141 }
27503142 }
3143
+
3144
+ cameraView.requestFocusInWindow();
27513145 refreshContents(true);
27523146 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
3147
+ if (source == editItem || source == editButton)
27543148 {
27553149 EditSelection(false);
27563150 } else
2757
- if (event.getSource() == uneditButton)
3151
+ if (source == uneditButton)
27583152 {
27593153 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27603154 {
....@@ -2764,14 +3158,14 @@
27643158 child.CloseUI();
27653159 listUI.remove(child);
27663160
2767
- child.editWindow = null; // ???????????
3161
+ //child.editWindow = null; // ???????????
27683162 }
2769
- objEditor.ctrlPanel.revalidate();
3163
+ objEditor.ctrlPanel.FlushUI();
27703164 //objEditor.jTree.clearSelection();
27713165 //objEditor.ResetSliders();
27723166 refreshContents(true);
27733167 } else
2774
- if (event.getSource() == clearPanelButton)
3168
+ if (source == clearPanelButton)
27753169 {
27763170 assert(copy == group);
27773171 //copy.ClearUI();
....@@ -2782,7 +3176,7 @@
27823176 listUI.clear();
27833177 refreshContents(true);
27843178 } else
2785
- if (event.getSource() == allParamsButton)
3179
+ if (source == allParamsButton)
27863180 {
27873181 assert(copy == group);
27883182
....@@ -2803,19 +3197,19 @@
28033197
28043198 refreshContents(true);
28053199 } else
2806
- if (event.getSource() == unselectButton)
3200
+ if (source == unselectButton)
28073201 {
28083202 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
3203
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28103204 objEditor.ResetSliders();
28113205 refreshContents(true);
28123206 } else
2813
- if(event.getSource() instanceof cRadio)
3207
+ if(source instanceof cRadio)
28143208 {
28153209 group.parent = keepparent;
28163210 group.attributes = 0;
28173211 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
3212
+ /*cRadio*/ radio = (cRadio)source;
28193213 Object3D obj = radio.GetObject();
28203214 System.out.println("Edit " + obj);
28213215 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +3229,7 @@
28353229 }
28363230
28373231 copy = group;
2838
- //CameraPane.theRenderer.object = group;
3232
+ //Globals.theRenderer.object = group;
28393233 if(!useclient)
28403234 {
28413235 cameraView.renderCamera = radio.camera;
....@@ -2844,12 +3238,16 @@
28443238 cameraView.cameras[cameraView.cameracount] = radio.camera;
28453239 cameraView.targetLookAt.set(radio.camera.lookAt);
28463240 cameraView.object = group;
2847
- cameraView.lighttouched = true;
3241
+ //cameraView.lighttouched = true;
3242
+ Globals.lighttouched = true;
28483243 topView.object = group;
28493244 frontView.object = group;
28503245 sideView.object = group;
28513246 }
2852
- group.editWindow = this;
3247
+
3248
+// fix "+" issue
3249
+ //group.editWindow = this;
3250
+
28533251 /*
28543252 currentLayout = radio.layout;
28553253 if (currentLayout == null)
....@@ -2861,8 +3259,23 @@
28613259 //group.parent = null; // ROOT
28623260 //group.attributes = -1;
28633261 ResetModel();
3262
+
3263
+ cameraView.requestFocusInWindow();
28643264 refreshContents(true);
2865
- }
3265
+ } else if (event.getSource() == editCameraItem)
3266
+ {
3267
+ cameraView.ProtectCamera();
3268
+ cameraView.repaint();
3269
+ return;
3270
+ } else if (event.getSource() == revertCameraItem)
3271
+ {
3272
+ cameraView.RevertCamera();
3273
+ cameraView.repaint();
3274
+ return;
3275
+ // } else if (event.getSource() == textureButton)
3276
+ // {
3277
+ // return; // true;
3278
+ }
28663279 else
28673280 {
28683281 //return super.action(event, arg);
....@@ -2871,7 +3284,6 @@
28713284 }
28723285
28733286 boolean useclient = false;
2874
- cRadio radio;
28753287
28763288 void ToggleRoot()
28773289 {
....@@ -2880,7 +3292,7 @@
28803292 if (useclient)
28813293 {
28823294 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3295
+ Globals.lighttouched = true;
28843296 //topView.object = client;
28853297 //frontView.object = client;
28863298 //sideView.object = client;
....@@ -2888,7 +3300,7 @@
28883300 else
28893301 {
28903302 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3303
+ Globals.lighttouched = true;
28923304 //topView.object = group;
28933305 //frontView.object = group;
28943306 //sideView.object = group;
....@@ -2923,6 +3335,28 @@
29233335 refreshContents();
29243336 }
29253337
3338
+ void TransformChildren()
3339
+ {
3340
+ Object3D obj;
3341
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3342
+ {
3343
+ obj = (Object3D)e.nextElement();
3344
+ obj.KeepTextureMatrices();
3345
+ obj.TransformChildren();
3346
+ obj.RestoreTextureMatrices();
3347
+
3348
+// if (obj.parent == null)
3349
+// {
3350
+// System.out.println("NULL PARENT!");
3351
+// new Exception().printStackTrace();
3352
+// }
3353
+// else
3354
+// TouchTransform(obj);
3355
+// //obj.parent.Touch();
3356
+ }
3357
+
3358
+ refreshContents();
3359
+ }
29263360
29273361 void ResetTransform()
29283362 {
....@@ -3035,7 +3469,7 @@
30353469 refreshContents();
30363470 }
30373471
3038
- void ResetCentroid()
3472
+ void ResetCentroid(boolean full)
30393473 {
30403474 Object3D obj;
30413475 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3050,12 +3484,16 @@
30503484 LA.matIdentity(Object3D.mat);
30513485 obj.getBounds(minima, maxima, false);
30523486 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3053
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3487
+ if (full)
3488
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
30543489 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
30553490 obj.TransformMesh(Object3D.mat);
3491
+
30563492 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3057
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3493
+ if (full)
3494
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
30583495 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3496
+
30593497 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
30603498 //Object3D.mat[3][0] = -Object3D.mat[3][0];
30613499 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3084,7 +3522,8 @@
30843522
30853523 int size = obj.MemorySize();
30863524
3087
- System.err.println((size/1024) + " KB is the size of " + obj);
3525
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3526
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
30883527 }
30893528 }
30903529 catch (Exception e)
....@@ -3121,9 +3560,9 @@
31213560 obj = (Object3D)e.nextElement();
31223561
31233562 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3563
+ Grafreed.AnalyzeObject(obj);
31253564 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3565
+ Grafreed.AnalyzeObject(obj.bRep);
31273566
31283567 // System.err.println((size/1024) + " KB is the size of " + obj);
31293568 }
....@@ -3165,6 +3604,20 @@
31653604 void GenNormals(boolean crease)
31663605 {
31673606 group.GenNormalsS(crease);
3607
+
3608
+ refreshContents();
3609
+ }
3610
+
3611
+ void GenNormalsMESH()
3612
+ {
3613
+ group.GenNormalsMeshS();
3614
+
3615
+ refreshContents();
3616
+ }
3617
+
3618
+ void GenNormalsMINE()
3619
+ {
3620
+ group.selection.GenNormalsMINE();
31683621
31693622 refreshContents();
31703623 }
....@@ -3250,7 +3703,7 @@
32503703 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513704 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523705 //
3253
-// g.add(GraphreeD.clipboard);
3706
+// g.add(GrafreeD.clipboard);
32543707 //
32553708 // buffer.add(g);
32563709 // }
....@@ -3269,8 +3722,8 @@
32693722 // nodes = new Object3D();
32703723 // vertices = new Vector<Vertex>();
32713724 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3725
+// boolean epsequal = GrafreeD.epsequal;
3726
+// GrafreeD.epsequal = true;
32743727 //
32753728 // for (int i=0; i<group.selection.size(); i++)
32763729 // {
....@@ -3311,7 +3764,7 @@
33113764 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123765 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133766 //
3314
-// g.add(GraphreeD.clipboard);
3767
+// g.add(GrafreeD.clipboard);
33153768 //
33163769 // buffer.add(g);
33173770 // }
....@@ -3319,7 +3772,7 @@
33193772 // makeSomething(buffer, i==group.selection.size()-1);
33203773 // }
33213774 //
3322
-// GraphreeD.epsequal = epsequal;
3775
+// GrafreeD.epsequal = epsequal;
33233776 //
33243777 // //buffer = null;
33253778 // temprep = null;
....@@ -3330,8 +3783,8 @@
33303783
33313784 void ParseVertices()
33323785 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3786
+ boolean epsequal = Grafreed.epsequal;
3787
+ Grafreed.epsequal = true;
33353788
33363789 for (int i=0; i<group.selection.size(); i++)
33373790 {
....@@ -3356,7 +3809,7 @@
33563809 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573810 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583811
3359
- g.add(GraphreeD.clipboard);
3812
+ g.add(Grafreed.clipboard);
33603813
33613814 buffer.add(g);
33623815 }
....@@ -3371,7 +3824,7 @@
33713824 makeSomething(buffer, i==group.selection.size()-1);
33723825 }
33733826
3374
- GraphreeD.epsequal = epsequal;
3827
+ Grafreed.epsequal = epsequal;
33753828
33763829 refreshContents();
33773830 }
....@@ -3389,7 +3842,16 @@
33893842 String pigment = Object3D.GetPigment(tex);
33903843 //String bump = Object3D.GetBump(tex);
33913844
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3845
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3846
+
3847
+ try
3848
+ {
3849
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3850
+ }
3851
+ catch (Exception e)
3852
+ {
3853
+ System.err.println("FAIL: " + node);
3854
+ }
33933855
33943856 double s = v.s;
33953857
....@@ -3416,7 +3878,7 @@
34163878 scale /= 3;
34173879
34183880 scale /= 0xFF;
3419
- scale /= 4;
3881
+ // c'est quoi ca? scale /= 4;
34203882
34213883 //v.AO = scale;
34223884
....@@ -3437,12 +3899,26 @@
34373899
34383900 void Align()
34393901 {
3902
+ if (group.selection.size() == 0)
3903
+ return;
3904
+
3905
+ cVector bbmin = new cVector();
3906
+ cVector bbmax = new cVector();
3907
+
3908
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3909
+
3910
+ double dx = bbmax.x - bbmin.x;
3911
+ double dy = bbmax.y - bbmin.y;
3912
+ double dz = bbmax.z - bbmin.z;
3913
+
3914
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3915
+
34403916 for (int i=0; i<group.selection.size(); i++)
34413917 {
34423918 Object3D obj = group.selection.get(i);
34433919
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3920
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3921
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463922 }
34473923
34483924 refreshContents();
....@@ -3455,7 +3931,7 @@
34553931 // ref.SaveSupports();
34563932 // Object3D par = ref.parent;
34573933 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3934
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593935 // ref.parent = par;
34603936 // ref.RestoreSupports();
34613937
....@@ -3463,11 +3939,11 @@
34633939
34643940 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34653941
3466
- boolean random = CameraPane.RANDOM;
3467
- CameraPane.RANDOM = false; // parse all random nodes
3942
+ boolean random = CameraPane.SWITCH;
3943
+ CameraPane.SWITCH = false; // parse all random nodes
34683944 lowres.linkVerticesThis(null);
34693945 lowres.linkVerticesThis(sn);
3470
- CameraPane.RANDOM = random;
3946
+ CameraPane.SWITCH = random;
34713947
34723948 System.err.flush();
34733949
....@@ -3485,7 +3961,7 @@
34853961 // lowres.SaveSupports();
34863962 // par = lowres.parent;
34873963 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3964
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893965 Object3D newlow = CloneObject(lowres, false);
34903966 newlow.name = sn.switchobject.get(i).name;
34913967 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3983,7 @@
35073983 return;
35083984
35093985 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3986
+ Object3D ref = Grafreed.clipboard.get(0);
35113987
35123988 Object3D newgroup = new Object3D("Po:" + poses.name);
35133989
....@@ -3676,7 +4152,7 @@
36764152 group.selection.RelinkToSupport(); // july 2014
36774153 System.out.println("DONE.");
36784154 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
4155
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36804156 }
36814157
36824158 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +4177,20 @@
37014177
37024178 void ClipMesh()
37034179 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
4180
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
37054181 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
4182
+ Object3D content = Grafreed.clipboard.get(0);
37074183
37084184 if (content instanceof cGroup && ((cGroup)content).transientlink )
37094185 content = ((cGroup)content).get(0);
37104186
37114187 // for (int i=0; i<group.selection.size(); i++)
37124188 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
4189
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37144190 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
4191
+ group.selection.ClipMesh(Grafreed.clipboard);
37164192 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
4193
+// group.selection.ClipMesh(GrafreeD.clipboard);
37184194 System.out.println("DONE.");
37194195 refreshContents();
37204196 }
....@@ -3759,6 +4235,18 @@
37594235 void MarkLeaves(boolean hide)
37604236 {
37614237 group.selection.MarkLeaves(hide);
4238
+ refreshContents();
4239
+ }
4240
+
4241
+ void RewindLeaves(boolean hide)
4242
+ {
4243
+ group.selection.RewindLeaves(hide);
4244
+ refreshContents();
4245
+ }
4246
+
4247
+ void RandomLeaves(boolean hide)
4248
+ {
4249
+ group.selection.RandomLeaves(hide);
37624250 refreshContents();
37634251 }
37644252
....@@ -3847,7 +4335,7 @@
38474335 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38484336
38494337 Object3D elem = (Object3D)group.selection.elementAt(i);
3850
- if(elem != group)
4338
+ if(elem != group || !newWindow)
38514339 {
38524340 // if (!(elem instanceof Composite))
38534341 // newWindow = false;
....@@ -3937,7 +4425,6 @@
39374425 //case 702: // Event.LIST_DESELECT
39384426 group.deselectAll();
39394427 TreePath tps[] = objEditor.jTree.getSelectionPaths();
3940
- objEditor.ClearInfo(); // .GetMaterial());
39414428 if (tps != null)
39424429 {
39434430 for (int i=0; i < tps.length; i++)
....@@ -3946,31 +4433,30 @@
39464433
39474434 //if (child.parent != null)
39484435 //child.parent.addSelectee(child);
4436
+ objEditor.SetMaterial(child);
39494437 group.addSelectee(child);
3950
- objEditor.SetMaterial(child); // .GetMaterial());
3951
- objEditor.AddInfo(child, this, true); // .GetMaterial());
3952
- System.err.println("info : " + child.GetPath());
39534438 }
39544439 }
3955
- else
3956
- {
3957
- objEditor.SetMaterial(group); // .GetMaterial());
3958
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3959
- System.err.println("info : " + group.GetPath());
3960
- }
4440
+// else
4441
+// {
4442
+// objEditor.SetMaterial(group); // .GetMaterial());
4443
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4444
+// System.err.println("info : " + group.GetPath());
4445
+// }
39614446
3962
- objEditor.SetText(); // jan 2014
3963
-
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4447
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
39654448 CameraPane.flash = true;
39664449
3967
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4450
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
39684451 // a camera
39694452 {
3970
- CameraPane.camerachangeframe = 0; // don't refuse it
3971
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3972
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3973
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4453
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4454
+ {
4455
+ CameraPane.camerachangeframe = 0; // don't refuse it
4456
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4457
+ }
4458
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4459
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744460 }
39754461
39764462 refreshContents();
....@@ -3981,6 +4467,26 @@
39814467
39824468 freezemodel = false;
39834469 }
4470
+
4471
+ void refreshContents(boolean cp)
4472
+ {
4473
+ if (!Globals.MOUSEDRAGGED)
4474
+ {
4475
+ objEditor.ClearInfo(); // .GetMaterial());
4476
+
4477
+ for (int i=0; i < group.selection.Size(); i++)
4478
+ {
4479
+ Object3D child = (Object3D) group.selection.get(i);
4480
+
4481
+ objEditor.AddInfo(child, this, true);
4482
+ System.err.println("info : " + child.GetPath());
4483
+ }
4484
+
4485
+ objEditor.SetText(); // jan 2014
4486
+ }
4487
+
4488
+ super.refreshContents(cp);
4489
+ }
39844490
39854491 void linkSomething(Object3D thing)
39864492 {
....@@ -4052,16 +4558,18 @@
40524558 {
40534559 if (group.selection.isEmpty())
40544560 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4561
+
4562
+ Grafreed.clipboardIsTempGroup = false;
40564563 Composite tGroup = null;
40574564 if (group.selection.size() > 0) // 1)
40584565 {
40594566 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4567
+ Grafreed.clipboardIsTempGroup = true;
40614568 }
40624569
40634570 if (cut)
40644571 {
4572
+ Save();
40654573 //int indices[] = jList.getSelectedIndices();
40664574 //for (int i = indices.length - 1; i >= 0; i--)
40674575 //jList.remove(indices[i]);
....@@ -4097,16 +4605,16 @@
40974605 //System.out.println("cut " + child);
40984606 //System.out.println("parent = " + child.parent);
40994607 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4608
+ if (Grafreed.clipboardIsTempGroup)
41014609 tGroup.add/*Child*/(tmp);
41024610 else
4103
- GraphreeD.clipboard = tmp;
4611
+ Grafreed.clipboard = tmp;
41044612 }
41054613 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4614
+ if (Grafreed.clipboardIsTempGroup)
41074615 tGroup.add/*Child*/(child);
41084616 else
4109
- GraphreeD.clipboard = child;
4617
+ Grafreed.clipboard = child;
41104618 }
41114619
41124620 //ResetModel();
....@@ -4138,21 +4646,23 @@
41384646 //System.out.println("cut " + elem);
41394647 //System.out.println("parent = " + elem.parent);
41404648 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4649
+ if (Grafreed.clipboardIsTempGroup)
41424650 tGroup.add/*Child*/(tmp);
41434651 else
4144
- GraphreeD.clipboard = tmp;
4652
+ Grafreed.clipboard = tmp;
41454653 }
41464654 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4655
+ if (Grafreed.clipboardIsTempGroup)
41484656 tGroup.add/*Child*/(child);
41494657 else
4150
- GraphreeD.clipboard = child;
4658
+ Grafreed.clipboard = child;
41514659 }
41524660
41534661 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4662
+
4663
+ if (Grafreed.clipboardIsTempGroup)
4664
+ Grafreed.clipboard = tGroup;
4665
+
41564666 if (cut)
41574667 {
41584668 ResetModel();
....@@ -4162,11 +4672,11 @@
41624672
41634673 void paste(boolean expand)
41644674 {
4165
- // if (GraphreeD.clipboard == null)
4675
+ // if (GrafreeD.clipboard == null)
41664676 // return;
41674677 boolean first = true;
41684678
4169
- if (GraphreeD.clipboardIsTempGroup)
4679
+ if (Grafreed.clipboardIsTempGroup)
41704680 {
41714681 Composite temp;
41724682
....@@ -4177,7 +4687,7 @@
41774687 temp = (Composite)Applet3D.clipboard.deepCopy();
41784688 */
41794689 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4690
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814691 {
41824692 Object3D child = (Object3D)e.nextElement();
41834693
....@@ -4191,7 +4701,7 @@
41914701 else
41924702 elem = child.deepCopy(); // ?
41934703 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4704
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954705 // elem = elem.get(0);
41964706 makeSomething(elem, true); // ?? first);
41974707 //group.addChild(elem);
....@@ -4211,23 +4721,23 @@
42114721 //Object3D cb = Applet3D.clipboard;
42124722 //temp.addChild(cb);
42134723 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4214
- assert(GraphreeD.clipboard.parent == null);
4215
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
4216
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
4217
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
4218
- makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy());
4724
+ assert(Grafreed.clipboard.parent == null);
4725
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4726
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4727
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4728
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
42194729 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4730
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4731
+ Grafreed.clipboard.get(0).parent = keepparent;
42224732 }
42234733
42244734 ResetModel();
42254735 refreshContents();
42264736 }
42274737
4228
- void pasteInto(boolean copyit)
4738
+ void pasteInto(boolean copyit, boolean clone)
42294739 {
4230
-// if (GraphreeD.clipboard == null)
4740
+// if (GrafreeD.clipboard == null)
42314741 // return;
42324742
42334743 if (group.selection.size() != 1)
....@@ -4254,15 +4764,22 @@
42544764 if (copyit)
42554765 {
42564766 // paste(false);
4257
- CloneClipboard(false); // sept 2014
4767
+ if (clone)
4768
+ {
4769
+ CloneClipboard(false); // sept 2014
4770
+ }
4771
+ else
4772
+ {
4773
+ paste(false);
4774
+ }
42584775 }
42594776 else
42604777 {
42614778 boolean first = true;
42624779
4263
- if (GraphreeD.clipboardIsTempGroup)
4780
+ if (Grafreed.clipboardIsTempGroup)
42644781 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4782
+ Composite temp = (Composite)Grafreed.clipboard;
42664783 Object3D copy;
42674784 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684785 {
....@@ -4272,7 +4789,7 @@
42724789 }
42734790 } else
42744791 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4792
+ linkSomething(Grafreed.clipboard); //.get(0));
42764793 }
42774794 }
42784795 }
....@@ -4464,6 +4981,26 @@
44644981 makeSomething(csg);
44654982 }
44664983
4984
+ void Ungroup(Object3D g)
4985
+ {
4986
+ if (g instanceof HiddenObject)
4987
+ {
4988
+ HiddenObject h = (HiddenObject) g;
4989
+
4990
+ for (int i=0; i<h.ActualSize(); i++)
4991
+ {
4992
+ objEditor.makeSomething(h.get(i), false);
4993
+ }
4994
+ }
4995
+ else
4996
+ {
4997
+ for (int i=0; i<g.Size(); i++)
4998
+ {
4999
+ objEditor.makeSomething(g.get(i), false);
5000
+ }
5001
+ }
5002
+ }
5003
+
44675004 void ungroup()
44685005 {
44695006 /*
....@@ -4657,21 +5194,6 @@
46575194 }
46585195 */
46595196
4660
- void ImportGFD()
4661
- {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4663
- browser.show();
4664
- String filename = browser.getFile();
4665
- if (filename != null && filename.length() > 0)
4666
- {
4667
- String fullname = browser.getDirectory() + filename;
4668
-
4669
- //Object3D readobj =
4670
- objEditor.ReadGFD(fullname, objEditor);
4671
- //makeSomething(readobj);
4672
- }
4673
- }
4674
-
46755197 /*
46765198 public void Callback(Object obj)
46775199 {
....@@ -4695,26 +5217,9 @@
46955217 }
46965218 */
46975219
4698
- void ImportVRMLX3D()
4699
- {
4700
- if (GraphreeD.standAlone)
4701
- {
4702
- /**/
4703
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4704
- browser.show();
4705
- String filename = browser.getFile();
4706
- if (filename != null && filename.length() > 0)
4707
- {
4708
- String fullname = browser.getDirectory() + filename;
4709
- LoadVRMLX3D(fullname);
4710
- }
4711
- /**/
4712
- }
4713
- }
4714
-
47155220 String GetFile(String dialogName)
47165221 {
4717
- if (GraphreeD.standAlone)
5222
+ if (Grafreed.standAlone)
47185223 {
47195224 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47205225 browser.show();
....@@ -4778,10 +5283,18 @@
47785283 cButton flashSelectionButton;
47795284 cButton editButton;
47805285 cButton uneditButton;
5286
+ JCheckBox allParamsButton;
47815287 cButton clearpanelButton;
4782
- cButton allParamsButton;
47835288 cButton unselectButton;
47845289
5290
+ cButton minButton;
5291
+ cButton maxButton;
5292
+ cButton fullButton;
5293
+ cButton undoButton;
5294
+ cButton redoButton;
5295
+ cButton saveButton;
5296
+ cButton oneStepButton;
5297
+
47855298 cButton screenfitButton;
47865299 cButton screenfitpointButton;
47875300 cButton snapobjectButton;
....@@ -4792,14 +5305,6 @@
47925305 cButton closeButton;
47935306
47945307 cButton setsupportButton;
4795
-
4796
- cButton twoButton;
4797
- cButton sixButton;
4798
- cButton threeButton;
4799
- cButton sevenButton;
4800
- cButton fourButton; // full panel
4801
- cButton oneButton; // full XYZ
4802
- //cButton currentLayout;
48035308
48045309 //
48055310 //Composite
....@@ -4812,6 +5317,8 @@
48125317 private MenuItem lookFromItem;
48135318 private MenuItem switchItem;
48145319 private MenuItem cutItem;
5320
+ private MenuItem undoItem;
5321
+ private MenuItem redoItem;
48155322 private MenuItem duplicateItem;
48165323 private MenuItem cloneItem;
48175324 private MenuItem cloneSupportItem;
....@@ -4823,8 +5330,9 @@
48235330 private MenuItem resetsupportItem;
48245331 private MenuItem resetreferencesItem;
48255332 private MenuItem linkverticesItem;
5333
+ private MenuItem relinkverticesItem;
48265334 private MenuItem setMasterItem;
4827
- private MenuItem resetMeshItem;
5335
+ private MenuItem resetAllItem;
48285336 private MenuItem stepAllItem;
48295337 private MenuItem revertMeshItem;
48305338 private MenuItem poseMeshItem;
....@@ -4835,14 +5343,17 @@
48355343 private MenuItem mergeGeometriesItem;
48365344 private MenuItem copyItem;
48375345 private MenuItem pasteItem;
5346
+ private MenuItem pasteIntoItem;
48385347 private MenuItem pasteLinkItem;
48395348 private MenuItem pasteCloneItem;
48405349 private MenuItem pasteExpandItem;
48415350 private MenuItem clearItem;
48425351 private MenuItem clearAllItem;
48435352 private MenuItem genUVItem;
5353
+ private MenuItem genNormalsMESHItem;
48445354 private MenuItem genNormalsCADItem;
48455355 private MenuItem genNormalsORGANItem;
5356
+ private MenuItem genNormalsMINEItem;
48465357 private MenuItem stripifyItem;
48475358 private MenuItem unstripifyItem;
48485359 private MenuItem trimItem;
....@@ -4871,6 +5382,10 @@
48715382 private MenuItem showleavesItem;
48725383 private MenuItem markleavesItem;
48735384 private MenuItem unmarkleavesItem;
5385
+ private MenuItem rewindleavesItem;
5386
+ private MenuItem unrewindleavesItem;
5387
+ private MenuItem randomleavesItem;
5388
+ private MenuItem unrandomleavesItem;
48745389
48755390 private MenuItem flipVItem;
48765391 private MenuItem unflipVItem;
....@@ -4882,8 +5397,11 @@
48825397 private MenuItem panoTexturesItem;
48835398
48845399 private MenuItem resetCentroidItem;
4885
- private MenuItem transformgeometryItem;
5400
+ private MenuItem resetCentroidXZItem;
48865401 private MenuItem resetTransformItem;
5402
+ private MenuItem transformGeometryItem;
5403
+ private MenuItem transformChildrenItem;
5404
+ private MenuItem hideItem;
48875405 private MenuItem grabItem;
48885406 private MenuItem backItem;
48895407 private MenuItem frontItem;
....@@ -4904,6 +5422,7 @@
49045422
49055423 private MenuItem resetParentItem;
49065424 private MenuItem repairParentItem;
5425
+ private MenuItem repairShadowItem;
49075426 private MenuItem sortbysizeItem;
49085427 private MenuItem sortbynameItem;
49095428
....@@ -4924,10 +5443,11 @@
49245443 private MenuItem coneItem;
49255444 private MenuItem torusItem;
49265445 private MenuItem superItem;
5446
+ private MenuItem kleinItem;
49275447 private MenuItem blobItem;
49285448 private MenuItem latheItem;
49295449 private MenuItem bezierItem;
4930
- private MenuItem checkerItem;
5450
+ private MenuItem overlayItem;
49315451 private MenuItem meshItem;
49325452 // private MenuItem meshGroupItem;
49335453 private MenuItem springItem;
....@@ -4936,6 +5456,7 @@
49365456 private MenuItem csgItem;
49375457 private MenuItem templateItem;
49385458 private MenuItem textureItem;
5459
+ private MenuItem billboardItem;
49395460 private MenuItem shadowXItem;
49405461 private MenuItem shadowYItem;
49415462 private MenuItem shadowZItem;
....@@ -4948,11 +5469,6 @@
49485469 private MenuItem doubleItem;
49495470 private MenuItem tripleItem;
49505471
4951
- private MenuItem importGFDItem;
4952
- private MenuItem importVRMLX3DItem;
4953
- private MenuItem import3DSItem;
4954
- private MenuItem importOBJItem;
4955
-
49565472 private MenuItem computeAOItem;
49575473 private MenuItem recompileItem;
49585474 private MenuItem editScriptItem;
....@@ -4962,4 +5478,8 @@
49625478 private MenuItem analyzeItem;
49635479 private MenuItem dumpItem;
49645480 //boolean freezemodel = false;
5481
+
5482
+ Menu cameraMenu;
5483
+ MenuItem editCameraItem;
5484
+ MenuItem revertCameraItem;
49655485 }