.. | .. |
---|
23 | 23 | DragGestureListener, DragSourceListener, DropTargetListener, |
---|
24 | 24 | ItemListener // ListSelectionListener |
---|
25 | 25 | { |
---|
| 26 | + |
---|
| 27 | + public void AddSkyboxButton(String f, String s, cGridBag row3) |
---|
| 28 | + { |
---|
| 29 | + cButton skyboxButton; |
---|
| 30 | + final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
| 31 | + row3.add(skyboxButton = GetButton(path + "/" + s + ".jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + skyboxButton.setToolTipText(s); |
---|
| 33 | + skyboxButton.addActionListener(new ActionListener() |
---|
| 34 | + { |
---|
| 35 | + @Override |
---|
| 36 | + public void actionPerformed(ActionEvent e) |
---|
| 37 | + { |
---|
| 38 | + ChangeSkybox(path); |
---|
| 39 | + } |
---|
| 40 | + }); |
---|
| 41 | + } |
---|
| 42 | + |
---|
| 43 | + public void ChangeSkybox(String name) |
---|
| 44 | + { |
---|
| 45 | + cameraView.envyoff = false; |
---|
| 46 | + cameraView.skyboxname = name; |
---|
| 47 | + cameraView.skyboxext = "jpg"; |
---|
| 48 | + cameraView.repaint(); |
---|
| 49 | + } |
---|
| 50 | + |
---|
26 | 51 | //ObjEditor objEditor; |
---|
27 | 52 | public void closeUI2() |
---|
28 | 53 | { |
---|
.. | .. |
---|
60 | 85 | this.copy = this.group = group; |
---|
61 | 86 | //selectees = this.group.selectees; |
---|
62 | 87 | |
---|
| 88 | + if (copy.versions == null) |
---|
| 89 | + { |
---|
| 90 | + copy.versions = new byte[100][]; |
---|
| 91 | + copy.versionindex = -1; |
---|
| 92 | + } |
---|
| 93 | + |
---|
63 | 94 | if(ui) |
---|
64 | 95 | SetupUI(objEditor); |
---|
65 | 96 | } |
---|
.. | .. |
---|
80 | 111 | SetupViews(objEditor); |
---|
81 | 112 | |
---|
82 | 113 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 114 | + |
---|
| 115 | + if (copy.versions == null) |
---|
| 116 | + { |
---|
| 117 | + copy.versions = new byte[100][]; |
---|
| 118 | + copy.versionindex = -1; |
---|
| 119 | + |
---|
| 120 | + Save(true); |
---|
| 121 | + } |
---|
83 | 122 | } |
---|
84 | 123 | |
---|
85 | 124 | void CloneSelection(boolean supports) |
---|
86 | 125 | { |
---|
| 126 | + if (Globals.REPLACEONMAKE) |
---|
| 127 | + Save(); |
---|
| 128 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 129 | + Globals.REPLACEONMAKE = false; |
---|
87 | 130 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 131 | //Object3D obj; |
---|
89 | 132 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 137 | |
---|
95 | 138 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 139 | } |
---|
| 140 | + Globals.REPLACEONMAKE = keep; |
---|
97 | 141 | } |
---|
98 | 142 | |
---|
99 | 143 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
150 | 194 | |
---|
151 | 195 | void SetupMenu2(GroupEditor oe) |
---|
152 | 196 | { |
---|
| 197 | + oe.jTree = new cTree(); |
---|
| 198 | + |
---|
153 | 199 | Menu menu; |
---|
154 | 200 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
155 | 201 | //editItem = menu.add(new MenuItem("Edit")); |
---|
.. | .. |
---|
160 | 206 | // redoItem = menu.add(new MenuItem("Redo")); |
---|
161 | 207 | // redoItem.addActionListener(this); |
---|
162 | 208 | // menu.add("-"); |
---|
163 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 209 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
164 | 210 | duplicateItem.addActionListener(this); |
---|
165 | 211 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
166 | 212 | cloneItem.addActionListener(this); |
---|
.. | .. |
---|
176 | 222 | copyItem.addActionListener(this); |
---|
177 | 223 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
178 | 224 | pasteItem.addActionListener(this); |
---|
179 | | - menu.add("-"); |
---|
180 | 225 | |
---|
181 | 226 | menu.add("-"); |
---|
182 | 227 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
.. | .. |
---|
188 | 233 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
189 | 234 | // pasteExpandItem.addActionListener(this); |
---|
190 | 235 | menu.add("-"); |
---|
191 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
192 | | - clearItem.addActionListener(this); |
---|
| 236 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 237 | + deleteItem.addActionListener(this); |
---|
193 | 238 | |
---|
194 | 239 | if (Globals.ADVANCED) |
---|
195 | 240 | { |
---|
.. | .. |
---|
203 | 248 | //zBufferItem.addActionListener(this); |
---|
204 | 249 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
205 | 250 | //normalLensItem.addActionListener(this); |
---|
206 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
207 | | - revertCameraItem.addActionListener(this); |
---|
| 251 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 252 | + restoreCameraItem.addActionListener(this); |
---|
208 | 253 | |
---|
209 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
210 | | - toggleFullScreenItem.addItemListener(this); |
---|
211 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
212 | | - cameraMenu.add("-"); |
---|
| 254 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 255 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 256 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 257 | +// cameraMenu.add("-"); |
---|
| 258 | +// |
---|
| 259 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 260 | +// toggleTextureItem.addItemListener(this); |
---|
| 261 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 262 | +// |
---|
| 263 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 264 | +// toggleSwitchItem.addItemListener(this); |
---|
| 265 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
213 | 266 | |
---|
214 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
215 | | - toggleTextureItem.addItemListener(this); |
---|
216 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
217 | | - |
---|
218 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
219 | | - toggleSwitchItem.addItemListener(this); |
---|
220 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
221 | | - |
---|
222 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 267 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
223 | 268 | toggleHandleItem.addItemListener(this); |
---|
224 | 269 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
225 | 270 | |
---|
.. | .. |
---|
246 | 291 | |
---|
247 | 292 | cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
248 | 293 | toggleDebugItem.addItemListener(this); |
---|
249 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 294 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
250 | 295 | |
---|
251 | 296 | cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
252 | 297 | toggleFrustumItem.addItemListener(this); |
---|
.. | .. |
---|
274 | 319 | { |
---|
275 | 320 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
276 | 321 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
277 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 322 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
278 | 323 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
279 | 324 | oe.cameraMenu.add("-"); |
---|
280 | 325 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
282 | 327 | editLeafItem.addActionListener(this); |
---|
283 | 328 | lookAtItem.addActionListener(this); |
---|
284 | 329 | //lookFromItem.addActinoListener(this); |
---|
285 | | - //switchItem.addActionListener(this); |
---|
| 330 | + //switchViewItem.addActionListener(this); |
---|
286 | 331 | } |
---|
287 | 332 | |
---|
288 | 333 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
327 | 372 | } |
---|
328 | 373 | |
---|
329 | 374 | oe.menuBar.add(menu = new Menu("Group")); |
---|
330 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
331 | | - grabItem.addActionListener(this); |
---|
| 375 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 376 | +// grabItem.addActionListener(this); |
---|
332 | 377 | backItem = menu.add(new MenuItem("Back")); |
---|
333 | 378 | backItem.addActionListener(this); |
---|
334 | 379 | frontItem = menu.add(new MenuItem("Front")); |
---|
335 | 380 | frontItem.addActionListener(this); |
---|
336 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
337 | | - compositeItem.addActionListener(this); |
---|
| 381 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 382 | +// compositeItem.addActionListener(this); |
---|
| 383 | + |
---|
| 384 | + if (Globals.ADVANCED) |
---|
| 385 | + { |
---|
338 | 386 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
339 | 387 | hideItem.addActionListener(this); |
---|
| 388 | + } |
---|
340 | 389 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
341 | 390 | ungroupItem.addActionListener(this); |
---|
342 | | - menu.add("-"); |
---|
343 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
344 | | - randomItem.addActionListener(this); |
---|
| 391 | + |
---|
| 392 | +// menu.add("-"); |
---|
| 393 | +// |
---|
| 394 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 395 | +// switchItem.addActionListener(this); |
---|
| 396 | + if (Globals.ADVANCED) |
---|
| 397 | + { |
---|
345 | 398 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
346 | 399 | switchGeoItem.addActionListener(this); |
---|
347 | 400 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
.. | .. |
---|
349 | 402 | morphItem = menu.add(new MenuItem("Morph Group")); |
---|
350 | 403 | morphItem.addActionListener(this); |
---|
351 | 404 | |
---|
352 | | - if (Globals.ADVANCED) |
---|
353 | | - { |
---|
354 | 405 | menu.add("-"); |
---|
355 | 406 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
356 | 407 | physicsItem.addActionListener(this); |
---|
.. | .. |
---|
358 | 409 | frameselectorItem.addActionListener(this); |
---|
359 | 410 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
360 | 411 | scriptNodeItem.addActionListener(this); |
---|
361 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
362 | | - cameraItem.addActionListener(this); |
---|
363 | 412 | } |
---|
364 | 413 | |
---|
365 | 414 | oe.menuBar.add(menu = new Menu("Object")); |
---|
366 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
367 | | - textureItem.addActionListener(this); |
---|
| 415 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 416 | +// textureItem.addActionListener(this); |
---|
368 | 417 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
369 | 418 | billboardItem.addActionListener(this); |
---|
370 | 419 | csgItem = menu.add(new MenuItem("CSG")); |
---|
371 | 420 | csgItem.addActionListener(this); |
---|
372 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 421 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
373 | 422 | shadowXItem.addActionListener(this); |
---|
374 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 423 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
375 | 424 | shadowYItem.addActionListener(this); |
---|
376 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 425 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
377 | 426 | shadowZItem.addActionListener(this); |
---|
| 427 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 428 | + attributeItem.addActionListener(this); |
---|
| 429 | + |
---|
378 | 430 | if (Globals.ADVANCED) |
---|
379 | 431 | { |
---|
380 | 432 | menu.add("-"); |
---|
381 | 433 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
382 | 434 | linkerItem.addActionListener(this); |
---|
383 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
384 | | - attributeItem.addActionListener(this); |
---|
385 | 435 | templateItem = menu.add(new MenuItem("Template")); |
---|
386 | 436 | templateItem.addActionListener(this); |
---|
387 | 437 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
410 | 460 | genNormalsMESHItem.addActionListener(this); |
---|
411 | 461 | if (Globals.ADVANCED) |
---|
412 | 462 | { |
---|
413 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 463 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
414 | 464 | genNormalsMINEItem.addActionListener(this); |
---|
415 | 465 | } |
---|
416 | 466 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
470 | 520 | markleavesItem.addActionListener(this); |
---|
471 | 521 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
472 | 522 | unmarkleavesItem.addActionListener(this); |
---|
| 523 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 524 | + rewindleavesItem.addActionListener(this); |
---|
| 525 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 526 | + unrewindleavesItem.addActionListener(this); |
---|
| 527 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 528 | + randomleavesItem.addActionListener(this); |
---|
| 529 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 530 | + unrandomleavesItem.addActionListener(this); |
---|
473 | 531 | menu.add("-"); |
---|
474 | 532 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
475 | 533 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
495 | 553 | attachBumpItem.addActionListener(this); |
---|
496 | 554 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
497 | 555 | pigmentBumpItem.addActionListener(this); |
---|
| 556 | + //embedTexturesItem |
---|
498 | 557 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
499 | 558 | detachPigmentItem.addActionListener(this); |
---|
500 | 559 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
501 | 560 | detachBumpItem.addActionListener(this); |
---|
| 561 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 562 | + embedTexturesItem.addActionListener(this); |
---|
| 563 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 564 | + deEmbedTexturesItem.addActionListener(this); |
---|
502 | 565 | menu.add("-"); |
---|
503 | 566 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
504 | 567 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
525 | 588 | buildToolsMenu(menu); |
---|
526 | 589 | } |
---|
527 | 590 | |
---|
| 591 | + |
---|
528 | 592 | void SetupUI2(ObjEditor oe) |
---|
529 | 593 | { |
---|
| 594 | + // June 2019 |
---|
| 595 | + if (oe == null) |
---|
| 596 | + { |
---|
| 597 | + //super.SetupUI2(this); |
---|
| 598 | + //return; |
---|
| 599 | + } |
---|
| 600 | + |
---|
| 601 | + if (copy != group) |
---|
| 602 | + { |
---|
| 603 | + //super.SetupUI2(this); |
---|
| 604 | + } |
---|
| 605 | + |
---|
530 | 606 | //new Exception().printStackTrace(); |
---|
531 | 607 | |
---|
532 | 608 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
555 | 631 | oe.radioPanel.add(dummyButton); |
---|
556 | 632 | oe.buttonGroup.add(dummyButton); |
---|
557 | 633 | */ |
---|
| 634 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 635 | + |
---|
| 636 | + copyOptionsPanel.preferredHeight = 2; |
---|
| 637 | + |
---|
558 | 638 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
559 | 639 | |
---|
560 | | - oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
561 | | - undoButton.setToolTipText("Undo changes"); |
---|
562 | | - undoButton.addActionListener(this); |
---|
| 640 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 641 | + //minButton.setToolTipText("Minimize window"); |
---|
| 642 | + //minButton.addActionListener(this); |
---|
563 | 643 | |
---|
564 | | - oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
565 | | - redoButton.setToolTipText("Redo changes"); |
---|
566 | | - redoButton.addActionListener(this); |
---|
| 644 | + if (Globals.ADVANCED) |
---|
| 645 | + { |
---|
| 646 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 647 | + maxButton.setToolTipText("Maximize window"); |
---|
| 648 | + maxButton.addActionListener(this); |
---|
| 649 | + } |
---|
567 | 650 | |
---|
568 | | - oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
569 | | - saveButton.setToolTipText("Save changes"); |
---|
| 651 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 652 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 653 | + fullButton.addActionListener(this); |
---|
| 654 | + |
---|
| 655 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 656 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 657 | + screenfitButton.addActionListener(this); |
---|
| 658 | + |
---|
| 659 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 660 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 661 | + restoreCameraButton.addActionListener(this); |
---|
| 662 | + |
---|
| 663 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 664 | + saveButton.setToolTipText("New version"); |
---|
570 | 665 | saveButton.addActionListener(this); |
---|
| 666 | + |
---|
| 667 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 668 | + undoButton.setToolTipText("Previous version"); |
---|
| 669 | + undoButton.addActionListener(this); |
---|
| 670 | + undoButton.setEnabled(false); |
---|
571 | 671 | |
---|
572 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 672 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 673 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 674 | + restoreButton.setToolTipText("Restore current"); |
---|
| 675 | + restoreButton.addActionListener(this); |
---|
| 676 | + restoreButton.setEnabled(false); |
---|
| 677 | + |
---|
| 678 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 679 | + replaceButton.setToolTipText("Replace current"); |
---|
| 680 | + replaceButton.addActionListener(this); |
---|
| 681 | + replaceButton.setEnabled(false); |
---|
| 682 | + |
---|
| 683 | + copyOptionsPanel.add(updown); |
---|
| 684 | + |
---|
| 685 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 686 | + redoButton.setToolTipText("Next version"); |
---|
| 687 | + redoButton.addActionListener(this); |
---|
| 688 | + redoButton.setEnabled(false); |
---|
| 689 | + |
---|
| 690 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
573 | 691 | liveCB.setToolTipText("Enable animation"); |
---|
574 | 692 | liveCB.addItemListener(this); |
---|
575 | 693 | |
---|
576 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 694 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
577 | 695 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
578 | 696 | oneStepButton.addActionListener(this); |
---|
579 | 697 | |
---|
580 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 698 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
581 | 699 | fastCB.setToolTipText("Fast mode"); |
---|
582 | 700 | fastCB.addItemListener(this); |
---|
583 | 701 | |
---|
584 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
585 | | - trackCB.setToolTipText("Enable tracking"); |
---|
586 | | - trackCB.addItemListener(this); |
---|
587 | | - |
---|
588 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
589 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
590 | | - screenfitButton.addActionListener(this); |
---|
| 702 | + //oe.toolboxPanel.Return(); |
---|
| 703 | + |
---|
| 704 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 705 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 706 | +// trackCB.addItemListener(this); |
---|
591 | 707 | |
---|
592 | 708 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
593 | 709 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
597 | 713 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
598 | 714 | snapobjectButton.addActionListener(this); |
---|
599 | 715 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 716 | + |
---|
| 717 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 718 | + fourButton.addActionListener(this); |
---|
| 719 | + fourButton.setToolTipText("Show control panel only"); |
---|
600 | 720 | } |
---|
601 | 721 | |
---|
602 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
603 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
604 | | - flashSelectionButton.addActionListener(this); |
---|
| 722 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
605 | 723 | |
---|
606 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
607 | | - |
---|
608 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
609 | | - twoButton.setToolTipText("Show center view only"); |
---|
| 724 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 725 | + twoButton.setToolTipText("Show 3D view only"); |
---|
610 | 726 | twoButton.addActionListener(this); |
---|
611 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
612 | | - fourButton.addActionListener(this); |
---|
613 | | - fourButton.setToolTipText("Show left panel only"); |
---|
614 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
615 | | - sixButton.setToolTipText("2-column layout left"); |
---|
616 | | - sixButton.addActionListener(this); |
---|
617 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
618 | | - threeButton.setToolTipText("2-column layout right"); |
---|
| 727 | + this.fullscreenLayout = twoButton; |
---|
| 728 | + |
---|
| 729 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 730 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
619 | 731 | threeButton.addActionListener(this); |
---|
620 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
621 | | - sevenButton.setToolTipText("3-column layout"); |
---|
622 | | - sevenButton.addActionListener(this); |
---|
| 732 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 733 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 734 | + sixButton.addActionListener(this); |
---|
| 735 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 736 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 737 | +// sevenButton.addActionListener(this); |
---|
623 | 738 | // |
---|
624 | 739 | |
---|
625 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
626 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 740 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 741 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
627 | 742 | rootButton.addActionListener(this); |
---|
628 | 743 | |
---|
629 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 744 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
630 | 745 | closeButton.setToolTipText("Close tab"); |
---|
631 | 746 | closeButton.addActionListener(this); |
---|
632 | 747 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
633 | 748 | //clearButton.addActionListener(this); |
---|
634 | | - |
---|
635 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 749 | + |
---|
| 750 | + cGridBag row1 = new cGridBag(); |
---|
636 | 751 | |
---|
637 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
638 | | - editButton.setToolTipText("Edit selection"); |
---|
| 752 | + // INSERT |
---|
| 753 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 754 | + gridButton.setToolTipText("Create grid"); |
---|
| 755 | + gridButton.addActionListener(this); |
---|
| 756 | + |
---|
| 757 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 758 | + boxButton.setToolTipText("Create box"); |
---|
| 759 | + boxButton.addActionListener(this); |
---|
| 760 | + |
---|
| 761 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 762 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 763 | + sphereButton.addActionListener(this); |
---|
| 764 | + |
---|
| 765 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 766 | + coneButton.setToolTipText("Create cone"); |
---|
| 767 | + coneButton.addActionListener(this); |
---|
| 768 | + |
---|
| 769 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 770 | + torusButton.setToolTipText("Create torus"); |
---|
| 771 | + torusButton.addActionListener(this); |
---|
| 772 | + |
---|
| 773 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 774 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 775 | + superButton.addActionListener(this); |
---|
| 776 | + |
---|
| 777 | + if (Globals.ADVANCED) |
---|
| 778 | + { |
---|
| 779 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 780 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 781 | + kleinButton.addActionListener(this); |
---|
| 782 | + } |
---|
| 783 | + |
---|
| 784 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 785 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 786 | + particlesButton.addActionListener(this); |
---|
| 787 | + |
---|
| 788 | + oe.toolboxPanel.add(row1); |
---|
| 789 | + |
---|
| 790 | + cGridBag row2 = new cGridBag(); |
---|
| 791 | + |
---|
| 792 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 793 | + groupButton.setToolTipText("Create group"); |
---|
| 794 | + groupButton.addActionListener(this); |
---|
| 795 | + |
---|
| 796 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 797 | + compositeButton.setToolTipText("Create composite"); |
---|
| 798 | + compositeButton.addActionListener(this); |
---|
| 799 | + |
---|
| 800 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 801 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 802 | + switchButton.addActionListener(this); |
---|
| 803 | + |
---|
| 804 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 805 | + loopButton.setToolTipText("Create loop"); |
---|
| 806 | + loopButton.addActionListener(this); |
---|
| 807 | + |
---|
| 808 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 809 | + textureButton.setToolTipText("Create texture"); |
---|
| 810 | + textureButton.addActionListener(this); |
---|
| 811 | + |
---|
| 812 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 813 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 814 | + overlayButton.addActionListener(this); |
---|
| 815 | + |
---|
| 816 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 817 | + lightButton.setToolTipText("Create light"); |
---|
| 818 | + lightButton.addActionListener(this); |
---|
| 819 | + |
---|
| 820 | + oe.toolboxPanel.add(row2); |
---|
| 821 | + |
---|
| 822 | + // ENVYMAPS |
---|
| 823 | + cGridBag row3 = new cGridBag(); |
---|
| 824 | + row3.preferredHeight = 20; |
---|
| 825 | + |
---|
| 826 | + AddSkyboxButton("default", "rgb", row3); |
---|
| 827 | + AddSkyboxButton("default", "cornell", row3); |
---|
| 828 | + AddSkyboxButton("default", "uffizi", row3); |
---|
| 829 | + AddSkyboxButton("default", "CloudyHills", row3); |
---|
| 830 | + AddSkyboxButton("default", "skycube", row3); |
---|
| 831 | + |
---|
| 832 | + oe.toolboxPanel.add(row3); |
---|
| 833 | + |
---|
| 834 | + cGridBag row4 = new cGridBag(); |
---|
| 835 | + row4.preferredHeight = 20; |
---|
| 836 | + |
---|
| 837 | + AddSkyboxButton("bridge", "Bridge2", row4); |
---|
| 838 | + AddSkyboxButton("urban", "GamlaStan2", row4); |
---|
| 839 | + AddSkyboxButton("urban", "Parliament", row4); |
---|
| 840 | + AddSkyboxButton("urban", "Roundabout", row4); |
---|
| 841 | + |
---|
| 842 | + oe.toolboxPanel.add(row4); |
---|
| 843 | + |
---|
| 844 | + cGridBag row5 = new cGridBag(); |
---|
| 845 | + row5.preferredHeight = 20; |
---|
| 846 | + |
---|
| 847 | + AddSkyboxButton("urban", "SaintLazarusChurch", row5); |
---|
| 848 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row5); |
---|
| 849 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row5); |
---|
| 850 | + AddSkyboxButton("urban", "UnionSquare", row5); |
---|
| 851 | + |
---|
| 852 | + oe.toolboxPanel.add(row5); |
---|
| 853 | + |
---|
| 854 | + cGridBag row6 = new cGridBag(); |
---|
| 855 | + row6.preferredHeight = 20; |
---|
| 856 | + |
---|
| 857 | + AddSkyboxButton("park", "BerzeliiPark", row6); |
---|
| 858 | + AddSkyboxButton("park", "Buddha", row6); |
---|
| 859 | + AddSkyboxButton("park", "CNTower2", row6); |
---|
| 860 | + //AddSkyboxButton("park", "Fatbursparken", row6); |
---|
| 861 | + AddSkyboxButton("park", "NiagaraFalls1", row6); |
---|
| 862 | + |
---|
| 863 | + oe.toolboxPanel.add(row6); |
---|
| 864 | + |
---|
| 865 | + cGridBag row7 = new cGridBag(); |
---|
| 866 | + row7.preferredHeight = 20; |
---|
| 867 | + |
---|
| 868 | + AddSkyboxButton("park", "NiagaraFalls3", row7); |
---|
| 869 | + AddSkyboxButton("park", "Park", row7); |
---|
| 870 | + //AddSkyboxButton("park", "Park2", row6); |
---|
| 871 | + //AddSkyboxButton("park", "Path", row6); |
---|
| 872 | + AddSkyboxButton("park", "Pond", row7); |
---|
| 873 | + AddSkyboxButton("park", "Skansen", row7); |
---|
| 874 | + |
---|
| 875 | + oe.toolboxPanel.add(row7); |
---|
| 876 | + |
---|
| 877 | + cGridBag row8 = new cGridBag(); |
---|
| 878 | + row8.preferredHeight = 20; |
---|
| 879 | + |
---|
| 880 | + AddSkyboxButton("park", "Skansen2", row8); |
---|
| 881 | + AddSkyboxButton("park", "Skansen3", row8); |
---|
| 882 | + AddSkyboxButton("park", "Skansen4", row8); |
---|
| 883 | + AddSkyboxButton("park", "Skansen5", row8); |
---|
| 884 | + |
---|
| 885 | + oe.toolboxPanel.add(row8); |
---|
| 886 | + |
---|
| 887 | + cGridBag row9 = new cGridBag(); |
---|
| 888 | + row9.preferredHeight = 20; |
---|
| 889 | + |
---|
| 890 | + AddSkyboxButton("park", "Stairs", row9); |
---|
| 891 | + //AddSkyboxButton("park", "Tantolunden", row6); |
---|
| 892 | + //AddSkyboxButton("park", "Tantolunden3", row6); |
---|
| 893 | + AddSkyboxButton("park", "Tantolunden4", row9); |
---|
| 894 | + |
---|
| 895 | + oe.toolboxPanel.add(row9); |
---|
| 896 | +/* |
---|
| 897 | +BerzeliiPark |
---|
| 898 | +Buddha |
---|
| 899 | +CNTower2 |
---|
| 900 | +Fatbursparken |
---|
| 901 | +NiagaraFalls1 |
---|
| 902 | +NiagaraFalls3 |
---|
| 903 | +Park |
---|
| 904 | +Park2 |
---|
| 905 | +Path |
---|
| 906 | +Pond |
---|
| 907 | +Skansen |
---|
| 908 | +Skansen2 |
---|
| 909 | +Skansen3 |
---|
| 910 | +Skansen4 |
---|
| 911 | +Skansen5 |
---|
| 912 | +Stairs |
---|
| 913 | +Tantolunden |
---|
| 914 | +Tantolunden3 |
---|
| 915 | +Tantolunden4 |
---|
| 916 | + */ |
---|
| 917 | + |
---|
| 918 | + for (int i=1; --i>=0;) |
---|
| 919 | + { |
---|
| 920 | + //oe.toolboxPanel.Return(); |
---|
| 921 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 922 | + } |
---|
| 923 | + |
---|
| 924 | + // EDIT panel |
---|
| 925 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 926 | + editButton.setToolTipText("Pin selection controls"); |
---|
639 | 927 | editButton.addActionListener(this); |
---|
640 | 928 | |
---|
641 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
642 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 929 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 930 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
643 | 931 | uneditButton.addActionListener(this); |
---|
644 | 932 | |
---|
645 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
646 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 933 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 934 | + allParamsButton.setToolTipText("Show all controle"); |
---|
647 | 935 | allParamsButton.addActionListener(this); |
---|
648 | 936 | |
---|
649 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 937 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | 938 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
651 | 939 | clearPanelButton.addActionListener(this); |
---|
652 | 940 | |
---|
653 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 941 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | 942 | unselectButton.setToolTipText("Unselect"); |
---|
655 | 943 | unselectButton.addActionListener(this); |
---|
656 | 944 | |
---|
657 | | - commandsPanel.preferredHeight = 1; |
---|
| 945 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 946 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 947 | + flashSelectionButton.addActionListener(this); |
---|
658 | 948 | |
---|
659 | | - oe.treePanel.add(commandsPanel); |
---|
660 | | - oe.treePanel.Return(); |
---|
| 949 | + editCommandsPanel.preferredHeight = 1; |
---|
| 950 | + |
---|
| 951 | + SetPinStates(false); |
---|
| 952 | +// oe.treePanel.add(commandsPanel); |
---|
| 953 | +// oe.treePanel.Return(); |
---|
661 | 954 | |
---|
662 | 955 | // oe.aConstraints.gridx += 1; |
---|
663 | 956 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
674 | 967 | |
---|
675 | 968 | JScrollPane jSP; |
---|
676 | 969 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
677 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 970 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
678 | 971 | ResetModel(); |
---|
679 | 972 | |
---|
680 | 973 | oe.treePanel.add(jSPPanel); |
---|
681 | 974 | oe.treePanel.Return(); |
---|
682 | 975 | |
---|
683 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
684 | | - |
---|
685 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
686 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
687 | | - colorCB.addItemListener(this); |
---|
688 | | - |
---|
689 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
690 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
691 | | - materialCB.addItemListener(this); |
---|
692 | | - |
---|
693 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
694 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
695 | | - textureCB.addItemListener(this); |
---|
696 | | - |
---|
697 | | - copyOptionsPanel.preferredHeight = 1; |
---|
698 | 976 | oe.treePanel.add(copyOptionsPanel); |
---|
699 | 977 | oe.treePanel.Return(); |
---|
| 978 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 979 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 980 | + sliderPane.preferredHeight = 1; |
---|
700 | 981 | |
---|
701 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
702 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 982 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 983 | + mainPanel.setResizeWeight(0.4); |
---|
703 | 984 | |
---|
704 | 985 | //jList.addListSelectionListener(this); |
---|
705 | 986 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
707 | 988 | //jTree.setEditable(true); |
---|
708 | 989 | oe.jTree.setDragEnabled(true); |
---|
709 | 990 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
710 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 991 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
711 | 992 | |
---|
712 | 993 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
713 | 994 | |
---|
.. | .. |
---|
719 | 1000 | dgr.addDragGestureListener(this); |
---|
720 | 1001 | }catch(Exception e) {} |
---|
721 | 1002 | */ |
---|
722 | | - radio.layout = sevenButton; |
---|
| 1003 | + radio.layout = sixButton; // sevenButton; |
---|
723 | 1004 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
724 | 1005 | } |
---|
725 | 1006 | |
---|
726 | 1007 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
727 | 1008 | { |
---|
| 1009 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 1010 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 1011 | + colorCB.addItemListener(this); |
---|
| 1012 | + |
---|
| 1013 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 1014 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 1015 | + materialCB.addItemListener(this); |
---|
| 1016 | + |
---|
| 1017 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 1018 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 1019 | + textureCB.addItemListener(this); |
---|
| 1020 | + |
---|
| 1021 | + panel.Return(); |
---|
| 1022 | + |
---|
728 | 1023 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
729 | 1024 | boxCB.setToolTipText("Display bounding boxes"); |
---|
730 | 1025 | boxCB.addItemListener(this); |
---|
731 | 1026 | |
---|
732 | 1027 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
733 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 1028 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
734 | 1029 | zoomBoxCB.addItemListener(this); |
---|
735 | 1030 | |
---|
736 | 1031 | if (true) // Globals.ADVANCED) |
---|
737 | 1032 | { |
---|
738 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
739 | | - supportCB.setToolTipText("Enable rigging"); |
---|
740 | | - supportCB.addItemListener(this); |
---|
| 1033 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 1034 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 1035 | +// supportCB.addItemListener(this); |
---|
| 1036 | + |
---|
| 1037 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 1038 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 1039 | + freezeCB.addItemListener(this); |
---|
741 | 1040 | |
---|
742 | 1041 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
743 | 1042 | // localCB.addItemListener(this); |
---|
744 | 1043 | |
---|
| 1044 | + panel.Return(); |
---|
| 1045 | + |
---|
745 | 1046 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
746 | 1047 | crowdCB.setToolTipText("Used for crowds"); |
---|
747 | 1048 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
758 | 1059 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
759 | 1060 | // speakerMocapCB.addItemListener(this); |
---|
760 | 1061 | |
---|
| 1062 | + panel.Return(); |
---|
| 1063 | + |
---|
761 | 1064 | if (false) |
---|
762 | 1065 | { |
---|
763 | 1066 | // handled in scripts |
---|
.. | .. |
---|
772 | 1075 | //constraints.gridy += 1; |
---|
773 | 1076 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
774 | 1077 | smoothfocusCB.addItemListener(this); |
---|
| 1078 | + panel.Return(); |
---|
775 | 1079 | } |
---|
776 | 1080 | |
---|
777 | 1081 | //constraints.gridx += 1; |
---|
778 | 1082 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
779 | 1083 | // debugCB.addItemListener(this); |
---|
780 | 1084 | |
---|
| 1085 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 1086 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 1087 | + trackCB.addItemListener(this); |
---|
| 1088 | + |
---|
781 | 1089 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 1090 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
782 | 1091 | oeilCB.addItemListener(this); |
---|
783 | 1092 | |
---|
| 1093 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 1094 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 1095 | + shadowCB.addItemListener(this); |
---|
| 1096 | + |
---|
| 1097 | + panel.Return(); |
---|
| 1098 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 1099 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 1100 | + toggleTextureCB.addItemListener(this); |
---|
| 1101 | + |
---|
| 1102 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 1103 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 1104 | + toggleSwitchCB.addItemListener(this); |
---|
| 1105 | + |
---|
| 1106 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 1107 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 1108 | + autokeepCB.addItemListener(this); |
---|
| 1109 | + |
---|
| 1110 | + panel.Return(); |
---|
| 1111 | + if (Globals.ADVANCED) |
---|
| 1112 | + { |
---|
784 | 1113 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
785 | 1114 | lookAtCB.setToolTipText("Look-at target"); |
---|
786 | 1115 | lookAtCB.addItemListener(this); |
---|
| 1116 | + } |
---|
787 | 1117 | |
---|
788 | 1118 | } |
---|
789 | 1119 | |
---|
790 | 1120 | cGridBag fill = new cGridBag(); |
---|
791 | | - |
---|
792 | 1121 | fill.preferredHeight = 200; |
---|
| 1122 | + cGridBag fill2 = new cGridBag(); |
---|
| 1123 | + fill2.preferredHeight = 200; |
---|
| 1124 | + cGridBag fill3 = new cGridBag(); |
---|
| 1125 | + fill3.preferredHeight = 200; |
---|
793 | 1126 | |
---|
794 | 1127 | panel.add(fill); |
---|
| 1128 | + panel.add(fill2); |
---|
| 1129 | + panel.add(fill3); |
---|
795 | 1130 | |
---|
796 | 1131 | } |
---|
797 | 1132 | |
---|
798 | 1133 | void EditObject(Object3D obj) |
---|
799 | 1134 | { |
---|
800 | 1135 | cRadio radioButton = new cRadio(obj.name); |
---|
| 1136 | + |
---|
| 1137 | + // June 2019. Patch to avoid bug with transparency. |
---|
| 1138 | + radioButton.hadMaterial = obj.material != null; |
---|
| 1139 | + if (!radioButton.hadMaterial) |
---|
| 1140 | + { |
---|
| 1141 | + obj.material = new cMaterial(); |
---|
| 1142 | + } |
---|
| 1143 | + |
---|
801 | 1144 | radioButton.SetObject(obj); |
---|
802 | | - radioButton.layout = sevenButton; |
---|
| 1145 | + radioButton.layout = sixButton; // sevenButton; |
---|
803 | 1146 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
804 | 1147 | radioButton.addActionListener(this); |
---|
805 | 1148 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
809 | 1152 | |
---|
810 | 1153 | void SetupViews(ObjEditor oe) |
---|
811 | 1154 | { |
---|
| 1155 | + theFrame = this; |
---|
| 1156 | + |
---|
812 | 1157 | oe.SetupViews(); |
---|
813 | 1158 | |
---|
814 | 1159 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
817 | 1162 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
818 | 1163 | } |
---|
819 | 1164 | |
---|
820 | | - JCheckBox liveCB; |
---|
821 | | - JCheckBox supportCB; |
---|
822 | | - JCheckBox localCB; |
---|
823 | | - JCheckBox crowdCB; |
---|
824 | | - JCheckBox smoothCB; |
---|
825 | | - JCheckBox fastCB; |
---|
826 | | - JCheckBox slowCB; |
---|
827 | | - JCheckBox boxCB; |
---|
828 | | - JCheckBox zoomBoxCB; |
---|
829 | | - JCheckBox trackCB; |
---|
830 | | - JCheckBox smoothfocusCB; |
---|
| 1165 | + cToggleButton liveCB; |
---|
| 1166 | + cCheckBox supportCB; |
---|
| 1167 | + cCheckBox localCB; |
---|
| 1168 | + cCheckBox crowdCB; |
---|
| 1169 | + cCheckBox smoothCB; |
---|
| 1170 | + cToggleButton fastCB; |
---|
| 1171 | + cCheckBox slowCB; |
---|
| 1172 | + cCheckBox boxCB; |
---|
| 1173 | + cCheckBox zoomBoxCB; |
---|
| 1174 | + cCheckBox freezeCB; |
---|
| 1175 | + //cToggleButton trackCB; |
---|
| 1176 | + cCheckBox trackCB; |
---|
| 1177 | + cCheckBox smoothfocusCB; |
---|
831 | 1178 | // JCheckBox speakerMocapCB; |
---|
832 | | - JCheckBox speakerCameraCB; |
---|
833 | | - JCheckBox speakerFocusCB; |
---|
834 | | - JCheckBox debugCB; |
---|
835 | | - JCheckBox oeilCB; |
---|
836 | | - JCheckBox lookAtCB; |
---|
| 1179 | + cCheckBox speakerCameraCB; |
---|
| 1180 | + cCheckBox speakerFocusCB; |
---|
| 1181 | + cCheckBox debugCB; |
---|
| 1182 | + |
---|
| 1183 | + cCheckBox oeilCB; |
---|
| 1184 | + cCheckBox shadowCB; |
---|
| 1185 | + cCheckBox autokeepCB; |
---|
| 1186 | + cCheckBox lookAtCB; |
---|
837 | 1187 | |
---|
838 | 1188 | // static int COLOR = 1; |
---|
839 | 1189 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
841 | 1191 | |
---|
842 | 1192 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
843 | 1193 | |
---|
844 | | - JCheckBox colorCB; |
---|
845 | | - JCheckBox materialCB; |
---|
846 | | - JCheckBox textureCB; |
---|
| 1194 | + cCheckBox colorCB; |
---|
| 1195 | + cCheckBox materialCB; |
---|
| 1196 | + cCheckBox textureCB; |
---|
847 | 1197 | |
---|
848 | 1198 | public void itemStateChanged(ItemEvent e) |
---|
849 | 1199 | { |
---|
.. | .. |
---|
936 | 1286 | { |
---|
937 | 1287 | cameraView.ToggleOeil(); |
---|
938 | 1288 | } |
---|
| 1289 | + else if(e.getSource() == shadowCB) |
---|
| 1290 | + { |
---|
| 1291 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1292 | + } |
---|
| 1293 | + else if(e.getSource() == freezeCB) |
---|
| 1294 | + { |
---|
| 1295 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1296 | + } |
---|
| 1297 | + else if(e.getSource() == autokeepCB) |
---|
| 1298 | + { |
---|
| 1299 | + Globals.REPLACEONMAKE ^= true; |
---|
| 1300 | + } |
---|
939 | 1301 | else if(e.getSource() == lookAtCB) |
---|
940 | 1302 | { |
---|
941 | 1303 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
952 | 1314 | |
---|
953 | 1315 | /**/ |
---|
954 | 1316 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
955 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1317 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1318 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
956 | 1319 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
957 | 1320 | // We can't move the root node or an empty selection |
---|
958 | 1321 | return; |
---|
.. | .. |
---|
1015 | 1378 | } |
---|
1016 | 1379 | } |
---|
1017 | 1380 | |
---|
1018 | | - String string = (String) object; |
---|
1019 | | - |
---|
1020 | 1381 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1021 | 1382 | // if( object instanceof java.io.File[]) |
---|
1022 | 1383 | // { |
---|
.. | .. |
---|
1024 | 1385 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1025 | 1386 | // return; |
---|
1026 | 1387 | // } |
---|
| 1388 | + |
---|
| 1389 | + String string = object.toString(); |
---|
1027 | 1390 | |
---|
1028 | 1391 | // File path for Mac and Windows |
---|
1029 | 1392 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1069 | 1432 | |
---|
1070 | 1433 | assert target == objEditor.jTree; |
---|
1071 | 1434 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1435 | + Object3D destinationLeaf; |
---|
1072 | 1436 | try { |
---|
1073 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1437 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1074 | 1438 | } catch (Exception e) { |
---|
1075 | 1439 | System.out.println("destinationPath : " + destinationPath); |
---|
1076 | 1440 | return; |
---|
1077 | 1441 | } |
---|
1078 | 1442 | |
---|
1079 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1443 | + for (int i=group.selection.size(); --i>=0;) |
---|
1080 | 1444 | { |
---|
| 1445 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1446 | + |
---|
| 1447 | + // Cannot move into itself |
---|
| 1448 | + if (child == destinationLeaf) |
---|
| 1449 | + return; |
---|
| 1450 | + } |
---|
| 1451 | + |
---|
| 1452 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1453 | +// { |
---|
1081 | 1454 | loadClipboard(true); |
---|
1082 | 1455 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
1083 | 1456 | pasteInto(false, false); |
---|
1084 | | - } else { |
---|
1085 | | - loadClipboard(false); |
---|
1086 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1087 | | - pasteInto(false, false); // true); // ??? |
---|
1088 | | - } |
---|
| 1457 | +// } else { |
---|
| 1458 | +// loadClipboard(false); |
---|
| 1459 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1460 | +// pasteInto(false, false); // true); // ??? |
---|
| 1461 | +// } |
---|
1089 | 1462 | } |
---|
1090 | 1463 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1091 | 1464 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1190 | 1563 | { |
---|
1191 | 1564 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1192 | 1565 | //heightFieldItem.addActionListener(this); |
---|
1193 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1194 | | - gridItem.addActionListener(this); |
---|
1195 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1196 | | - rectoidItem.addActionListener(this); |
---|
1197 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1198 | | - ellipsoidItem.addActionListener(this); |
---|
1199 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1200 | | - coneItem.addActionListener(this); |
---|
1201 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1202 | | - torusItem.addActionListener(this); |
---|
1203 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1204 | | - superItem.addActionListener(this); |
---|
| 1566 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1567 | +// gridItem.addActionListener(this); |
---|
| 1568 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1569 | +// rectoidItem.addActionListener(this); |
---|
| 1570 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1571 | +// ellipsoidItem.addActionListener(this); |
---|
| 1572 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1573 | +// coneItem.addActionListener(this); |
---|
| 1574 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1575 | +// torusItem.addActionListener(this); |
---|
| 1576 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1577 | +// superItem.addActionListener(this); |
---|
| 1578 | + |
---|
| 1579 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1580 | + cameraItem.addActionListener(this); |
---|
| 1581 | + |
---|
| 1582 | + if (!Globals.ADVANCED) |
---|
| 1583 | + { |
---|
1205 | 1584 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1206 | 1585 | kleinItem.addActionListener(this); |
---|
1207 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1208 | | - particleItem.addActionListener(this); |
---|
| 1586 | + } |
---|
| 1587 | + |
---|
| 1588 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1589 | +// particleItem.addActionListener(this); |
---|
1209 | 1590 | if (Globals.ADVANCED) |
---|
1210 | 1591 | { |
---|
1211 | 1592 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1231 | 1612 | } |
---|
1232 | 1613 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1233 | 1614 | bezierItem.addActionListener(this); |
---|
1234 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1235 | | - overlayItem.addActionListener(this); |
---|
1236 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1237 | | - lightItem.addActionListener(this); |
---|
| 1615 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1616 | +// overlayItem.addActionListener(this); |
---|
| 1617 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1618 | +// lightItem.addActionListener(this); |
---|
1238 | 1619 | menu.add("-"); |
---|
1239 | 1620 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1240 | 1621 | //superLoopItem.addActionListener(this); |
---|
1241 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1242 | | - loopItem.addActionListener(this); |
---|
| 1622 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1623 | +// loopItem.addActionListener(this); |
---|
1243 | 1624 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1244 | 1625 | doubleItem.addActionListener(this); |
---|
1245 | 1626 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1255 | 1636 | animationItem.addItemListener(this); |
---|
1256 | 1637 | animationItem.setState(Globals.ANIMATION); |
---|
1257 | 1638 | |
---|
| 1639 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1640 | + archiveItem.addActionListener(this); |
---|
| 1641 | + |
---|
1258 | 1642 | menu.add("-"); |
---|
1259 | 1643 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1260 | 1644 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1267 | 1651 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1268 | 1652 | reduce34MorphItem.addActionListener(this); |
---|
1269 | 1653 | menu.add("-"); |
---|
| 1654 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1655 | + memoryItem.addActionListener(this); |
---|
1270 | 1656 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1271 | 1657 | computeAOItem.addActionListener(this); |
---|
1272 | 1658 | |
---|
.. | .. |
---|
1275 | 1661 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1276 | 1662 | mirrorItem.addActionListener(this); |
---|
1277 | 1663 | menu.add("-"); |
---|
1278 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1279 | | - memoryItem.addActionListener(this); |
---|
1280 | 1664 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1281 | 1665 | analyzeItem.addActionListener(this); |
---|
1282 | 1666 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1420 | 1804 | shadow.material = new cMaterial(obj.material); |
---|
1421 | 1805 | shadow.material.diffuse = 0.0001f; |
---|
1422 | 1806 | shadow.material.specular = 0.0001f; |
---|
| 1807 | + //shadow.projectedVertices[1].x = 300; |
---|
1423 | 1808 | |
---|
1424 | 1809 | makeSomething(shadow); |
---|
1425 | 1810 | } |
---|
| 1811 | + |
---|
| 1812 | + private void ClearUnpinned() |
---|
| 1813 | + { |
---|
| 1814 | + //for (Object3D obj : listUI) |
---|
| 1815 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1816 | + { |
---|
| 1817 | + Object3D obj = listUI.elementAt(i); |
---|
| 1818 | + if (!obj.pinned) |
---|
| 1819 | + { |
---|
| 1820 | + obj.CloseUI(); |
---|
| 1821 | + listUI.remove(i); |
---|
| 1822 | + } |
---|
| 1823 | + } |
---|
| 1824 | + } |
---|
| 1825 | + |
---|
| 1826 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1827 | + { |
---|
| 1828 | + // if (!(elem instanceof Composite)) |
---|
| 1829 | + // newWindow = false; |
---|
| 1830 | + listUI.add(elem); |
---|
| 1831 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1832 | + System.out.println("edit : " + elem); |
---|
| 1833 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 1834 | + } |
---|
1426 | 1835 | |
---|
1427 | 1836 | /** |
---|
1428 | 1837 | * applyExample |
---|
.. | .. |
---|
1667 | 2076 | { |
---|
1668 | 2077 | ScreenFit(); |
---|
1669 | 2078 | } else |
---|
1670 | | - if (source == switchItem) |
---|
| 2079 | + if (source == switchViewItem) |
---|
1671 | 2080 | { |
---|
1672 | 2081 | cVector v1 = new cVector(); |
---|
1673 | 2082 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1676 | 2085 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1677 | 2086 | objEditor.cameraView.repaint(); |
---|
1678 | 2087 | } else |
---|
1679 | | - if (source == rectoidItem) |
---|
| 2088 | + if (source == rectoidItem || source == boxButton) |
---|
1680 | 2089 | { |
---|
1681 | 2090 | makeSomething(new Box()); |
---|
1682 | 2091 | } else |
---|
1683 | | - if (source == particleItem) |
---|
| 2092 | + if (source == particleItem || source == particlesButton) |
---|
1684 | 2093 | { |
---|
1685 | 2094 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1686 | 2095 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1759 | 2168 | |
---|
1760 | 2169 | makeSomething(obj); |
---|
1761 | 2170 | } else |
---|
1762 | | - if (source == gridItem) |
---|
| 2171 | + if (source == gridItem || source == gridButton) |
---|
1763 | 2172 | { |
---|
1764 | 2173 | makeSomething(new Grid()); |
---|
1765 | 2174 | } else |
---|
1766 | | - if (source == ellipsoidItem) |
---|
| 2175 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1767 | 2176 | { |
---|
1768 | 2177 | makeSomething(new Sphere()); |
---|
1769 | 2178 | } else |
---|
1770 | | - if (source == coneItem) |
---|
| 2179 | + if (source == coneItem || source == coneButton) |
---|
1771 | 2180 | { |
---|
1772 | 2181 | makeSomething(new Cone()); |
---|
1773 | 2182 | } else |
---|
1774 | | - if (source == torusItem) |
---|
| 2183 | + if (source == torusItem || source == torusButton) |
---|
1775 | 2184 | { |
---|
1776 | 2185 | makeSomething(new Torus()); |
---|
1777 | 2186 | } else |
---|
1778 | | - if (source == superItem) |
---|
| 2187 | + if (source == superItem || source == superButton) |
---|
1779 | 2188 | { |
---|
1780 | 2189 | makeSomething(new Superellipsoid()); |
---|
1781 | 2190 | } else |
---|
1782 | | - if (source == kleinItem) |
---|
| 2191 | + if (source == kleinItem || source == kleinButton) |
---|
1783 | 2192 | { |
---|
1784 | 2193 | makeSomething(new Klein()); |
---|
1785 | 2194 | } else |
---|
.. | .. |
---|
1799 | 2208 | { |
---|
1800 | 2209 | makeSomething(new BezierSurface()); |
---|
1801 | 2210 | } else |
---|
1802 | | - if (source == overlayItem) |
---|
| 2211 | + if (source == overlayItem || source == overlayButton) |
---|
1803 | 2212 | { |
---|
1804 | 2213 | /* |
---|
1805 | 2214 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1847 | 2256 | s.setup(); |
---|
1848 | 2257 | makeSomething(s); |
---|
1849 | 2258 | } else |
---|
1850 | | - if (source == lightItem) |
---|
| 2259 | + if (source == lightItem || source == lightButton) |
---|
1851 | 2260 | { |
---|
1852 | 2261 | makeSomething(new Light()); |
---|
1853 | 2262 | } else |
---|
| 2263 | +// if (source == skybox1Button || |
---|
| 2264 | +// source == skybox2Button || |
---|
| 2265 | +// source == skybox3Button || |
---|
| 2266 | +// source == skybox4Button || |
---|
| 2267 | +// source == skybox5Button || |
---|
| 2268 | +// source == skybox6Button || |
---|
| 2269 | +// source == skybox7Button || |
---|
| 2270 | +// source == skybox11Button || |
---|
| 2271 | +// source == skybox12Button || |
---|
| 2272 | +// source == skybox13Button || |
---|
| 2273 | +// source == skybox14Button || |
---|
| 2274 | +// source == skybox15Button || |
---|
| 2275 | +// source == skybox16Button || |
---|
| 2276 | +// source == skybox17Button) |
---|
| 2277 | +// { |
---|
| 2278 | +// ChangeSkybox(source); |
---|
| 2279 | +// } else |
---|
1854 | 2280 | if (source == csgItem) |
---|
1855 | 2281 | { |
---|
1856 | 2282 | group(new CSG()); |
---|
.. | .. |
---|
1897 | 2323 | |
---|
1898 | 2324 | group(g); |
---|
1899 | 2325 | } else |
---|
1900 | | - if (source == loopItem) |
---|
| 2326 | + if (source == loopItem || source == loopButton) |
---|
1901 | 2327 | { |
---|
1902 | 2328 | Composite csg = new GroupLeaf(); |
---|
1903 | 2329 | csg.count = 5; |
---|
1904 | 2330 | group(csg); |
---|
1905 | | - Composite child = new cGroup(); |
---|
| 2331 | + Composite child = new cGroup("Branch"); |
---|
1906 | 2332 | csg.addChild(child); |
---|
1907 | 2333 | child.addChild(csg); |
---|
1908 | 2334 | } else |
---|
1909 | 2335 | if (source == doubleItem) |
---|
1910 | 2336 | { |
---|
1911 | | - Composite csg = new GroupLeaf(); |
---|
| 2337 | + Composite csg = new GroupLeaf("Fork"); |
---|
1912 | 2338 | csg.count = 5; |
---|
1913 | 2339 | group(csg); |
---|
1914 | | - Composite child = new cGroup(); |
---|
| 2340 | + Composite child = new cGroup("Branch A"); |
---|
1915 | 2341 | csg.addChild(child); |
---|
1916 | 2342 | child.addChild(csg); |
---|
1917 | | - child = new cGroup(); |
---|
| 2343 | + child = new cGroup("Branch B"); |
---|
1918 | 2344 | csg.addChild(child); |
---|
1919 | 2345 | child.addChild(csg); |
---|
1920 | 2346 | } else |
---|
1921 | 2347 | if (source == tripleItem) |
---|
1922 | 2348 | { |
---|
1923 | | - Composite csg = new GroupLeaf(); |
---|
| 2349 | + Composite csg = new GroupLeaf("Trident"); |
---|
1924 | 2350 | csg.count = 4; |
---|
1925 | 2351 | group(csg); |
---|
1926 | 2352 | Composite child = new cGroup(); |
---|
.. | .. |
---|
1936 | 2362 | if (source == computeAOItem) |
---|
1937 | 2363 | { |
---|
1938 | 2364 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
1939 | | - Globals.theRenderer.repaint(); |
---|
| 2365 | + cameraView.repaint(); |
---|
1940 | 2366 | } else |
---|
1941 | 2367 | if (source == recompileItem) |
---|
1942 | 2368 | { |
---|
.. | .. |
---|
1970 | 2396 | { |
---|
1971 | 2397 | DumpObject(); |
---|
1972 | 2398 | } else |
---|
| 2399 | + if (source == minButton) |
---|
| 2400 | + { |
---|
| 2401 | + Minimize(); |
---|
| 2402 | + } else |
---|
| 2403 | + if (source == maxButton) |
---|
| 2404 | + { |
---|
| 2405 | + Maximize(); |
---|
| 2406 | + } else |
---|
| 2407 | + if (source == fullButton) |
---|
| 2408 | + { |
---|
| 2409 | + ToggleFullScreen(); |
---|
| 2410 | + } else |
---|
1973 | 2411 | if (source == undoButton) |
---|
1974 | 2412 | { |
---|
| 2413 | + // Go to previous version |
---|
| 2414 | + //if (!Undo()) |
---|
| 2415 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
1975 | 2416 | Undo(); |
---|
| 2417 | + } else |
---|
| 2418 | + if (source == restoreButton) |
---|
| 2419 | + { |
---|
| 2420 | + // Restore current version |
---|
| 2421 | + Restore(); |
---|
| 2422 | + } else |
---|
| 2423 | + if (source == replaceButton) |
---|
| 2424 | + { |
---|
| 2425 | + // Overwrite current version |
---|
| 2426 | + Replace(); |
---|
1976 | 2427 | } else |
---|
1977 | 2428 | if (source == redoButton) |
---|
1978 | 2429 | { |
---|
| 2430 | + // Go to next version |
---|
1979 | 2431 | Redo(); |
---|
1980 | 2432 | } else |
---|
1981 | 2433 | if (source == saveButton) |
---|
1982 | 2434 | { |
---|
1983 | | - Save(); |
---|
| 2435 | + // Save a new version |
---|
| 2436 | + if (!Save(true)) |
---|
| 2437 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
1984 | 2438 | } else |
---|
1985 | 2439 | if (source == oneStepButton) |
---|
1986 | 2440 | { |
---|
.. | .. |
---|
1989 | 2443 | } else |
---|
1990 | 2444 | if (source == screenfitButton) |
---|
1991 | 2445 | { |
---|
1992 | | - //Reload(lastConverter, lastFilename, true); |
---|
1993 | 2446 | ScreenFit(); |
---|
1994 | 2447 | } else |
---|
1995 | 2448 | if (source == screenfitpointButton) |
---|
1996 | 2449 | { |
---|
1997 | | - //Reload(lastConverter, lastFilename, true); |
---|
1998 | 2450 | ScreenFitPoint(); |
---|
1999 | 2451 | } else |
---|
2000 | 2452 | if (source == snapobjectButton) |
---|
2001 | 2453 | { |
---|
2002 | | - //Reload(lastConverter, lastFilename, true); |
---|
2003 | 2454 | SnapObject(); |
---|
2004 | 2455 | } else |
---|
2005 | 2456 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2363 | 2814 | { |
---|
2364 | 2815 | StepAll(); |
---|
2365 | 2816 | } else |
---|
2366 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2817 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2367 | 2818 | { |
---|
2368 | 2819 | //int indices[] = jList.getSelectedIndices(); |
---|
2369 | 2820 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2375 | 2826 | { |
---|
2376 | 2827 | ClearSelection(true); |
---|
2377 | 2828 | } else |
---|
2378 | | - if (source == grabItem) |
---|
| 2829 | + if (source == grabItem || source == groupButton) |
---|
2379 | 2830 | { |
---|
2380 | | - group(new cGroup(), true); |
---|
| 2831 | + group(new cGroup(), false); // true); |
---|
2381 | 2832 | } else |
---|
2382 | 2833 | if (source == hideItem) |
---|
2383 | 2834 | { |
---|
.. | .. |
---|
2395 | 2846 | { |
---|
2396 | 2847 | makeSomething(new Camera()); |
---|
2397 | 2848 | } else |
---|
2398 | | - if (source == compositeItem) |
---|
| 2849 | + if (source == compositeItem || source == compositeButton) |
---|
2399 | 2850 | { |
---|
2400 | 2851 | group(new Composite()); |
---|
2401 | 2852 | } else |
---|
2402 | | - if (source == randomItem) |
---|
| 2853 | + if (source == switchItem || source == switchButton) |
---|
2403 | 2854 | { |
---|
2404 | 2855 | RandomNode random = new RandomNode(); |
---|
2405 | 2856 | group(random); |
---|
.. | .. |
---|
2501 | 2952 | { |
---|
2502 | 2953 | group(new cLinker()); |
---|
2503 | 2954 | } else |
---|
2504 | | - if (source == textureItem) |
---|
| 2955 | + if (source == textureItem || source == textureButton) |
---|
2505 | 2956 | { |
---|
2506 | 2957 | group(new TextureNode()); |
---|
2507 | 2958 | } else |
---|
.. | .. |
---|
2521 | 2972 | { |
---|
2522 | 2973 | CastShadow(2); |
---|
2523 | 2974 | } else |
---|
2524 | | - if (source == ungroupItem) |
---|
| 2975 | + if (source == ungroupItem || source == ungroupButton) |
---|
2525 | 2976 | { |
---|
2526 | | - //ungroup(); |
---|
| 2977 | + boolean hasRoot = false; |
---|
| 2978 | + |
---|
2527 | 2979 | for (int i=0; i<group.selection.size(); i++) |
---|
2528 | 2980 | { |
---|
2529 | | - Ungroup(group.selection.get(i)); |
---|
| 2981 | + if (group.selection.get(i) == group) |
---|
| 2982 | + { |
---|
| 2983 | + hasRoot = true; |
---|
| 2984 | + break; |
---|
| 2985 | + } |
---|
2530 | 2986 | } |
---|
2531 | 2987 | |
---|
2532 | | - ClearSelection(false); |
---|
2533 | | - |
---|
2534 | | - refreshContents(); |
---|
| 2988 | + if (!hasRoot) |
---|
| 2989 | + { |
---|
| 2990 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2991 | + { |
---|
| 2992 | + Ungroup(group.selection.get(i)); |
---|
| 2993 | + } |
---|
| 2994 | + |
---|
| 2995 | + ClearSelection(false); |
---|
| 2996 | + |
---|
| 2997 | + refreshContents(); |
---|
| 2998 | + } |
---|
2535 | 2999 | } else |
---|
2536 | 3000 | if (source == genUVItem) |
---|
2537 | 3001 | { |
---|
.. | .. |
---|
2608 | 3072 | if (source == unmarkleavesItem) |
---|
2609 | 3073 | { |
---|
2610 | 3074 | MarkLeaves(false); |
---|
| 3075 | + } else |
---|
| 3076 | + if (source == rewindleavesItem) |
---|
| 3077 | + { |
---|
| 3078 | + RewindLeaves(true); |
---|
| 3079 | + } else |
---|
| 3080 | + if (source == unrewindleavesItem) |
---|
| 3081 | + { |
---|
| 3082 | + RewindLeaves(false); |
---|
| 3083 | + } else |
---|
| 3084 | + if (source == randomleavesItem) |
---|
| 3085 | + { |
---|
| 3086 | + RandomLeaves(true); |
---|
| 3087 | + } else |
---|
| 3088 | + if (source == unrandomleavesItem) |
---|
| 3089 | + { |
---|
| 3090 | + RandomLeaves(false); |
---|
2611 | 3091 | } else |
---|
2612 | 3092 | if (source == flipVItem) |
---|
2613 | 3093 | { |
---|
.. | .. |
---|
2816 | 3296 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2817 | 3297 | { |
---|
2818 | 3298 | obj = (Object3D)e.nextElement(); |
---|
2819 | | - obj.SetBumpTexture(null); |
---|
| 3299 | + obj.ResetBumpTexture(); |
---|
2820 | 3300 | } |
---|
2821 | 3301 | |
---|
2822 | 3302 | refreshContents(); |
---|
.. | .. |
---|
2832 | 3312 | |
---|
2833 | 3313 | refreshContents(); |
---|
2834 | 3314 | } else |
---|
| 3315 | + if (source == embedTexturesItem) |
---|
| 3316 | + { |
---|
| 3317 | + Object3D obj; |
---|
| 3318 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3319 | + { |
---|
| 3320 | + obj = (Object3D)e.nextElement(); |
---|
| 3321 | + obj.EmbedTextures(true); |
---|
| 3322 | + } |
---|
| 3323 | + |
---|
| 3324 | + refreshContents(); |
---|
| 3325 | + } else |
---|
| 3326 | + if (source == deEmbedTexturesItem) |
---|
| 3327 | + { |
---|
| 3328 | + Object3D obj; |
---|
| 3329 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3330 | + { |
---|
| 3331 | + obj = (Object3D)e.nextElement(); |
---|
| 3332 | + obj.EmbedTextures(false); |
---|
| 3333 | + } |
---|
| 3334 | + |
---|
| 3335 | + CameraPane.texturepigment.clear(); |
---|
| 3336 | + CameraPane.texturebump.clear(); |
---|
| 3337 | + |
---|
| 3338 | + refreshContents(); |
---|
| 3339 | + } else |
---|
2835 | 3340 | if (source == flashSelectionButton) |
---|
2836 | 3341 | { |
---|
2837 | 3342 | CameraPane.flash = true; |
---|
.. | .. |
---|
2843 | 3348 | if (source == twoButton) |
---|
2844 | 3349 | { |
---|
2845 | 3350 | radio.layout = twoButton; |
---|
| 3351 | + |
---|
| 3352 | + if (CameraPane.FULLSCREEN) |
---|
| 3353 | + fullscreenLayout = radio.layout; |
---|
| 3354 | + |
---|
2846 | 3355 | // bug |
---|
2847 | 3356 | //gridPanel.setDividerLocation(1.0); |
---|
2848 | 3357 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2875 | 3384 | bigThree.ClearUI(); |
---|
2876 | 3385 | bigThree.add(centralPanel); |
---|
2877 | 3386 | bigThree.FlushUI(); |
---|
| 3387 | + |
---|
| 3388 | + cameraView.requestFocusInWindow(); |
---|
| 3389 | + |
---|
| 3390 | +// refreshContents(true); |
---|
| 3391 | +// |
---|
| 3392 | +// try |
---|
| 3393 | +// { |
---|
| 3394 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3395 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3396 | +// bot.mouseMove(100, 100); |
---|
| 3397 | +// bot.mousePress(mask); |
---|
| 3398 | +// bot.mouseRelease(mask); |
---|
| 3399 | +// } |
---|
| 3400 | +// catch (Exception e) |
---|
| 3401 | +// { |
---|
| 3402 | +// |
---|
| 3403 | +// } |
---|
| 3404 | + |
---|
2878 | 3405 | } else |
---|
2879 | 3406 | if (source == threeButton) |
---|
2880 | 3407 | { |
---|
2881 | 3408 | radio.layout = threeButton; |
---|
| 3409 | + |
---|
| 3410 | + if (CameraPane.FULLSCREEN) |
---|
| 3411 | + fullscreenLayout = radio.layout; |
---|
2882 | 3412 | |
---|
2883 | 3413 | // bigThree.remove(scenePanel); |
---|
2884 | 3414 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2908 | 3438 | // centralPanel.setVisible(true); |
---|
2909 | 3439 | // XYZPanel.setVisible(true); |
---|
2910 | 3440 | bigThree.ClearUI(); |
---|
| 3441 | + bigThree.add(scenePanel); |
---|
2911 | 3442 | bigThree.add(centralPanel); |
---|
2912 | | - bigThree.add(XYZPanel); |
---|
2913 | 3443 | bigThree.FlushUI(); |
---|
| 3444 | + |
---|
| 3445 | + cameraView.requestFocusInWindow(); |
---|
2914 | 3446 | } else |
---|
2915 | 3447 | if (source == fourButton) |
---|
2916 | 3448 | { |
---|
2917 | 3449 | radio.layout = fourButton; |
---|
| 3450 | + |
---|
| 3451 | + if (CameraPane.FULLSCREEN) |
---|
| 3452 | + fullscreenLayout = radio.layout; |
---|
2918 | 3453 | |
---|
2919 | 3454 | // bigThree.remove(scenePanel); |
---|
2920 | 3455 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2946 | 3481 | bigThree.ClearUI(); |
---|
2947 | 3482 | bigThree.add(scenePanel); |
---|
2948 | 3483 | bigThree.FlushUI(); |
---|
| 3484 | + |
---|
| 3485 | + cameraView.requestFocusInWindow(); |
---|
2949 | 3486 | } else |
---|
2950 | 3487 | if (source == sixButton) |
---|
2951 | 3488 | { |
---|
2952 | 3489 | radio.layout = sixButton; |
---|
| 3490 | + |
---|
| 3491 | + if (CameraPane.FULLSCREEN) |
---|
| 3492 | + fullscreenLayout = radio.layout; |
---|
2953 | 3493 | |
---|
2954 | 3494 | // bigThree.remove(scenePanel); |
---|
2955 | 3495 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2979 | 3519 | // centralPanel.setVisible(true); |
---|
2980 | 3520 | // XYZPanel.setVisible(false); |
---|
2981 | 3521 | bigThree.ClearUI(); |
---|
2982 | | - bigThree.add(scenePanel); |
---|
2983 | 3522 | bigThree.add(centralPanel); |
---|
| 3523 | + bigThree.add(scenePanel); |
---|
2984 | 3524 | bigThree.FlushUI(); |
---|
| 3525 | + |
---|
| 3526 | + cameraView.requestFocusInWindow(); |
---|
2985 | 3527 | } else |
---|
2986 | 3528 | if (source == sevenButton) |
---|
2987 | 3529 | { |
---|
2988 | 3530 | radio.layout = sevenButton; |
---|
| 3531 | + |
---|
| 3532 | + if (CameraPane.FULLSCREEN) |
---|
| 3533 | + fullscreenLayout = radio.layout; |
---|
2989 | 3534 | |
---|
2990 | 3535 | // bigThree.remove(scenePanel); |
---|
2991 | 3536 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3019 | 3564 | bigThree.add(centralPanel); |
---|
3020 | 3565 | bigThree.add(XYZPanel); |
---|
3021 | 3566 | bigThree.FlushUI(); |
---|
| 3567 | + |
---|
| 3568 | + cameraView.requestFocusInWindow(); |
---|
3022 | 3569 | } else |
---|
3023 | 3570 | if (source == rootButton) |
---|
3024 | 3571 | { |
---|
.. | .. |
---|
3030 | 3577 | EditObject(obj); |
---|
3031 | 3578 | } |
---|
3032 | 3579 | |
---|
| 3580 | + cameraView.requestFocusInWindow(); |
---|
3033 | 3581 | refreshContents(true); |
---|
3034 | 3582 | } else |
---|
3035 | 3583 | if (source == closeButton) |
---|
.. | .. |
---|
3039 | 3587 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3040 | 3588 | { |
---|
3041 | 3589 | ab = (cRadio)e.nextElement(); |
---|
3042 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3590 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3043 | 3591 | { |
---|
| 3592 | + // Patch to avoid bug with transparency. |
---|
| 3593 | + if (!ab.hadMaterial) |
---|
| 3594 | + { |
---|
| 3595 | + ab.object.material = null; |
---|
| 3596 | + } |
---|
| 3597 | + |
---|
3044 | 3598 | buttonGroup.remove(ab); |
---|
3045 | 3599 | radioPanel.remove(ab); |
---|
3046 | 3600 | |
---|
3047 | | - ab.GetObject().editWindow = null; |
---|
| 3601 | + //ab.GetObject().editWindow = null; |
---|
| 3602 | + ab.GetObject().manipWindow = null; |
---|
3048 | 3603 | // ab.GetObject().objectUI = null; // ????????? |
---|
3049 | 3604 | |
---|
3050 | 3605 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
3051 | 3606 | break; |
---|
3052 | 3607 | } |
---|
3053 | 3608 | } |
---|
| 3609 | + |
---|
| 3610 | + cameraView.requestFocusInWindow(); |
---|
3054 | 3611 | refreshContents(true); |
---|
3055 | 3612 | } else |
---|
3056 | 3613 | if (source == editItem || source == editButton) |
---|
3057 | 3614 | { |
---|
| 3615 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3616 | + { |
---|
| 3617 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3618 | + child.pinned = true; |
---|
| 3619 | + } |
---|
| 3620 | + |
---|
3058 | 3621 | EditSelection(false); |
---|
3059 | 3622 | } else |
---|
3060 | 3623 | if (source == uneditButton) |
---|
.. | .. |
---|
3064 | 3627 | Object3D child = (Object3D)e.nextElement(); |
---|
3065 | 3628 | if(child.editWindow != null) |
---|
3066 | 3629 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3630 | + child.pinned = false; |
---|
3067 | 3631 | child.CloseUI(); |
---|
3068 | 3632 | listUI.remove(child); |
---|
3069 | 3633 | |
---|
.. | .. |
---|
3080 | 3644 | //copy.ClearUI(); |
---|
3081 | 3645 | for (Object3D obj : listUI) |
---|
3082 | 3646 | { |
---|
| 3647 | + obj.pinned = false; |
---|
3083 | 3648 | obj.CloseUI(); |
---|
3084 | 3649 | } |
---|
3085 | 3650 | listUI.clear(); |
---|
.. | .. |
---|
3089 | 3654 | { |
---|
3090 | 3655 | assert(copy == group); |
---|
3091 | 3656 | |
---|
3092 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3657 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3093 | 3658 | |
---|
3094 | 3659 | for (Object3D obj : listUI) |
---|
3095 | 3660 | { |
---|
.. | .. |
---|
3138 | 3703 | } |
---|
3139 | 3704 | |
---|
3140 | 3705 | copy = group; |
---|
| 3706 | + |
---|
| 3707 | + SetUndoStates(); |
---|
| 3708 | + |
---|
3141 | 3709 | //Globals.theRenderer.object = group; |
---|
3142 | 3710 | if(!useclient) |
---|
3143 | 3711 | { |
---|
.. | .. |
---|
3155 | 3723 | } |
---|
3156 | 3724 | |
---|
3157 | 3725 | // fix "+" issue |
---|
3158 | | - group.editWindow = this; |
---|
| 3726 | + //group.editWindow = this; |
---|
| 3727 | + group.manipWindow = this; |
---|
3159 | 3728 | |
---|
3160 | 3729 | /* |
---|
3161 | 3730 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3163 | 3732 | currentLayout = sevenButton; |
---|
3164 | 3733 | */ |
---|
3165 | 3734 | radio.layout.doClick(); |
---|
| 3735 | + |
---|
| 3736 | + ClearUnpinned(); |
---|
| 3737 | + //Grafreed.Assert(group != null); |
---|
| 3738 | + //Grafreed.Assert(group.selection != null); |
---|
| 3739 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3740 | + if (group.selection == null || group.selection.size() == 1) |
---|
| 3741 | + EditSelection(false); |
---|
3166 | 3742 | keepparent = group.parent; |
---|
3167 | 3743 | // PARENT = NULL or not??? |
---|
3168 | 3744 | //group.parent = null; // ROOT |
---|
3169 | 3745 | //group.attributes = -1; |
---|
3170 | 3746 | ResetModel(); |
---|
| 3747 | + |
---|
| 3748 | + cameraView.requestFocusInWindow(); |
---|
3171 | 3749 | refreshContents(true); |
---|
3172 | 3750 | } else if (event.getSource() == editCameraItem) |
---|
3173 | 3751 | { |
---|
3174 | 3752 | cameraView.ProtectCamera(); |
---|
3175 | 3753 | cameraView.repaint(); |
---|
3176 | 3754 | return; |
---|
3177 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3755 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3178 | 3756 | { |
---|
3179 | 3757 | cameraView.RevertCamera(); |
---|
3180 | 3758 | cameraView.repaint(); |
---|
.. | .. |
---|
3191 | 3769 | } |
---|
3192 | 3770 | |
---|
3193 | 3771 | boolean useclient = false; |
---|
3194 | | - cRadio radio; |
---|
3195 | 3772 | |
---|
3196 | 3773 | void ToggleRoot() |
---|
3197 | 3774 | { |
---|
.. | .. |
---|
3754 | 4331 | |
---|
3755 | 4332 | try |
---|
3756 | 4333 | { |
---|
3757 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4334 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
3758 | 4335 | } |
---|
3759 | 4336 | catch (Exception e) |
---|
3760 | 4337 | { |
---|
.. | .. |
---|
4146 | 4723 | refreshContents(); |
---|
4147 | 4724 | } |
---|
4148 | 4725 | |
---|
| 4726 | + void RewindLeaves(boolean hide) |
---|
| 4727 | + { |
---|
| 4728 | + group.selection.RewindLeaves(hide); |
---|
| 4729 | + refreshContents(); |
---|
| 4730 | + } |
---|
| 4731 | + |
---|
| 4732 | + void RandomLeaves(boolean hide) |
---|
| 4733 | + { |
---|
| 4734 | + group.selection.RandomLeaves(hide); |
---|
| 4735 | + refreshContents(); |
---|
| 4736 | + } |
---|
| 4737 | + |
---|
4149 | 4738 | void SetTexRes(int tr) |
---|
4150 | 4739 | { |
---|
4151 | 4740 | group.selection.SetTexRes(tr); |
---|
.. | .. |
---|
4217 | 4806 | // } |
---|
4218 | 4807 | // } |
---|
4219 | 4808 | |
---|
4220 | | - static boolean allparams = true; |
---|
4221 | | - |
---|
4222 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4223 | | - |
---|
4224 | 4809 | void EditSelection(boolean newWindow) |
---|
4225 | 4810 | { |
---|
| 4811 | + if (group.selection == null) |
---|
| 4812 | + { |
---|
| 4813 | + EditElement(group, newWindow); // ? new |
---|
| 4814 | + return; |
---|
| 4815 | + } |
---|
| 4816 | + |
---|
4226 | 4817 | // aConstraints.gridy = 0; |
---|
4227 | 4818 | for (int i=0; i<group.selection.size(); i++) |
---|
4228 | 4819 | { |
---|
4229 | 4820 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4230 | 4821 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4231 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4822 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4232 | 4823 | |
---|
4233 | 4824 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4234 | 4825 | if(elem != group || !newWindow) |
---|
4235 | 4826 | { |
---|
4236 | | - // if (!(elem instanceof Composite)) |
---|
4237 | | - // newWindow = false; |
---|
4238 | | - listUI.add(elem); |
---|
4239 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4240 | | - System.out.println("edit : " + elem); |
---|
4241 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4827 | + EditElement(elem, newWindow); // ? new |
---|
4242 | 4828 | } |
---|
4243 | 4829 | } |
---|
4244 | 4830 | } |
---|
.. | .. |
---|
4313 | 4899 | //new Exception().printStackTrace(); |
---|
4314 | 4900 | |
---|
4315 | 4901 | freezemodel = true; |
---|
4316 | | - |
---|
| 4902 | + ClearUnpinned(); |
---|
| 4903 | + |
---|
4317 | 4904 | /**/ |
---|
4318 | 4905 | //switch (event.id) |
---|
4319 | 4906 | { |
---|
.. | .. |
---|
4329 | 4916 | |
---|
4330 | 4917 | //if (child.parent != null) |
---|
4331 | 4918 | //child.parent.addSelectee(child); |
---|
| 4919 | + objEditor.SetMaterial(child); |
---|
4332 | 4920 | group.addSelectee(child); |
---|
4333 | 4921 | } |
---|
4334 | 4922 | } |
---|
.. | .. |
---|
4345 | 4933 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4346 | 4934 | // a camera |
---|
4347 | 4935 | { |
---|
4348 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4936 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
4349 | 4937 | { |
---|
4350 | 4938 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4351 | 4939 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4354 | 4942 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4355 | 4943 | } |
---|
4356 | 4944 | |
---|
| 4945 | + if (tps != null && tps.length == 1) |
---|
| 4946 | + { |
---|
| 4947 | + EditSelection(false); |
---|
| 4948 | + } |
---|
| 4949 | + |
---|
| 4950 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4951 | + |
---|
4357 | 4952 | refreshContents(); |
---|
4358 | 4953 | //return true; |
---|
4359 | 4954 | } |
---|
.. | .. |
---|
4363 | 4958 | freezemodel = false; |
---|
4364 | 4959 | } |
---|
4365 | 4960 | |
---|
| 4961 | + void SetPinStates(boolean enabled) |
---|
| 4962 | + { |
---|
| 4963 | + editButton.setEnabled(enabled); |
---|
| 4964 | + uneditButton.setEnabled(enabled); |
---|
| 4965 | + unselectButton.setEnabled(enabled); |
---|
| 4966 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4967 | + } |
---|
| 4968 | + |
---|
4366 | 4969 | void refreshContents(boolean cp) |
---|
4367 | 4970 | { |
---|
4368 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 4971 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 4972 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4369 | 4973 | { |
---|
4370 | 4974 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4371 | 4975 | |
---|
4372 | | - for (int i=0; i < group.selection.size(); i++) |
---|
| 4976 | + for (int i=0; i < group.selection.Size(); i++) |
---|
4373 | 4977 | { |
---|
4374 | | - Object3D child = (Object3D) group.selection.reserve(i); |
---|
| 4978 | + Object3D child = (Object3D) group.selection.get(i); |
---|
4375 | 4979 | |
---|
4376 | | - objEditor.SetMaterial(child); |
---|
4377 | 4980 | objEditor.AddInfo(child, this, true); |
---|
4378 | 4981 | System.err.println("info : " + child.GetPath()); |
---|
4379 | | - |
---|
4380 | | - group.selection.release(i); |
---|
4381 | 4982 | } |
---|
4382 | 4983 | |
---|
4383 | 4984 | objEditor.SetText(); // jan 2014 |
---|
.. | .. |
---|
4467 | 5068 | |
---|
4468 | 5069 | if (cut) |
---|
4469 | 5070 | { |
---|
4470 | | - Save(); |
---|
| 5071 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 5072 | +// Save(); |
---|
4471 | 5073 | //int indices[] = jList.getSelectedIndices(); |
---|
4472 | 5074 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4473 | 5075 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4570 | 5172 | |
---|
4571 | 5173 | void paste(boolean expand) |
---|
4572 | 5174 | { |
---|
| 5175 | + if (Globals.REPLACEONMAKE) |
---|
| 5176 | + Save(); |
---|
| 5177 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5178 | + Globals.REPLACEONMAKE = false; |
---|
4573 | 5179 | // if (GrafreeD.clipboard == null) |
---|
4574 | 5180 | // return; |
---|
4575 | 5181 | boolean first = true; |
---|
.. | .. |
---|
4629 | 5235 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4630 | 5236 | } |
---|
4631 | 5237 | |
---|
| 5238 | + Globals.REPLACEONMAKE = keep; |
---|
4632 | 5239 | ResetModel(); |
---|
4633 | 5240 | refreshContents(); |
---|
4634 | 5241 | } |
---|
.. | .. |
---|
4764 | 5371 | |
---|
4765 | 5372 | void group(Object3D csg, boolean grab) |
---|
4766 | 5373 | { |
---|
| 5374 | + if (Globals.REPLACEONMAKE) |
---|
| 5375 | + Save(); |
---|
| 5376 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5377 | + Globals.REPLACEONMAKE = false; |
---|
4767 | 5378 | if (//false) // why?? |
---|
4768 | 5379 | !group.selection.isEmpty()) |
---|
4769 | 5380 | { |
---|
.. | .. |
---|
4877 | 5488 | //node.add(csg); |
---|
4878 | 5489 | //makeSomething(node); |
---|
4879 | 5490 | makeSomething(csg); |
---|
| 5491 | + Globals.REPLACEONMAKE = keep; |
---|
4880 | 5492 | } |
---|
4881 | 5493 | |
---|
4882 | 5494 | void Ungroup(Object3D g) |
---|
4883 | 5495 | { |
---|
| 5496 | + if (Globals.REPLACEONMAKE) |
---|
| 5497 | + Save(); |
---|
| 5498 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5499 | + Globals.REPLACEONMAKE = false; |
---|
4884 | 5500 | if (g instanceof HiddenObject) |
---|
4885 | 5501 | { |
---|
4886 | 5502 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
4897 | 5513 | objEditor.makeSomething(g.get(i), false); |
---|
4898 | 5514 | } |
---|
4899 | 5515 | } |
---|
| 5516 | + Globals.REPLACEONMAKE = keep; |
---|
4900 | 5517 | } |
---|
4901 | 5518 | |
---|
4902 | 5519 | void ungroup() |
---|
.. | .. |
---|
5185 | 5802 | cButton clearpanelButton; |
---|
5186 | 5803 | cButton unselectButton; |
---|
5187 | 5804 | |
---|
| 5805 | + cButton restoreCameraButton; |
---|
| 5806 | + |
---|
5188 | 5807 | cButton saveButton; |
---|
5189 | | - cButton undoButton; |
---|
5190 | | - cButton redoButton; |
---|
5191 | 5808 | cButton oneStepButton; |
---|
| 5809 | + |
---|
| 5810 | + cButton groupButton; |
---|
| 5811 | + cButton ungroupButton; |
---|
| 5812 | + cButton compositeButton; |
---|
| 5813 | + cButton switchButton; |
---|
| 5814 | + cButton loopButton; |
---|
| 5815 | + cButton textureButton; |
---|
| 5816 | + |
---|
| 5817 | + cButton skybox1Button; |
---|
| 5818 | + cButton skybox2Button; |
---|
| 5819 | + cButton skybox3Button; |
---|
| 5820 | + cButton skybox4Button; |
---|
| 5821 | + cButton skybox5Button; |
---|
| 5822 | + cButton skybox6Button; |
---|
| 5823 | + cButton skybox7Button; |
---|
| 5824 | + |
---|
| 5825 | + cButton skybox11Button; |
---|
| 5826 | + cButton skybox12Button; |
---|
| 5827 | + cButton skybox13Button; |
---|
| 5828 | + cButton skybox14Button; |
---|
| 5829 | + cButton skybox15Button; |
---|
| 5830 | + cButton skybox16Button; |
---|
| 5831 | + cButton skybox17Button; |
---|
| 5832 | + |
---|
| 5833 | + cButton gridButton; |
---|
| 5834 | + cButton boxButton; |
---|
| 5835 | + cButton sphereButton; |
---|
| 5836 | + cButton coneButton; |
---|
| 5837 | + cButton torusButton; |
---|
| 5838 | + cButton superButton; |
---|
| 5839 | + cButton kleinButton; |
---|
| 5840 | + cButton particlesButton; |
---|
| 5841 | + cButton overlayButton; |
---|
| 5842 | + cButton lightButton; |
---|
5192 | 5843 | |
---|
5193 | 5844 | cButton screenfitButton; |
---|
5194 | 5845 | cButton screenfitpointButton; |
---|
.. | .. |
---|
5201 | 5852 | |
---|
5202 | 5853 | cButton setsupportButton; |
---|
5203 | 5854 | |
---|
5204 | | - cButton twoButton; |
---|
5205 | | - cButton sixButton; |
---|
5206 | | - cButton threeButton; |
---|
5207 | | - cButton sevenButton; |
---|
5208 | | - cButton fourButton; // full panel |
---|
5209 | | - cButton oneButton; // full XYZ |
---|
5210 | | - //cButton currentLayout; |
---|
5211 | | - |
---|
5212 | 5855 | // |
---|
5213 | 5856 | //Composite |
---|
5214 | 5857 | Object3D // to do !! |
---|
.. | .. |
---|
5218 | 5861 | //JTree jTree; |
---|
5219 | 5862 | private MenuItem lookAtItem; |
---|
5220 | 5863 | private MenuItem lookFromItem; |
---|
5221 | | - private MenuItem switchItem; |
---|
| 5864 | + private MenuItem switchViewItem; |
---|
5222 | 5865 | private MenuItem cutItem; |
---|
5223 | 5866 | private MenuItem undoItem; |
---|
5224 | 5867 | private MenuItem redoItem; |
---|
5225 | | - private MenuItem duplicateItem; |
---|
| 5868 | + private JMenuItem duplicateItem; |
---|
5226 | 5869 | private MenuItem cloneItem; |
---|
5227 | 5870 | private MenuItem cloneSupportItem; |
---|
5228 | 5871 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5250 | 5893 | private MenuItem pasteLinkItem; |
---|
5251 | 5894 | private MenuItem pasteCloneItem; |
---|
5252 | 5895 | private MenuItem pasteExpandItem; |
---|
5253 | | - private MenuItem clearItem; |
---|
| 5896 | + private MenuItem deleteItem; |
---|
5254 | 5897 | private MenuItem clearAllItem; |
---|
5255 | 5898 | private MenuItem genUVItem; |
---|
5256 | 5899 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5285 | 5928 | private MenuItem showleavesItem; |
---|
5286 | 5929 | private MenuItem markleavesItem; |
---|
5287 | 5930 | private MenuItem unmarkleavesItem; |
---|
| 5931 | + private MenuItem rewindleavesItem; |
---|
| 5932 | + private MenuItem unrewindleavesItem; |
---|
| 5933 | + private MenuItem randomleavesItem; |
---|
| 5934 | + private MenuItem unrandomleavesItem; |
---|
5288 | 5935 | |
---|
5289 | 5936 | private MenuItem flipVItem; |
---|
5290 | 5937 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5306 | 5953 | private MenuItem frontItem; |
---|
5307 | 5954 | private MenuItem cameraItem; |
---|
5308 | 5955 | private MenuItem compositeItem; |
---|
5309 | | - private MenuItem randomItem; |
---|
| 5956 | + private MenuItem switchItem; |
---|
5310 | 5957 | private MenuItem physicsItem; |
---|
5311 | 5958 | private MenuItem frameselectorItem; |
---|
5312 | 5959 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5330 | 5977 | private MenuItem attachBumpItem; |
---|
5331 | 5978 | private MenuItem detachBumpItem; |
---|
5332 | 5979 | private MenuItem pigmentBumpItem; |
---|
| 5980 | + private MenuItem embedTexturesItem; |
---|
| 5981 | + private MenuItem deEmbedTexturesItem; |
---|
5333 | 5982 | |
---|
5334 | 5983 | private MenuItem particleItem; |
---|
5335 | 5984 | private MenuItem ragdollItem; |
---|
.. | .. |
---|
5380 | 6029 | |
---|
5381 | 6030 | Menu cameraMenu; |
---|
5382 | 6031 | MenuItem editCameraItem; |
---|
5383 | | - MenuItem revertCameraItem; |
---|
| 6032 | + MenuItem restoreCameraItem; |
---|
5384 | 6033 | } |
---|