.. | .. |
---|
150 | 150 | |
---|
151 | 151 | void SetupMenu2(ObjEditor oe) |
---|
152 | 152 | { |
---|
| 153 | + if (Globals.ADVANCED) |
---|
| 154 | + { |
---|
153 | 155 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
154 | 156 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
155 | 157 | //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
.. | .. |
---|
161 | 163 | lookAtItem.addActionListener(this); |
---|
162 | 164 | //lookFromItem.addActinoListener(this); |
---|
163 | 165 | //switchItem.addActionListener(this); |
---|
| 166 | + } |
---|
| 167 | + |
---|
164 | 168 | Menu menu; |
---|
165 | 169 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
166 | 170 | //editItem = menu.add(new MenuItem("Edit")); |
---|
167 | 171 | //editItem.addActionListener(this); |
---|
168 | 172 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
169 | 173 | duplicateItem.addActionListener(this); |
---|
170 | | - menu.add("-"); |
---|
171 | 174 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
172 | 175 | cloneItem.addActionListener(this); |
---|
| 176 | + if (Globals.ADVANCED) |
---|
| 177 | + { |
---|
173 | 178 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
174 | 179 | cloneSupportItem.addActionListener(this); |
---|
| 180 | + } |
---|
175 | 181 | menu.add("-"); |
---|
176 | 182 | cutItem = menu.add(new MenuItem("Cut")); |
---|
177 | 183 | cutItem.addActionListener(this); |
---|
.. | .. |
---|
179 | 185 | copyItem.addActionListener(this); |
---|
180 | 186 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
181 | 187 | pasteItem.addActionListener(this); |
---|
| 188 | + menu.add("-"); |
---|
| 189 | + |
---|
| 190 | + menu.add("-"); |
---|
| 191 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 192 | + pasteIntoItem.addActionListener(this); |
---|
182 | 193 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
183 | 194 | pasteLinkItem.addActionListener(this); |
---|
184 | 195 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
185 | 196 | pasteCloneItem.addActionListener(this); |
---|
186 | 197 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
187 | 198 | // pasteExpandItem.addActionListener(this); |
---|
| 199 | + menu.add("-"); |
---|
188 | 200 | clearItem = menu.add(new MenuItem("Clear")); |
---|
189 | 201 | clearItem.addActionListener(this); |
---|
| 202 | + |
---|
| 203 | + if (Globals.ADVANCED) |
---|
| 204 | + { |
---|
| 205 | + // Deletes the cameras... |
---|
190 | 206 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
191 | 207 | clearAllItem.addActionListener(this); |
---|
| 208 | + } |
---|
192 | 209 | |
---|
193 | 210 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
| 211 | + if (Globals.ADVANCED) |
---|
| 212 | + { |
---|
194 | 213 | resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
195 | 214 | resetMeshItem.addActionListener(this); |
---|
196 | 215 | stepAllItem = menu.add(new MenuItem("Step All")); |
---|
.. | .. |
---|
200 | 219 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
201 | 220 | resetreferencesItem.addActionListener(this); |
---|
202 | 221 | menu.add("-"); |
---|
| 222 | + } |
---|
203 | 223 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
204 | 224 | overwriteGeoItem.addActionListener(this); |
---|
205 | 225 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
211 | 231 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
212 | 232 | overwriteUVItem.addActionListener(this); |
---|
213 | 233 | menu.add("-"); |
---|
| 234 | + if (Globals.ADVANCED) |
---|
| 235 | + { |
---|
214 | 236 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
215 | 237 | generateMeshItem.addActionListener(this); |
---|
216 | 238 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
217 | 239 | poseMeshItem.addActionListener(this); |
---|
218 | 240 | menu.add("-"); |
---|
| 241 | + } |
---|
219 | 242 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
220 | 243 | resetsupportItem.addActionListener(this); |
---|
221 | 244 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
222 | 245 | linkverticesItem.addActionListener(this); |
---|
223 | 246 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
224 | 247 | relinkverticesItem.addActionListener(this); |
---|
| 248 | + |
---|
| 249 | + if (Globals.ADVANCED) |
---|
| 250 | + { |
---|
225 | 251 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
226 | 252 | setMasterItem.addActionListener(this); |
---|
| 253 | + } |
---|
227 | 254 | |
---|
228 | 255 | oe.menuBar.add(menu = new Menu("Group")); |
---|
229 | 256 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
234 | 261 | frontItem.addActionListener(this); |
---|
235 | 262 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
236 | 263 | compositeItem.addActionListener(this); |
---|
237 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 264 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
238 | 265 | hideItem.addActionListener(this); |
---|
239 | 266 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
240 | 267 | ungroupItem.addActionListener(this); |
---|
241 | 268 | menu.add("-"); |
---|
242 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 269 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
243 | 270 | randomItem.addActionListener(this); |
---|
244 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
245 | | - physicsItem.addActionListener(this); |
---|
246 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
247 | | - frameselectorItem.addActionListener(this); |
---|
248 | 271 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
249 | 272 | switchGeoItem.addActionListener(this); |
---|
250 | 273 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
251 | 274 | switchTransfoItem.addActionListener(this); |
---|
252 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 275 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
253 | 276 | morphItem.addActionListener(this); |
---|
| 277 | + |
---|
| 278 | + if (Globals.ADVANCED) |
---|
| 279 | + { |
---|
| 280 | + menu.add("-"); |
---|
| 281 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 282 | + physicsItem.addActionListener(this); |
---|
| 283 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 284 | + frameselectorItem.addActionListener(this); |
---|
254 | 285 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
255 | 286 | scriptNodeItem.addActionListener(this); |
---|
256 | 287 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
257 | 288 | cameraItem.addActionListener(this); |
---|
| 289 | + } |
---|
258 | 290 | |
---|
259 | 291 | oe.menuBar.add(menu = new Menu("Object")); |
---|
260 | 292 | textureItem = menu.add(new MenuItem("Texture")); |
---|
.. | .. |
---|
269 | 301 | shadowYItem.addActionListener(this); |
---|
270 | 302 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
271 | 303 | shadowZItem.addActionListener(this); |
---|
| 304 | + if (Globals.ADVANCED) |
---|
| 305 | + { |
---|
| 306 | + menu.add("-"); |
---|
272 | 307 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
273 | 308 | linkerItem.addActionListener(this); |
---|
274 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
275 | | - templateItem.addActionListener(this); |
---|
276 | 309 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
277 | 310 | attributeItem.addActionListener(this); |
---|
| 311 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 312 | + templateItem.addActionListener(this); |
---|
278 | 313 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
279 | 314 | pointflowItem.addActionListener(this); |
---|
| 315 | + } |
---|
280 | 316 | menu.add("-"); |
---|
281 | 317 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
282 | 318 | resetTransformItem.addActionListener(this); |
---|
.. | .. |
---|
294 | 330 | genNormalsCADItem.addActionListener(this); |
---|
295 | 331 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
296 | 332 | genNormalsMESHItem.addActionListener(this); |
---|
| 333 | + if (Globals.ADVANCED) |
---|
| 334 | + { |
---|
297 | 335 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
298 | 336 | genNormalsMINEItem.addActionListener(this); |
---|
| 337 | + } |
---|
299 | 338 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
300 | 339 | stripifyItem.addActionListener(this); |
---|
301 | 340 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
317 | 356 | reduce34MeshItem.addActionListener(this); |
---|
318 | 357 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
319 | 358 | increaseMeshItem.addActionListener(this); |
---|
320 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
321 | | - smoothMeshItem.addActionListener(this); |
---|
322 | 359 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
323 | 360 | clipMeshItem.addActionListener(this); |
---|
| 361 | + |
---|
| 362 | + if (Globals.ADVANCED) |
---|
| 363 | + { |
---|
| 364 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 365 | + smoothMeshItem.addActionListener(this); |
---|
| 366 | + } |
---|
324 | 367 | |
---|
325 | 368 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
326 | 369 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
.. | .. |
---|
330 | 373 | liveleavesItem.addActionListener(this); |
---|
331 | 374 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
332 | 375 | unliveleavesItem.addActionListener(this); |
---|
| 376 | + if (Globals.ADVANCED) |
---|
| 377 | + { |
---|
333 | 378 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
334 | 379 | supportleavesItem.addActionListener(this); |
---|
335 | 380 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
336 | 381 | unsupportleavesItem.addActionListener(this); |
---|
| 382 | + } |
---|
337 | 383 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
338 | 384 | hideleavesItem.addActionListener(this); |
---|
339 | 385 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
376 | 422 | sortbysizeItem.addActionListener(this); |
---|
377 | 423 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
378 | 424 | sortbynameItem.addActionListener(this); |
---|
| 425 | + if (Globals.ADVANCED) |
---|
| 426 | + { |
---|
379 | 427 | menu.add("-"); |
---|
380 | 428 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
381 | 429 | extractGeometriesItem.addActionListener(this); |
---|
.. | .. |
---|
385 | 433 | shareGeometriesItem.addActionListener(this); |
---|
386 | 434 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
387 | 435 | mergeGeometriesItem.addActionListener(this); |
---|
| 436 | + } |
---|
388 | 437 | |
---|
389 | 438 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
390 | 439 | buildCreateMenu(menu); |
---|
391 | 440 | |
---|
392 | | - |
---|
393 | 441 | oe.menuBar.add(menu = new Menu("Include")); |
---|
394 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
395 | | - importGFDItem.addActionListener(this); |
---|
396 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
397 | | - importVRMLX3DItem.addActionListener(this); |
---|
398 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
| 442 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
399 | 443 | importOBJItem.addActionListener(this); |
---|
400 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
| 444 | + menu.add("-"); |
---|
| 445 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
401 | 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); |
---|
402 | 453 | |
---|
403 | 454 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
404 | 455 | buildToolsMenu(menu); |
---|
.. | .. |
---|
440 | 491 | liveCB.setToolTipText("Enabled animation"); |
---|
441 | 492 | liveCB.addItemListener(this); |
---|
442 | 493 | |
---|
| 494 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 495 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 496 | + oneStepButton.addActionListener(this); |
---|
| 497 | + |
---|
| 498 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 499 | + fastCB.setToolTipText("Fast mode"); |
---|
| 500 | + fastCB.addItemListener(this); |
---|
| 501 | + |
---|
443 | 502 | oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
444 | 503 | trackCB.setToolTipText("Enable tracking"); |
---|
445 | 504 | trackCB.addItemListener(this); |
---|
.. | .. |
---|
450 | 509 | |
---|
451 | 510 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
452 | 511 | // screenfitpointButton.addActionListener(this); |
---|
453 | | -// oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
455 | | - snapobjectButton.addActionListener(this); |
---|
456 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | 512 | |
---|
459 | | - //aConstraints.gridx = 0; |
---|
460 | | - //aConstraints.gridy += 1; |
---|
461 | | - oe.aConstraints.weighty = 0; |
---|
462 | | - oe.aConstraints.gridwidth = 1; |
---|
463 | | - |
---|
| 513 | + if (Globals.ADVANCED) |
---|
| 514 | + { |
---|
| 515 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 516 | + snapobjectButton.addActionListener(this); |
---|
| 517 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 518 | + } |
---|
| 519 | + |
---|
464 | 520 | oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
465 | 521 | flashSelectionButton.setToolTipText("Show selection"); |
---|
466 | 522 | flashSelectionButton.addActionListener(this); |
---|
.. | .. |
---|
504 | 560 | uneditButton.setToolTipText("Unedit selection"); |
---|
505 | 561 | uneditButton.addActionListener(this); |
---|
506 | 562 | |
---|
| 563 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 564 | + allParamsButton.setToolTipText("Edit all params"); |
---|
| 565 | + allParamsButton.addActionListener(this); |
---|
| 566 | + |
---|
507 | 567 | commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
508 | 568 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
509 | 569 | clearPanelButton.addActionListener(this); |
---|
510 | | - |
---|
511 | | - commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
512 | | - allParamsButton.setToolTipText("All params??"); |
---|
513 | | - allParamsButton.addActionListener(this); |
---|
514 | 570 | |
---|
515 | 571 | commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
516 | 572 | unselectButton.setToolTipText("Unselect"); |
---|
.. | .. |
---|
587 | 643 | |
---|
588 | 644 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
589 | 645 | { |
---|
590 | | - //constraints.gridx = 0; |
---|
591 | | - //constraints.gridy = 0; |
---|
592 | | - panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
593 | | - fastCB.setToolTipText("Fast mode"); |
---|
594 | | - fastCB.addItemListener(this); |
---|
595 | | - //constraints.gridy += 1; |
---|
596 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
597 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
598 | | - supportCB.addItemListener(this); |
---|
599 | | - |
---|
600 | | - // constraints.gridy += 1; |
---|
601 | | - // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
602 | | - // localCB.addItemListener(this); |
---|
603 | | - |
---|
604 | | - //constraints.gridy += 1; |
---|
605 | | - panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
606 | | - crowdCB.setToolTipText("Used for crowds"); |
---|
607 | | - crowdCB.addItemListener(this); |
---|
608 | | - |
---|
609 | | - //constraints.gridy += 1; |
---|
610 | | - panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
611 | | - smoothCB.setToolTipText("Snapping delay"); |
---|
612 | | - smoothCB.addItemListener(this); |
---|
613 | | - |
---|
614 | | - //constraints.gridy += 1; |
---|
615 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
616 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
617 | | - slowCB.addItemListener(this); |
---|
618 | | - //constraints.gridy += 1; |
---|
619 | 646 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
620 | 647 | boxCB.setToolTipText("Display bounding boxes"); |
---|
621 | 648 | boxCB.addItemListener(this); |
---|
622 | | - //constraints.gridy += 1; |
---|
| 649 | + |
---|
623 | 650 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
624 | 651 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
625 | 652 | zoomBoxCB.addItemListener(this); |
---|
626 | 653 | |
---|
| 654 | + if (Globals.ADVANCED) |
---|
| 655 | + { |
---|
| 656 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 657 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 658 | + supportCB.addItemListener(this); |
---|
| 659 | + |
---|
| 660 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 661 | + // localCB.addItemListener(this); |
---|
| 662 | + |
---|
| 663 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 664 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 665 | + crowdCB.addItemListener(this); |
---|
| 666 | + |
---|
| 667 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 668 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 669 | + smoothCB.addItemListener(this); |
---|
| 670 | + |
---|
| 671 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 672 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 673 | + slowCB.addItemListener(this); |
---|
| 674 | + |
---|
627 | 675 | // constraints.gridy += 1; |
---|
628 | 676 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
629 | 677 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
648 | 696 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
649 | 697 | // debugCB.addItemListener(this); |
---|
650 | 698 | |
---|
651 | | - //constraints.gridy += 1; |
---|
652 | 699 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
653 | 700 | oeilCB.addItemListener(this); |
---|
654 | 701 | |
---|
655 | | - //constraints.gridy += 1; |
---|
656 | 702 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
657 | 703 | lookAtCB.setToolTipText("Look-at target"); |
---|
658 | 704 | lookAtCB.addItemListener(this); |
---|
| 705 | + |
---|
| 706 | + } |
---|
659 | 707 | |
---|
660 | 708 | cGridBag fill = new cGridBag(); |
---|
661 | 709 | |
---|
.. | .. |
---|
892 | 940 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
893 | 941 | // return; |
---|
894 | 942 | // } |
---|
895 | | - if (string.charAt(0) == '/') |
---|
| 943 | + |
---|
| 944 | + // File path for Mac and Windows |
---|
| 945 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
896 | 946 | { |
---|
897 | 947 | // file(s) |
---|
898 | 948 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
919 | 969 | |
---|
920 | 970 | flashIt = false; |
---|
921 | 971 | CameraPane pane = (CameraPane) target; |
---|
922 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 972 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
923 | 973 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
924 | 974 | |
---|
925 | 975 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
946 | 996 | { |
---|
947 | 997 | loadClipboard(true); |
---|
948 | 998 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
949 | | - pasteInto(false); |
---|
| 999 | + pasteInto(false, false); |
---|
950 | 1000 | } else { |
---|
951 | 1001 | loadClipboard(false); |
---|
952 | 1002 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
953 | | - pasteInto(false); // true); // ??? |
---|
| 1003 | + pasteInto(false, false); // true); // ??? |
---|
954 | 1004 | } |
---|
955 | 1005 | } |
---|
956 | 1006 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1072 | 1122 | kleinItem.addActionListener(this); |
---|
1073 | 1123 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1074 | 1124 | particleItem.addActionListener(this); |
---|
| 1125 | + if (Globals.ADVANCED) |
---|
| 1126 | + { |
---|
1075 | 1127 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1076 | 1128 | ragdollItem.addActionListener(this); |
---|
1077 | 1129 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1078 | 1130 | ragdoll2Item.addActionListener(this); |
---|
| 1131 | + } |
---|
1079 | 1132 | menu.add("-"); |
---|
1080 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1133 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1081 | 1134 | meshItem.addActionListener(this); |
---|
1082 | 1135 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1083 | 1136 | // meshGroupItem.addActionListener(this); |
---|
| 1137 | + if (Globals.ADVANCED) |
---|
| 1138 | + { |
---|
1084 | 1139 | springItem = menu.add(new MenuItem("Spring")); |
---|
1085 | 1140 | springItem.addActionListener(this); |
---|
1086 | 1141 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1087 | 1142 | flagItem.addActionListener(this); |
---|
1088 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1089 | | - bezierItem.addActionListener(this); |
---|
1090 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1091 | | - checkerItem.addActionListener(this); |
---|
1092 | 1143 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1093 | 1144 | blobItem.addActionListener(this); |
---|
1094 | 1145 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1095 | 1146 | latheItem.addActionListener(this); |
---|
| 1147 | + } |
---|
| 1148 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1149 | + bezierItem.addActionListener(this); |
---|
| 1150 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1151 | + overlayItem.addActionListener(this); |
---|
1096 | 1152 | lightItem = menu.add(new MenuItem("Light")); |
---|
1097 | 1153 | lightItem.addActionListener(this); |
---|
1098 | 1154 | menu.add("-"); |
---|
.. | .. |
---|
1102 | 1158 | loopItem.addActionListener(this); |
---|
1103 | 1159 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1104 | 1160 | doubleItem.addActionListener(this); |
---|
| 1161 | + if (Globals.ADVANCED) |
---|
| 1162 | + { |
---|
1105 | 1163 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1106 | 1164 | tripleItem.addActionListener(this); |
---|
| 1165 | + } |
---|
1107 | 1166 | } |
---|
1108 | 1167 | |
---|
1109 | 1168 | void buildToolsMenu(Menu menu) |
---|
1110 | 1169 | { |
---|
1111 | 1170 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1112 | 1171 | animationItem.addItemListener(this); |
---|
1113 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1172 | + animationItem.setState(Globals.ANIMATION); |
---|
1114 | 1173 | |
---|
1115 | 1174 | menu.add("-"); |
---|
1116 | 1175 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1117 | 1176 | parseverticesItem.addActionListener(this); |
---|
1118 | 1177 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1119 | 1178 | textureFieldItem.addActionListener(this); |
---|
1120 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1179 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1121 | 1180 | alignItem.addActionListener(this); |
---|
1122 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1123 | | - mirrorItem.addActionListener(this); |
---|
1124 | 1181 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1125 | 1182 | reduceMorphItem.addActionListener(this); |
---|
1126 | 1183 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1127 | 1184 | reduce34MorphItem.addActionListener(this); |
---|
1128 | | - |
---|
| 1185 | + menu.add("-"); |
---|
1129 | 1186 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1130 | 1187 | computeAOItem.addActionListener(this); |
---|
1131 | | - menu.add("-"); |
---|
1132 | 1188 | |
---|
| 1189 | + if (Globals.ADVANCED) |
---|
| 1190 | + { |
---|
| 1191 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1192 | + mirrorItem.addActionListener(this); |
---|
| 1193 | + menu.add("-"); |
---|
1133 | 1194 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1134 | 1195 | memoryItem.addActionListener(this); |
---|
1135 | 1196 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1152 | 1213 | menu.add("-"); |
---|
1153 | 1214 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1154 | 1215 | editScriptItem.addActionListener(this); |
---|
| 1216 | + } |
---|
1155 | 1217 | } |
---|
1156 | 1218 | |
---|
1157 | 1219 | void ScreenFit() |
---|
.. | .. |
---|
1653 | 1715 | { |
---|
1654 | 1716 | makeSomething(new BezierSurface()); |
---|
1655 | 1717 | } else |
---|
1656 | | - if (source == checkerItem) |
---|
| 1718 | + if (source == overlayItem) |
---|
1657 | 1719 | { |
---|
1658 | 1720 | /* |
---|
1659 | 1721 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1802 | 1864 | } else |
---|
1803 | 1865 | if (source == importOBJItem) |
---|
1804 | 1866 | { |
---|
1805 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 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 | + } |
---|
1806 | 1876 | } else |
---|
1807 | 1877 | if (source == computeAOItem) |
---|
1808 | 1878 | { |
---|
.. | .. |
---|
1840 | 1910 | if (source == dumpItem) |
---|
1841 | 1911 | { |
---|
1842 | 1912 | DumpObject(); |
---|
| 1913 | + } else |
---|
| 1914 | + if (source == oneStepButton) |
---|
| 1915 | + { |
---|
| 1916 | + Globals.ONESTEP = true; |
---|
| 1917 | + cameraView.repaint(); |
---|
1843 | 1918 | } else |
---|
1844 | 1919 | if (source == screenfitButton) |
---|
1845 | 1920 | { |
---|
.. | .. |
---|
1913 | 1988 | { |
---|
1914 | 1989 | paste(false); |
---|
1915 | 1990 | } else |
---|
| 1991 | + if (source == pasteIntoItem) |
---|
| 1992 | + { |
---|
| 1993 | + pasteInto(true, false); |
---|
| 1994 | + } else |
---|
1916 | 1995 | if (source == pasteLinkItem) |
---|
1917 | 1996 | { |
---|
1918 | | - pasteInto(false); |
---|
| 1997 | + pasteInto(false, false); |
---|
1919 | 1998 | } else |
---|
1920 | 1999 | if (source == pasteCloneItem) |
---|
1921 | 2000 | { |
---|
1922 | | - pasteInto(true); |
---|
| 2001 | + pasteInto(true, true); |
---|
1923 | 2002 | } else |
---|
1924 | 2003 | if (source == pasteExpandItem) |
---|
1925 | 2004 | { |
---|
.. | .. |
---|
2121 | 2200 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2122 | 2201 | for (int i=0; i<group.selection.size(); i++) |
---|
2123 | 2202 | { |
---|
2124 | | - boolean random = CameraPane.RANDOM; |
---|
2125 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2203 | + boolean random = CameraPane.SWITCH; |
---|
| 2204 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2126 | 2205 | group.selection.get(i).linkVerticesThis(content); |
---|
2127 | 2206 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2128 | | - CameraPane.RANDOM = random; |
---|
| 2207 | + CameraPane.SWITCH = random; |
---|
2129 | 2208 | } |
---|
2130 | 2209 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2131 | 2210 | refreshContents(); |
---|
.. | .. |
---|
2135 | 2214 | { |
---|
2136 | 2215 | for (int i=0; i<group.selection.size(); i++) |
---|
2137 | 2216 | { |
---|
2138 | | - boolean random = CameraPane.RANDOM; |
---|
2139 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2217 | + boolean random = CameraPane.SWITCH; |
---|
| 2218 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2140 | 2219 | group.selection.get(i).linkVerticesThis(null); |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2220 | + CameraPane.SWITCH = random; |
---|
2142 | 2221 | } |
---|
2143 | 2222 | |
---|
2144 | 2223 | refreshContents(); |
---|
2145 | 2224 | } else |
---|
2146 | 2225 | if (source == relinkverticesItem) |
---|
2147 | 2226 | { |
---|
2148 | | - boolean random = CameraPane.RANDOM; |
---|
2149 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2227 | + boolean random = CameraPane.SWITCH; |
---|
| 2228 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2150 | 2229 | group.selection.RelinkToSupport(); |
---|
2151 | | - CameraPane.RANDOM = random; |
---|
| 2230 | + CameraPane.SWITCH = random; |
---|
2152 | 2231 | |
---|
2153 | 2232 | refreshContents(); |
---|
2154 | 2233 | } else |
---|
.. | .. |
---|
2246 | 2325 | RandomNode random = new RandomNode(); |
---|
2247 | 2326 | group(random); |
---|
2248 | 2327 | if (random.size() > 0) |
---|
2249 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2328 | + random.name = random.get(0).name + "Switch"; |
---|
2250 | 2329 | } else |
---|
2251 | 2330 | if (source == physicsItem) |
---|
2252 | 2331 | { |
---|
.. | .. |
---|
2903 | 2982 | |
---|
2904 | 2983 | child.editWindow = null; // ??????????? |
---|
2905 | 2984 | } |
---|
2906 | | - objEditor.ctrlPanel.validate(); |
---|
| 2985 | + objEditor.ctrlPanel.FlushUI(); |
---|
2907 | 2986 | //objEditor.jTree.clearSelection(); |
---|
2908 | 2987 | //objEditor.ResetSliders(); |
---|
2909 | 2988 | refreshContents(true); |
---|
.. | .. |
---|
3622 | 3701 | |
---|
3623 | 3702 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3624 | 3703 | |
---|
3625 | | - boolean random = CameraPane.RANDOM; |
---|
3626 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3704 | + boolean random = CameraPane.SWITCH; |
---|
| 3705 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3627 | 3706 | lowres.linkVerticesThis(null); |
---|
3628 | 3707 | lowres.linkVerticesThis(sn); |
---|
3629 | | - CameraPane.RANDOM = random; |
---|
| 3708 | + CameraPane.SWITCH = random; |
---|
3630 | 3709 | |
---|
3631 | 3710 | System.err.flush(); |
---|
3632 | 3711 | |
---|
.. | .. |
---|
4384 | 4463 | refreshContents(); |
---|
4385 | 4464 | } |
---|
4386 | 4465 | |
---|
4387 | | - void pasteInto(boolean copyit) |
---|
| 4466 | + void pasteInto(boolean copyit, boolean clone) |
---|
4388 | 4467 | { |
---|
4389 | 4468 | // if (GrafreeD.clipboard == null) |
---|
4390 | 4469 | // return; |
---|
.. | .. |
---|
4413 | 4492 | if (copyit) |
---|
4414 | 4493 | { |
---|
4415 | 4494 | // paste(false); |
---|
4416 | | - CloneClipboard(false); // sept 2014 |
---|
| 4495 | + if (clone) |
---|
| 4496 | + { |
---|
| 4497 | + CloneClipboard(false); // sept 2014 |
---|
| 4498 | + } |
---|
| 4499 | + else |
---|
| 4500 | + { |
---|
| 4501 | + paste(false); |
---|
| 4502 | + } |
---|
4417 | 4503 | } |
---|
4418 | 4504 | else |
---|
4419 | 4505 | { |
---|
.. | .. |
---|
4957 | 5043 | cButton flashSelectionButton; |
---|
4958 | 5044 | cButton editButton; |
---|
4959 | 5045 | cButton uneditButton; |
---|
| 5046 | + JCheckBox allParamsButton; |
---|
4960 | 5047 | cButton clearpanelButton; |
---|
4961 | | - cButton allParamsButton; |
---|
4962 | 5048 | cButton unselectButton; |
---|
4963 | 5049 | |
---|
| 5050 | + cButton oneStepButton; |
---|
| 5051 | + |
---|
4964 | 5052 | cButton screenfitButton; |
---|
4965 | 5053 | cButton screenfitpointButton; |
---|
4966 | 5054 | cButton snapobjectButton; |
---|
.. | .. |
---|
5015 | 5103 | private MenuItem mergeGeometriesItem; |
---|
5016 | 5104 | private MenuItem copyItem; |
---|
5017 | 5105 | private MenuItem pasteItem; |
---|
| 5106 | + private MenuItem pasteIntoItem; |
---|
5018 | 5107 | private MenuItem pasteLinkItem; |
---|
5019 | 5108 | private MenuItem pasteCloneItem; |
---|
5020 | 5109 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5112 | 5201 | private MenuItem blobItem; |
---|
5113 | 5202 | private MenuItem latheItem; |
---|
5114 | 5203 | private MenuItem bezierItem; |
---|
5115 | | - private MenuItem checkerItem; |
---|
| 5204 | + private MenuItem overlayItem; |
---|
5116 | 5205 | private MenuItem meshItem; |
---|
5117 | 5206 | // private MenuItem meshGroupItem; |
---|
5118 | 5207 | private MenuItem springItem; |
---|