Normand Briere
2019-06-24 47cd0f0a3870d843cb758535316060d30f15c811
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,131 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ oe.jTree = new cTree();
154
+
155
+ Menu menu;
156
+ oe.menuBar.add(menu = new Menu("Edit"));
157
+ //editItem = menu.add(new MenuItem("Edit"));
158
+ //editItem.addActionListener(this);
159
+
160
+// undoItem = menu.add(new MenuItem("Undo"));
161
+// undoItem.addActionListener(this);
162
+// redoItem = menu.add(new MenuItem("Redo"));
163
+// redoItem.addActionListener(this);
164
+// menu.add("-");
165
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
166
+ duplicateItem.addActionListener(this);
167
+ cloneItem = menu.add(new MenuItem("Clone"));
168
+ cloneItem.addActionListener(this);
169
+ if (Globals.ADVANCED)
170
+ {
171
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
172
+ cloneSupportItem.addActionListener(this);
173
+ }
174
+ menu.add("-");
175
+ cutItem = menu.add(new MenuItem("Cut"));
176
+ cutItem.addActionListener(this);
177
+ copyItem = menu.add(new MenuItem("Copy"));
178
+ copyItem.addActionListener(this);
179
+ pasteItem = menu.add(new MenuItem("Paste"));
180
+ pasteItem.addActionListener(this);
181
+
182
+ menu.add("-");
183
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
184
+ pasteIntoItem.addActionListener(this);
185
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
186
+ pasteLinkItem.addActionListener(this);
187
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
188
+ pasteCloneItem.addActionListener(this);
189
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
190
+// pasteExpandItem.addActionListener(this);
191
+ menu.add("-");
192
+ clearItem = menu.add(new MenuItem("Clear"));
193
+ clearItem.addActionListener(this);
194
+
195
+ if (Globals.ADVANCED)
196
+ {
197
+ // Deletes the cameras...
198
+ clearAllItem = menu.add(new MenuItem("Clear All"));
199
+ clearAllItem.addActionListener(this);
200
+ }
201
+
202
+ menuBar.add(cameraMenu = new Menu("View"));
203
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
204
+ //zBufferItem.addActionListener(this);
205
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
206
+ //normalLensItem.addActionListener(this);
207
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
208
+ revertCameraItem.addActionListener(this);
209
+
210
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
211
+ toggleFullScreenItem.addItemListener(this);
212
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
213
+ cameraMenu.add("-");
214
+
215
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
216
+ toggleTextureItem.addItemListener(this);
217
+ toggleTextureItem.setState(CameraPane.textureon);
218
+
219
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
220
+ toggleSwitchItem.addItemListener(this);
221
+ toggleSwitchItem.setState(CameraPane.SWITCH);
222
+
223
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
224
+ toggleHandleItem.addItemListener(this);
225
+ toggleHandleItem.setState(CameraPane.HANDLES);
226
+
227
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
228
+ togglePaintItem.addItemListener(this);
229
+ togglePaintItem.setState(CameraPane.PAINTMODE);
230
+
231
+ if (Globals.ADVANCED)
232
+ {
233
+ cameraMenu.add("-");
234
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
235
+ toggleLiveItem.addItemListener(this);
236
+ toggleLiveItem.setState(Globals.isLIVE());
237
+
238
+ cameraMenu.add(stepItem = new MenuItem("Step"));
239
+ stepItem.addActionListener(this);
240
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
241
+ // toggleDLItem.addItemListener(this);
242
+ // toggleDLItem.setState(false);
243
+
244
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
245
+ toggleRenderItem.addItemListener(this);
246
+ toggleRenderItem.setState(!CameraPane.frozen);
247
+
248
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
249
+ toggleDebugItem.addItemListener(this);
250
+ toggleDebugItem.setState(Globals.DEBUG);
251
+
252
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
253
+ toggleFrustumItem.addItemListener(this);
254
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
255
+
256
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
257
+ toggleFootContactItem.addItemListener(this);
258
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
259
+
260
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
261
+ toggleTimelineItem.addItemListener(this);
262
+ }
263
+
264
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
265
+// toggleRootItem.addItemListener(this);
266
+// toggleRootItem.setState(false);
267
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
268
+// animationItem.addItemListener(this);
269
+// animationItem.setState(CameraPane.ANIMATION);
270
+ cameraMenu.add("-");
271
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
272
+ editCameraItem.addActionListener(this);
273
+
274
+ if (Globals.ADVANCED)
275
+ {
152276 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153277 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154278 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +284,17 @@
160284 lookAtItem.addActionListener(this);
161285 //lookFromItem.addActinoListener(this);
162286 //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
-
287
+ }
288
+
192289 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);
290
+ if (Globals.ADVANCED)
291
+ {
197292 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198293 revertMeshItem.addActionListener(this);
199294 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200295 resetreferencesItem.addActionListener(this);
201296 menu.add("-");
297
+ }
202298 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203299 overwriteGeoItem.addActionListener(this);
204300 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +306,26 @@
210306 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211307 overwriteUVItem.addActionListener(this);
212308 menu.add("-");
309
+ if (Globals.ADVANCED)
310
+ {
213311 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214312 generateMeshItem.addActionListener(this);
215313 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216314 poseMeshItem.addActionListener(this);
217315 menu.add("-");
316
+ }
218317 resetsupportItem = menu.add(new MenuItem("Reset support"));
219318 resetsupportItem.addActionListener(this);
220319 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221320 linkverticesItem.addActionListener(this);
222321 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223322 relinkverticesItem.addActionListener(this);
323
+
324
+ if (Globals.ADVANCED)
325
+ {
224326 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225327 setMasterItem.addActionListener(this);
328
+ }
226329
227330 oe.menuBar.add(menu = new Menu("Group"));
228331 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +336,38 @@
233336 frontItem.addActionListener(this);
234337 compositeItem = menu.add(new MenuItem("Composite"));
235338 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
339
+
340
+ if (Globals.ADVANCED)
341
+ {
342
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237343 hideItem.addActionListener(this);
344
+ }
238345 ungroupItem = menu.add(new MenuItem("Ungroup"));
239346 ungroupItem.addActionListener(this);
347
+
240348 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
349
+
350
+ randomItem = menu.add(new MenuItem("Switch node"));
242351 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
352
+ if (Globals.ADVANCED)
353
+ {
247354 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248355 switchGeoItem.addActionListener(this);
249356 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250357 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
358
+ morphItem = menu.add(new MenuItem("Morph Group"));
252359 morphItem.addActionListener(this);
360
+
361
+ menu.add("-");
362
+ physicsItem = menu.add(new MenuItem("Physics"));
363
+ physicsItem.addActionListener(this);
364
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
365
+ frameselectorItem.addActionListener(this);
253366 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254367 scriptNodeItem.addActionListener(this);
255368 cameraItem = menu.add(new MenuItem("Camera"));
256369 cameraItem.addActionListener(this);
370
+ }
257371
258372 oe.menuBar.add(menu = new Menu("Object"));
259373 textureItem = menu.add(new MenuItem("Texture"));
....@@ -262,27 +376,35 @@
262376 billboardItem.addActionListener(this);
263377 csgItem = menu.add(new MenuItem("CSG"));
264378 csgItem.addActionListener(this);
265
- shadowXItem = menu.add(new MenuItem("Shadow X"));
379
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
266380 shadowXItem.addActionListener(this);
267
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
381
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
268382 shadowYItem.addActionListener(this);
269
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
383
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
270384 shadowZItem.addActionListener(this);
385
+ if (Globals.ADVANCED)
386
+ {
387
+ menu.add("-");
271388 linkerItem = menu.add(new MenuItem("Linker"));
272389 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275390 attributeItem = menu.add(new MenuItem("Attribute"));
276391 attributeItem.addActionListener(this);
392
+ templateItem = menu.add(new MenuItem("Template"));
393
+ templateItem.addActionListener(this);
277394 pointflowItem = menu.add(new MenuItem("Point Flow"));
278395 pointflowItem.addActionListener(this);
396
+ }
279397 menu.add("-");
280398 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281399 resetTransformItem.addActionListener(this);
282400 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283401 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
402
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
403
+ resetCentroidXZItem.addActionListener(this);
404
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
405
+ transformGeometryItem.addActionListener(this);
406
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
407
+ transformChildrenItem.addActionListener(this);
286408
287409 oe.menuBar.add(menu = new Menu("Geometry"));
288410 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +415,11 @@
293415 genNormalsCADItem.addActionListener(this);
294416 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295417 genNormalsMESHItem.addActionListener(this);
418
+ if (Globals.ADVANCED)
419
+ {
296420 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297421 genNormalsMINEItem.addActionListener(this);
422
+ }
298423 stripifyItem = menu.add(new MenuItem("Stripify"));
299424 stripifyItem.addActionListener(this);
300425 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +441,34 @@
316441 reduce34MeshItem.addActionListener(this);
317442 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318443 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321444 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322445 clipMeshItem.addActionListener(this);
446
+
447
+ if (Globals.ADVANCED)
448
+ {
449
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
450
+ smoothMeshItem.addActionListener(this);
451
+ }
323452
324453 oe.menuBar.add(menu = new Menu("Attributes"));
325454 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326455 clearMaterialsItem.addActionListener(this);
456
+ resetAllItem = menu.add(new MenuItem("Reset All"));
457
+ resetAllItem.addActionListener(this);
458
+ stepAllItem = menu.add(new MenuItem("Step All"));
459
+ stepAllItem.addActionListener(this);
327460 menu.add("-");
328461 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329462 liveleavesItem.addActionListener(this);
330463 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331464 unliveleavesItem.addActionListener(this);
465
+ if (Globals.ADVANCED)
466
+ {
332467 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333468 supportleavesItem.addActionListener(this);
334469 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335470 unsupportleavesItem.addActionListener(this);
471
+ }
336472 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337473 hideleavesItem.addActionListener(this);
338474 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -341,6 +477,14 @@
341477 markleavesItem.addActionListener(this);
342478 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
343479 unmarkleavesItem.addActionListener(this);
480
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
481
+ rewindleavesItem.addActionListener(this);
482
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
483
+ unrewindleavesItem.addActionListener(this);
484
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
485
+ randomleavesItem.addActionListener(this);
486
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
487
+ unrandomleavesItem.addActionListener(this);
344488 menu.add("-");
345489 flipVItem = menu.add(new MenuItem("Flip V"));
346490 flipVItem.addActionListener(this);
....@@ -376,35 +520,40 @@
376520 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377521 sortbynameItem.addActionListener(this);
378522 menu.add("-");
523
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
524
+ shareGeometriesItem.addActionListener(this);
525
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
526
+ mergeGeometriesItem.addActionListener(this);
527
+ if (Globals.ADVANCED)
528
+ {
529
+ // Pretty much the same as duplicate and clone.
379530 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380531 extractGeometriesItem.addActionListener(this);
381532 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382533 cloneGeometriesItem.addActionListener(this);
383
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
384
- shareGeometriesItem.addActionListener(this);
385
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386
- mergeGeometriesItem.addActionListener(this);
534
+ }
387535
388536 oe.menuBar.add(menu = new Menu("Insert"));
389537 buildCreateMenu(menu);
390538
391
-
392
- oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
398
- importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
400
- import3DSItem.addActionListener(this);
401
-
402539 oe.menuBar.add(menu = new Menu("Tools"));
403540 buildToolsMenu(menu);
404541 }
405542
406543 void SetupUI2(ObjEditor oe)
407544 {
545
+ // June 2019
546
+ if (oe == null)
547
+ {
548
+ //super.SetupUI2(this);
549
+ //return;
550
+ }
551
+
552
+ if (copy != group)
553
+ {
554
+ //super.SetupUI2(this);
555
+ }
556
+
408557 //new Exception().printStackTrace();
409558
410559 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -433,153 +582,171 @@
433582 oe.radioPanel.add(dummyButton);
434583 oe.buttonGroup.add(dummyButton);
435584 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
585
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439586
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
587
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588
+ //minButton.setToolTipText("Minimize window");
589
+ //minButton.addActionListener(this);
590
+
591
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592
+ maxButton.setToolTipText("Maximize window");
593
+ maxButton.addActionListener(this);
594
+
595
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
+ fullButton.setToolTipText("Full-screen window");
597
+ fullButton.addActionListener(this);
598
+
599
+ oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
+ undoButton.setToolTipText("Undo changes");
601
+ undoButton.addActionListener(this);
602
+
603
+ oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
604
+ redoButton.setToolTipText("Redo changes");
605
+ redoButton.addActionListener(this);
606
+
607
+ oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ saveButton.setToolTipText("Save changes");
609
+ saveButton.addActionListener(this);
610
+
611
+ oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
612
+ liveCB.setToolTipText("Enable animation");
441613 liveCB.addItemListener(this);
442614
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
445
- supportCB.addItemListener(this);
446
-
447
- // oe.aConstraints.gridx += 1;
448
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
449
- // localCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
453
- crowdCB.addItemListener(this);
454
-
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
457
- smoothCB.addItemListener(this);
458
-
459
- oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
615
+ oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
+ oneStepButton.setToolTipText("Animate one step forward");
617
+ oneStepButton.addActionListener(this);
618
+
619
+ oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
620
+ fastCB.setToolTipText("Fast mode");
461621 fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
464
- slowCB.addItemListener(this);
465
- oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
467
- boxCB.addItemListener(this);
468
-
469
-// oe.aConstraints.gridx += 1;
470
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
471
-// speakerMocapCB.addItemListener(this);
472
-
473
- if (false)
474
- {
475
- // handled in scripts
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
478
- speakerCameraCB.addItemListener(this);
479
-
480
- oe.aConstraints.gridx += 1;
481
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
482
- speakerFocusCB.addItemListener(this);
483
-
484
- oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
486
- smoothfocusCB.addItemListener(this);
487
- }
488
-
489
-//oe.aConstraints.gridx += 1;
490
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
491
-// debugCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
495
- oeilCB.addItemListener(this);
496
-
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
499
- lookAtCB.addItemListener(this);
500
-
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
622
+
623
+ oe.toolboxPanel.Return();
624
+
625
+ oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
626
+ trackCB.setToolTipText("Enable tracking");
503627 trackCB.addItemListener(this);
504628
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
629
+ oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
+ screenfitButton.setToolTipText("Screen fit");
507631 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
632
+
509633 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510634 // screenfitpointButton.addActionListener(this);
511
-// oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513
- snapobjectButton.addActionListener(this);
514
- oe.aConstraints.gridx += 1;
515635
516
- //aConstraints.gridx = 0;
517
- //aConstraints.gridy += 1;
518
- oe.aConstraints.weighty = 0;
519
- oe.aConstraints.gridwidth = 1;
520
-
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
636
+ if (Globals.ADVANCED)
637
+ {
638
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ snapobjectButton.addActionListener(this);
640
+ snapobjectButton.setToolTipText("Snap Object");
641
+ }
642
+
643
+ oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644
+ flashSelectionButton.setToolTipText("Highlight selection");
522645 flashSelectionButton.addActionListener(this);
523646
524
- oe.toolbarPanel.add(new cButton(" ", false));
647
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525648
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- //
531
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
+ twoButton.setToolTipText("Show center view only");
532651 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
652
+ this.fullscreenLayout = twoButton;
653
+
654
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
534655 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
656
+ fourButton.setToolTipText("Show left panel only");
657
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
658
+ sixButton.setToolTipText("2-column layout left");
536659 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
660
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
661
+ threeButton.setToolTipText("2-column layout right");
538662 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
663
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
664
+ sevenButton.setToolTipText("3-column layout");
540665 sevenButton.addActionListener(this);
541666 //
542667
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
668
+ oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
669
+ rootButton.setToolTipText("Edit selection in new tab");
544670 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
671
+
672
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
673
+ closeButton.setToolTipText("Close tab");
547674 closeButton.addActionListener(this);
548675 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549676 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551
-
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
554
- editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558677
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
678
+ // INSERT
679
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
680
+ gridButton.setToolTipText("Create grid");
681
+ gridButton.addActionListener(this);
682
+
683
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
684
+ boxButton.setToolTipText("Create box");
685
+ boxButton.addActionListener(this);
686
+
687
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688
+ sphereButton.setToolTipText("Create sphere");
689
+ sphereButton.addActionListener(this);
690
+
691
+ oe.toolboxPanel.Return();
692
+
693
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
694
+ coneButton.setToolTipText("Create cone");
695
+ coneButton.addActionListener(this);
696
+
697
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
698
+ torusButton.setToolTipText("Create torus");
699
+ torusButton.addActionListener(this);
700
+
701
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
702
+ superButton.setToolTipText("Create superellipsoid");
703
+ superButton.addActionListener(this);
704
+
705
+ if (Globals.ADVANCED)
706
+ {
707
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
708
+ kleinButton.setToolTipText("Create Klein bottle");
709
+ kleinButton.addActionListener(this);
710
+ }
711
+
712
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
713
+ particlesButton.setToolTipText("Create particle system");
714
+ particlesButton.addActionListener(this);
715
+
716
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
717
+ overlayButton.setToolTipText("Create overlay");
718
+ overlayButton.addActionListener(this);
719
+
720
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
721
+ lightButton.setToolTipText("Create light");
722
+ lightButton.addActionListener(this);
723
+
724
+ // EDIT panel
725
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
726
+ editButton.setToolTipText("Edit selection");
727
+ editButton.addActionListener(this);
728
+
729
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
730
+ uneditButton.setToolTipText("Unedit selection");
560731 uneditButton.addActionListener(this);
561732
562
- oe.aConstraints.gridx += 1;
563
- oe.aConstraints.weighty = 0;
564
- oe.aConstraints.gridwidth = 1;
565
-
566
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
567
- clearPanelButton.addActionListener(this);
568
-
569
- oe.aConstraints.gridx += 1;
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 1;
572
-
573
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
733
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
734
+ allParamsButton.setToolTipText("Edit all params");
574735 allParamsButton.addActionListener(this);
575736
576
- oe.aConstraints.gridx += 1;
577
- oe.aConstraints.weighty = 0;
578
- oe.aConstraints.gridwidth = 1;
579
-
580
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
737
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
738
+ clearPanelButton.setToolTipText("Clear edit panel");
739
+ clearPanelButton.addActionListener(this);
740
+
741
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
742
+ unselectButton.setToolTipText("Unselect");
581743 unselectButton.addActionListener(this);
582744
745
+ editCommandsPanel.preferredHeight = 1;
746
+
747
+// oe.treePanel.add(commandsPanel);
748
+// oe.treePanel.Return();
749
+
583750 // oe.aConstraints.gridx += 1;
584751 // oe.aConstraints.weighty = 0;
585752 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +758,37 @@
591758 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592759 // gcButton.addActionListener(this);
593760
594
- oe.aConstraints.gridx = 0;
595
- oe.aConstraints.gridy += 1;
596
-
597
- //ctrlPanel.add(objList = new List(5, true));
598
- oe.aConstraints.gridwidth = 100;
599
- // oe.aConstraints.gridheight = 100;
600
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
601
- oe.aConstraints.gridheight = 1;
602
- oe.aConstraints.weighty = 0.5;
603
- oe.aConstraints.gridx = 0;
604
- JScrollPane jSP;
761
+ cGridBag jSPPanel = new cGridBag();
762
+
763
+ JScrollPane jSP;
605764 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
606
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
765
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
607766 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
767
+
768
+ oe.treePanel.add(jSPPanel);
769
+ oe.treePanel.Return();
612770
613
- oe.aConstraints.weighty = 0;
614
- oe.aConstraints.gridwidth = 2;
615
-
616
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
771
+ cGridBag copyOptionsPanel = new cGridBag();
772
+
773
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
774
+ colorCB.setToolTipText("Copy color when dropped");
617775 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
776
+
777
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
778
+ materialCB.setToolTipText("Copy material when dropped");
620779 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
780
+
781
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
782
+ textureCB.setToolTipText("Copy texture when dropped");
623783 textureCB.addItemListener(this);
624784
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
785
+ copyOptionsPanel.preferredHeight = 1;
786
+ oe.treePanel.add(copyOptionsPanel);
787
+ oe.treePanel.Return();
627788
789
+// mainPanel.setDividerLocation(0.5); //1.0);
790
+// mainPanel.setResizeWeight(0.5);
791
+
628792 //jList.addListSelectionListener(this);
629793 oe.jTree.addTreeSelectionListener(this);
630794 //jTree.setRootVisible(false);
....@@ -646,10 +810,102 @@
646810 radio.layout = sevenButton;
647811 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648812 }
813
+
814
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
815
+ {
816
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
817
+ boxCB.setToolTipText("Display bounding boxes");
818
+ boxCB.addItemListener(this);
819
+
820
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
821
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
822
+ zoomBoxCB.addItemListener(this);
823
+
824
+ if (true) // Globals.ADVANCED)
825
+ {
826
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
827
+ supportCB.setToolTipText("Enable rigging");
828
+ supportCB.addItemListener(this);
829
+
830
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
831
+ // localCB.addItemListener(this);
832
+
833
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
834
+ crowdCB.setToolTipText("Used for crowds");
835
+ crowdCB.addItemListener(this);
836
+
837
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
838
+ smoothCB.setToolTipText("Snapping delay");
839
+ smoothCB.addItemListener(this);
840
+
841
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
842
+ slowCB.setToolTipText("Smooth interpolation");
843
+ slowCB.addItemListener(this);
844
+
845
+// constraints.gridy += 1;
846
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
847
+// speakerMocapCB.addItemListener(this);
848
+
849
+ if (false)
850
+ {
851
+ // handled in scripts
852
+ //constraints.gridy += 1;
853
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
854
+ speakerCameraCB.addItemListener(this);
855
+
856
+ //constraints.gridy += 1;
857
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
858
+ speakerFocusCB.addItemListener(this);
859
+
860
+ //constraints.gridy += 1;
861
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
862
+ smoothfocusCB.addItemListener(this);
863
+ }
864
+
865
+//constraints.gridx += 1;
866
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
867
+// debugCB.addItemListener(this);
868
+
869
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
870
+ oeilCB.setToolTipText("Move camera when tracking target");
871
+ oeilCB.addItemListener(this);
872
+
873
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
874
+ shadowCB.setToolTipText("Compute shadows when live");
875
+ shadowCB.addItemListener(this);
876
+
877
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
878
+ autosaveCB.setToolTipText("Auto-save on structure change");
879
+ autosaveCB.addItemListener(this);
880
+
881
+ if (Globals.ADVANCED)
882
+ {
883
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
884
+ lookAtCB.setToolTipText("Look-at target");
885
+ lookAtCB.addItemListener(this);
886
+ }
887
+
888
+ }
889
+
890
+ cGridBag fill = new cGridBag();
891
+
892
+ fill.preferredHeight = 200;
893
+
894
+ panel.add(fill);
895
+
896
+ }
649897
650898 void EditObject(Object3D obj)
651899 {
652900 cRadio radioButton = new cRadio(obj.name);
901
+
902
+ // Patch to avoid bug with transparency.
903
+ radioButton.hadMaterial = obj.material != null;
904
+ if (!radioButton.hadMaterial)
905
+ {
906
+ obj.material = new cMaterial();
907
+ }
908
+
653909 radioButton.SetObject(obj);
654910 radioButton.layout = sevenButton;
655911 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -658,8 +914,11 @@
658914 buttonGroup.add(radioButton);
659915 radioButton.doClick();
660916 }
917
+
661918 void SetupViews(ObjEditor oe)
662919 {
920
+ theFrame = this;
921
+
663922 oe.SetupViews();
664923
665924 System.out.println("SetupViews");
....@@ -668,22 +927,26 @@
668927 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
669928 }
670929
671
- JCheckBox liveCB;
672
- JCheckBox supportCB;
673
- JCheckBox localCB;
674
- JCheckBox crowdCB;
675
- JCheckBox smoothCB;
676
- JCheckBox fastCB;
677
- JCheckBox slowCB;
678
- JCheckBox boxCB;
679
- JCheckBox trackCB;
680
- JCheckBox smoothfocusCB;
930
+ cToggleButton liveCB;
931
+ cCheckBox supportCB;
932
+ cCheckBox localCB;
933
+ cCheckBox crowdCB;
934
+ cCheckBox smoothCB;
935
+ cToggleButton fastCB;
936
+ cCheckBox slowCB;
937
+ cCheckBox boxCB;
938
+ cCheckBox zoomBoxCB;
939
+ cToggleButton trackCB;
940
+ cCheckBox smoothfocusCB;
681941 // JCheckBox speakerMocapCB;
682
- JCheckBox speakerCameraCB;
683
- JCheckBox speakerFocusCB;
684
- JCheckBox debugCB;
685
- JCheckBox oeilCB;
686
- JCheckBox lookAtCB;
942
+ cCheckBox speakerCameraCB;
943
+ cCheckBox speakerFocusCB;
944
+ cCheckBox debugCB;
945
+
946
+ cCheckBox oeilCB;
947
+ cCheckBox shadowCB;
948
+ cCheckBox autosaveCB;
949
+ cCheckBox lookAtCB;
687950
688951 // static int COLOR = 1;
689952 // static int MATERIAL = 2;
....@@ -691,9 +954,9 @@
691954
692955 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
693956
694
- JCheckBox colorCB;
695
- JCheckBox materialCB;
696
- JCheckBox textureCB;
957
+ cCheckBox colorCB;
958
+ cCheckBox materialCB;
959
+ cCheckBox textureCB;
697960
698961 public void itemStateChanged(ItemEvent e)
699962 {
....@@ -721,6 +984,7 @@
721984 } else if(e.getSource() == liveCB)
722985 {
723986 cameraView.ToggleLive();
987
+ refreshContents(false);
724988 }
725989 else if(e.getSource() == supportCB)
726990 {
....@@ -756,6 +1020,10 @@
7561020 cameraView.repaint();
7571021 // refreshContents();
7581022 }
1023
+ else if(e.getSource() == zoomBoxCB)
1024
+ {
1025
+ cameraView.ToggleZoomBoxMode();
1026
+ }
7591027 else if(e.getSource() == smoothfocusCB)
7601028 {
7611029 cameraView.ToggleSmoothFocus();
....@@ -781,6 +1049,14 @@
7811049 {
7821050 cameraView.ToggleOeil();
7831051 }
1052
+ else if(e.getSource() == shadowCB)
1053
+ {
1054
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1055
+ }
1056
+ else if(e.getSource() == autosaveCB)
1057
+ {
1058
+ Globals.SAVEONMAKE ^= true;
1059
+ }
7841060 else if(e.getSource() == lookAtCB)
7851061 {
7861062 cameraView.ToggleLookAt();
....@@ -797,7 +1073,8 @@
7971073
7981074 /**/
7991075 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
800
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1076
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1077
+ TreePath path = objEditor.jTree.getSelectionPath();
8011078 if ((path == null) || (path.getPathCount() <= 1)) {
8021079 // We can't move the root node or an empty selection
8031080 return;
....@@ -869,7 +1146,9 @@
8691146 // objEditor.DropFile((java.io.File[]) object, true);
8701147 // return;
8711148 // }
872
- if (string.charAt(0) == '/')
1149
+
1150
+ // File path for Mac and Windows
1151
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8731152 {
8741153 // file(s)
8751154 String[] names = string.split("\n");
....@@ -896,7 +1175,7 @@
8961175
8971176 flashIt = false;
8981177 CameraPane pane = (CameraPane) target;
899
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1178
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9001179 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9011180
9021181 if (group.selection.size() == 1)
....@@ -919,16 +1198,16 @@
9191198 return;
9201199 }
9211200
922
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
923
- {
1201
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1202
+// {
9241203 loadClipboard(true);
9251204 objEditor.jTree.setSelectionPath(destinationPath);
926
- pasteInto(false);
927
- } else {
928
- loadClipboard(false);
929
- objEditor.jTree.setSelectionPath(destinationPath);
930
- pasteInto(false); // true); // ???
931
- }
1205
+ pasteInto(false, false);
1206
+// } else {
1207
+// loadClipboard(false);
1208
+// objEditor.jTree.setSelectionPath(destinationPath);
1209
+// pasteInto(false, false); // true); // ???
1210
+// }
9321211 }
9331212 public void dropActionChanged(DropTargetDragEvent dtde)
9341213 // Called if the user has modified the current drop gesture
....@@ -1049,27 +1328,33 @@
10491328 kleinItem.addActionListener(this);
10501329 particleItem = menu.add(new MenuItem("Particle system"));
10511330 particleItem.addActionListener(this);
1331
+ if (Globals.ADVANCED)
1332
+ {
10521333 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10531334 ragdollItem.addActionListener(this);
10541335 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10551336 ragdoll2Item.addActionListener(this);
1337
+ }
10561338 menu.add("-");
1057
- meshItem = menu.add(new MenuItem("Mesh"));
1339
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10581340 meshItem.addActionListener(this);
10591341 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10601342 // meshGroupItem.addActionListener(this);
1343
+ if (Globals.ADVANCED)
1344
+ {
10611345 springItem = menu.add(new MenuItem("Spring"));
10621346 springItem.addActionListener(this);
10631347 flagItem = menu.add(new MenuItem("Flag"));
10641348 flagItem.addActionListener(this);
1065
- bezierItem = menu.add(new MenuItem("Patch"));
1066
- bezierItem.addActionListener(this);
1067
- checkerItem = menu.add(new MenuItem("Checker"));
1068
- checkerItem.addActionListener(this);
10691349 blobItem = menu.add(new MenuItem("Blob"));
10701350 blobItem.addActionListener(this);
10711351 latheItem = menu.add(new MenuItem("Lathe"));
10721352 latheItem.addActionListener(this);
1353
+ }
1354
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1355
+ bezierItem.addActionListener(this);
1356
+ overlayItem = menu.add(new MenuItem("Overlay"));
1357
+ overlayItem.addActionListener(this);
10731358 lightItem = menu.add(new MenuItem("Light"));
10741359 lightItem.addActionListener(this);
10751360 menu.add("-");
....@@ -1079,39 +1364,44 @@
10791364 loopItem.addActionListener(this);
10801365 doubleItem = menu.add(new MenuItem("Fork"));
10811366 doubleItem.addActionListener(this);
1367
+ if (Globals.ADVANCED)
1368
+ {
10821369 tripleItem = menu.add(new MenuItem("Trident"));
10831370 tripleItem.addActionListener(this);
1371
+ }
10841372 }
10851373
10861374 void buildToolsMenu(Menu menu)
10871375 {
10881376 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891377 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1378
+ animationItem.setState(Globals.ANIMATION);
10911379
10921380 menu.add("-");
10931381 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10941382 parseverticesItem.addActionListener(this);
10951383 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10961384 textureFieldItem.addActionListener(this);
1097
- alignItem = menu.add(new MenuItem("Align"));
1385
+ alignItem = menu.add(new MenuItem("Align Objects"));
10981386 alignItem.addActionListener(this);
1099
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1100
- mirrorItem.addActionListener(this);
11011387 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11021388 reduceMorphItem.addActionListener(this);
11031389 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11041390 reduce34MorphItem.addActionListener(this);
1105
-
1391
+ menu.add("-");
11061392 menu.add(computeAOItem = new MenuItem("Compute AO"));
11071393 computeAOItem.addActionListener(this);
1108
- menu.add("-");
11091394
1395
+ if (Globals.ADVANCED)
1396
+ {
1397
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1398
+ mirrorItem.addActionListener(this);
1399
+ menu.add("-");
11101400 menu.add(memoryItem = new MenuItem("Memory Usage"));
11111401 memoryItem.addActionListener(this);
11121402 menu.add(analyzeItem = new MenuItem("Analyze"));
11131403 analyzeItem.addActionListener(this);
1114
- menu.add(dumpItem = new MenuItem("Dump"));
1404
+ menu.add(dumpItem = new MenuItem("Print"));
11151405 dumpItem.addActionListener(this);
11161406 // menu.add(pathItem = new MenuItem("From-to path"));
11171407 // pathItem.addActionListener(this);
....@@ -1120,6 +1410,8 @@
11201410 resetParentItem.addActionListener(this);
11211411 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221412 repairParentItem.addActionListener(this);
1413
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1414
+ repairShadowItem.addActionListener(this);
11231415 menu.add(invariantsItem = new MenuItem("Invariants"));
11241416 invariantsItem.addActionListener(this);
11251417 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1127,6 +1419,7 @@
11271419 menu.add("-");
11281420 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11291421 editScriptItem.addActionListener(this);
1422
+ }
11301423 }
11311424
11321425 void ScreenFit()
....@@ -1249,6 +1542,7 @@
12491542 shadow.material = new cMaterial(obj.material);
12501543 shadow.material.diffuse = 0.0001f;
12511544 shadow.material.specular = 0.0001f;
1545
+ //shadow.projectedVertices[1].x = 300;
12521546
12531547 makeSomething(shadow);
12541548 }
....@@ -1455,9 +1749,9 @@
14551749
14561750 void Overwrite(int mask)
14571751 {
1458
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1752
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14591753 {
1460
- Object3D content = GrafreeD.clipboard.get(0);
1754
+ Object3D content = Grafreed.clipboard.get(0);
14611755
14621756 if (content instanceof cGroup && ((cGroup)content).transientlink )
14631757 content = ((cGroup)content).get(0);
....@@ -1480,6 +1774,7 @@
14801774 //
14811775 public void actionPerformed(ActionEvent event) // , Object arg)
14821776 {
1777
+ Object source = event.getSource();
14831778 /*
14841779 if (event.getSource() == nameField)
14851780 {
....@@ -1491,11 +1786,11 @@
14911786 }
14921787 else
14931788 */
1494
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1789
+ if (source == lookAtItem || source == lookFromItem)
14951790 {
14961791 ScreenFit();
14971792 } else
1498
- if (event.getSource() == switchItem)
1793
+ if (source == switchItem)
14991794 {
15001795 cVector v1 = new cVector();
15011796 cVector v2 = new cVector();
....@@ -1504,11 +1799,11 @@
15041799 objEditor.cameraView.renderCamera.setAim(v2, v1);
15051800 objEditor.cameraView.repaint();
15061801 } else
1507
- if (event.getSource() == rectoidItem)
1802
+ if (source == rectoidItem || source == boxButton)
15081803 {
15091804 makeSomething(new Box());
15101805 } else
1511
- if (event.getSource() == particleItem)
1806
+ if (source == particleItem || source == particlesButton)
15121807 {
15131808 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15141809 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1529,9 +1824,9 @@
15291824 applyExample(particleGeom, "SMOKE");
15301825 makeSomething(particleGeom);
15311826 } else
1532
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1827
+ if (source == ragdollItem || source == ragdoll2Item)
15331828 {
1534
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1829
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15351830
15361831 ragdoll.toParent = LA.newMatrix();
15371832 ragdoll.fromParent = LA.newMatrix();
....@@ -1549,7 +1844,7 @@
15491844 } else
15501845 /*
15511846 */
1552
- if (event.getSource() == heightFieldItem)
1847
+ if (source == heightFieldItem)
15531848 {
15541849 Object3D obj = new Object3D();
15551850
....@@ -1587,31 +1882,31 @@
15871882
15881883 makeSomething(obj);
15891884 } else
1590
- if (event.getSource() == gridItem)
1885
+ if (source == gridItem || source == gridButton)
15911886 {
15921887 makeSomething(new Grid());
15931888 } else
1594
- if (event.getSource() == ellipsoidItem)
1889
+ if (source == ellipsoidItem || source == sphereButton)
15951890 {
15961891 makeSomething(new Sphere());
15971892 } else
1598
- if (event.getSource() == coneItem)
1893
+ if (source == coneItem || source == coneButton)
15991894 {
16001895 makeSomething(new Cone());
16011896 } else
1602
- if (event.getSource() == torusItem)
1897
+ if (source == torusItem || source == torusButton)
16031898 {
16041899 makeSomething(new Torus());
16051900 } else
1606
- if (event.getSource() == superItem)
1901
+ if (source == superItem || source == superButton)
16071902 {
16081903 makeSomething(new Superellipsoid());
16091904 } else
1610
- if (event.getSource() == kleinItem)
1905
+ if (source == kleinItem || source == kleinButton)
16111906 {
16121907 makeSomething(new Klein());
16131908 } else
1614
- if (event.getSource() == blobItem)
1909
+ if (source == blobItem)
16151910 {
16161911 Blob blob = new Blob();
16171912 BlobComponent comp = new BlobComponent();
....@@ -1619,15 +1914,15 @@
16191914 //blob.retile();
16201915 makeSomething(blob);
16211916 } else
1622
- if (event.getSource() == latheItem)
1917
+ if (source == latheItem)
16231918 {
16241919 makeSomething(new Lathe());
16251920 } else
1626
- if (event.getSource() == bezierItem)
1921
+ if (source == bezierItem)
16271922 {
16281923 makeSomething(new BezierSurface());
16291924 } else
1630
- if (event.getSource() == checkerItem)
1925
+ if (source == overlayItem || source == overlayButton)
16311926 {
16321927 /*
16331928 Object3D obj = new BezierSurface(5,8);
....@@ -1642,7 +1937,7 @@
16421937 */
16431938 makeSomething(new Checker());
16441939 } else
1645
- if (event.getSource() == meshItem)
1940
+ if (source == meshItem)
16461941 {
16471942 Object3D itemtomake = new Object3D();
16481943 Object3D child;
....@@ -1663,35 +1958,35 @@
16631958 makeSomething(child);
16641959 }
16651960 } else
1666
- if (event.getSource() == springItem)
1961
+ if (source == springItem)
16671962 {
16681963 cSpring s = new cSpring();
16691964 s.setup();
16701965 makeSomething(s);
16711966 } else
1672
- if (event.getSource() == flagItem)
1967
+ if (source == flagItem)
16731968 {
16741969 cSpring s = new cFlag();
16751970 s.setup();
16761971 makeSomething(s);
16771972 } else
1678
- if (event.getSource() == lightItem)
1973
+ if (source == lightItem || source == lightButton)
16791974 {
16801975 makeSomething(new Light());
16811976 } else
1682
- if (event.getSource() == csgItem)
1977
+ if (source == csgItem)
16831978 {
16841979 group(new CSG());
16851980 } else
1686
- if (event.getSource() == templateItem)
1981
+ if (source == templateItem)
16871982 {
16881983 group(new cTemplate());
16891984 } else
1690
- if (event.getSource() == attributeItem)
1985
+ if (source == attributeItem)
16911986 {
16921987 makeSomething(new Attribute());
16931988 } else
1694
- if (event.getSource() == pointflowItem)
1989
+ if (source == pointflowItem)
16951990 {
16961991 makeSomething(new PointFlow());
16971992 } else
....@@ -1703,7 +1998,7 @@
17031998 } else
17041999 */
17052000
1706
- if (event.getSource() == superLoopItem)
2001
+ if (source == superLoopItem)
17072002 {
17082003 Composite g = new cGroup();
17092004 for (int i=0; i<15; i++)
....@@ -1725,7 +2020,7 @@
17252020
17262021 group(g);
17272022 } else
1728
- if (event.getSource() == loopItem)
2023
+ if (source == loopItem)
17292024 {
17302025 Composite csg = new GroupLeaf();
17312026 csg.count = 5;
....@@ -1734,7 +2029,7 @@
17342029 csg.addChild(child);
17352030 child.addChild(csg);
17362031 } else
1737
- if (event.getSource() == doubleItem)
2032
+ if (source == doubleItem)
17382033 {
17392034 Composite csg = new GroupLeaf();
17402035 csg.count = 5;
....@@ -1746,7 +2041,7 @@
17462041 csg.addChild(child);
17472042 child.addChild(csg);
17482043 } else
1749
- if (event.getSource() == tripleItem)
2044
+ if (source == tripleItem)
17502045 {
17512046 Composite csg = new GroupLeaf();
17522047 csg.count = 4;
....@@ -1761,71 +2056,83 @@
17612056 csg.addChild(child);
17622057 child.addChild(csg);
17632058 } else
1764
-
1765
- if (event.getSource() == importGFDItem)
2059
+ if (source == computeAOItem)
17662060 {
1767
- ImportGFD();
2061
+ Globals.drawMode = CameraPane.OCCLUSION;
2062
+ Globals.theRenderer.repaint();
17682063 } else
1769
- if (event.getSource() == importVRMLX3DItem)
1770
- {
1771
- ImportVRMLX3D();
1772
- } else
1773
- if (event.getSource() == import3DSItem)
1774
- {
1775
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1776
- } else
1777
- if (event.getSource() == importOBJItem)
1778
- {
1779
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1780
- } else
1781
- if (event.getSource() == computeAOItem)
1782
- {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1784
- CameraPane.theRenderer.repaint();
1785
- } else
1786
- if (event.getSource() == recompileItem)
2064
+ if (source == recompileItem)
17872065 {
17882066 Recompile();
17892067 refreshContents();
17902068 } else
1791
- if (event.getSource() == editScriptItem)
2069
+ if (source == editScriptItem)
17922070 {
17932071 OpenDialog();
17942072 refreshContents();
17952073 } else
1796
- if (event.getSource() == invariantsItem)
2074
+ if (source == invariantsItem)
17972075 {
17982076 System.out.println("Invariants:");
1799
- GrafreeD.grafreeD.universe.invariants();
2077
+ Grafreed.grafreeD.universe.invariants();
18002078 } else
1801
- if (event.getSource() == memoryItem)
2079
+ if (source == memoryItem)
18022080 {
18032081 //System.out.println("Invariants:");
18042082 PrintMemory();
18052083 } else
1806
- if (event.getSource() == pathItem)
2084
+ if (source == pathItem)
18072085 {
18082086 PrintPath();
18092087 } else
1810
- if (event.getSource() == analyzeItem)
2088
+ if (source == analyzeItem)
18112089 {
18122090 AnalyzeObject();
18132091 } else
1814
- if (event.getSource() == dumpItem)
2092
+ if (source == dumpItem)
18152093 {
18162094 DumpObject();
18172095 } else
1818
- if (event.getSource() == screenfitButton)
2096
+ if (source == minButton)
2097
+ {
2098
+ Minimize();
2099
+ } else
2100
+ if (source == maxButton)
2101
+ {
2102
+ Maximize();
2103
+ } else
2104
+ if (source == fullButton)
2105
+ {
2106
+ ToggleFullScreen();
2107
+ } else
2108
+ if (source == undoButton)
2109
+ {
2110
+ Undo();
2111
+ } else
2112
+ if (source == redoButton)
2113
+ {
2114
+ Redo();
2115
+ } else
2116
+ if (source == saveButton)
2117
+ {
2118
+ Save();
2119
+ } else
2120
+ if (source == oneStepButton)
2121
+ {
2122
+ Globals.ONESTEP = true;
2123
+ cameraView.repaint();
2124
+ } else
2125
+ if (source == screenfitButton)
18192126 {
18202127 //Reload(lastConverter, lastFilename, true);
18212128 ScreenFit();
18222129 } else
1823
- if (event.getSource() == screenfitpointButton)
2130
+ if (source == screenfitpointButton)
18242131 {
18252132 //Reload(lastConverter, lastFilename, true);
18262133 ScreenFitPoint();
18272134 } else
1828
- if (event.getSource() == snapobjectButton)
2135
+ if (source == snapobjectButton)
18292136 {
18302137 //Reload(lastConverter, lastFilename, true);
18312138 SnapObject();
....@@ -1836,13 +2143,13 @@
18362143 // Recompile();
18372144 // refreshContents();
18382145 // } else
1839
- if (event.getSource() == gcButton)
2146
+ if (source == gcButton)
18402147 {
18412148 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18422149 System.gc();
18432150 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18442151 } else
1845
- if (event.getSource() == editLeafItem)
2152
+ if (source == editLeafItem)
18462153 {
18472154 Object3D obj;
18482155 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1856,62 +2163,74 @@
18562163 }
18572164 refreshContents(true);
18582165 } else
1859
- if (event.getSource() == openWindowItem)
2166
+ if (source == openWindowItem)
18602167 {
18612168 EditSelection(true);
18622169 } else
1863
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2170
+ if (source == cutItem || source == clearButton)
18642171 {
18652172 loadClipboard(true);
18662173 } else
1867
- if (event.getSource() == duplicateItem)
2174
+ if (source == undoItem)
18682175 {
1869
- Object3D keep = GrafreeD.clipboard;
2176
+ Undo();
2177
+ } else
2178
+ if (source == redoItem)
2179
+ {
2180
+ Redo();
2181
+ } else
2182
+ if (source == duplicateItem)
2183
+ {
2184
+ Object3D keep = Grafreed.clipboard;
18702185 loadClipboard(false);
18712186 paste(false);
1872
- GrafreeD.clipboard = keep;
2187
+ Grafreed.clipboard = keep;
18732188 } else
1874
- if (event.getSource() == cloneItem)
2189
+ if (source == cloneItem)
18752190 {
18762191 CloneSelection(false);
18772192 } else
1878
- if (event.getSource() == cloneSupportItem)
2193
+ if (source == cloneSupportItem)
18792194 {
18802195 CloneSelection(true);
18812196 } else
1882
- if (event.getSource() == copyItem)
2197
+ if (source == copyItem)
18832198 {
18842199 loadClipboard(false);
18852200 } else
1886
- if (event.getSource() == pasteItem)
2201
+ if (source == pasteItem)
18872202 {
18882203 paste(false);
18892204 } else
1890
- if (event.getSource() == pasteLinkItem)
2205
+ if (source == pasteIntoItem)
18912206 {
1892
- pasteInto(false);
2207
+ pasteInto(true, false);
18932208 } else
1894
- if (event.getSource() == pasteCloneItem)
2209
+ if (source == pasteLinkItem)
18952210 {
1896
- pasteInto(true);
2211
+ pasteInto(false, false);
18972212 } else
1898
- if (event.getSource() == pasteExpandItem)
2213
+ if (source == pasteCloneItem)
2214
+ {
2215
+ pasteInto(true, true);
2216
+ } else
2217
+ if (source == pasteExpandItem)
18992218 {
19002219 paste(true);
19012220 } else
1902
- if (event.getSource() == synchronizeItem)
2221
+ if (source == synchronizeItem)
19032222 {
19042223 Overwrite(Object3D.TRANSFORM);
19052224 } else
1906
- if (event.getSource() == overwriteNameItem)
2225
+ if (source == overwriteNameItem)
19072226 {
19082227 Overwrite(Object3D.NAME);
19092228 } else
1910
- if (event.getSource() == overwriteUVItem)
2229
+ if (source == overwriteUVItem)
19112230 {
19122231 Overwrite(Object3D.UV);
19132232 } else
1914
- if (event.getSource() == overwriteMatItem)
2233
+ if (source == overwriteMatItem)
19152234 {
19162235 /* july 2015
19172236 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1931,7 +2250,7 @@
19312250
19322251 Overwrite(dropAttributes);
19332252 }
1934
- if (event.getSource() == overwriteGeoItem)
2253
+ if (source == overwriteGeoItem)
19352254 {
19362255 Overwrite(Object3D.GEOMETRY);
19372256 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1948,7 +2267,7 @@
19482267 // refreshContents();
19492268 // }
19502269 } else
1951
- if (event.getSource() == generateMeshItem)
2270
+ if (source == generateMeshItem)
19522271 {
19532272 //if (group.selection.size() == 1)
19542273 // for (int i=0; i<group.selection.size(); i++)
....@@ -1959,7 +2278,7 @@
19592278 ResetModel();
19602279 refreshContents();
19612280 } else
1962
- if (event.getSource() == extractGeometriesItem)
2281
+ if (source == extractGeometriesItem)
19632282 {
19642283 boolean one = false;
19652284
....@@ -1986,7 +2305,7 @@
19862305 ResetModel();
19872306 refreshContents();
19882307 } else
1989
- if (event.getSource() == cloneGeometriesItem)
2308
+ if (source == cloneGeometriesItem)
19902309 {
19912310 boolean one = false;
19922311
....@@ -2012,7 +2331,7 @@
20122331 ResetModel();
20132332 refreshContents();
20142333 } else
2015
- if (event.getSource() == shareGeometriesItem)
2334
+ if (source == shareGeometriesItem)
20162335 {
20172336 boolean one = false;
20182337
....@@ -2042,7 +2361,7 @@
20422361 refreshContents();
20432362 }
20442363 } else
2045
- if (event.getSource() == mergeGeometriesItem)
2364
+ if (source == mergeGeometriesItem)
20462365 {
20472366 boolean one = false;
20482367
....@@ -2072,7 +2391,7 @@
20722391 ResetModel();
20732392 refreshContents();
20742393 } else
2075
- if (event.getSource() == linkverticesItem)
2394
+ if (source == linkverticesItem)
20762395 {
20772396 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20782397 // {
....@@ -2085,48 +2404,48 @@
20852404 // group.selection.get(0).setMasterThis(content); // should be identity
20862405 // refreshContents();
20872406 // }
2088
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2407
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20892408 {
2090
- Object3D content = GrafreeD.clipboard.get(0);
2409
+ Object3D content = Grafreed.clipboard.get(0);
20912410
20922411 if (content instanceof cGroup && ((cGroup)content).transientlink )
20932412 content = ((cGroup)content).get(0);
20942413
2095
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2414
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20962415 for (int i=0; i<group.selection.size(); i++)
20972416 {
2098
- boolean random = CameraPane.RANDOM;
2099
- CameraPane.RANDOM = false; // parse all random nodes
2417
+ boolean random = CameraPane.SWITCH;
2418
+ CameraPane.SWITCH = false; // parse all random nodes
21002419 group.selection.get(i).linkVerticesThis(content);
21012420 // group.selection.get(i).setMasterThis(content); // should be identity
2102
- CameraPane.RANDOM = random;
2421
+ CameraPane.SWITCH = random;
21032422 }
2104
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2423
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21052424 refreshContents();
21062425 }
21072426 } else
2108
- if (event.getSource() == resetsupportItem)
2427
+ if (source == resetsupportItem)
21092428 {
21102429 for (int i=0; i<group.selection.size(); i++)
21112430 {
2112
- boolean random = CameraPane.RANDOM;
2113
- CameraPane.RANDOM = false; // parse all random nodes
2431
+ boolean random = CameraPane.SWITCH;
2432
+ CameraPane.SWITCH = false; // parse all random nodes
21142433 group.selection.get(i).linkVerticesThis(null);
2115
- CameraPane.RANDOM = random;
2434
+ CameraPane.SWITCH = random;
21162435 }
21172436
21182437 refreshContents();
21192438 } else
2120
- if (event.getSource() == relinkverticesItem)
2439
+ if (source == relinkverticesItem)
21212440 {
2122
- boolean random = CameraPane.RANDOM;
2123
- CameraPane.RANDOM = false; // parse all random nodes
2441
+ boolean random = CameraPane.SWITCH;
2442
+ CameraPane.SWITCH = false; // parse all random nodes
21242443 group.selection.RelinkToSupport();
2125
- CameraPane.RANDOM = random;
2444
+ CameraPane.SWITCH = random;
21262445
21272446 refreshContents();
21282447 } else
2129
- if (event.getSource() == resetreferencesItem)
2448
+ if (source == resetreferencesItem)
21302449 {
21312450 for (int i=0; i<group.selection.size(); i++)
21322451 {
....@@ -2135,11 +2454,11 @@
21352454
21362455 refreshContents();
21372456 } else
2138
- if (event.getSource() == setMasterItem)
2457
+ if (source == setMasterItem)
21392458 {
2140
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2459
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21412460 {
2142
- Object3D content = GrafreeD.clipboard.get(0);
2461
+ Object3D content = Grafreed.clipboard.get(0);
21432462
21442463 if (content instanceof cGroup && ((cGroup)content).transientlink )
21452464 content = ((cGroup)content).get(0);
....@@ -2148,13 +2467,13 @@
21482467 refreshContents();
21492468 }
21502469 } else
2151
- if (event.getSource() == poseMeshItem)
2470
+ if (source == poseMeshItem)
21522471 {
21532472 if (group.selection.size() == 1)
21542473 {
2155
- if (GrafreeD.clipboard.size() == 1)
2474
+ if (Grafreed.clipboard.size() == 1)
21562475 {
2157
- Object3D content = GrafreeD.clipboard.get(0);
2476
+ Object3D content = Grafreed.clipboard.get(0);
21582477
21592478 if (content instanceof cGroup && ((cGroup)content).transientlink )
21602479 content = ((cGroup)content).get(0);
....@@ -2167,19 +2486,19 @@
21672486 }
21682487
21692488 } else
2170
- if (event.getSource() == revertMeshItem)
2489
+ if (source == revertMeshItem)
21712490 {
21722491 RevertMeshes();
21732492 } else
2174
- if (event.getSource() == resetMeshItem)
2493
+ if (source == resetAllItem)
21752494 {
21762495 ResetAll();
21772496 } else
2178
- if (event.getSource() == stepAllItem)
2497
+ if (source == stepAllItem)
21792498 {
21802499 StepAll();
21812500 } else
2182
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2501
+ if (source == clearItem) // || event.getSource() == clearButton)
21832502 {
21842503 //int indices[] = jList.getSelectedIndices();
21852504 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2187,46 +2506,46 @@
21872506
21882507 ClearSelection(false);
21892508 } else
2190
- if (event.getSource() == clearAllItem)
2509
+ if (source == clearAllItem)
21912510 {
21922511 ClearSelection(true);
21932512 } else
2194
- if (event.getSource() == grabItem)
2513
+ if (source == grabItem)
21952514 {
21962515 group(new cGroup(), true);
21972516 } else
2198
- if (event.getSource() == hideItem)
2517
+ if (source == hideItem)
21992518 {
22002519 group(new HiddenObject());
22012520 } else
2202
- if (event.getSource() == frontItem)
2521
+ if (source == frontItem)
22032522 {
22042523 front();
22052524 } else
2206
- if (event.getSource() == backItem)
2525
+ if (source == backItem)
22072526 {
22082527 back();
22092528 } else
2210
- if (event.getSource() == cameraItem)
2529
+ if (source == cameraItem)
22112530 {
22122531 makeSomething(new Camera());
22132532 } else
2214
- if (event.getSource() == compositeItem)
2533
+ if (source == compositeItem)
22152534 {
22162535 group(new Composite());
22172536 } else
2218
- if (event.getSource() == randomItem)
2537
+ if (source == randomItem)
22192538 {
22202539 RandomNode random = new RandomNode();
22212540 group(random);
22222541 if (random.size() > 0)
2223
- random.name = random.get(0).name + "Rnd";
2542
+ random.name = random.get(0).name + "Switch";
22242543 } else
2225
- if (event.getSource() == physicsItem)
2544
+ if (source == physicsItem)
22262545 {
22272546 group(new PhysicsNode());
22282547 } else
2229
- if (event.getSource() == frameselectorItem)
2548
+ if (source == frameselectorItem)
22302549 {
22312550 for (int i=0; i<group.selection.size(); i++)
22322551 {
....@@ -2238,7 +2557,7 @@
22382557 ResetModel();
22392558 refreshContents();
22402559 } else
2241
- if (event.getSource() == switchGeoItem)
2560
+ if (source == switchGeoItem)
22422561 {
22432562 for (int i=0; i<group.selection.size(); i++)
22442563 {
....@@ -2250,7 +2569,7 @@
22502569 ResetModel();
22512570 refreshContents();
22522571 } else
2253
- if (event.getSource() == switchTransfoItem)
2572
+ if (source == switchTransfoItem)
22542573 {
22552574 for (int i=0; i<group.selection.size(); i++)
22562575 {
....@@ -2262,7 +2581,7 @@
22622581 ResetModel();
22632582 refreshContents();
22642583 } else
2265
- if (event.getSource() == morphItem)
2584
+ if (source == morphItem)
22662585 {
22672586 for (int i=0; i<group.selection.size(); i++)
22682587 {
....@@ -2274,7 +2593,7 @@
22742593 ResetModel();
22752594 refreshContents();
22762595 } else
2277
- if (event.getSource() == scriptNodeItem)
2596
+ if (source == scriptNodeItem)
22782597 {
22792598 boolean atleastone = false;
22802599
....@@ -2313,31 +2632,31 @@
23132632 }
23142633 }
23152634 } else
2316
- if (event.getSource() == linkerItem)
2635
+ if (source == linkerItem)
23172636 {
23182637 group(new cLinker());
23192638 } else
2320
- if (event.getSource() == textureItem)
2639
+ if (source == textureItem)
23212640 {
23222641 group(new TextureNode());
23232642 } else
2324
- if (event.getSource() == billboardItem)
2643
+ if (source == billboardItem)
23252644 {
23262645 group(new BillboardNode());
23272646 } else
2328
- if (event.getSource() == shadowXItem)
2647
+ if (source == shadowXItem)
23292648 {
23302649 CastShadow(0);
23312650 } else
2332
- if (event.getSource() == shadowYItem)
2651
+ if (source == shadowYItem)
23332652 {
23342653 CastShadow(1);
23352654 } else
2336
- if (event.getSource() == shadowZItem)
2655
+ if (source == shadowZItem)
23372656 {
23382657 CastShadow(2);
23392658 } else
2340
- if (event.getSource() == ungroupItem)
2659
+ if (source == ungroupItem || source == ungroupButton)
23412660 {
23422661 //ungroup();
23432662 for (int i=0; i<group.selection.size(); i++)
....@@ -2349,179 +2668,203 @@
23492668
23502669 refreshContents();
23512670 } else
2352
- if (event.getSource() == genUVItem)
2671
+ if (source == genUVItem)
23532672 {
23542673 GenUV();
23552674 } else
2356
- if (event.getSource() == genNormalsCADItem)
2675
+ if (source == genNormalsCADItem)
23572676 {
23582677 GenNormals(true);
23592678 } else
2360
- if (event.getSource() == genNormalsMESHItem)
2679
+ if (source == genNormalsMESHItem)
23612680 {
2362
- GenNormals(true); // TODO
2681
+ GenNormalsMESH();
23632682 } else
2364
- if (event.getSource() == genNormalsORGANItem)
2683
+ if (source == genNormalsORGANItem)
23652684 {
23662685 GenNormals(false);
23672686 } else
2368
- if (event.getSource() == genNormalsMINEItem)
2687
+ if (source == genNormalsMINEItem)
23692688 {
23702689 GenNormalsMINE();
23712690 } else
2372
- if (event.getSource() == stripifyItem)
2691
+ if (source == stripifyItem)
23732692 {
23742693 Stripify();
23752694 } else
2376
- if (event.getSource() == unstripifyItem)
2695
+ if (source == unstripifyItem)
23772696 {
23782697 Unstripify();
23792698 } else
2380
- if (event.getSource() == trimItem)
2699
+ if (source == trimItem)
23812700 {
23822701 Trim();
23832702 } else
2384
- if (event.getSource() == untrimItem)
2703
+ if (source == untrimItem)
23852704 {
23862705 Untrim();
23872706 } else
2388
- if (event.getSource() == clearColorsItem)
2707
+ if (source == clearColorsItem)
23892708 {
23902709 ClearColors();
23912710 } else
2392
- if (event.getSource() == clearMaterialsItem)
2711
+ if (source == clearMaterialsItem)
23932712 {
23942713 ClearMaterials();
23952714 } else
2396
- if (event.getSource() == liveleavesItem)
2715
+ if (source == liveleavesItem)
23972716 {
23982717 LiveLeaves(true);
23992718 } else
2400
- if (event.getSource() == unliveleavesItem)
2719
+ if (source == unliveleavesItem)
24012720 {
24022721 LiveLeaves(false);
24032722 } else
2404
- if (event.getSource() == supportleavesItem)
2723
+ if (source == supportleavesItem)
24052724 {
24062725 SupportLeaves(true);
24072726 } else
2408
- if (event.getSource() == unsupportleavesItem)
2727
+ if (source == unsupportleavesItem)
24092728 {
24102729 SupportLeaves(false);
24112730 } else
2412
- if (event.getSource() == hideleavesItem)
2731
+ if (source == hideleavesItem)
24132732 {
24142733 HideLeaves(true);
24152734 } else
2416
- if (event.getSource() == showleavesItem)
2735
+ if (source == showleavesItem)
24172736 {
24182737 HideLeaves(false);
24192738 } else
2420
- if (event.getSource() == markleavesItem)
2739
+ if (source == markleavesItem)
24212740 {
24222741 MarkLeaves(true);
24232742 } else
2424
- if (event.getSource() == unmarkleavesItem)
2743
+ if (source == unmarkleavesItem)
24252744 {
24262745 MarkLeaves(false);
24272746 } else
2428
- if (event.getSource() == flipVItem)
2747
+ if (source == rewindleavesItem)
2748
+ {
2749
+ RewindLeaves(true);
2750
+ } else
2751
+ if (source == unrewindleavesItem)
2752
+ {
2753
+ RewindLeaves(false);
2754
+ } else
2755
+ if (source == randomleavesItem)
2756
+ {
2757
+ RandomLeaves(true);
2758
+ } else
2759
+ if (source == unrandomleavesItem)
2760
+ {
2761
+ RandomLeaves(false);
2762
+ } else
2763
+ if (source == flipVItem)
24292764 {
24302765 FlipV(true);
24312766 } else
2432
- if (event.getSource() == unflipVItem)
2767
+ if (source == unflipVItem)
24332768 {
24342769 FlipV(false);
24352770 } else
2436
- if (event.getSource() == lowTexturesItem)
2771
+ if (source == lowTexturesItem)
24372772 {
24382773 SetTexRes(0);
24392774 } else
2440
- if (event.getSource() == normalTexturesItem)
2775
+ if (source == normalTexturesItem)
24412776 {
24422777 SetTexRes(1);
24432778 } else
2444
- if (event.getSource() == highTexturesItem)
2779
+ if (source == highTexturesItem)
24452780 {
24462781 SetTexRes(2);
24472782 } else
2448
- if (event.getSource() == veryhighTexturesItem)
2783
+ if (source == veryhighTexturesItem)
24492784 {
24502785 SetTexRes(3);
24512786 } else
2452
- if (event.getSource() == maxTexturesItem)
2787
+ if (source == maxTexturesItem)
24532788 {
24542789 SetTexRes(4);
24552790 } else
2456
- if (event.getSource() == panoTexturesItem)
2791
+ if (source == panoTexturesItem)
24572792 {
24582793 SetTexRes(5);
24592794 } else
2460
- if (event.getSource() == reverseNormalsItem)
2795
+ if (source == reverseNormalsItem)
24612796 {
24622797 ReverseNormals();
24632798 } else
2464
- if (event.getSource() == parseverticesItem)
2799
+ if (source == parseverticesItem)
24652800 {
24662801 ParseVertices();
24672802 } else
2468
- if (event.getSource() == textureFieldItem)
2803
+ if (source == textureFieldItem)
24692804 {
24702805 TextureVertices();
24712806 } else
2472
- if (event.getSource() == alignItem)
2807
+ if (source == alignItem)
24732808 {
24742809 Align();
24752810 } else
2476
- if (event.getSource() == mirrorItem)
2811
+ if (source == mirrorItem)
24772812 {
24782813 MirrorPoses();
24792814 } else
2480
- if (event.getSource() == reduceMorphItem)
2815
+ if (source == reduceMorphItem)
24812816 {
24822817 MeshReduction(false);
24832818 } else
2484
- if (event.getSource() == reduce34MorphItem)
2819
+ if (source == reduce34MorphItem)
24852820 {
24862821 MeshReduction(true);
24872822 } else
2488
- if (event.getSource() == reverseTrianglesItem)
2823
+ if (source == reverseTrianglesItem)
24892824 {
24902825 ReverseTriangles();
24912826 } else
2492
- if (event.getSource() == reduceMeshItem)
2827
+ if (source == reduceMeshItem)
24932828 {
24942829 ReduceMesh(false);
24952830 } else
2496
- if (event.getSource() == reduce34MeshItem)
2831
+ if (source == reduce34MeshItem)
24972832 {
24982833 ReduceMesh(true);
24992834 } else
2500
- if (event.getSource() == increaseMeshItem)
2835
+ if (source == increaseMeshItem)
25012836 {
25022837 IncreaseMesh();
25032838 } else
2504
- if (event.getSource() == clipMeshItem)
2839
+ if (source == clipMeshItem)
25052840 {
25062841 ClipMesh();
25072842 } else
2508
- if (event.getSource() == smoothMeshItem)
2843
+ if (source == smoothMeshItem)
25092844 {
25102845 SmoothMesh();
25112846 } else
2512
- if (event.getSource() == transformgeometryItem)
2847
+ if (source == transformGeometryItem)
25132848 {
25142849 TransformGeometry();
25152850 } else
2516
- if (event.getSource() == resetTransformItem)
2851
+ if (source == transformChildrenItem)
2852
+ {
2853
+ TransformChildren();
2854
+ } else
2855
+ if (source == resetTransformItem)
25172856 {
25182857 ResetTransform();
25192858 } else
2520
- if (event.getSource() == resetCentroidItem)
2859
+ if (source == resetCentroidItem)
25212860 {
2522
- ResetCentroid();
2861
+ ResetCentroid(true);
25232862 } else
2524
- if (event.getSource() == resetParentItem)
2863
+ if (source == resetCentroidXZItem)
2864
+ {
2865
+ ResetCentroid(false);
2866
+ } else
2867
+ if (source == resetParentItem)
25252868 {
25262869 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25272870 {
....@@ -2531,7 +2874,7 @@
25312874
25322875 refreshContents();
25332876 } else
2534
- if (event.getSource() == repairParentItem)
2877
+ if (source == repairParentItem)
25352878 {
25362879 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25372880 {
....@@ -2545,7 +2888,21 @@
25452888
25462889 refreshContents();
25472890 } else
2548
- if (event.getSource() == sortbysizeItem)
2891
+ if (source == repairShadowItem)
2892
+ {
2893
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2894
+ {
2895
+ Object3D obj = (Object3D)e.nextElement();
2896
+ obj.RepairShadow();
2897
+// for (int i=0; i<obj.size(); i++)
2898
+// {
2899
+// obj.get(i).parent = obj;
2900
+// }
2901
+ }
2902
+
2903
+ refreshContents();
2904
+ } else
2905
+ if (source == sortbysizeItem)
25492906 {
25502907 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25512908 {
....@@ -2557,7 +2914,7 @@
25572914 ResetModel();
25582915 refreshContents();
25592916 } else
2560
- if (event.getSource() == sortbynameItem)
2917
+ if (source == sortbynameItem)
25612918 {
25622919 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25632920 {
....@@ -2569,7 +2926,7 @@
25692926 ResetModel();
25702927 refreshContents();
25712928 } else
2572
- if (event.getSource() == attachPigmentItem)
2929
+ if (source == attachPigmentItem)
25732930 {
25742931 String texture = GetFile("Attach pigment");
25752932 Object3D obj;
....@@ -2581,7 +2938,7 @@
25812938
25822939 refreshContents();
25832940 } else
2584
- if (event.getSource() == detachPigmentItem)
2941
+ if (source == detachPigmentItem)
25852942 {
25862943 Object3D obj;
25872944 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2592,7 +2949,7 @@
25922949
25932950 refreshContents();
25942951 } else
2595
- if (event.getSource() == attachBumpItem)
2952
+ if (source == attachBumpItem)
25962953 {
25972954 String texture = GetFile("Attach bump");
25982955 Object3D obj;
....@@ -2604,7 +2961,7 @@
26042961
26052962 refreshContents();
26062963 } else
2607
- if (event.getSource() == detachBumpItem)
2964
+ if (source == detachBumpItem)
26082965 {
26092966 Object3D obj;
26102967 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2615,7 +2972,7 @@
26152972
26162973 refreshContents();
26172974 } else
2618
- if (event.getSource() == pigmentBumpItem)
2975
+ if (source == pigmentBumpItem)
26192976 {
26202977 Object3D obj;
26212978 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2626,158 +2983,237 @@
26262983
26272984 refreshContents();
26282985 } else
2629
- if (event.getSource() == flashSelectionButton)
2986
+ if (source == flashSelectionButton)
26302987 {
26312988 CameraPane.flash = true;
26322989 refreshContents();
26332990 } else
2634
- if (event.getSource() == oneButton)
2991
+ if (source == oneButton)
26352992 {
26362993 } else
2637
- if (event.getSource() == twoButton)
2994
+ if (source == twoButton)
26382995 {
26392996 radio.layout = twoButton;
2997
+
2998
+ if (CameraPane.FULLSCREEN)
2999
+ fullscreenLayout = radio.layout;
3000
+
26403001 // bug
26413002 //gridPanel.setDividerLocation(1.0);
26423003 //bigPanel.setDividerLocation(0.0);
2643
- bigThree.remove(scenePanel);
2644
- bigThree.remove(centralPanel);
2645
- bigThree.remove(XYZPanel);
2646
- aWindowConstraints.gridx = 0;
2647
- aWindowConstraints.gridy = 0;
2648
- aWindowConstraints.gridwidth = 1;
2649
- // aConstraints.gridheight = 3;
2650
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2651
- aWindowConstraints.weightx = 0;
2652
- aWindowConstraints.weighty = 1;
2653
- //bigThree.add(jtp, aWindowConstraints);
2654
- aWindowConstraints.weightx = 1;
2655
- aWindowConstraints.gridwidth = 3;
2656
- // aConstraints.gridheight = 3;
2657
- aWindowConstraints.gridx = 1;
2658
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2659
- bigThree.add(centralPanel, aWindowConstraints);
2660
- aWindowConstraints.weightx = 0;
2661
- aWindowConstraints.gridx = 4;
2662
- aWindowConstraints.gridwidth = 1;
2663
- // aConstraints.gridheight = 3;
2664
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2665
- //bigThree.add(XYZPanel, aWindowConstraints);
2666
- bigThree.revalidate();
3004
+// bigThree.remove(scenePanel);
3005
+// bigThree.remove(centralPanel);
3006
+// bigThree.remove(XYZPanel);
3007
+// aWindowConstraints.gridx = 0;
3008
+// aWindowConstraints.gridy = 0;
3009
+// aWindowConstraints.gridwidth = 1;
3010
+// // aConstraints.gridheight = 3;
3011
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3012
+// aWindowConstraints.weightx = 0;
3013
+// aWindowConstraints.weighty = 1;
3014
+// //bigThree.add(jtp, aWindowConstraints);
3015
+// aWindowConstraints.weightx = 1;
3016
+// aWindowConstraints.gridwidth = 3;
3017
+// // aConstraints.gridheight = 3;
3018
+// aWindowConstraints.gridx = 1;
3019
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3020
+// bigThree.add(centralPanel, aWindowConstraints);
3021
+// aWindowConstraints.weightx = 0;
3022
+// aWindowConstraints.gridx = 4;
3023
+// aWindowConstraints.gridwidth = 1;
3024
+// // aConstraints.gridheight = 3;
3025
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3026
+// //bigThree.add(XYZPanel, aWindowConstraints);
3027
+// scenePanel.setVisible(false);
3028
+// centralPanel.setVisible(true);
3029
+// XYZPanel.setVisible(false);
3030
+ bigThree.ClearUI();
3031
+ bigThree.add(centralPanel);
3032
+ bigThree.FlushUI();
3033
+
3034
+ cameraView.requestFocusInWindow();
3035
+
3036
+// refreshContents(true);
3037
+//
3038
+// try
3039
+// {
3040
+// java.awt.Robot bot = new java.awt.Robot();
3041
+// int mask = InputEvent.BUTTON1_MASK;
3042
+// bot.mouseMove(100, 100);
3043
+// bot.mousePress(mask);
3044
+// bot.mouseRelease(mask);
3045
+// }
3046
+// catch (Exception e)
3047
+// {
3048
+//
3049
+// }
3050
+
26673051 } else
2668
- if (event.getSource() == threeButton)
3052
+ if (source == threeButton)
26693053 {
26703054 radio.layout = threeButton;
2671
- bigThree.remove(scenePanel);
2672
- bigThree.remove(centralPanel);
2673
- bigThree.remove(XYZPanel);
2674
- aWindowConstraints.gridx = 0;
2675
- aWindowConstraints.gridy = 0;
2676
- aWindowConstraints.gridwidth = 1;
2677
- // aConstraints.gridheight = 3;
2678
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2679
- aWindowConstraints.weightx = 0;
2680
- aWindowConstraints.weighty = 1;
2681
- //bigThree.add(jtp, aWindowConstraints);
2682
- aWindowConstraints.weightx = 1;
2683
- aWindowConstraints.gridwidth = 3;
2684
- // aConstraints.gridheight = 3;
2685
- aWindowConstraints.gridx = 1;
2686
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2687
- bigThree.add(centralPanel, aWindowConstraints);
2688
- aWindowConstraints.weightx = 0;
2689
- aWindowConstraints.gridx = 4;
2690
- aWindowConstraints.gridwidth = 1;
2691
- // aConstraints.gridheight = 3;
2692
- aConstraints.fill = GridBagConstraints.VERTICAL;
2693
- bigThree.add(XYZPanel, aWindowConstraints);
2694
- bigThree.revalidate();
3055
+
3056
+ if (CameraPane.FULLSCREEN)
3057
+ fullscreenLayout = radio.layout;
3058
+
3059
+// bigThree.remove(scenePanel);
3060
+// bigThree.remove(centralPanel);
3061
+// bigThree.remove(XYZPanel);
3062
+// aWindowConstraints.gridx = 0;
3063
+// aWindowConstraints.gridy = 0;
3064
+// aWindowConstraints.gridwidth = 1;
3065
+// // aConstraints.gridheight = 3;
3066
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3067
+// aWindowConstraints.weightx = 0;
3068
+// aWindowConstraints.weighty = 1;
3069
+// //bigThree.add(jtp, aWindowConstraints);
3070
+// aWindowConstraints.weightx = 1;
3071
+// aWindowConstraints.gridwidth = 3;
3072
+// // aConstraints.gridheight = 3;
3073
+// aWindowConstraints.gridx = 1;
3074
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3075
+// bigThree.add(centralPanel, aWindowConstraints);
3076
+// aWindowConstraints.weightx = 0;
3077
+// aWindowConstraints.gridx = 4;
3078
+// aWindowConstraints.gridwidth = 1;
3079
+// // aConstraints.gridheight = 3;
3080
+// aConstraints.fill = GridBagConstraints.VERTICAL;
3081
+// bigThree.add(XYZPanel, aWindowConstraints);
3082
+// bigThree.validate();
3083
+// scenePanel.setVisible(false);
3084
+// centralPanel.setVisible(true);
3085
+// XYZPanel.setVisible(true);
3086
+ bigThree.ClearUI();
3087
+ bigThree.add(centralPanel);
3088
+ bigThree.add(XYZPanel);
3089
+ bigThree.FlushUI();
3090
+
3091
+ cameraView.requestFocusInWindow();
26953092 } else
2696
- if (event.getSource() == fourButton)
3093
+ if (source == fourButton)
26973094 {
26983095 radio.layout = fourButton;
2699
- bigThree.remove(scenePanel);
2700
- bigThree.remove(centralPanel);
2701
- bigThree.remove(XYZPanel);
2702
- aWindowConstraints.gridx = 0;
2703
- aWindowConstraints.gridy = 0;
2704
- aWindowConstraints.gridwidth = 1;
2705
- // aWindowConstraints.gridheight = 3;
2706
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2707
- aWindowConstraints.weightx = 1;
2708
- aWindowConstraints.weighty = 1;
2709
- bigThree.add(scenePanel, aWindowConstraints);
2710
- aWindowConstraints.weightx = 1;
2711
- aWindowConstraints.gridwidth = 3;
2712
- // aConstraints.gridheight = 3;
2713
- aWindowConstraints.gridx = 1;
2714
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2715
- //bigThree.add(cameraPanel, aWindowConstraints);
2716
- aWindowConstraints.weightx = 0;
2717
- aWindowConstraints.gridx = 4;
2718
- aWindowConstraints.gridwidth = 1;
2719
- // aWindowConstraints.gridheight = 3;
2720
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2721
- //bigThree.add(XYZPanel, aWindowConstraints);
2722
- bigThree.revalidate();
3096
+
3097
+ if (CameraPane.FULLSCREEN)
3098
+ fullscreenLayout = radio.layout;
3099
+
3100
+// bigThree.remove(scenePanel);
3101
+// bigThree.remove(centralPanel);
3102
+// bigThree.remove(XYZPanel);
3103
+// aWindowConstraints.gridx = 0;
3104
+// aWindowConstraints.gridy = 0;
3105
+// aWindowConstraints.gridwidth = 1;
3106
+// // aWindowConstraints.gridheight = 3;
3107
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3108
+// aWindowConstraints.weightx = 1;
3109
+// aWindowConstraints.weighty = 1;
3110
+// bigThree.add(scenePanel, aWindowConstraints);
3111
+// aWindowConstraints.weightx = 1;
3112
+// aWindowConstraints.gridwidth = 3;
3113
+// // aConstraints.gridheight = 3;
3114
+// aWindowConstraints.gridx = 1;
3115
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3116
+// //bigThree.add(cameraPanel, aWindowConstraints);
3117
+// aWindowConstraints.weightx = 0;
3118
+// aWindowConstraints.gridx = 4;
3119
+// aWindowConstraints.gridwidth = 1;
3120
+// // aWindowConstraints.gridheight = 3;
3121
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3122
+// //bigThree.add(XYZPanel, aWindowConstraints);
3123
+// bigThree.validate();
3124
+// scenePanel.setVisible(true);
3125
+// centralPanel.setVisible(false);
3126
+// XYZPanel.setVisible(false);
3127
+ bigThree.ClearUI();
3128
+ bigThree.add(scenePanel);
3129
+ bigThree.FlushUI();
3130
+
3131
+ cameraView.requestFocusInWindow();
27233132 } else
2724
- if (event.getSource() == sixButton)
3133
+ if (source == sixButton)
27253134 {
27263135 radio.layout = sixButton;
2727
- bigThree.remove(scenePanel);
2728
- bigThree.remove(centralPanel);
2729
- bigThree.remove(XYZPanel);
2730
- aWindowConstraints.gridx = 0;
2731
- aWindowConstraints.gridy = 0;
2732
- aWindowConstraints.gridwidth = 1;
2733
- // aConstraints.gridheight = 3;
2734
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2735
- aWindowConstraints.weightx = 0;
2736
- aWindowConstraints.weighty = 1;
2737
- bigThree.add(scenePanel, aWindowConstraints);
2738
- aWindowConstraints.weightx = 1;
2739
- aWindowConstraints.gridwidth = 3;
2740
- // aWindowConstraints.gridheight = 3;
2741
- aWindowConstraints.gridx = 1;
2742
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2743
- bigThree.add(centralPanel, aWindowConstraints);
2744
- aWindowConstraints.weightx = 0;
2745
- aWindowConstraints.gridx = 4;
2746
- aWindowConstraints.gridwidth = 1;
2747
- // aWindowConstraints.gridheight = 3;
2748
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2749
- //bigThree.add(XYZPanel, aConstraints);
2750
- bigThree.revalidate();
3136
+
3137
+ if (CameraPane.FULLSCREEN)
3138
+ fullscreenLayout = radio.layout;
3139
+
3140
+// bigThree.remove(scenePanel);
3141
+// bigThree.remove(centralPanel);
3142
+// bigThree.remove(XYZPanel);
3143
+// aWindowConstraints.gridx = 0;
3144
+// aWindowConstraints.gridy = 0;
3145
+// aWindowConstraints.gridwidth = 1;
3146
+// // aConstraints.gridheight = 3;
3147
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3148
+// aWindowConstraints.weightx = 0;
3149
+// aWindowConstraints.weighty = 1;
3150
+// bigThree.add(scenePanel, aWindowConstraints);
3151
+// aWindowConstraints.weightx = 1;
3152
+// aWindowConstraints.gridwidth = 3;
3153
+// // aWindowConstraints.gridheight = 3;
3154
+// aWindowConstraints.gridx = 1;
3155
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3156
+// bigThree.add(centralPanel, aWindowConstraints);
3157
+// aWindowConstraints.weightx = 0;
3158
+// aWindowConstraints.gridx = 4;
3159
+// aWindowConstraints.gridwidth = 1;
3160
+// // aWindowConstraints.gridheight = 3;
3161
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3162
+// //bigThree.add(XYZPanel, aConstraints);
3163
+// bigThree.validate();
3164
+// scenePanel.setVisible(true);
3165
+// centralPanel.setVisible(true);
3166
+// XYZPanel.setVisible(false);
3167
+ bigThree.ClearUI();
3168
+ bigThree.add(scenePanel);
3169
+ bigThree.add(centralPanel);
3170
+ bigThree.FlushUI();
3171
+
3172
+ cameraView.requestFocusInWindow();
27513173 } else
2752
- if (event.getSource() == sevenButton)
3174
+ if (source == sevenButton)
27533175 {
27543176 radio.layout = sevenButton;
2755
- bigThree.remove(scenePanel);
2756
- bigThree.remove(centralPanel);
2757
- bigThree.remove(XYZPanel);
2758
- aWindowConstraints.gridx = 0;
2759
- aWindowConstraints.gridy = 0;
2760
- aWindowConstraints.gridwidth = 1;
2761
- // aWindowConstraints.gridheight = 3;
2762
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2763
- aWindowConstraints.weightx = 0;
2764
- aWindowConstraints.weighty = 1;
2765
- bigThree.add(scenePanel, aWindowConstraints);
2766
- aWindowConstraints.weightx = 1;
2767
- aWindowConstraints.gridwidth = 3;
2768
- // aWindowConstraints.gridheight = 3;
2769
- aWindowConstraints.gridx = 1;
2770
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2771
- bigThree.add(centralPanel, aWindowConstraints);
2772
- aWindowConstraints.weightx = 0;
2773
- aWindowConstraints.gridx = 4;
2774
- aWindowConstraints.gridwidth = 1;
2775
- // aConstraints.gridheight = 3;
2776
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2777
- bigThree.add(XYZPanel, aWindowConstraints);
2778
- bigThree.revalidate();
3177
+
3178
+ if (CameraPane.FULLSCREEN)
3179
+ fullscreenLayout = radio.layout;
3180
+
3181
+// bigThree.remove(scenePanel);
3182
+// bigThree.remove(centralPanel);
3183
+// bigThree.remove(XYZPanel);
3184
+// aWindowConstraints.gridx = 0;
3185
+// aWindowConstraints.gridy = 0;
3186
+// aWindowConstraints.gridwidth = 1;
3187
+// // aWindowConstraints.gridheight = 3;
3188
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3189
+// aWindowConstraints.weightx = 0;
3190
+// aWindowConstraints.weighty = 1;
3191
+// bigThree.add(scenePanel, aWindowConstraints);
3192
+// aWindowConstraints.weightx = 1;
3193
+// aWindowConstraints.gridwidth = 3;
3194
+// // aWindowConstraints.gridheight = 3;
3195
+// aWindowConstraints.gridx = 1;
3196
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3197
+// bigThree.add(centralPanel, aWindowConstraints);
3198
+// aWindowConstraints.weightx = 0;
3199
+// aWindowConstraints.gridx = 4;
3200
+// aWindowConstraints.gridwidth = 1;
3201
+// // aConstraints.gridheight = 3;
3202
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3203
+// bigThree.add(XYZPanel, aWindowConstraints);
3204
+// bigThree.validate();
3205
+// scenePanel.setVisible(true);
3206
+// centralPanel.setVisible(true);
3207
+// XYZPanel.setVisible(true);
3208
+ bigThree.ClearUI();
3209
+ bigThree.add(scenePanel);
3210
+ bigThree.add(centralPanel);
3211
+ bigThree.add(XYZPanel);
3212
+ bigThree.FlushUI();
3213
+
3214
+ cameraView.requestFocusInWindow();
27793215 } else
2780
- if (event.getSource() == rootButton)
3216
+ if (source == rootButton)
27813217 {
27823218 Object3D obj;
27833219 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2787,34 +3223,44 @@
27873223 EditObject(obj);
27883224 }
27893225
3226
+ cameraView.requestFocusInWindow();
27903227 refreshContents(true);
27913228 } else
2792
- if (event.getSource() == closeButton)
3229
+ if (source == closeButton)
27933230 {
27943231 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27953232 cRadio ab;
27963233 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
27973234 {
27983235 ab = (cRadio)e.nextElement();
2799
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3236
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
28003237 {
3238
+ // Patch to avoid bug with transparency.
3239
+ if (!ab.hadMaterial)
3240
+ {
3241
+ ab.object.material = null;
3242
+ }
3243
+
28013244 buttonGroup.remove(ab);
28023245 radioPanel.remove(ab);
28033246
2804
- ab.GetObject().editWindow = null;
3247
+ //ab.GetObject().editWindow = null;
3248
+ ab.GetObject().manipWindow = null;
28053249 // ab.GetObject().objectUI = null; // ?????????
28063250
28073251 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
28083252 break;
28093253 }
28103254 }
3255
+
3256
+ cameraView.requestFocusInWindow();
28113257 refreshContents(true);
28123258 } else
2813
- if (event.getSource() == editItem || event.getSource() == editButton)
3259
+ if (source == editItem || source == editButton)
28143260 {
28153261 EditSelection(false);
28163262 } else
2817
- if (event.getSource() == uneditButton)
3263
+ if (source == uneditButton)
28183264 {
28193265 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28203266 {
....@@ -2824,14 +3270,14 @@
28243270 child.CloseUI();
28253271 listUI.remove(child);
28263272
2827
- child.editWindow = null; // ???????????
3273
+ //child.editWindow = null; // ???????????
28283274 }
2829
- objEditor.ctrlPanel.revalidate();
3275
+ objEditor.ctrlPanel.FlushUI();
28303276 //objEditor.jTree.clearSelection();
28313277 //objEditor.ResetSliders();
28323278 refreshContents(true);
28333279 } else
2834
- if (event.getSource() == clearPanelButton)
3280
+ if (source == clearPanelButton)
28353281 {
28363282 assert(copy == group);
28373283 //copy.ClearUI();
....@@ -2842,7 +3288,7 @@
28423288 listUI.clear();
28433289 refreshContents(true);
28443290 } else
2845
- if (event.getSource() == allParamsButton)
3291
+ if (source == allParamsButton)
28463292 {
28473293 assert(copy == group);
28483294
....@@ -2863,19 +3309,19 @@
28633309
28643310 refreshContents(true);
28653311 } else
2866
- if (event.getSource() == unselectButton)
3312
+ if (source == unselectButton)
28673313 {
28683314 objEditor.jTree.clearSelection();
28693315 // ?? oct 2012 GrafreeD.clipboard.clear();
28703316 objEditor.ResetSliders();
28713317 refreshContents(true);
28723318 } else
2873
- if(event.getSource() instanceof cRadio)
3319
+ if(source instanceof cRadio)
28743320 {
28753321 group.parent = keepparent;
28763322 group.attributes = 0;
28773323 //group.editWindow = null;
2878
- /*cRadio*/ radio = (cRadio)event.getSource();
3324
+ /*cRadio*/ radio = (cRadio)source;
28793325 Object3D obj = radio.GetObject();
28803326 System.out.println("Edit " + obj);
28813327 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2895,7 +3341,7 @@
28953341 }
28963342
28973343 copy = group;
2898
- //CameraPane.theRenderer.object = group;
3344
+ //Globals.theRenderer.object = group;
28993345 if(!useclient)
29003346 {
29013347 cameraView.renderCamera = radio.camera;
....@@ -2904,12 +3350,17 @@
29043350 cameraView.cameras[cameraView.cameracount] = radio.camera;
29053351 cameraView.targetLookAt.set(radio.camera.lookAt);
29063352 cameraView.object = group;
2907
- cameraView.lighttouched = true;
3353
+ //cameraView.lighttouched = true;
3354
+ Globals.lighttouched = true;
29083355 topView.object = group;
29093356 frontView.object = group;
29103357 sideView.object = group;
29113358 }
2912
- group.editWindow = this;
3359
+
3360
+// fix "+" issue
3361
+ //group.editWindow = this;
3362
+ group.manipWindow = this;
3363
+
29133364 /*
29143365 currentLayout = radio.layout;
29153366 if (currentLayout == null)
....@@ -2921,8 +3372,23 @@
29213372 //group.parent = null; // ROOT
29223373 //group.attributes = -1;
29233374 ResetModel();
3375
+
3376
+ cameraView.requestFocusInWindow();
29243377 refreshContents(true);
2925
- }
3378
+ } else if (event.getSource() == editCameraItem)
3379
+ {
3380
+ cameraView.ProtectCamera();
3381
+ cameraView.repaint();
3382
+ return;
3383
+ } else if (event.getSource() == revertCameraItem)
3384
+ {
3385
+ cameraView.RevertCamera();
3386
+ cameraView.repaint();
3387
+ return;
3388
+ // } else if (event.getSource() == textureButton)
3389
+ // {
3390
+ // return; // true;
3391
+ }
29263392 else
29273393 {
29283394 //return super.action(event, arg);
....@@ -2931,7 +3397,6 @@
29313397 }
29323398
29333399 boolean useclient = false;
2934
- cRadio radio;
29353400
29363401 void ToggleRoot()
29373402 {
....@@ -2940,7 +3405,7 @@
29403405 if (useclient)
29413406 {
29423407 cameraView.object = client;
2943
- cameraView.lighttouched = true;
3408
+ Globals.lighttouched = true;
29443409 //topView.object = client;
29453410 //frontView.object = client;
29463411 //sideView.object = client;
....@@ -2948,7 +3413,7 @@
29483413 else
29493414 {
29503415 cameraView.object = group;
2951
- cameraView.lighttouched = true;
3416
+ Globals.lighttouched = true;
29523417 //topView.object = group;
29533418 //frontView.object = group;
29543419 //sideView.object = group;
....@@ -2983,6 +3448,28 @@
29833448 refreshContents();
29843449 }
29853450
3451
+ void TransformChildren()
3452
+ {
3453
+ Object3D obj;
3454
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3455
+ {
3456
+ obj = (Object3D)e.nextElement();
3457
+ obj.KeepTextureMatrices();
3458
+ obj.TransformChildren();
3459
+ obj.RestoreTextureMatrices();
3460
+
3461
+// if (obj.parent == null)
3462
+// {
3463
+// System.out.println("NULL PARENT!");
3464
+// new Exception().printStackTrace();
3465
+// }
3466
+// else
3467
+// TouchTransform(obj);
3468
+// //obj.parent.Touch();
3469
+ }
3470
+
3471
+ refreshContents();
3472
+ }
29863473
29873474 void ResetTransform()
29883475 {
....@@ -3095,7 +3582,7 @@
30953582 refreshContents();
30963583 }
30973584
3098
- void ResetCentroid()
3585
+ void ResetCentroid(boolean full)
30993586 {
31003587 Object3D obj;
31013588 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3110,12 +3597,16 @@
31103597 LA.matIdentity(Object3D.mat);
31113598 obj.getBounds(minima, maxima, false);
31123599 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3113
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3600
+ if (full)
3601
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31143602 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31153603 obj.TransformMesh(Object3D.mat);
3604
+
31163605 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3117
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3606
+ if (full)
3607
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31183608 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3609
+
31193610 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31203611 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31213612 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3144,7 +3635,8 @@
31443635
31453636 int size = obj.MemorySize();
31463637
3147
- System.err.println((size/1024) + " KB is the size of " + obj);
3638
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3639
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
31483640 }
31493641 }
31503642 catch (Exception e)
....@@ -3181,9 +3673,9 @@
31813673 obj = (Object3D)e.nextElement();
31823674
31833675 System.out.println("Object is: " + obj);
3184
- GrafreeD.AnalyzeObject(obj);
3676
+ Grafreed.AnalyzeObject(obj);
31853677 System.out.println("Boundary rep: " + obj.bRep);
3186
- GrafreeD.AnalyzeObject(obj.bRep);
3678
+ Grafreed.AnalyzeObject(obj.bRep);
31873679
31883680 // System.err.println((size/1024) + " KB is the size of " + obj);
31893681 }
....@@ -3225,6 +3717,13 @@
32253717 void GenNormals(boolean crease)
32263718 {
32273719 group.GenNormalsS(crease);
3720
+
3721
+ refreshContents();
3722
+ }
3723
+
3724
+ void GenNormalsMESH()
3725
+ {
3726
+ group.GenNormalsMeshS();
32283727
32293728 refreshContents();
32303729 }
....@@ -3397,8 +3896,8 @@
33973896
33983897 void ParseVertices()
33993898 {
3400
- boolean epsequal = GrafreeD.epsequal;
3401
- GrafreeD.epsequal = true;
3899
+ boolean epsequal = Grafreed.epsequal;
3900
+ Grafreed.epsequal = true;
34023901
34033902 for (int i=0; i<group.selection.size(); i++)
34043903 {
....@@ -3423,7 +3922,7 @@
34233922 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34243923 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34253924
3426
- g.add(GrafreeD.clipboard);
3925
+ g.add(Grafreed.clipboard);
34273926
34283927 buffer.add(g);
34293928 }
....@@ -3438,7 +3937,7 @@
34383937 makeSomething(buffer, i==group.selection.size()-1);
34393938 }
34403939
3441
- GrafreeD.epsequal = epsequal;
3940
+ Grafreed.epsequal = epsequal;
34423941
34433942 refreshContents();
34443943 }
....@@ -3456,7 +3955,16 @@
34563955 String pigment = Object3D.GetPigment(tex);
34573956 //String bump = Object3D.GetBump(tex);
34583957
3459
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3958
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3959
+
3960
+ try
3961
+ {
3962
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3963
+ }
3964
+ catch (Exception e)
3965
+ {
3966
+ System.err.println("FAIL: " + node);
3967
+ }
34603968
34613969 double s = v.s;
34623970
....@@ -3544,11 +4052,11 @@
35444052
35454053 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35464054
3547
- boolean random = CameraPane.RANDOM;
3548
- CameraPane.RANDOM = false; // parse all random nodes
4055
+ boolean random = CameraPane.SWITCH;
4056
+ CameraPane.SWITCH = false; // parse all random nodes
35494057 lowres.linkVerticesThis(null);
35504058 lowres.linkVerticesThis(sn);
3551
- CameraPane.RANDOM = random;
4059
+ CameraPane.SWITCH = random;
35524060
35534061 System.err.flush();
35544062
....@@ -3588,7 +4096,7 @@
35884096 return;
35894097
35904098 Object3D poses = group.selection.get(0);
3591
- Object3D ref = GrafreeD.clipboard.get(0);
4099
+ Object3D ref = Grafreed.clipboard.get(0);
35924100
35934101 Object3D newgroup = new Object3D("Po:" + poses.name);
35944102
....@@ -3757,7 +4265,7 @@
37574265 group.selection.RelinkToSupport(); // july 2014
37584266 System.out.println("DONE.");
37594267 refreshContents();
3760
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
4268
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37614269 }
37624270
37634271 void ReduceMesh(boolean reduction34)
....@@ -3782,9 +4290,9 @@
37824290
37834291 void ClipMesh()
37844292 {
3785
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4293
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
37864294 {
3787
- Object3D content = GrafreeD.clipboard.get(0);
4295
+ Object3D content = Grafreed.clipboard.get(0);
37884296
37894297 if (content instanceof cGroup && ((cGroup)content).transientlink )
37904298 content = ((cGroup)content).get(0);
....@@ -3793,7 +4301,7 @@
37934301 // {
37944302 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37954303 // }
3796
- group.selection.ClipMesh(GrafreeD.clipboard);
4304
+ group.selection.ClipMesh(Grafreed.clipboard);
37974305 }
37984306 // group.selection.ClipMesh(GrafreeD.clipboard);
37994307 System.out.println("DONE.");
....@@ -3840,6 +4348,18 @@
38404348 void MarkLeaves(boolean hide)
38414349 {
38424350 group.selection.MarkLeaves(hide);
4351
+ refreshContents();
4352
+ }
4353
+
4354
+ void RewindLeaves(boolean hide)
4355
+ {
4356
+ group.selection.RewindLeaves(hide);
4357
+ refreshContents();
4358
+ }
4359
+
4360
+ void RandomLeaves(boolean hide)
4361
+ {
4362
+ group.selection.RandomLeaves(hide);
38434363 refreshContents();
38444364 }
38454365
....@@ -3925,10 +4445,10 @@
39254445 {
39264446 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
39274447 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
3928
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4448
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39294449
39304450 Object3D elem = (Object3D)group.selection.elementAt(i);
3931
- if(elem != group)
4451
+ if(elem != group || !newWindow)
39324452 {
39334453 // if (!(elem instanceof Composite))
39344454 // newWindow = false;
....@@ -4018,7 +4538,6 @@
40184538 //case 702: // Event.LIST_DESELECT
40194539 group.deselectAll();
40204540 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4021
- objEditor.ClearInfo(); // .GetMaterial());
40224541 if (tps != null)
40234542 {
40244543 for (int i=0; i < tps.length; i++)
....@@ -4027,31 +4546,30 @@
40274546
40284547 //if (child.parent != null)
40294548 //child.parent.addSelectee(child);
4549
+ objEditor.SetMaterial(child);
40304550 group.addSelectee(child);
4031
- objEditor.SetMaterial(child); // .GetMaterial());
4032
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4033
- System.err.println("info : " + child.GetPath());
40344551 }
40354552 }
4036
- else
4037
- {
4038
- objEditor.SetMaterial(group); // .GetMaterial());
4039
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4040
- System.err.println("info : " + group.GetPath());
4041
- }
4553
+// else
4554
+// {
4555
+// objEditor.SetMaterial(group); // .GetMaterial());
4556
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4557
+// System.err.println("info : " + group.GetPath());
4558
+// }
40424559
4043
- objEditor.SetText(); // jan 2014
4044
-
4045
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4560
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
40464561 CameraPane.flash = true;
40474562
4048
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4563
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
40494564 // a camera
40504565 {
4051
- CameraPane.camerachangeframe = 0; // don't refuse it
4052
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4053
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4054
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4566
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4567
+ {
4568
+ CameraPane.camerachangeframe = 0; // don't refuse it
4569
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4570
+ }
4571
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4572
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40554573 }
40564574
40574575 refreshContents();
....@@ -4062,6 +4580,26 @@
40624580
40634581 freezemodel = false;
40644582 }
4583
+
4584
+ void refreshContents(boolean cp)
4585
+ {
4586
+ if (!Globals.MOUSEDRAGGED)
4587
+ {
4588
+ objEditor.ClearInfo(); // .GetMaterial());
4589
+
4590
+ for (int i=0; i < group.selection.Size(); i++)
4591
+ {
4592
+ Object3D child = (Object3D) group.selection.get(i);
4593
+
4594
+ objEditor.AddInfo(child, this, true);
4595
+ System.err.println("info : " + child.GetPath());
4596
+ }
4597
+
4598
+ objEditor.SetText(); // jan 2014
4599
+ }
4600
+
4601
+ super.refreshContents(cp);
4602
+ }
40654603
40664604 void linkSomething(Object3D thing)
40674605 {
....@@ -4133,16 +4671,19 @@
41334671 {
41344672 if (group.selection.isEmpty())
41354673 return;
4136
- GrafreeD.clipboardIsTempGroup = false;
4674
+
4675
+ Grafreed.clipboardIsTempGroup = false;
41374676 Composite tGroup = null;
41384677 if (group.selection.size() > 0) // 1)
41394678 {
41404679 tGroup = new cGroup();
4141
- GrafreeD.clipboardIsTempGroup = true;
4680
+ Grafreed.clipboardIsTempGroup = true;
41424681 }
41434682
41444683 if (cut)
41454684 {
4685
+ if (Globals.SAVEONMAKE)
4686
+ Save();
41464687 //int indices[] = jList.getSelectedIndices();
41474688 //for (int i = indices.length - 1; i >= 0; i--)
41484689 //jList.remove(indices[i]);
....@@ -4178,16 +4719,16 @@
41784719 //System.out.println("cut " + child);
41794720 //System.out.println("parent = " + child.parent);
41804721 // tmp.addChild(child);
4181
- if (GrafreeD.clipboardIsTempGroup)
4722
+ if (Grafreed.clipboardIsTempGroup)
41824723 tGroup.add/*Child*/(tmp);
41834724 else
4184
- GrafreeD.clipboard = tmp;
4725
+ Grafreed.clipboard = tmp;
41854726 }
41864727 else
4187
- if (GrafreeD.clipboardIsTempGroup)
4728
+ if (Grafreed.clipboardIsTempGroup)
41884729 tGroup.add/*Child*/(child);
41894730 else
4190
- GrafreeD.clipboard = child;
4731
+ Grafreed.clipboard = child;
41914732 }
41924733
41934734 //ResetModel();
....@@ -4219,21 +4760,23 @@
42194760 //System.out.println("cut " + elem);
42204761 //System.out.println("parent = " + elem.parent);
42214762 // tmp.addChild(elem);
4222
- if (GrafreeD.clipboardIsTempGroup)
4763
+ if (Grafreed.clipboardIsTempGroup)
42234764 tGroup.add/*Child*/(tmp);
42244765 else
4225
- GrafreeD.clipboard = tmp;
4766
+ Grafreed.clipboard = tmp;
42264767 }
42274768 else
4228
- if (GrafreeD.clipboardIsTempGroup)
4769
+ if (Grafreed.clipboardIsTempGroup)
42294770 tGroup.add/*Child*/(child);
42304771 else
4231
- GrafreeD.clipboard = child;
4772
+ Grafreed.clipboard = child;
42324773 }
42334774
42344775 }
4235
- if (GrafreeD.clipboardIsTempGroup)
4236
- GrafreeD.clipboard = tGroup;
4776
+
4777
+ if (Grafreed.clipboardIsTempGroup)
4778
+ Grafreed.clipboard = tGroup;
4779
+
42374780 if (cut)
42384781 {
42394782 ResetModel();
....@@ -4247,7 +4790,7 @@
42474790 // return;
42484791 boolean first = true;
42494792
4250
- if (GrafreeD.clipboardIsTempGroup)
4793
+ if (Grafreed.clipboardIsTempGroup)
42514794 {
42524795 Composite temp;
42534796
....@@ -4258,7 +4801,7 @@
42584801 temp = (Composite)Applet3D.clipboard.deepCopy();
42594802 */
42604803 Object3D elem;
4261
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4804
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
42624805 {
42634806 Object3D child = (Object3D)e.nextElement();
42644807
....@@ -4292,21 +4835,21 @@
42924835 //Object3D cb = Applet3D.clipboard;
42934836 //temp.addChild(cb);
42944837 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4295
- assert(GrafreeD.clipboard.parent == null);
4296
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4297
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4298
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4299
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4838
+ assert(Grafreed.clipboard.parent == null);
4839
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4840
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4841
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4842
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43004843 else
4301
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4302
- GrafreeD.clipboard.get(0).parent = keepparent;
4844
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4845
+ Grafreed.clipboard.get(0).parent = keepparent;
43034846 }
43044847
43054848 ResetModel();
43064849 refreshContents();
43074850 }
43084851
4309
- void pasteInto(boolean copyit)
4852
+ void pasteInto(boolean copyit, boolean clone)
43104853 {
43114854 // if (GrafreeD.clipboard == null)
43124855 // return;
....@@ -4335,15 +4878,22 @@
43354878 if (copyit)
43364879 {
43374880 // paste(false);
4338
- CloneClipboard(false); // sept 2014
4881
+ if (clone)
4882
+ {
4883
+ CloneClipboard(false); // sept 2014
4884
+ }
4885
+ else
4886
+ {
4887
+ paste(false);
4888
+ }
43394889 }
43404890 else
43414891 {
43424892 boolean first = true;
43434893
4344
- if (GrafreeD.clipboardIsTempGroup)
4894
+ if (Grafreed.clipboardIsTempGroup)
43454895 {
4346
- Composite temp = (Composite)GrafreeD.clipboard;
4896
+ Composite temp = (Composite)Grafreed.clipboard;
43474897 Object3D copy;
43484898 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
43494899 {
....@@ -4353,7 +4903,7 @@
43534903 }
43544904 } else
43554905 {
4356
- linkSomething(GrafreeD.clipboard); //.get(0));
4906
+ linkSomething(Grafreed.clipboard); //.get(0));
43574907 }
43584908 }
43594909 }
....@@ -4758,21 +5308,6 @@
47585308 }
47595309 */
47605310
4761
- void ImportGFD()
4762
- {
4763
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4764
- browser.show();
4765
- String filename = browser.getFile();
4766
- if (filename != null && filename.length() > 0)
4767
- {
4768
- String fullname = browser.getDirectory() + filename;
4769
-
4770
- //Object3D readobj =
4771
- objEditor.ReadGFD(fullname, objEditor);
4772
- //makeSomething(readobj);
4773
- }
4774
- }
4775
-
47765311 /*
47775312 public void Callback(Object obj)
47785313 {
....@@ -4796,26 +5331,9 @@
47965331 }
47975332 */
47985333
4799
- void ImportVRMLX3D()
4800
- {
4801
- if (GrafreeD.standAlone)
4802
- {
4803
- /**/
4804
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4805
- browser.show();
4806
- String filename = browser.getFile();
4807
- if (filename != null && filename.length() > 0)
4808
- {
4809
- String fullname = browser.getDirectory() + filename;
4810
- LoadVRMLX3D(fullname);
4811
- }
4812
- /**/
4813
- }
4814
- }
4815
-
48165334 String GetFile(String dialogName)
48175335 {
4818
- if (GrafreeD.standAlone)
5336
+ if (Grafreed.standAlone)
48195337 {
48205338 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48215339 browser.show();
....@@ -4879,10 +5397,33 @@
48795397 cButton flashSelectionButton;
48805398 cButton editButton;
48815399 cButton uneditButton;
5400
+ JCheckBox allParamsButton;
48825401 cButton clearpanelButton;
4883
- cButton allParamsButton;
48845402 cButton unselectButton;
48855403
5404
+ cButton minButton;
5405
+ cButton maxButton;
5406
+ cButton fullButton;
5407
+ cButton undoButton;
5408
+ cButton redoButton;
5409
+ cButton saveButton;
5410
+ cButton oneStepButton;
5411
+
5412
+ cButton groupButton;
5413
+ cButton ungroupButton;
5414
+ cButton compositeButton;
5415
+
5416
+ cButton gridButton;
5417
+ cButton boxButton;
5418
+ cButton sphereButton;
5419
+ cButton coneButton;
5420
+ cButton torusButton;
5421
+ cButton superButton;
5422
+ cButton kleinButton;
5423
+ cButton particlesButton;
5424
+ cButton overlayButton;
5425
+ cButton lightButton;
5426
+
48865427 cButton screenfitButton;
48875428 cButton screenfitpointButton;
48885429 cButton snapobjectButton;
....@@ -4893,14 +5434,6 @@
48935434 cButton closeButton;
48945435
48955436 cButton setsupportButton;
4896
-
4897
- cButton twoButton;
4898
- cButton sixButton;
4899
- cButton threeButton;
4900
- cButton sevenButton;
4901
- cButton fourButton; // full panel
4902
- cButton oneButton; // full XYZ
4903
- //cButton currentLayout;
49045437
49055438 //
49065439 //Composite
....@@ -4913,7 +5446,9 @@
49135446 private MenuItem lookFromItem;
49145447 private MenuItem switchItem;
49155448 private MenuItem cutItem;
4916
- private MenuItem duplicateItem;
5449
+ private MenuItem undoItem;
5450
+ private MenuItem redoItem;
5451
+ private JMenuItem duplicateItem;
49175452 private MenuItem cloneItem;
49185453 private MenuItem cloneSupportItem;
49195454 private MenuItem overwriteGeoItem;
....@@ -4926,7 +5461,7 @@
49265461 private MenuItem linkverticesItem;
49275462 private MenuItem relinkverticesItem;
49285463 private MenuItem setMasterItem;
4929
- private MenuItem resetMeshItem;
5464
+ private MenuItem resetAllItem;
49305465 private MenuItem stepAllItem;
49315466 private MenuItem revertMeshItem;
49325467 private MenuItem poseMeshItem;
....@@ -4937,6 +5472,7 @@
49375472 private MenuItem mergeGeometriesItem;
49385473 private MenuItem copyItem;
49395474 private MenuItem pasteItem;
5475
+ private MenuItem pasteIntoItem;
49405476 private MenuItem pasteLinkItem;
49415477 private MenuItem pasteCloneItem;
49425478 private MenuItem pasteExpandItem;
....@@ -4975,6 +5511,10 @@
49755511 private MenuItem showleavesItem;
49765512 private MenuItem markleavesItem;
49775513 private MenuItem unmarkleavesItem;
5514
+ private MenuItem rewindleavesItem;
5515
+ private MenuItem unrewindleavesItem;
5516
+ private MenuItem randomleavesItem;
5517
+ private MenuItem unrandomleavesItem;
49785518
49795519 private MenuItem flipVItem;
49805520 private MenuItem unflipVItem;
....@@ -4986,8 +5526,10 @@
49865526 private MenuItem panoTexturesItem;
49875527
49885528 private MenuItem resetCentroidItem;
4989
- private MenuItem transformgeometryItem;
5529
+ private MenuItem resetCentroidXZItem;
49905530 private MenuItem resetTransformItem;
5531
+ private MenuItem transformGeometryItem;
5532
+ private MenuItem transformChildrenItem;
49915533 private MenuItem hideItem;
49925534 private MenuItem grabItem;
49935535 private MenuItem backItem;
....@@ -5009,6 +5551,7 @@
50095551
50105552 private MenuItem resetParentItem;
50115553 private MenuItem repairParentItem;
5554
+ private MenuItem repairShadowItem;
50125555 private MenuItem sortbysizeItem;
50135556 private MenuItem sortbynameItem;
50145557
....@@ -5033,7 +5576,7 @@
50335576 private MenuItem blobItem;
50345577 private MenuItem latheItem;
50355578 private MenuItem bezierItem;
5036
- private MenuItem checkerItem;
5579
+ private MenuItem overlayItem;
50375580 private MenuItem meshItem;
50385581 // private MenuItem meshGroupItem;
50395582 private MenuItem springItem;
....@@ -5055,11 +5598,6 @@
50555598 private MenuItem doubleItem;
50565599 private MenuItem tripleItem;
50575600
5058
- private MenuItem importGFDItem;
5059
- private MenuItem importVRMLX3DItem;
5060
- private MenuItem import3DSItem;
5061
- private MenuItem importOBJItem;
5062
-
50635601 private MenuItem computeAOItem;
50645602 private MenuItem recompileItem;
50655603 private MenuItem editScriptItem;
....@@ -5069,4 +5607,8 @@
50695607 private MenuItem analyzeItem;
50705608 private MenuItem dumpItem;
50715609 //boolean freezemodel = false;
5610
+
5611
+ Menu cameraMenu;
5612
+ MenuItem editCameraItem;
5613
+ MenuItem revertCameraItem;
50725614 }