.. | .. |
---|
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 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
172 | | - cloneItem.addActionListener(this); |
---|
173 | | - cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
174 | | - cloneSupportItem.addActionListener(this); |
---|
175 | | - menu.add("-"); |
---|
176 | 174 | cutItem = menu.add(new MenuItem("Cut")); |
---|
177 | 175 | cutItem.addActionListener(this); |
---|
178 | 176 | copyItem = menu.add(new MenuItem("Copy")); |
---|
179 | 177 | copyItem.addActionListener(this); |
---|
180 | 178 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
181 | 179 | pasteItem.addActionListener(this); |
---|
| 180 | + menu.add("-"); |
---|
| 181 | + cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 182 | + cloneItem.addActionListener(this); |
---|
| 183 | + cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
| 184 | + cloneSupportItem.addActionListener(this); |
---|
| 185 | + menu.add("-"); |
---|
| 186 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 187 | + pasteIntoItem.addActionListener(this); |
---|
182 | 188 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
183 | 189 | pasteLinkItem.addActionListener(this); |
---|
184 | 190 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
185 | 191 | pasteCloneItem.addActionListener(this); |
---|
186 | 192 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
187 | 193 | // pasteExpandItem.addActionListener(this); |
---|
| 194 | + menu.add("-"); |
---|
188 | 195 | clearItem = menu.add(new MenuItem("Clear")); |
---|
189 | 196 | clearItem.addActionListener(this); |
---|
| 197 | + |
---|
| 198 | + if (Globals.ADVANCED) |
---|
| 199 | + { |
---|
| 200 | + // Deletes the cameras... |
---|
190 | 201 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
191 | 202 | clearAllItem.addActionListener(this); |
---|
| 203 | + } |
---|
192 | 204 | |
---|
193 | 205 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
| 206 | + if (Globals.ADVANCED) |
---|
| 207 | + { |
---|
194 | 208 | resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
195 | 209 | resetMeshItem.addActionListener(this); |
---|
196 | 210 | stepAllItem = menu.add(new MenuItem("Step All")); |
---|
.. | .. |
---|
200 | 214 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
201 | 215 | resetreferencesItem.addActionListener(this); |
---|
202 | 216 | menu.add("-"); |
---|
| 217 | + } |
---|
203 | 218 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
204 | 219 | overwriteGeoItem.addActionListener(this); |
---|
205 | 220 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
211 | 226 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
212 | 227 | overwriteUVItem.addActionListener(this); |
---|
213 | 228 | menu.add("-"); |
---|
| 229 | + if (Globals.ADVANCED) |
---|
| 230 | + { |
---|
214 | 231 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
215 | 232 | generateMeshItem.addActionListener(this); |
---|
216 | 233 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
217 | 234 | poseMeshItem.addActionListener(this); |
---|
218 | 235 | menu.add("-"); |
---|
| 236 | + } |
---|
219 | 237 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
220 | 238 | resetsupportItem.addActionListener(this); |
---|
221 | 239 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
222 | 240 | linkverticesItem.addActionListener(this); |
---|
223 | 241 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
224 | 242 | relinkverticesItem.addActionListener(this); |
---|
| 243 | + |
---|
| 244 | + if (Globals.ADVANCED) |
---|
| 245 | + { |
---|
225 | 246 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
226 | 247 | setMasterItem.addActionListener(this); |
---|
| 248 | + } |
---|
227 | 249 | |
---|
228 | 250 | oe.menuBar.add(menu = new Menu("Group")); |
---|
229 | 251 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
234 | 256 | frontItem.addActionListener(this); |
---|
235 | 257 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
236 | 258 | compositeItem.addActionListener(this); |
---|
237 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 259 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
238 | 260 | hideItem.addActionListener(this); |
---|
239 | 261 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
240 | 262 | ungroupItem.addActionListener(this); |
---|
241 | 263 | menu.add("-"); |
---|
242 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 264 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
243 | 265 | 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 | 266 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
249 | 267 | switchGeoItem.addActionListener(this); |
---|
250 | 268 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
251 | 269 | switchTransfoItem.addActionListener(this); |
---|
252 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 270 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
253 | 271 | morphItem.addActionListener(this); |
---|
| 272 | + |
---|
| 273 | + if (Globals.ADVANCED) |
---|
| 274 | + { |
---|
| 275 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 276 | + physicsItem.addActionListener(this); |
---|
| 277 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 278 | + frameselectorItem.addActionListener(this); |
---|
254 | 279 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
255 | 280 | scriptNodeItem.addActionListener(this); |
---|
256 | 281 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
257 | 282 | cameraItem.addActionListener(this); |
---|
| 283 | + } |
---|
258 | 284 | |
---|
259 | 285 | oe.menuBar.add(menu = new Menu("Object")); |
---|
260 | 286 | textureItem = menu.add(new MenuItem("Texture")); |
---|
.. | .. |
---|
269 | 295 | shadowYItem.addActionListener(this); |
---|
270 | 296 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
271 | 297 | shadowZItem.addActionListener(this); |
---|
| 298 | + if (Globals.ADVANCED) |
---|
| 299 | + { |
---|
272 | 300 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
273 | 301 | linkerItem.addActionListener(this); |
---|
274 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
275 | | - templateItem.addActionListener(this); |
---|
276 | 302 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
277 | 303 | attributeItem.addActionListener(this); |
---|
| 304 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 305 | + templateItem.addActionListener(this); |
---|
278 | 306 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
279 | 307 | pointflowItem.addActionListener(this); |
---|
280 | 308 | menu.add("-"); |
---|
| 309 | + } |
---|
281 | 310 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
282 | 311 | resetTransformItem.addActionListener(this); |
---|
283 | 312 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
.. | .. |
---|
294 | 323 | genNormalsCADItem.addActionListener(this); |
---|
295 | 324 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
296 | 325 | genNormalsMESHItem.addActionListener(this); |
---|
| 326 | + if (Globals.ADVANCED) |
---|
| 327 | + { |
---|
297 | 328 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
298 | 329 | genNormalsMINEItem.addActionListener(this); |
---|
| 330 | + } |
---|
299 | 331 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
300 | 332 | stripifyItem.addActionListener(this); |
---|
301 | 333 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
317 | 349 | reduce34MeshItem.addActionListener(this); |
---|
318 | 350 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
319 | 351 | increaseMeshItem.addActionListener(this); |
---|
320 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
321 | | - smoothMeshItem.addActionListener(this); |
---|
322 | 352 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
323 | 353 | clipMeshItem.addActionListener(this); |
---|
| 354 | + |
---|
| 355 | + if (Globals.ADVANCED) |
---|
| 356 | + { |
---|
| 357 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 358 | + smoothMeshItem.addActionListener(this); |
---|
| 359 | + } |
---|
324 | 360 | |
---|
325 | 361 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
326 | 362 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
.. | .. |
---|
330 | 366 | liveleavesItem.addActionListener(this); |
---|
331 | 367 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
332 | 368 | unliveleavesItem.addActionListener(this); |
---|
| 369 | + if (Globals.ADVANCED) |
---|
| 370 | + { |
---|
333 | 371 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
334 | 372 | supportleavesItem.addActionListener(this); |
---|
335 | 373 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
336 | 374 | unsupportleavesItem.addActionListener(this); |
---|
| 375 | + } |
---|
337 | 376 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
338 | 377 | hideleavesItem.addActionListener(this); |
---|
339 | 378 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
376 | 415 | sortbysizeItem.addActionListener(this); |
---|
377 | 416 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
378 | 417 | sortbynameItem.addActionListener(this); |
---|
| 418 | + if (Globals.ADVANCED) |
---|
| 419 | + { |
---|
379 | 420 | menu.add("-"); |
---|
380 | 421 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
381 | 422 | extractGeometriesItem.addActionListener(this); |
---|
.. | .. |
---|
385 | 426 | shareGeometriesItem.addActionListener(this); |
---|
386 | 427 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
387 | 428 | mergeGeometriesItem.addActionListener(this); |
---|
| 429 | + } |
---|
388 | 430 | |
---|
389 | 431 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
390 | 432 | buildCreateMenu(menu); |
---|
391 | 433 | |
---|
392 | | - |
---|
393 | 434 | oe.menuBar.add(menu = new Menu("Include")); |
---|
394 | 435 | importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
395 | 436 | importGFDItem.addActionListener(this); |
---|
.. | .. |
---|
440 | 481 | liveCB.setToolTipText("Enabled animation"); |
---|
441 | 482 | liveCB.addItemListener(this); |
---|
442 | 483 | |
---|
| 484 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 485 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 486 | + oneStepButton.addActionListener(this); |
---|
| 487 | + |
---|
| 488 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 489 | + fastCB.setToolTipText("Fast mode"); |
---|
| 490 | + fastCB.addItemListener(this); |
---|
| 491 | + |
---|
443 | 492 | oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
444 | 493 | trackCB.setToolTipText("Enable tracking"); |
---|
445 | 494 | trackCB.addItemListener(this); |
---|
.. | .. |
---|
450 | 499 | |
---|
451 | 500 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
452 | 501 | // 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 | 502 | |
---|
459 | | - //aConstraints.gridx = 0; |
---|
460 | | - //aConstraints.gridy += 1; |
---|
461 | | - oe.aConstraints.weighty = 0; |
---|
462 | | - oe.aConstraints.gridwidth = 1; |
---|
463 | | - |
---|
| 503 | + if (Globals.ADVANCED) |
---|
| 504 | + { |
---|
| 505 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 506 | + snapobjectButton.addActionListener(this); |
---|
| 507 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 508 | + } |
---|
| 509 | + |
---|
464 | 510 | oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
465 | 511 | flashSelectionButton.setToolTipText("Show selection"); |
---|
466 | 512 | flashSelectionButton.addActionListener(this); |
---|
.. | .. |
---|
504 | 550 | uneditButton.setToolTipText("Unedit selection"); |
---|
505 | 551 | uneditButton.addActionListener(this); |
---|
506 | 552 | |
---|
| 553 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 554 | + allParamsButton.setToolTipText("Edit all params"); |
---|
| 555 | + allParamsButton.addActionListener(this); |
---|
| 556 | + |
---|
507 | 557 | commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
508 | 558 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
509 | 559 | 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 | 560 | |
---|
515 | 561 | commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
516 | 562 | unselectButton.setToolTipText("Unselect"); |
---|
.. | .. |
---|
587 | 633 | |
---|
588 | 634 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
589 | 635 | { |
---|
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 | 636 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
620 | 637 | boxCB.setToolTipText("Display bounding boxes"); |
---|
621 | 638 | boxCB.addItemListener(this); |
---|
622 | | - //constraints.gridy += 1; |
---|
| 639 | + |
---|
623 | 640 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
624 | 641 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
625 | 642 | zoomBoxCB.addItemListener(this); |
---|
626 | 643 | |
---|
| 644 | + if (Globals.ADVANCED) |
---|
| 645 | + { |
---|
| 646 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 647 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 648 | + supportCB.addItemListener(this); |
---|
| 649 | + |
---|
| 650 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 651 | + // localCB.addItemListener(this); |
---|
| 652 | + |
---|
| 653 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 654 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 655 | + crowdCB.addItemListener(this); |
---|
| 656 | + |
---|
| 657 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 658 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 659 | + smoothCB.addItemListener(this); |
---|
| 660 | + |
---|
| 661 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 662 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 663 | + slowCB.addItemListener(this); |
---|
| 664 | + |
---|
627 | 665 | // constraints.gridy += 1; |
---|
628 | 666 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
629 | 667 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
648 | 686 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
649 | 687 | // debugCB.addItemListener(this); |
---|
650 | 688 | |
---|
651 | | - //constraints.gridy += 1; |
---|
652 | 689 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
653 | 690 | oeilCB.addItemListener(this); |
---|
654 | 691 | |
---|
655 | | - //constraints.gridy += 1; |
---|
656 | 692 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
657 | 693 | lookAtCB.setToolTipText("Look-at target"); |
---|
658 | 694 | lookAtCB.addItemListener(this); |
---|
| 695 | + |
---|
| 696 | + } |
---|
659 | 697 | |
---|
660 | 698 | cGridBag fill = new cGridBag(); |
---|
661 | 699 | |
---|
.. | .. |
---|
946 | 984 | { |
---|
947 | 985 | loadClipboard(true); |
---|
948 | 986 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
949 | | - pasteInto(false); |
---|
| 987 | + pasteInto(false, false); |
---|
950 | 988 | } else { |
---|
951 | 989 | loadClipboard(false); |
---|
952 | 990 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
953 | | - pasteInto(false); // true); // ??? |
---|
| 991 | + pasteInto(false, false); // true); // ??? |
---|
954 | 992 | } |
---|
955 | 993 | } |
---|
956 | 994 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1072 | 1110 | kleinItem.addActionListener(this); |
---|
1073 | 1111 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1074 | 1112 | particleItem.addActionListener(this); |
---|
| 1113 | + if (Globals.ADVANCED) |
---|
| 1114 | + { |
---|
1075 | 1115 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1076 | 1116 | ragdollItem.addActionListener(this); |
---|
1077 | 1117 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1078 | 1118 | ragdoll2Item.addActionListener(this); |
---|
| 1119 | + } |
---|
1079 | 1120 | menu.add("-"); |
---|
1080 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1121 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1081 | 1122 | meshItem.addActionListener(this); |
---|
1082 | 1123 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1083 | 1124 | // meshGroupItem.addActionListener(this); |
---|
| 1125 | + if (Globals.ADVANCED) |
---|
| 1126 | + { |
---|
1084 | 1127 | springItem = menu.add(new MenuItem("Spring")); |
---|
1085 | 1128 | springItem.addActionListener(this); |
---|
1086 | 1129 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1087 | 1130 | 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 | 1131 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1093 | 1132 | blobItem.addActionListener(this); |
---|
1094 | 1133 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1095 | 1134 | latheItem.addActionListener(this); |
---|
| 1135 | + } |
---|
| 1136 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1137 | + bezierItem.addActionListener(this); |
---|
| 1138 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1139 | + overlayItem.addActionListener(this); |
---|
1096 | 1140 | lightItem = menu.add(new MenuItem("Light")); |
---|
1097 | 1141 | lightItem.addActionListener(this); |
---|
1098 | 1142 | menu.add("-"); |
---|
.. | .. |
---|
1102 | 1146 | loopItem.addActionListener(this); |
---|
1103 | 1147 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1104 | 1148 | doubleItem.addActionListener(this); |
---|
| 1149 | + if (Globals.ADVANCED) |
---|
| 1150 | + { |
---|
1105 | 1151 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1106 | 1152 | tripleItem.addActionListener(this); |
---|
| 1153 | + } |
---|
1107 | 1154 | } |
---|
1108 | 1155 | |
---|
1109 | 1156 | void buildToolsMenu(Menu menu) |
---|
1110 | 1157 | { |
---|
1111 | 1158 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1112 | 1159 | animationItem.addItemListener(this); |
---|
1113 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1160 | + animationItem.setState(Globals.ANIMATION); |
---|
1114 | 1161 | |
---|
1115 | 1162 | menu.add("-"); |
---|
1116 | 1163 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1117 | 1164 | parseverticesItem.addActionListener(this); |
---|
1118 | 1165 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1119 | 1166 | textureFieldItem.addActionListener(this); |
---|
1120 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1167 | + alignItem = menu.add(new MenuItem("Align Object")); |
---|
1121 | 1168 | alignItem.addActionListener(this); |
---|
1122 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1123 | | - mirrorItem.addActionListener(this); |
---|
1124 | 1169 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1125 | 1170 | reduceMorphItem.addActionListener(this); |
---|
1126 | 1171 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
.. | .. |
---|
1128 | 1173 | |
---|
1129 | 1174 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1130 | 1175 | computeAOItem.addActionListener(this); |
---|
1131 | | - menu.add("-"); |
---|
1132 | 1176 | |
---|
| 1177 | + if (Globals.ADVANCED) |
---|
| 1178 | + { |
---|
| 1179 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1180 | + mirrorItem.addActionListener(this); |
---|
| 1181 | + menu.add("-"); |
---|
1133 | 1182 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1134 | 1183 | memoryItem.addActionListener(this); |
---|
1135 | 1184 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1152 | 1201 | menu.add("-"); |
---|
1153 | 1202 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1154 | 1203 | editScriptItem.addActionListener(this); |
---|
| 1204 | + } |
---|
1155 | 1205 | } |
---|
1156 | 1206 | |
---|
1157 | 1207 | void ScreenFit() |
---|
.. | .. |
---|
1653 | 1703 | { |
---|
1654 | 1704 | makeSomething(new BezierSurface()); |
---|
1655 | 1705 | } else |
---|
1656 | | - if (source == checkerItem) |
---|
| 1706 | + if (source == overlayItem) |
---|
1657 | 1707 | { |
---|
1658 | 1708 | /* |
---|
1659 | 1709 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1841 | 1891 | { |
---|
1842 | 1892 | DumpObject(); |
---|
1843 | 1893 | } else |
---|
| 1894 | + if (source == oneStepButton) |
---|
| 1895 | + { |
---|
| 1896 | + Globals.ONESTEP = true; |
---|
| 1897 | + cameraView.repaint(); |
---|
| 1898 | + } else |
---|
1844 | 1899 | if (source == screenfitButton) |
---|
1845 | 1900 | { |
---|
1846 | 1901 | //Reload(lastConverter, lastFilename, true); |
---|
.. | .. |
---|
1913 | 1968 | { |
---|
1914 | 1969 | paste(false); |
---|
1915 | 1970 | } else |
---|
| 1971 | + if (source == pasteIntoItem) |
---|
| 1972 | + { |
---|
| 1973 | + pasteInto(true, false); |
---|
| 1974 | + } else |
---|
1916 | 1975 | if (source == pasteLinkItem) |
---|
1917 | 1976 | { |
---|
1918 | | - pasteInto(false); |
---|
| 1977 | + pasteInto(false, false); |
---|
1919 | 1978 | } else |
---|
1920 | 1979 | if (source == pasteCloneItem) |
---|
1921 | 1980 | { |
---|
1922 | | - pasteInto(true); |
---|
| 1981 | + pasteInto(true, true); |
---|
1923 | 1982 | } else |
---|
1924 | 1983 | if (source == pasteExpandItem) |
---|
1925 | 1984 | { |
---|
.. | .. |
---|
2121 | 2180 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2122 | 2181 | for (int i=0; i<group.selection.size(); i++) |
---|
2123 | 2182 | { |
---|
2124 | | - boolean random = CameraPane.RANDOM; |
---|
2125 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2183 | + boolean random = CameraPane.SWITCH; |
---|
| 2184 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2126 | 2185 | group.selection.get(i).linkVerticesThis(content); |
---|
2127 | 2186 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2128 | | - CameraPane.RANDOM = random; |
---|
| 2187 | + CameraPane.SWITCH = random; |
---|
2129 | 2188 | } |
---|
2130 | 2189 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2131 | 2190 | refreshContents(); |
---|
.. | .. |
---|
2135 | 2194 | { |
---|
2136 | 2195 | for (int i=0; i<group.selection.size(); i++) |
---|
2137 | 2196 | { |
---|
2138 | | - boolean random = CameraPane.RANDOM; |
---|
2139 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2197 | + boolean random = CameraPane.SWITCH; |
---|
| 2198 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2140 | 2199 | group.selection.get(i).linkVerticesThis(null); |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2200 | + CameraPane.SWITCH = random; |
---|
2142 | 2201 | } |
---|
2143 | 2202 | |
---|
2144 | 2203 | refreshContents(); |
---|
2145 | 2204 | } else |
---|
2146 | 2205 | if (source == relinkverticesItem) |
---|
2147 | 2206 | { |
---|
2148 | | - boolean random = CameraPane.RANDOM; |
---|
2149 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2207 | + boolean random = CameraPane.SWITCH; |
---|
| 2208 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2150 | 2209 | group.selection.RelinkToSupport(); |
---|
2151 | | - CameraPane.RANDOM = random; |
---|
| 2210 | + CameraPane.SWITCH = random; |
---|
2152 | 2211 | |
---|
2153 | 2212 | refreshContents(); |
---|
2154 | 2213 | } else |
---|
.. | .. |
---|
2246 | 2305 | RandomNode random = new RandomNode(); |
---|
2247 | 2306 | group(random); |
---|
2248 | 2307 | if (random.size() > 0) |
---|
2249 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2308 | + random.name = random.get(0).name + "Switch"; |
---|
2250 | 2309 | } else |
---|
2251 | 2310 | if (source == physicsItem) |
---|
2252 | 2311 | { |
---|
.. | .. |
---|
2903 | 2962 | |
---|
2904 | 2963 | child.editWindow = null; // ??????????? |
---|
2905 | 2964 | } |
---|
2906 | | - objEditor.ctrlPanel.validate(); |
---|
| 2965 | + objEditor.ctrlPanel.FlushUI(); |
---|
2907 | 2966 | //objEditor.jTree.clearSelection(); |
---|
2908 | 2967 | //objEditor.ResetSliders(); |
---|
2909 | 2968 | refreshContents(true); |
---|
.. | .. |
---|
3622 | 3681 | |
---|
3623 | 3682 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3624 | 3683 | |
---|
3625 | | - boolean random = CameraPane.RANDOM; |
---|
3626 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3684 | + boolean random = CameraPane.SWITCH; |
---|
| 3685 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3627 | 3686 | lowres.linkVerticesThis(null); |
---|
3628 | 3687 | lowres.linkVerticesThis(sn); |
---|
3629 | | - CameraPane.RANDOM = random; |
---|
| 3688 | + CameraPane.SWITCH = random; |
---|
3630 | 3689 | |
---|
3631 | 3690 | System.err.flush(); |
---|
3632 | 3691 | |
---|
.. | .. |
---|
4384 | 4443 | refreshContents(); |
---|
4385 | 4444 | } |
---|
4386 | 4445 | |
---|
4387 | | - void pasteInto(boolean copyit) |
---|
| 4446 | + void pasteInto(boolean copyit, boolean clone) |
---|
4388 | 4447 | { |
---|
4389 | 4448 | // if (GrafreeD.clipboard == null) |
---|
4390 | 4449 | // return; |
---|
.. | .. |
---|
4413 | 4472 | if (copyit) |
---|
4414 | 4473 | { |
---|
4415 | 4474 | // paste(false); |
---|
4416 | | - CloneClipboard(false); // sept 2014 |
---|
| 4475 | + if (clone) |
---|
| 4476 | + { |
---|
| 4477 | + CloneClipboard(false); // sept 2014 |
---|
| 4478 | + } |
---|
| 4479 | + else |
---|
| 4480 | + { |
---|
| 4481 | + paste(false); |
---|
| 4482 | + } |
---|
4417 | 4483 | } |
---|
4418 | 4484 | else |
---|
4419 | 4485 | { |
---|
.. | .. |
---|
4957 | 5023 | cButton flashSelectionButton; |
---|
4958 | 5024 | cButton editButton; |
---|
4959 | 5025 | cButton uneditButton; |
---|
| 5026 | + JCheckBox allParamsButton; |
---|
4960 | 5027 | cButton clearpanelButton; |
---|
4961 | | - cButton allParamsButton; |
---|
4962 | 5028 | cButton unselectButton; |
---|
4963 | 5029 | |
---|
| 5030 | + cButton oneStepButton; |
---|
| 5031 | + |
---|
4964 | 5032 | cButton screenfitButton; |
---|
4965 | 5033 | cButton screenfitpointButton; |
---|
4966 | 5034 | cButton snapobjectButton; |
---|
.. | .. |
---|
5015 | 5083 | private MenuItem mergeGeometriesItem; |
---|
5016 | 5084 | private MenuItem copyItem; |
---|
5017 | 5085 | private MenuItem pasteItem; |
---|
| 5086 | + private MenuItem pasteIntoItem; |
---|
5018 | 5087 | private MenuItem pasteLinkItem; |
---|
5019 | 5088 | private MenuItem pasteCloneItem; |
---|
5020 | 5089 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5112 | 5181 | private MenuItem blobItem; |
---|
5113 | 5182 | private MenuItem latheItem; |
---|
5114 | 5183 | private MenuItem bezierItem; |
---|
5115 | | - private MenuItem checkerItem; |
---|
| 5184 | + private MenuItem overlayItem; |
---|
5116 | 5185 | private MenuItem meshItem; |
---|
5117 | 5186 | // private MenuItem meshGroupItem; |
---|
5118 | 5187 | private MenuItem springItem; |
---|