.. | .. |
---|
74 | 74 | this.copy = this.group = copy; |
---|
75 | 75 | //selectees = this.group.selectees; |
---|
76 | 76 | |
---|
77 | | - SetupMenu2(objEditor); |
---|
| 77 | + SetupMenu2(this); //objEditor); |
---|
78 | 78 | SetupUI2(objEditor); |
---|
79 | 79 | objEditor.SetupUI(true); |
---|
80 | 80 | SetupViews(objEditor); |
---|
.. | .. |
---|
84 | 84 | |
---|
85 | 85 | void CloneSelection(boolean supports) |
---|
86 | 86 | { |
---|
| 87 | + if (Globals.SAVEONMAKE) |
---|
| 88 | + Save(); |
---|
| 89 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 90 | + Globals.SAVEONMAKE = false; |
---|
87 | 91 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 92 | //Object3D obj; |
---|
89 | 93 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 98 | |
---|
95 | 99 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 100 | } |
---|
| 101 | + Globals.SAVEONMAKE = keep; |
---|
97 | 102 | } |
---|
98 | 103 | |
---|
99 | 104 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
148 | 153 | |
---|
149 | 154 | //JTextField nameField; |
---|
150 | 155 | |
---|
151 | | - void SetupMenu2(ObjEditor oe) |
---|
| 156 | + void SetupMenu2(GroupEditor oe) |
---|
152 | 157 | { |
---|
153 | | - if (Globals.ADVANCED) |
---|
154 | | - { |
---|
155 | | - oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
156 | | - //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
157 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
158 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
159 | | - oe.cameraMenu.add("-"); |
---|
160 | | - openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
161 | | - openWindowItem.addActionListener(this); |
---|
162 | | - editLeafItem.addActionListener(this); |
---|
163 | | - lookAtItem.addActionListener(this); |
---|
164 | | - //lookFromItem.addActinoListener(this); |
---|
165 | | - //switchItem.addActionListener(this); |
---|
166 | | - } |
---|
167 | | - |
---|
| 158 | + oe.jTree = new cTree(); |
---|
| 159 | + |
---|
168 | 160 | Menu menu; |
---|
169 | 161 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
170 | 162 | //editItem = menu.add(new MenuItem("Edit")); |
---|
171 | 163 | //editItem.addActionListener(this); |
---|
172 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 164 | + |
---|
| 165 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 166 | +// undoItem.addActionListener(this); |
---|
| 167 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 168 | +// redoItem.addActionListener(this); |
---|
| 169 | +// menu.add("-"); |
---|
| 170 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
173 | 171 | duplicateItem.addActionListener(this); |
---|
174 | 172 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
175 | 173 | cloneItem.addActionListener(this); |
---|
.. | .. |
---|
185 | 183 | copyItem.addActionListener(this); |
---|
186 | 184 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
187 | 185 | pasteItem.addActionListener(this); |
---|
188 | | - menu.add("-"); |
---|
189 | 186 | |
---|
190 | 187 | menu.add("-"); |
---|
191 | 188 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
.. | .. |
---|
206 | 203 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
207 | 204 | clearAllItem.addActionListener(this); |
---|
208 | 205 | } |
---|
| 206 | + |
---|
| 207 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 208 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 209 | + //zBufferItem.addActionListener(this); |
---|
| 210 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 211 | + //normalLensItem.addActionListener(this); |
---|
| 212 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 213 | + restoreCameraItem.addActionListener(this); |
---|
| 214 | + |
---|
| 215 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 216 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 217 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 218 | +// cameraMenu.add("-"); |
---|
| 219 | +// |
---|
| 220 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 221 | +// toggleTextureItem.addItemListener(this); |
---|
| 222 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 223 | +// |
---|
| 224 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 225 | +// toggleSwitchItem.addItemListener(this); |
---|
| 226 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 227 | + |
---|
| 228 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
| 229 | + toggleHandleItem.addItemListener(this); |
---|
| 230 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 231 | + |
---|
| 232 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 233 | + togglePaintItem.addItemListener(this); |
---|
| 234 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 235 | + |
---|
| 236 | + if (Globals.ADVANCED) |
---|
| 237 | + { |
---|
| 238 | + cameraMenu.add("-"); |
---|
| 239 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 240 | + toggleLiveItem.addItemListener(this); |
---|
| 241 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
209 | 242 | |
---|
| 243 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 244 | + stepItem.addActionListener(this); |
---|
| 245 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 246 | + // toggleDLItem.addItemListener(this); |
---|
| 247 | + // toggleDLItem.setState(false); |
---|
| 248 | + |
---|
| 249 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 250 | + toggleRenderItem.addItemListener(this); |
---|
| 251 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 252 | + |
---|
| 253 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 254 | + toggleDebugItem.addItemListener(this); |
---|
| 255 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
| 256 | + |
---|
| 257 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 258 | + toggleFrustumItem.addItemListener(this); |
---|
| 259 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 260 | + |
---|
| 261 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 262 | + toggleFootContactItem.addItemListener(this); |
---|
| 263 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 264 | + |
---|
| 265 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 266 | + toggleTimelineItem.addItemListener(this); |
---|
| 267 | + } |
---|
| 268 | + |
---|
| 269 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 270 | +// toggleRootItem.addItemListener(this); |
---|
| 271 | +// toggleRootItem.setState(false); |
---|
| 272 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 273 | +// animationItem.addItemListener(this); |
---|
| 274 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 275 | + cameraMenu.add("-"); |
---|
| 276 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 277 | + editCameraItem.addActionListener(this); |
---|
| 278 | + |
---|
| 279 | + if (Globals.ADVANCED) |
---|
| 280 | + { |
---|
| 281 | + oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
| 282 | + //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
| 283 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
| 284 | + editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
| 285 | + oe.cameraMenu.add("-"); |
---|
| 286 | + openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
| 287 | + openWindowItem.addActionListener(this); |
---|
| 288 | + editLeafItem.addActionListener(this); |
---|
| 289 | + lookAtItem.addActionListener(this); |
---|
| 290 | + //lookFromItem.addActinoListener(this); |
---|
| 291 | + //switchViewItem.addActionListener(this); |
---|
| 292 | + } |
---|
| 293 | + |
---|
210 | 294 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
211 | 295 | if (Globals.ADVANCED) |
---|
212 | 296 | { |
---|
213 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
214 | | - resetMeshItem.addActionListener(this); |
---|
215 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
216 | | - stepAllItem.addActionListener(this); |
---|
217 | 297 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
218 | 298 | revertMeshItem.addActionListener(this); |
---|
219 | 299 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
.. | .. |
---|
253 | 333 | } |
---|
254 | 334 | |
---|
255 | 335 | oe.menuBar.add(menu = new Menu("Group")); |
---|
256 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
257 | | - grabItem.addActionListener(this); |
---|
| 336 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 337 | +// grabItem.addActionListener(this); |
---|
258 | 338 | backItem = menu.add(new MenuItem("Back")); |
---|
259 | 339 | backItem.addActionListener(this); |
---|
260 | 340 | frontItem = menu.add(new MenuItem("Front")); |
---|
261 | 341 | frontItem.addActionListener(this); |
---|
262 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
263 | | - compositeItem.addActionListener(this); |
---|
| 342 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 343 | +// compositeItem.addActionListener(this); |
---|
| 344 | + |
---|
| 345 | + if (Globals.ADVANCED) |
---|
| 346 | + { |
---|
264 | 347 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
265 | 348 | hideItem.addActionListener(this); |
---|
| 349 | + } |
---|
266 | 350 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
267 | 351 | ungroupItem.addActionListener(this); |
---|
268 | | - menu.add("-"); |
---|
269 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
270 | | - randomItem.addActionListener(this); |
---|
| 352 | + |
---|
| 353 | +// menu.add("-"); |
---|
| 354 | +// |
---|
| 355 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 356 | +// switchItem.addActionListener(this); |
---|
| 357 | + if (Globals.ADVANCED) |
---|
| 358 | + { |
---|
271 | 359 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
272 | 360 | switchGeoItem.addActionListener(this); |
---|
273 | 361 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
.. | .. |
---|
275 | 363 | morphItem = menu.add(new MenuItem("Morph Group")); |
---|
276 | 364 | morphItem.addActionListener(this); |
---|
277 | 365 | |
---|
278 | | - if (Globals.ADVANCED) |
---|
279 | | - { |
---|
280 | 366 | menu.add("-"); |
---|
281 | 367 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
282 | 368 | physicsItem.addActionListener(this); |
---|
.. | .. |
---|
284 | 370 | frameselectorItem.addActionListener(this); |
---|
285 | 371 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
286 | 372 | scriptNodeItem.addActionListener(this); |
---|
287 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
288 | | - cameraItem.addActionListener(this); |
---|
289 | 373 | } |
---|
290 | 374 | |
---|
291 | 375 | oe.menuBar.add(menu = new Menu("Object")); |
---|
292 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
293 | | - textureItem.addActionListener(this); |
---|
| 376 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 377 | +// textureItem.addActionListener(this); |
---|
294 | 378 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
295 | 379 | billboardItem.addActionListener(this); |
---|
296 | 380 | csgItem = menu.add(new MenuItem("CSG")); |
---|
297 | 381 | csgItem.addActionListener(this); |
---|
298 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 382 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
299 | 383 | shadowXItem.addActionListener(this); |
---|
300 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 384 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
301 | 385 | shadowYItem.addActionListener(this); |
---|
302 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 386 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
303 | 387 | shadowZItem.addActionListener(this); |
---|
| 388 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 389 | + attributeItem.addActionListener(this); |
---|
| 390 | + |
---|
304 | 391 | if (Globals.ADVANCED) |
---|
305 | 392 | { |
---|
306 | 393 | menu.add("-"); |
---|
307 | 394 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
308 | 395 | linkerItem.addActionListener(this); |
---|
309 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
310 | | - attributeItem.addActionListener(this); |
---|
311 | 396 | templateItem = menu.add(new MenuItem("Template")); |
---|
312 | 397 | templateItem.addActionListener(this); |
---|
313 | 398 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
318 | 403 | resetTransformItem.addActionListener(this); |
---|
319 | 404 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
320 | 405 | resetCentroidItem.addActionListener(this); |
---|
321 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
322 | | - transformgeometryItem.addActionListener(this); |
---|
| 406 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 407 | + resetCentroidXZItem.addActionListener(this); |
---|
| 408 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 409 | + transformGeometryItem.addActionListener(this); |
---|
| 410 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 411 | + transformChildrenItem.addActionListener(this); |
---|
323 | 412 | |
---|
324 | 413 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
325 | 414 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
368 | 457 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
369 | 458 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
370 | 459 | clearMaterialsItem.addActionListener(this); |
---|
| 460 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 461 | + resetAllItem.addActionListener(this); |
---|
| 462 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 463 | + stepAllItem.addActionListener(this); |
---|
371 | 464 | menu.add("-"); |
---|
372 | 465 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
373 | 466 | liveleavesItem.addActionListener(this); |
---|
.. | .. |
---|
388 | 481 | markleavesItem.addActionListener(this); |
---|
389 | 482 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
390 | 483 | unmarkleavesItem.addActionListener(this); |
---|
| 484 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 485 | + rewindleavesItem.addActionListener(this); |
---|
| 486 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 487 | + unrewindleavesItem.addActionListener(this); |
---|
| 488 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 489 | + randomleavesItem.addActionListener(this); |
---|
| 490 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 491 | + unrandomleavesItem.addActionListener(this); |
---|
391 | 492 | menu.add("-"); |
---|
392 | 493 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
393 | 494 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
422 | 523 | sortbysizeItem.addActionListener(this); |
---|
423 | 524 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
424 | 525 | sortbynameItem.addActionListener(this); |
---|
| 526 | + menu.add("-"); |
---|
| 527 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 528 | + shareGeometriesItem.addActionListener(this); |
---|
| 529 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 530 | + mergeGeometriesItem.addActionListener(this); |
---|
425 | 531 | if (Globals.ADVANCED) |
---|
426 | 532 | { |
---|
427 | | - menu.add("-"); |
---|
| 533 | + // Pretty much the same as duplicate and clone. |
---|
428 | 534 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
429 | 535 | extractGeometriesItem.addActionListener(this); |
---|
430 | 536 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
431 | 537 | cloneGeometriesItem.addActionListener(this); |
---|
432 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
433 | | - shareGeometriesItem.addActionListener(this); |
---|
434 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
435 | | - mergeGeometriesItem.addActionListener(this); |
---|
436 | 538 | } |
---|
437 | 539 | |
---|
438 | 540 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
439 | 541 | buildCreateMenu(menu); |
---|
440 | 542 | |
---|
441 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
442 | | - importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
443 | | - importOBJItem.addActionListener(this); |
---|
444 | | - menu.add("-"); |
---|
445 | | - import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
446 | | - import3DSItem.addActionListener(this); |
---|
447 | | - menu.add("-"); |
---|
448 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
449 | | - importVRMLX3DItem.addActionListener(this); |
---|
450 | | - menu.add("-"); |
---|
451 | | - importGFDItem = menu.add(new MenuItem("GrafreeD file...")); |
---|
452 | | - importGFDItem.addActionListener(this); |
---|
453 | | - |
---|
454 | 543 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
455 | 544 | buildToolsMenu(menu); |
---|
456 | 545 | } |
---|
457 | 546 | |
---|
458 | 547 | void SetupUI2(ObjEditor oe) |
---|
459 | 548 | { |
---|
| 549 | + // June 2019 |
---|
| 550 | + if (oe == null) |
---|
| 551 | + { |
---|
| 552 | + //super.SetupUI2(this); |
---|
| 553 | + //return; |
---|
| 554 | + } |
---|
| 555 | + |
---|
| 556 | + if (copy != group) |
---|
| 557 | + { |
---|
| 558 | + //super.SetupUI2(this); |
---|
| 559 | + } |
---|
| 560 | + |
---|
460 | 561 | //new Exception().printStackTrace(); |
---|
461 | 562 | |
---|
462 | 563 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
485 | 586 | oe.radioPanel.add(dummyButton); |
---|
486 | 587 | oe.buttonGroup.add(dummyButton); |
---|
487 | 588 | */ |
---|
| 589 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 590 | + |
---|
| 591 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 592 | + |
---|
488 | 593 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
489 | 594 | |
---|
490 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
491 | | - liveCB.setToolTipText("Enabled animation"); |
---|
| 595 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + //minButton.setToolTipText("Minimize window"); |
---|
| 597 | + //minButton.addActionListener(this); |
---|
| 598 | + |
---|
| 599 | + if (Globals.ADVANCED) |
---|
| 600 | + { |
---|
| 601 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + maxButton.setToolTipText("Maximize window"); |
---|
| 603 | + maxButton.addActionListener(this); |
---|
| 604 | + } |
---|
| 605 | + |
---|
| 606 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 607 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 608 | + fullButton.addActionListener(this); |
---|
| 609 | + |
---|
| 610 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 611 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 612 | + screenfitButton.addActionListener(this); |
---|
| 613 | + |
---|
| 614 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 615 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 616 | + restoreCameraButton.addActionListener(this); |
---|
| 617 | + |
---|
| 618 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 619 | + undoButton.setToolTipText("Undo changes"); |
---|
| 620 | + undoButton.addActionListener(this); |
---|
| 621 | + undoButton.setEnabled(false); |
---|
| 622 | + |
---|
| 623 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 624 | + redoButton.setToolTipText("Redo changes"); |
---|
| 625 | + redoButton.addActionListener(this); |
---|
| 626 | + redoButton.setEnabled(false); |
---|
| 627 | + |
---|
| 628 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 629 | + saveButton.setToolTipText("Save changes"); |
---|
| 630 | + saveButton.addActionListener(this); |
---|
| 631 | + |
---|
| 632 | + copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 633 | + liveCB.setToolTipText("Enable animation"); |
---|
492 | 634 | liveCB.addItemListener(this); |
---|
493 | 635 | |
---|
494 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 636 | + copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
495 | 637 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
496 | 638 | oneStepButton.addActionListener(this); |
---|
497 | 639 | |
---|
498 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 640 | + copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
499 | 641 | fastCB.setToolTipText("Fast mode"); |
---|
500 | 642 | fastCB.addItemListener(this); |
---|
501 | 643 | |
---|
502 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
503 | | - trackCB.setToolTipText("Enable tracking"); |
---|
504 | | - trackCB.addItemListener(this); |
---|
505 | | - |
---|
506 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
507 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
508 | | - screenfitButton.addActionListener(this); |
---|
| 644 | + //oe.toolboxPanel.Return(); |
---|
| 645 | + |
---|
| 646 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 647 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 648 | +// trackCB.addItemListener(this); |
---|
509 | 649 | |
---|
510 | 650 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
511 | 651 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
517 | 657 | snapobjectButton.setToolTipText("Snap Object"); |
---|
518 | 658 | } |
---|
519 | 659 | |
---|
520 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
521 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
522 | | - flashSelectionButton.addActionListener(this); |
---|
| 660 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
523 | 661 | |
---|
524 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
525 | | - |
---|
526 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 662 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
527 | 663 | twoButton.setToolTipText("Show center view only"); |
---|
528 | 664 | twoButton.addActionListener(this); |
---|
529 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 665 | + this.fullscreenLayout = twoButton; |
---|
| 666 | + |
---|
| 667 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
530 | 668 | fourButton.addActionListener(this); |
---|
531 | 669 | fourButton.setToolTipText("Show left panel only"); |
---|
532 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 670 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
533 | 671 | sixButton.setToolTipText("2-column layout left"); |
---|
534 | 672 | sixButton.addActionListener(this); |
---|
535 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 673 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
536 | 674 | threeButton.setToolTipText("2-column layout right"); |
---|
537 | 675 | threeButton.addActionListener(this); |
---|
538 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 676 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
539 | 677 | sevenButton.setToolTipText("3-column layout"); |
---|
540 | 678 | sevenButton.addActionListener(this); |
---|
541 | 679 | // |
---|
542 | 680 | |
---|
543 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 681 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
544 | 682 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
545 | 683 | rootButton.addActionListener(this); |
---|
546 | 684 | |
---|
547 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 685 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
548 | 686 | closeButton.setToolTipText("Close tab"); |
---|
549 | 687 | closeButton.addActionListener(this); |
---|
550 | 688 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
551 | 689 | //clearButton.addActionListener(this); |
---|
552 | | - |
---|
553 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 690 | + |
---|
| 691 | + // INSERT |
---|
| 692 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + gridButton.setToolTipText("Create grid"); |
---|
| 694 | + gridButton.addActionListener(this); |
---|
| 695 | + |
---|
| 696 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 697 | + boxButton.setToolTipText("Create box"); |
---|
| 698 | + boxButton.addActionListener(this); |
---|
| 699 | + |
---|
| 700 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 701 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 702 | + sphereButton.addActionListener(this); |
---|
| 703 | + |
---|
| 704 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 705 | + coneButton.setToolTipText("Create cone"); |
---|
| 706 | + coneButton.addActionListener(this); |
---|
| 707 | + |
---|
| 708 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 709 | + torusButton.setToolTipText("Create torus"); |
---|
| 710 | + torusButton.addActionListener(this); |
---|
| 711 | + |
---|
| 712 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 713 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 714 | + superButton.addActionListener(this); |
---|
| 715 | + |
---|
| 716 | + if (Globals.ADVANCED) |
---|
| 717 | + { |
---|
| 718 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 719 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 720 | + kleinButton.addActionListener(this); |
---|
| 721 | + } |
---|
554 | 722 | |
---|
555 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
556 | | - editButton.setToolTipText("Edit selection"); |
---|
| 723 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 724 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 725 | + particlesButton.addActionListener(this); |
---|
| 726 | + |
---|
| 727 | + oe.toolboxPanel.Return(); |
---|
| 728 | + |
---|
| 729 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 730 | + groupButton.setToolTipText("Create group"); |
---|
| 731 | + groupButton.addActionListener(this); |
---|
| 732 | + |
---|
| 733 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 734 | + compositeButton.setToolTipText("Create composite"); |
---|
| 735 | + compositeButton.addActionListener(this); |
---|
| 736 | + |
---|
| 737 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 738 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 739 | + switchButton.addActionListener(this); |
---|
| 740 | + |
---|
| 741 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 742 | + loopButton.setToolTipText("Create loop"); |
---|
| 743 | + loopButton.addActionListener(this); |
---|
| 744 | + |
---|
| 745 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 746 | + textureButton.setToolTipText("Create texture"); |
---|
| 747 | + textureButton.addActionListener(this); |
---|
| 748 | + |
---|
| 749 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 750 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 751 | + overlayButton.addActionListener(this); |
---|
| 752 | + |
---|
| 753 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 754 | + lightButton.setToolTipText("Create light"); |
---|
| 755 | + lightButton.addActionListener(this); |
---|
| 756 | + |
---|
| 757 | + for (int i=6; --i>=0;) |
---|
| 758 | + { |
---|
| 759 | + oe.toolboxPanel.Return(); |
---|
| 760 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 761 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 762 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 763 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 764 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 765 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 766 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 767 | + } |
---|
| 768 | + |
---|
| 769 | + // EDIT panel |
---|
| 770 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 771 | + editButton.setToolTipText("Pin selection controls"); |
---|
557 | 772 | editButton.addActionListener(this); |
---|
558 | 773 | |
---|
559 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
560 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 774 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 775 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
561 | 776 | uneditButton.addActionListener(this); |
---|
562 | 777 | |
---|
563 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
564 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 778 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 779 | + allParamsButton.setToolTipText("Show all controle"); |
---|
565 | 780 | allParamsButton.addActionListener(this); |
---|
566 | 781 | |
---|
567 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 782 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
568 | 783 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
569 | 784 | clearPanelButton.addActionListener(this); |
---|
570 | 785 | |
---|
571 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 786 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
572 | 787 | unselectButton.setToolTipText("Unselect"); |
---|
573 | 788 | unselectButton.addActionListener(this); |
---|
574 | 789 | |
---|
575 | | - commandsPanel.preferredHeight = 1; |
---|
| 790 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 791 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 792 | + flashSelectionButton.addActionListener(this); |
---|
576 | 793 | |
---|
577 | | - oe.treePanel.add(commandsPanel); |
---|
578 | | - oe.treePanel.Return(); |
---|
| 794 | + editCommandsPanel.preferredHeight = 1; |
---|
| 795 | + |
---|
| 796 | + SetPinStates(false); |
---|
| 797 | +// oe.treePanel.add(commandsPanel); |
---|
| 798 | +// oe.treePanel.Return(); |
---|
579 | 799 | |
---|
580 | 800 | // oe.aConstraints.gridx += 1; |
---|
581 | 801 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
592 | 812 | |
---|
593 | 813 | JScrollPane jSP; |
---|
594 | 814 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
595 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 815 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
596 | 816 | ResetModel(); |
---|
597 | 817 | |
---|
598 | 818 | oe.treePanel.add(jSPPanel); |
---|
599 | 819 | oe.treePanel.Return(); |
---|
600 | 820 | |
---|
601 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
602 | | - |
---|
603 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
604 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
605 | | - colorCB.addItemListener(this); |
---|
606 | | - |
---|
607 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
608 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
609 | | - materialCB.addItemListener(this); |
---|
610 | | - |
---|
611 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
612 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
613 | | - textureCB.addItemListener(this); |
---|
614 | | - |
---|
615 | | - copyOptionsPanel.preferredHeight = 1; |
---|
616 | 821 | oe.treePanel.add(copyOptionsPanel); |
---|
617 | 822 | oe.treePanel.Return(); |
---|
618 | 823 | |
---|
.. | .. |
---|
643 | 848 | |
---|
644 | 849 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
645 | 850 | { |
---|
| 851 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 852 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 853 | + colorCB.addItemListener(this); |
---|
| 854 | + |
---|
| 855 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 856 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 857 | + materialCB.addItemListener(this); |
---|
| 858 | + |
---|
| 859 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 860 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 861 | + textureCB.addItemListener(this); |
---|
| 862 | + |
---|
| 863 | + panel.Return(); |
---|
| 864 | + |
---|
646 | 865 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
647 | 866 | boxCB.setToolTipText("Display bounding boxes"); |
---|
648 | 867 | boxCB.addItemListener(this); |
---|
649 | 868 | |
---|
650 | 869 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
651 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 870 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
652 | 871 | zoomBoxCB.addItemListener(this); |
---|
653 | 872 | |
---|
654 | | - if (Globals.ADVANCED) |
---|
| 873 | + if (true) // Globals.ADVANCED) |
---|
655 | 874 | { |
---|
656 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
657 | | - supportCB.setToolTipText("Enable rigging"); |
---|
658 | | - supportCB.addItemListener(this); |
---|
| 875 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 876 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 877 | +// supportCB.addItemListener(this); |
---|
| 878 | + |
---|
| 879 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 880 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 881 | + freezeCB.addItemListener(this); |
---|
659 | 882 | |
---|
660 | 883 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
661 | 884 | // localCB.addItemListener(this); |
---|
662 | 885 | |
---|
| 886 | + panel.Return(); |
---|
| 887 | + |
---|
663 | 888 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
664 | 889 | crowdCB.setToolTipText("Used for crowds"); |
---|
665 | 890 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
676 | 901 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
677 | 902 | // speakerMocapCB.addItemListener(this); |
---|
678 | 903 | |
---|
| 904 | + panel.Return(); |
---|
| 905 | + |
---|
679 | 906 | if (false) |
---|
680 | 907 | { |
---|
681 | 908 | // handled in scripts |
---|
.. | .. |
---|
690 | 917 | //constraints.gridy += 1; |
---|
691 | 918 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
692 | 919 | smoothfocusCB.addItemListener(this); |
---|
| 920 | + panel.Return(); |
---|
693 | 921 | } |
---|
694 | 922 | |
---|
695 | 923 | //constraints.gridx += 1; |
---|
696 | 924 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
697 | 925 | // debugCB.addItemListener(this); |
---|
698 | 926 | |
---|
| 927 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 928 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 929 | + trackCB.addItemListener(this); |
---|
| 930 | + |
---|
699 | 931 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 932 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
700 | 933 | oeilCB.addItemListener(this); |
---|
701 | 934 | |
---|
| 935 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 936 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 937 | + shadowCB.addItemListener(this); |
---|
| 938 | + |
---|
| 939 | + panel.Return(); |
---|
| 940 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 941 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 942 | + toggleTextureCB.addItemListener(this); |
---|
| 943 | + |
---|
| 944 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 945 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 946 | + toggleSwitchCB.addItemListener(this); |
---|
| 947 | + |
---|
| 948 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 949 | + autosaveCB.setToolTipText("On structure change"); |
---|
| 950 | + autosaveCB.addItemListener(this); |
---|
| 951 | + |
---|
| 952 | + panel.Return(); |
---|
| 953 | + if (Globals.ADVANCED) |
---|
| 954 | + { |
---|
702 | 955 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
703 | 956 | lookAtCB.setToolTipText("Look-at target"); |
---|
704 | 957 | lookAtCB.addItemListener(this); |
---|
| 958 | + } |
---|
705 | 959 | |
---|
706 | 960 | } |
---|
707 | 961 | |
---|
708 | 962 | cGridBag fill = new cGridBag(); |
---|
709 | | - |
---|
710 | 963 | fill.preferredHeight = 200; |
---|
| 964 | + cGridBag fill2 = new cGridBag(); |
---|
| 965 | + fill2.preferredHeight = 200; |
---|
| 966 | + cGridBag fill3 = new cGridBag(); |
---|
| 967 | + fill3.preferredHeight = 200; |
---|
711 | 968 | |
---|
712 | 969 | panel.add(fill); |
---|
| 970 | + panel.add(fill2); |
---|
| 971 | + panel.add(fill3); |
---|
713 | 972 | |
---|
714 | 973 | } |
---|
715 | 974 | |
---|
716 | 975 | void EditObject(Object3D obj) |
---|
717 | 976 | { |
---|
718 | 977 | cRadio radioButton = new cRadio(obj.name); |
---|
| 978 | + |
---|
| 979 | + // June 2019. Patch to avoid bug with transparency. |
---|
| 980 | + radioButton.hadMaterial = obj.material != null; |
---|
| 981 | + if (!radioButton.hadMaterial) |
---|
| 982 | + { |
---|
| 983 | + obj.material = new cMaterial(); |
---|
| 984 | + } |
---|
| 985 | + |
---|
719 | 986 | radioButton.SetObject(obj); |
---|
720 | 987 | radioButton.layout = sevenButton; |
---|
721 | 988 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
724 | 991 | buttonGroup.add(radioButton); |
---|
725 | 992 | radioButton.doClick(); |
---|
726 | 993 | } |
---|
| 994 | + |
---|
727 | 995 | void SetupViews(ObjEditor oe) |
---|
728 | 996 | { |
---|
| 997 | + theFrame = this; |
---|
| 998 | + |
---|
729 | 999 | oe.SetupViews(); |
---|
730 | 1000 | |
---|
731 | 1001 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
734 | 1004 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
735 | 1005 | } |
---|
736 | 1006 | |
---|
737 | | - JCheckBox liveCB; |
---|
738 | | - JCheckBox supportCB; |
---|
739 | | - JCheckBox localCB; |
---|
740 | | - JCheckBox crowdCB; |
---|
741 | | - JCheckBox smoothCB; |
---|
742 | | - JCheckBox fastCB; |
---|
743 | | - JCheckBox slowCB; |
---|
744 | | - JCheckBox boxCB; |
---|
745 | | - JCheckBox zoomBoxCB; |
---|
746 | | - JCheckBox trackCB; |
---|
747 | | - JCheckBox smoothfocusCB; |
---|
| 1007 | + cToggleButton liveCB; |
---|
| 1008 | + cCheckBox supportCB; |
---|
| 1009 | + cCheckBox localCB; |
---|
| 1010 | + cCheckBox crowdCB; |
---|
| 1011 | + cCheckBox smoothCB; |
---|
| 1012 | + cToggleButton fastCB; |
---|
| 1013 | + cCheckBox slowCB; |
---|
| 1014 | + cCheckBox boxCB; |
---|
| 1015 | + cCheckBox zoomBoxCB; |
---|
| 1016 | + cCheckBox freezeCB; |
---|
| 1017 | + //cToggleButton trackCB; |
---|
| 1018 | + cCheckBox trackCB; |
---|
| 1019 | + cCheckBox smoothfocusCB; |
---|
748 | 1020 | // JCheckBox speakerMocapCB; |
---|
749 | | - JCheckBox speakerCameraCB; |
---|
750 | | - JCheckBox speakerFocusCB; |
---|
751 | | - JCheckBox debugCB; |
---|
752 | | - JCheckBox oeilCB; |
---|
753 | | - JCheckBox lookAtCB; |
---|
| 1021 | + cCheckBox speakerCameraCB; |
---|
| 1022 | + cCheckBox speakerFocusCB; |
---|
| 1023 | + cCheckBox debugCB; |
---|
| 1024 | + |
---|
| 1025 | + cCheckBox oeilCB; |
---|
| 1026 | + cCheckBox shadowCB; |
---|
| 1027 | + cCheckBox autosaveCB; |
---|
| 1028 | + cCheckBox lookAtCB; |
---|
754 | 1029 | |
---|
755 | 1030 | // static int COLOR = 1; |
---|
756 | 1031 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
758 | 1033 | |
---|
759 | 1034 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
760 | 1035 | |
---|
761 | | - JCheckBox colorCB; |
---|
762 | | - JCheckBox materialCB; |
---|
763 | | - JCheckBox textureCB; |
---|
| 1036 | + cCheckBox colorCB; |
---|
| 1037 | + cCheckBox materialCB; |
---|
| 1038 | + cCheckBox textureCB; |
---|
764 | 1039 | |
---|
765 | 1040 | public void itemStateChanged(ItemEvent e) |
---|
766 | 1041 | { |
---|
.. | .. |
---|
788 | 1063 | } else if(e.getSource() == liveCB) |
---|
789 | 1064 | { |
---|
790 | 1065 | cameraView.ToggleLive(); |
---|
| 1066 | + refreshContents(false); |
---|
791 | 1067 | } |
---|
792 | 1068 | else if(e.getSource() == supportCB) |
---|
793 | 1069 | { |
---|
.. | .. |
---|
852 | 1128 | { |
---|
853 | 1129 | cameraView.ToggleOeil(); |
---|
854 | 1130 | } |
---|
| 1131 | + else if(e.getSource() == shadowCB) |
---|
| 1132 | + { |
---|
| 1133 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1134 | + } |
---|
| 1135 | + else if(e.getSource() == freezeCB) |
---|
| 1136 | + { |
---|
| 1137 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1138 | + } |
---|
| 1139 | + else if(e.getSource() == autosaveCB) |
---|
| 1140 | + { |
---|
| 1141 | + Globals.SAVEONMAKE ^= true; |
---|
| 1142 | + } |
---|
855 | 1143 | else if(e.getSource() == lookAtCB) |
---|
856 | 1144 | { |
---|
857 | 1145 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
868 | 1156 | |
---|
869 | 1157 | /**/ |
---|
870 | 1158 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
871 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1159 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1160 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
872 | 1161 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
873 | 1162 | // We can't move the root node or an empty selection |
---|
874 | 1163 | return; |
---|
.. | .. |
---|
931 | 1220 | } |
---|
932 | 1221 | } |
---|
933 | 1222 | |
---|
934 | | - String string = (String) object; |
---|
935 | | - |
---|
936 | 1223 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
937 | 1224 | // if( object instanceof java.io.File[]) |
---|
938 | 1225 | // { |
---|
.. | .. |
---|
940 | 1227 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
941 | 1228 | // return; |
---|
942 | 1229 | // } |
---|
| 1230 | + |
---|
| 1231 | + String string = object.toString(); |
---|
943 | 1232 | |
---|
944 | 1233 | // File path for Mac and Windows |
---|
945 | 1234 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
985 | 1274 | |
---|
986 | 1275 | assert target == objEditor.jTree; |
---|
987 | 1276 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1277 | + Object3D destinationLeaf; |
---|
988 | 1278 | try { |
---|
989 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1279 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
990 | 1280 | } catch (Exception e) { |
---|
991 | 1281 | System.out.println("destinationPath : " + destinationPath); |
---|
992 | 1282 | return; |
---|
993 | 1283 | } |
---|
994 | 1284 | |
---|
995 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1285 | + for (int i=group.selection.size(); --i>=0;) |
---|
996 | 1286 | { |
---|
| 1287 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1288 | + |
---|
| 1289 | + // Cannot move into itself |
---|
| 1290 | + if (child == destinationLeaf) |
---|
| 1291 | + return; |
---|
| 1292 | + } |
---|
| 1293 | + |
---|
| 1294 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1295 | +// { |
---|
997 | 1296 | loadClipboard(true); |
---|
998 | 1297 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
999 | 1298 | pasteInto(false, false); |
---|
1000 | | - } else { |
---|
1001 | | - loadClipboard(false); |
---|
1002 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1003 | | - pasteInto(false, false); // true); // ??? |
---|
1004 | | - } |
---|
| 1299 | +// } else { |
---|
| 1300 | +// loadClipboard(false); |
---|
| 1301 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1302 | +// pasteInto(false, false); // true); // ??? |
---|
| 1303 | +// } |
---|
1005 | 1304 | } |
---|
1006 | 1305 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1007 | 1306 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1106 | 1405 | { |
---|
1107 | 1406 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1108 | 1407 | //heightFieldItem.addActionListener(this); |
---|
1109 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1110 | | - gridItem.addActionListener(this); |
---|
1111 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1112 | | - rectoidItem.addActionListener(this); |
---|
1113 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1114 | | - ellipsoidItem.addActionListener(this); |
---|
1115 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1116 | | - coneItem.addActionListener(this); |
---|
1117 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1118 | | - torusItem.addActionListener(this); |
---|
1119 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1120 | | - superItem.addActionListener(this); |
---|
| 1408 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1409 | +// gridItem.addActionListener(this); |
---|
| 1410 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1411 | +// rectoidItem.addActionListener(this); |
---|
| 1412 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1413 | +// ellipsoidItem.addActionListener(this); |
---|
| 1414 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1415 | +// coneItem.addActionListener(this); |
---|
| 1416 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1417 | +// torusItem.addActionListener(this); |
---|
| 1418 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1419 | +// superItem.addActionListener(this); |
---|
| 1420 | + |
---|
| 1421 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1422 | + cameraItem.addActionListener(this); |
---|
| 1423 | + |
---|
| 1424 | + if (!Globals.ADVANCED) |
---|
| 1425 | + { |
---|
1121 | 1426 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1122 | 1427 | kleinItem.addActionListener(this); |
---|
1123 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1124 | | - particleItem.addActionListener(this); |
---|
| 1428 | + } |
---|
| 1429 | + |
---|
| 1430 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1431 | +// particleItem.addActionListener(this); |
---|
1125 | 1432 | if (Globals.ADVANCED) |
---|
1126 | 1433 | { |
---|
1127 | 1434 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1147 | 1454 | } |
---|
1148 | 1455 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1149 | 1456 | bezierItem.addActionListener(this); |
---|
1150 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1151 | | - overlayItem.addActionListener(this); |
---|
1152 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1153 | | - lightItem.addActionListener(this); |
---|
| 1457 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1458 | +// overlayItem.addActionListener(this); |
---|
| 1459 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1460 | +// lightItem.addActionListener(this); |
---|
1154 | 1461 | menu.add("-"); |
---|
1155 | 1462 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1156 | 1463 | //superLoopItem.addActionListener(this); |
---|
1157 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1158 | | - loopItem.addActionListener(this); |
---|
| 1464 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1465 | +// loopItem.addActionListener(this); |
---|
1159 | 1466 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1160 | 1467 | doubleItem.addActionListener(this); |
---|
1161 | 1468 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1171 | 1478 | animationItem.addItemListener(this); |
---|
1172 | 1479 | animationItem.setState(Globals.ANIMATION); |
---|
1173 | 1480 | |
---|
| 1481 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1482 | + archiveItem.addActionListener(this); |
---|
| 1483 | + |
---|
1174 | 1484 | menu.add("-"); |
---|
1175 | 1485 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1176 | 1486 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1183 | 1493 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1184 | 1494 | reduce34MorphItem.addActionListener(this); |
---|
1185 | 1495 | menu.add("-"); |
---|
| 1496 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1497 | + memoryItem.addActionListener(this); |
---|
1186 | 1498 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1187 | 1499 | computeAOItem.addActionListener(this); |
---|
1188 | 1500 | |
---|
.. | .. |
---|
1191 | 1503 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1192 | 1504 | mirrorItem.addActionListener(this); |
---|
1193 | 1505 | menu.add("-"); |
---|
1194 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1195 | | - memoryItem.addActionListener(this); |
---|
1196 | 1506 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1197 | 1507 | analyzeItem.addActionListener(this); |
---|
1198 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1508 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1199 | 1509 | dumpItem.addActionListener(this); |
---|
1200 | 1510 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1201 | 1511 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1336 | 1646 | shadow.material = new cMaterial(obj.material); |
---|
1337 | 1647 | shadow.material.diffuse = 0.0001f; |
---|
1338 | 1648 | shadow.material.specular = 0.0001f; |
---|
| 1649 | + //shadow.projectedVertices[1].x = 300; |
---|
1339 | 1650 | |
---|
1340 | 1651 | makeSomething(shadow); |
---|
1341 | 1652 | } |
---|
| 1653 | + |
---|
| 1654 | + private void ClearUnpinned() |
---|
| 1655 | + { |
---|
| 1656 | + //for (Object3D obj : listUI) |
---|
| 1657 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1658 | + { |
---|
| 1659 | + Object3D obj = listUI.elementAt(i); |
---|
| 1660 | + if (!obj.pinned) |
---|
| 1661 | + { |
---|
| 1662 | + obj.CloseUI(); |
---|
| 1663 | + listUI.remove(i); |
---|
| 1664 | + } |
---|
| 1665 | + } |
---|
| 1666 | + } |
---|
1342 | 1667 | |
---|
1343 | 1668 | /** |
---|
1344 | 1669 | * applyExample |
---|
.. | .. |
---|
1583 | 1908 | { |
---|
1584 | 1909 | ScreenFit(); |
---|
1585 | 1910 | } else |
---|
1586 | | - if (source == switchItem) |
---|
| 1911 | + if (source == switchViewItem) |
---|
1587 | 1912 | { |
---|
1588 | 1913 | cVector v1 = new cVector(); |
---|
1589 | 1914 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1592 | 1917 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1593 | 1918 | objEditor.cameraView.repaint(); |
---|
1594 | 1919 | } else |
---|
1595 | | - if (source == rectoidItem) |
---|
| 1920 | + if (source == rectoidItem || source == boxButton) |
---|
1596 | 1921 | { |
---|
1597 | 1922 | makeSomething(new Box()); |
---|
1598 | 1923 | } else |
---|
1599 | | - if (source == particleItem) |
---|
| 1924 | + if (source == particleItem || source == particlesButton) |
---|
1600 | 1925 | { |
---|
1601 | 1926 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1602 | 1927 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1675 | 2000 | |
---|
1676 | 2001 | makeSomething(obj); |
---|
1677 | 2002 | } else |
---|
1678 | | - if (source == gridItem) |
---|
| 2003 | + if (source == gridItem || source == gridButton) |
---|
1679 | 2004 | { |
---|
1680 | 2005 | makeSomething(new Grid()); |
---|
1681 | 2006 | } else |
---|
1682 | | - if (source == ellipsoidItem) |
---|
| 2007 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1683 | 2008 | { |
---|
1684 | 2009 | makeSomething(new Sphere()); |
---|
1685 | 2010 | } else |
---|
1686 | | - if (source == coneItem) |
---|
| 2011 | + if (source == coneItem || source == coneButton) |
---|
1687 | 2012 | { |
---|
1688 | 2013 | makeSomething(new Cone()); |
---|
1689 | 2014 | } else |
---|
1690 | | - if (source == torusItem) |
---|
| 2015 | + if (source == torusItem || source == torusButton) |
---|
1691 | 2016 | { |
---|
1692 | 2017 | makeSomething(new Torus()); |
---|
1693 | 2018 | } else |
---|
1694 | | - if (source == superItem) |
---|
| 2019 | + if (source == superItem || source == superButton) |
---|
1695 | 2020 | { |
---|
1696 | 2021 | makeSomething(new Superellipsoid()); |
---|
1697 | 2022 | } else |
---|
1698 | | - if (source == kleinItem) |
---|
| 2023 | + if (source == kleinItem || source == kleinButton) |
---|
1699 | 2024 | { |
---|
1700 | 2025 | makeSomething(new Klein()); |
---|
1701 | 2026 | } else |
---|
.. | .. |
---|
1715 | 2040 | { |
---|
1716 | 2041 | makeSomething(new BezierSurface()); |
---|
1717 | 2042 | } else |
---|
1718 | | - if (source == overlayItem) |
---|
| 2043 | + if (source == overlayItem || source == overlayButton) |
---|
1719 | 2044 | { |
---|
1720 | 2045 | /* |
---|
1721 | 2046 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1763 | 2088 | s.setup(); |
---|
1764 | 2089 | makeSomething(s); |
---|
1765 | 2090 | } else |
---|
1766 | | - if (source == lightItem) |
---|
| 2091 | + if (source == lightItem || source == lightButton) |
---|
1767 | 2092 | { |
---|
1768 | 2093 | makeSomething(new Light()); |
---|
1769 | 2094 | } else |
---|
.. | .. |
---|
1813 | 2138 | |
---|
1814 | 2139 | group(g); |
---|
1815 | 2140 | } else |
---|
1816 | | - if (source == loopItem) |
---|
| 2141 | + if (source == loopItem || source == loopButton) |
---|
1817 | 2142 | { |
---|
1818 | 2143 | Composite csg = new GroupLeaf(); |
---|
1819 | 2144 | csg.count = 5; |
---|
1820 | 2145 | group(csg); |
---|
1821 | | - Composite child = new cGroup(); |
---|
| 2146 | + Composite child = new cGroup("Branch"); |
---|
1822 | 2147 | csg.addChild(child); |
---|
1823 | 2148 | child.addChild(csg); |
---|
1824 | 2149 | } else |
---|
1825 | 2150 | if (source == doubleItem) |
---|
1826 | 2151 | { |
---|
1827 | | - Composite csg = new GroupLeaf(); |
---|
| 2152 | + Composite csg = new GroupLeaf("Fork"); |
---|
1828 | 2153 | csg.count = 5; |
---|
1829 | 2154 | group(csg); |
---|
1830 | | - Composite child = new cGroup(); |
---|
| 2155 | + Composite child = new cGroup("Branch A"); |
---|
1831 | 2156 | csg.addChild(child); |
---|
1832 | 2157 | child.addChild(csg); |
---|
1833 | | - child = new cGroup(); |
---|
| 2158 | + child = new cGroup("Branch B"); |
---|
1834 | 2159 | csg.addChild(child); |
---|
1835 | 2160 | child.addChild(csg); |
---|
1836 | 2161 | } else |
---|
1837 | 2162 | if (source == tripleItem) |
---|
1838 | 2163 | { |
---|
1839 | | - Composite csg = new GroupLeaf(); |
---|
| 2164 | + Composite csg = new GroupLeaf("Trident"); |
---|
1840 | 2165 | csg.count = 4; |
---|
1841 | 2166 | group(csg); |
---|
1842 | 2167 | Composite child = new cGroup(); |
---|
.. | .. |
---|
1848 | 2173 | child = new cGroup(); |
---|
1849 | 2174 | csg.addChild(child); |
---|
1850 | 2175 | child.addChild(csg); |
---|
1851 | | - } else |
---|
1852 | | - |
---|
1853 | | - if (source == importGFDItem) |
---|
1854 | | - { |
---|
1855 | | - ImportGFD(); |
---|
1856 | | - } else |
---|
1857 | | - if (source == importVRMLX3DItem) |
---|
1858 | | - { |
---|
1859 | | - ImportVRMLX3D(); |
---|
1860 | | - } else |
---|
1861 | | - if (source == import3DSItem) |
---|
1862 | | - { |
---|
1863 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1864 | | - } else |
---|
1865 | | - if (source == importOBJItem) |
---|
1866 | | - { |
---|
1867 | | - //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1868 | | - FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
1869 | | - browser.setVisible(true); |
---|
1870 | | - String filename = browser.getFile(); |
---|
1871 | | - if (filename != null && filename.length() > 0) |
---|
1872 | | - { |
---|
1873 | | - String fullname = browser.getDirectory() + filename; |
---|
1874 | | - makeSomething(ReadOBJ(fullname), true); |
---|
1875 | | - } |
---|
1876 | 2176 | } else |
---|
1877 | 2177 | if (source == computeAOItem) |
---|
1878 | 2178 | { |
---|
.. | .. |
---|
1911 | 2211 | { |
---|
1912 | 2212 | DumpObject(); |
---|
1913 | 2213 | } else |
---|
| 2214 | + if (source == minButton) |
---|
| 2215 | + { |
---|
| 2216 | + Minimize(); |
---|
| 2217 | + } else |
---|
| 2218 | + if (source == maxButton) |
---|
| 2219 | + { |
---|
| 2220 | + Maximize(); |
---|
| 2221 | + } else |
---|
| 2222 | + if (source == fullButton) |
---|
| 2223 | + { |
---|
| 2224 | + ToggleFullScreen(); |
---|
| 2225 | + } else |
---|
| 2226 | + if (source == undoButton) |
---|
| 2227 | + { |
---|
| 2228 | + if (!Undo()) |
---|
| 2229 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2230 | + } else |
---|
| 2231 | + if (source == redoButton) |
---|
| 2232 | + { |
---|
| 2233 | + Redo(); |
---|
| 2234 | + } else |
---|
| 2235 | + if (source == saveButton) |
---|
| 2236 | + { |
---|
| 2237 | + if (!Save(true)) |
---|
| 2238 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2239 | + } else |
---|
1914 | 2240 | if (source == oneStepButton) |
---|
1915 | 2241 | { |
---|
1916 | 2242 | Globals.ONESTEP = true; |
---|
.. | .. |
---|
1918 | 2244 | } else |
---|
1919 | 2245 | if (source == screenfitButton) |
---|
1920 | 2246 | { |
---|
1921 | | - //Reload(lastConverter, lastFilename, true); |
---|
1922 | 2247 | ScreenFit(); |
---|
1923 | 2248 | } else |
---|
1924 | 2249 | if (source == screenfitpointButton) |
---|
1925 | 2250 | { |
---|
1926 | | - //Reload(lastConverter, lastFilename, true); |
---|
1927 | 2251 | ScreenFitPoint(); |
---|
1928 | 2252 | } else |
---|
1929 | 2253 | if (source == snapobjectButton) |
---|
1930 | 2254 | { |
---|
1931 | | - //Reload(lastConverter, lastFilename, true); |
---|
1932 | 2255 | SnapObject(); |
---|
1933 | 2256 | } else |
---|
1934 | 2257 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
1964 | 2287 | if (source == cutItem || source == clearButton) |
---|
1965 | 2288 | { |
---|
1966 | 2289 | loadClipboard(true); |
---|
| 2290 | + } else |
---|
| 2291 | + if (source == undoItem) |
---|
| 2292 | + { |
---|
| 2293 | + Undo(); |
---|
| 2294 | + } else |
---|
| 2295 | + if (source == redoItem) |
---|
| 2296 | + { |
---|
| 2297 | + Redo(); |
---|
1967 | 2298 | } else |
---|
1968 | 2299 | if (source == duplicateItem) |
---|
1969 | 2300 | { |
---|
.. | .. |
---|
2276 | 2607 | { |
---|
2277 | 2608 | RevertMeshes(); |
---|
2278 | 2609 | } else |
---|
2279 | | - if (source == resetMeshItem) |
---|
| 2610 | + if (source == resetAllItem) |
---|
2280 | 2611 | { |
---|
2281 | 2612 | ResetAll(); |
---|
2282 | 2613 | } else |
---|
.. | .. |
---|
2296 | 2627 | { |
---|
2297 | 2628 | ClearSelection(true); |
---|
2298 | 2629 | } else |
---|
2299 | | - if (source == grabItem) |
---|
| 2630 | + if (source == grabItem || source == groupButton) |
---|
2300 | 2631 | { |
---|
2301 | | - group(new cGroup(), true); |
---|
| 2632 | + group(new cGroup(), false); // true); |
---|
2302 | 2633 | } else |
---|
2303 | 2634 | if (source == hideItem) |
---|
2304 | 2635 | { |
---|
.. | .. |
---|
2316 | 2647 | { |
---|
2317 | 2648 | makeSomething(new Camera()); |
---|
2318 | 2649 | } else |
---|
2319 | | - if (source == compositeItem) |
---|
| 2650 | + if (source == compositeItem || source == compositeButton) |
---|
2320 | 2651 | { |
---|
2321 | 2652 | group(new Composite()); |
---|
2322 | 2653 | } else |
---|
2323 | | - if (source == randomItem) |
---|
| 2654 | + if (source == switchItem || source == switchButton) |
---|
2324 | 2655 | { |
---|
2325 | 2656 | RandomNode random = new RandomNode(); |
---|
2326 | 2657 | group(random); |
---|
.. | .. |
---|
2422 | 2753 | { |
---|
2423 | 2754 | group(new cLinker()); |
---|
2424 | 2755 | } else |
---|
2425 | | - if (source == textureItem) |
---|
| 2756 | + if (source == textureItem || source == textureButton) |
---|
2426 | 2757 | { |
---|
2427 | 2758 | group(new TextureNode()); |
---|
2428 | 2759 | } else |
---|
.. | .. |
---|
2442 | 2773 | { |
---|
2443 | 2774 | CastShadow(2); |
---|
2444 | 2775 | } else |
---|
2445 | | - if (source == ungroupItem) |
---|
| 2776 | + if (source == ungroupItem || source == ungroupButton) |
---|
2446 | 2777 | { |
---|
2447 | | - //ungroup(); |
---|
| 2778 | + boolean hasRoot = false; |
---|
| 2779 | + |
---|
2448 | 2780 | for (int i=0; i<group.selection.size(); i++) |
---|
2449 | 2781 | { |
---|
2450 | | - Ungroup(group.selection.get(i)); |
---|
| 2782 | + if (group.selection.get(i) == group) |
---|
| 2783 | + { |
---|
| 2784 | + hasRoot = true; |
---|
| 2785 | + break; |
---|
| 2786 | + } |
---|
2451 | 2787 | } |
---|
2452 | 2788 | |
---|
2453 | | - ClearSelection(false); |
---|
2454 | | - |
---|
2455 | | - refreshContents(); |
---|
| 2789 | + if (!hasRoot) |
---|
| 2790 | + { |
---|
| 2791 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2792 | + { |
---|
| 2793 | + Ungroup(group.selection.get(i)); |
---|
| 2794 | + } |
---|
| 2795 | + |
---|
| 2796 | + ClearSelection(false); |
---|
| 2797 | + |
---|
| 2798 | + refreshContents(); |
---|
| 2799 | + } |
---|
2456 | 2800 | } else |
---|
2457 | 2801 | if (source == genUVItem) |
---|
2458 | 2802 | { |
---|
.. | .. |
---|
2464 | 2808 | } else |
---|
2465 | 2809 | if (source == genNormalsMESHItem) |
---|
2466 | 2810 | { |
---|
2467 | | - GenNormals(true); // TODO |
---|
| 2811 | + GenNormalsMESH(); |
---|
2468 | 2812 | } else |
---|
2469 | 2813 | if (source == genNormalsORGANItem) |
---|
2470 | 2814 | { |
---|
.. | .. |
---|
2529 | 2873 | if (source == unmarkleavesItem) |
---|
2530 | 2874 | { |
---|
2531 | 2875 | MarkLeaves(false); |
---|
| 2876 | + } else |
---|
| 2877 | + if (source == rewindleavesItem) |
---|
| 2878 | + { |
---|
| 2879 | + RewindLeaves(true); |
---|
| 2880 | + } else |
---|
| 2881 | + if (source == unrewindleavesItem) |
---|
| 2882 | + { |
---|
| 2883 | + RewindLeaves(false); |
---|
| 2884 | + } else |
---|
| 2885 | + if (source == randomleavesItem) |
---|
| 2886 | + { |
---|
| 2887 | + RandomLeaves(true); |
---|
| 2888 | + } else |
---|
| 2889 | + if (source == unrandomleavesItem) |
---|
| 2890 | + { |
---|
| 2891 | + RandomLeaves(false); |
---|
2532 | 2892 | } else |
---|
2533 | 2893 | if (source == flipVItem) |
---|
2534 | 2894 | { |
---|
.. | .. |
---|
2614 | 2974 | { |
---|
2615 | 2975 | SmoothMesh(); |
---|
2616 | 2976 | } else |
---|
2617 | | - if (source == transformgeometryItem) |
---|
| 2977 | + if (source == transformGeometryItem) |
---|
2618 | 2978 | { |
---|
2619 | 2979 | TransformGeometry(); |
---|
| 2980 | + } else |
---|
| 2981 | + if (source == transformChildrenItem) |
---|
| 2982 | + { |
---|
| 2983 | + TransformChildren(); |
---|
2620 | 2984 | } else |
---|
2621 | 2985 | if (source == resetTransformItem) |
---|
2622 | 2986 | { |
---|
.. | .. |
---|
2624 | 2988 | } else |
---|
2625 | 2989 | if (source == resetCentroidItem) |
---|
2626 | 2990 | { |
---|
2627 | | - ResetCentroid(); |
---|
| 2991 | + ResetCentroid(true); |
---|
| 2992 | + } else |
---|
| 2993 | + if (source == resetCentroidXZItem) |
---|
| 2994 | + { |
---|
| 2995 | + ResetCentroid(false); |
---|
2628 | 2996 | } else |
---|
2629 | 2997 | if (source == resetParentItem) |
---|
2630 | 2998 | { |
---|
.. | .. |
---|
2756 | 3124 | if (source == twoButton) |
---|
2757 | 3125 | { |
---|
2758 | 3126 | radio.layout = twoButton; |
---|
| 3127 | + |
---|
| 3128 | + if (CameraPane.FULLSCREEN) |
---|
| 3129 | + fullscreenLayout = radio.layout; |
---|
| 3130 | + |
---|
2759 | 3131 | // bug |
---|
2760 | 3132 | //gridPanel.setDividerLocation(1.0); |
---|
2761 | 3133 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2788 | 3160 | bigThree.ClearUI(); |
---|
2789 | 3161 | bigThree.add(centralPanel); |
---|
2790 | 3162 | bigThree.FlushUI(); |
---|
| 3163 | + |
---|
| 3164 | + cameraView.requestFocusInWindow(); |
---|
| 3165 | + |
---|
| 3166 | +// refreshContents(true); |
---|
| 3167 | +// |
---|
| 3168 | +// try |
---|
| 3169 | +// { |
---|
| 3170 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3171 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3172 | +// bot.mouseMove(100, 100); |
---|
| 3173 | +// bot.mousePress(mask); |
---|
| 3174 | +// bot.mouseRelease(mask); |
---|
| 3175 | +// } |
---|
| 3176 | +// catch (Exception e) |
---|
| 3177 | +// { |
---|
| 3178 | +// |
---|
| 3179 | +// } |
---|
| 3180 | + |
---|
2791 | 3181 | } else |
---|
2792 | 3182 | if (source == threeButton) |
---|
2793 | 3183 | { |
---|
2794 | 3184 | radio.layout = threeButton; |
---|
| 3185 | + |
---|
| 3186 | + if (CameraPane.FULLSCREEN) |
---|
| 3187 | + fullscreenLayout = radio.layout; |
---|
2795 | 3188 | |
---|
2796 | 3189 | // bigThree.remove(scenePanel); |
---|
2797 | 3190 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2824 | 3217 | bigThree.add(centralPanel); |
---|
2825 | 3218 | bigThree.add(XYZPanel); |
---|
2826 | 3219 | bigThree.FlushUI(); |
---|
| 3220 | + |
---|
| 3221 | + cameraView.requestFocusInWindow(); |
---|
2827 | 3222 | } else |
---|
2828 | 3223 | if (source == fourButton) |
---|
2829 | 3224 | { |
---|
2830 | 3225 | radio.layout = fourButton; |
---|
| 3226 | + |
---|
| 3227 | + if (CameraPane.FULLSCREEN) |
---|
| 3228 | + fullscreenLayout = radio.layout; |
---|
2831 | 3229 | |
---|
2832 | 3230 | // bigThree.remove(scenePanel); |
---|
2833 | 3231 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2859 | 3257 | bigThree.ClearUI(); |
---|
2860 | 3258 | bigThree.add(scenePanel); |
---|
2861 | 3259 | bigThree.FlushUI(); |
---|
| 3260 | + |
---|
| 3261 | + cameraView.requestFocusInWindow(); |
---|
2862 | 3262 | } else |
---|
2863 | 3263 | if (source == sixButton) |
---|
2864 | 3264 | { |
---|
2865 | 3265 | radio.layout = sixButton; |
---|
| 3266 | + |
---|
| 3267 | + if (CameraPane.FULLSCREEN) |
---|
| 3268 | + fullscreenLayout = radio.layout; |
---|
2866 | 3269 | |
---|
2867 | 3270 | // bigThree.remove(scenePanel); |
---|
2868 | 3271 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2895 | 3298 | bigThree.add(scenePanel); |
---|
2896 | 3299 | bigThree.add(centralPanel); |
---|
2897 | 3300 | bigThree.FlushUI(); |
---|
| 3301 | + |
---|
| 3302 | + cameraView.requestFocusInWindow(); |
---|
2898 | 3303 | } else |
---|
2899 | 3304 | if (source == sevenButton) |
---|
2900 | 3305 | { |
---|
2901 | 3306 | radio.layout = sevenButton; |
---|
| 3307 | + |
---|
| 3308 | + if (CameraPane.FULLSCREEN) |
---|
| 3309 | + fullscreenLayout = radio.layout; |
---|
2902 | 3310 | |
---|
2903 | 3311 | // bigThree.remove(scenePanel); |
---|
2904 | 3312 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2932 | 3340 | bigThree.add(centralPanel); |
---|
2933 | 3341 | bigThree.add(XYZPanel); |
---|
2934 | 3342 | bigThree.FlushUI(); |
---|
| 3343 | + |
---|
| 3344 | + cameraView.requestFocusInWindow(); |
---|
2935 | 3345 | } else |
---|
2936 | 3346 | if (source == rootButton) |
---|
2937 | 3347 | { |
---|
.. | .. |
---|
2943 | 3353 | EditObject(obj); |
---|
2944 | 3354 | } |
---|
2945 | 3355 | |
---|
| 3356 | + cameraView.requestFocusInWindow(); |
---|
2946 | 3357 | refreshContents(true); |
---|
2947 | 3358 | } else |
---|
2948 | 3359 | if (source == closeButton) |
---|
.. | .. |
---|
2952 | 3363 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
2953 | 3364 | { |
---|
2954 | 3365 | ab = (cRadio)e.nextElement(); |
---|
2955 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3366 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
2956 | 3367 | { |
---|
| 3368 | + // Patch to avoid bug with transparency. |
---|
| 3369 | + if (!ab.hadMaterial) |
---|
| 3370 | + { |
---|
| 3371 | + ab.object.material = null; |
---|
| 3372 | + } |
---|
| 3373 | + |
---|
2957 | 3374 | buttonGroup.remove(ab); |
---|
2958 | 3375 | radioPanel.remove(ab); |
---|
2959 | 3376 | |
---|
2960 | | - ab.GetObject().editWindow = null; |
---|
| 3377 | + //ab.GetObject().editWindow = null; |
---|
| 3378 | + ab.GetObject().manipWindow = null; |
---|
2961 | 3379 | // ab.GetObject().objectUI = null; // ????????? |
---|
2962 | 3380 | |
---|
2963 | 3381 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
2964 | 3382 | break; |
---|
2965 | 3383 | } |
---|
2966 | 3384 | } |
---|
| 3385 | + |
---|
| 3386 | + cameraView.requestFocusInWindow(); |
---|
2967 | 3387 | refreshContents(true); |
---|
2968 | 3388 | } else |
---|
2969 | 3389 | if (source == editItem || source == editButton) |
---|
2970 | 3390 | { |
---|
| 3391 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3392 | + { |
---|
| 3393 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3394 | + child.pinned = true; |
---|
| 3395 | + } |
---|
| 3396 | + |
---|
2971 | 3397 | EditSelection(false); |
---|
2972 | 3398 | } else |
---|
2973 | 3399 | if (source == uneditButton) |
---|
.. | .. |
---|
2977 | 3403 | Object3D child = (Object3D)e.nextElement(); |
---|
2978 | 3404 | if(child.editWindow != null) |
---|
2979 | 3405 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3406 | + child.pinned = false; |
---|
2980 | 3407 | child.CloseUI(); |
---|
2981 | 3408 | listUI.remove(child); |
---|
2982 | 3409 | |
---|
2983 | | - child.editWindow = null; // ??????????? |
---|
| 3410 | + //child.editWindow = null; // ??????????? |
---|
2984 | 3411 | } |
---|
2985 | 3412 | objEditor.ctrlPanel.FlushUI(); |
---|
2986 | 3413 | //objEditor.jTree.clearSelection(); |
---|
.. | .. |
---|
2993 | 3420 | //copy.ClearUI(); |
---|
2994 | 3421 | for (Object3D obj : listUI) |
---|
2995 | 3422 | { |
---|
| 3423 | + obj.pinned = false; |
---|
2996 | 3424 | obj.CloseUI(); |
---|
2997 | 3425 | } |
---|
2998 | 3426 | listUI.clear(); |
---|
.. | .. |
---|
3002 | 3430 | { |
---|
3003 | 3431 | assert(copy == group); |
---|
3004 | 3432 | |
---|
3005 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3433 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3006 | 3434 | |
---|
3007 | 3435 | for (Object3D obj : listUI) |
---|
3008 | 3436 | { |
---|
.. | .. |
---|
3066 | 3494 | frontView.object = group; |
---|
3067 | 3495 | sideView.object = group; |
---|
3068 | 3496 | } |
---|
3069 | | - group.editWindow = this; |
---|
| 3497 | + |
---|
| 3498 | +// fix "+" issue |
---|
| 3499 | + //group.editWindow = this; |
---|
| 3500 | + group.manipWindow = this; |
---|
| 3501 | + |
---|
3070 | 3502 | /* |
---|
3071 | 3503 | currentLayout = radio.layout; |
---|
3072 | 3504 | if (currentLayout == null) |
---|
3073 | 3505 | currentLayout = sevenButton; |
---|
3074 | 3506 | */ |
---|
3075 | 3507 | radio.layout.doClick(); |
---|
| 3508 | + |
---|
| 3509 | + ClearUnpinned(); |
---|
| 3510 | + SetPinStates(group.selection.size() > 0); |
---|
| 3511 | + if (group.selection.size() == 1) |
---|
| 3512 | + EditSelection(false); |
---|
3076 | 3513 | keepparent = group.parent; |
---|
3077 | 3514 | // PARENT = NULL or not??? |
---|
3078 | 3515 | //group.parent = null; // ROOT |
---|
3079 | 3516 | //group.attributes = -1; |
---|
3080 | 3517 | ResetModel(); |
---|
| 3518 | + |
---|
| 3519 | + cameraView.requestFocusInWindow(); |
---|
3081 | 3520 | refreshContents(true); |
---|
3082 | | - } |
---|
| 3521 | + } else if (event.getSource() == editCameraItem) |
---|
| 3522 | + { |
---|
| 3523 | + cameraView.ProtectCamera(); |
---|
| 3524 | + cameraView.repaint(); |
---|
| 3525 | + return; |
---|
| 3526 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
| 3527 | + { |
---|
| 3528 | + cameraView.RevertCamera(); |
---|
| 3529 | + cameraView.repaint(); |
---|
| 3530 | + return; |
---|
| 3531 | + // } else if (event.getSource() == textureButton) |
---|
| 3532 | + // { |
---|
| 3533 | + // return; // true; |
---|
| 3534 | + } |
---|
3083 | 3535 | else |
---|
3084 | 3536 | { |
---|
3085 | 3537 | //return super.action(event, arg); |
---|
.. | .. |
---|
3088 | 3540 | } |
---|
3089 | 3541 | |
---|
3090 | 3542 | boolean useclient = false; |
---|
3091 | | - cRadio radio; |
---|
3092 | 3543 | |
---|
3093 | 3544 | void ToggleRoot() |
---|
3094 | 3545 | { |
---|
.. | .. |
---|
3140 | 3591 | refreshContents(); |
---|
3141 | 3592 | } |
---|
3142 | 3593 | |
---|
| 3594 | + void TransformChildren() |
---|
| 3595 | + { |
---|
| 3596 | + Object3D obj; |
---|
| 3597 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3598 | + { |
---|
| 3599 | + obj = (Object3D)e.nextElement(); |
---|
| 3600 | + obj.KeepTextureMatrices(); |
---|
| 3601 | + obj.TransformChildren(); |
---|
| 3602 | + obj.RestoreTextureMatrices(); |
---|
| 3603 | + |
---|
| 3604 | +// if (obj.parent == null) |
---|
| 3605 | +// { |
---|
| 3606 | +// System.out.println("NULL PARENT!"); |
---|
| 3607 | +// new Exception().printStackTrace(); |
---|
| 3608 | +// } |
---|
| 3609 | +// else |
---|
| 3610 | +// TouchTransform(obj); |
---|
| 3611 | +// //obj.parent.Touch(); |
---|
| 3612 | + } |
---|
| 3613 | + |
---|
| 3614 | + refreshContents(); |
---|
| 3615 | + } |
---|
3143 | 3616 | |
---|
3144 | 3617 | void ResetTransform() |
---|
3145 | 3618 | { |
---|
.. | .. |
---|
3252 | 3725 | refreshContents(); |
---|
3253 | 3726 | } |
---|
3254 | 3727 | |
---|
3255 | | - void ResetCentroid() |
---|
| 3728 | + void ResetCentroid(boolean full) |
---|
3256 | 3729 | { |
---|
3257 | 3730 | Object3D obj; |
---|
3258 | 3731 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3267 | 3740 | LA.matIdentity(Object3D.mat); |
---|
3268 | 3741 | obj.getBounds(minima, maxima, false); |
---|
3269 | 3742 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3270 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3743 | + if (full) |
---|
| 3744 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3271 | 3745 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3272 | 3746 | obj.TransformMesh(Object3D.mat); |
---|
| 3747 | + |
---|
3273 | 3748 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3274 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3749 | + if (full) |
---|
| 3750 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3275 | 3751 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3752 | + |
---|
3276 | 3753 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3277 | 3754 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3278 | 3755 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3301 | 3778 | |
---|
3302 | 3779 | int size = obj.MemorySize(); |
---|
3303 | 3780 | |
---|
3304 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3781 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3782 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3305 | 3783 | } |
---|
3306 | 3784 | } |
---|
3307 | 3785 | catch (Exception e) |
---|
.. | .. |
---|
3382 | 3860 | void GenNormals(boolean crease) |
---|
3383 | 3861 | { |
---|
3384 | 3862 | group.GenNormalsS(crease); |
---|
| 3863 | + |
---|
| 3864 | + refreshContents(); |
---|
| 3865 | + } |
---|
| 3866 | + |
---|
| 3867 | + void GenNormalsMESH() |
---|
| 3868 | + { |
---|
| 3869 | + group.GenNormalsMeshS(); |
---|
3385 | 3870 | |
---|
3386 | 3871 | refreshContents(); |
---|
3387 | 3872 | } |
---|
.. | .. |
---|
3613 | 4098 | String pigment = Object3D.GetPigment(tex); |
---|
3614 | 4099 | //String bump = Object3D.GetBump(tex); |
---|
3615 | 4100 | |
---|
3616 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4101 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 4102 | + |
---|
| 4103 | + try |
---|
| 4104 | + { |
---|
| 4105 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4106 | + } |
---|
| 4107 | + catch (Exception e) |
---|
| 4108 | + { |
---|
| 4109 | + System.err.println("FAIL: " + node); |
---|
| 4110 | + } |
---|
3617 | 4111 | |
---|
3618 | 4112 | double s = v.s; |
---|
3619 | 4113 | |
---|
.. | .. |
---|
4000 | 4494 | refreshContents(); |
---|
4001 | 4495 | } |
---|
4002 | 4496 | |
---|
| 4497 | + void RewindLeaves(boolean hide) |
---|
| 4498 | + { |
---|
| 4499 | + group.selection.RewindLeaves(hide); |
---|
| 4500 | + refreshContents(); |
---|
| 4501 | + } |
---|
| 4502 | + |
---|
| 4503 | + void RandomLeaves(boolean hide) |
---|
| 4504 | + { |
---|
| 4505 | + group.selection.RandomLeaves(hide); |
---|
| 4506 | + refreshContents(); |
---|
| 4507 | + } |
---|
| 4508 | + |
---|
4003 | 4509 | void SetTexRes(int tr) |
---|
4004 | 4510 | { |
---|
4005 | 4511 | group.selection.SetTexRes(tr); |
---|
.. | .. |
---|
4071 | 4577 | // } |
---|
4072 | 4578 | // } |
---|
4073 | 4579 | |
---|
4074 | | - static boolean allparams = true; |
---|
4075 | | - |
---|
4076 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4077 | | - |
---|
4078 | 4580 | void EditSelection(boolean newWindow) |
---|
4079 | 4581 | { |
---|
4080 | 4582 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
4082 | 4584 | { |
---|
4083 | 4585 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4084 | 4586 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4085 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4587 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4086 | 4588 | |
---|
4087 | 4589 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4088 | | - if(elem != group) |
---|
| 4590 | + if(elem != group || !newWindow) |
---|
4089 | 4591 | { |
---|
4090 | 4592 | // if (!(elem instanceof Composite)) |
---|
4091 | 4593 | // newWindow = false; |
---|
.. | .. |
---|
4167 | 4669 | //new Exception().printStackTrace(); |
---|
4168 | 4670 | |
---|
4169 | 4671 | freezemodel = true; |
---|
4170 | | - |
---|
| 4672 | + ClearUnpinned(); |
---|
| 4673 | + |
---|
4171 | 4674 | /**/ |
---|
4172 | 4675 | //switch (event.id) |
---|
4173 | 4676 | { |
---|
.. | .. |
---|
4175 | 4678 | //case 702: // Event.LIST_DESELECT |
---|
4176 | 4679 | group.deselectAll(); |
---|
4177 | 4680 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4178 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4179 | 4681 | if (tps != null) |
---|
4180 | 4682 | { |
---|
4181 | 4683 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4184 | 4686 | |
---|
4185 | 4687 | //if (child.parent != null) |
---|
4186 | 4688 | //child.parent.addSelectee(child); |
---|
| 4689 | + objEditor.SetMaterial(child); |
---|
4187 | 4690 | group.addSelectee(child); |
---|
4188 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4189 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4190 | | - System.err.println("info : " + child.GetPath()); |
---|
4191 | 4691 | } |
---|
4192 | 4692 | } |
---|
4193 | 4693 | // else |
---|
.. | .. |
---|
4197 | 4697 | // System.err.println("info : " + group.GetPath()); |
---|
4198 | 4698 | // } |
---|
4199 | 4699 | |
---|
4200 | | - objEditor.SetText(); // jan 2014 |
---|
4201 | | - |
---|
4202 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4700 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4203 | 4701 | CameraPane.flash = true; |
---|
4204 | 4702 | |
---|
4205 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4703 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4206 | 4704 | // a camera |
---|
4207 | 4705 | { |
---|
4208 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4209 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4706 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
| 4707 | + { |
---|
| 4708 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4709 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4710 | + } |
---|
4210 | 4711 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4211 | 4712 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4212 | 4713 | } |
---|
4213 | 4714 | |
---|
| 4715 | + if (tps != null && tps.length == 1) |
---|
| 4716 | + { |
---|
| 4717 | + EditSelection(false); |
---|
| 4718 | + } |
---|
| 4719 | + |
---|
| 4720 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4721 | + |
---|
4214 | 4722 | refreshContents(); |
---|
4215 | 4723 | //return true; |
---|
4216 | 4724 | } |
---|
.. | .. |
---|
4219 | 4727 | |
---|
4220 | 4728 | freezemodel = false; |
---|
4221 | 4729 | } |
---|
| 4730 | + |
---|
| 4731 | + void SetPinStates(boolean enabled) |
---|
| 4732 | + { |
---|
| 4733 | + editButton.setEnabled(enabled); |
---|
| 4734 | + uneditButton.setEnabled(enabled); |
---|
| 4735 | + unselectButton.setEnabled(enabled); |
---|
| 4736 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4737 | + } |
---|
| 4738 | + |
---|
| 4739 | + void refreshContents(boolean cp) |
---|
| 4740 | + { |
---|
| 4741 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4742 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
| 4743 | + { |
---|
| 4744 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4745 | + |
---|
| 4746 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4747 | + { |
---|
| 4748 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4749 | + |
---|
| 4750 | + objEditor.AddInfo(child, this, true); |
---|
| 4751 | + System.err.println("info : " + child.GetPath()); |
---|
| 4752 | + } |
---|
| 4753 | + |
---|
| 4754 | + objEditor.SetText(); // jan 2014 |
---|
| 4755 | + } |
---|
| 4756 | + |
---|
| 4757 | + super.refreshContents(cp); |
---|
| 4758 | + } |
---|
4222 | 4759 | |
---|
4223 | 4760 | void linkSomething(Object3D thing) |
---|
4224 | 4761 | { |
---|
.. | .. |
---|
4290 | 4827 | { |
---|
4291 | 4828 | if (group.selection.isEmpty()) |
---|
4292 | 4829 | return; |
---|
| 4830 | + |
---|
4293 | 4831 | Grafreed.clipboardIsTempGroup = false; |
---|
4294 | 4832 | Composite tGroup = null; |
---|
4295 | 4833 | if (group.selection.size() > 0) // 1) |
---|
.. | .. |
---|
4300 | 4838 | |
---|
4301 | 4839 | if (cut) |
---|
4302 | 4840 | { |
---|
| 4841 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4842 | +// Save(); |
---|
4303 | 4843 | //int indices[] = jList.getSelectedIndices(); |
---|
4304 | 4844 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4305 | 4845 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4389 | 4929 | } |
---|
4390 | 4930 | |
---|
4391 | 4931 | } |
---|
| 4932 | + |
---|
4392 | 4933 | if (Grafreed.clipboardIsTempGroup) |
---|
4393 | 4934 | Grafreed.clipboard = tGroup; |
---|
| 4935 | + |
---|
4394 | 4936 | if (cut) |
---|
4395 | 4937 | { |
---|
4396 | 4938 | ResetModel(); |
---|
.. | .. |
---|
4400 | 4942 | |
---|
4401 | 4943 | void paste(boolean expand) |
---|
4402 | 4944 | { |
---|
| 4945 | + if (Globals.SAVEONMAKE) |
---|
| 4946 | + Save(); |
---|
| 4947 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 4948 | + Globals.SAVEONMAKE = false; |
---|
4403 | 4949 | // if (GrafreeD.clipboard == null) |
---|
4404 | 4950 | // return; |
---|
4405 | 4951 | boolean first = true; |
---|
.. | .. |
---|
4459 | 5005 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4460 | 5006 | } |
---|
4461 | 5007 | |
---|
| 5008 | + Globals.SAVEONMAKE = keep; |
---|
4462 | 5009 | ResetModel(); |
---|
4463 | 5010 | refreshContents(); |
---|
4464 | 5011 | } |
---|
.. | .. |
---|
4594 | 5141 | |
---|
4595 | 5142 | void group(Object3D csg, boolean grab) |
---|
4596 | 5143 | { |
---|
| 5144 | + if (Globals.SAVEONMAKE) |
---|
| 5145 | + Save(); |
---|
| 5146 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 5147 | + Globals.SAVEONMAKE = false; |
---|
4597 | 5148 | if (//false) // why?? |
---|
4598 | 5149 | !group.selection.isEmpty()) |
---|
4599 | 5150 | { |
---|
.. | .. |
---|
4707 | 5258 | //node.add(csg); |
---|
4708 | 5259 | //makeSomething(node); |
---|
4709 | 5260 | makeSomething(csg); |
---|
| 5261 | + Globals.SAVEONMAKE = keep; |
---|
4710 | 5262 | } |
---|
4711 | 5263 | |
---|
4712 | 5264 | void Ungroup(Object3D g) |
---|
4713 | 5265 | { |
---|
| 5266 | + if (Globals.SAVEONMAKE) |
---|
| 5267 | + Save(); |
---|
| 5268 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 5269 | + Globals.SAVEONMAKE = false; |
---|
4714 | 5270 | if (g instanceof HiddenObject) |
---|
4715 | 5271 | { |
---|
4716 | 5272 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
4727 | 5283 | objEditor.makeSomething(g.get(i), false); |
---|
4728 | 5284 | } |
---|
4729 | 5285 | } |
---|
| 5286 | + Globals.SAVEONMAKE = keep; |
---|
4730 | 5287 | } |
---|
4731 | 5288 | |
---|
4732 | 5289 | void ungroup() |
---|
.. | .. |
---|
4922 | 5479 | } |
---|
4923 | 5480 | */ |
---|
4924 | 5481 | |
---|
4925 | | - void ImportGFD() |
---|
4926 | | - { |
---|
4927 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4928 | | - browser.show(); |
---|
4929 | | - String filename = browser.getFile(); |
---|
4930 | | - if (filename != null && filename.length() > 0) |
---|
4931 | | - { |
---|
4932 | | - String fullname = browser.getDirectory() + filename; |
---|
4933 | | - |
---|
4934 | | - //Object3D readobj = |
---|
4935 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4936 | | - //makeSomething(readobj); |
---|
4937 | | - } |
---|
4938 | | - } |
---|
4939 | | - |
---|
4940 | 5482 | /* |
---|
4941 | 5483 | public void Callback(Object obj) |
---|
4942 | 5484 | { |
---|
.. | .. |
---|
4960 | 5502 | } |
---|
4961 | 5503 | */ |
---|
4962 | 5504 | |
---|
4963 | | - void ImportVRMLX3D() |
---|
4964 | | - { |
---|
4965 | | - if (Grafreed.standAlone) |
---|
4966 | | - { |
---|
4967 | | - /**/ |
---|
4968 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4969 | | - browser.show(); |
---|
4970 | | - String filename = browser.getFile(); |
---|
4971 | | - if (filename != null && filename.length() > 0) |
---|
4972 | | - { |
---|
4973 | | - String fullname = browser.getDirectory() + filename; |
---|
4974 | | - LoadVRMLX3D(fullname); |
---|
4975 | | - } |
---|
4976 | | - /**/ |
---|
4977 | | - } |
---|
4978 | | - } |
---|
4979 | | - |
---|
4980 | 5505 | String GetFile(String dialogName) |
---|
4981 | 5506 | { |
---|
4982 | 5507 | if (Grafreed.standAlone) |
---|
.. | .. |
---|
5047 | 5572 | cButton clearpanelButton; |
---|
5048 | 5573 | cButton unselectButton; |
---|
5049 | 5574 | |
---|
| 5575 | + cButton restoreCameraButton; |
---|
| 5576 | + |
---|
| 5577 | + cButton saveButton; |
---|
5050 | 5578 | cButton oneStepButton; |
---|
| 5579 | + |
---|
| 5580 | + cButton groupButton; |
---|
| 5581 | + cButton ungroupButton; |
---|
| 5582 | + cButton compositeButton; |
---|
| 5583 | + cButton switchButton; |
---|
| 5584 | + cButton loopButton; |
---|
| 5585 | + cButton textureButton; |
---|
| 5586 | + |
---|
| 5587 | + cButton gridButton; |
---|
| 5588 | + cButton boxButton; |
---|
| 5589 | + cButton sphereButton; |
---|
| 5590 | + cButton coneButton; |
---|
| 5591 | + cButton torusButton; |
---|
| 5592 | + cButton superButton; |
---|
| 5593 | + cButton kleinButton; |
---|
| 5594 | + cButton particlesButton; |
---|
| 5595 | + cButton overlayButton; |
---|
| 5596 | + cButton lightButton; |
---|
5051 | 5597 | |
---|
5052 | 5598 | cButton screenfitButton; |
---|
5053 | 5599 | cButton screenfitpointButton; |
---|
.. | .. |
---|
5060 | 5606 | |
---|
5061 | 5607 | cButton setsupportButton; |
---|
5062 | 5608 | |
---|
5063 | | - cButton twoButton; |
---|
5064 | | - cButton sixButton; |
---|
5065 | | - cButton threeButton; |
---|
5066 | | - cButton sevenButton; |
---|
5067 | | - cButton fourButton; // full panel |
---|
5068 | | - cButton oneButton; // full XYZ |
---|
5069 | | - //cButton currentLayout; |
---|
5070 | | - |
---|
5071 | 5609 | // |
---|
5072 | 5610 | //Composite |
---|
5073 | 5611 | Object3D // to do !! |
---|
.. | .. |
---|
5077 | 5615 | //JTree jTree; |
---|
5078 | 5616 | private MenuItem lookAtItem; |
---|
5079 | 5617 | private MenuItem lookFromItem; |
---|
5080 | | - private MenuItem switchItem; |
---|
| 5618 | + private MenuItem switchViewItem; |
---|
5081 | 5619 | private MenuItem cutItem; |
---|
5082 | | - private MenuItem duplicateItem; |
---|
| 5620 | + private MenuItem undoItem; |
---|
| 5621 | + private MenuItem redoItem; |
---|
| 5622 | + private JMenuItem duplicateItem; |
---|
5083 | 5623 | private MenuItem cloneItem; |
---|
5084 | 5624 | private MenuItem cloneSupportItem; |
---|
5085 | 5625 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5092 | 5632 | private MenuItem linkverticesItem; |
---|
5093 | 5633 | private MenuItem relinkverticesItem; |
---|
5094 | 5634 | private MenuItem setMasterItem; |
---|
5095 | | - private MenuItem resetMeshItem; |
---|
| 5635 | + private MenuItem resetAllItem; |
---|
5096 | 5636 | private MenuItem stepAllItem; |
---|
5097 | 5637 | private MenuItem revertMeshItem; |
---|
5098 | 5638 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5142 | 5682 | private MenuItem showleavesItem; |
---|
5143 | 5683 | private MenuItem markleavesItem; |
---|
5144 | 5684 | private MenuItem unmarkleavesItem; |
---|
| 5685 | + private MenuItem rewindleavesItem; |
---|
| 5686 | + private MenuItem unrewindleavesItem; |
---|
| 5687 | + private MenuItem randomleavesItem; |
---|
| 5688 | + private MenuItem unrandomleavesItem; |
---|
5145 | 5689 | |
---|
5146 | 5690 | private MenuItem flipVItem; |
---|
5147 | 5691 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5153 | 5697 | private MenuItem panoTexturesItem; |
---|
5154 | 5698 | |
---|
5155 | 5699 | private MenuItem resetCentroidItem; |
---|
5156 | | - private MenuItem transformgeometryItem; |
---|
| 5700 | + private MenuItem resetCentroidXZItem; |
---|
5157 | 5701 | private MenuItem resetTransformItem; |
---|
| 5702 | + private MenuItem transformGeometryItem; |
---|
| 5703 | + private MenuItem transformChildrenItem; |
---|
5158 | 5704 | private MenuItem hideItem; |
---|
5159 | 5705 | private MenuItem grabItem; |
---|
5160 | 5706 | private MenuItem backItem; |
---|
5161 | 5707 | private MenuItem frontItem; |
---|
5162 | 5708 | private MenuItem cameraItem; |
---|
5163 | 5709 | private MenuItem compositeItem; |
---|
5164 | | - private MenuItem randomItem; |
---|
| 5710 | + private MenuItem switchItem; |
---|
5165 | 5711 | private MenuItem physicsItem; |
---|
5166 | 5712 | private MenuItem frameselectorItem; |
---|
5167 | 5713 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5223 | 5769 | private MenuItem doubleItem; |
---|
5224 | 5770 | private MenuItem tripleItem; |
---|
5225 | 5771 | |
---|
5226 | | - private MenuItem importGFDItem; |
---|
5227 | | - private MenuItem importVRMLX3DItem; |
---|
5228 | | - private MenuItem import3DSItem; |
---|
5229 | | - private MenuItem importOBJItem; |
---|
5230 | | - |
---|
5231 | 5772 | private MenuItem computeAOItem; |
---|
5232 | 5773 | private MenuItem recompileItem; |
---|
5233 | 5774 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5237 | 5778 | private MenuItem analyzeItem; |
---|
5238 | 5779 | private MenuItem dumpItem; |
---|
5239 | 5780 | //boolean freezemodel = false; |
---|
| 5781 | + |
---|
| 5782 | + Menu cameraMenu; |
---|
| 5783 | + MenuItem editCameraItem; |
---|
| 5784 | + MenuItem restoreCameraItem; |
---|
5240 | 5785 | } |
---|