.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
.. | .. |
---|
149 | 150 | |
---|
150 | 151 | void SetupMenu2(ObjEditor oe) |
---|
151 | 152 | { |
---|
| 153 | + if (Globals.ADVANCED) |
---|
| 154 | + { |
---|
152 | 155 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
153 | 156 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
154 | 157 | //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
.. | .. |
---|
160 | 163 | lookAtItem.addActionListener(this); |
---|
161 | 164 | //lookFromItem.addActinoListener(this); |
---|
162 | 165 | //switchItem.addActionListener(this); |
---|
| 166 | + } |
---|
| 167 | + |
---|
163 | 168 | Menu menu; |
---|
164 | 169 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
165 | 170 | //editItem = menu.add(new MenuItem("Edit")); |
---|
166 | 171 | //editItem.addActionListener(this); |
---|
167 | 172 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
168 | 173 | duplicateItem.addActionListener(this); |
---|
169 | | - menu.add("-"); |
---|
170 | 174 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | 175 | cloneItem.addActionListener(this); |
---|
| 176 | + if (Globals.ADVANCED) |
---|
| 177 | + { |
---|
172 | 178 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | 179 | cloneSupportItem.addActionListener(this); |
---|
| 180 | + } |
---|
174 | 181 | menu.add("-"); |
---|
175 | 182 | cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | 183 | cutItem.addActionListener(this); |
---|
.. | .. |
---|
178 | 185 | copyItem.addActionListener(this); |
---|
179 | 186 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | 187 | pasteItem.addActionListener(this); |
---|
| 188 | + menu.add("-"); |
---|
| 189 | + |
---|
| 190 | + menu.add("-"); |
---|
| 191 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 192 | + pasteIntoItem.addActionListener(this); |
---|
181 | 193 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | 194 | pasteLinkItem.addActionListener(this); |
---|
183 | 195 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | 196 | pasteCloneItem.addActionListener(this); |
---|
185 | 197 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | 198 | // pasteExpandItem.addActionListener(this); |
---|
| 199 | + menu.add("-"); |
---|
187 | 200 | clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | 201 | clearItem.addActionListener(this); |
---|
| 202 | + |
---|
| 203 | + if (Globals.ADVANCED) |
---|
| 204 | + { |
---|
| 205 | + // Deletes the cameras... |
---|
189 | 206 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 207 | clearAllItem.addActionListener(this); |
---|
| 208 | + } |
---|
191 | 209 | |
---|
192 | 210 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
| 211 | + if (Globals.ADVANCED) |
---|
| 212 | + { |
---|
193 | 213 | resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
194 | 214 | resetMeshItem.addActionListener(this); |
---|
195 | 215 | stepAllItem = menu.add(new MenuItem("Step All")); |
---|
.. | .. |
---|
199 | 219 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
200 | 220 | resetreferencesItem.addActionListener(this); |
---|
201 | 221 | menu.add("-"); |
---|
| 222 | + } |
---|
202 | 223 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
203 | 224 | overwriteGeoItem.addActionListener(this); |
---|
204 | 225 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
210 | 231 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
211 | 232 | overwriteUVItem.addActionListener(this); |
---|
212 | 233 | menu.add("-"); |
---|
| 234 | + if (Globals.ADVANCED) |
---|
| 235 | + { |
---|
213 | 236 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
214 | 237 | generateMeshItem.addActionListener(this); |
---|
215 | 238 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
216 | 239 | poseMeshItem.addActionListener(this); |
---|
217 | 240 | menu.add("-"); |
---|
| 241 | + } |
---|
218 | 242 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
219 | 243 | resetsupportItem.addActionListener(this); |
---|
220 | 244 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 245 | linkverticesItem.addActionListener(this); |
---|
222 | 246 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
223 | 247 | relinkverticesItem.addActionListener(this); |
---|
| 248 | + |
---|
| 249 | + if (Globals.ADVANCED) |
---|
| 250 | + { |
---|
224 | 251 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
225 | 252 | setMasterItem.addActionListener(this); |
---|
| 253 | + } |
---|
226 | 254 | |
---|
227 | 255 | oe.menuBar.add(menu = new Menu("Group")); |
---|
228 | 256 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
233 | 261 | frontItem.addActionListener(this); |
---|
234 | 262 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
235 | 263 | compositeItem.addActionListener(this); |
---|
236 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 264 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
237 | 265 | hideItem.addActionListener(this); |
---|
238 | 266 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
239 | 267 | ungroupItem.addActionListener(this); |
---|
240 | 268 | menu.add("-"); |
---|
241 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 269 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
242 | 270 | randomItem.addActionListener(this); |
---|
243 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
244 | | - physicsItem.addActionListener(this); |
---|
245 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
246 | | - frameselectorItem.addActionListener(this); |
---|
247 | 271 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
248 | 272 | switchGeoItem.addActionListener(this); |
---|
249 | 273 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
250 | 274 | switchTransfoItem.addActionListener(this); |
---|
251 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 275 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
252 | 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); |
---|
253 | 285 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
254 | 286 | scriptNodeItem.addActionListener(this); |
---|
255 | 287 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
256 | 288 | cameraItem.addActionListener(this); |
---|
| 289 | + } |
---|
257 | 290 | |
---|
258 | 291 | oe.menuBar.add(menu = new Menu("Object")); |
---|
259 | 292 | textureItem = menu.add(new MenuItem("Texture")); |
---|
.. | .. |
---|
268 | 301 | shadowYItem.addActionListener(this); |
---|
269 | 302 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
270 | 303 | shadowZItem.addActionListener(this); |
---|
| 304 | + if (Globals.ADVANCED) |
---|
| 305 | + { |
---|
| 306 | + menu.add("-"); |
---|
271 | 307 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
272 | 308 | linkerItem.addActionListener(this); |
---|
273 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
274 | | - templateItem.addActionListener(this); |
---|
275 | 309 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
276 | 310 | attributeItem.addActionListener(this); |
---|
| 311 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 312 | + templateItem.addActionListener(this); |
---|
277 | 313 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
278 | 314 | pointflowItem.addActionListener(this); |
---|
| 315 | + } |
---|
279 | 316 | menu.add("-"); |
---|
280 | 317 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
281 | 318 | resetTransformItem.addActionListener(this); |
---|
.. | .. |
---|
293 | 330 | genNormalsCADItem.addActionListener(this); |
---|
294 | 331 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
295 | 332 | genNormalsMESHItem.addActionListener(this); |
---|
| 333 | + if (Globals.ADVANCED) |
---|
| 334 | + { |
---|
296 | 335 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
297 | 336 | genNormalsMINEItem.addActionListener(this); |
---|
| 337 | + } |
---|
298 | 338 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
299 | 339 | stripifyItem.addActionListener(this); |
---|
300 | 340 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
316 | 356 | reduce34MeshItem.addActionListener(this); |
---|
317 | 357 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
318 | 358 | increaseMeshItem.addActionListener(this); |
---|
319 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
320 | | - smoothMeshItem.addActionListener(this); |
---|
321 | 359 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
322 | 360 | clipMeshItem.addActionListener(this); |
---|
| 361 | + |
---|
| 362 | + if (Globals.ADVANCED) |
---|
| 363 | + { |
---|
| 364 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 365 | + smoothMeshItem.addActionListener(this); |
---|
| 366 | + } |
---|
323 | 367 | |
---|
324 | 368 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
325 | 369 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
.. | .. |
---|
329 | 373 | liveleavesItem.addActionListener(this); |
---|
330 | 374 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
331 | 375 | unliveleavesItem.addActionListener(this); |
---|
| 376 | + if (Globals.ADVANCED) |
---|
| 377 | + { |
---|
332 | 378 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
333 | 379 | supportleavesItem.addActionListener(this); |
---|
334 | 380 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
335 | 381 | unsupportleavesItem.addActionListener(this); |
---|
| 382 | + } |
---|
336 | 383 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
337 | 384 | hideleavesItem.addActionListener(this); |
---|
338 | 385 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
375 | 422 | sortbysizeItem.addActionListener(this); |
---|
376 | 423 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
377 | 424 | sortbynameItem.addActionListener(this); |
---|
| 425 | + if (Globals.ADVANCED) |
---|
| 426 | + { |
---|
378 | 427 | menu.add("-"); |
---|
379 | 428 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
380 | 429 | extractGeometriesItem.addActionListener(this); |
---|
.. | .. |
---|
384 | 433 | shareGeometriesItem.addActionListener(this); |
---|
385 | 434 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
386 | 435 | mergeGeometriesItem.addActionListener(this); |
---|
| 436 | + } |
---|
387 | 437 | |
---|
388 | 438 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
389 | 439 | buildCreateMenu(menu); |
---|
390 | 440 | |
---|
391 | | - |
---|
392 | 441 | oe.menuBar.add(menu = new Menu("Include")); |
---|
393 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
394 | | - importGFDItem.addActionListener(this); |
---|
395 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
396 | | - importVRMLX3DItem.addActionListener(this); |
---|
397 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
| 442 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
398 | 443 | importOBJItem.addActionListener(this); |
---|
399 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
| 444 | + menu.add("-"); |
---|
| 445 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
400 | 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); |
---|
401 | 453 | |
---|
402 | 454 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
403 | 455 | buildToolsMenu(menu); |
---|
.. | .. |
---|
433 | 485 | oe.radioPanel.add(dummyButton); |
---|
434 | 486 | oe.buttonGroup.add(dummyButton); |
---|
435 | 487 | */ |
---|
436 | | - aConstraints.gridy += 1; |
---|
437 | | - |
---|
438 | 488 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
439 | 489 | |
---|
440 | | - oe.aConstraints.gridwidth = 1; |
---|
441 | | - oe.aConstraints.gridx = 0; |
---|
442 | | - |
---|
443 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
| 490 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
444 | 491 | liveCB.setToolTipText("Enabled animation"); |
---|
445 | 492 | liveCB.addItemListener(this); |
---|
446 | 493 | |
---|
447 | | - oe.aConstraints.gridx += 1; |
---|
448 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints); |
---|
| 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 | + |
---|
| 502 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
449 | 503 | trackCB.setToolTipText("Enable tracking"); |
---|
450 | 504 | trackCB.addItemListener(this); |
---|
451 | 505 | |
---|
452 | | - oe.aConstraints.gridx += 1; |
---|
453 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 506 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
454 | 507 | screenfitButton.setToolTipText("Screen fit"); |
---|
455 | 508 | screenfitButton.addActionListener(this); |
---|
456 | | - oe.aConstraints.gridx += 1; |
---|
| 509 | + |
---|
457 | 510 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
458 | 511 | // screenfitpointButton.addActionListener(this); |
---|
459 | | -// oe.aConstraints.gridx += 1; |
---|
460 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
461 | | - snapobjectButton.addActionListener(this); |
---|
462 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
463 | | - oe.aConstraints.gridx += 1; |
---|
464 | 512 | |
---|
465 | | - //aConstraints.gridx = 0; |
---|
466 | | - //aConstraints.gridy += 1; |
---|
467 | | - oe.aConstraints.weighty = 0; |
---|
468 | | - oe.aConstraints.gridwidth = 1; |
---|
469 | | - |
---|
470 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 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 | + |
---|
| 520 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
471 | 521 | flashSelectionButton.setToolTipText("Show selection"); |
---|
472 | 522 | flashSelectionButton.addActionListener(this); |
---|
473 | 523 | |
---|
474 | | - oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 524 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
475 | 525 | |
---|
476 | | - oe.aConstraints.gridx += 1; |
---|
477 | | - oe.aConstraints.weighty = 0; |
---|
478 | | - oe.aConstraints.gridwidth = 1; |
---|
479 | | - |
---|
480 | | - // |
---|
481 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 526 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
482 | 527 | twoButton.setToolTipText("Show center view only"); |
---|
483 | 528 | twoButton.addActionListener(this); |
---|
484 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 529 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
485 | 530 | fourButton.addActionListener(this); |
---|
486 | 531 | fourButton.setToolTipText("Show left panel only"); |
---|
487 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 532 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
488 | 533 | sixButton.setToolTipText("2-column layout left"); |
---|
489 | 534 | sixButton.addActionListener(this); |
---|
490 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 535 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
491 | 536 | threeButton.setToolTipText("2-column layout right"); |
---|
492 | 537 | threeButton.addActionListener(this); |
---|
493 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 538 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
494 | 539 | sevenButton.setToolTipText("3-column layout"); |
---|
495 | 540 | sevenButton.addActionListener(this); |
---|
496 | 541 | // |
---|
497 | 542 | |
---|
498 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints); |
---|
499 | | - rootButton.setToolTipText("Edit object in new tab"); |
---|
| 543 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 544 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
500 | 545 | rootButton.addActionListener(this); |
---|
501 | | - oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 546 | + |
---|
| 547 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
503 | 548 | closeButton.setToolTipText("Close tab"); |
---|
504 | 549 | closeButton.addActionListener(this); |
---|
505 | 550 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
506 | 551 | //clearButton.addActionListener(this); |
---|
507 | | - oe.aConstraints.gridx += 1; |
---|
508 | 552 | |
---|
509 | | - oe.aConstraints.gridx = 1; // |
---|
510 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 553 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 554 | + |
---|
| 555 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 556 | + editButton.setToolTipText("Edit selection"); |
---|
511 | 557 | editButton.addActionListener(this); |
---|
512 | | - oe.aConstraints.gridx += 1; |
---|
513 | | - oe.aConstraints.weighty = 0; |
---|
514 | | - oe.aConstraints.gridwidth = 1; |
---|
515 | 558 | |
---|
516 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 559 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 560 | + uneditButton.setToolTipText("Unedit selection"); |
---|
517 | 561 | uneditButton.addActionListener(this); |
---|
518 | 562 | |
---|
519 | | - oe.aConstraints.gridx += 1; |
---|
520 | | - oe.aConstraints.weighty = 0; |
---|
521 | | - oe.aConstraints.gridwidth = 1; |
---|
522 | | - |
---|
523 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
524 | | - clearPanelButton.addActionListener(this); |
---|
525 | | - |
---|
526 | | - oe.aConstraints.gridx += 1; |
---|
527 | | - oe.aConstraints.weighty = 0; |
---|
528 | | - oe.aConstraints.gridwidth = 1; |
---|
529 | | - |
---|
530 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 563 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 564 | + allParamsButton.setToolTipText("Edit all params"); |
---|
531 | 565 | allParamsButton.addActionListener(this); |
---|
532 | 566 | |
---|
533 | | - oe.aConstraints.gridx += 1; |
---|
534 | | - oe.aConstraints.weighty = 0; |
---|
535 | | - oe.aConstraints.gridwidth = 1; |
---|
536 | | - |
---|
537 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 567 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 568 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 569 | + clearPanelButton.addActionListener(this); |
---|
| 570 | + |
---|
| 571 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 572 | + unselectButton.setToolTipText("Unselect"); |
---|
538 | 573 | unselectButton.addActionListener(this); |
---|
539 | 574 | |
---|
| 575 | + commandsPanel.preferredHeight = 1; |
---|
| 576 | + |
---|
| 577 | + oe.treePanel.add(commandsPanel); |
---|
| 578 | + oe.treePanel.Return(); |
---|
| 579 | + |
---|
540 | 580 | // oe.aConstraints.gridx += 1; |
---|
541 | 581 | // oe.aConstraints.weighty = 0; |
---|
542 | 582 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
548 | 588 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
549 | 589 | // gcButton.addActionListener(this); |
---|
550 | 590 | |
---|
551 | | - oe.aConstraints.gridx = 0; |
---|
552 | | - oe.aConstraints.gridy += 1; |
---|
553 | | - |
---|
554 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
555 | | - oe.aConstraints.gridwidth = 100; |
---|
556 | | - // oe.aConstraints.gridheight = 100; |
---|
557 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
558 | | - oe.aConstraints.gridheight = 1; |
---|
559 | | - oe.aConstraints.weighty = 0.5; |
---|
560 | | - oe.aConstraints.gridx = 0; |
---|
561 | | - JScrollPane jSP; |
---|
| 591 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 592 | + |
---|
| 593 | + JScrollPane jSP; |
---|
562 | 594 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
563 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 595 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
564 | 596 | ResetModel(); |
---|
565 | | - oe.aConstraints.weighty = 0.5; |
---|
566 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
567 | | - oe.aConstraints.gridy += 1; |
---|
568 | | - oe.aConstraints.gridwidth = 1; |
---|
| 597 | + |
---|
| 598 | + oe.treePanel.add(jSPPanel); |
---|
| 599 | + oe.treePanel.Return(); |
---|
569 | 600 | |
---|
570 | | - oe.aConstraints.weighty = 0; |
---|
571 | | - oe.aConstraints.gridwidth = 2; |
---|
572 | | - |
---|
573 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
| 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"); |
---|
574 | 605 | colorCB.addItemListener(this); |
---|
575 | | - oe.aConstraints.gridx += 2; |
---|
576 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 606 | + |
---|
| 607 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 608 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
577 | 609 | materialCB.addItemListener(this); |
---|
578 | | - oe.aConstraints.gridx += 2; |
---|
579 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 610 | + |
---|
| 611 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 612 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
580 | 613 | textureCB.addItemListener(this); |
---|
581 | 614 | |
---|
582 | | - oe.aConstraints.gridx = 0; |
---|
583 | | - oe.aConstraints.gridy += 1; |
---|
| 615 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 616 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 617 | + oe.treePanel.Return(); |
---|
584 | 618 | |
---|
| 619 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 620 | +// mainPanel.setResizeWeight(0.5); |
---|
| 621 | + |
---|
585 | 622 | //jList.addListSelectionListener(this); |
---|
586 | 623 | oe.jTree.addTreeSelectionListener(this); |
---|
587 | 624 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
604 | 641 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
605 | 642 | } |
---|
606 | 643 | |
---|
607 | | - void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 644 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
608 | 645 | { |
---|
609 | | - constraints.gridx = 0; |
---|
610 | | - constraints.gridy = 0; |
---|
611 | | - panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints); |
---|
612 | | - fastCB.setToolTipText("Fast mode"); |
---|
613 | | - fastCB.addItemListener(this); |
---|
614 | | - constraints.gridy += 1; |
---|
615 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints); |
---|
616 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
617 | | - supportCB.addItemListener(this); |
---|
618 | | - |
---|
619 | | - // constraints.gridy += 1; |
---|
620 | | - // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
621 | | - // localCB.addItemListener(this); |
---|
622 | | - |
---|
623 | | - constraints.gridy += 1; |
---|
624 | | - panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints); |
---|
625 | | - crowdCB.setToolTipText("Used for crowds"); |
---|
626 | | - crowdCB.addItemListener(this); |
---|
627 | | - |
---|
628 | | - constraints.gridy += 1; |
---|
629 | | - panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints); |
---|
630 | | - smoothCB.setToolTipText("Snapping delay"); |
---|
631 | | - smoothCB.addItemListener(this); |
---|
632 | | - |
---|
633 | | - constraints.gridy += 1; |
---|
634 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints); |
---|
635 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
636 | | - slowCB.addItemListener(this); |
---|
637 | | - constraints.gridy += 1; |
---|
638 | | - panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints); |
---|
| 646 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
639 | 647 | boxCB.setToolTipText("Display bounding boxes"); |
---|
640 | 648 | boxCB.addItemListener(this); |
---|
641 | | - constraints.gridy += 1; |
---|
642 | | - panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints); |
---|
| 649 | + |
---|
| 650 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
643 | 651 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
644 | 652 | zoomBoxCB.addItemListener(this); |
---|
645 | 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 | + |
---|
646 | 675 | // constraints.gridy += 1; |
---|
647 | 676 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
648 | 677 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
650 | 679 | if (false) |
---|
651 | 680 | { |
---|
652 | 681 | // handled in scripts |
---|
653 | | - constraints.gridy += 1; |
---|
654 | | - panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints); |
---|
| 682 | + //constraints.gridy += 1; |
---|
| 683 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
655 | 684 | speakerCameraCB.addItemListener(this); |
---|
656 | 685 | |
---|
657 | | - constraints.gridy += 1; |
---|
658 | | - panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints); |
---|
| 686 | + //constraints.gridy += 1; |
---|
| 687 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
659 | 688 | speakerFocusCB.addItemListener(this); |
---|
660 | 689 | |
---|
661 | | - constraints.gridy += 1; |
---|
662 | | - panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints); |
---|
| 690 | + //constraints.gridy += 1; |
---|
| 691 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
663 | 692 | smoothfocusCB.addItemListener(this); |
---|
664 | 693 | } |
---|
665 | 694 | |
---|
.. | .. |
---|
667 | 696 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
668 | 697 | // debugCB.addItemListener(this); |
---|
669 | 698 | |
---|
670 | | - constraints.gridy += 1; |
---|
671 | | - panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints); |
---|
| 699 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
672 | 700 | oeilCB.addItemListener(this); |
---|
673 | 701 | |
---|
674 | | - constraints.gridy += 1; |
---|
675 | | - panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints); |
---|
| 702 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
676 | 703 | lookAtCB.setToolTipText("Look-at target"); |
---|
677 | 704 | lookAtCB.addItemListener(this); |
---|
| 705 | + |
---|
| 706 | + } |
---|
| 707 | + |
---|
| 708 | + cGridBag fill = new cGridBag(); |
---|
| 709 | + |
---|
| 710 | + fill.preferredHeight = 200; |
---|
| 711 | + |
---|
| 712 | + panel.add(fill); |
---|
678 | 713 | |
---|
679 | 714 | } |
---|
680 | 715 | |
---|
.. | .. |
---|
905 | 940 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
906 | 941 | // return; |
---|
907 | 942 | // } |
---|
908 | | - if (string.charAt(0) == '/') |
---|
| 943 | + |
---|
| 944 | + // File path for Mac and Windows |
---|
| 945 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
909 | 946 | { |
---|
910 | 947 | // file(s) |
---|
911 | 948 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
932 | 969 | |
---|
933 | 970 | flashIt = false; |
---|
934 | 971 | CameraPane pane = (CameraPane) target; |
---|
935 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 972 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
936 | 973 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
937 | 974 | |
---|
938 | 975 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
959 | 996 | { |
---|
960 | 997 | loadClipboard(true); |
---|
961 | 998 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
962 | | - pasteInto(false); |
---|
| 999 | + pasteInto(false, false); |
---|
963 | 1000 | } else { |
---|
964 | 1001 | loadClipboard(false); |
---|
965 | 1002 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
966 | | - pasteInto(false); // true); // ??? |
---|
| 1003 | + pasteInto(false, false); // true); // ??? |
---|
967 | 1004 | } |
---|
968 | 1005 | } |
---|
969 | 1006 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1085 | 1122 | kleinItem.addActionListener(this); |
---|
1086 | 1123 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1087 | 1124 | particleItem.addActionListener(this); |
---|
| 1125 | + if (Globals.ADVANCED) |
---|
| 1126 | + { |
---|
1088 | 1127 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1089 | 1128 | ragdollItem.addActionListener(this); |
---|
1090 | 1129 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1091 | 1130 | ragdoll2Item.addActionListener(this); |
---|
| 1131 | + } |
---|
1092 | 1132 | menu.add("-"); |
---|
1093 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1133 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1094 | 1134 | meshItem.addActionListener(this); |
---|
1095 | 1135 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1096 | 1136 | // meshGroupItem.addActionListener(this); |
---|
| 1137 | + if (Globals.ADVANCED) |
---|
| 1138 | + { |
---|
1097 | 1139 | springItem = menu.add(new MenuItem("Spring")); |
---|
1098 | 1140 | springItem.addActionListener(this); |
---|
1099 | 1141 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1100 | 1142 | flagItem.addActionListener(this); |
---|
1101 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1102 | | - bezierItem.addActionListener(this); |
---|
1103 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1104 | | - checkerItem.addActionListener(this); |
---|
1105 | 1143 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1106 | 1144 | blobItem.addActionListener(this); |
---|
1107 | 1145 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1108 | 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); |
---|
1109 | 1152 | lightItem = menu.add(new MenuItem("Light")); |
---|
1110 | 1153 | lightItem.addActionListener(this); |
---|
1111 | 1154 | menu.add("-"); |
---|
.. | .. |
---|
1115 | 1158 | loopItem.addActionListener(this); |
---|
1116 | 1159 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1117 | 1160 | doubleItem.addActionListener(this); |
---|
| 1161 | + if (Globals.ADVANCED) |
---|
| 1162 | + { |
---|
1118 | 1163 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1119 | 1164 | tripleItem.addActionListener(this); |
---|
| 1165 | + } |
---|
1120 | 1166 | } |
---|
1121 | 1167 | |
---|
1122 | 1168 | void buildToolsMenu(Menu menu) |
---|
1123 | 1169 | { |
---|
1124 | 1170 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1125 | 1171 | animationItem.addItemListener(this); |
---|
1126 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1172 | + animationItem.setState(Globals.ANIMATION); |
---|
1127 | 1173 | |
---|
1128 | 1174 | menu.add("-"); |
---|
1129 | 1175 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1130 | 1176 | parseverticesItem.addActionListener(this); |
---|
1131 | 1177 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1132 | 1178 | textureFieldItem.addActionListener(this); |
---|
1133 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1179 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1134 | 1180 | alignItem.addActionListener(this); |
---|
1135 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1136 | | - mirrorItem.addActionListener(this); |
---|
1137 | 1181 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1138 | 1182 | reduceMorphItem.addActionListener(this); |
---|
1139 | 1183 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1140 | 1184 | reduce34MorphItem.addActionListener(this); |
---|
1141 | | - |
---|
| 1185 | + menu.add("-"); |
---|
1142 | 1186 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1143 | 1187 | computeAOItem.addActionListener(this); |
---|
1144 | | - menu.add("-"); |
---|
1145 | 1188 | |
---|
| 1189 | + if (Globals.ADVANCED) |
---|
| 1190 | + { |
---|
| 1191 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1192 | + mirrorItem.addActionListener(this); |
---|
| 1193 | + menu.add("-"); |
---|
1146 | 1194 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1147 | 1195 | memoryItem.addActionListener(this); |
---|
1148 | 1196 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1165 | 1213 | menu.add("-"); |
---|
1166 | 1214 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1167 | 1215 | editScriptItem.addActionListener(this); |
---|
| 1216 | + } |
---|
1168 | 1217 | } |
---|
1169 | 1218 | |
---|
1170 | 1219 | void ScreenFit() |
---|
.. | .. |
---|
1666 | 1715 | { |
---|
1667 | 1716 | makeSomething(new BezierSurface()); |
---|
1668 | 1717 | } else |
---|
1669 | | - if (source == checkerItem) |
---|
| 1718 | + if (source == overlayItem) |
---|
1670 | 1719 | { |
---|
1671 | 1720 | /* |
---|
1672 | 1721 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1815 | 1864 | } else |
---|
1816 | 1865 | if (source == importOBJItem) |
---|
1817 | 1866 | { |
---|
1818 | | - 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 | + } |
---|
1819 | 1876 | } else |
---|
1820 | 1877 | if (source == computeAOItem) |
---|
1821 | 1878 | { |
---|
.. | .. |
---|
1853 | 1910 | if (source == dumpItem) |
---|
1854 | 1911 | { |
---|
1855 | 1912 | DumpObject(); |
---|
| 1913 | + } else |
---|
| 1914 | + if (source == oneStepButton) |
---|
| 1915 | + { |
---|
| 1916 | + Globals.ONESTEP = true; |
---|
| 1917 | + cameraView.repaint(); |
---|
1856 | 1918 | } else |
---|
1857 | 1919 | if (source == screenfitButton) |
---|
1858 | 1920 | { |
---|
.. | .. |
---|
1926 | 1988 | { |
---|
1927 | 1989 | paste(false); |
---|
1928 | 1990 | } else |
---|
| 1991 | + if (source == pasteIntoItem) |
---|
| 1992 | + { |
---|
| 1993 | + pasteInto(true, false); |
---|
| 1994 | + } else |
---|
1929 | 1995 | if (source == pasteLinkItem) |
---|
1930 | 1996 | { |
---|
1931 | | - pasteInto(false); |
---|
| 1997 | + pasteInto(false, false); |
---|
1932 | 1998 | } else |
---|
1933 | 1999 | if (source == pasteCloneItem) |
---|
1934 | 2000 | { |
---|
1935 | | - pasteInto(true); |
---|
| 2001 | + pasteInto(true, true); |
---|
1936 | 2002 | } else |
---|
1937 | 2003 | if (source == pasteExpandItem) |
---|
1938 | 2004 | { |
---|
.. | .. |
---|
2134 | 2200 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2135 | 2201 | for (int i=0; i<group.selection.size(); i++) |
---|
2136 | 2202 | { |
---|
2137 | | - boolean random = CameraPane.RANDOM; |
---|
2138 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2203 | + boolean random = CameraPane.SWITCH; |
---|
| 2204 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2139 | 2205 | group.selection.get(i).linkVerticesThis(content); |
---|
2140 | 2206 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2207 | + CameraPane.SWITCH = random; |
---|
2142 | 2208 | } |
---|
2143 | 2209 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2144 | 2210 | refreshContents(); |
---|
.. | .. |
---|
2148 | 2214 | { |
---|
2149 | 2215 | for (int i=0; i<group.selection.size(); i++) |
---|
2150 | 2216 | { |
---|
2151 | | - boolean random = CameraPane.RANDOM; |
---|
2152 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2217 | + boolean random = CameraPane.SWITCH; |
---|
| 2218 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2153 | 2219 | group.selection.get(i).linkVerticesThis(null); |
---|
2154 | | - CameraPane.RANDOM = random; |
---|
| 2220 | + CameraPane.SWITCH = random; |
---|
2155 | 2221 | } |
---|
2156 | 2222 | |
---|
2157 | 2223 | refreshContents(); |
---|
2158 | 2224 | } else |
---|
2159 | 2225 | if (source == relinkverticesItem) |
---|
2160 | 2226 | { |
---|
2161 | | - boolean random = CameraPane.RANDOM; |
---|
2162 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2227 | + boolean random = CameraPane.SWITCH; |
---|
| 2228 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2163 | 2229 | group.selection.RelinkToSupport(); |
---|
2164 | | - CameraPane.RANDOM = random; |
---|
| 2230 | + CameraPane.SWITCH = random; |
---|
2165 | 2231 | |
---|
2166 | 2232 | refreshContents(); |
---|
2167 | 2233 | } else |
---|
.. | .. |
---|
2259 | 2325 | RandomNode random = new RandomNode(); |
---|
2260 | 2326 | group(random); |
---|
2261 | 2327 | if (random.size() > 0) |
---|
2262 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2328 | + random.name = random.get(0).name + "Switch"; |
---|
2263 | 2329 | } else |
---|
2264 | 2330 | if (source == physicsItem) |
---|
2265 | 2331 | { |
---|
.. | .. |
---|
2720 | 2786 | // centralPanel.setVisible(true); |
---|
2721 | 2787 | // XYZPanel.setVisible(false); |
---|
2722 | 2788 | bigThree.ClearUI(); |
---|
2723 | | - bigThree.addComponent(centralPanel); |
---|
| 2789 | + bigThree.add(centralPanel); |
---|
2724 | 2790 | bigThree.FlushUI(); |
---|
2725 | 2791 | } else |
---|
2726 | 2792 | if (source == threeButton) |
---|
.. | .. |
---|
2755 | 2821 | // centralPanel.setVisible(true); |
---|
2756 | 2822 | // XYZPanel.setVisible(true); |
---|
2757 | 2823 | bigThree.ClearUI(); |
---|
2758 | | - bigThree.addComponent(centralPanel); |
---|
2759 | | - bigThree.addComponent(XYZPanel); |
---|
| 2824 | + bigThree.add(centralPanel); |
---|
| 2825 | + bigThree.add(XYZPanel); |
---|
2760 | 2826 | bigThree.FlushUI(); |
---|
2761 | 2827 | } else |
---|
2762 | 2828 | if (source == fourButton) |
---|
.. | .. |
---|
2791 | 2857 | // centralPanel.setVisible(false); |
---|
2792 | 2858 | // XYZPanel.setVisible(false); |
---|
2793 | 2859 | bigThree.ClearUI(); |
---|
2794 | | - bigThree.addComponent(scenePanel); |
---|
| 2860 | + bigThree.add(scenePanel); |
---|
2795 | 2861 | bigThree.FlushUI(); |
---|
2796 | 2862 | } else |
---|
2797 | 2863 | if (source == sixButton) |
---|
.. | .. |
---|
2826 | 2892 | // centralPanel.setVisible(true); |
---|
2827 | 2893 | // XYZPanel.setVisible(false); |
---|
2828 | 2894 | bigThree.ClearUI(); |
---|
2829 | | - bigThree.addComponent(scenePanel); |
---|
2830 | | - bigThree.addComponent(centralPanel); |
---|
| 2895 | + bigThree.add(scenePanel); |
---|
| 2896 | + bigThree.add(centralPanel); |
---|
2831 | 2897 | bigThree.FlushUI(); |
---|
2832 | 2898 | } else |
---|
2833 | 2899 | if (source == sevenButton) |
---|
.. | .. |
---|
2862 | 2928 | // centralPanel.setVisible(true); |
---|
2863 | 2929 | // XYZPanel.setVisible(true); |
---|
2864 | 2930 | bigThree.ClearUI(); |
---|
2865 | | - bigThree.addComponent(scenePanel); |
---|
2866 | | - bigThree.addComponent(centralPanel); |
---|
2867 | | - bigThree.addComponent(XYZPanel); |
---|
| 2931 | + bigThree.add(scenePanel); |
---|
| 2932 | + bigThree.add(centralPanel); |
---|
| 2933 | + bigThree.add(XYZPanel); |
---|
2868 | 2934 | bigThree.FlushUI(); |
---|
2869 | 2935 | } else |
---|
2870 | 2936 | if (source == rootButton) |
---|
.. | .. |
---|
2916 | 2982 | |
---|
2917 | 2983 | child.editWindow = null; // ??????????? |
---|
2918 | 2984 | } |
---|
2919 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2985 | + objEditor.ctrlPanel.FlushUI(); |
---|
2920 | 2986 | //objEditor.jTree.clearSelection(); |
---|
2921 | 2987 | //objEditor.ResetSliders(); |
---|
2922 | 2988 | refreshContents(true); |
---|
.. | .. |
---|
3635 | 3701 | |
---|
3636 | 3702 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3637 | 3703 | |
---|
3638 | | - boolean random = CameraPane.RANDOM; |
---|
3639 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3704 | + boolean random = CameraPane.SWITCH; |
---|
| 3705 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3640 | 3706 | lowres.linkVerticesThis(null); |
---|
3641 | 3707 | lowres.linkVerticesThis(sn); |
---|
3642 | | - CameraPane.RANDOM = random; |
---|
| 3708 | + CameraPane.SWITCH = random; |
---|
3643 | 3709 | |
---|
3644 | 3710 | System.err.flush(); |
---|
3645 | 3711 | |
---|
.. | .. |
---|
4124 | 4190 | System.err.println("info : " + child.GetPath()); |
---|
4125 | 4191 | } |
---|
4126 | 4192 | } |
---|
4127 | | - else |
---|
4128 | | - { |
---|
4129 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
4130 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
4131 | | - System.err.println("info : " + group.GetPath()); |
---|
4132 | | - } |
---|
| 4193 | +// else |
---|
| 4194 | +// { |
---|
| 4195 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4196 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4197 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4198 | +// } |
---|
4133 | 4199 | |
---|
4134 | 4200 | objEditor.SetText(); // jan 2014 |
---|
4135 | 4201 | |
---|
.. | .. |
---|
4397 | 4463 | refreshContents(); |
---|
4398 | 4464 | } |
---|
4399 | 4465 | |
---|
4400 | | - void pasteInto(boolean copyit) |
---|
| 4466 | + void pasteInto(boolean copyit, boolean clone) |
---|
4401 | 4467 | { |
---|
4402 | 4468 | // if (GrafreeD.clipboard == null) |
---|
4403 | 4469 | // return; |
---|
.. | .. |
---|
4426 | 4492 | if (copyit) |
---|
4427 | 4493 | { |
---|
4428 | 4494 | // paste(false); |
---|
4429 | | - CloneClipboard(false); // sept 2014 |
---|
| 4495 | + if (clone) |
---|
| 4496 | + { |
---|
| 4497 | + CloneClipboard(false); // sept 2014 |
---|
| 4498 | + } |
---|
| 4499 | + else |
---|
| 4500 | + { |
---|
| 4501 | + paste(false); |
---|
| 4502 | + } |
---|
4430 | 4503 | } |
---|
4431 | 4504 | else |
---|
4432 | 4505 | { |
---|
.. | .. |
---|
4970 | 5043 | cButton flashSelectionButton; |
---|
4971 | 5044 | cButton editButton; |
---|
4972 | 5045 | cButton uneditButton; |
---|
| 5046 | + JCheckBox allParamsButton; |
---|
4973 | 5047 | cButton clearpanelButton; |
---|
4974 | | - cButton allParamsButton; |
---|
4975 | 5048 | cButton unselectButton; |
---|
4976 | 5049 | |
---|
| 5050 | + cButton oneStepButton; |
---|
| 5051 | + |
---|
4977 | 5052 | cButton screenfitButton; |
---|
4978 | 5053 | cButton screenfitpointButton; |
---|
4979 | 5054 | cButton snapobjectButton; |
---|
.. | .. |
---|
5028 | 5103 | private MenuItem mergeGeometriesItem; |
---|
5029 | 5104 | private MenuItem copyItem; |
---|
5030 | 5105 | private MenuItem pasteItem; |
---|
| 5106 | + private MenuItem pasteIntoItem; |
---|
5031 | 5107 | private MenuItem pasteLinkItem; |
---|
5032 | 5108 | private MenuItem pasteCloneItem; |
---|
5033 | 5109 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5125 | 5201 | private MenuItem blobItem; |
---|
5126 | 5202 | private MenuItem latheItem; |
---|
5127 | 5203 | private MenuItem bezierItem; |
---|
5128 | | - private MenuItem checkerItem; |
---|
| 5204 | + private MenuItem overlayItem; |
---|
5129 | 5205 | private MenuItem meshItem; |
---|
5130 | 5206 | // private MenuItem meshGroupItem; |
---|
5131 | 5207 | private MenuItem springItem; |
---|