Normand Briere
2019-07-17 a5580a47d246c1272b10adba68070f6e13da5e41
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -83,6 +84,10 @@
8384
8485 void CloneSelection(boolean supports)
8586 {
87
+ if (Globals.REPLACEONMAKE)
88
+ Save();
89
+ boolean keep = Globals.REPLACEONMAKE;
90
+ Globals.REPLACEONMAKE = false;
8691 // Object3D keep = GrafreeD.clipboard;
8792 //Object3D obj;
8893 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -93,18 +98,19 @@
9398
9499 makeSomething(clone, i==group.selection.size()-1);
95100 }
101
+ Globals.REPLACEONMAKE = keep;
96102 }
97103
98104 void CloneClipboard(boolean supports)
99105 {
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));
106
+ assert(Grafreed.clipboard.parent == null);
107
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
108
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
109
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
110
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105111 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
112
+ makeSomething(CloneObject(Grafreed.clipboard, false));
113
+ Grafreed.clipboard.get(0).parent = keepparent;
108114 }
109115
110116 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +124,7 @@
118124 // obj.support = null;
119125 if (!supports)
120126 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
127
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122128 obj.parent = parent;
123129 // obj.support = support;
124130 // clone.support = support; // aout 2013
....@@ -147,30 +153,29 @@
147153
148154 //JTextField nameField;
149155
150
- void SetupMenu2(ObjEditor oe)
156
+ void SetupMenu2(GroupEditor oe)
151157 {
152
- oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153
- //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
155
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
156
- oe.cameraMenu.add("-");
157
- openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
158
- openWindowItem.addActionListener(this);
159
- editLeafItem.addActionListener(this);
160
- lookAtItem.addActionListener(this);
161
- //lookFromItem.addActinoListener(this);
162
- //switchItem.addActionListener(this);
158
+ oe.jTree = new cTree();
159
+
163160 Menu menu;
164161 oe.menuBar.add(menu = new Menu("Edit"));
165162 //editItem = menu.add(new MenuItem("Edit"));
166163 //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
164
+
165
+// undoItem = menu.add(new MenuItem("Undo"));
166
+// undoItem.addActionListener(this);
167
+// redoItem = menu.add(new MenuItem("Redo"));
168
+// redoItem.addActionListener(this);
169
+// menu.add("-");
170
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
168171 duplicateItem.addActionListener(this);
169
- menu.add("-");
170172 cloneItem = menu.add(new MenuItem("Clone"));
171173 cloneItem.addActionListener(this);
174
+ if (Globals.ADVANCED)
175
+ {
172176 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173177 cloneSupportItem.addActionListener(this);
178
+ }
174179 menu.add("-");
175180 cutItem = menu.add(new MenuItem("Cut"));
176181 cutItem.addActionListener(this);
....@@ -178,27 +183,123 @@
178183 copyItem.addActionListener(this);
179184 pasteItem = menu.add(new MenuItem("Paste"));
180185 pasteItem.addActionListener(this);
186
+
187
+ menu.add("-");
188
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
189
+ pasteIntoItem.addActionListener(this);
181190 pasteLinkItem = menu.add(new MenuItem("Paste link"));
182191 pasteLinkItem.addActionListener(this);
183192 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184193 pasteCloneItem.addActionListener(this);
185194 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186195 // pasteExpandItem.addActionListener(this);
196
+ menu.add("-");
187197 clearItem = menu.add(new MenuItem("Clear"));
188198 clearItem.addActionListener(this);
199
+
200
+ if (Globals.ADVANCED)
201
+ {
202
+ // Deletes the cameras...
189203 clearAllItem = menu.add(new MenuItem("Clear All"));
190204 clearAllItem.addActionListener(this);
205
+ }
206
+
207
+ menuBar.add(cameraMenu = new Menu("View"));
208
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
209
+ //zBufferItem.addActionListener(this);
210
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
211
+ //normalLensItem.addActionListener(this);
212
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
213
+ restoreCameraItem.addActionListener(this);
214
+
215
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
216
+// toggleFullScreenItem.addItemListener(this);
217
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
218
+// cameraMenu.add("-");
219
+//
220
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
221
+// toggleTextureItem.addItemListener(this);
222
+// toggleTextureItem.setState(CameraPane.textureon);
223
+//
224
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
225
+// toggleSwitchItem.addItemListener(this);
226
+// toggleSwitchItem.setState(CameraPane.SWITCH);
227
+
228
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
229
+ toggleHandleItem.addItemListener(this);
230
+ toggleHandleItem.setState(CameraPane.HANDLES);
231
+
232
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
233
+ togglePaintItem.addItemListener(this);
234
+ togglePaintItem.setState(CameraPane.PAINTMODE);
235
+
236
+ if (Globals.ADVANCED)
237
+ {
238
+ cameraMenu.add("-");
239
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
240
+ toggleLiveItem.addItemListener(this);
241
+ toggleLiveItem.setState(Globals.isLIVE());
191242
243
+ cameraMenu.add(stepItem = new MenuItem("Step"));
244
+ stepItem.addActionListener(this);
245
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
246
+ // toggleDLItem.addItemListener(this);
247
+ // toggleDLItem.setState(false);
248
+
249
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
250
+ toggleRenderItem.addItemListener(this);
251
+ toggleRenderItem.setState(!CameraPane.frozen);
252
+
253
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
254
+ toggleDebugItem.addItemListener(this);
255
+ toggleDebugItem.setState(Globals.DEBUG);
256
+
257
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
258
+ toggleFrustumItem.addItemListener(this);
259
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
260
+
261
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
262
+ toggleFootContactItem.addItemListener(this);
263
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
264
+
265
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
266
+ toggleTimelineItem.addItemListener(this);
267
+ }
268
+
269
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
270
+// toggleRootItem.addItemListener(this);
271
+// toggleRootItem.setState(false);
272
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
273
+// animationItem.addItemListener(this);
274
+// animationItem.setState(CameraPane.ANIMATION);
275
+ cameraMenu.add("-");
276
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
277
+ editCameraItem.addActionListener(this);
278
+
279
+ if (Globals.ADVANCED)
280
+ {
281
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
282
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
283
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
284
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
285
+ oe.cameraMenu.add("-");
286
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
287
+ openWindowItem.addActionListener(this);
288
+ editLeafItem.addActionListener(this);
289
+ lookAtItem.addActionListener(this);
290
+ //lookFromItem.addActinoListener(this);
291
+ //switchViewItem.addActionListener(this);
292
+ }
293
+
192294 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);
295
+ if (Globals.ADVANCED)
296
+ {
197297 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198298 revertMeshItem.addActionListener(this);
199299 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200300 resetreferencesItem.addActionListener(this);
201301 menu.add("-");
302
+ }
202303 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203304 overwriteGeoItem.addActionListener(this);
204305 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,79 +311,104 @@
210311 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211312 overwriteUVItem.addActionListener(this);
212313 menu.add("-");
314
+ if (Globals.ADVANCED)
315
+ {
213316 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214317 generateMeshItem.addActionListener(this);
215318 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216319 poseMeshItem.addActionListener(this);
217320 menu.add("-");
321
+ }
218322 resetsupportItem = menu.add(new MenuItem("Reset support"));
219323 resetsupportItem.addActionListener(this);
220324 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221325 linkverticesItem.addActionListener(this);
222326 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223327 relinkverticesItem.addActionListener(this);
328
+
329
+ if (Globals.ADVANCED)
330
+ {
224331 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225332 setMasterItem.addActionListener(this);
333
+ }
226334
227335 oe.menuBar.add(menu = new Menu("Group"));
228
- grabItem = menu.add(new MenuItem("Grab"));
229
- grabItem.addActionListener(this);
336
+// grabItem = menu.add(new MenuItem("Grab"));
337
+// grabItem.addActionListener(this);
230338 backItem = menu.add(new MenuItem("Back"));
231339 backItem.addActionListener(this);
232340 frontItem = menu.add(new MenuItem("Front"));
233341 frontItem.addActionListener(this);
234
- compositeItem = menu.add(new MenuItem("Composite"));
235
- compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
342
+// compositeItem = menu.add(new MenuItem("Composite"));
343
+// compositeItem.addActionListener(this);
344
+
345
+ if (Globals.ADVANCED)
346
+ {
347
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237348 hideItem.addActionListener(this);
349
+ }
238350 ungroupItem = menu.add(new MenuItem("Ungroup"));
239351 ungroupItem.addActionListener(this);
240
- menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
242
- 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
+
353
+// menu.add("-");
354
+//
355
+// switchItem = menu.add(new MenuItem("Switch node"));
356
+// switchItem.addActionListener(this);
357
+ if (Globals.ADVANCED)
358
+ {
247359 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248360 switchGeoItem.addActionListener(this);
249361 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250362 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
363
+ morphItem = menu.add(new MenuItem("Morph Group"));
252364 morphItem.addActionListener(this);
365
+
366
+ menu.add("-");
367
+ physicsItem = menu.add(new MenuItem("Physics"));
368
+ physicsItem.addActionListener(this);
369
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
370
+ frameselectorItem.addActionListener(this);
253371 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254372 scriptNodeItem.addActionListener(this);
255
- cameraItem = menu.add(new MenuItem("Camera"));
256
- cameraItem.addActionListener(this);
373
+ }
257374
258375 oe.menuBar.add(menu = new Menu("Object"));
259
- textureItem = menu.add(new MenuItem("Texture"));
260
- textureItem.addActionListener(this);
376
+// textureItem = menu.add(new MenuItem("Texture"));
377
+// textureItem.addActionListener(this);
261378 billboardItem = menu.add(new MenuItem("Billboard"));
262379 billboardItem.addActionListener(this);
263380 csgItem = menu.add(new MenuItem("CSG"));
264381 csgItem.addActionListener(this);
265
- shadowXItem = menu.add(new MenuItem("Shadow X"));
382
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
266383 shadowXItem.addActionListener(this);
267
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
384
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
268385 shadowYItem.addActionListener(this);
269
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
386
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
270387 shadowZItem.addActionListener(this);
388
+ attributeItem = menu.add(new MenuItem("Attribute"));
389
+ attributeItem.addActionListener(this);
390
+
391
+ if (Globals.ADVANCED)
392
+ {
393
+ menu.add("-");
271394 linkerItem = menu.add(new MenuItem("Linker"));
272395 linkerItem.addActionListener(this);
273396 templateItem = menu.add(new MenuItem("Template"));
274397 templateItem.addActionListener(this);
275
- attributeItem = menu.add(new MenuItem("Attribute"));
276
- attributeItem.addActionListener(this);
277398 pointflowItem = menu.add(new MenuItem("Point Flow"));
278399 pointflowItem.addActionListener(this);
400
+ }
279401 menu.add("-");
280402 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281403 resetTransformItem.addActionListener(this);
282404 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283405 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
406
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
407
+ resetCentroidXZItem.addActionListener(this);
408
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
409
+ transformGeometryItem.addActionListener(this);
410
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
411
+ transformChildrenItem.addActionListener(this);
286412
287413 oe.menuBar.add(menu = new Menu("Geometry"));
288414 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +419,11 @@
293419 genNormalsCADItem.addActionListener(this);
294420 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295421 genNormalsMESHItem.addActionListener(this);
422
+ if (Globals.ADVANCED)
423
+ {
296424 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297425 genNormalsMINEItem.addActionListener(this);
426
+ }
298427 stripifyItem = menu.add(new MenuItem("Stripify"));
299428 stripifyItem.addActionListener(this);
300429 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +445,34 @@
316445 reduce34MeshItem.addActionListener(this);
317446 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318447 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321448 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322449 clipMeshItem.addActionListener(this);
450
+
451
+ if (Globals.ADVANCED)
452
+ {
453
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
454
+ smoothMeshItem.addActionListener(this);
455
+ }
323456
324457 oe.menuBar.add(menu = new Menu("Attributes"));
325458 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326459 clearMaterialsItem.addActionListener(this);
460
+ resetAllItem = menu.add(new MenuItem("Reset All"));
461
+ resetAllItem.addActionListener(this);
462
+ stepAllItem = menu.add(new MenuItem("Step All"));
463
+ stepAllItem.addActionListener(this);
327464 menu.add("-");
328465 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329466 liveleavesItem.addActionListener(this);
330467 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331468 unliveleavesItem.addActionListener(this);
469
+ if (Globals.ADVANCED)
470
+ {
332471 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333472 supportleavesItem.addActionListener(this);
334473 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335474 unsupportleavesItem.addActionListener(this);
475
+ }
336476 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337477 hideleavesItem.addActionListener(this);
338478 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -341,6 +481,14 @@
341481 markleavesItem.addActionListener(this);
342482 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
343483 unmarkleavesItem.addActionListener(this);
484
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
485
+ rewindleavesItem.addActionListener(this);
486
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
487
+ unrewindleavesItem.addActionListener(this);
488
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
489
+ randomleavesItem.addActionListener(this);
490
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
491
+ unrandomleavesItem.addActionListener(this);
344492 menu.add("-");
345493 flipVItem = menu.add(new MenuItem("Flip V"));
346494 flipVItem.addActionListener(this);
....@@ -376,35 +524,41 @@
376524 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377525 sortbynameItem.addActionListener(this);
378526 menu.add("-");
527
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
528
+ shareGeometriesItem.addActionListener(this);
529
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
530
+ mergeGeometriesItem.addActionListener(this);
531
+ if (Globals.ADVANCED)
532
+ {
533
+ // Pretty much the same as duplicate and clone.
379534 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380535 extractGeometriesItem.addActionListener(this);
381536 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382537 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);
538
+ }
387539
388540 oe.menuBar.add(menu = new Menu("Insert"));
389541 buildCreateMenu(menu);
390542
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
-
402543 oe.menuBar.add(menu = new Menu("Tools"));
403544 buildToolsMenu(menu);
404545 }
405546
547
+
406548 void SetupUI2(ObjEditor oe)
407549 {
550
+ // June 2019
551
+ if (oe == null)
552
+ {
553
+ //super.SetupUI2(this);
554
+ //return;
555
+ }
556
+
557
+ if (copy != group)
558
+ {
559
+ //super.SetupUI2(this);
560
+ }
561
+
408562 //new Exception().printStackTrace();
409563
410564 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -433,110 +587,230 @@
433587 oe.radioPanel.add(dummyButton);
434588 oe.buttonGroup.add(dummyButton);
435589 */
436
- aConstraints.gridy += 1;
590
+ cGridBag copyOptionsPanel = new cGridBag();
591
+
592
+ copyOptionsPanel.preferredHeight = 1;
437593
438594 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439595
440
- oe.aConstraints.gridwidth = 1;
441
- oe.aConstraints.gridx = 0;
596
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
+ //minButton.setToolTipText("Minimize window");
598
+ //minButton.addActionListener(this);
442599
443
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444
- liveCB.setToolTipText("Enabled animation");
445
- liveCB.addItemListener(this);
446
-
447
- oe.aConstraints.gridx += 1;
448
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
449
- trackCB.setToolTipText("Enable tracking");
450
- trackCB.addItemListener(this);
451
-
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
600
+ if (Globals.ADVANCED)
601
+ {
602
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603
+ maxButton.setToolTipText("Maximize window");
604
+ maxButton.addActionListener(this);
605
+ }
606
+
607
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ fullButton.setToolTipText("Full-screen window");
609
+ fullButton.addActionListener(this);
610
+
611
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
454612 screenfitButton.setToolTipText("Screen fit");
455613 screenfitButton.addActionListener(this);
456
- oe.aConstraints.gridx += 1;
614
+
615
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
+ restoreCameraButton.setToolTipText("Restore viewpoint");
617
+ restoreCameraButton.addActionListener(this);
618
+
619
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
+ saveButton.setToolTipText("New version");
621
+ saveButton.addActionListener(this);
622
+
623
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
+ undoButton.setToolTipText("Previous version");
625
+ undoButton.addActionListener(this);
626
+ undoButton.setEnabled(false);
627
+
628
+ cGridBag updown = new cGridBag().setVertical(true);
629
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
+ restoreButton.setToolTipText("Restore current");
631
+ restoreButton.addActionListener(this);
632
+ restoreButton.setEnabled(false);
633
+
634
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
635
+ replaceButton.setToolTipText("Replace current");
636
+ replaceButton.addActionListener(this);
637
+ replaceButton.setEnabled(false);
638
+
639
+ copyOptionsPanel.add(updown);
640
+
641
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ redoButton.setToolTipText("Next version");
643
+ redoButton.addActionListener(this);
644
+ redoButton.setEnabled(false);
645
+
646
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
647
+ liveCB.setToolTipText("Enable animation");
648
+ liveCB.addItemListener(this);
649
+
650
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
651
+ oneStepButton.setToolTipText("Animate one step forward");
652
+ oneStepButton.addActionListener(this);
653
+
654
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
655
+ fastCB.setToolTipText("Fast mode");
656
+ fastCB.addItemListener(this);
657
+
658
+ //oe.toolboxPanel.Return();
659
+
660
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
661
+// trackCB.setToolTipText("Enable tracking");
662
+// trackCB.addItemListener(this);
663
+
457664 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
458665 // screenfitpointButton.addActionListener(this);
459
-// oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
461
- snapobjectButton.addActionListener(this);
462
- snapobjectButton.setToolTipText("Snap Object");
463
- oe.aConstraints.gridx += 1;
464666
465
- //aConstraints.gridx = 0;
466
- //aConstraints.gridy += 1;
467
- oe.aConstraints.weighty = 0;
468
- oe.aConstraints.gridwidth = 1;
469
-
470
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
471
- flashSelectionButton.setToolTipText("Show selection");
472
- flashSelectionButton.addActionListener(this);
667
+ if (Globals.ADVANCED)
668
+ {
669
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ snapobjectButton.addActionListener(this);
671
+ snapobjectButton.setToolTipText("Snap Object");
672
+ }
673
+
674
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
473675
474
- oe.toolbarPanel.add(new cButton(" ", false));
475
-
476
- oe.aConstraints.gridx += 1;
477
- oe.aConstraints.weighty = 0;
478
- oe.aConstraints.gridwidth = 1;
479
-
480
- //
481
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
676
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
482677 twoButton.setToolTipText("Show center view only");
483678 twoButton.addActionListener(this);
484
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
679
+ this.fullscreenLayout = twoButton;
680
+
681
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
485682 fourButton.addActionListener(this);
486683 fourButton.setToolTipText("Show left panel only");
487
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
684
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
488685 sixButton.setToolTipText("2-column layout left");
489686 sixButton.addActionListener(this);
490
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
687
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
491688 threeButton.setToolTipText("2-column layout right");
492689 threeButton.addActionListener(this);
493
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
690
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
494691 sevenButton.setToolTipText("3-column layout");
495692 sevenButton.addActionListener(this);
496693 //
497694
498
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
499
- rootButton.setToolTipText("Edit object in new tab");
695
+ oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
696
+ rootButton.setToolTipText("Edit selection in new tab");
500697 rootButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
698
+
699
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
503700 closeButton.setToolTipText("Close tab");
504701 closeButton.addActionListener(this);
505702 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
506703 //clearButton.addActionListener(this);
507
- oe.aConstraints.gridx += 1;
508
-
509
- oe.aConstraints.gridx = 1; //
510
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
511
- editButton.addActionListener(this);
512
- oe.aConstraints.gridx += 1;
513
- oe.aConstraints.weighty = 0;
514
- oe.aConstraints.gridwidth = 1;
515704
516
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
705
+ // INSERT
706
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
707
+ gridButton.setToolTipText("Create grid");
708
+ gridButton.addActionListener(this);
709
+
710
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
711
+ boxButton.setToolTipText("Create box");
712
+ boxButton.addActionListener(this);
713
+
714
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
715
+ sphereButton.setToolTipText("Create sphere");
716
+ sphereButton.addActionListener(this);
717
+
718
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
719
+ coneButton.setToolTipText("Create cone");
720
+ coneButton.addActionListener(this);
721
+
722
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
723
+ torusButton.setToolTipText("Create torus");
724
+ torusButton.addActionListener(this);
725
+
726
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
727
+ superButton.setToolTipText("Create superellipsoid");
728
+ superButton.addActionListener(this);
729
+
730
+ if (Globals.ADVANCED)
731
+ {
732
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
733
+ kleinButton.setToolTipText("Create Klein bottle");
734
+ kleinButton.addActionListener(this);
735
+ }
736
+
737
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
738
+ particlesButton.setToolTipText("Create particle system");
739
+ particlesButton.addActionListener(this);
740
+
741
+ oe.toolboxPanel.Return();
742
+
743
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
744
+ groupButton.setToolTipText("Create group");
745
+ groupButton.addActionListener(this);
746
+
747
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
748
+ compositeButton.setToolTipText("Create composite");
749
+ compositeButton.addActionListener(this);
750
+
751
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
752
+ switchButton.setToolTipText("Create item switcher");
753
+ switchButton.addActionListener(this);
754
+
755
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
756
+ loopButton.setToolTipText("Create loop");
757
+ loopButton.addActionListener(this);
758
+
759
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
760
+ textureButton.setToolTipText("Create texture");
761
+ textureButton.addActionListener(this);
762
+
763
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
764
+ overlayButton.setToolTipText("Create overlay");
765
+ overlayButton.addActionListener(this);
766
+
767
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
768
+ lightButton.setToolTipText("Create light");
769
+ lightButton.addActionListener(this);
770
+
771
+ for (int i=6; --i>=0;)
772
+ {
773
+ oe.toolboxPanel.Return();
774
+ oe.toolboxPanel.add(new cGridBag());
775
+ oe.toolboxPanel.add(new cGridBag());
776
+ oe.toolboxPanel.add(new cGridBag());
777
+ oe.toolboxPanel.add(new cGridBag());
778
+ oe.toolboxPanel.add(new cGridBag());
779
+ oe.toolboxPanel.add(new cGridBag());
780
+ oe.toolboxPanel.add(new cGridBag());
781
+ }
782
+
783
+ // EDIT panel
784
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
785
+ editButton.setToolTipText("Pin selection controls");
786
+ editButton.addActionListener(this);
787
+
788
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
789
+ uneditButton.setToolTipText("Remove selection controls");
517790 uneditButton.addActionListener(this);
518791
519
- oe.aConstraints.gridx += 1;
520
- oe.aConstraints.weighty = 0;
521
- oe.aConstraints.gridwidth = 1;
522
-
523
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
524
- clearPanelButton.addActionListener(this);
525
-
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
792
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
793
+ allParamsButton.setToolTipText("Show all controle");
531794 allParamsButton.addActionListener(this);
532795
533
- oe.aConstraints.gridx += 1;
534
- oe.aConstraints.weighty = 0;
535
- oe.aConstraints.gridwidth = 1;
536
-
537
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
796
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
797
+ clearPanelButton.setToolTipText("Clear edit panel");
798
+ clearPanelButton.addActionListener(this);
799
+
800
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
801
+ unselectButton.setToolTipText("Unselect");
538802 unselectButton.addActionListener(this);
539803
804
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
805
+ flashSelectionButton.setToolTipText("Highlight selection");
806
+ flashSelectionButton.addActionListener(this);
807
+
808
+ editCommandsPanel.preferredHeight = 1;
809
+
810
+ SetPinStates(false);
811
+// oe.treePanel.add(commandsPanel);
812
+// oe.treePanel.Return();
813
+
540814 // oe.aConstraints.gridx += 1;
541815 // oe.aConstraints.weighty = 0;
542816 // oe.aConstraints.gridwidth = 1;
....@@ -548,40 +822,25 @@
548822 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
549823 // gcButton.addActionListener(this);
550824
551
- oe.aConstraints.gridx = 0;
552
- oe.aConstraints.gridy += 1;
553
-
554
- //ctrlPanel.add(objList = new List(5, true));
555
- oe.aConstraints.gridwidth = 100;
556
- // oe.aConstraints.gridheight = 100;
557
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
558
- oe.aConstraints.gridheight = 1;
559
- oe.aConstraints.weighty = 0.5;
560
- oe.aConstraints.gridx = 0;
561
- JScrollPane jSP;
825
+ cGridBag jSPPanel = new cGridBag();
826
+
827
+ JScrollPane jSP;
562828 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
563
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
829
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
564830 ResetModel();
565
- oe.aConstraints.weighty = 0.5;
566
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
567
- oe.aConstraints.gridy += 1;
568
- oe.aConstraints.gridwidth = 1;
569
-
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 2;
572
-
573
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
574
- colorCB.addItemListener(this);
575
- oe.aConstraints.gridx += 2;
576
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
577
- materialCB.addItemListener(this);
578
- oe.aConstraints.gridx += 2;
579
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
580
- textureCB.addItemListener(this);
581
-
582
- oe.aConstraints.gridx = 0;
583
- oe.aConstraints.gridy += 1;
584831
832
+ oe.treePanel.add(jSPPanel);
833
+ oe.treePanel.Return();
834
+
835
+ oe.treePanel.add(copyOptionsPanel);
836
+ oe.treePanel.Return();
837
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 10, 0);
838
+ versionField = (cNumberSlider)sliderPane.getComponent(1);
839
+ sliderPane.preferredHeight = 1;
840
+
841
+// mainPanel.setDividerLocation(0.5); //1.0);
842
+// mainPanel.setResizeWeight(0.5);
843
+
585844 //jList.addListSelectionListener(this);
586845 oe.jTree.addTreeSelectionListener(this);
587846 //jTree.setRootVisible(false);
....@@ -604,83 +863,143 @@
604863 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
605864 }
606865
607
- void AddOptions(JPanel panel, GridBagConstraints constraints)
866
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
608867 {
609
- constraints.gridx = 0;
610
- constraints.gridy = 0;
611
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
- fastCB.setToolTipText("Fast mode");
613
- fastCB.addItemListener(this);
614
- constraints.gridy += 1;
615
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
- supportCB.setToolTipText("Enabled rigging");
617
- supportCB.addItemListener(this);
868
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
869
+ colorCB.setToolTipText("Copy color when dropped");
870
+ colorCB.addItemListener(this);
618871
619
- // constraints.gridy += 1;
872
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
873
+ materialCB.setToolTipText("Copy material when dropped");
874
+ materialCB.addItemListener(this);
875
+
876
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
877
+ textureCB.setToolTipText("Copy texture when dropped");
878
+ textureCB.addItemListener(this);
879
+
880
+ panel.Return();
881
+
882
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
883
+ boxCB.setToolTipText("Display bounding boxes");
884
+ boxCB.addItemListener(this);
885
+
886
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
887
+ zoomBoxCB.setToolTipText("Display only for wheel");
888
+ zoomBoxCB.addItemListener(this);
889
+
890
+ if (true) // Globals.ADVANCED)
891
+ {
892
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
893
+// supportCB.setToolTipText("Enable rigging");
894
+// supportCB.addItemListener(this);
895
+
896
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
897
+ freezeCB.setToolTipText("Fast moving camera");
898
+ freezeCB.addItemListener(this);
899
+
620900 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621901 // localCB.addItemListener(this);
622902
623
- constraints.gridy += 1;
624
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
903
+ panel.Return();
904
+
905
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
625906 crowdCB.setToolTipText("Used for crowds");
626907 crowdCB.addItemListener(this);
627908
628
- constraints.gridy += 1;
629
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
909
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
630910 smoothCB.setToolTipText("Snapping delay");
631911 smoothCB.addItemListener(this);
632912
633
- constraints.gridy += 1;
634
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
913
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
635914 slowCB.setToolTipText("Smooth interpolation");
636915 slowCB.addItemListener(this);
637
- constraints.gridy += 1;
638
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
639
- boxCB.setToolTipText("Display bounding boxes");
640
- boxCB.addItemListener(this);
641
- constraints.gridy += 1;
642
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
643
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644
- zoomBoxCB.addItemListener(this);
645
-
916
+
646917 // constraints.gridy += 1;
647918 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648919 // speakerMocapCB.addItemListener(this);
649920
921
+ panel.Return();
922
+
650923 if (false)
651924 {
652925 // handled in scripts
653
- constraints.gridy += 1;
654
- panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
926
+ //constraints.gridy += 1;
927
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
655928 speakerCameraCB.addItemListener(this);
656929
657
- constraints.gridy += 1;
658
- panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
930
+ //constraints.gridy += 1;
931
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
659932 speakerFocusCB.addItemListener(this);
660933
661
- constraints.gridy += 1;
662
- panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
934
+ //constraints.gridy += 1;
935
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
663936 smoothfocusCB.addItemListener(this);
937
+ panel.Return();
664938 }
665939
666940 //constraints.gridx += 1;
667941 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668942 // debugCB.addItemListener(this);
669943
670
- constraints.gridy += 1;
671
- panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
944
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
945
+ trackCB.setToolTipText("Enable tracking target");
946
+ trackCB.addItemListener(this);
947
+
948
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
949
+ oeilCB.setToolTipText("Move camera when tracking");
672950 oeilCB.addItemListener(this);
673951
674
- constraints.gridy += 1;
675
- panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
952
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
953
+ shadowCB.setToolTipText("When live compute shadows");
954
+ shadowCB.addItemListener(this);
955
+
956
+ panel.Return();
957
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
958
+ toggleTextureCB.setToolTipText("Load textures");
959
+ toggleTextureCB.addItemListener(this);
960
+
961
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
962
+ toggleSwitchCB.setToolTipText("Choose a single item");
963
+ toggleSwitchCB.addItemListener(this);
964
+
965
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
966
+ autokeepCB.setToolTipText("On structure change");
967
+ autokeepCB.addItemListener(this);
968
+
969
+ panel.Return();
970
+ if (Globals.ADVANCED)
971
+ {
972
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
676973 lookAtCB.setToolTipText("Look-at target");
677974 lookAtCB.addItemListener(this);
975
+ }
976
+
977
+ }
978
+
979
+ cGridBag fill = new cGridBag();
980
+ fill.preferredHeight = 200;
981
+ cGridBag fill2 = new cGridBag();
982
+ fill2.preferredHeight = 200;
983
+ cGridBag fill3 = new cGridBag();
984
+ fill3.preferredHeight = 200;
985
+
986
+ panel.add(fill);
987
+ panel.add(fill2);
988
+ panel.add(fill3);
678989
679990 }
680991
681992 void EditObject(Object3D obj)
682993 {
683994 cRadio radioButton = new cRadio(obj.name);
995
+
996
+ // June 2019. Patch to avoid bug with transparency.
997
+ radioButton.hadMaterial = obj.material != null;
998
+ if (!radioButton.hadMaterial)
999
+ {
1000
+ obj.material = new cMaterial();
1001
+ }
1002
+
6841003 radioButton.SetObject(obj);
6851004 radioButton.layout = sevenButton;
6861005 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -689,8 +1008,11 @@
6891008 buttonGroup.add(radioButton);
6901009 radioButton.doClick();
6911010 }
1011
+
6921012 void SetupViews(ObjEditor oe)
6931013 {
1014
+ theFrame = this;
1015
+
6941016 oe.SetupViews();
6951017
6961018 System.out.println("SetupViews");
....@@ -699,23 +1021,28 @@
6991021 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
7001022 }
7011023
702
- JCheckBox liveCB;
703
- JCheckBox supportCB;
704
- JCheckBox localCB;
705
- JCheckBox crowdCB;
706
- JCheckBox smoothCB;
707
- JCheckBox fastCB;
708
- JCheckBox slowCB;
709
- JCheckBox boxCB;
710
- JCheckBox zoomBoxCB;
711
- JCheckBox trackCB;
712
- JCheckBox smoothfocusCB;
1024
+ cToggleButton liveCB;
1025
+ cCheckBox supportCB;
1026
+ cCheckBox localCB;
1027
+ cCheckBox crowdCB;
1028
+ cCheckBox smoothCB;
1029
+ cToggleButton fastCB;
1030
+ cCheckBox slowCB;
1031
+ cCheckBox boxCB;
1032
+ cCheckBox zoomBoxCB;
1033
+ cCheckBox freezeCB;
1034
+ //cToggleButton trackCB;
1035
+ cCheckBox trackCB;
1036
+ cCheckBox smoothfocusCB;
7131037 // JCheckBox speakerMocapCB;
714
- JCheckBox speakerCameraCB;
715
- JCheckBox speakerFocusCB;
716
- JCheckBox debugCB;
717
- JCheckBox oeilCB;
718
- JCheckBox lookAtCB;
1038
+ cCheckBox speakerCameraCB;
1039
+ cCheckBox speakerFocusCB;
1040
+ cCheckBox debugCB;
1041
+
1042
+ cCheckBox oeilCB;
1043
+ cCheckBox shadowCB;
1044
+ cCheckBox autokeepCB;
1045
+ cCheckBox lookAtCB;
7191046
7201047 // static int COLOR = 1;
7211048 // static int MATERIAL = 2;
....@@ -723,9 +1050,9 @@
7231050
7241051 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
7251052
726
- JCheckBox colorCB;
727
- JCheckBox materialCB;
728
- JCheckBox textureCB;
1053
+ cCheckBox colorCB;
1054
+ cCheckBox materialCB;
1055
+ cCheckBox textureCB;
7291056
7301057 public void itemStateChanged(ItemEvent e)
7311058 {
....@@ -753,6 +1080,7 @@
7531080 } else if(e.getSource() == liveCB)
7541081 {
7551082 cameraView.ToggleLive();
1083
+ refreshContents(false);
7561084 }
7571085 else if(e.getSource() == supportCB)
7581086 {
....@@ -817,6 +1145,18 @@
8171145 {
8181146 cameraView.ToggleOeil();
8191147 }
1148
+ else if(e.getSource() == shadowCB)
1149
+ {
1150
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1151
+ }
1152
+ else if(e.getSource() == freezeCB)
1153
+ {
1154
+ Globals.FREEZEONMOVE ^= true;
1155
+ }
1156
+ else if(e.getSource() == autokeepCB)
1157
+ {
1158
+ Globals.REPLACEONMAKE ^= true;
1159
+ }
8201160 else if(e.getSource() == lookAtCB)
8211161 {
8221162 cameraView.ToggleLookAt();
....@@ -833,7 +1173,8 @@
8331173
8341174 /**/
8351175 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
836
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1176
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1177
+ TreePath path = objEditor.jTree.getSelectionPath();
8371178 if ((path == null) || (path.getPathCount() <= 1)) {
8381179 // We can't move the root node or an empty selection
8391180 return;
....@@ -896,8 +1237,6 @@
8961237 }
8971238 }
8981239
899
- String string = (String) object;
900
-
9011240 System.out.println("Transfer = " + object + "; drop : " + target);
9021241 // if( object instanceof java.io.File[])
9031242 // {
....@@ -905,7 +1244,11 @@
9051244 // objEditor.DropFile((java.io.File[]) object, true);
9061245 // return;
9071246 // }
908
- if (string.charAt(0) == '/')
1247
+
1248
+ String string = object.toString();
1249
+
1250
+ // File path for Mac and Windows
1251
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9091252 {
9101253 // file(s)
9111254 String[] names = string.split("\n");
....@@ -932,7 +1275,7 @@
9321275
9331276 flashIt = false;
9341277 CameraPane pane = (CameraPane) target;
935
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1278
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9361279 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9371280
9381281 if (group.selection.size() == 1)
....@@ -948,23 +1291,33 @@
9481291
9491292 assert target == objEditor.jTree;
9501293 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1294
+ Object3D destinationLeaf;
9511295 try {
952
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1296
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
9531297 } catch (Exception e) {
9541298 System.out.println("destinationPath : " + destinationPath);
9551299 return;
9561300 }
9571301
958
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1302
+ for (int i=group.selection.size(); --i>=0;)
9591303 {
1304
+ Object3D child = (Object3D)group.selection.elementAt(i);
1305
+
1306
+ // Cannot move into itself
1307
+ if (child == destinationLeaf)
1308
+ return;
1309
+ }
1310
+
1311
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1312
+// {
9601313 loadClipboard(true);
9611314 objEditor.jTree.setSelectionPath(destinationPath);
962
- pasteInto(false);
963
- } else {
964
- loadClipboard(false);
965
- objEditor.jTree.setSelectionPath(destinationPath);
966
- pasteInto(false); // true); // ???
967
- }
1315
+ pasteInto(false, false);
1316
+// } else {
1317
+// loadClipboard(false);
1318
+// objEditor.jTree.setSelectionPath(destinationPath);
1319
+// pasteInto(false, false); // true); // ???
1320
+// }
9681321 }
9691322 public void dropActionChanged(DropTargetDragEvent dtde)
9701323 // Called if the user has modified the current drop gesture
....@@ -1069,85 +1422,107 @@
10691422 {
10701423 //heightFieldItem = menu.add(new MenuItem("Height Field"));
10711424 //heightFieldItem.addActionListener(this);
1072
- gridItem = menu.add(new MenuItem("Grid"));
1073
- gridItem.addActionListener(this);
1074
- rectoidItem = menu.add(new MenuItem("Box"));
1075
- rectoidItem.addActionListener(this);
1076
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1077
- ellipsoidItem.addActionListener(this);
1078
- coneItem = menu.add(new MenuItem("Cone"));
1079
- coneItem.addActionListener(this);
1080
- torusItem = menu.add(new MenuItem("Torus"));
1081
- torusItem.addActionListener(this);
1082
- superItem = menu.add(new MenuItem("Superellipsoid"));
1083
- superItem.addActionListener(this);
1425
+// gridItem = menu.add(new MenuItem("Grid"));
1426
+// gridItem.addActionListener(this);
1427
+// rectoidItem = menu.add(new MenuItem("Box"));
1428
+// rectoidItem.addActionListener(this);
1429
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1430
+// ellipsoidItem.addActionListener(this);
1431
+// coneItem = menu.add(new MenuItem("Cone"));
1432
+// coneItem.addActionListener(this);
1433
+// torusItem = menu.add(new MenuItem("Torus"));
1434
+// torusItem.addActionListener(this);
1435
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1436
+// superItem.addActionListener(this);
1437
+
1438
+ cameraItem = menu.add(new MenuItem("Camera"));
1439
+ cameraItem.addActionListener(this);
1440
+
1441
+ if (!Globals.ADVANCED)
1442
+ {
10841443 kleinItem = menu.add(new MenuItem("Klein Bottle"));
10851444 kleinItem.addActionListener(this);
1086
- particleItem = menu.add(new MenuItem("Particle system"));
1087
- particleItem.addActionListener(this);
1445
+ }
1446
+
1447
+// particleItem = menu.add(new MenuItem("Particle system"));
1448
+// particleItem.addActionListener(this);
1449
+ if (Globals.ADVANCED)
1450
+ {
10881451 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10891452 ragdollItem.addActionListener(this);
10901453 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10911454 ragdoll2Item.addActionListener(this);
1455
+ }
10921456 menu.add("-");
1093
- meshItem = menu.add(new MenuItem("Mesh"));
1457
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10941458 meshItem.addActionListener(this);
10951459 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10961460 // meshGroupItem.addActionListener(this);
1461
+ if (Globals.ADVANCED)
1462
+ {
10971463 springItem = menu.add(new MenuItem("Spring"));
10981464 springItem.addActionListener(this);
10991465 flagItem = menu.add(new MenuItem("Flag"));
11001466 flagItem.addActionListener(this);
1101
- bezierItem = menu.add(new MenuItem("Patch"));
1102
- bezierItem.addActionListener(this);
1103
- checkerItem = menu.add(new MenuItem("Checker"));
1104
- checkerItem.addActionListener(this);
11051467 blobItem = menu.add(new MenuItem("Blob"));
11061468 blobItem.addActionListener(this);
11071469 latheItem = menu.add(new MenuItem("Lathe"));
11081470 latheItem.addActionListener(this);
1109
- lightItem = menu.add(new MenuItem("Light"));
1110
- lightItem.addActionListener(this);
1471
+ }
1472
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1473
+ bezierItem.addActionListener(this);
1474
+// overlayItem = menu.add(new MenuItem("Overlay"));
1475
+// overlayItem.addActionListener(this);
1476
+// lightItem = menu.add(new MenuItem("Light"));
1477
+// lightItem.addActionListener(this);
11111478 menu.add("-");
11121479 //superLoopItem = menu.add(new MenuItem("Super Loop"));
11131480 //superLoopItem.addActionListener(this);
1114
- loopItem = menu.add(new MenuItem("Loop"));
1115
- loopItem.addActionListener(this);
1481
+// loopItem = menu.add(new MenuItem("Loop"));
1482
+// loopItem.addActionListener(this);
11161483 doubleItem = menu.add(new MenuItem("Fork"));
11171484 doubleItem.addActionListener(this);
1485
+ if (Globals.ADVANCED)
1486
+ {
11181487 tripleItem = menu.add(new MenuItem("Trident"));
11191488 tripleItem.addActionListener(this);
1489
+ }
11201490 }
11211491
11221492 void buildToolsMenu(Menu menu)
11231493 {
11241494 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11251495 animationItem.addItemListener(this);
1126
- animationItem.setState(CameraPane.ANIMATION);
1496
+ animationItem.setState(Globals.ANIMATION);
1497
+
1498
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1499
+ archiveItem.addActionListener(this);
11271500
11281501 menu.add("-");
11291502 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11301503 parseverticesItem.addActionListener(this);
11311504 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11321505 textureFieldItem.addActionListener(this);
1133
- alignItem = menu.add(new MenuItem("Align"));
1506
+ alignItem = menu.add(new MenuItem("Align Objects"));
11341507 alignItem.addActionListener(this);
1135
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1136
- mirrorItem.addActionListener(this);
11371508 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11381509 reduceMorphItem.addActionListener(this);
11391510 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11401511 reduce34MorphItem.addActionListener(this);
1141
-
1142
- menu.add(computeAOItem = new MenuItem("Compute AO"));
1143
- computeAOItem.addActionListener(this);
11441512 menu.add("-");
1145
-
11461513 menu.add(memoryItem = new MenuItem("Memory Usage"));
11471514 memoryItem.addActionListener(this);
1515
+ menu.add(computeAOItem = new MenuItem("Compute AO"));
1516
+ computeAOItem.addActionListener(this);
1517
+
1518
+ if (Globals.ADVANCED)
1519
+ {
1520
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1521
+ mirrorItem.addActionListener(this);
1522
+ menu.add("-");
11481523 menu.add(analyzeItem = new MenuItem("Analyze"));
11491524 analyzeItem.addActionListener(this);
1150
- menu.add(dumpItem = new MenuItem("Dump"));
1525
+ menu.add(dumpItem = new MenuItem("Print"));
11511526 dumpItem.addActionListener(this);
11521527 // menu.add(pathItem = new MenuItem("From-to path"));
11531528 // pathItem.addActionListener(this);
....@@ -1165,6 +1540,7 @@
11651540 menu.add("-");
11661541 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11671542 editScriptItem.addActionListener(this);
1543
+ }
11681544 }
11691545
11701546 void ScreenFit()
....@@ -1287,9 +1663,24 @@
12871663 shadow.material = new cMaterial(obj.material);
12881664 shadow.material.diffuse = 0.0001f;
12891665 shadow.material.specular = 0.0001f;
1666
+ //shadow.projectedVertices[1].x = 300;
12901667
12911668 makeSomething(shadow);
12921669 }
1670
+
1671
+ private void ClearUnpinned()
1672
+ {
1673
+ //for (Object3D obj : listUI)
1674
+ for (int i=listUI.size(); --i>=0;)
1675
+ {
1676
+ Object3D obj = listUI.elementAt(i);
1677
+ if (!obj.pinned)
1678
+ {
1679
+ obj.CloseUI();
1680
+ listUI.remove(i);
1681
+ }
1682
+ }
1683
+ }
12931684
12941685 /**
12951686 * applyExample
....@@ -1493,9 +1884,9 @@
14931884
14941885 void Overwrite(int mask)
14951886 {
1496
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1887
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14971888 {
1498
- Object3D content = GrafreeD.clipboard.get(0);
1889
+ Object3D content = Grafreed.clipboard.get(0);
14991890
15001891 if (content instanceof cGroup && ((cGroup)content).transientlink )
15011892 content = ((cGroup)content).get(0);
....@@ -1534,7 +1925,7 @@
15341925 {
15351926 ScreenFit();
15361927 } else
1537
- if (source == switchItem)
1928
+ if (source == switchViewItem)
15381929 {
15391930 cVector v1 = new cVector();
15401931 cVector v2 = new cVector();
....@@ -1543,11 +1934,11 @@
15431934 objEditor.cameraView.renderCamera.setAim(v2, v1);
15441935 objEditor.cameraView.repaint();
15451936 } else
1546
- if (source == rectoidItem)
1937
+ if (source == rectoidItem || source == boxButton)
15471938 {
15481939 makeSomething(new Box());
15491940 } else
1550
- if (source == particleItem)
1941
+ if (source == particleItem || source == particlesButton)
15511942 {
15521943 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15531944 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1626,27 +2017,27 @@
16262017
16272018 makeSomething(obj);
16282019 } else
1629
- if (source == gridItem)
2020
+ if (source == gridItem || source == gridButton)
16302021 {
16312022 makeSomething(new Grid());
16322023 } else
1633
- if (source == ellipsoidItem)
2024
+ if (source == ellipsoidItem || source == sphereButton)
16342025 {
16352026 makeSomething(new Sphere());
16362027 } else
1637
- if (source == coneItem)
2028
+ if (source == coneItem || source == coneButton)
16382029 {
16392030 makeSomething(new Cone());
16402031 } else
1641
- if (source == torusItem)
2032
+ if (source == torusItem || source == torusButton)
16422033 {
16432034 makeSomething(new Torus());
16442035 } else
1645
- if (source == superItem)
2036
+ if (source == superItem || source == superButton)
16462037 {
16472038 makeSomething(new Superellipsoid());
16482039 } else
1649
- if (source == kleinItem)
2040
+ if (source == kleinItem || source == kleinButton)
16502041 {
16512042 makeSomething(new Klein());
16522043 } else
....@@ -1666,7 +2057,7 @@
16662057 {
16672058 makeSomething(new BezierSurface());
16682059 } else
1669
- if (source == checkerItem)
2060
+ if (source == overlayItem || source == overlayButton)
16702061 {
16712062 /*
16722063 Object3D obj = new BezierSurface(5,8);
....@@ -1714,7 +2105,7 @@
17142105 s.setup();
17152106 makeSomething(s);
17162107 } else
1717
- if (source == lightItem)
2108
+ if (source == lightItem || source == lightButton)
17182109 {
17192110 makeSomething(new Light());
17202111 } else
....@@ -1764,30 +2155,30 @@
17642155
17652156 group(g);
17662157 } else
1767
- if (source == loopItem)
2158
+ if (source == loopItem || source == loopButton)
17682159 {
17692160 Composite csg = new GroupLeaf();
17702161 csg.count = 5;
17712162 group(csg);
1772
- Composite child = new cGroup();
2163
+ Composite child = new cGroup("Branch");
17732164 csg.addChild(child);
17742165 child.addChild(csg);
17752166 } else
17762167 if (source == doubleItem)
17772168 {
1778
- Composite csg = new GroupLeaf();
2169
+ Composite csg = new GroupLeaf("Fork");
17792170 csg.count = 5;
17802171 group(csg);
1781
- Composite child = new cGroup();
2172
+ Composite child = new cGroup("Branch A");
17822173 csg.addChild(child);
17832174 child.addChild(csg);
1784
- child = new cGroup();
2175
+ child = new cGroup("Branch B");
17852176 csg.addChild(child);
17862177 child.addChild(csg);
17872178 } else
17882179 if (source == tripleItem)
17892180 {
1790
- Composite csg = new GroupLeaf();
2181
+ Composite csg = new GroupLeaf("Trident");
17912182 csg.count = 4;
17922183 group(csg);
17932184 Composite child = new cGroup();
....@@ -1799,23 +2190,6 @@
17992190 child = new cGroup();
18002191 csg.addChild(child);
18012192 child.addChild(csg);
1802
- } else
1803
-
1804
- if (source == importGFDItem)
1805
- {
1806
- ImportGFD();
1807
- } else
1808
- if (source == importVRMLX3DItem)
1809
- {
1810
- ImportVRMLX3D();
1811
- } else
1812
- if (source == import3DSItem)
1813
- {
1814
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1815
- } else
1816
- if (source == importOBJItem)
1817
- {
1818
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
18192193 } else
18202194 if (source == computeAOItem)
18212195 {
....@@ -1835,7 +2209,7 @@
18352209 if (source == invariantsItem)
18362210 {
18372211 System.out.println("Invariants:");
1838
- GrafreeD.grafreeD.universe.invariants();
2212
+ Grafreed.grafreeD.universe.invariants();
18392213 } else
18402214 if (source == memoryItem)
18412215 {
....@@ -1854,19 +2228,61 @@
18542228 {
18552229 DumpObject();
18562230 } else
2231
+ if (source == minButton)
2232
+ {
2233
+ Minimize();
2234
+ } else
2235
+ if (source == maxButton)
2236
+ {
2237
+ Maximize();
2238
+ } else
2239
+ if (source == fullButton)
2240
+ {
2241
+ ToggleFullScreen();
2242
+ } else
2243
+ if (source == undoButton)
2244
+ {
2245
+ // Go to previous version
2246
+ //if (!Undo())
2247
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2248
+ Undo();
2249
+ } else
2250
+ if (source == restoreButton)
2251
+ {
2252
+ // Restore current version
2253
+ Restore();
2254
+ } else
2255
+ if (source == replaceButton)
2256
+ {
2257
+ // Overwrite current version
2258
+ Replace();
2259
+ } else
2260
+ if (source == redoButton)
2261
+ {
2262
+ // Go to next version
2263
+ Redo();
2264
+ } else
2265
+ if (source == saveButton)
2266
+ {
2267
+ // Save a new version
2268
+ if (!Save(true))
2269
+ java.awt.Toolkit.getDefaultToolkit().beep();
2270
+ } else
2271
+ if (source == oneStepButton)
2272
+ {
2273
+ Globals.ONESTEP = true;
2274
+ cameraView.repaint();
2275
+ } else
18572276 if (source == screenfitButton)
18582277 {
1859
- //Reload(lastConverter, lastFilename, true);
18602278 ScreenFit();
18612279 } else
18622280 if (source == screenfitpointButton)
18632281 {
1864
- //Reload(lastConverter, lastFilename, true);
18652282 ScreenFitPoint();
18662283 } else
18672284 if (source == snapobjectButton)
18682285 {
1869
- //Reload(lastConverter, lastFilename, true);
18702286 SnapObject();
18712287 } else
18722288 // if (event.getSource() == recompileButton)
....@@ -1903,12 +2319,20 @@
19032319 {
19042320 loadClipboard(true);
19052321 } else
2322
+ if (source == undoItem)
2323
+ {
2324
+ Undo();
2325
+ } else
2326
+ if (source == redoItem)
2327
+ {
2328
+ Redo();
2329
+ } else
19062330 if (source == duplicateItem)
19072331 {
1908
- Object3D keep = GrafreeD.clipboard;
2332
+ Object3D keep = Grafreed.clipboard;
19092333 loadClipboard(false);
19102334 paste(false);
1911
- GrafreeD.clipboard = keep;
2335
+ Grafreed.clipboard = keep;
19122336 } else
19132337 if (source == cloneItem)
19142338 {
....@@ -1926,13 +2350,17 @@
19262350 {
19272351 paste(false);
19282352 } else
2353
+ if (source == pasteIntoItem)
2354
+ {
2355
+ pasteInto(true, false);
2356
+ } else
19292357 if (source == pasteLinkItem)
19302358 {
1931
- pasteInto(false);
2359
+ pasteInto(false, false);
19322360 } else
19332361 if (source == pasteCloneItem)
19342362 {
1935
- pasteInto(true);
2363
+ pasteInto(true, true);
19362364 } else
19372365 if (source == pasteExpandItem)
19382366 {
....@@ -2124,9 +2552,9 @@
21242552 // group.selection.get(0).setMasterThis(content); // should be identity
21252553 // refreshContents();
21262554 // }
2127
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2555
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21282556 {
2129
- Object3D content = GrafreeD.clipboard.get(0);
2557
+ Object3D content = Grafreed.clipboard.get(0);
21302558
21312559 if (content instanceof cGroup && ((cGroup)content).transientlink )
21322560 content = ((cGroup)content).get(0);
....@@ -2134,11 +2562,11 @@
21342562 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21352563 for (int i=0; i<group.selection.size(); i++)
21362564 {
2137
- boolean random = CameraPane.RANDOM;
2138
- CameraPane.RANDOM = false; // parse all random nodes
2565
+ boolean random = CameraPane.SWITCH;
2566
+ CameraPane.SWITCH = false; // parse all random nodes
21392567 group.selection.get(i).linkVerticesThis(content);
21402568 // group.selection.get(i).setMasterThis(content); // should be identity
2141
- CameraPane.RANDOM = random;
2569
+ CameraPane.SWITCH = random;
21422570 }
21432571 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21442572 refreshContents();
....@@ -2148,20 +2576,20 @@
21482576 {
21492577 for (int i=0; i<group.selection.size(); i++)
21502578 {
2151
- boolean random = CameraPane.RANDOM;
2152
- CameraPane.RANDOM = false; // parse all random nodes
2579
+ boolean random = CameraPane.SWITCH;
2580
+ CameraPane.SWITCH = false; // parse all random nodes
21532581 group.selection.get(i).linkVerticesThis(null);
2154
- CameraPane.RANDOM = random;
2582
+ CameraPane.SWITCH = random;
21552583 }
21562584
21572585 refreshContents();
21582586 } else
21592587 if (source == relinkverticesItem)
21602588 {
2161
- boolean random = CameraPane.RANDOM;
2162
- CameraPane.RANDOM = false; // parse all random nodes
2589
+ boolean random = CameraPane.SWITCH;
2590
+ CameraPane.SWITCH = false; // parse all random nodes
21632591 group.selection.RelinkToSupport();
2164
- CameraPane.RANDOM = random;
2592
+ CameraPane.SWITCH = random;
21652593
21662594 refreshContents();
21672595 } else
....@@ -2176,9 +2604,9 @@
21762604 } else
21772605 if (source == setMasterItem)
21782606 {
2179
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2607
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21802608 {
2181
- Object3D content = GrafreeD.clipboard.get(0);
2609
+ Object3D content = Grafreed.clipboard.get(0);
21822610
21832611 if (content instanceof cGroup && ((cGroup)content).transientlink )
21842612 content = ((cGroup)content).get(0);
....@@ -2191,9 +2619,9 @@
21912619 {
21922620 if (group.selection.size() == 1)
21932621 {
2194
- if (GrafreeD.clipboard.size() == 1)
2622
+ if (Grafreed.clipboard.size() == 1)
21952623 {
2196
- Object3D content = GrafreeD.clipboard.get(0);
2624
+ Object3D content = Grafreed.clipboard.get(0);
21972625
21982626 if (content instanceof cGroup && ((cGroup)content).transientlink )
21992627 content = ((cGroup)content).get(0);
....@@ -2210,7 +2638,7 @@
22102638 {
22112639 RevertMeshes();
22122640 } else
2213
- if (source == resetMeshItem)
2641
+ if (source == resetAllItem)
22142642 {
22152643 ResetAll();
22162644 } else
....@@ -2230,9 +2658,9 @@
22302658 {
22312659 ClearSelection(true);
22322660 } else
2233
- if (source == grabItem)
2661
+ if (source == grabItem || source == groupButton)
22342662 {
2235
- group(new cGroup(), true);
2663
+ group(new cGroup(), false); // true);
22362664 } else
22372665 if (source == hideItem)
22382666 {
....@@ -2250,16 +2678,16 @@
22502678 {
22512679 makeSomething(new Camera());
22522680 } else
2253
- if (source == compositeItem)
2681
+ if (source == compositeItem || source == compositeButton)
22542682 {
22552683 group(new Composite());
22562684 } else
2257
- if (source == randomItem)
2685
+ if (source == switchItem || source == switchButton)
22582686 {
22592687 RandomNode random = new RandomNode();
22602688 group(random);
22612689 if (random.size() > 0)
2262
- random.name = random.get(0).name + "Rnd";
2690
+ random.name = random.get(0).name + "Switch";
22632691 } else
22642692 if (source == physicsItem)
22652693 {
....@@ -2356,7 +2784,7 @@
23562784 {
23572785 group(new cLinker());
23582786 } else
2359
- if (source == textureItem)
2787
+ if (source == textureItem || source == textureButton)
23602788 {
23612789 group(new TextureNode());
23622790 } else
....@@ -2376,17 +2804,30 @@
23762804 {
23772805 CastShadow(2);
23782806 } else
2379
- if (source == ungroupItem)
2807
+ if (source == ungroupItem || source == ungroupButton)
23802808 {
2381
- //ungroup();
2809
+ boolean hasRoot = false;
2810
+
23822811 for (int i=0; i<group.selection.size(); i++)
23832812 {
2384
- Ungroup(group.selection.get(i));
2813
+ if (group.selection.get(i) == group)
2814
+ {
2815
+ hasRoot = true;
2816
+ break;
2817
+ }
23852818 }
23862819
2387
- ClearSelection(false);
2388
-
2389
- refreshContents();
2820
+ if (!hasRoot)
2821
+ {
2822
+ for (int i=0; i<group.selection.size(); i++)
2823
+ {
2824
+ Ungroup(group.selection.get(i));
2825
+ }
2826
+
2827
+ ClearSelection(false);
2828
+
2829
+ refreshContents();
2830
+ }
23902831 } else
23912832 if (source == genUVItem)
23922833 {
....@@ -2398,7 +2839,7 @@
23982839 } else
23992840 if (source == genNormalsMESHItem)
24002841 {
2401
- GenNormals(true); // TODO
2842
+ GenNormalsMESH();
24022843 } else
24032844 if (source == genNormalsORGANItem)
24042845 {
....@@ -2463,6 +2904,22 @@
24632904 if (source == unmarkleavesItem)
24642905 {
24652906 MarkLeaves(false);
2907
+ } else
2908
+ if (source == rewindleavesItem)
2909
+ {
2910
+ RewindLeaves(true);
2911
+ } else
2912
+ if (source == unrewindleavesItem)
2913
+ {
2914
+ RewindLeaves(false);
2915
+ } else
2916
+ if (source == randomleavesItem)
2917
+ {
2918
+ RandomLeaves(true);
2919
+ } else
2920
+ if (source == unrandomleavesItem)
2921
+ {
2922
+ RandomLeaves(false);
24662923 } else
24672924 if (source == flipVItem)
24682925 {
....@@ -2548,9 +3005,13 @@
25483005 {
25493006 SmoothMesh();
25503007 } else
2551
- if (source == transformgeometryItem)
3008
+ if (source == transformGeometryItem)
25523009 {
25533010 TransformGeometry();
3011
+ } else
3012
+ if (source == transformChildrenItem)
3013
+ {
3014
+ TransformChildren();
25543015 } else
25553016 if (source == resetTransformItem)
25563017 {
....@@ -2558,7 +3019,11 @@
25583019 } else
25593020 if (source == resetCentroidItem)
25603021 {
2561
- ResetCentroid();
3022
+ ResetCentroid(true);
3023
+ } else
3024
+ if (source == resetCentroidXZItem)
3025
+ {
3026
+ ResetCentroid(false);
25623027 } else
25633028 if (source == resetParentItem)
25643029 {
....@@ -2690,6 +3155,10 @@
26903155 if (source == twoButton)
26913156 {
26923157 radio.layout = twoButton;
3158
+
3159
+ if (CameraPane.FULLSCREEN)
3160
+ fullscreenLayout = radio.layout;
3161
+
26933162 // bug
26943163 //gridPanel.setDividerLocation(1.0);
26953164 //bigPanel.setDividerLocation(0.0);
....@@ -2720,12 +3189,33 @@
27203189 // centralPanel.setVisible(true);
27213190 // XYZPanel.setVisible(false);
27223191 bigThree.ClearUI();
2723
- bigThree.addComponent(centralPanel);
3192
+ bigThree.add(centralPanel);
27243193 bigThree.FlushUI();
3194
+
3195
+ cameraView.requestFocusInWindow();
3196
+
3197
+// refreshContents(true);
3198
+//
3199
+// try
3200
+// {
3201
+// java.awt.Robot bot = new java.awt.Robot();
3202
+// int mask = InputEvent.BUTTON1_MASK;
3203
+// bot.mouseMove(100, 100);
3204
+// bot.mousePress(mask);
3205
+// bot.mouseRelease(mask);
3206
+// }
3207
+// catch (Exception e)
3208
+// {
3209
+//
3210
+// }
3211
+
27253212 } else
27263213 if (source == threeButton)
27273214 {
27283215 radio.layout = threeButton;
3216
+
3217
+ if (CameraPane.FULLSCREEN)
3218
+ fullscreenLayout = radio.layout;
27293219
27303220 // bigThree.remove(scenePanel);
27313221 // bigThree.remove(centralPanel);
....@@ -2755,13 +3245,18 @@
27553245 // centralPanel.setVisible(true);
27563246 // XYZPanel.setVisible(true);
27573247 bigThree.ClearUI();
2758
- bigThree.addComponent(centralPanel);
2759
- bigThree.addComponent(XYZPanel);
3248
+ bigThree.add(centralPanel);
3249
+ bigThree.add(XYZPanel);
27603250 bigThree.FlushUI();
3251
+
3252
+ cameraView.requestFocusInWindow();
27613253 } else
27623254 if (source == fourButton)
27633255 {
27643256 radio.layout = fourButton;
3257
+
3258
+ if (CameraPane.FULLSCREEN)
3259
+ fullscreenLayout = radio.layout;
27653260
27663261 // bigThree.remove(scenePanel);
27673262 // bigThree.remove(centralPanel);
....@@ -2791,12 +3286,17 @@
27913286 // centralPanel.setVisible(false);
27923287 // XYZPanel.setVisible(false);
27933288 bigThree.ClearUI();
2794
- bigThree.addComponent(scenePanel);
3289
+ bigThree.add(scenePanel);
27953290 bigThree.FlushUI();
3291
+
3292
+ cameraView.requestFocusInWindow();
27963293 } else
27973294 if (source == sixButton)
27983295 {
27993296 radio.layout = sixButton;
3297
+
3298
+ if (CameraPane.FULLSCREEN)
3299
+ fullscreenLayout = radio.layout;
28003300
28013301 // bigThree.remove(scenePanel);
28023302 // bigThree.remove(centralPanel);
....@@ -2826,13 +3326,18 @@
28263326 // centralPanel.setVisible(true);
28273327 // XYZPanel.setVisible(false);
28283328 bigThree.ClearUI();
2829
- bigThree.addComponent(scenePanel);
2830
- bigThree.addComponent(centralPanel);
3329
+ bigThree.add(scenePanel);
3330
+ bigThree.add(centralPanel);
28313331 bigThree.FlushUI();
3332
+
3333
+ cameraView.requestFocusInWindow();
28323334 } else
28333335 if (source == sevenButton)
28343336 {
28353337 radio.layout = sevenButton;
3338
+
3339
+ if (CameraPane.FULLSCREEN)
3340
+ fullscreenLayout = radio.layout;
28363341
28373342 // bigThree.remove(scenePanel);
28383343 // bigThree.remove(centralPanel);
....@@ -2862,10 +3367,12 @@
28623367 // centralPanel.setVisible(true);
28633368 // XYZPanel.setVisible(true);
28643369 bigThree.ClearUI();
2865
- bigThree.addComponent(scenePanel);
2866
- bigThree.addComponent(centralPanel);
2867
- bigThree.addComponent(XYZPanel);
3370
+ bigThree.add(scenePanel);
3371
+ bigThree.add(centralPanel);
3372
+ bigThree.add(XYZPanel);
28683373 bigThree.FlushUI();
3374
+
3375
+ cameraView.requestFocusInWindow();
28693376 } else
28703377 if (source == rootButton)
28713378 {
....@@ -2877,6 +3384,7 @@
28773384 EditObject(obj);
28783385 }
28793386
3387
+ cameraView.requestFocusInWindow();
28803388 refreshContents(true);
28813389 } else
28823390 if (source == closeButton)
....@@ -2886,22 +3394,37 @@
28863394 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
28873395 {
28883396 ab = (cRadio)e.nextElement();
2889
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3397
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
28903398 {
3399
+ // Patch to avoid bug with transparency.
3400
+ if (!ab.hadMaterial)
3401
+ {
3402
+ ab.object.material = null;
3403
+ }
3404
+
28913405 buttonGroup.remove(ab);
28923406 radioPanel.remove(ab);
28933407
2894
- ab.GetObject().editWindow = null;
3408
+ //ab.GetObject().editWindow = null;
3409
+ ab.GetObject().manipWindow = null;
28953410 // ab.GetObject().objectUI = null; // ?????????
28963411
28973412 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
28983413 break;
28993414 }
29003415 }
3416
+
3417
+ cameraView.requestFocusInWindow();
29013418 refreshContents(true);
29023419 } else
29033420 if (source == editItem || source == editButton)
29043421 {
3422
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3423
+ {
3424
+ Object3D child = (Object3D)e.nextElement();
3425
+ child.pinned = true;
3426
+ }
3427
+
29053428 EditSelection(false);
29063429 } else
29073430 if (source == uneditButton)
....@@ -2911,12 +3434,13 @@
29113434 Object3D child = (Object3D)e.nextElement();
29123435 if(child.editWindow != null)
29133436 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3437
+ child.pinned = false;
29143438 child.CloseUI();
29153439 listUI.remove(child);
29163440
2917
- child.editWindow = null; // ???????????
3441
+ //child.editWindow = null; // ???????????
29183442 }
2919
- objEditor.ctrlPanel.revalidate();
3443
+ objEditor.ctrlPanel.FlushUI();
29203444 //objEditor.jTree.clearSelection();
29213445 //objEditor.ResetSliders();
29223446 refreshContents(true);
....@@ -2927,6 +3451,7 @@
29273451 //copy.ClearUI();
29283452 for (Object3D obj : listUI)
29293453 {
3454
+ obj.pinned = false;
29303455 obj.CloseUI();
29313456 }
29323457 listUI.clear();
....@@ -2936,7 +3461,7 @@
29363461 {
29373462 assert(copy == group);
29383463
2939
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3464
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
29403465
29413466 for (Object3D obj : listUI)
29423467 {
....@@ -2985,6 +3510,9 @@
29853510 }
29863511
29873512 copy = group;
3513
+
3514
+ SetUndoStates();
3515
+
29883516 //Globals.theRenderer.object = group;
29893517 if(!useclient)
29903518 {
....@@ -3000,20 +3528,44 @@
30003528 frontView.object = group;
30013529 sideView.object = group;
30023530 }
3003
- group.editWindow = this;
3531
+
3532
+// fix "+" issue
3533
+ //group.editWindow = this;
3534
+ group.manipWindow = this;
3535
+
30043536 /*
30053537 currentLayout = radio.layout;
30063538 if (currentLayout == null)
30073539 currentLayout = sevenButton;
30083540 */
30093541 radio.layout.doClick();
3542
+
3543
+ ClearUnpinned();
3544
+ SetPinStates(group.selection.size() > 0);
3545
+ if (group.selection.size() == 1)
3546
+ EditSelection(false);
30103547 keepparent = group.parent;
30113548 // PARENT = NULL or not???
30123549 //group.parent = null; // ROOT
30133550 //group.attributes = -1;
30143551 ResetModel();
3552
+
3553
+ cameraView.requestFocusInWindow();
30153554 refreshContents(true);
3016
- }
3555
+ } else if (event.getSource() == editCameraItem)
3556
+ {
3557
+ cameraView.ProtectCamera();
3558
+ cameraView.repaint();
3559
+ return;
3560
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
3561
+ {
3562
+ cameraView.RevertCamera();
3563
+ cameraView.repaint();
3564
+ return;
3565
+ // } else if (event.getSource() == textureButton)
3566
+ // {
3567
+ // return; // true;
3568
+ }
30173569 else
30183570 {
30193571 //return super.action(event, arg);
....@@ -3022,7 +3574,6 @@
30223574 }
30233575
30243576 boolean useclient = false;
3025
- cRadio radio;
30263577
30273578 void ToggleRoot()
30283579 {
....@@ -3074,6 +3625,28 @@
30743625 refreshContents();
30753626 }
30763627
3628
+ void TransformChildren()
3629
+ {
3630
+ Object3D obj;
3631
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3632
+ {
3633
+ obj = (Object3D)e.nextElement();
3634
+ obj.KeepTextureMatrices();
3635
+ obj.TransformChildren();
3636
+ obj.RestoreTextureMatrices();
3637
+
3638
+// if (obj.parent == null)
3639
+// {
3640
+// System.out.println("NULL PARENT!");
3641
+// new Exception().printStackTrace();
3642
+// }
3643
+// else
3644
+// TouchTransform(obj);
3645
+// //obj.parent.Touch();
3646
+ }
3647
+
3648
+ refreshContents();
3649
+ }
30773650
30783651 void ResetTransform()
30793652 {
....@@ -3186,7 +3759,7 @@
31863759 refreshContents();
31873760 }
31883761
3189
- void ResetCentroid()
3762
+ void ResetCentroid(boolean full)
31903763 {
31913764 Object3D obj;
31923765 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3201,12 +3774,16 @@
32013774 LA.matIdentity(Object3D.mat);
32023775 obj.getBounds(minima, maxima, false);
32033776 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3204
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3777
+ if (full)
3778
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32053779 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32063780 obj.TransformMesh(Object3D.mat);
3781
+
32073782 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3208
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3783
+ if (full)
3784
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32093785 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3786
+
32103787 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32113788 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32123789 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3235,7 +3812,8 @@
32353812
32363813 int size = obj.MemorySize();
32373814
3238
- System.err.println((size/1024) + " KB is the size of " + obj);
3815
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3816
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32393817 }
32403818 }
32413819 catch (Exception e)
....@@ -3272,9 +3850,9 @@
32723850 obj = (Object3D)e.nextElement();
32733851
32743852 System.out.println("Object is: " + obj);
3275
- GrafreeD.AnalyzeObject(obj);
3853
+ Grafreed.AnalyzeObject(obj);
32763854 System.out.println("Boundary rep: " + obj.bRep);
3277
- GrafreeD.AnalyzeObject(obj.bRep);
3855
+ Grafreed.AnalyzeObject(obj.bRep);
32783856
32793857 // System.err.println((size/1024) + " KB is the size of " + obj);
32803858 }
....@@ -3316,6 +3894,13 @@
33163894 void GenNormals(boolean crease)
33173895 {
33183896 group.GenNormalsS(crease);
3897
+
3898
+ refreshContents();
3899
+ }
3900
+
3901
+ void GenNormalsMESH()
3902
+ {
3903
+ group.GenNormalsMeshS();
33193904
33203905 refreshContents();
33213906 }
....@@ -3488,8 +4073,8 @@
34884073
34894074 void ParseVertices()
34904075 {
3491
- boolean epsequal = GrafreeD.epsequal;
3492
- GrafreeD.epsequal = true;
4076
+ boolean epsequal = Grafreed.epsequal;
4077
+ Grafreed.epsequal = true;
34934078
34944079 for (int i=0; i<group.selection.size(); i++)
34954080 {
....@@ -3514,7 +4099,7 @@
35144099 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35154100 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35164101
3517
- g.add(GrafreeD.clipboard);
4102
+ g.add(Grafreed.clipboard);
35184103
35194104 buffer.add(g);
35204105 }
....@@ -3529,7 +4114,7 @@
35294114 makeSomething(buffer, i==group.selection.size()-1);
35304115 }
35314116
3532
- GrafreeD.epsequal = epsequal;
4117
+ Grafreed.epsequal = epsequal;
35334118
35344119 refreshContents();
35354120 }
....@@ -3547,7 +4132,16 @@
35474132 String pigment = Object3D.GetPigment(tex);
35484133 //String bump = Object3D.GetBump(tex);
35494134
3550
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4135
+ com.sun.opengl.util.texture.TextureData texturedata = null;
4136
+
4137
+ try
4138
+ {
4139
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4140
+ }
4141
+ catch (Exception e)
4142
+ {
4143
+ System.err.println("FAIL: " + node);
4144
+ }
35514145
35524146 double s = v.s;
35534147
....@@ -3635,11 +4229,11 @@
36354229
36364230 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36374231
3638
- boolean random = CameraPane.RANDOM;
3639
- CameraPane.RANDOM = false; // parse all random nodes
4232
+ boolean random = CameraPane.SWITCH;
4233
+ CameraPane.SWITCH = false; // parse all random nodes
36404234 lowres.linkVerticesThis(null);
36414235 lowres.linkVerticesThis(sn);
3642
- CameraPane.RANDOM = random;
4236
+ CameraPane.SWITCH = random;
36434237
36444238 System.err.flush();
36454239
....@@ -3679,7 +4273,7 @@
36794273 return;
36804274
36814275 Object3D poses = group.selection.get(0);
3682
- Object3D ref = GrafreeD.clipboard.get(0);
4276
+ Object3D ref = Grafreed.clipboard.get(0);
36834277
36844278 Object3D newgroup = new Object3D("Po:" + poses.name);
36854279
....@@ -3873,9 +4467,9 @@
38734467
38744468 void ClipMesh()
38754469 {
3876
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4470
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38774471 {
3878
- Object3D content = GrafreeD.clipboard.get(0);
4472
+ Object3D content = Grafreed.clipboard.get(0);
38794473
38804474 if (content instanceof cGroup && ((cGroup)content).transientlink )
38814475 content = ((cGroup)content).get(0);
....@@ -3884,7 +4478,7 @@
38844478 // {
38854479 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38864480 // }
3887
- group.selection.ClipMesh(GrafreeD.clipboard);
4481
+ group.selection.ClipMesh(Grafreed.clipboard);
38884482 }
38894483 // group.selection.ClipMesh(GrafreeD.clipboard);
38904484 System.out.println("DONE.");
....@@ -3931,6 +4525,18 @@
39314525 void MarkLeaves(boolean hide)
39324526 {
39334527 group.selection.MarkLeaves(hide);
4528
+ refreshContents();
4529
+ }
4530
+
4531
+ void RewindLeaves(boolean hide)
4532
+ {
4533
+ group.selection.RewindLeaves(hide);
4534
+ refreshContents();
4535
+ }
4536
+
4537
+ void RandomLeaves(boolean hide)
4538
+ {
4539
+ group.selection.RandomLeaves(hide);
39344540 refreshContents();
39354541 }
39364542
....@@ -4005,10 +4611,6 @@
40054611 // }
40064612 // }
40074613
4008
- static boolean allparams = true;
4009
-
4010
- static Vector<Object3D> listUI = new Vector<Object3D>();
4011
-
40124614 void EditSelection(boolean newWindow)
40134615 {
40144616 // aConstraints.gridy = 0;
....@@ -4016,10 +4618,10 @@
40164618 {
40174619 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
40184620 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4019
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4621
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40204622
40214623 Object3D elem = (Object3D)group.selection.elementAt(i);
4022
- if(elem != group)
4624
+ if(elem != group || !newWindow)
40234625 {
40244626 // if (!(elem instanceof Composite))
40254627 // newWindow = false;
....@@ -4101,7 +4703,8 @@
41014703 //new Exception().printStackTrace();
41024704
41034705 freezemodel = true;
4104
-
4706
+ ClearUnpinned();
4707
+
41054708 /**/
41064709 //switch (event.id)
41074710 {
....@@ -4109,7 +4712,6 @@
41094712 //case 702: // Event.LIST_DESELECT
41104713 group.deselectAll();
41114714 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4112
- objEditor.ClearInfo(); // .GetMaterial());
41134715 if (tps != null)
41144716 {
41154717 for (int i=0; i < tps.length; i++)
....@@ -4118,33 +4720,39 @@
41184720
41194721 //if (child.parent != null)
41204722 //child.parent.addSelectee(child);
4723
+ objEditor.SetMaterial(child);
41214724 group.addSelectee(child);
4122
- objEditor.SetMaterial(child); // .GetMaterial());
4123
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4124
- System.err.println("info : " + child.GetPath());
41254725 }
41264726 }
4127
- else
4128
- {
4129
- objEditor.SetMaterial(group); // .GetMaterial());
4130
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4131
- System.err.println("info : " + group.GetPath());
4132
- }
4727
+// else
4728
+// {
4729
+// objEditor.SetMaterial(group); // .GetMaterial());
4730
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4731
+// System.err.println("info : " + group.GetPath());
4732
+// }
41334733
4134
- objEditor.SetText(); // jan 2014
4135
-
4136
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4734
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41374735 CameraPane.flash = true;
41384736
4139
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4737
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41404738 // a camera
41414739 {
4142
- CameraPane.camerachangeframe = 0; // don't refuse it
4143
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4740
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
4741
+ {
4742
+ CameraPane.camerachangeframe = 0; // don't refuse it
4743
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4744
+ }
41444745 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41454746 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41464747 }
41474748
4749
+ if (tps != null && tps.length == 1)
4750
+ {
4751
+ EditSelection(false);
4752
+ }
4753
+
4754
+ SetPinStates(tps != null && tps.length > 0);
4755
+
41484756 refreshContents();
41494757 //return true;
41504758 }
....@@ -4153,6 +4761,35 @@
41534761
41544762 freezemodel = false;
41554763 }
4764
+
4765
+ void SetPinStates(boolean enabled)
4766
+ {
4767
+ editButton.setEnabled(enabled);
4768
+ uneditButton.setEnabled(enabled);
4769
+ unselectButton.setEnabled(enabled);
4770
+ flashSelectionButton.setEnabled(enabled);
4771
+ }
4772
+
4773
+ void refreshContents(boolean cp)
4774
+ {
4775
+ if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4776
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
4777
+ {
4778
+ objEditor.ClearInfo(); // .GetMaterial());
4779
+
4780
+ for (int i=0; i < group.selection.Size(); i++)
4781
+ {
4782
+ Object3D child = (Object3D) group.selection.get(i);
4783
+
4784
+ objEditor.AddInfo(child, this, true);
4785
+ System.err.println("info : " + child.GetPath());
4786
+ }
4787
+
4788
+ objEditor.SetText(); // jan 2014
4789
+ }
4790
+
4791
+ super.refreshContents(cp);
4792
+ }
41564793
41574794 void linkSomething(Object3D thing)
41584795 {
....@@ -4224,16 +4861,19 @@
42244861 {
42254862 if (group.selection.isEmpty())
42264863 return;
4227
- GrafreeD.clipboardIsTempGroup = false;
4864
+
4865
+ Grafreed.clipboardIsTempGroup = false;
42284866 Composite tGroup = null;
42294867 if (group.selection.size() > 0) // 1)
42304868 {
42314869 tGroup = new cGroup();
4232
- GrafreeD.clipboardIsTempGroup = true;
4870
+ Grafreed.clipboardIsTempGroup = true;
42334871 }
42344872
42354873 if (cut)
42364874 {
4875
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4876
+// Save();
42374877 //int indices[] = jList.getSelectedIndices();
42384878 //for (int i = indices.length - 1; i >= 0; i--)
42394879 //jList.remove(indices[i]);
....@@ -4269,16 +4909,16 @@
42694909 //System.out.println("cut " + child);
42704910 //System.out.println("parent = " + child.parent);
42714911 // tmp.addChild(child);
4272
- if (GrafreeD.clipboardIsTempGroup)
4912
+ if (Grafreed.clipboardIsTempGroup)
42734913 tGroup.add/*Child*/(tmp);
42744914 else
4275
- GrafreeD.clipboard = tmp;
4915
+ Grafreed.clipboard = tmp;
42764916 }
42774917 else
4278
- if (GrafreeD.clipboardIsTempGroup)
4918
+ if (Grafreed.clipboardIsTempGroup)
42794919 tGroup.add/*Child*/(child);
42804920 else
4281
- GrafreeD.clipboard = child;
4921
+ Grafreed.clipboard = child;
42824922 }
42834923
42844924 //ResetModel();
....@@ -4310,21 +4950,23 @@
43104950 //System.out.println("cut " + elem);
43114951 //System.out.println("parent = " + elem.parent);
43124952 // tmp.addChild(elem);
4313
- if (GrafreeD.clipboardIsTempGroup)
4953
+ if (Grafreed.clipboardIsTempGroup)
43144954 tGroup.add/*Child*/(tmp);
43154955 else
4316
- GrafreeD.clipboard = tmp;
4956
+ Grafreed.clipboard = tmp;
43174957 }
43184958 else
4319
- if (GrafreeD.clipboardIsTempGroup)
4959
+ if (Grafreed.clipboardIsTempGroup)
43204960 tGroup.add/*Child*/(child);
43214961 else
4322
- GrafreeD.clipboard = child;
4962
+ Grafreed.clipboard = child;
43234963 }
43244964
43254965 }
4326
- if (GrafreeD.clipboardIsTempGroup)
4327
- GrafreeD.clipboard = tGroup;
4966
+
4967
+ if (Grafreed.clipboardIsTempGroup)
4968
+ Grafreed.clipboard = tGroup;
4969
+
43284970 if (cut)
43294971 {
43304972 ResetModel();
....@@ -4334,11 +4976,15 @@
43344976
43354977 void paste(boolean expand)
43364978 {
4979
+ if (Globals.REPLACEONMAKE)
4980
+ Save();
4981
+ boolean keep = Globals.REPLACEONMAKE;
4982
+ Globals.REPLACEONMAKE = false;
43374983 // if (GrafreeD.clipboard == null)
43384984 // return;
43394985 boolean first = true;
43404986
4341
- if (GrafreeD.clipboardIsTempGroup)
4987
+ if (Grafreed.clipboardIsTempGroup)
43424988 {
43434989 Composite temp;
43444990
....@@ -4349,7 +4995,7 @@
43494995 temp = (Composite)Applet3D.clipboard.deepCopy();
43504996 */
43514997 Object3D elem;
4352
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4998
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43534999 {
43545000 Object3D child = (Object3D)e.nextElement();
43555001
....@@ -4383,21 +5029,22 @@
43835029 //Object3D cb = Applet3D.clipboard;
43845030 //temp.addChild(cb);
43855031 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4386
- assert(GrafreeD.clipboard.parent == null);
4387
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4388
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4389
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4390
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
5032
+ assert(Grafreed.clipboard.parent == null);
5033
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
5034
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
5035
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
5036
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43915037 else
4392
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4393
- GrafreeD.clipboard.get(0).parent = keepparent;
5038
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
5039
+ Grafreed.clipboard.get(0).parent = keepparent;
43945040 }
43955041
5042
+ Globals.REPLACEONMAKE = keep;
43965043 ResetModel();
43975044 refreshContents();
43985045 }
43995046
4400
- void pasteInto(boolean copyit)
5047
+ void pasteInto(boolean copyit, boolean clone)
44015048 {
44025049 // if (GrafreeD.clipboard == null)
44035050 // return;
....@@ -4426,15 +5073,22 @@
44265073 if (copyit)
44275074 {
44285075 // paste(false);
4429
- CloneClipboard(false); // sept 2014
5076
+ if (clone)
5077
+ {
5078
+ CloneClipboard(false); // sept 2014
5079
+ }
5080
+ else
5081
+ {
5082
+ paste(false);
5083
+ }
44305084 }
44315085 else
44325086 {
44335087 boolean first = true;
44345088
4435
- if (GrafreeD.clipboardIsTempGroup)
5089
+ if (Grafreed.clipboardIsTempGroup)
44365090 {
4437
- Composite temp = (Composite)GrafreeD.clipboard;
5091
+ Composite temp = (Composite)Grafreed.clipboard;
44385092 Object3D copy;
44395093 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44405094 {
....@@ -4444,7 +5098,7 @@
44445098 }
44455099 } else
44465100 {
4447
- linkSomething(GrafreeD.clipboard); //.get(0));
5101
+ linkSomething(Grafreed.clipboard); //.get(0));
44485102 }
44495103 }
44505104 }
....@@ -4521,6 +5175,10 @@
45215175
45225176 void group(Object3D csg, boolean grab)
45235177 {
5178
+ if (Globals.REPLACEONMAKE)
5179
+ Save();
5180
+ boolean keep = Globals.REPLACEONMAKE;
5181
+ Globals.REPLACEONMAKE = false;
45245182 if (//false) // why??
45255183 !group.selection.isEmpty())
45265184 {
....@@ -4634,10 +5292,15 @@
46345292 //node.add(csg);
46355293 //makeSomething(node);
46365294 makeSomething(csg);
5295
+ Globals.REPLACEONMAKE = keep;
46375296 }
46385297
46395298 void Ungroup(Object3D g)
46405299 {
5300
+ if (Globals.REPLACEONMAKE)
5301
+ Save();
5302
+ boolean keep = Globals.REPLACEONMAKE;
5303
+ Globals.REPLACEONMAKE = false;
46415304 if (g instanceof HiddenObject)
46425305 {
46435306 HiddenObject h = (HiddenObject) g;
....@@ -4654,6 +5317,7 @@
46545317 objEditor.makeSomething(g.get(i), false);
46555318 }
46565319 }
5320
+ Globals.REPLACEONMAKE = keep;
46575321 }
46585322
46595323 void ungroup()
....@@ -4849,21 +5513,6 @@
48495513 }
48505514 */
48515515
4852
- void ImportGFD()
4853
- {
4854
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4855
- browser.show();
4856
- String filename = browser.getFile();
4857
- if (filename != null && filename.length() > 0)
4858
- {
4859
- String fullname = browser.getDirectory() + filename;
4860
-
4861
- //Object3D readobj =
4862
- objEditor.ReadGFD(fullname, objEditor);
4863
- //makeSomething(readobj);
4864
- }
4865
- }
4866
-
48675516 /*
48685517 public void Callback(Object obj)
48695518 {
....@@ -4887,26 +5536,9 @@
48875536 }
48885537 */
48895538
4890
- void ImportVRMLX3D()
4891
- {
4892
- if (GrafreeD.standAlone)
4893
- {
4894
- /**/
4895
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4896
- browser.show();
4897
- String filename = browser.getFile();
4898
- if (filename != null && filename.length() > 0)
4899
- {
4900
- String fullname = browser.getDirectory() + filename;
4901
- LoadVRMLX3D(fullname);
4902
- }
4903
- /**/
4904
- }
4905
- }
4906
-
49075539 String GetFile(String dialogName)
49085540 {
4909
- if (GrafreeD.standAlone)
5541
+ if (Grafreed.standAlone)
49105542 {
49115543 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49125544 browser.show();
....@@ -4970,10 +5602,33 @@
49705602 cButton flashSelectionButton;
49715603 cButton editButton;
49725604 cButton uneditButton;
5605
+ JCheckBox allParamsButton;
49735606 cButton clearpanelButton;
4974
- cButton allParamsButton;
49755607 cButton unselectButton;
49765608
5609
+ cButton restoreCameraButton;
5610
+
5611
+ cButton saveButton;
5612
+ cButton oneStepButton;
5613
+
5614
+ cButton groupButton;
5615
+ cButton ungroupButton;
5616
+ cButton compositeButton;
5617
+ cButton switchButton;
5618
+ cButton loopButton;
5619
+ cButton textureButton;
5620
+
5621
+ cButton gridButton;
5622
+ cButton boxButton;
5623
+ cButton sphereButton;
5624
+ cButton coneButton;
5625
+ cButton torusButton;
5626
+ cButton superButton;
5627
+ cButton kleinButton;
5628
+ cButton particlesButton;
5629
+ cButton overlayButton;
5630
+ cButton lightButton;
5631
+
49775632 cButton screenfitButton;
49785633 cButton screenfitpointButton;
49795634 cButton snapobjectButton;
....@@ -4985,14 +5640,6 @@
49855640
49865641 cButton setsupportButton;
49875642
4988
- cButton twoButton;
4989
- cButton sixButton;
4990
- cButton threeButton;
4991
- cButton sevenButton;
4992
- cButton fourButton; // full panel
4993
- cButton oneButton; // full XYZ
4994
- //cButton currentLayout;
4995
-
49965643 //
49975644 //Composite
49985645 Object3D // to do !!
....@@ -5002,9 +5649,11 @@
50025649 //JTree jTree;
50035650 private MenuItem lookAtItem;
50045651 private MenuItem lookFromItem;
5005
- private MenuItem switchItem;
5652
+ private MenuItem switchViewItem;
50065653 private MenuItem cutItem;
5007
- private MenuItem duplicateItem;
5654
+ private MenuItem undoItem;
5655
+ private MenuItem redoItem;
5656
+ private JMenuItem duplicateItem;
50085657 private MenuItem cloneItem;
50095658 private MenuItem cloneSupportItem;
50105659 private MenuItem overwriteGeoItem;
....@@ -5017,7 +5666,7 @@
50175666 private MenuItem linkverticesItem;
50185667 private MenuItem relinkverticesItem;
50195668 private MenuItem setMasterItem;
5020
- private MenuItem resetMeshItem;
5669
+ private MenuItem resetAllItem;
50215670 private MenuItem stepAllItem;
50225671 private MenuItem revertMeshItem;
50235672 private MenuItem poseMeshItem;
....@@ -5028,6 +5677,7 @@
50285677 private MenuItem mergeGeometriesItem;
50295678 private MenuItem copyItem;
50305679 private MenuItem pasteItem;
5680
+ private MenuItem pasteIntoItem;
50315681 private MenuItem pasteLinkItem;
50325682 private MenuItem pasteCloneItem;
50335683 private MenuItem pasteExpandItem;
....@@ -5066,6 +5716,10 @@
50665716 private MenuItem showleavesItem;
50675717 private MenuItem markleavesItem;
50685718 private MenuItem unmarkleavesItem;
5719
+ private MenuItem rewindleavesItem;
5720
+ private MenuItem unrewindleavesItem;
5721
+ private MenuItem randomleavesItem;
5722
+ private MenuItem unrandomleavesItem;
50695723
50705724 private MenuItem flipVItem;
50715725 private MenuItem unflipVItem;
....@@ -5077,15 +5731,17 @@
50775731 private MenuItem panoTexturesItem;
50785732
50795733 private MenuItem resetCentroidItem;
5080
- private MenuItem transformgeometryItem;
5734
+ private MenuItem resetCentroidXZItem;
50815735 private MenuItem resetTransformItem;
5736
+ private MenuItem transformGeometryItem;
5737
+ private MenuItem transformChildrenItem;
50825738 private MenuItem hideItem;
50835739 private MenuItem grabItem;
50845740 private MenuItem backItem;
50855741 private MenuItem frontItem;
50865742 private MenuItem cameraItem;
50875743 private MenuItem compositeItem;
5088
- private MenuItem randomItem;
5744
+ private MenuItem switchItem;
50895745 private MenuItem physicsItem;
50905746 private MenuItem frameselectorItem;
50915747 private MenuItem scriptNodeItem;
....@@ -5125,7 +5781,7 @@
51255781 private MenuItem blobItem;
51265782 private MenuItem latheItem;
51275783 private MenuItem bezierItem;
5128
- private MenuItem checkerItem;
5784
+ private MenuItem overlayItem;
51295785 private MenuItem meshItem;
51305786 // private MenuItem meshGroupItem;
51315787 private MenuItem springItem;
....@@ -5147,11 +5803,6 @@
51475803 private MenuItem doubleItem;
51485804 private MenuItem tripleItem;
51495805
5150
- private MenuItem importGFDItem;
5151
- private MenuItem importVRMLX3DItem;
5152
- private MenuItem import3DSItem;
5153
- private MenuItem importOBJItem;
5154
-
51555806 private MenuItem computeAOItem;
51565807 private MenuItem recompileItem;
51575808 private MenuItem editScriptItem;
....@@ -5161,4 +5812,8 @@
51615812 private MenuItem analyzeItem;
51625813 private MenuItem dumpItem;
51635814 //boolean freezemodel = false;
5815
+
5816
+ Menu cameraMenu;
5817
+ MenuItem editCameraItem;
5818
+ MenuItem restoreCameraItem;
51645819 }