.. | .. |
---|
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 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | | - cloneItem.addActionListener(this); |
---|
172 | | - cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | | - cloneSupportItem.addActionListener(this); |
---|
174 | | - menu.add("-"); |
---|
175 | 174 | cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | 175 | cutItem.addActionListener(this); |
---|
177 | 176 | copyItem = menu.add(new MenuItem("Copy")); |
---|
178 | 177 | copyItem.addActionListener(this); |
---|
179 | 178 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | 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); |
---|
181 | 188 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | 189 | pasteLinkItem.addActionListener(this); |
---|
183 | 190 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | 191 | pasteCloneItem.addActionListener(this); |
---|
185 | 192 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | 193 | // pasteExpandItem.addActionListener(this); |
---|
| 194 | + menu.add("-"); |
---|
187 | 195 | clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | 196 | clearItem.addActionListener(this); |
---|
| 197 | + |
---|
| 198 | + if (Globals.ADVANCED) |
---|
| 199 | + { |
---|
| 200 | + // Deletes the cameras... |
---|
189 | 201 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 202 | clearAllItem.addActionListener(this); |
---|
| 203 | + } |
---|
191 | 204 | |
---|
192 | 205 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
| 206 | + if (Globals.ADVANCED) |
---|
| 207 | + { |
---|
193 | 208 | resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
194 | 209 | resetMeshItem.addActionListener(this); |
---|
195 | 210 | stepAllItem = menu.add(new MenuItem("Step All")); |
---|
.. | .. |
---|
199 | 214 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
200 | 215 | resetreferencesItem.addActionListener(this); |
---|
201 | 216 | menu.add("-"); |
---|
| 217 | + } |
---|
202 | 218 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
203 | 219 | overwriteGeoItem.addActionListener(this); |
---|
204 | 220 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
210 | 226 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
211 | 227 | overwriteUVItem.addActionListener(this); |
---|
212 | 228 | menu.add("-"); |
---|
| 229 | + if (Globals.ADVANCED) |
---|
| 230 | + { |
---|
213 | 231 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
214 | 232 | generateMeshItem.addActionListener(this); |
---|
215 | 233 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
216 | 234 | poseMeshItem.addActionListener(this); |
---|
217 | 235 | menu.add("-"); |
---|
| 236 | + } |
---|
218 | 237 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
219 | 238 | resetsupportItem.addActionListener(this); |
---|
220 | 239 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 240 | linkverticesItem.addActionListener(this); |
---|
222 | 241 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
223 | 242 | relinkverticesItem.addActionListener(this); |
---|
| 243 | + |
---|
| 244 | + if (Globals.ADVANCED) |
---|
| 245 | + { |
---|
224 | 246 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
225 | 247 | setMasterItem.addActionListener(this); |
---|
| 248 | + } |
---|
226 | 249 | |
---|
227 | 250 | oe.menuBar.add(menu = new Menu("Group")); |
---|
228 | 251 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
233 | 256 | frontItem.addActionListener(this); |
---|
234 | 257 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
235 | 258 | compositeItem.addActionListener(this); |
---|
236 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 259 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
237 | 260 | hideItem.addActionListener(this); |
---|
238 | 261 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
239 | 262 | ungroupItem.addActionListener(this); |
---|
240 | 263 | menu.add("-"); |
---|
241 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 264 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
242 | 265 | 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 | 266 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
248 | 267 | switchGeoItem.addActionListener(this); |
---|
249 | 268 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
250 | 269 | switchTransfoItem.addActionListener(this); |
---|
251 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 270 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
252 | 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); |
---|
253 | 279 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
254 | 280 | scriptNodeItem.addActionListener(this); |
---|
255 | 281 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
256 | 282 | cameraItem.addActionListener(this); |
---|
| 283 | + } |
---|
257 | 284 | |
---|
258 | 285 | oe.menuBar.add(menu = new Menu("Object")); |
---|
259 | 286 | textureItem = menu.add(new MenuItem("Texture")); |
---|
.. | .. |
---|
268 | 295 | shadowYItem.addActionListener(this); |
---|
269 | 296 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
270 | 297 | shadowZItem.addActionListener(this); |
---|
| 298 | + if (Globals.ADVANCED) |
---|
| 299 | + { |
---|
271 | 300 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
272 | 301 | linkerItem.addActionListener(this); |
---|
273 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
274 | | - templateItem.addActionListener(this); |
---|
275 | 302 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
276 | 303 | attributeItem.addActionListener(this); |
---|
| 304 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 305 | + templateItem.addActionListener(this); |
---|
277 | 306 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
278 | 307 | pointflowItem.addActionListener(this); |
---|
279 | 308 | menu.add("-"); |
---|
| 309 | + } |
---|
280 | 310 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
281 | 311 | resetTransformItem.addActionListener(this); |
---|
282 | 312 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
.. | .. |
---|
293 | 323 | genNormalsCADItem.addActionListener(this); |
---|
294 | 324 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
295 | 325 | genNormalsMESHItem.addActionListener(this); |
---|
| 326 | + if (Globals.ADVANCED) |
---|
| 327 | + { |
---|
296 | 328 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
297 | 329 | genNormalsMINEItem.addActionListener(this); |
---|
| 330 | + } |
---|
298 | 331 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
299 | 332 | stripifyItem.addActionListener(this); |
---|
300 | 333 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
316 | 349 | reduce34MeshItem.addActionListener(this); |
---|
317 | 350 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
318 | 351 | increaseMeshItem.addActionListener(this); |
---|
319 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
320 | | - smoothMeshItem.addActionListener(this); |
---|
321 | 352 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
322 | 353 | clipMeshItem.addActionListener(this); |
---|
| 354 | + |
---|
| 355 | + if (Globals.ADVANCED) |
---|
| 356 | + { |
---|
| 357 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 358 | + smoothMeshItem.addActionListener(this); |
---|
| 359 | + } |
---|
323 | 360 | |
---|
324 | 361 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
325 | 362 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
.. | .. |
---|
329 | 366 | liveleavesItem.addActionListener(this); |
---|
330 | 367 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
331 | 368 | unliveleavesItem.addActionListener(this); |
---|
| 369 | + if (Globals.ADVANCED) |
---|
| 370 | + { |
---|
332 | 371 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
333 | 372 | supportleavesItem.addActionListener(this); |
---|
334 | 373 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
335 | 374 | unsupportleavesItem.addActionListener(this); |
---|
| 375 | + } |
---|
336 | 376 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
337 | 377 | hideleavesItem.addActionListener(this); |
---|
338 | 378 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
375 | 415 | sortbysizeItem.addActionListener(this); |
---|
376 | 416 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
377 | 417 | sortbynameItem.addActionListener(this); |
---|
| 418 | + if (Globals.ADVANCED) |
---|
| 419 | + { |
---|
378 | 420 | menu.add("-"); |
---|
379 | 421 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
380 | 422 | extractGeometriesItem.addActionListener(this); |
---|
.. | .. |
---|
384 | 426 | shareGeometriesItem.addActionListener(this); |
---|
385 | 427 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
386 | 428 | mergeGeometriesItem.addActionListener(this); |
---|
| 429 | + } |
---|
387 | 430 | |
---|
388 | 431 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
389 | 432 | buildCreateMenu(menu); |
---|
390 | 433 | |
---|
391 | | - |
---|
392 | 434 | oe.menuBar.add(menu = new Menu("Include")); |
---|
393 | 435 | importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
394 | 436 | importGFDItem.addActionListener(this); |
---|
.. | .. |
---|
433 | 475 | oe.radioPanel.add(dummyButton); |
---|
434 | 476 | oe.buttonGroup.add(dummyButton); |
---|
435 | 477 | */ |
---|
436 | | - aConstraints.gridy += 1; |
---|
437 | | - |
---|
438 | 478 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
439 | 479 | |
---|
440 | | - oe.aConstraints.gridwidth = 1; |
---|
441 | | - oe.aConstraints.gridx = 0; |
---|
442 | | - |
---|
443 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
| 480 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
444 | 481 | liveCB.setToolTipText("Enabled animation"); |
---|
445 | 482 | liveCB.addItemListener(this); |
---|
446 | 483 | |
---|
447 | | - oe.aConstraints.gridx += 1; |
---|
448 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints); |
---|
| 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 | + |
---|
| 492 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
449 | 493 | trackCB.setToolTipText("Enable tracking"); |
---|
450 | 494 | trackCB.addItemListener(this); |
---|
451 | 495 | |
---|
452 | | - oe.aConstraints.gridx += 1; |
---|
453 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 496 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
454 | 497 | screenfitButton.setToolTipText("Screen fit"); |
---|
455 | 498 | screenfitButton.addActionListener(this); |
---|
456 | | - oe.aConstraints.gridx += 1; |
---|
| 499 | + |
---|
457 | 500 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
458 | 501 | // 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 | 502 | |
---|
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); |
---|
| 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 | + |
---|
| 510 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
471 | 511 | flashSelectionButton.setToolTipText("Show selection"); |
---|
472 | 512 | flashSelectionButton.addActionListener(this); |
---|
473 | 513 | |
---|
474 | | - oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 514 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
475 | 515 | |
---|
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); |
---|
| 516 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
482 | 517 | twoButton.setToolTipText("Show center view only"); |
---|
483 | 518 | twoButton.addActionListener(this); |
---|
484 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 519 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
485 | 520 | fourButton.addActionListener(this); |
---|
486 | 521 | fourButton.setToolTipText("Show left panel only"); |
---|
487 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 522 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
488 | 523 | sixButton.setToolTipText("2-column layout left"); |
---|
489 | 524 | sixButton.addActionListener(this); |
---|
490 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 525 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
491 | 526 | threeButton.setToolTipText("2-column layout right"); |
---|
492 | 527 | threeButton.addActionListener(this); |
---|
493 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 528 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
494 | 529 | sevenButton.setToolTipText("3-column layout"); |
---|
495 | 530 | sevenButton.addActionListener(this); |
---|
496 | 531 | // |
---|
497 | 532 | |
---|
498 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints); |
---|
499 | | - rootButton.setToolTipText("Edit object in new tab"); |
---|
| 533 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 534 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
500 | 535 | rootButton.addActionListener(this); |
---|
501 | | - oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 536 | + |
---|
| 537 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
503 | 538 | closeButton.setToolTipText("Close tab"); |
---|
504 | 539 | closeButton.addActionListener(this); |
---|
505 | 540 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
506 | 541 | //clearButton.addActionListener(this); |
---|
507 | | - oe.aConstraints.gridx += 1; |
---|
508 | 542 | |
---|
509 | | - oe.aConstraints.gridx = 1; // |
---|
510 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 543 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 544 | + |
---|
| 545 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 546 | + editButton.setToolTipText("Edit selection"); |
---|
511 | 547 | editButton.addActionListener(this); |
---|
512 | | - oe.aConstraints.gridx += 1; |
---|
513 | | - oe.aConstraints.weighty = 0; |
---|
514 | | - oe.aConstraints.gridwidth = 1; |
---|
515 | 548 | |
---|
516 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 549 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 550 | + uneditButton.setToolTipText("Unedit selection"); |
---|
517 | 551 | uneditButton.addActionListener(this); |
---|
518 | 552 | |
---|
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); |
---|
| 553 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 554 | + allParamsButton.setToolTipText("Edit all params"); |
---|
531 | 555 | allParamsButton.addActionListener(this); |
---|
532 | 556 | |
---|
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); |
---|
| 557 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 558 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 559 | + clearPanelButton.addActionListener(this); |
---|
| 560 | + |
---|
| 561 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 562 | + unselectButton.setToolTipText("Unselect"); |
---|
538 | 563 | unselectButton.addActionListener(this); |
---|
539 | 564 | |
---|
| 565 | + commandsPanel.preferredHeight = 1; |
---|
| 566 | + |
---|
| 567 | + oe.treePanel.add(commandsPanel); |
---|
| 568 | + oe.treePanel.Return(); |
---|
| 569 | + |
---|
540 | 570 | // oe.aConstraints.gridx += 1; |
---|
541 | 571 | // oe.aConstraints.weighty = 0; |
---|
542 | 572 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
548 | 578 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
549 | 579 | // gcButton.addActionListener(this); |
---|
550 | 580 | |
---|
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; |
---|
| 581 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 582 | + |
---|
| 583 | + JScrollPane jSP; |
---|
562 | 584 | //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); |
---|
| 585 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
564 | 586 | ResetModel(); |
---|
565 | | - oe.aConstraints.weighty = 0.5; |
---|
566 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
567 | | - oe.aConstraints.gridy += 1; |
---|
568 | | - oe.aConstraints.gridwidth = 1; |
---|
| 587 | + |
---|
| 588 | + oe.treePanel.add(jSPPanel); |
---|
| 589 | + oe.treePanel.Return(); |
---|
569 | 590 | |
---|
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); |
---|
| 591 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 592 | + |
---|
| 593 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 594 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
574 | 595 | colorCB.addItemListener(this); |
---|
575 | | - oe.aConstraints.gridx += 2; |
---|
576 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 596 | + |
---|
| 597 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 598 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
577 | 599 | materialCB.addItemListener(this); |
---|
578 | | - oe.aConstraints.gridx += 2; |
---|
579 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 600 | + |
---|
| 601 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 602 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
580 | 603 | textureCB.addItemListener(this); |
---|
581 | 604 | |
---|
582 | | - oe.aConstraints.gridx = 0; |
---|
583 | | - oe.aConstraints.gridy += 1; |
---|
| 605 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 606 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 607 | + oe.treePanel.Return(); |
---|
584 | 608 | |
---|
| 609 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 610 | +// mainPanel.setResizeWeight(0.5); |
---|
| 611 | + |
---|
585 | 612 | //jList.addListSelectionListener(this); |
---|
586 | 613 | oe.jTree.addTreeSelectionListener(this); |
---|
587 | 614 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
604 | 631 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
605 | 632 | } |
---|
606 | 633 | |
---|
607 | | - void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 634 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
608 | 635 | { |
---|
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); |
---|
| 636 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
639 | 637 | boxCB.setToolTipText("Display bounding boxes"); |
---|
640 | 638 | boxCB.addItemListener(this); |
---|
641 | | - constraints.gridy += 1; |
---|
642 | | - panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints); |
---|
| 639 | + |
---|
| 640 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
643 | 641 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
644 | 642 | zoomBoxCB.addItemListener(this); |
---|
645 | 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 | + |
---|
646 | 665 | // constraints.gridy += 1; |
---|
647 | 666 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
648 | 667 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
650 | 669 | if (false) |
---|
651 | 670 | { |
---|
652 | 671 | // handled in scripts |
---|
653 | | - constraints.gridy += 1; |
---|
654 | | - panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints); |
---|
| 672 | + //constraints.gridy += 1; |
---|
| 673 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
655 | 674 | speakerCameraCB.addItemListener(this); |
---|
656 | 675 | |
---|
657 | | - constraints.gridy += 1; |
---|
658 | | - panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints); |
---|
| 676 | + //constraints.gridy += 1; |
---|
| 677 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
659 | 678 | speakerFocusCB.addItemListener(this); |
---|
660 | 679 | |
---|
661 | | - constraints.gridy += 1; |
---|
662 | | - panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints); |
---|
| 680 | + //constraints.gridy += 1; |
---|
| 681 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
663 | 682 | smoothfocusCB.addItemListener(this); |
---|
664 | 683 | } |
---|
665 | 684 | |
---|
.. | .. |
---|
667 | 686 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
668 | 687 | // debugCB.addItemListener(this); |
---|
669 | 688 | |
---|
670 | | - constraints.gridy += 1; |
---|
671 | | - panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints); |
---|
| 689 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
672 | 690 | oeilCB.addItemListener(this); |
---|
673 | 691 | |
---|
674 | | - constraints.gridy += 1; |
---|
675 | | - panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints); |
---|
| 692 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
676 | 693 | lookAtCB.setToolTipText("Look-at target"); |
---|
677 | 694 | lookAtCB.addItemListener(this); |
---|
| 695 | + |
---|
| 696 | + } |
---|
| 697 | + |
---|
| 698 | + cGridBag fill = new cGridBag(); |
---|
| 699 | + |
---|
| 700 | + fill.preferredHeight = 200; |
---|
| 701 | + |
---|
| 702 | + panel.add(fill); |
---|
678 | 703 | |
---|
679 | 704 | } |
---|
680 | 705 | |
---|
.. | .. |
---|
959 | 984 | { |
---|
960 | 985 | loadClipboard(true); |
---|
961 | 986 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
962 | | - pasteInto(false); |
---|
| 987 | + pasteInto(false, false); |
---|
963 | 988 | } else { |
---|
964 | 989 | loadClipboard(false); |
---|
965 | 990 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
966 | | - pasteInto(false); // true); // ??? |
---|
| 991 | + pasteInto(false, false); // true); // ??? |
---|
967 | 992 | } |
---|
968 | 993 | } |
---|
969 | 994 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1085 | 1110 | kleinItem.addActionListener(this); |
---|
1086 | 1111 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1087 | 1112 | particleItem.addActionListener(this); |
---|
| 1113 | + if (Globals.ADVANCED) |
---|
| 1114 | + { |
---|
1088 | 1115 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1089 | 1116 | ragdollItem.addActionListener(this); |
---|
1090 | 1117 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1091 | 1118 | ragdoll2Item.addActionListener(this); |
---|
| 1119 | + } |
---|
1092 | 1120 | menu.add("-"); |
---|
1093 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1121 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1094 | 1122 | meshItem.addActionListener(this); |
---|
1095 | 1123 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1096 | 1124 | // meshGroupItem.addActionListener(this); |
---|
| 1125 | + if (Globals.ADVANCED) |
---|
| 1126 | + { |
---|
1097 | 1127 | springItem = menu.add(new MenuItem("Spring")); |
---|
1098 | 1128 | springItem.addActionListener(this); |
---|
1099 | 1129 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1100 | 1130 | 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 | 1131 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1106 | 1132 | blobItem.addActionListener(this); |
---|
1107 | 1133 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1108 | 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); |
---|
1109 | 1140 | lightItem = menu.add(new MenuItem("Light")); |
---|
1110 | 1141 | lightItem.addActionListener(this); |
---|
1111 | 1142 | menu.add("-"); |
---|
.. | .. |
---|
1115 | 1146 | loopItem.addActionListener(this); |
---|
1116 | 1147 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1117 | 1148 | doubleItem.addActionListener(this); |
---|
| 1149 | + if (Globals.ADVANCED) |
---|
| 1150 | + { |
---|
1118 | 1151 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1119 | 1152 | tripleItem.addActionListener(this); |
---|
| 1153 | + } |
---|
1120 | 1154 | } |
---|
1121 | 1155 | |
---|
1122 | 1156 | void buildToolsMenu(Menu menu) |
---|
1123 | 1157 | { |
---|
1124 | 1158 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1125 | 1159 | animationItem.addItemListener(this); |
---|
1126 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1160 | + animationItem.setState(Globals.ANIMATION); |
---|
1127 | 1161 | |
---|
1128 | 1162 | menu.add("-"); |
---|
1129 | 1163 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1130 | 1164 | parseverticesItem.addActionListener(this); |
---|
1131 | 1165 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1132 | 1166 | textureFieldItem.addActionListener(this); |
---|
1133 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1167 | + alignItem = menu.add(new MenuItem("Align Object")); |
---|
1134 | 1168 | alignItem.addActionListener(this); |
---|
1135 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1136 | | - mirrorItem.addActionListener(this); |
---|
1137 | 1169 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1138 | 1170 | reduceMorphItem.addActionListener(this); |
---|
1139 | 1171 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
.. | .. |
---|
1141 | 1173 | |
---|
1142 | 1174 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1143 | 1175 | computeAOItem.addActionListener(this); |
---|
1144 | | - menu.add("-"); |
---|
1145 | 1176 | |
---|
| 1177 | + if (Globals.ADVANCED) |
---|
| 1178 | + { |
---|
| 1179 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1180 | + mirrorItem.addActionListener(this); |
---|
| 1181 | + menu.add("-"); |
---|
1146 | 1182 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1147 | 1183 | memoryItem.addActionListener(this); |
---|
1148 | 1184 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1165 | 1201 | menu.add("-"); |
---|
1166 | 1202 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1167 | 1203 | editScriptItem.addActionListener(this); |
---|
| 1204 | + } |
---|
1168 | 1205 | } |
---|
1169 | 1206 | |
---|
1170 | 1207 | void ScreenFit() |
---|
.. | .. |
---|
1666 | 1703 | { |
---|
1667 | 1704 | makeSomething(new BezierSurface()); |
---|
1668 | 1705 | } else |
---|
1669 | | - if (source == checkerItem) |
---|
| 1706 | + if (source == overlayItem) |
---|
1670 | 1707 | { |
---|
1671 | 1708 | /* |
---|
1672 | 1709 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1854 | 1891 | { |
---|
1855 | 1892 | DumpObject(); |
---|
1856 | 1893 | } else |
---|
| 1894 | + if (source == oneStepButton) |
---|
| 1895 | + { |
---|
| 1896 | + Globals.ONESTEP = true; |
---|
| 1897 | + cameraView.repaint(); |
---|
| 1898 | + } else |
---|
1857 | 1899 | if (source == screenfitButton) |
---|
1858 | 1900 | { |
---|
1859 | 1901 | //Reload(lastConverter, lastFilename, true); |
---|
.. | .. |
---|
1926 | 1968 | { |
---|
1927 | 1969 | paste(false); |
---|
1928 | 1970 | } else |
---|
| 1971 | + if (source == pasteIntoItem) |
---|
| 1972 | + { |
---|
| 1973 | + pasteInto(true, false); |
---|
| 1974 | + } else |
---|
1929 | 1975 | if (source == pasteLinkItem) |
---|
1930 | 1976 | { |
---|
1931 | | - pasteInto(false); |
---|
| 1977 | + pasteInto(false, false); |
---|
1932 | 1978 | } else |
---|
1933 | 1979 | if (source == pasteCloneItem) |
---|
1934 | 1980 | { |
---|
1935 | | - pasteInto(true); |
---|
| 1981 | + pasteInto(true, true); |
---|
1936 | 1982 | } else |
---|
1937 | 1983 | if (source == pasteExpandItem) |
---|
1938 | 1984 | { |
---|
.. | .. |
---|
2134 | 2180 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2135 | 2181 | for (int i=0; i<group.selection.size(); i++) |
---|
2136 | 2182 | { |
---|
2137 | | - boolean random = CameraPane.RANDOM; |
---|
2138 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2183 | + boolean random = CameraPane.SWITCH; |
---|
| 2184 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2139 | 2185 | group.selection.get(i).linkVerticesThis(content); |
---|
2140 | 2186 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2187 | + CameraPane.SWITCH = random; |
---|
2142 | 2188 | } |
---|
2143 | 2189 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2144 | 2190 | refreshContents(); |
---|
.. | .. |
---|
2148 | 2194 | { |
---|
2149 | 2195 | for (int i=0; i<group.selection.size(); i++) |
---|
2150 | 2196 | { |
---|
2151 | | - boolean random = CameraPane.RANDOM; |
---|
2152 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2197 | + boolean random = CameraPane.SWITCH; |
---|
| 2198 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2153 | 2199 | group.selection.get(i).linkVerticesThis(null); |
---|
2154 | | - CameraPane.RANDOM = random; |
---|
| 2200 | + CameraPane.SWITCH = random; |
---|
2155 | 2201 | } |
---|
2156 | 2202 | |
---|
2157 | 2203 | refreshContents(); |
---|
2158 | 2204 | } else |
---|
2159 | 2205 | if (source == relinkverticesItem) |
---|
2160 | 2206 | { |
---|
2161 | | - boolean random = CameraPane.RANDOM; |
---|
2162 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2207 | + boolean random = CameraPane.SWITCH; |
---|
| 2208 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2163 | 2209 | group.selection.RelinkToSupport(); |
---|
2164 | | - CameraPane.RANDOM = random; |
---|
| 2210 | + CameraPane.SWITCH = random; |
---|
2165 | 2211 | |
---|
2166 | 2212 | refreshContents(); |
---|
2167 | 2213 | } else |
---|
.. | .. |
---|
2259 | 2305 | RandomNode random = new RandomNode(); |
---|
2260 | 2306 | group(random); |
---|
2261 | 2307 | if (random.size() > 0) |
---|
2262 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2308 | + random.name = random.get(0).name + "Switch"; |
---|
2263 | 2309 | } else |
---|
2264 | 2310 | if (source == physicsItem) |
---|
2265 | 2311 | { |
---|
.. | .. |
---|
2720 | 2766 | // centralPanel.setVisible(true); |
---|
2721 | 2767 | // XYZPanel.setVisible(false); |
---|
2722 | 2768 | bigThree.ClearUI(); |
---|
2723 | | - bigThree.addComponent(centralPanel); |
---|
| 2769 | + bigThree.add(centralPanel); |
---|
2724 | 2770 | bigThree.FlushUI(); |
---|
2725 | 2771 | } else |
---|
2726 | 2772 | if (source == threeButton) |
---|
.. | .. |
---|
2755 | 2801 | // centralPanel.setVisible(true); |
---|
2756 | 2802 | // XYZPanel.setVisible(true); |
---|
2757 | 2803 | bigThree.ClearUI(); |
---|
2758 | | - bigThree.addComponent(centralPanel); |
---|
2759 | | - bigThree.addComponent(XYZPanel); |
---|
| 2804 | + bigThree.add(centralPanel); |
---|
| 2805 | + bigThree.add(XYZPanel); |
---|
2760 | 2806 | bigThree.FlushUI(); |
---|
2761 | 2807 | } else |
---|
2762 | 2808 | if (source == fourButton) |
---|
.. | .. |
---|
2791 | 2837 | // centralPanel.setVisible(false); |
---|
2792 | 2838 | // XYZPanel.setVisible(false); |
---|
2793 | 2839 | bigThree.ClearUI(); |
---|
2794 | | - bigThree.addComponent(scenePanel); |
---|
| 2840 | + bigThree.add(scenePanel); |
---|
2795 | 2841 | bigThree.FlushUI(); |
---|
2796 | 2842 | } else |
---|
2797 | 2843 | if (source == sixButton) |
---|
.. | .. |
---|
2826 | 2872 | // centralPanel.setVisible(true); |
---|
2827 | 2873 | // XYZPanel.setVisible(false); |
---|
2828 | 2874 | bigThree.ClearUI(); |
---|
2829 | | - bigThree.addComponent(scenePanel); |
---|
2830 | | - bigThree.addComponent(centralPanel); |
---|
| 2875 | + bigThree.add(scenePanel); |
---|
| 2876 | + bigThree.add(centralPanel); |
---|
2831 | 2877 | bigThree.FlushUI(); |
---|
2832 | 2878 | } else |
---|
2833 | 2879 | if (source == sevenButton) |
---|
.. | .. |
---|
2862 | 2908 | // centralPanel.setVisible(true); |
---|
2863 | 2909 | // XYZPanel.setVisible(true); |
---|
2864 | 2910 | bigThree.ClearUI(); |
---|
2865 | | - bigThree.addComponent(scenePanel); |
---|
2866 | | - bigThree.addComponent(centralPanel); |
---|
2867 | | - bigThree.addComponent(XYZPanel); |
---|
| 2911 | + bigThree.add(scenePanel); |
---|
| 2912 | + bigThree.add(centralPanel); |
---|
| 2913 | + bigThree.add(XYZPanel); |
---|
2868 | 2914 | bigThree.FlushUI(); |
---|
2869 | 2915 | } else |
---|
2870 | 2916 | if (source == rootButton) |
---|
.. | .. |
---|
2916 | 2962 | |
---|
2917 | 2963 | child.editWindow = null; // ??????????? |
---|
2918 | 2964 | } |
---|
2919 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2965 | + objEditor.ctrlPanel.FlushUI(); |
---|
2920 | 2966 | //objEditor.jTree.clearSelection(); |
---|
2921 | 2967 | //objEditor.ResetSliders(); |
---|
2922 | 2968 | refreshContents(true); |
---|
.. | .. |
---|
3635 | 3681 | |
---|
3636 | 3682 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3637 | 3683 | |
---|
3638 | | - boolean random = CameraPane.RANDOM; |
---|
3639 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3684 | + boolean random = CameraPane.SWITCH; |
---|
| 3685 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3640 | 3686 | lowres.linkVerticesThis(null); |
---|
3641 | 3687 | lowres.linkVerticesThis(sn); |
---|
3642 | | - CameraPane.RANDOM = random; |
---|
| 3688 | + CameraPane.SWITCH = random; |
---|
3643 | 3689 | |
---|
3644 | 3690 | System.err.flush(); |
---|
3645 | 3691 | |
---|
.. | .. |
---|
4124 | 4170 | System.err.println("info : " + child.GetPath()); |
---|
4125 | 4171 | } |
---|
4126 | 4172 | } |
---|
4127 | | - else |
---|
4128 | | - { |
---|
4129 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
4130 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
4131 | | - System.err.println("info : " + group.GetPath()); |
---|
4132 | | - } |
---|
| 4173 | +// else |
---|
| 4174 | +// { |
---|
| 4175 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4176 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4177 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4178 | +// } |
---|
4133 | 4179 | |
---|
4134 | 4180 | objEditor.SetText(); // jan 2014 |
---|
4135 | 4181 | |
---|
.. | .. |
---|
4397 | 4443 | refreshContents(); |
---|
4398 | 4444 | } |
---|
4399 | 4445 | |
---|
4400 | | - void pasteInto(boolean copyit) |
---|
| 4446 | + void pasteInto(boolean copyit, boolean clone) |
---|
4401 | 4447 | { |
---|
4402 | 4448 | // if (GrafreeD.clipboard == null) |
---|
4403 | 4449 | // return; |
---|
.. | .. |
---|
4426 | 4472 | if (copyit) |
---|
4427 | 4473 | { |
---|
4428 | 4474 | // paste(false); |
---|
4429 | | - CloneClipboard(false); // sept 2014 |
---|
| 4475 | + if (clone) |
---|
| 4476 | + { |
---|
| 4477 | + CloneClipboard(false); // sept 2014 |
---|
| 4478 | + } |
---|
| 4479 | + else |
---|
| 4480 | + { |
---|
| 4481 | + paste(false); |
---|
| 4482 | + } |
---|
4430 | 4483 | } |
---|
4431 | 4484 | else |
---|
4432 | 4485 | { |
---|
.. | .. |
---|
4970 | 5023 | cButton flashSelectionButton; |
---|
4971 | 5024 | cButton editButton; |
---|
4972 | 5025 | cButton uneditButton; |
---|
| 5026 | + JCheckBox allParamsButton; |
---|
4973 | 5027 | cButton clearpanelButton; |
---|
4974 | | - cButton allParamsButton; |
---|
4975 | 5028 | cButton unselectButton; |
---|
4976 | 5029 | |
---|
| 5030 | + cButton oneStepButton; |
---|
| 5031 | + |
---|
4977 | 5032 | cButton screenfitButton; |
---|
4978 | 5033 | cButton screenfitpointButton; |
---|
4979 | 5034 | cButton snapobjectButton; |
---|
.. | .. |
---|
5028 | 5083 | private MenuItem mergeGeometriesItem; |
---|
5029 | 5084 | private MenuItem copyItem; |
---|
5030 | 5085 | private MenuItem pasteItem; |
---|
| 5086 | + private MenuItem pasteIntoItem; |
---|
5031 | 5087 | private MenuItem pasteLinkItem; |
---|
5032 | 5088 | private MenuItem pasteCloneItem; |
---|
5033 | 5089 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5125 | 5181 | private MenuItem blobItem; |
---|
5126 | 5182 | private MenuItem latheItem; |
---|
5127 | 5183 | private MenuItem bezierItem; |
---|
5128 | | - private MenuItem checkerItem; |
---|
| 5184 | + private MenuItem overlayItem; |
---|
5129 | 5185 | private MenuItem meshItem; |
---|
5130 | 5186 | // private MenuItem meshGroupItem; |
---|
5131 | 5187 | private MenuItem springItem; |
---|