Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
GroupEditor.java
....@@ -60,6 +60,12 @@
6060 this.copy = this.group = group;
6161 //selectees = this.group.selectees;
6262
63
+ if (copy.versions == null)
64
+ {
65
+ copy.versions = new byte[100][];
66
+ copy.versionindex = -1;
67
+ }
68
+
6369 if(ui)
6470 SetupUI(objEditor);
6571 }
....@@ -74,16 +80,28 @@
7480 this.copy = this.group = copy;
7581 //selectees = this.group.selectees;
7682
77
- SetupMenu2(objEditor);
83
+ SetupMenu2(this); //objEditor);
7884 SetupUI2(objEditor);
7985 objEditor.SetupUI(true);
8086 SetupViews(objEditor);
8187
8288 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
89
+
90
+ if (copy.versions == null)
91
+ {
92
+ copy.versions = new byte[100][];
93
+ copy.versionindex = -1;
94
+
95
+ Save(true);
96
+ }
8397 }
8498
8599 void CloneSelection(boolean supports)
86100 {
101
+ if (Globals.REPLACEONMAKE)
102
+ Save();
103
+ boolean keep = Globals.REPLACEONMAKE;
104
+ Globals.REPLACEONMAKE = false;
87105 // Object3D keep = GrafreeD.clipboard;
88106 //Object3D obj;
89107 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,18 +112,19 @@
94112
95113 makeSomething(clone, i==group.selection.size()-1);
96114 }
115
+ Globals.REPLACEONMAKE = keep;
97116 }
98117
99118 void CloneClipboard(boolean supports)
100119 {
101
- assert(GrafreeD.clipboard.parent == null);
102
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
103
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
104
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
105
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
120
+ assert(Grafreed.clipboard.parent == null);
121
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
122
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
123
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
124
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
106125 else
107
- makeSomething(CloneObject(GrafreeD.clipboard, false));
108
- GrafreeD.clipboard.get(0).parent = keepparent;
126
+ makeSomething(CloneObject(Grafreed.clipboard, false));
127
+ Grafreed.clipboard.get(0).parent = keepparent;
109128 }
110129
111130 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -119,7 +138,7 @@
119138 // obj.support = null;
120139 if (!supports)
121140 obj.SaveSupports();
122
- Object3D clone = (Object3D)GrafreeD.clone(obj);
141
+ Object3D clone = (Object3D)Grafreed.clone(obj);
123142 obj.parent = parent;
124143 // obj.support = support;
125144 // clone.support = support; // aout 2013
....@@ -148,30 +167,29 @@
148167
149168 //JTextField nameField;
150169
151
- void SetupMenu2(ObjEditor oe)
170
+ void SetupMenu2(GroupEditor oe)
152171 {
153
- oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
154
- //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
155
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
156
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
157
- oe.cameraMenu.add("-");
158
- openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
159
- openWindowItem.addActionListener(this);
160
- editLeafItem.addActionListener(this);
161
- lookAtItem.addActionListener(this);
162
- //lookFromItem.addActinoListener(this);
163
- //switchItem.addActionListener(this);
172
+ oe.jTree = new cTree();
173
+
164174 Menu menu;
165175 oe.menuBar.add(menu = new Menu("Edit"));
166176 //editItem = menu.add(new MenuItem("Edit"));
167177 //editItem.addActionListener(this);
168
- duplicateItem = menu.add(new MenuItem("Duplicate"));
178
+
179
+// undoItem = menu.add(new MenuItem("Undo"));
180
+// undoItem.addActionListener(this);
181
+// redoItem = menu.add(new MenuItem("Redo"));
182
+// redoItem.addActionListener(this);
183
+// menu.add("-");
184
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
169185 duplicateItem.addActionListener(this);
170
- menu.add("-");
171186 cloneItem = menu.add(new MenuItem("Clone"));
172187 cloneItem.addActionListener(this);
188
+ if (Globals.ADVANCED)
189
+ {
173190 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
174191 cloneSupportItem.addActionListener(this);
192
+ }
175193 menu.add("-");
176194 cutItem = menu.add(new MenuItem("Cut"));
177195 cutItem.addActionListener(this);
....@@ -179,27 +197,123 @@
179197 copyItem.addActionListener(this);
180198 pasteItem = menu.add(new MenuItem("Paste"));
181199 pasteItem.addActionListener(this);
200
+
201
+ menu.add("-");
202
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
203
+ pasteIntoItem.addActionListener(this);
182204 pasteLinkItem = menu.add(new MenuItem("Paste link"));
183205 pasteLinkItem.addActionListener(this);
184206 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
185207 pasteCloneItem.addActionListener(this);
186208 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
187209 // pasteExpandItem.addActionListener(this);
188
- clearItem = menu.add(new MenuItem("Clear"));
189
- clearItem.addActionListener(this);
210
+ menu.add("-");
211
+ deleteItem = menu.add(new MenuItem("Delete"));
212
+ deleteItem.addActionListener(this);
213
+
214
+ if (Globals.ADVANCED)
215
+ {
216
+ // Deletes the cameras...
190217 clearAllItem = menu.add(new MenuItem("Clear All"));
191218 clearAllItem.addActionListener(this);
219
+ }
220
+
221
+ menuBar.add(cameraMenu = new Menu("View"));
222
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
223
+ //zBufferItem.addActionListener(this);
224
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
225
+ //normalLensItem.addActionListener(this);
226
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
227
+ restoreCameraItem.addActionListener(this);
228
+
229
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
230
+// toggleFullScreenItem.addItemListener(this);
231
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
232
+// cameraMenu.add("-");
233
+//
234
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
235
+// toggleTextureItem.addItemListener(this);
236
+// toggleTextureItem.setState(CameraPane.textureon);
237
+//
238
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
239
+// toggleSwitchItem.addItemListener(this);
240
+// toggleSwitchItem.setState(CameraPane.SWITCH);
241
+
242
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
243
+ toggleHandleItem.addItemListener(this);
244
+ toggleHandleItem.setState(CameraPane.HANDLES);
245
+
246
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
247
+ togglePaintItem.addItemListener(this);
248
+ togglePaintItem.setState(CameraPane.PAINTMODE);
249
+
250
+ if (Globals.ADVANCED)
251
+ {
252
+ cameraMenu.add("-");
253
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
254
+ toggleLiveItem.addItemListener(this);
255
+ toggleLiveItem.setState(Globals.isLIVE());
192256
257
+ cameraMenu.add(stepItem = new MenuItem("Step"));
258
+ stepItem.addActionListener(this);
259
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
260
+ // toggleDLItem.addItemListener(this);
261
+ // toggleDLItem.setState(false);
262
+
263
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
264
+ toggleRenderItem.addItemListener(this);
265
+ toggleRenderItem.setState(!CameraPane.frozen);
266
+
267
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
268
+ toggleDebugItem.addItemListener(this);
269
+ toggleDebugItem.setState(Globals.DEBUG);
270
+
271
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
272
+ toggleFrustumItem.addItemListener(this);
273
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
274
+
275
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
276
+ toggleFootContactItem.addItemListener(this);
277
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
278
+
279
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
280
+ toggleTimelineItem.addItemListener(this);
281
+ }
282
+
283
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
284
+// toggleRootItem.addItemListener(this);
285
+// toggleRootItem.setState(false);
286
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
287
+// animationItem.addItemListener(this);
288
+// animationItem.setState(CameraPane.ANIMATION);
289
+ cameraMenu.add("-");
290
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
291
+ editCameraItem.addActionListener(this);
292
+
293
+ if (Globals.ADVANCED)
294
+ {
295
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
296
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
297
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
298
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
299
+ oe.cameraMenu.add("-");
300
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
301
+ openWindowItem.addActionListener(this);
302
+ editLeafItem.addActionListener(this);
303
+ lookAtItem.addActionListener(this);
304
+ //lookFromItem.addActinoListener(this);
305
+ //switchViewItem.addActionListener(this);
306
+ }
307
+
193308 oe.menuBar.add(menu = new Menu("Setting"));
194
- resetMeshItem = menu.add(new MenuItem("Reset All"));
195
- resetMeshItem.addActionListener(this);
196
- stepAllItem = menu.add(new MenuItem("Step All"));
197
- stepAllItem.addActionListener(this);
309
+ if (Globals.ADVANCED)
310
+ {
198311 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
199312 revertMeshItem.addActionListener(this);
200313 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201314 resetreferencesItem.addActionListener(this);
202315 menu.add("-");
316
+ }
203317 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204318 overwriteGeoItem.addActionListener(this);
205319 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,79 +325,104 @@
211325 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212326 overwriteUVItem.addActionListener(this);
213327 menu.add("-");
328
+ if (Globals.ADVANCED)
329
+ {
214330 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215331 generateMeshItem.addActionListener(this);
216332 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217333 poseMeshItem.addActionListener(this);
218334 menu.add("-");
335
+ }
219336 resetsupportItem = menu.add(new MenuItem("Reset support"));
220337 resetsupportItem.addActionListener(this);
221338 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222339 linkverticesItem.addActionListener(this);
223340 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224341 relinkverticesItem.addActionListener(this);
342
+
343
+ if (Globals.ADVANCED)
344
+ {
225345 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226346 setMasterItem.addActionListener(this);
347
+ }
227348
228349 oe.menuBar.add(menu = new Menu("Group"));
229
- grabItem = menu.add(new MenuItem("Grab"));
230
- grabItem.addActionListener(this);
350
+// grabItem = menu.add(new MenuItem("Grab"));
351
+// grabItem.addActionListener(this);
231352 backItem = menu.add(new MenuItem("Back"));
232353 backItem.addActionListener(this);
233354 frontItem = menu.add(new MenuItem("Front"));
234355 frontItem.addActionListener(this);
235
- compositeItem = menu.add(new MenuItem("Composite"));
236
- compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
356
+// compositeItem = menu.add(new MenuItem("Composite"));
357
+// compositeItem.addActionListener(this);
358
+
359
+ if (Globals.ADVANCED)
360
+ {
361
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238362 hideItem.addActionListener(this);
363
+ }
239364 ungroupItem = menu.add(new MenuItem("Ungroup"));
240365 ungroupItem.addActionListener(this);
241
- menu.add("-");
242
- randomItem = menu.add(new MenuItem("Switch node"));
243
- randomItem.addActionListener(this);
366
+
367
+// menu.add("-");
368
+//
369
+// switchItem = menu.add(new MenuItem("Switch node"));
370
+// switchItem.addActionListener(this);
371
+ if (Globals.ADVANCED)
372
+ {
244373 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
245374 switchGeoItem.addActionListener(this);
246375 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
247376 switchTransfoItem.addActionListener(this);
377
+ morphItem = menu.add(new MenuItem("Morph Group"));
378
+ morphItem.addActionListener(this);
379
+
380
+ menu.add("-");
248381 physicsItem = menu.add(new MenuItem("Physics"));
249382 physicsItem.addActionListener(this);
250383 frameselectorItem = menu.add(new MenuItem("Frame Selector"));
251384 frameselectorItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
253
- morphItem.addActionListener(this);
254385 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255386 scriptNodeItem.addActionListener(this);
256
- cameraItem = menu.add(new MenuItem("Camera"));
257
- cameraItem.addActionListener(this);
387
+ }
258388
259389 oe.menuBar.add(menu = new Menu("Object"));
260
- textureItem = menu.add(new MenuItem("Texture"));
261
- textureItem.addActionListener(this);
390
+// textureItem = menu.add(new MenuItem("Texture"));
391
+// textureItem.addActionListener(this);
262392 billboardItem = menu.add(new MenuItem("Billboard"));
263393 billboardItem.addActionListener(this);
264394 csgItem = menu.add(new MenuItem("CSG"));
265395 csgItem.addActionListener(this);
266
- shadowXItem = menu.add(new MenuItem("Shadow X"));
396
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
267397 shadowXItem.addActionListener(this);
268
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
398
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
269399 shadowYItem.addActionListener(this);
270
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
400
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
271401 shadowZItem.addActionListener(this);
402
+ attributeItem = menu.add(new MenuItem("Attribute"));
403
+ attributeItem.addActionListener(this);
404
+
405
+ if (Globals.ADVANCED)
406
+ {
407
+ menu.add("-");
272408 linkerItem = menu.add(new MenuItem("Linker"));
273409 linkerItem.addActionListener(this);
274410 templateItem = menu.add(new MenuItem("Template"));
275411 templateItem.addActionListener(this);
276
- attributeItem = menu.add(new MenuItem("Attribute"));
277
- attributeItem.addActionListener(this);
278412 pointflowItem = menu.add(new MenuItem("Point Flow"));
279413 pointflowItem.addActionListener(this);
414
+ }
280415 menu.add("-");
281416 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282417 resetTransformItem.addActionListener(this);
283418 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
284419 resetCentroidItem.addActionListener(this);
285
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
286
- transformgeometryItem.addActionListener(this);
420
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
421
+ resetCentroidXZItem.addActionListener(this);
422
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
423
+ transformGeometryItem.addActionListener(this);
424
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
425
+ transformChildrenItem.addActionListener(this);
287426
288427 oe.menuBar.add(menu = new Menu("Geometry"));
289428 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -294,8 +433,11 @@
294433 genNormalsCADItem.addActionListener(this);
295434 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296435 genNormalsMESHItem.addActionListener(this);
297
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
436
+ if (Globals.ADVANCED)
437
+ {
438
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
298439 genNormalsMINEItem.addActionListener(this);
440
+ }
299441 stripifyItem = menu.add(new MenuItem("Stripify"));
300442 stripifyItem.addActionListener(this);
301443 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,23 +459,34 @@
317459 reduce34MeshItem.addActionListener(this);
318460 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319461 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322462 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323463 clipMeshItem.addActionListener(this);
464
+
465
+ if (Globals.ADVANCED)
466
+ {
467
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
468
+ smoothMeshItem.addActionListener(this);
469
+ }
324470
325471 oe.menuBar.add(menu = new Menu("Attributes"));
326472 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
327473 clearMaterialsItem.addActionListener(this);
474
+ resetAllItem = menu.add(new MenuItem("Reset All"));
475
+ resetAllItem.addActionListener(this);
476
+ stepAllItem = menu.add(new MenuItem("Step All"));
477
+ stepAllItem.addActionListener(this);
328478 menu.add("-");
329479 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
330480 liveleavesItem.addActionListener(this);
331481 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332482 unliveleavesItem.addActionListener(this);
483
+ if (Globals.ADVANCED)
484
+ {
333485 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334486 supportleavesItem.addActionListener(this);
335487 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336488 unsupportleavesItem.addActionListener(this);
489
+ }
337490 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338491 hideleavesItem.addActionListener(this);
339492 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -342,6 +495,14 @@
342495 markleavesItem.addActionListener(this);
343496 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
344497 unmarkleavesItem.addActionListener(this);
498
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
499
+ rewindleavesItem.addActionListener(this);
500
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
501
+ unrewindleavesItem.addActionListener(this);
502
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
503
+ randomleavesItem.addActionListener(this);
504
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
505
+ unrandomleavesItem.addActionListener(this);
345506 menu.add("-");
346507 flipVItem = menu.add(new MenuItem("Flip V"));
347508 flipVItem.addActionListener(this);
....@@ -367,45 +528,56 @@
367528 attachBumpItem.addActionListener(this);
368529 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
369530 pigmentBumpItem.addActionListener(this);
531
+ //embedTexturesItem
370532 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
371533 detachPigmentItem.addActionListener(this);
372534 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
373535 detachBumpItem.addActionListener(this);
536
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
537
+ embedTexturesItem.addActionListener(this);
538
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
539
+ deEmbedTexturesItem.addActionListener(this);
374540 menu.add("-");
375541 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
376542 sortbysizeItem.addActionListener(this);
377543 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378544 sortbynameItem.addActionListener(this);
379545 menu.add("-");
546
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
547
+ shareGeometriesItem.addActionListener(this);
548
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
549
+ mergeGeometriesItem.addActionListener(this);
550
+ if (Globals.ADVANCED)
551
+ {
552
+ // Pretty much the same as duplicate and clone.
380553 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381554 extractGeometriesItem.addActionListener(this);
382555 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
383556 cloneGeometriesItem.addActionListener(this);
384
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
385
- shareGeometriesItem.addActionListener(this);
386
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387
- mergeGeometriesItem.addActionListener(this);
557
+ }
388558
389559 oe.menuBar.add(menu = new Menu("Insert"));
390560 buildCreateMenu(menu);
391561
392
-
393
- oe.menuBar.add(menu = new Menu("Include"));
394
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
395
- importGFDItem.addActionListener(this);
396
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
397
- importVRMLX3DItem.addActionListener(this);
398
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
399
- importOBJItem.addActionListener(this);
400
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
401
- import3DSItem.addActionListener(this);
402
-
403562 oe.menuBar.add(menu = new Menu("Tools"));
404563 buildToolsMenu(menu);
405564 }
406565
566
+
407567 void SetupUI2(ObjEditor oe)
408568 {
569
+ // June 2019
570
+ if (oe == null)
571
+ {
572
+ //super.SetupUI2(this);
573
+ //return;
574
+ }
575
+
576
+ if (copy != group)
577
+ {
578
+ //super.SetupUI2(this);
579
+ }
580
+
409581 //new Exception().printStackTrace();
410582
411583 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -434,93 +606,230 @@
434606 oe.radioPanel.add(dummyButton);
435607 oe.buttonGroup.add(dummyButton);
436608 */
609
+ cGridBag copyOptionsPanel = new cGridBag();
610
+
611
+ copyOptionsPanel.preferredHeight = 1;
612
+
437613 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438614
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440
- liveCB.setToolTipText("Enabled animation");
615
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
+ //minButton.setToolTipText("Minimize window");
617
+ //minButton.addActionListener(this);
618
+
619
+ if (Globals.ADVANCED)
620
+ {
621
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
622
+ maxButton.setToolTipText("Maximize window");
623
+ maxButton.addActionListener(this);
624
+ }
625
+
626
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
627
+ fullButton.setToolTipText("Full-screen window");
628
+ fullButton.addActionListener(this);
629
+
630
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
631
+ screenfitButton.setToolTipText("Screen fit");
632
+ screenfitButton.addActionListener(this);
633
+
634
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
635
+ restoreCameraButton.setToolTipText("Restore viewpoint");
636
+ restoreCameraButton.addActionListener(this);
637
+
638
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ saveButton.setToolTipText("New version");
640
+ saveButton.addActionListener(this);
641
+
642
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
643
+ undoButton.setToolTipText("Previous version");
644
+ undoButton.addActionListener(this);
645
+ undoButton.setEnabled(false);
646
+
647
+ cGridBag updown = new cGridBag().setVertical(true);
648
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
649
+ restoreButton.setToolTipText("Restore current");
650
+ restoreButton.addActionListener(this);
651
+ restoreButton.setEnabled(false);
652
+
653
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
+ replaceButton.setToolTipText("Replace current");
655
+ replaceButton.addActionListener(this);
656
+ replaceButton.setEnabled(false);
657
+
658
+ copyOptionsPanel.add(updown);
659
+
660
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
661
+ redoButton.setToolTipText("Next version");
662
+ redoButton.addActionListener(this);
663
+ redoButton.setEnabled(false);
664
+
665
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
666
+ liveCB.setToolTipText("Enable animation");
441667 liveCB.addItemListener(this);
442668
443
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
669
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ oneStepButton.setToolTipText("Animate one step forward");
671
+ oneStepButton.addActionListener(this);
672
+
673
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
444674 fastCB.setToolTipText("Fast mode");
445675 fastCB.addItemListener(this);
446676
447
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
448
- trackCB.setToolTipText("Enable tracking");
449
- trackCB.addItemListener(this);
450
-
451
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
452
- screenfitButton.setToolTipText("Screen fit");
453
- screenfitButton.addActionListener(this);
677
+ //oe.toolboxPanel.Return();
678
+
679
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
680
+// trackCB.setToolTipText("Enable tracking");
681
+// trackCB.addItemListener(this);
454682
455683 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
456684 // screenfitpointButton.addActionListener(this);
457685
458686 if (Globals.ADVANCED)
459687 {
460
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
688
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
461689 snapobjectButton.addActionListener(this);
462690 snapobjectButton.setToolTipText("Snap Object");
691
+
692
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
693
+ fourButton.addActionListener(this);
694
+ fourButton.setToolTipText("Show control panel only");
463695 }
464696
465
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
466
- flashSelectionButton.setToolTipText("Show selection");
467
- flashSelectionButton.addActionListener(this);
697
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
468698
469
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
470
-
471
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
472
- twoButton.setToolTipText("Show center view only");
699
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
700
+ twoButton.setToolTipText("Show 3D view only");
473701 twoButton.addActionListener(this);
474
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
475
- fourButton.addActionListener(this);
476
- fourButton.setToolTipText("Show left panel only");
477
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
478
- sixButton.setToolTipText("2-column layout left");
479
- sixButton.addActionListener(this);
480
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
481
- threeButton.setToolTipText("2-column layout right");
702
+ this.fullscreenLayout = twoButton;
703
+
704
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
705
+ threeButton.setToolTipText("Show controls and 3D view");
482706 threeButton.addActionListener(this);
483
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
484
- sevenButton.setToolTipText("3-column layout");
485
- sevenButton.addActionListener(this);
707
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
708
+ sixButton.setToolTipText("Show 3D view and controls");
709
+ sixButton.addActionListener(this);
710
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
711
+// sevenButton.setToolTipText("3-column layout");
712
+// sevenButton.addActionListener(this);
486713 //
487714
488
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489
- rootButton.setToolTipText("Edit selection in new tab");
715
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
716
+ rootButton.setToolTipText("Open selection in new tab");
490717 rootButton.addActionListener(this);
491718
492
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
719
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
493720 closeButton.setToolTipText("Close tab");
494721 closeButton.addActionListener(this);
495722 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
496723 //clearButton.addActionListener(this);
497
-
498
- cGridBag commandsPanel = new cGridBag();
724
+
725
+ // INSERT
726
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
727
+ gridButton.setToolTipText("Create grid");
728
+ gridButton.addActionListener(this);
729
+
730
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
731
+ boxButton.setToolTipText("Create box");
732
+ boxButton.addActionListener(this);
733
+
734
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
735
+ sphereButton.setToolTipText("Create sphere");
736
+ sphereButton.addActionListener(this);
737
+
738
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
739
+ coneButton.setToolTipText("Create cone");
740
+ coneButton.addActionListener(this);
741
+
742
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
743
+ torusButton.setToolTipText("Create torus");
744
+ torusButton.addActionListener(this);
745
+
746
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
747
+ superButton.setToolTipText("Create superellipsoid");
748
+ superButton.addActionListener(this);
749
+
750
+ if (Globals.ADVANCED)
751
+ {
752
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
753
+ kleinButton.setToolTipText("Create Klein bottle");
754
+ kleinButton.addActionListener(this);
755
+ }
499756
500
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
501
- editButton.setToolTipText("Edit selection");
757
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
758
+ particlesButton.setToolTipText("Create particle system");
759
+ particlesButton.addActionListener(this);
760
+
761
+ oe.toolboxPanel.Return();
762
+
763
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
764
+ groupButton.setToolTipText("Create group");
765
+ groupButton.addActionListener(this);
766
+
767
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
768
+ compositeButton.setToolTipText("Create composite");
769
+ compositeButton.addActionListener(this);
770
+
771
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
772
+ switchButton.setToolTipText("Create item switcher");
773
+ switchButton.addActionListener(this);
774
+
775
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
776
+ loopButton.setToolTipText("Create loop");
777
+ loopButton.addActionListener(this);
778
+
779
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
780
+ textureButton.setToolTipText("Create texture");
781
+ textureButton.addActionListener(this);
782
+
783
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
784
+ overlayButton.setToolTipText("Create overlay");
785
+ overlayButton.addActionListener(this);
786
+
787
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
788
+ lightButton.setToolTipText("Create light");
789
+ lightButton.addActionListener(this);
790
+
791
+ for (int i=6; --i>=0;)
792
+ {
793
+ oe.toolboxPanel.Return();
794
+ oe.toolboxPanel.add(new cGridBag());
795
+ oe.toolboxPanel.add(new cGridBag());
796
+ oe.toolboxPanel.add(new cGridBag());
797
+ oe.toolboxPanel.add(new cGridBag());
798
+ oe.toolboxPanel.add(new cGridBag());
799
+ oe.toolboxPanel.add(new cGridBag());
800
+ oe.toolboxPanel.add(new cGridBag());
801
+ }
802
+
803
+ // EDIT panel
804
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
805
+ editButton.setToolTipText("Pin selection controls");
502806 editButton.addActionListener(this);
503807
504
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
505
- uneditButton.setToolTipText("Unedit selection");
808
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
809
+ uneditButton.setToolTipText("Remove selection controls");
506810 uneditButton.addActionListener(this);
507811
508
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
812
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
813
+ allParamsButton.setToolTipText("Show all controle");
814
+ allParamsButton.addActionListener(this);
815
+
816
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
509817 clearPanelButton.setToolTipText("Clear edit panel");
510818 clearPanelButton.addActionListener(this);
511819
512
- commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
- allParamsButton.setToolTipText("All params??");
514
- allParamsButton.addActionListener(this);
515
-
516
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
820
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
517821 unselectButton.setToolTipText("Unselect");
518822 unselectButton.addActionListener(this);
519823
520
- commandsPanel.preferredHeight = 1;
824
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
825
+ flashSelectionButton.setToolTipText("Highlight selection");
826
+ flashSelectionButton.addActionListener(this);
521827
522
- oe.treePanel.add(commandsPanel);
523
- oe.treePanel.Return();
828
+ editCommandsPanel.preferredHeight = 1;
829
+
830
+ SetPinStates(false);
831
+// oe.treePanel.add(commandsPanel);
832
+// oe.treePanel.Return();
524833
525834 // oe.aConstraints.gridx += 1;
526835 // oe.aConstraints.weighty = 0;
....@@ -537,29 +846,17 @@
537846
538847 JScrollPane jSP;
539848 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
540
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
849
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
541850 ResetModel();
542851
543852 oe.treePanel.add(jSPPanel);
544853 oe.treePanel.Return();
545854
546
- cGridBag copyOptionsPanel = new cGridBag();
547
-
548
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
549
- colorCB.setToolTipText("Copy color when dropped");
550
- colorCB.addItemListener(this);
551
-
552
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
553
- materialCB.setToolTipText("Copy material when dropped");
554
- materialCB.addItemListener(this);
555
-
556
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
557
- textureCB.setToolTipText("Copy texture when dropped");
558
- textureCB.addItemListener(this);
559
-
560
- copyOptionsPanel.preferredHeight = 1;
561855 oe.treePanel.add(copyOptionsPanel);
562856 oe.treePanel.Return();
857
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
858
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
859
+ sliderPane.preferredHeight = 1;
563860
564861 // mainPanel.setDividerLocation(0.5); //1.0);
565862 // mainPanel.setResizeWeight(0.5);
....@@ -582,19 +879,49 @@
582879 dgr.addDragGestureListener(this);
583880 }catch(Exception e) {}
584881 */
585
- radio.layout = sevenButton;
882
+ radio.layout = sixButton; // sevenButton;
586883 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
587884 }
588885
589886 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
590887 {
591
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
592
- supportCB.setToolTipText("Enabled rigging");
593
- supportCB.addItemListener(this);
888
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
889
+ colorCB.setToolTipText("Copy color when dropped");
890
+ colorCB.addItemListener(this);
891
+
892
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
893
+ materialCB.setToolTipText("Copy material when dropped");
894
+ materialCB.addItemListener(this);
895
+
896
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
897
+ textureCB.setToolTipText("Copy texture when dropped");
898
+ textureCB.addItemListener(this);
899
+
900
+ panel.Return();
901
+
902
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
903
+ boxCB.setToolTipText("Display bounding boxes");
904
+ boxCB.addItemListener(this);
905
+
906
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
907
+ zoomBoxCB.setToolTipText("Display only for wheel");
908
+ zoomBoxCB.addItemListener(this);
909
+
910
+ if (true) // Globals.ADVANCED)
911
+ {
912
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
913
+// supportCB.setToolTipText("Enable rigging");
914
+// supportCB.addItemListener(this);
915
+
916
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
917
+ freezeCB.setToolTipText("Fast moving camera");
918
+ freezeCB.addItemListener(this);
594919
595920 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
596921 // localCB.addItemListener(this);
597922
923
+ panel.Return();
924
+
598925 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
599926 crowdCB.setToolTipText("Used for crowds");
600927 crowdCB.addItemListener(this);
....@@ -607,18 +934,12 @@
607934 slowCB.setToolTipText("Smooth interpolation");
608935 slowCB.addItemListener(this);
609936
610
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
611
- boxCB.setToolTipText("Display bounding boxes");
612
- boxCB.addItemListener(this);
613
-
614
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
615
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
616
- zoomBoxCB.addItemListener(this);
617
-
618937 // constraints.gridy += 1;
619938 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
620939 // speakerMocapCB.addItemListener(this);
621940
941
+ panel.Return();
942
+
622943 if (false)
623944 {
624945 // handled in scripts
....@@ -633,40 +954,85 @@
633954 //constraints.gridy += 1;
634955 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
635956 smoothfocusCB.addItemListener(this);
957
+ panel.Return();
636958 }
637959
638960 //constraints.gridx += 1;
639961 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
640962 // debugCB.addItemListener(this);
641963
964
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
965
+ trackCB.setToolTipText("Enable tracking target");
966
+ trackCB.addItemListener(this);
967
+
642968 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
969
+ oeilCB.setToolTipText("Move camera when tracking");
643970 oeilCB.addItemListener(this);
644971
972
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
973
+ shadowCB.setToolTipText("When live compute shadows");
974
+ shadowCB.addItemListener(this);
975
+
976
+ panel.Return();
977
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
978
+ toggleTextureCB.setToolTipText("Load textures");
979
+ toggleTextureCB.addItemListener(this);
980
+
981
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
982
+ toggleSwitchCB.setToolTipText("Choose a single item");
983
+ toggleSwitchCB.addItemListener(this);
984
+
985
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
986
+ autokeepCB.setToolTipText("On structure change");
987
+ autokeepCB.addItemListener(this);
988
+
989
+ panel.Return();
990
+ if (Globals.ADVANCED)
991
+ {
645992 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
646993 lookAtCB.setToolTipText("Look-at target");
647994 lookAtCB.addItemListener(this);
995
+ }
996
+
997
+ }
648998
649999 cGridBag fill = new cGridBag();
650
-
6511000 fill.preferredHeight = 200;
1001
+ cGridBag fill2 = new cGridBag();
1002
+ fill2.preferredHeight = 200;
1003
+ cGridBag fill3 = new cGridBag();
1004
+ fill3.preferredHeight = 200;
6521005
6531006 panel.add(fill);
1007
+ panel.add(fill2);
1008
+ panel.add(fill3);
6541009
6551010 }
6561011
6571012 void EditObject(Object3D obj)
6581013 {
6591014 cRadio radioButton = new cRadio(obj.name);
1015
+
1016
+ // June 2019. Patch to avoid bug with transparency.
1017
+ radioButton.hadMaterial = obj.material != null;
1018
+ if (!radioButton.hadMaterial)
1019
+ {
1020
+ obj.material = new cMaterial();
1021
+ }
1022
+
6601023 radioButton.SetObject(obj);
661
- radioButton.layout = sevenButton;
1024
+ radioButton.layout = sixButton; // sevenButton;
6621025 radioButton.SetCamera(cameraView.renderCamera, false);
6631026 radioButton.addActionListener(this);
6641027 radioPanel.add(radioButton);
6651028 buttonGroup.add(radioButton);
6661029 radioButton.doClick();
6671030 }
1031
+
6681032 void SetupViews(ObjEditor oe)
6691033 {
1034
+ theFrame = this;
1035
+
6701036 oe.SetupViews();
6711037
6721038 System.out.println("SetupViews");
....@@ -675,23 +1041,28 @@
6751041 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
6761042 }
6771043
678
- JCheckBox liveCB;
679
- JCheckBox supportCB;
680
- JCheckBox localCB;
681
- JCheckBox crowdCB;
682
- JCheckBox smoothCB;
683
- JCheckBox fastCB;
684
- JCheckBox slowCB;
685
- JCheckBox boxCB;
686
- JCheckBox zoomBoxCB;
687
- JCheckBox trackCB;
688
- JCheckBox smoothfocusCB;
1044
+ cToggleButton liveCB;
1045
+ cCheckBox supportCB;
1046
+ cCheckBox localCB;
1047
+ cCheckBox crowdCB;
1048
+ cCheckBox smoothCB;
1049
+ cToggleButton fastCB;
1050
+ cCheckBox slowCB;
1051
+ cCheckBox boxCB;
1052
+ cCheckBox zoomBoxCB;
1053
+ cCheckBox freezeCB;
1054
+ //cToggleButton trackCB;
1055
+ cCheckBox trackCB;
1056
+ cCheckBox smoothfocusCB;
6891057 // JCheckBox speakerMocapCB;
690
- JCheckBox speakerCameraCB;
691
- JCheckBox speakerFocusCB;
692
- JCheckBox debugCB;
693
- JCheckBox oeilCB;
694
- JCheckBox lookAtCB;
1058
+ cCheckBox speakerCameraCB;
1059
+ cCheckBox speakerFocusCB;
1060
+ cCheckBox debugCB;
1061
+
1062
+ cCheckBox oeilCB;
1063
+ cCheckBox shadowCB;
1064
+ cCheckBox autokeepCB;
1065
+ cCheckBox lookAtCB;
6951066
6961067 // static int COLOR = 1;
6971068 // static int MATERIAL = 2;
....@@ -699,9 +1070,9 @@
6991070
7001071 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
7011072
702
- JCheckBox colorCB;
703
- JCheckBox materialCB;
704
- JCheckBox textureCB;
1073
+ cCheckBox colorCB;
1074
+ cCheckBox materialCB;
1075
+ cCheckBox textureCB;
7051076
7061077 public void itemStateChanged(ItemEvent e)
7071078 {
....@@ -729,6 +1100,7 @@
7291100 } else if(e.getSource() == liveCB)
7301101 {
7311102 cameraView.ToggleLive();
1103
+ refreshContents(false);
7321104 }
7331105 else if(e.getSource() == supportCB)
7341106 {
....@@ -793,6 +1165,18 @@
7931165 {
7941166 cameraView.ToggleOeil();
7951167 }
1168
+ else if(e.getSource() == shadowCB)
1169
+ {
1170
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1171
+ }
1172
+ else if(e.getSource() == freezeCB)
1173
+ {
1174
+ Globals.FREEZEONMOVE ^= true;
1175
+ }
1176
+ else if(e.getSource() == autokeepCB)
1177
+ {
1178
+ Globals.REPLACEONMAKE ^= true;
1179
+ }
7961180 else if(e.getSource() == lookAtCB)
7971181 {
7981182 cameraView.ToggleLookAt();
....@@ -809,7 +1193,8 @@
8091193
8101194 /**/
8111195 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
812
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1196
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1197
+ TreePath path = objEditor.jTree.getSelectionPath();
8131198 if ((path == null) || (path.getPathCount() <= 1)) {
8141199 // We can't move the root node or an empty selection
8151200 return;
....@@ -872,8 +1257,6 @@
8721257 }
8731258 }
8741259
875
- String string = (String) object;
876
-
8771260 System.out.println("Transfer = " + object + "; drop : " + target);
8781261 // if( object instanceof java.io.File[])
8791262 // {
....@@ -881,7 +1264,11 @@
8811264 // objEditor.DropFile((java.io.File[]) object, true);
8821265 // return;
8831266 // }
884
- if (string.charAt(0) == '/')
1267
+
1268
+ String string = object.toString();
1269
+
1270
+ // File path for Mac and Windows
1271
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8851272 {
8861273 // file(s)
8871274 String[] names = string.split("\n");
....@@ -908,7 +1295,7 @@
9081295
9091296 flashIt = false;
9101297 CameraPane pane = (CameraPane) target;
911
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1298
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9121299 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9131300
9141301 if (group.selection.size() == 1)
....@@ -924,23 +1311,33 @@
9241311
9251312 assert target == objEditor.jTree;
9261313 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1314
+ Object3D destinationLeaf;
9271315 try {
928
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1316
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
9291317 } catch (Exception e) {
9301318 System.out.println("destinationPath : " + destinationPath);
9311319 return;
9321320 }
9331321
934
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1322
+ for (int i=group.selection.size(); --i>=0;)
9351323 {
1324
+ Object3D child = (Object3D)group.selection.elementAt(i);
1325
+
1326
+ // Cannot move into itself
1327
+ if (child == destinationLeaf)
1328
+ return;
1329
+ }
1330
+
1331
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1332
+// {
9361333 loadClipboard(true);
9371334 objEditor.jTree.setSelectionPath(destinationPath);
938
- pasteInto(false);
939
- } else {
940
- loadClipboard(false);
941
- objEditor.jTree.setSelectionPath(destinationPath);
942
- pasteInto(false); // true); // ???
943
- }
1335
+ pasteInto(false, false);
1336
+// } else {
1337
+// loadClipboard(false);
1338
+// objEditor.jTree.setSelectionPath(destinationPath);
1339
+// pasteInto(false, false); // true); // ???
1340
+// }
9441341 }
9451342 public void dropActionChanged(DropTargetDragEvent dtde)
9461343 // Called if the user has modified the current drop gesture
....@@ -1045,54 +1442,71 @@
10451442 {
10461443 //heightFieldItem = menu.add(new MenuItem("Height Field"));
10471444 //heightFieldItem.addActionListener(this);
1048
- gridItem = menu.add(new MenuItem("Grid"));
1049
- gridItem.addActionListener(this);
1050
- rectoidItem = menu.add(new MenuItem("Box"));
1051
- rectoidItem.addActionListener(this);
1052
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1053
- ellipsoidItem.addActionListener(this);
1054
- coneItem = menu.add(new MenuItem("Cone"));
1055
- coneItem.addActionListener(this);
1056
- torusItem = menu.add(new MenuItem("Torus"));
1057
- torusItem.addActionListener(this);
1058
- superItem = menu.add(new MenuItem("Superellipsoid"));
1059
- superItem.addActionListener(this);
1445
+// gridItem = menu.add(new MenuItem("Grid"));
1446
+// gridItem.addActionListener(this);
1447
+// rectoidItem = menu.add(new MenuItem("Box"));
1448
+// rectoidItem.addActionListener(this);
1449
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1450
+// ellipsoidItem.addActionListener(this);
1451
+// coneItem = menu.add(new MenuItem("Cone"));
1452
+// coneItem.addActionListener(this);
1453
+// torusItem = menu.add(new MenuItem("Torus"));
1454
+// torusItem.addActionListener(this);
1455
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1456
+// superItem.addActionListener(this);
1457
+
1458
+ cameraItem = menu.add(new MenuItem("Camera"));
1459
+ cameraItem.addActionListener(this);
1460
+
1461
+ if (!Globals.ADVANCED)
1462
+ {
10601463 kleinItem = menu.add(new MenuItem("Klein Bottle"));
10611464 kleinItem.addActionListener(this);
1062
- particleItem = menu.add(new MenuItem("Particle system"));
1063
- particleItem.addActionListener(this);
1465
+ }
1466
+
1467
+// particleItem = menu.add(new MenuItem("Particle system"));
1468
+// particleItem.addActionListener(this);
1469
+ if (Globals.ADVANCED)
1470
+ {
10641471 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10651472 ragdollItem.addActionListener(this);
10661473 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10671474 ragdoll2Item.addActionListener(this);
1475
+ }
10681476 menu.add("-");
1069
- meshItem = menu.add(new MenuItem("Mesh"));
1477
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10701478 meshItem.addActionListener(this);
10711479 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10721480 // meshGroupItem.addActionListener(this);
1481
+ if (Globals.ADVANCED)
1482
+ {
10731483 springItem = menu.add(new MenuItem("Spring"));
10741484 springItem.addActionListener(this);
10751485 flagItem = menu.add(new MenuItem("Flag"));
10761486 flagItem.addActionListener(this);
1077
- bezierItem = menu.add(new MenuItem("Patch"));
1078
- bezierItem.addActionListener(this);
1079
- checkerItem = menu.add(new MenuItem("Checker"));
1080
- checkerItem.addActionListener(this);
10811487 blobItem = menu.add(new MenuItem("Blob"));
10821488 blobItem.addActionListener(this);
10831489 latheItem = menu.add(new MenuItem("Lathe"));
10841490 latheItem.addActionListener(this);
1085
- lightItem = menu.add(new MenuItem("Light"));
1086
- lightItem.addActionListener(this);
1491
+ }
1492
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1493
+ bezierItem.addActionListener(this);
1494
+// overlayItem = menu.add(new MenuItem("Overlay"));
1495
+// overlayItem.addActionListener(this);
1496
+// lightItem = menu.add(new MenuItem("Light"));
1497
+// lightItem.addActionListener(this);
10871498 menu.add("-");
10881499 //superLoopItem = menu.add(new MenuItem("Super Loop"));
10891500 //superLoopItem.addActionListener(this);
1090
- loopItem = menu.add(new MenuItem("Loop"));
1091
- loopItem.addActionListener(this);
1501
+// loopItem = menu.add(new MenuItem("Loop"));
1502
+// loopItem.addActionListener(this);
10921503 doubleItem = menu.add(new MenuItem("Fork"));
10931504 doubleItem.addActionListener(this);
1505
+ if (Globals.ADVANCED)
1506
+ {
10941507 tripleItem = menu.add(new MenuItem("Trident"));
10951508 tripleItem.addActionListener(this);
1509
+ }
10961510 }
10971511
10981512 void buildToolsMenu(Menu menu)
....@@ -1101,29 +1515,34 @@
11011515 animationItem.addItemListener(this);
11021516 animationItem.setState(Globals.ANIMATION);
11031517
1518
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1519
+ archiveItem.addActionListener(this);
1520
+
11041521 menu.add("-");
11051522 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11061523 parseverticesItem.addActionListener(this);
11071524 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11081525 textureFieldItem.addActionListener(this);
1109
- alignItem = menu.add(new MenuItem("Align"));
1526
+ alignItem = menu.add(new MenuItem("Align Objects"));
11101527 alignItem.addActionListener(this);
1111
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1112
- mirrorItem.addActionListener(this);
11131528 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11141529 reduceMorphItem.addActionListener(this);
11151530 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11161531 reduce34MorphItem.addActionListener(this);
1117
-
1118
- menu.add(computeAOItem = new MenuItem("Compute AO"));
1119
- computeAOItem.addActionListener(this);
11201532 menu.add("-");
1121
-
11221533 menu.add(memoryItem = new MenuItem("Memory Usage"));
11231534 memoryItem.addActionListener(this);
1535
+ menu.add(computeAOItem = new MenuItem("Compute AO"));
1536
+ computeAOItem.addActionListener(this);
1537
+
1538
+ if (Globals.ADVANCED)
1539
+ {
1540
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1541
+ mirrorItem.addActionListener(this);
1542
+ menu.add("-");
11241543 menu.add(analyzeItem = new MenuItem("Analyze"));
11251544 analyzeItem.addActionListener(this);
1126
- menu.add(dumpItem = new MenuItem("Dump"));
1545
+ menu.add(dumpItem = new MenuItem("Print"));
11271546 dumpItem.addActionListener(this);
11281547 // menu.add(pathItem = new MenuItem("From-to path"));
11291548 // pathItem.addActionListener(this);
....@@ -1141,6 +1560,7 @@
11411560 menu.add("-");
11421561 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11431562 editScriptItem.addActionListener(this);
1563
+ }
11441564 }
11451565
11461566 void ScreenFit()
....@@ -1263,9 +1683,34 @@
12631683 shadow.material = new cMaterial(obj.material);
12641684 shadow.material.diffuse = 0.0001f;
12651685 shadow.material.specular = 0.0001f;
1686
+ //shadow.projectedVertices[1].x = 300;
12661687
12671688 makeSomething(shadow);
12681689 }
1690
+
1691
+ private void ClearUnpinned()
1692
+ {
1693
+ //for (Object3D obj : listUI)
1694
+ for (int i=listUI.size(); --i>=0;)
1695
+ {
1696
+ Object3D obj = listUI.elementAt(i);
1697
+ if (!obj.pinned)
1698
+ {
1699
+ obj.CloseUI();
1700
+ listUI.remove(i);
1701
+ }
1702
+ }
1703
+ }
1704
+
1705
+ private void EditElement(Object3D elem, boolean newWindow)
1706
+ {
1707
+ // if (!(elem instanceof Composite))
1708
+ // newWindow = false;
1709
+ listUI.add(elem);
1710
+ elem.openEditWindow(this, newWindow); //, false);
1711
+ System.out.println("edit : " + elem);
1712
+ elem.editWindow.refreshContents(true); // ? new
1713
+ }
12691714
12701715 /**
12711716 * applyExample
....@@ -1469,9 +1914,9 @@
14691914
14701915 void Overwrite(int mask)
14711916 {
1472
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1917
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14731918 {
1474
- Object3D content = GrafreeD.clipboard.get(0);
1919
+ Object3D content = Grafreed.clipboard.get(0);
14751920
14761921 if (content instanceof cGroup && ((cGroup)content).transientlink )
14771922 content = ((cGroup)content).get(0);
....@@ -1510,7 +1955,7 @@
15101955 {
15111956 ScreenFit();
15121957 } else
1513
- if (source == switchItem)
1958
+ if (source == switchViewItem)
15141959 {
15151960 cVector v1 = new cVector();
15161961 cVector v2 = new cVector();
....@@ -1519,11 +1964,11 @@
15191964 objEditor.cameraView.renderCamera.setAim(v2, v1);
15201965 objEditor.cameraView.repaint();
15211966 } else
1522
- if (source == rectoidItem)
1967
+ if (source == rectoidItem || source == boxButton)
15231968 {
15241969 makeSomething(new Box());
15251970 } else
1526
- if (source == particleItem)
1971
+ if (source == particleItem || source == particlesButton)
15271972 {
15281973 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15291974 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1602,27 +2047,27 @@
16022047
16032048 makeSomething(obj);
16042049 } else
1605
- if (source == gridItem)
2050
+ if (source == gridItem || source == gridButton)
16062051 {
16072052 makeSomething(new Grid());
16082053 } else
1609
- if (source == ellipsoidItem)
2054
+ if (source == ellipsoidItem || source == sphereButton)
16102055 {
16112056 makeSomething(new Sphere());
16122057 } else
1613
- if (source == coneItem)
2058
+ if (source == coneItem || source == coneButton)
16142059 {
16152060 makeSomething(new Cone());
16162061 } else
1617
- if (source == torusItem)
2062
+ if (source == torusItem || source == torusButton)
16182063 {
16192064 makeSomething(new Torus());
16202065 } else
1621
- if (source == superItem)
2066
+ if (source == superItem || source == superButton)
16222067 {
16232068 makeSomething(new Superellipsoid());
16242069 } else
1625
- if (source == kleinItem)
2070
+ if (source == kleinItem || source == kleinButton)
16262071 {
16272072 makeSomething(new Klein());
16282073 } else
....@@ -1642,7 +2087,7 @@
16422087 {
16432088 makeSomething(new BezierSurface());
16442089 } else
1645
- if (source == checkerItem)
2090
+ if (source == overlayItem || source == overlayButton)
16462091 {
16472092 /*
16482093 Object3D obj = new BezierSurface(5,8);
....@@ -1690,7 +2135,7 @@
16902135 s.setup();
16912136 makeSomething(s);
16922137 } else
1693
- if (source == lightItem)
2138
+ if (source == lightItem || source == lightButton)
16942139 {
16952140 makeSomething(new Light());
16962141 } else
....@@ -1740,30 +2185,30 @@
17402185
17412186 group(g);
17422187 } else
1743
- if (source == loopItem)
2188
+ if (source == loopItem || source == loopButton)
17442189 {
17452190 Composite csg = new GroupLeaf();
17462191 csg.count = 5;
17472192 group(csg);
1748
- Composite child = new cGroup();
2193
+ Composite child = new cGroup("Branch");
17492194 csg.addChild(child);
17502195 child.addChild(csg);
17512196 } else
17522197 if (source == doubleItem)
17532198 {
1754
- Composite csg = new GroupLeaf();
2199
+ Composite csg = new GroupLeaf("Fork");
17552200 csg.count = 5;
17562201 group(csg);
1757
- Composite child = new cGroup();
2202
+ Composite child = new cGroup("Branch A");
17582203 csg.addChild(child);
17592204 child.addChild(csg);
1760
- child = new cGroup();
2205
+ child = new cGroup("Branch B");
17612206 csg.addChild(child);
17622207 child.addChild(csg);
17632208 } else
17642209 if (source == tripleItem)
17652210 {
1766
- Composite csg = new GroupLeaf();
2211
+ Composite csg = new GroupLeaf("Trident");
17672212 csg.count = 4;
17682213 group(csg);
17692214 Composite child = new cGroup();
....@@ -1775,23 +2220,6 @@
17752220 child = new cGroup();
17762221 csg.addChild(child);
17772222 child.addChild(csg);
1778
- } else
1779
-
1780
- if (source == importGFDItem)
1781
- {
1782
- ImportGFD();
1783
- } else
1784
- if (source == importVRMLX3DItem)
1785
- {
1786
- ImportVRMLX3D();
1787
- } else
1788
- if (source == import3DSItem)
1789
- {
1790
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1791
- } else
1792
- if (source == importOBJItem)
1793
- {
1794
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17952223 } else
17962224 if (source == computeAOItem)
17972225 {
....@@ -1811,7 +2239,7 @@
18112239 if (source == invariantsItem)
18122240 {
18132241 System.out.println("Invariants:");
1814
- GrafreeD.grafreeD.universe.invariants();
2242
+ Grafreed.grafreeD.universe.invariants();
18152243 } else
18162244 if (source == memoryItem)
18172245 {
....@@ -1830,19 +2258,61 @@
18302258 {
18312259 DumpObject();
18322260 } else
2261
+ if (source == minButton)
2262
+ {
2263
+ Minimize();
2264
+ } else
2265
+ if (source == maxButton)
2266
+ {
2267
+ Maximize();
2268
+ } else
2269
+ if (source == fullButton)
2270
+ {
2271
+ ToggleFullScreen();
2272
+ } else
2273
+ if (source == undoButton)
2274
+ {
2275
+ // Go to previous version
2276
+ //if (!Undo())
2277
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2278
+ Undo();
2279
+ } else
2280
+ if (source == restoreButton)
2281
+ {
2282
+ // Restore current version
2283
+ Restore();
2284
+ } else
2285
+ if (source == replaceButton)
2286
+ {
2287
+ // Overwrite current version
2288
+ Replace();
2289
+ } else
2290
+ if (source == redoButton)
2291
+ {
2292
+ // Go to next version
2293
+ Redo();
2294
+ } else
2295
+ if (source == saveButton)
2296
+ {
2297
+ // Save a new version
2298
+ if (!Save(true))
2299
+ java.awt.Toolkit.getDefaultToolkit().beep();
2300
+ } else
2301
+ if (source == oneStepButton)
2302
+ {
2303
+ Globals.ONESTEP = true;
2304
+ cameraView.repaint();
2305
+ } else
18332306 if (source == screenfitButton)
18342307 {
1835
- //Reload(lastConverter, lastFilename, true);
18362308 ScreenFit();
18372309 } else
18382310 if (source == screenfitpointButton)
18392311 {
1840
- //Reload(lastConverter, lastFilename, true);
18412312 ScreenFitPoint();
18422313 } else
18432314 if (source == snapobjectButton)
18442315 {
1845
- //Reload(lastConverter, lastFilename, true);
18462316 SnapObject();
18472317 } else
18482318 // if (event.getSource() == recompileButton)
....@@ -1879,12 +2349,20 @@
18792349 {
18802350 loadClipboard(true);
18812351 } else
2352
+ if (source == undoItem)
2353
+ {
2354
+ Undo();
2355
+ } else
2356
+ if (source == redoItem)
2357
+ {
2358
+ Redo();
2359
+ } else
18822360 if (source == duplicateItem)
18832361 {
1884
- Object3D keep = GrafreeD.clipboard;
2362
+ Object3D keep = Grafreed.clipboard;
18852363 loadClipboard(false);
18862364 paste(false);
1887
- GrafreeD.clipboard = keep;
2365
+ Grafreed.clipboard = keep;
18882366 } else
18892367 if (source == cloneItem)
18902368 {
....@@ -1902,13 +2380,17 @@
19022380 {
19032381 paste(false);
19042382 } else
2383
+ if (source == pasteIntoItem)
2384
+ {
2385
+ pasteInto(true, false);
2386
+ } else
19052387 if (source == pasteLinkItem)
19062388 {
1907
- pasteInto(false);
2389
+ pasteInto(false, false);
19082390 } else
19092391 if (source == pasteCloneItem)
19102392 {
1911
- pasteInto(true);
2393
+ pasteInto(true, true);
19122394 } else
19132395 if (source == pasteExpandItem)
19142396 {
....@@ -2100,9 +2582,9 @@
21002582 // group.selection.get(0).setMasterThis(content); // should be identity
21012583 // refreshContents();
21022584 // }
2103
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2585
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21042586 {
2105
- Object3D content = GrafreeD.clipboard.get(0);
2587
+ Object3D content = Grafreed.clipboard.get(0);
21062588
21072589 if (content instanceof cGroup && ((cGroup)content).transientlink )
21082590 content = ((cGroup)content).get(0);
....@@ -2110,11 +2592,11 @@
21102592 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21112593 for (int i=0; i<group.selection.size(); i++)
21122594 {
2113
- boolean random = CameraPane.RANDOM;
2114
- CameraPane.RANDOM = false; // parse all random nodes
2595
+ boolean random = CameraPane.SWITCH;
2596
+ CameraPane.SWITCH = false; // parse all random nodes
21152597 group.selection.get(i).linkVerticesThis(content);
21162598 // group.selection.get(i).setMasterThis(content); // should be identity
2117
- CameraPane.RANDOM = random;
2599
+ CameraPane.SWITCH = random;
21182600 }
21192601 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21202602 refreshContents();
....@@ -2124,20 +2606,20 @@
21242606 {
21252607 for (int i=0; i<group.selection.size(); i++)
21262608 {
2127
- boolean random = CameraPane.RANDOM;
2128
- CameraPane.RANDOM = false; // parse all random nodes
2609
+ boolean random = CameraPane.SWITCH;
2610
+ CameraPane.SWITCH = false; // parse all random nodes
21292611 group.selection.get(i).linkVerticesThis(null);
2130
- CameraPane.RANDOM = random;
2612
+ CameraPane.SWITCH = random;
21312613 }
21322614
21332615 refreshContents();
21342616 } else
21352617 if (source == relinkverticesItem)
21362618 {
2137
- boolean random = CameraPane.RANDOM;
2138
- CameraPane.RANDOM = false; // parse all random nodes
2619
+ boolean random = CameraPane.SWITCH;
2620
+ CameraPane.SWITCH = false; // parse all random nodes
21392621 group.selection.RelinkToSupport();
2140
- CameraPane.RANDOM = random;
2622
+ CameraPane.SWITCH = random;
21412623
21422624 refreshContents();
21432625 } else
....@@ -2152,9 +2634,9 @@
21522634 } else
21532635 if (source == setMasterItem)
21542636 {
2155
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2637
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21562638 {
2157
- Object3D content = GrafreeD.clipboard.get(0);
2639
+ Object3D content = Grafreed.clipboard.get(0);
21582640
21592641 if (content instanceof cGroup && ((cGroup)content).transientlink )
21602642 content = ((cGroup)content).get(0);
....@@ -2167,9 +2649,9 @@
21672649 {
21682650 if (group.selection.size() == 1)
21692651 {
2170
- if (GrafreeD.clipboard.size() == 1)
2652
+ if (Grafreed.clipboard.size() == 1)
21712653 {
2172
- Object3D content = GrafreeD.clipboard.get(0);
2654
+ Object3D content = Grafreed.clipboard.get(0);
21732655
21742656 if (content instanceof cGroup && ((cGroup)content).transientlink )
21752657 content = ((cGroup)content).get(0);
....@@ -2186,7 +2668,7 @@
21862668 {
21872669 RevertMeshes();
21882670 } else
2189
- if (source == resetMeshItem)
2671
+ if (source == resetAllItem)
21902672 {
21912673 ResetAll();
21922674 } else
....@@ -2194,7 +2676,7 @@
21942676 {
21952677 StepAll();
21962678 } else
2197
- if (source == clearItem) // || event.getSource() == clearButton)
2679
+ if (source == deleteItem) // || event.getSource() == clearButton)
21982680 {
21992681 //int indices[] = jList.getSelectedIndices();
22002682 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2206,9 +2688,9 @@
22062688 {
22072689 ClearSelection(true);
22082690 } else
2209
- if (source == grabItem)
2691
+ if (source == grabItem || source == groupButton)
22102692 {
2211
- group(new cGroup(), true);
2693
+ group(new cGroup(), false); // true);
22122694 } else
22132695 if (source == hideItem)
22142696 {
....@@ -2226,11 +2708,11 @@
22262708 {
22272709 makeSomething(new Camera());
22282710 } else
2229
- if (source == compositeItem)
2711
+ if (source == compositeItem || source == compositeButton)
22302712 {
22312713 group(new Composite());
22322714 } else
2233
- if (source == randomItem)
2715
+ if (source == switchItem || source == switchButton)
22342716 {
22352717 RandomNode random = new RandomNode();
22362718 group(random);
....@@ -2332,7 +2814,7 @@
23322814 {
23332815 group(new cLinker());
23342816 } else
2335
- if (source == textureItem)
2817
+ if (source == textureItem || source == textureButton)
23362818 {
23372819 group(new TextureNode());
23382820 } else
....@@ -2352,17 +2834,30 @@
23522834 {
23532835 CastShadow(2);
23542836 } else
2355
- if (source == ungroupItem)
2837
+ if (source == ungroupItem || source == ungroupButton)
23562838 {
2357
- //ungroup();
2839
+ boolean hasRoot = false;
2840
+
23582841 for (int i=0; i<group.selection.size(); i++)
23592842 {
2360
- Ungroup(group.selection.get(i));
2843
+ if (group.selection.get(i) == group)
2844
+ {
2845
+ hasRoot = true;
2846
+ break;
2847
+ }
23612848 }
23622849
2363
- ClearSelection(false);
2364
-
2365
- refreshContents();
2850
+ if (!hasRoot)
2851
+ {
2852
+ for (int i=0; i<group.selection.size(); i++)
2853
+ {
2854
+ Ungroup(group.selection.get(i));
2855
+ }
2856
+
2857
+ ClearSelection(false);
2858
+
2859
+ refreshContents();
2860
+ }
23662861 } else
23672862 if (source == genUVItem)
23682863 {
....@@ -2374,7 +2869,7 @@
23742869 } else
23752870 if (source == genNormalsMESHItem)
23762871 {
2377
- GenNormals(true); // TODO
2872
+ GenNormalsMESH();
23782873 } else
23792874 if (source == genNormalsORGANItem)
23802875 {
....@@ -2439,6 +2934,22 @@
24392934 if (source == unmarkleavesItem)
24402935 {
24412936 MarkLeaves(false);
2937
+ } else
2938
+ if (source == rewindleavesItem)
2939
+ {
2940
+ RewindLeaves(true);
2941
+ } else
2942
+ if (source == unrewindleavesItem)
2943
+ {
2944
+ RewindLeaves(false);
2945
+ } else
2946
+ if (source == randomleavesItem)
2947
+ {
2948
+ RandomLeaves(true);
2949
+ } else
2950
+ if (source == unrandomleavesItem)
2951
+ {
2952
+ RandomLeaves(false);
24422953 } else
24432954 if (source == flipVItem)
24442955 {
....@@ -2524,9 +3035,13 @@
25243035 {
25253036 SmoothMesh();
25263037 } else
2527
- if (source == transformgeometryItem)
3038
+ if (source == transformGeometryItem)
25283039 {
25293040 TransformGeometry();
3041
+ } else
3042
+ if (source == transformChildrenItem)
3043
+ {
3044
+ TransformChildren();
25303045 } else
25313046 if (source == resetTransformItem)
25323047 {
....@@ -2534,7 +3049,11 @@
25343049 } else
25353050 if (source == resetCentroidItem)
25363051 {
2537
- ResetCentroid();
3052
+ ResetCentroid(true);
3053
+ } else
3054
+ if (source == resetCentroidXZItem)
3055
+ {
3056
+ ResetCentroid(false);
25383057 } else
25393058 if (source == resetParentItem)
25403059 {
....@@ -2639,7 +3158,7 @@
26393158 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26403159 {
26413160 obj = (Object3D)e.nextElement();
2642
- obj.SetBumpTexture(null);
3161
+ obj.ResetBumpTexture();
26433162 }
26443163
26453164 refreshContents();
....@@ -2655,6 +3174,31 @@
26553174
26563175 refreshContents();
26573176 } else
3177
+ if (source == embedTexturesItem)
3178
+ {
3179
+ Object3D obj;
3180
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3181
+ {
3182
+ obj = (Object3D)e.nextElement();
3183
+ obj.EmbedTextures(true);
3184
+ }
3185
+
3186
+ refreshContents();
3187
+ } else
3188
+ if (source == deEmbedTexturesItem)
3189
+ {
3190
+ Object3D obj;
3191
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3192
+ {
3193
+ obj = (Object3D)e.nextElement();
3194
+ obj.EmbedTextures(false);
3195
+ }
3196
+
3197
+ CameraPane.texturepigment.clear();
3198
+ CameraPane.texturebump.clear();
3199
+
3200
+ refreshContents();
3201
+ } else
26583202 if (source == flashSelectionButton)
26593203 {
26603204 CameraPane.flash = true;
....@@ -2666,6 +3210,10 @@
26663210 if (source == twoButton)
26673211 {
26683212 radio.layout = twoButton;
3213
+
3214
+ if (CameraPane.FULLSCREEN)
3215
+ fullscreenLayout = radio.layout;
3216
+
26693217 // bug
26703218 //gridPanel.setDividerLocation(1.0);
26713219 //bigPanel.setDividerLocation(0.0);
....@@ -2698,10 +3246,31 @@
26983246 bigThree.ClearUI();
26993247 bigThree.add(centralPanel);
27003248 bigThree.FlushUI();
3249
+
3250
+ cameraView.requestFocusInWindow();
3251
+
3252
+// refreshContents(true);
3253
+//
3254
+// try
3255
+// {
3256
+// java.awt.Robot bot = new java.awt.Robot();
3257
+// int mask = InputEvent.BUTTON1_MASK;
3258
+// bot.mouseMove(100, 100);
3259
+// bot.mousePress(mask);
3260
+// bot.mouseRelease(mask);
3261
+// }
3262
+// catch (Exception e)
3263
+// {
3264
+//
3265
+// }
3266
+
27013267 } else
27023268 if (source == threeButton)
27033269 {
27043270 radio.layout = threeButton;
3271
+
3272
+ if (CameraPane.FULLSCREEN)
3273
+ fullscreenLayout = radio.layout;
27053274
27063275 // bigThree.remove(scenePanel);
27073276 // bigThree.remove(centralPanel);
....@@ -2731,13 +3300,18 @@
27313300 // centralPanel.setVisible(true);
27323301 // XYZPanel.setVisible(true);
27333302 bigThree.ClearUI();
3303
+ bigThree.add(scenePanel);
27343304 bigThree.add(centralPanel);
2735
- bigThree.add(XYZPanel);
27363305 bigThree.FlushUI();
3306
+
3307
+ cameraView.requestFocusInWindow();
27373308 } else
27383309 if (source == fourButton)
27393310 {
27403311 radio.layout = fourButton;
3312
+
3313
+ if (CameraPane.FULLSCREEN)
3314
+ fullscreenLayout = radio.layout;
27413315
27423316 // bigThree.remove(scenePanel);
27433317 // bigThree.remove(centralPanel);
....@@ -2769,10 +3343,15 @@
27693343 bigThree.ClearUI();
27703344 bigThree.add(scenePanel);
27713345 bigThree.FlushUI();
3346
+
3347
+ cameraView.requestFocusInWindow();
27723348 } else
27733349 if (source == sixButton)
27743350 {
27753351 radio.layout = sixButton;
3352
+
3353
+ if (CameraPane.FULLSCREEN)
3354
+ fullscreenLayout = radio.layout;
27763355
27773356 // bigThree.remove(scenePanel);
27783357 // bigThree.remove(centralPanel);
....@@ -2802,13 +3381,18 @@
28023381 // centralPanel.setVisible(true);
28033382 // XYZPanel.setVisible(false);
28043383 bigThree.ClearUI();
2805
- bigThree.add(scenePanel);
28063384 bigThree.add(centralPanel);
3385
+ bigThree.add(scenePanel);
28073386 bigThree.FlushUI();
3387
+
3388
+ cameraView.requestFocusInWindow();
28083389 } else
28093390 if (source == sevenButton)
28103391 {
28113392 radio.layout = sevenButton;
3393
+
3394
+ if (CameraPane.FULLSCREEN)
3395
+ fullscreenLayout = radio.layout;
28123396
28133397 // bigThree.remove(scenePanel);
28143398 // bigThree.remove(centralPanel);
....@@ -2842,6 +3426,8 @@
28423426 bigThree.add(centralPanel);
28433427 bigThree.add(XYZPanel);
28443428 bigThree.FlushUI();
3429
+
3430
+ cameraView.requestFocusInWindow();
28453431 } else
28463432 if (source == rootButton)
28473433 {
....@@ -2853,6 +3439,7 @@
28533439 EditObject(obj);
28543440 }
28553441
3442
+ cameraView.requestFocusInWindow();
28563443 refreshContents(true);
28573444 } else
28583445 if (source == closeButton)
....@@ -2862,22 +3449,37 @@
28623449 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
28633450 {
28643451 ab = (cRadio)e.nextElement();
2865
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3452
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
28663453 {
3454
+ // Patch to avoid bug with transparency.
3455
+ if (!ab.hadMaterial)
3456
+ {
3457
+ ab.object.material = null;
3458
+ }
3459
+
28673460 buttonGroup.remove(ab);
28683461 radioPanel.remove(ab);
28693462
2870
- ab.GetObject().editWindow = null;
3463
+ //ab.GetObject().editWindow = null;
3464
+ ab.GetObject().manipWindow = null;
28713465 // ab.GetObject().objectUI = null; // ?????????
28723466
28733467 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
28743468 break;
28753469 }
28763470 }
3471
+
3472
+ cameraView.requestFocusInWindow();
28773473 refreshContents(true);
28783474 } else
28793475 if (source == editItem || source == editButton)
28803476 {
3477
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3478
+ {
3479
+ Object3D child = (Object3D)e.nextElement();
3480
+ child.pinned = true;
3481
+ }
3482
+
28813483 EditSelection(false);
28823484 } else
28833485 if (source == uneditButton)
....@@ -2887,12 +3489,13 @@
28873489 Object3D child = (Object3D)e.nextElement();
28883490 if(child.editWindow != null)
28893491 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3492
+ child.pinned = false;
28903493 child.CloseUI();
28913494 listUI.remove(child);
28923495
2893
- child.editWindow = null; // ???????????
3496
+ //child.editWindow = null; // ???????????
28943497 }
2895
- objEditor.ctrlPanel.validate();
3498
+ objEditor.ctrlPanel.FlushUI();
28963499 //objEditor.jTree.clearSelection();
28973500 //objEditor.ResetSliders();
28983501 refreshContents(true);
....@@ -2903,6 +3506,7 @@
29033506 //copy.ClearUI();
29043507 for (Object3D obj : listUI)
29053508 {
3509
+ obj.pinned = false;
29063510 obj.CloseUI();
29073511 }
29083512 listUI.clear();
....@@ -2912,7 +3516,7 @@
29123516 {
29133517 assert(copy == group);
29143518
2915
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3519
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
29163520
29173521 for (Object3D obj : listUI)
29183522 {
....@@ -2961,6 +3565,9 @@
29613565 }
29623566
29633567 copy = group;
3568
+
3569
+ SetUndoStates();
3570
+
29643571 //Globals.theRenderer.object = group;
29653572 if(!useclient)
29663573 {
....@@ -2976,20 +3583,46 @@
29763583 frontView.object = group;
29773584 sideView.object = group;
29783585 }
2979
- group.editWindow = this;
3586
+
3587
+// fix "+" issue
3588
+ //group.editWindow = this;
3589
+ group.manipWindow = this;
3590
+
29803591 /*
29813592 currentLayout = radio.layout;
29823593 if (currentLayout == null)
29833594 currentLayout = sevenButton;
29843595 */
29853596 radio.layout.doClick();
3597
+
3598
+ ClearUnpinned();
3599
+ //Grafreed.Assert(group != null);
3600
+ //Grafreed.Assert(group.selection != null);
3601
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3602
+ if (group.selection == null || group.selection.size() == 1)
3603
+ EditSelection(false);
29863604 keepparent = group.parent;
29873605 // PARENT = NULL or not???
29883606 //group.parent = null; // ROOT
29893607 //group.attributes = -1;
29903608 ResetModel();
3609
+
3610
+ cameraView.requestFocusInWindow();
29913611 refreshContents(true);
2992
- }
3612
+ } else if (event.getSource() == editCameraItem)
3613
+ {
3614
+ cameraView.ProtectCamera();
3615
+ cameraView.repaint();
3616
+ return;
3617
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
3618
+ {
3619
+ cameraView.RevertCamera();
3620
+ cameraView.repaint();
3621
+ return;
3622
+ // } else if (event.getSource() == textureButton)
3623
+ // {
3624
+ // return; // true;
3625
+ }
29933626 else
29943627 {
29953628 //return super.action(event, arg);
....@@ -2998,7 +3631,6 @@
29983631 }
29993632
30003633 boolean useclient = false;
3001
- cRadio radio;
30023634
30033635 void ToggleRoot()
30043636 {
....@@ -3050,6 +3682,28 @@
30503682 refreshContents();
30513683 }
30523684
3685
+ void TransformChildren()
3686
+ {
3687
+ Object3D obj;
3688
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3689
+ {
3690
+ obj = (Object3D)e.nextElement();
3691
+ obj.KeepTextureMatrices();
3692
+ obj.TransformChildren();
3693
+ obj.RestoreTextureMatrices();
3694
+
3695
+// if (obj.parent == null)
3696
+// {
3697
+// System.out.println("NULL PARENT!");
3698
+// new Exception().printStackTrace();
3699
+// }
3700
+// else
3701
+// TouchTransform(obj);
3702
+// //obj.parent.Touch();
3703
+ }
3704
+
3705
+ refreshContents();
3706
+ }
30533707
30543708 void ResetTransform()
30553709 {
....@@ -3162,7 +3816,7 @@
31623816 refreshContents();
31633817 }
31643818
3165
- void ResetCentroid()
3819
+ void ResetCentroid(boolean full)
31663820 {
31673821 Object3D obj;
31683822 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3177,12 +3831,16 @@
31773831 LA.matIdentity(Object3D.mat);
31783832 obj.getBounds(minima, maxima, false);
31793833 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3180
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3834
+ if (full)
3835
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31813836 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31823837 obj.TransformMesh(Object3D.mat);
3838
+
31833839 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3184
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3840
+ if (full)
3841
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31853842 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3843
+
31863844 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31873845 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31883846 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3211,7 +3869,8 @@
32113869
32123870 int size = obj.MemorySize();
32133871
3214
- System.err.println((size/1024) + " KB is the size of " + obj);
3872
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3873
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32153874 }
32163875 }
32173876 catch (Exception e)
....@@ -3248,9 +3907,9 @@
32483907 obj = (Object3D)e.nextElement();
32493908
32503909 System.out.println("Object is: " + obj);
3251
- GrafreeD.AnalyzeObject(obj);
3910
+ Grafreed.AnalyzeObject(obj);
32523911 System.out.println("Boundary rep: " + obj.bRep);
3253
- GrafreeD.AnalyzeObject(obj.bRep);
3912
+ Grafreed.AnalyzeObject(obj.bRep);
32543913
32553914 // System.err.println((size/1024) + " KB is the size of " + obj);
32563915 }
....@@ -3292,6 +3951,13 @@
32923951 void GenNormals(boolean crease)
32933952 {
32943953 group.GenNormalsS(crease);
3954
+
3955
+ refreshContents();
3956
+ }
3957
+
3958
+ void GenNormalsMESH()
3959
+ {
3960
+ group.GenNormalsMeshS();
32953961
32963962 refreshContents();
32973963 }
....@@ -3464,8 +4130,8 @@
34644130
34654131 void ParseVertices()
34664132 {
3467
- boolean epsequal = GrafreeD.epsequal;
3468
- GrafreeD.epsequal = true;
4133
+ boolean epsequal = Grafreed.epsequal;
4134
+ Grafreed.epsequal = true;
34694135
34704136 for (int i=0; i<group.selection.size(); i++)
34714137 {
....@@ -3490,7 +4156,7 @@
34904156 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34914157 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34924158
3493
- g.add(GrafreeD.clipboard);
4159
+ g.add(Grafreed.clipboard);
34944160
34954161 buffer.add(g);
34964162 }
....@@ -3505,7 +4171,7 @@
35054171 makeSomething(buffer, i==group.selection.size()-1);
35064172 }
35074173
3508
- GrafreeD.epsequal = epsequal;
4174
+ Grafreed.epsequal = epsequal;
35094175
35104176 refreshContents();
35114177 }
....@@ -3523,7 +4189,16 @@
35234189 String pigment = Object3D.GetPigment(tex);
35244190 //String bump = Object3D.GetBump(tex);
35254191
3526
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4192
+ com.sun.opengl.util.texture.TextureData texturedata = null;
4193
+
4194
+ try
4195
+ {
4196
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
4197
+ }
4198
+ catch (Exception e)
4199
+ {
4200
+ System.err.println("FAIL: " + node);
4201
+ }
35274202
35284203 double s = v.s;
35294204
....@@ -3611,11 +4286,11 @@
36114286
36124287 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36134288
3614
- boolean random = CameraPane.RANDOM;
3615
- CameraPane.RANDOM = false; // parse all random nodes
4289
+ boolean random = CameraPane.SWITCH;
4290
+ CameraPane.SWITCH = false; // parse all random nodes
36164291 lowres.linkVerticesThis(null);
36174292 lowres.linkVerticesThis(sn);
3618
- CameraPane.RANDOM = random;
4293
+ CameraPane.SWITCH = random;
36194294
36204295 System.err.flush();
36214296
....@@ -3655,7 +4330,7 @@
36554330 return;
36564331
36574332 Object3D poses = group.selection.get(0);
3658
- Object3D ref = GrafreeD.clipboard.get(0);
4333
+ Object3D ref = Grafreed.clipboard.get(0);
36594334
36604335 Object3D newgroup = new Object3D("Po:" + poses.name);
36614336
....@@ -3849,9 +4524,9 @@
38494524
38504525 void ClipMesh()
38514526 {
3852
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4527
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38534528 {
3854
- Object3D content = GrafreeD.clipboard.get(0);
4529
+ Object3D content = Grafreed.clipboard.get(0);
38554530
38564531 if (content instanceof cGroup && ((cGroup)content).transientlink )
38574532 content = ((cGroup)content).get(0);
....@@ -3860,7 +4535,7 @@
38604535 // {
38614536 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38624537 // }
3863
- group.selection.ClipMesh(GrafreeD.clipboard);
4538
+ group.selection.ClipMesh(Grafreed.clipboard);
38644539 }
38654540 // group.selection.ClipMesh(GrafreeD.clipboard);
38664541 System.out.println("DONE.");
....@@ -3907,6 +4582,18 @@
39074582 void MarkLeaves(boolean hide)
39084583 {
39094584 group.selection.MarkLeaves(hide);
4585
+ refreshContents();
4586
+ }
4587
+
4588
+ void RewindLeaves(boolean hide)
4589
+ {
4590
+ group.selection.RewindLeaves(hide);
4591
+ refreshContents();
4592
+ }
4593
+
4594
+ void RandomLeaves(boolean hide)
4595
+ {
4596
+ group.selection.RandomLeaves(hide);
39104597 refreshContents();
39114598 }
39124599
....@@ -3981,28 +4668,25 @@
39814668 // }
39824669 // }
39834670
3984
- static boolean allparams = true;
3985
-
3986
- static Vector<Object3D> listUI = new Vector<Object3D>();
3987
-
39884671 void EditSelection(boolean newWindow)
39894672 {
4673
+ if (group.selection == null)
4674
+ {
4675
+ EditElement(group, newWindow); // ? new
4676
+ return;
4677
+ }
4678
+
39904679 // aConstraints.gridy = 0;
39914680 for (int i=0; i<group.selection.size(); i++)
39924681 {
39934682 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
39944683 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
3995
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4684
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39964685
39974686 Object3D elem = (Object3D)group.selection.elementAt(i);
3998
- if(elem != group)
4687
+ if(elem != group || !newWindow)
39994688 {
4000
- // if (!(elem instanceof Composite))
4001
- // newWindow = false;
4002
- listUI.add(elem);
4003
- elem.openEditWindow(this, newWindow); //, false);
4004
- System.out.println("edit : " + elem);
4005
- elem.editWindow.refreshContents(true); // ? new
4689
+ EditElement(elem, newWindow); // ? new
40064690 }
40074691 }
40084692 }
....@@ -4077,7 +4761,8 @@
40774761 //new Exception().printStackTrace();
40784762
40794763 freezemodel = true;
4080
-
4764
+ ClearUnpinned();
4765
+
40814766 /**/
40824767 //switch (event.id)
40834768 {
....@@ -4085,7 +4770,6 @@
40854770 //case 702: // Event.LIST_DESELECT
40864771 group.deselectAll();
40874772 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4088
- objEditor.ClearInfo(); // .GetMaterial());
40894773 if (tps != null)
40904774 {
40914775 for (int i=0; i < tps.length; i++)
....@@ -4094,10 +4778,8 @@
40944778
40954779 //if (child.parent != null)
40964780 //child.parent.addSelectee(child);
4781
+ objEditor.SetMaterial(child);
40974782 group.addSelectee(child);
4098
- objEditor.SetMaterial(child); // .GetMaterial());
4099
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4100
- System.err.println("info : " + child.GetPath());
41014783 }
41024784 }
41034785 // else
....@@ -4107,20 +4789,28 @@
41074789 // System.err.println("info : " + group.GetPath());
41084790 // }
41094791
4110
- objEditor.SetText(); // jan 2014
4111
-
4112
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4792
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41134793 CameraPane.flash = true;
41144794
4115
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4795
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41164796 // a camera
41174797 {
4118
- CameraPane.camerachangeframe = 0; // don't refuse it
4119
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4798
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
4799
+ {
4800
+ CameraPane.camerachangeframe = 0; // don't refuse it
4801
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4802
+ }
41204803 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41214804 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41224805 }
41234806
4807
+ if (tps != null && tps.length == 1)
4808
+ {
4809
+ EditSelection(false);
4810
+ }
4811
+
4812
+ SetPinStates(tps != null && tps.length > 0);
4813
+
41244814 refreshContents();
41254815 //return true;
41264816 }
....@@ -4129,6 +4819,35 @@
41294819
41304820 freezemodel = false;
41314821 }
4822
+
4823
+ void SetPinStates(boolean enabled)
4824
+ {
4825
+ editButton.setEnabled(enabled);
4826
+ uneditButton.setEnabled(enabled);
4827
+ unselectButton.setEnabled(enabled);
4828
+ flashSelectionButton.setEnabled(enabled);
4829
+ }
4830
+
4831
+ void refreshContents(boolean cp)
4832
+ {
4833
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
4834
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
4835
+ {
4836
+ objEditor.ClearInfo(); // .GetMaterial());
4837
+
4838
+ for (int i=0; i < group.selection.Size(); i++)
4839
+ {
4840
+ Object3D child = (Object3D) group.selection.get(i);
4841
+
4842
+ objEditor.AddInfo(child, this, true);
4843
+ System.err.println("info : " + child.GetPath());
4844
+ }
4845
+
4846
+ objEditor.SetText(); // jan 2014
4847
+ }
4848
+
4849
+ super.refreshContents(cp);
4850
+ }
41324851
41334852 void linkSomething(Object3D thing)
41344853 {
....@@ -4200,16 +4919,19 @@
42004919 {
42014920 if (group.selection.isEmpty())
42024921 return;
4203
- GrafreeD.clipboardIsTempGroup = false;
4922
+
4923
+ Grafreed.clipboardIsTempGroup = false;
42044924 Composite tGroup = null;
42054925 if (group.selection.size() > 0) // 1)
42064926 {
42074927 tGroup = new cGroup();
4208
- GrafreeD.clipboardIsTempGroup = true;
4928
+ Grafreed.clipboardIsTempGroup = true;
42094929 }
42104930
42114931 if (cut)
42124932 {
4933
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4934
+// Save();
42134935 //int indices[] = jList.getSelectedIndices();
42144936 //for (int i = indices.length - 1; i >= 0; i--)
42154937 //jList.remove(indices[i]);
....@@ -4245,16 +4967,16 @@
42454967 //System.out.println("cut " + child);
42464968 //System.out.println("parent = " + child.parent);
42474969 // tmp.addChild(child);
4248
- if (GrafreeD.clipboardIsTempGroup)
4970
+ if (Grafreed.clipboardIsTempGroup)
42494971 tGroup.add/*Child*/(tmp);
42504972 else
4251
- GrafreeD.clipboard = tmp;
4973
+ Grafreed.clipboard = tmp;
42524974 }
42534975 else
4254
- if (GrafreeD.clipboardIsTempGroup)
4976
+ if (Grafreed.clipboardIsTempGroup)
42554977 tGroup.add/*Child*/(child);
42564978 else
4257
- GrafreeD.clipboard = child;
4979
+ Grafreed.clipboard = child;
42584980 }
42594981
42604982 //ResetModel();
....@@ -4286,21 +5008,23 @@
42865008 //System.out.println("cut " + elem);
42875009 //System.out.println("parent = " + elem.parent);
42885010 // tmp.addChild(elem);
4289
- if (GrafreeD.clipboardIsTempGroup)
5011
+ if (Grafreed.clipboardIsTempGroup)
42905012 tGroup.add/*Child*/(tmp);
42915013 else
4292
- GrafreeD.clipboard = tmp;
5014
+ Grafreed.clipboard = tmp;
42935015 }
42945016 else
4295
- if (GrafreeD.clipboardIsTempGroup)
5017
+ if (Grafreed.clipboardIsTempGroup)
42965018 tGroup.add/*Child*/(child);
42975019 else
4298
- GrafreeD.clipboard = child;
5020
+ Grafreed.clipboard = child;
42995021 }
43005022
43015023 }
4302
- if (GrafreeD.clipboardIsTempGroup)
4303
- GrafreeD.clipboard = tGroup;
5024
+
5025
+ if (Grafreed.clipboardIsTempGroup)
5026
+ Grafreed.clipboard = tGroup;
5027
+
43045028 if (cut)
43055029 {
43065030 ResetModel();
....@@ -4310,11 +5034,15 @@
43105034
43115035 void paste(boolean expand)
43125036 {
5037
+ if (Globals.REPLACEONMAKE)
5038
+ Save();
5039
+ boolean keep = Globals.REPLACEONMAKE;
5040
+ Globals.REPLACEONMAKE = false;
43135041 // if (GrafreeD.clipboard == null)
43145042 // return;
43155043 boolean first = true;
43165044
4317
- if (GrafreeD.clipboardIsTempGroup)
5045
+ if (Grafreed.clipboardIsTempGroup)
43185046 {
43195047 Composite temp;
43205048
....@@ -4325,7 +5053,7 @@
43255053 temp = (Composite)Applet3D.clipboard.deepCopy();
43265054 */
43275055 Object3D elem;
4328
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
5056
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43295057 {
43305058 Object3D child = (Object3D)e.nextElement();
43315059
....@@ -4359,21 +5087,22 @@
43595087 //Object3D cb = Applet3D.clipboard;
43605088 //temp.addChild(cb);
43615089 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4362
- assert(GrafreeD.clipboard.parent == null);
4363
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4364
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4365
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4366
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
5090
+ assert(Grafreed.clipboard.parent == null);
5091
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
5092
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
5093
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
5094
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43675095 else
4368
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4369
- GrafreeD.clipboard.get(0).parent = keepparent;
5096
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
5097
+ Grafreed.clipboard.get(0).parent = keepparent;
43705098 }
43715099
5100
+ Globals.REPLACEONMAKE = keep;
43725101 ResetModel();
43735102 refreshContents();
43745103 }
43755104
4376
- void pasteInto(boolean copyit)
5105
+ void pasteInto(boolean copyit, boolean clone)
43775106 {
43785107 // if (GrafreeD.clipboard == null)
43795108 // return;
....@@ -4402,15 +5131,22 @@
44025131 if (copyit)
44035132 {
44045133 // paste(false);
4405
- CloneClipboard(false); // sept 2014
5134
+ if (clone)
5135
+ {
5136
+ CloneClipboard(false); // sept 2014
5137
+ }
5138
+ else
5139
+ {
5140
+ paste(false);
5141
+ }
44065142 }
44075143 else
44085144 {
44095145 boolean first = true;
44105146
4411
- if (GrafreeD.clipboardIsTempGroup)
5147
+ if (Grafreed.clipboardIsTempGroup)
44125148 {
4413
- Composite temp = (Composite)GrafreeD.clipboard;
5149
+ Composite temp = (Composite)Grafreed.clipboard;
44145150 Object3D copy;
44155151 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44165152 {
....@@ -4420,7 +5156,7 @@
44205156 }
44215157 } else
44225158 {
4423
- linkSomething(GrafreeD.clipboard); //.get(0));
5159
+ linkSomething(Grafreed.clipboard); //.get(0));
44245160 }
44255161 }
44265162 }
....@@ -4497,6 +5233,10 @@
44975233
44985234 void group(Object3D csg, boolean grab)
44995235 {
5236
+ if (Globals.REPLACEONMAKE)
5237
+ Save();
5238
+ boolean keep = Globals.REPLACEONMAKE;
5239
+ Globals.REPLACEONMAKE = false;
45005240 if (//false) // why??
45015241 !group.selection.isEmpty())
45025242 {
....@@ -4610,10 +5350,15 @@
46105350 //node.add(csg);
46115351 //makeSomething(node);
46125352 makeSomething(csg);
5353
+ Globals.REPLACEONMAKE = keep;
46135354 }
46145355
46155356 void Ungroup(Object3D g)
46165357 {
5358
+ if (Globals.REPLACEONMAKE)
5359
+ Save();
5360
+ boolean keep = Globals.REPLACEONMAKE;
5361
+ Globals.REPLACEONMAKE = false;
46175362 if (g instanceof HiddenObject)
46185363 {
46195364 HiddenObject h = (HiddenObject) g;
....@@ -4630,6 +5375,7 @@
46305375 objEditor.makeSomething(g.get(i), false);
46315376 }
46325377 }
5378
+ Globals.REPLACEONMAKE = keep;
46335379 }
46345380
46355381 void ungroup()
....@@ -4825,21 +5571,6 @@
48255571 }
48265572 */
48275573
4828
- void ImportGFD()
4829
- {
4830
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4831
- browser.show();
4832
- String filename = browser.getFile();
4833
- if (filename != null && filename.length() > 0)
4834
- {
4835
- String fullname = browser.getDirectory() + filename;
4836
-
4837
- //Object3D readobj =
4838
- objEditor.ReadGFD(fullname, objEditor);
4839
- //makeSomething(readobj);
4840
- }
4841
- }
4842
-
48435574 /*
48445575 public void Callback(Object obj)
48455576 {
....@@ -4863,26 +5594,9 @@
48635594 }
48645595 */
48655596
4866
- void ImportVRMLX3D()
4867
- {
4868
- if (GrafreeD.standAlone)
4869
- {
4870
- /**/
4871
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4872
- browser.show();
4873
- String filename = browser.getFile();
4874
- if (filename != null && filename.length() > 0)
4875
- {
4876
- String fullname = browser.getDirectory() + filename;
4877
- LoadVRMLX3D(fullname);
4878
- }
4879
- /**/
4880
- }
4881
- }
4882
-
48835597 String GetFile(String dialogName)
48845598 {
4885
- if (GrafreeD.standAlone)
5599
+ if (Grafreed.standAlone)
48865600 {
48875601 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48885602 browser.show();
....@@ -4946,10 +5660,33 @@
49465660 cButton flashSelectionButton;
49475661 cButton editButton;
49485662 cButton uneditButton;
5663
+ JCheckBox allParamsButton;
49495664 cButton clearpanelButton;
4950
- cButton allParamsButton;
49515665 cButton unselectButton;
49525666
5667
+ cButton restoreCameraButton;
5668
+
5669
+ cButton saveButton;
5670
+ cButton oneStepButton;
5671
+
5672
+ cButton groupButton;
5673
+ cButton ungroupButton;
5674
+ cButton compositeButton;
5675
+ cButton switchButton;
5676
+ cButton loopButton;
5677
+ cButton textureButton;
5678
+
5679
+ cButton gridButton;
5680
+ cButton boxButton;
5681
+ cButton sphereButton;
5682
+ cButton coneButton;
5683
+ cButton torusButton;
5684
+ cButton superButton;
5685
+ cButton kleinButton;
5686
+ cButton particlesButton;
5687
+ cButton overlayButton;
5688
+ cButton lightButton;
5689
+
49535690 cButton screenfitButton;
49545691 cButton screenfitpointButton;
49555692 cButton snapobjectButton;
....@@ -4961,14 +5698,6 @@
49615698
49625699 cButton setsupportButton;
49635700
4964
- cButton twoButton;
4965
- cButton sixButton;
4966
- cButton threeButton;
4967
- cButton sevenButton;
4968
- cButton fourButton; // full panel
4969
- cButton oneButton; // full XYZ
4970
- //cButton currentLayout;
4971
-
49725701 //
49735702 //Composite
49745703 Object3D // to do !!
....@@ -4978,9 +5707,11 @@
49785707 //JTree jTree;
49795708 private MenuItem lookAtItem;
49805709 private MenuItem lookFromItem;
4981
- private MenuItem switchItem;
5710
+ private MenuItem switchViewItem;
49825711 private MenuItem cutItem;
4983
- private MenuItem duplicateItem;
5712
+ private MenuItem undoItem;
5713
+ private MenuItem redoItem;
5714
+ private JMenuItem duplicateItem;
49845715 private MenuItem cloneItem;
49855716 private MenuItem cloneSupportItem;
49865717 private MenuItem overwriteGeoItem;
....@@ -4993,7 +5724,7 @@
49935724 private MenuItem linkverticesItem;
49945725 private MenuItem relinkverticesItem;
49955726 private MenuItem setMasterItem;
4996
- private MenuItem resetMeshItem;
5727
+ private MenuItem resetAllItem;
49975728 private MenuItem stepAllItem;
49985729 private MenuItem revertMeshItem;
49995730 private MenuItem poseMeshItem;
....@@ -5004,10 +5735,11 @@
50045735 private MenuItem mergeGeometriesItem;
50055736 private MenuItem copyItem;
50065737 private MenuItem pasteItem;
5738
+ private MenuItem pasteIntoItem;
50075739 private MenuItem pasteLinkItem;
50085740 private MenuItem pasteCloneItem;
50095741 private MenuItem pasteExpandItem;
5010
- private MenuItem clearItem;
5742
+ private MenuItem deleteItem;
50115743 private MenuItem clearAllItem;
50125744 private MenuItem genUVItem;
50135745 private MenuItem genNormalsMESHItem;
....@@ -5042,6 +5774,10 @@
50425774 private MenuItem showleavesItem;
50435775 private MenuItem markleavesItem;
50445776 private MenuItem unmarkleavesItem;
5777
+ private MenuItem rewindleavesItem;
5778
+ private MenuItem unrewindleavesItem;
5779
+ private MenuItem randomleavesItem;
5780
+ private MenuItem unrandomleavesItem;
50455781
50465782 private MenuItem flipVItem;
50475783 private MenuItem unflipVItem;
....@@ -5053,15 +5789,17 @@
50535789 private MenuItem panoTexturesItem;
50545790
50555791 private MenuItem resetCentroidItem;
5056
- private MenuItem transformgeometryItem;
5792
+ private MenuItem resetCentroidXZItem;
50575793 private MenuItem resetTransformItem;
5794
+ private MenuItem transformGeometryItem;
5795
+ private MenuItem transformChildrenItem;
50585796 private MenuItem hideItem;
50595797 private MenuItem grabItem;
50605798 private MenuItem backItem;
50615799 private MenuItem frontItem;
50625800 private MenuItem cameraItem;
50635801 private MenuItem compositeItem;
5064
- private MenuItem randomItem;
5802
+ private MenuItem switchItem;
50655803 private MenuItem physicsItem;
50665804 private MenuItem frameselectorItem;
50675805 private MenuItem scriptNodeItem;
....@@ -5085,6 +5823,8 @@
50855823 private MenuItem attachBumpItem;
50865824 private MenuItem detachBumpItem;
50875825 private MenuItem pigmentBumpItem;
5826
+ private MenuItem embedTexturesItem;
5827
+ private MenuItem deEmbedTexturesItem;
50885828
50895829 private MenuItem particleItem;
50905830 private MenuItem ragdollItem;
....@@ -5101,7 +5841,7 @@
51015841 private MenuItem blobItem;
51025842 private MenuItem latheItem;
51035843 private MenuItem bezierItem;
5104
- private MenuItem checkerItem;
5844
+ private MenuItem overlayItem;
51055845 private MenuItem meshItem;
51065846 // private MenuItem meshGroupItem;
51075847 private MenuItem springItem;
....@@ -5123,11 +5863,6 @@
51235863 private MenuItem doubleItem;
51245864 private MenuItem tripleItem;
51255865
5126
- private MenuItem importGFDItem;
5127
- private MenuItem importVRMLX3DItem;
5128
- private MenuItem import3DSItem;
5129
- private MenuItem importOBJItem;
5130
-
51315866 private MenuItem computeAOItem;
51325867 private MenuItem recompileItem;
51335868 private MenuItem editScriptItem;
....@@ -5137,4 +5872,8 @@
51375872 private MenuItem analyzeItem;
51385873 private MenuItem dumpItem;
51395874 //boolean freezemodel = false;
5875
+
5876
+ Menu cameraMenu;
5877
+ MenuItem editCameraItem;
5878
+ MenuItem restoreCameraItem;
51405879 }