.. | .. |
---|
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, |
---|
.. | .. |
---|
83 | 84 | |
---|
84 | 85 | void CloneSelection(boolean supports) |
---|
85 | 86 | { |
---|
86 | | - // Object3D keep = GraphreeD.clipboard; |
---|
| 87 | + // Object3D keep = GrafreeD.clipboard; |
---|
87 | 88 | //Object3D obj; |
---|
88 | 89 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
89 | 90 | { |
---|
.. | .. |
---|
97 | 98 | |
---|
98 | 99 | void CloneClipboard(boolean supports) |
---|
99 | 100 | { |
---|
100 | | - assert(GraphreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
102 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GraphreeD.clipboard.get(0), false)); |
---|
| 101 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 102 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 103 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 104 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 105 | + makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
105 | 106 | else |
---|
106 | | - makeSomething(CloneObject(GraphreeD.clipboard, false)); |
---|
107 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 107 | + makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
| 108 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
108 | 109 | } |
---|
109 | 110 | |
---|
110 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 119 | // obj.support = null; |
---|
119 | 120 | if (!supports) |
---|
120 | 121 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GraphreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
122 | 123 | obj.parent = parent; |
---|
123 | 124 | // obj.support = support; |
---|
124 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
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); |
---|
| 246 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 247 | + relinkverticesItem.addActionListener(this); |
---|
| 248 | + |
---|
| 249 | + if (Globals.ADVANCED) |
---|
| 250 | + { |
---|
222 | 251 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
223 | 252 | setMasterItem.addActionListener(this); |
---|
| 253 | + } |
---|
224 | 254 | |
---|
225 | 255 | oe.menuBar.add(menu = new Menu("Group")); |
---|
226 | 256 | grabItem = menu.add(new MenuItem("Grab")); |
---|
227 | 257 | grabItem.addActionListener(this); |
---|
228 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
229 | | - frontItem.addActionListener(this); |
---|
230 | 258 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 259 | backItem.addActionListener(this); |
---|
| 260 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 261 | + frontItem.addActionListener(this); |
---|
232 | 262 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 263 | compositeItem.addActionListener(this); |
---|
| 264 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
| 265 | + hideItem.addActionListener(this); |
---|
| 266 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 267 | + ungroupItem.addActionListener(this); |
---|
234 | 268 | menu.add("-"); |
---|
235 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 269 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
236 | 270 | randomItem.addActionListener(this); |
---|
237 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
238 | | - physicsItem.addActionListener(this); |
---|
239 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
240 | | - frameselectorItem.addActionListener(this); |
---|
241 | 271 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
242 | 272 | switchGeoItem.addActionListener(this); |
---|
243 | 273 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
244 | 274 | switchTransfoItem.addActionListener(this); |
---|
245 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 275 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
246 | 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); |
---|
247 | 285 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
248 | 286 | scriptNodeItem.addActionListener(this); |
---|
249 | 287 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
250 | 288 | cameraItem.addActionListener(this); |
---|
| 289 | + } |
---|
251 | 290 | |
---|
252 | 291 | oe.menuBar.add(menu = new Menu("Object")); |
---|
253 | 292 | textureItem = menu.add(new MenuItem("Texture")); |
---|
254 | 293 | textureItem.addActionListener(this); |
---|
| 294 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 295 | + billboardItem.addActionListener(this); |
---|
255 | 296 | csgItem = menu.add(new MenuItem("CSG")); |
---|
256 | 297 | csgItem.addActionListener(this); |
---|
257 | 298 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
260 | 301 | shadowYItem.addActionListener(this); |
---|
261 | 302 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
262 | 303 | shadowZItem.addActionListener(this); |
---|
| 304 | + if (Globals.ADVANCED) |
---|
| 305 | + { |
---|
| 306 | + menu.add("-"); |
---|
263 | 307 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
264 | 308 | linkerItem.addActionListener(this); |
---|
265 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
266 | | - templateItem.addActionListener(this); |
---|
267 | 309 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
268 | 310 | attributeItem.addActionListener(this); |
---|
| 311 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 312 | + templateItem.addActionListener(this); |
---|
269 | 313 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
270 | 314 | pointflowItem.addActionListener(this); |
---|
| 315 | + } |
---|
271 | 316 | menu.add("-"); |
---|
272 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
273 | | - transformgeometryItem.addActionListener(this); |
---|
274 | 317 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
275 | 318 | resetTransformItem.addActionListener(this); |
---|
276 | 319 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
277 | 320 | resetCentroidItem.addActionListener(this); |
---|
278 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
279 | | - ungroupItem.addActionListener(this); |
---|
| 321 | + transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 322 | + transformgeometryItem.addActionListener(this); |
---|
280 | 323 | |
---|
281 | 324 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
282 | 325 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
285 | 328 | genNormalsORGANItem.addActionListener(this); |
---|
286 | 329 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
287 | 330 | genNormalsCADItem.addActionListener(this); |
---|
| 331 | + genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
| 332 | + genNormalsMESHItem.addActionListener(this); |
---|
| 333 | + if (Globals.ADVANCED) |
---|
| 334 | + { |
---|
| 335 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 336 | + genNormalsMINEItem.addActionListener(this); |
---|
| 337 | + } |
---|
288 | 338 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
289 | 339 | stripifyItem.addActionListener(this); |
---|
290 | 340 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
306 | 356 | reduce34MeshItem.addActionListener(this); |
---|
307 | 357 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
308 | 358 | increaseMeshItem.addActionListener(this); |
---|
309 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
310 | | - smoothMeshItem.addActionListener(this); |
---|
311 | 359 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
312 | 360 | clipMeshItem.addActionListener(this); |
---|
| 361 | + |
---|
| 362 | + if (Globals.ADVANCED) |
---|
| 363 | + { |
---|
| 364 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 365 | + smoothMeshItem.addActionListener(this); |
---|
| 366 | + } |
---|
313 | 367 | |
---|
314 | 368 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
315 | 369 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
.. | .. |
---|
319 | 373 | liveleavesItem.addActionListener(this); |
---|
320 | 374 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
321 | 375 | unliveleavesItem.addActionListener(this); |
---|
| 376 | + if (Globals.ADVANCED) |
---|
| 377 | + { |
---|
322 | 378 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
323 | 379 | supportleavesItem.addActionListener(this); |
---|
324 | 380 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
325 | 381 | unsupportleavesItem.addActionListener(this); |
---|
| 382 | + } |
---|
326 | 383 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
327 | 384 | hideleavesItem.addActionListener(this); |
---|
328 | 385 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
365 | 422 | sortbysizeItem.addActionListener(this); |
---|
366 | 423 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
367 | 424 | sortbynameItem.addActionListener(this); |
---|
| 425 | + if (Globals.ADVANCED) |
---|
| 426 | + { |
---|
368 | 427 | menu.add("-"); |
---|
369 | 428 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
370 | 429 | extractGeometriesItem.addActionListener(this); |
---|
.. | .. |
---|
374 | 433 | shareGeometriesItem.addActionListener(this); |
---|
375 | 434 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
376 | 435 | mergeGeometriesItem.addActionListener(this); |
---|
| 436 | + } |
---|
377 | 437 | |
---|
378 | 438 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
379 | 439 | buildCreateMenu(menu); |
---|
380 | 440 | |
---|
381 | | - |
---|
382 | 441 | oe.menuBar.add(menu = new Menu("Include")); |
---|
383 | | - importGFDItem = menu.add(new MenuItem("GraphreeD Object...")); |
---|
384 | | - importGFDItem.addActionListener(this); |
---|
385 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
386 | | - importVRMLX3DItem.addActionListener(this); |
---|
387 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
| 442 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
388 | 443 | importOBJItem.addActionListener(this); |
---|
389 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
| 444 | + menu.add("-"); |
---|
| 445 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
390 | 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); |
---|
391 | 453 | |
---|
392 | 454 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
393 | 455 | buildToolsMenu(menu); |
---|
.. | .. |
---|
423 | 485 | oe.radioPanel.add(dummyButton); |
---|
424 | 486 | oe.buttonGroup.add(dummyButton); |
---|
425 | 487 | */ |
---|
426 | | - aConstraints.gridy += 1; |
---|
427 | | - oe.aConstraints.gridwidth = 1; |
---|
428 | | - oe.aConstraints.gridx = 0; |
---|
| 488 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
429 | 489 | |
---|
430 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 490 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 491 | + liveCB.setToolTipText("Enabled animation"); |
---|
431 | 492 | liveCB.addItemListener(this); |
---|
432 | 493 | |
---|
433 | | - oe.aConstraints.gridx += 1; |
---|
434 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
435 | | - supportCB.addItemListener(this); |
---|
436 | | - |
---|
437 | | - // oe.aConstraints.gridx += 1; |
---|
438 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
439 | | - // localCB.addItemListener(this); |
---|
440 | | - |
---|
441 | | - oe.aConstraints.gridx += 1; |
---|
442 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
443 | | - crowdCB.addItemListener(this); |
---|
444 | | - |
---|
445 | | - oe.aConstraints.gridx += 1; |
---|
446 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
447 | | - smoothCB.addItemListener(this); |
---|
448 | | - |
---|
449 | | - oe.aConstraints.gridx += 1; |
---|
450 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), 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"); |
---|
451 | 500 | fastCB.addItemListener(this); |
---|
452 | | - oe.aConstraints.gridx += 1; |
---|
453 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
454 | | - slowCB.addItemListener(this); |
---|
455 | | - oe.aConstraints.gridx += 1; |
---|
456 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
457 | | - boxCB.addItemListener(this); |
---|
458 | | - |
---|
459 | | -// oe.aConstraints.gridx += 1; |
---|
460 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
461 | | -// speakerMocapCB.addItemListener(this); |
---|
462 | | - |
---|
463 | | - if (false) |
---|
464 | | - { |
---|
465 | | - // handled in scripts |
---|
466 | | - oe.aConstraints.gridx += 1; |
---|
467 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
468 | | - speakerCameraCB.addItemListener(this); |
---|
469 | | - |
---|
470 | | - oe.aConstraints.gridx += 1; |
---|
471 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
472 | | - speakerFocusCB.addItemListener(this); |
---|
473 | | - |
---|
474 | | - oe.aConstraints.gridx += 1; |
---|
475 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
476 | | - smoothfocusCB.addItemListener(this); |
---|
477 | | - } |
---|
478 | | - |
---|
479 | | -//oe.aConstraints.gridx += 1; |
---|
480 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
481 | | -// debugCB.addItemListener(this); |
---|
482 | | - |
---|
483 | | - oe.aConstraints.gridx += 1; |
---|
484 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
485 | | - oeilCB.addItemListener(this); |
---|
486 | | - |
---|
487 | | - oe.aConstraints.gridx += 1; |
---|
488 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
489 | | - lookAtCB.addItemListener(this); |
---|
490 | | - |
---|
491 | | - oe.aConstraints.gridx += 1; |
---|
492 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 501 | + |
---|
| 502 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 503 | + trackCB.setToolTipText("Enable tracking"); |
---|
493 | 504 | trackCB.addItemListener(this); |
---|
494 | 505 | |
---|
495 | | - oe.aConstraints.gridx += 1; |
---|
496 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 506 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 507 | + screenfitButton.setToolTipText("Screen fit"); |
---|
497 | 508 | screenfitButton.addActionListener(this); |
---|
498 | | - oe.aConstraints.gridx += 1; |
---|
| 509 | + |
---|
499 | 510 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
500 | 511 | // screenfitpointButton.addActionListener(this); |
---|
501 | | -// oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
503 | | - snapobjectButton.addActionListener(this); |
---|
504 | | - oe.aConstraints.gridx += 1; |
---|
505 | 512 | |
---|
506 | | - //aConstraints.gridx = 0; |
---|
507 | | - //aConstraints.gridy += 1; |
---|
508 | | - oe.aConstraints.weighty = 0; |
---|
509 | | - oe.aConstraints.gridwidth = 1; |
---|
510 | | - |
---|
511 | | - 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); |
---|
| 521 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
512 | 522 | flashSelectionButton.addActionListener(this); |
---|
513 | | - oe.aConstraints.gridx += 1; |
---|
514 | | - oe.aConstraints.weighty = 0; |
---|
515 | | - oe.aConstraints.gridwidth = 1; |
---|
516 | 523 | |
---|
517 | | - // |
---|
518 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 524 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 525 | + |
---|
| 526 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 527 | + twoButton.setToolTipText("Show center view only"); |
---|
519 | 528 | twoButton.addActionListener(this); |
---|
520 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 529 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
521 | 530 | fourButton.addActionListener(this); |
---|
522 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 531 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 532 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 533 | + sixButton.setToolTipText("2-column layout left"); |
---|
523 | 534 | sixButton.addActionListener(this); |
---|
524 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 535 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 536 | + threeButton.setToolTipText("2-column layout right"); |
---|
525 | 537 | threeButton.addActionListener(this); |
---|
526 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 538 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 539 | + sevenButton.setToolTipText("3-column layout"); |
---|
527 | 540 | sevenButton.addActionListener(this); |
---|
528 | 541 | // |
---|
529 | 542 | |
---|
530 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 543 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 544 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
531 | 545 | rootButton.addActionListener(this); |
---|
532 | | - oe.aConstraints.gridx += 1; |
---|
533 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 546 | + |
---|
| 547 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 548 | + closeButton.setToolTipText("Close tab"); |
---|
534 | 549 | closeButton.addActionListener(this); |
---|
535 | 550 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
536 | 551 | //clearButton.addActionListener(this); |
---|
537 | | - oe.aConstraints.gridx += 1; |
---|
538 | 552 | |
---|
539 | | - oe.aConstraints.gridx = 1; // |
---|
540 | | - 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"); |
---|
541 | 557 | editButton.addActionListener(this); |
---|
542 | | - oe.aConstraints.gridx += 1; |
---|
543 | | - oe.aConstraints.weighty = 0; |
---|
544 | | - oe.aConstraints.gridwidth = 1; |
---|
545 | 558 | |
---|
546 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 559 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 560 | + uneditButton.setToolTipText("Unedit selection"); |
---|
547 | 561 | uneditButton.addActionListener(this); |
---|
548 | 562 | |
---|
549 | | - oe.aConstraints.gridx += 1; |
---|
550 | | - oe.aConstraints.weighty = 0; |
---|
551 | | - oe.aConstraints.gridwidth = 1; |
---|
552 | | - |
---|
553 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
554 | | - clearPanelButton.addActionListener(this); |
---|
555 | | - |
---|
556 | | - oe.aConstraints.gridx += 1; |
---|
557 | | - oe.aConstraints.weighty = 0; |
---|
558 | | - oe.aConstraints.gridwidth = 1; |
---|
559 | | - |
---|
560 | | - 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"); |
---|
561 | 565 | allParamsButton.addActionListener(this); |
---|
562 | 566 | |
---|
563 | | - oe.aConstraints.gridx += 1; |
---|
564 | | - oe.aConstraints.weighty = 0; |
---|
565 | | - oe.aConstraints.gridwidth = 1; |
---|
566 | | - |
---|
567 | | - 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"); |
---|
568 | 573 | unselectButton.addActionListener(this); |
---|
569 | 574 | |
---|
| 575 | + commandsPanel.preferredHeight = 1; |
---|
| 576 | + |
---|
| 577 | + oe.treePanel.add(commandsPanel); |
---|
| 578 | + oe.treePanel.Return(); |
---|
| 579 | + |
---|
570 | 580 | // oe.aConstraints.gridx += 1; |
---|
571 | 581 | // oe.aConstraints.weighty = 0; |
---|
572 | 582 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
578 | 588 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
579 | 589 | // gcButton.addActionListener(this); |
---|
580 | 590 | |
---|
581 | | - oe.aConstraints.gridx = 0; |
---|
582 | | - oe.aConstraints.gridy += 1; |
---|
583 | | - |
---|
584 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
585 | | - oe.aConstraints.gridwidth = 100; |
---|
586 | | - // oe.aConstraints.gridheight = 100; |
---|
587 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
588 | | - oe.aConstraints.gridheight = 1; |
---|
589 | | - oe.aConstraints.weighty = 0.5; |
---|
590 | | - oe.aConstraints.gridx = 0; |
---|
591 | | - JScrollPane jSP; |
---|
| 591 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 592 | + |
---|
| 593 | + JScrollPane jSP; |
---|
592 | 594 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
593 | | - 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); |
---|
594 | 596 | ResetModel(); |
---|
595 | | - oe.aConstraints.weighty = 0.5; |
---|
596 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
597 | | - oe.aConstraints.gridy += 1; |
---|
598 | | - oe.aConstraints.gridwidth = 1; |
---|
| 597 | + |
---|
| 598 | + oe.treePanel.add(jSPPanel); |
---|
| 599 | + oe.treePanel.Return(); |
---|
599 | 600 | |
---|
600 | | - oe.aConstraints.weighty = 0; |
---|
601 | | - oe.aConstraints.gridwidth = 2; |
---|
602 | | - |
---|
603 | | - 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"); |
---|
604 | 605 | colorCB.addItemListener(this); |
---|
605 | | - oe.aConstraints.gridx += 2; |
---|
606 | | - 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"); |
---|
607 | 609 | materialCB.addItemListener(this); |
---|
608 | | - oe.aConstraints.gridx += 2; |
---|
609 | | - 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"); |
---|
610 | 613 | textureCB.addItemListener(this); |
---|
611 | 614 | |
---|
612 | | - oe.aConstraints.gridx = 0; |
---|
613 | | - oe.aConstraints.gridy += 1; |
---|
| 615 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 616 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 617 | + oe.treePanel.Return(); |
---|
614 | 618 | |
---|
| 619 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 620 | +// mainPanel.setResizeWeight(0.5); |
---|
| 621 | + |
---|
615 | 622 | //jList.addListSelectionListener(this); |
---|
616 | 623 | oe.jTree.addTreeSelectionListener(this); |
---|
617 | 624 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
633 | 640 | radio.layout = sevenButton; |
---|
634 | 641 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
635 | 642 | } |
---|
| 643 | + |
---|
| 644 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 645 | + { |
---|
| 646 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 647 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 648 | + boxCB.addItemListener(this); |
---|
| 649 | + |
---|
| 650 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 651 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 652 | + zoomBoxCB.addItemListener(this); |
---|
| 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 | + |
---|
| 675 | +// constraints.gridy += 1; |
---|
| 676 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 677 | +// speakerMocapCB.addItemListener(this); |
---|
| 678 | + |
---|
| 679 | + if (false) |
---|
| 680 | + { |
---|
| 681 | + // handled in scripts |
---|
| 682 | + //constraints.gridy += 1; |
---|
| 683 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 684 | + speakerCameraCB.addItemListener(this); |
---|
| 685 | + |
---|
| 686 | + //constraints.gridy += 1; |
---|
| 687 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 688 | + speakerFocusCB.addItemListener(this); |
---|
| 689 | + |
---|
| 690 | + //constraints.gridy += 1; |
---|
| 691 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 692 | + smoothfocusCB.addItemListener(this); |
---|
| 693 | + } |
---|
| 694 | + |
---|
| 695 | +//constraints.gridx += 1; |
---|
| 696 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 697 | +// debugCB.addItemListener(this); |
---|
| 698 | + |
---|
| 699 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 700 | + oeilCB.addItemListener(this); |
---|
| 701 | + |
---|
| 702 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 703 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 704 | + lookAtCB.addItemListener(this); |
---|
| 705 | + |
---|
| 706 | + } |
---|
| 707 | + |
---|
| 708 | + cGridBag fill = new cGridBag(); |
---|
| 709 | + |
---|
| 710 | + fill.preferredHeight = 200; |
---|
| 711 | + |
---|
| 712 | + panel.add(fill); |
---|
| 713 | + |
---|
| 714 | + } |
---|
636 | 715 | |
---|
637 | 716 | void EditObject(Object3D obj) |
---|
638 | 717 | { |
---|
639 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
640 | | - dummyButton.SetObject(obj); |
---|
641 | | - dummyButton.layout = sevenButton; |
---|
642 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
643 | | - dummyButton.addActionListener(this); |
---|
644 | | - radioPanel.add(dummyButton); |
---|
645 | | - buttonGroup.add(dummyButton); |
---|
646 | | - dummyButton.doClick(); |
---|
| 718 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 719 | + radioButton.SetObject(obj); |
---|
| 720 | + radioButton.layout = sevenButton; |
---|
| 721 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 722 | + radioButton.addActionListener(this); |
---|
| 723 | + radioPanel.add(radioButton); |
---|
| 724 | + buttonGroup.add(radioButton); |
---|
| 725 | + radioButton.doClick(); |
---|
647 | 726 | } |
---|
648 | 727 | void SetupViews(ObjEditor oe) |
---|
649 | 728 | { |
---|
.. | .. |
---|
663 | 742 | JCheckBox fastCB; |
---|
664 | 743 | JCheckBox slowCB; |
---|
665 | 744 | JCheckBox boxCB; |
---|
| 745 | + JCheckBox zoomBoxCB; |
---|
666 | 746 | JCheckBox trackCB; |
---|
667 | 747 | JCheckBox smoothfocusCB; |
---|
668 | 748 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
705 | 785 | dropAttributes |= Object3D.TEXTURE; |
---|
706 | 786 | else |
---|
707 | 787 | dropAttributes &= ~Object3D.TEXTURE; |
---|
708 | | - } |
---|
709 | | - else if(e.getSource() == liveCB) |
---|
| 788 | + } else if(e.getSource() == liveCB) |
---|
710 | 789 | { |
---|
711 | 790 | cameraView.ToggleLive(); |
---|
712 | 791 | } |
---|
.. | .. |
---|
743 | 822 | Recompile(); |
---|
744 | 823 | cameraView.repaint(); |
---|
745 | 824 | // refreshContents(); |
---|
| 825 | + } |
---|
| 826 | + else if(e.getSource() == zoomBoxCB) |
---|
| 827 | + { |
---|
| 828 | + cameraView.ToggleZoomBoxMode(); |
---|
746 | 829 | } |
---|
747 | 830 | else if(e.getSource() == smoothfocusCB) |
---|
748 | 831 | { |
---|
.. | .. |
---|
857 | 940 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
858 | 941 | // return; |
---|
859 | 942 | // } |
---|
860 | | - if (string.charAt(0) == '/') |
---|
| 943 | + |
---|
| 944 | + // File path for Mac and Windows |
---|
| 945 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
861 | 946 | { |
---|
862 | 947 | // file(s) |
---|
863 | 948 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
884 | 969 | |
---|
885 | 970 | flashIt = false; |
---|
886 | 971 | CameraPane pane = (CameraPane) target; |
---|
887 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 972 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
888 | 973 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
889 | 974 | |
---|
890 | 975 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
911 | 996 | { |
---|
912 | 997 | loadClipboard(true); |
---|
913 | 998 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
914 | | - pasteInto(false); |
---|
| 999 | + pasteInto(false, false); |
---|
915 | 1000 | } else { |
---|
916 | 1001 | loadClipboard(false); |
---|
917 | 1002 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
918 | | - pasteInto(false); // true); // ??? |
---|
| 1003 | + pasteInto(false, false); // true); // ??? |
---|
919 | 1004 | } |
---|
920 | 1005 | } |
---|
921 | 1006 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1033 | 1118 | torusItem.addActionListener(this); |
---|
1034 | 1119 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1035 | 1120 | superItem.addActionListener(this); |
---|
| 1121 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1122 | + kleinItem.addActionListener(this); |
---|
1036 | 1123 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1037 | 1124 | particleItem.addActionListener(this); |
---|
| 1125 | + if (Globals.ADVANCED) |
---|
| 1126 | + { |
---|
1038 | 1127 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1039 | 1128 | ragdollItem.addActionListener(this); |
---|
1040 | 1129 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1041 | 1130 | ragdoll2Item.addActionListener(this); |
---|
| 1131 | + } |
---|
1042 | 1132 | menu.add("-"); |
---|
1043 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1133 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1044 | 1134 | meshItem.addActionListener(this); |
---|
1045 | 1135 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1046 | 1136 | // meshGroupItem.addActionListener(this); |
---|
| 1137 | + if (Globals.ADVANCED) |
---|
| 1138 | + { |
---|
1047 | 1139 | springItem = menu.add(new MenuItem("Spring")); |
---|
1048 | 1140 | springItem.addActionListener(this); |
---|
1049 | 1141 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1050 | 1142 | flagItem.addActionListener(this); |
---|
1051 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1052 | | - bezierItem.addActionListener(this); |
---|
1053 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1054 | | - checkerItem.addActionListener(this); |
---|
1055 | 1143 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1056 | 1144 | blobItem.addActionListener(this); |
---|
1057 | 1145 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1058 | 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); |
---|
1059 | 1152 | lightItem = menu.add(new MenuItem("Light")); |
---|
1060 | 1153 | lightItem.addActionListener(this); |
---|
1061 | 1154 | menu.add("-"); |
---|
.. | .. |
---|
1065 | 1158 | loopItem.addActionListener(this); |
---|
1066 | 1159 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1067 | 1160 | doubleItem.addActionListener(this); |
---|
| 1161 | + if (Globals.ADVANCED) |
---|
| 1162 | + { |
---|
1068 | 1163 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1069 | 1164 | tripleItem.addActionListener(this); |
---|
| 1165 | + } |
---|
1070 | 1166 | } |
---|
1071 | 1167 | |
---|
1072 | 1168 | void buildToolsMenu(Menu menu) |
---|
1073 | 1169 | { |
---|
1074 | 1170 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1075 | 1171 | animationItem.addItemListener(this); |
---|
1076 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1172 | + animationItem.setState(Globals.ANIMATION); |
---|
1077 | 1173 | |
---|
1078 | 1174 | menu.add("-"); |
---|
1079 | 1175 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1080 | 1176 | parseverticesItem.addActionListener(this); |
---|
1081 | 1177 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1082 | 1178 | textureFieldItem.addActionListener(this); |
---|
1083 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1179 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1084 | 1180 | alignItem.addActionListener(this); |
---|
1085 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1086 | | - mirrorItem.addActionListener(this); |
---|
1087 | 1181 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1088 | 1182 | reduceMorphItem.addActionListener(this); |
---|
1089 | 1183 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1090 | 1184 | reduce34MorphItem.addActionListener(this); |
---|
1091 | | - |
---|
| 1185 | + menu.add("-"); |
---|
1092 | 1186 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1093 | 1187 | computeAOItem.addActionListener(this); |
---|
1094 | | - menu.add("-"); |
---|
1095 | 1188 | |
---|
| 1189 | + if (Globals.ADVANCED) |
---|
| 1190 | + { |
---|
| 1191 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1192 | + mirrorItem.addActionListener(this); |
---|
| 1193 | + menu.add("-"); |
---|
1096 | 1194 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1097 | 1195 | memoryItem.addActionListener(this); |
---|
1098 | 1196 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1106 | 1204 | resetParentItem.addActionListener(this); |
---|
1107 | 1205 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1108 | 1206 | repairParentItem.addActionListener(this); |
---|
| 1207 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1208 | + repairShadowItem.addActionListener(this); |
---|
1109 | 1209 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1110 | 1210 | invariantsItem.addActionListener(this); |
---|
1111 | 1211 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1113 | 1213 | menu.add("-"); |
---|
1114 | 1214 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1115 | 1215 | editScriptItem.addActionListener(this); |
---|
| 1216 | + } |
---|
1116 | 1217 | } |
---|
1117 | 1218 | |
---|
1118 | 1219 | void ScreenFit() |
---|
.. | .. |
---|
1441 | 1542 | |
---|
1442 | 1543 | void Overwrite(int mask) |
---|
1443 | 1544 | { |
---|
1444 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1545 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1445 | 1546 | { |
---|
1446 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1547 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1447 | 1548 | |
---|
1448 | 1549 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1449 | 1550 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1466 | 1567 | // |
---|
1467 | 1568 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1468 | 1569 | { |
---|
| 1570 | + Object source = event.getSource(); |
---|
1469 | 1571 | /* |
---|
1470 | 1572 | if (event.getSource() == nameField) |
---|
1471 | 1573 | { |
---|
.. | .. |
---|
1477 | 1579 | } |
---|
1478 | 1580 | else |
---|
1479 | 1581 | */ |
---|
1480 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1582 | + if (source == lookAtItem || source == lookFromItem) |
---|
1481 | 1583 | { |
---|
1482 | 1584 | ScreenFit(); |
---|
1483 | 1585 | } else |
---|
1484 | | - if (event.getSource() == switchItem) |
---|
| 1586 | + if (source == switchItem) |
---|
1485 | 1587 | { |
---|
1486 | 1588 | cVector v1 = new cVector(); |
---|
1487 | 1589 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1490 | 1592 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1491 | 1593 | objEditor.cameraView.repaint(); |
---|
1492 | 1594 | } else |
---|
1493 | | - if (event.getSource() == rectoidItem) |
---|
| 1595 | + if (source == rectoidItem) |
---|
1494 | 1596 | { |
---|
1495 | 1597 | makeSomething(new Box()); |
---|
1496 | 1598 | } else |
---|
1497 | | - if (event.getSource() == particleItem) |
---|
| 1599 | + if (source == particleItem) |
---|
1498 | 1600 | { |
---|
1499 | 1601 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1500 | 1602 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1515 | 1617 | applyExample(particleGeom, "SMOKE"); |
---|
1516 | 1618 | makeSomething(particleGeom); |
---|
1517 | 1619 | } else |
---|
1518 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1620 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1519 | 1621 | { |
---|
1520 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1622 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1521 | 1623 | |
---|
1522 | 1624 | ragdoll.toParent = LA.newMatrix(); |
---|
1523 | 1625 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1535 | 1637 | } else |
---|
1536 | 1638 | /* |
---|
1537 | 1639 | */ |
---|
1538 | | - if (event.getSource() == heightFieldItem) |
---|
| 1640 | + if (source == heightFieldItem) |
---|
1539 | 1641 | { |
---|
1540 | 1642 | Object3D obj = new Object3D(); |
---|
1541 | 1643 | |
---|
.. | .. |
---|
1573 | 1675 | |
---|
1574 | 1676 | makeSomething(obj); |
---|
1575 | 1677 | } else |
---|
1576 | | - if (event.getSource() == gridItem) |
---|
| 1678 | + if (source == gridItem) |
---|
1577 | 1679 | { |
---|
1578 | 1680 | makeSomething(new Grid()); |
---|
1579 | 1681 | } else |
---|
1580 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1682 | + if (source == ellipsoidItem) |
---|
1581 | 1683 | { |
---|
1582 | 1684 | makeSomething(new Sphere()); |
---|
1583 | 1685 | } else |
---|
1584 | | - if (event.getSource() == coneItem) |
---|
| 1686 | + if (source == coneItem) |
---|
1585 | 1687 | { |
---|
1586 | 1688 | makeSomething(new Cone()); |
---|
1587 | 1689 | } else |
---|
1588 | | - if (event.getSource() == torusItem) |
---|
| 1690 | + if (source == torusItem) |
---|
1589 | 1691 | { |
---|
1590 | 1692 | makeSomething(new Torus()); |
---|
1591 | 1693 | } else |
---|
1592 | | - if (event.getSource() == superItem) |
---|
| 1694 | + if (source == superItem) |
---|
1593 | 1695 | { |
---|
1594 | 1696 | makeSomething(new Superellipsoid()); |
---|
1595 | 1697 | } else |
---|
1596 | | - if (event.getSource() == blobItem) |
---|
| 1698 | + if (source == kleinItem) |
---|
| 1699 | + { |
---|
| 1700 | + makeSomething(new Klein()); |
---|
| 1701 | + } else |
---|
| 1702 | + if (source == blobItem) |
---|
1597 | 1703 | { |
---|
1598 | 1704 | Blob blob = new Blob(); |
---|
1599 | 1705 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1601 | 1707 | //blob.retile(); |
---|
1602 | 1708 | makeSomething(blob); |
---|
1603 | 1709 | } else |
---|
1604 | | - if (event.getSource() == latheItem) |
---|
| 1710 | + if (source == latheItem) |
---|
1605 | 1711 | { |
---|
1606 | 1712 | makeSomething(new Lathe()); |
---|
1607 | 1713 | } else |
---|
1608 | | - if (event.getSource() == bezierItem) |
---|
| 1714 | + if (source == bezierItem) |
---|
1609 | 1715 | { |
---|
1610 | 1716 | makeSomething(new BezierSurface()); |
---|
1611 | 1717 | } else |
---|
1612 | | - if (event.getSource() == checkerItem) |
---|
| 1718 | + if (source == overlayItem) |
---|
1613 | 1719 | { |
---|
1614 | 1720 | /* |
---|
1615 | 1721 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1624 | 1730 | */ |
---|
1625 | 1731 | makeSomething(new Checker()); |
---|
1626 | 1732 | } else |
---|
1627 | | - if (event.getSource() == meshItem) |
---|
| 1733 | + if (source == meshItem) |
---|
1628 | 1734 | { |
---|
1629 | 1735 | Object3D itemtomake = new Object3D(); |
---|
1630 | 1736 | Object3D child; |
---|
.. | .. |
---|
1645 | 1751 | makeSomething(child); |
---|
1646 | 1752 | } |
---|
1647 | 1753 | } else |
---|
1648 | | - if (event.getSource() == springItem) |
---|
| 1754 | + if (source == springItem) |
---|
1649 | 1755 | { |
---|
1650 | 1756 | cSpring s = new cSpring(); |
---|
1651 | 1757 | s.setup(); |
---|
1652 | 1758 | makeSomething(s); |
---|
1653 | 1759 | } else |
---|
1654 | | - if (event.getSource() == flagItem) |
---|
| 1760 | + if (source == flagItem) |
---|
1655 | 1761 | { |
---|
1656 | 1762 | cSpring s = new cFlag(); |
---|
1657 | 1763 | s.setup(); |
---|
1658 | 1764 | makeSomething(s); |
---|
1659 | 1765 | } else |
---|
1660 | | - if (event.getSource() == lightItem) |
---|
| 1766 | + if (source == lightItem) |
---|
1661 | 1767 | { |
---|
1662 | 1768 | makeSomething(new Light()); |
---|
1663 | 1769 | } else |
---|
1664 | | - if (event.getSource() == csgItem) |
---|
| 1770 | + if (source == csgItem) |
---|
1665 | 1771 | { |
---|
1666 | 1772 | group(new CSG()); |
---|
1667 | 1773 | } else |
---|
1668 | | - if (event.getSource() == templateItem) |
---|
| 1774 | + if (source == templateItem) |
---|
1669 | 1775 | { |
---|
1670 | 1776 | group(new cTemplate()); |
---|
1671 | 1777 | } else |
---|
1672 | | - if (event.getSource() == attributeItem) |
---|
| 1778 | + if (source == attributeItem) |
---|
1673 | 1779 | { |
---|
1674 | 1780 | makeSomething(new Attribute()); |
---|
1675 | 1781 | } else |
---|
1676 | | - if (event.getSource() == pointflowItem) |
---|
| 1782 | + if (source == pointflowItem) |
---|
1677 | 1783 | { |
---|
1678 | 1784 | makeSomething(new PointFlow()); |
---|
1679 | 1785 | } else |
---|
.. | .. |
---|
1685 | 1791 | } else |
---|
1686 | 1792 | */ |
---|
1687 | 1793 | |
---|
1688 | | - if (event.getSource() == superLoopItem) |
---|
| 1794 | + if (source == superLoopItem) |
---|
1689 | 1795 | { |
---|
1690 | 1796 | Composite g = new cGroup(); |
---|
1691 | 1797 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1707 | 1813 | |
---|
1708 | 1814 | group(g); |
---|
1709 | 1815 | } else |
---|
1710 | | - if (event.getSource() == loopItem) |
---|
| 1816 | + if (source == loopItem) |
---|
1711 | 1817 | { |
---|
1712 | 1818 | Composite csg = new GroupLeaf(); |
---|
1713 | 1819 | csg.count = 5; |
---|
.. | .. |
---|
1716 | 1822 | csg.addChild(child); |
---|
1717 | 1823 | child.addChild(csg); |
---|
1718 | 1824 | } else |
---|
1719 | | - if (event.getSource() == doubleItem) |
---|
| 1825 | + if (source == doubleItem) |
---|
1720 | 1826 | { |
---|
1721 | 1827 | Composite csg = new GroupLeaf(); |
---|
1722 | 1828 | csg.count = 5; |
---|
.. | .. |
---|
1728 | 1834 | csg.addChild(child); |
---|
1729 | 1835 | child.addChild(csg); |
---|
1730 | 1836 | } else |
---|
1731 | | - if (event.getSource() == tripleItem) |
---|
| 1837 | + if (source == tripleItem) |
---|
1732 | 1838 | { |
---|
1733 | 1839 | Composite csg = new GroupLeaf(); |
---|
1734 | 1840 | csg.count = 4; |
---|
.. | .. |
---|
1744 | 1850 | child.addChild(csg); |
---|
1745 | 1851 | } else |
---|
1746 | 1852 | |
---|
1747 | | - if (event.getSource() == importGFDItem) |
---|
| 1853 | + if (source == importGFDItem) |
---|
1748 | 1854 | { |
---|
1749 | 1855 | ImportGFD(); |
---|
1750 | 1856 | } else |
---|
1751 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1857 | + if (source == importVRMLX3DItem) |
---|
1752 | 1858 | { |
---|
1753 | 1859 | ImportVRMLX3D(); |
---|
1754 | 1860 | } else |
---|
1755 | | - if (event.getSource() == import3DSItem) |
---|
| 1861 | + if (source == import3DSItem) |
---|
1756 | 1862 | { |
---|
1757 | 1863 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1758 | 1864 | } else |
---|
1759 | | - if (event.getSource() == importOBJItem) |
---|
| 1865 | + if (source == importOBJItem) |
---|
1760 | 1866 | { |
---|
1761 | | - 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 | + } |
---|
1762 | 1876 | } else |
---|
1763 | | - if (event.getSource() == computeAOItem) |
---|
| 1877 | + if (source == computeAOItem) |
---|
1764 | 1878 | { |
---|
1765 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1766 | | - CameraPane.theRenderer.repaint(); |
---|
| 1879 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1880 | + Globals.theRenderer.repaint(); |
---|
1767 | 1881 | } else |
---|
1768 | | - if (event.getSource() == recompileItem) |
---|
| 1882 | + if (source == recompileItem) |
---|
1769 | 1883 | { |
---|
1770 | 1884 | Recompile(); |
---|
1771 | 1885 | refreshContents(); |
---|
1772 | 1886 | } else |
---|
1773 | | - if (event.getSource() == editScriptItem) |
---|
| 1887 | + if (source == editScriptItem) |
---|
1774 | 1888 | { |
---|
1775 | 1889 | OpenDialog(); |
---|
1776 | 1890 | refreshContents(); |
---|
1777 | 1891 | } else |
---|
1778 | | - if (event.getSource() == invariantsItem) |
---|
| 1892 | + if (source == invariantsItem) |
---|
1779 | 1893 | { |
---|
1780 | 1894 | System.out.println("Invariants:"); |
---|
1781 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1895 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1782 | 1896 | } else |
---|
1783 | | - if (event.getSource() == memoryItem) |
---|
| 1897 | + if (source == memoryItem) |
---|
1784 | 1898 | { |
---|
1785 | 1899 | //System.out.println("Invariants:"); |
---|
1786 | 1900 | PrintMemory(); |
---|
1787 | 1901 | } else |
---|
1788 | | - if (event.getSource() == pathItem) |
---|
| 1902 | + if (source == pathItem) |
---|
1789 | 1903 | { |
---|
1790 | 1904 | PrintPath(); |
---|
1791 | 1905 | } else |
---|
1792 | | - if (event.getSource() == analyzeItem) |
---|
| 1906 | + if (source == analyzeItem) |
---|
1793 | 1907 | { |
---|
1794 | 1908 | AnalyzeObject(); |
---|
1795 | 1909 | } else |
---|
1796 | | - if (event.getSource() == dumpItem) |
---|
| 1910 | + if (source == dumpItem) |
---|
1797 | 1911 | { |
---|
1798 | 1912 | DumpObject(); |
---|
1799 | 1913 | } else |
---|
1800 | | - if (event.getSource() == screenfitButton) |
---|
| 1914 | + if (source == oneStepButton) |
---|
| 1915 | + { |
---|
| 1916 | + Globals.ONESTEP = true; |
---|
| 1917 | + cameraView.repaint(); |
---|
| 1918 | + } else |
---|
| 1919 | + if (source == screenfitButton) |
---|
1801 | 1920 | { |
---|
1802 | 1921 | //Reload(lastConverter, lastFilename, true); |
---|
1803 | 1922 | ScreenFit(); |
---|
1804 | 1923 | } else |
---|
1805 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1924 | + if (source == screenfitpointButton) |
---|
1806 | 1925 | { |
---|
1807 | 1926 | //Reload(lastConverter, lastFilename, true); |
---|
1808 | 1927 | ScreenFitPoint(); |
---|
1809 | 1928 | } else |
---|
1810 | | - if (event.getSource() == snapobjectButton) |
---|
| 1929 | + if (source == snapobjectButton) |
---|
1811 | 1930 | { |
---|
1812 | 1931 | //Reload(lastConverter, lastFilename, true); |
---|
1813 | 1932 | SnapObject(); |
---|
.. | .. |
---|
1818 | 1937 | // Recompile(); |
---|
1819 | 1938 | // refreshContents(); |
---|
1820 | 1939 | // } else |
---|
1821 | | - if (event.getSource() == gcButton) |
---|
| 1940 | + if (source == gcButton) |
---|
1822 | 1941 | { |
---|
1823 | 1942 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1824 | 1943 | System.gc(); |
---|
1825 | 1944 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1826 | 1945 | } else |
---|
1827 | | - if (event.getSource() == editLeafItem) |
---|
| 1946 | + if (source == editLeafItem) |
---|
1828 | 1947 | { |
---|
1829 | 1948 | Object3D obj; |
---|
1830 | 1949 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1838 | 1957 | } |
---|
1839 | 1958 | refreshContents(true); |
---|
1840 | 1959 | } else |
---|
1841 | | - if (event.getSource() == openWindowItem) |
---|
| 1960 | + if (source == openWindowItem) |
---|
1842 | 1961 | { |
---|
1843 | 1962 | EditSelection(true); |
---|
1844 | 1963 | } else |
---|
1845 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1964 | + if (source == cutItem || source == clearButton) |
---|
1846 | 1965 | { |
---|
1847 | 1966 | loadClipboard(true); |
---|
1848 | 1967 | } else |
---|
1849 | | - if (event.getSource() == duplicateItem) |
---|
| 1968 | + if (source == duplicateItem) |
---|
1850 | 1969 | { |
---|
1851 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1970 | + Object3D keep = GrafreeD.clipboard; |
---|
1852 | 1971 | loadClipboard(false); |
---|
1853 | 1972 | paste(false); |
---|
1854 | | - GraphreeD.clipboard = keep; |
---|
| 1973 | + GrafreeD.clipboard = keep; |
---|
1855 | 1974 | } else |
---|
1856 | | - if (event.getSource() == cloneItem) |
---|
| 1975 | + if (source == cloneItem) |
---|
1857 | 1976 | { |
---|
1858 | 1977 | CloneSelection(false); |
---|
1859 | 1978 | } else |
---|
1860 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1979 | + if (source == cloneSupportItem) |
---|
1861 | 1980 | { |
---|
1862 | 1981 | CloneSelection(true); |
---|
1863 | 1982 | } else |
---|
1864 | | - if (event.getSource() == copyItem) |
---|
| 1983 | + if (source == copyItem) |
---|
1865 | 1984 | { |
---|
1866 | 1985 | loadClipboard(false); |
---|
1867 | 1986 | } else |
---|
1868 | | - if (event.getSource() == pasteItem) |
---|
| 1987 | + if (source == pasteItem) |
---|
1869 | 1988 | { |
---|
1870 | 1989 | paste(false); |
---|
1871 | 1990 | } else |
---|
1872 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1991 | + if (source == pasteIntoItem) |
---|
1873 | 1992 | { |
---|
1874 | | - pasteInto(false); |
---|
| 1993 | + pasteInto(true, false); |
---|
1875 | 1994 | } else |
---|
1876 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1995 | + if (source == pasteLinkItem) |
---|
1877 | 1996 | { |
---|
1878 | | - pasteInto(true); |
---|
| 1997 | + pasteInto(false, false); |
---|
1879 | 1998 | } else |
---|
1880 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1999 | + if (source == pasteCloneItem) |
---|
| 2000 | + { |
---|
| 2001 | + pasteInto(true, true); |
---|
| 2002 | + } else |
---|
| 2003 | + if (source == pasteExpandItem) |
---|
1881 | 2004 | { |
---|
1882 | 2005 | paste(true); |
---|
1883 | 2006 | } else |
---|
1884 | | - if (event.getSource() == synchronizeItem) |
---|
| 2007 | + if (source == synchronizeItem) |
---|
1885 | 2008 | { |
---|
1886 | 2009 | Overwrite(Object3D.TRANSFORM); |
---|
1887 | 2010 | } else |
---|
1888 | | - if (event.getSource() == overwriteNameItem) |
---|
| 2011 | + if (source == overwriteNameItem) |
---|
1889 | 2012 | { |
---|
1890 | 2013 | Overwrite(Object3D.NAME); |
---|
1891 | 2014 | } else |
---|
1892 | | - if (event.getSource() == overwriteUVItem) |
---|
| 2015 | + if (source == overwriteUVItem) |
---|
1893 | 2016 | { |
---|
1894 | 2017 | Overwrite(Object3D.UV); |
---|
1895 | 2018 | } else |
---|
1896 | | - if (event.getSource() == overwriteMatItem) |
---|
| 2019 | + if (source == overwriteMatItem) |
---|
1897 | 2020 | { |
---|
| 2021 | + /* july 2015 |
---|
1898 | 2022 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1899 | | - Overwrite(Object3D.MATERIAL); |
---|
| 2023 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1900 | 2024 | else |
---|
1901 | 2025 | { |
---|
1902 | 2026 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1908 | 2032 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1909 | 2033 | } |
---|
1910 | 2034 | } |
---|
| 2035 | + */ |
---|
| 2036 | + |
---|
| 2037 | + Overwrite(dropAttributes); |
---|
1911 | 2038 | } |
---|
1912 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 2039 | + if (source == overwriteGeoItem) |
---|
1913 | 2040 | { |
---|
1914 | 2041 | Overwrite(Object3D.GEOMETRY); |
---|
1915 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2042 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1916 | 2043 | // { |
---|
1917 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2044 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1918 | 2045 | // |
---|
1919 | 2046 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1920 | 2047 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1926 | 2053 | // refreshContents(); |
---|
1927 | 2054 | // } |
---|
1928 | 2055 | } else |
---|
1929 | | - if (event.getSource() == generateMeshItem) |
---|
| 2056 | + if (source == generateMeshItem) |
---|
1930 | 2057 | { |
---|
1931 | 2058 | //if (group.selection.size() == 1) |
---|
1932 | 2059 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1937 | 2064 | ResetModel(); |
---|
1938 | 2065 | refreshContents(); |
---|
1939 | 2066 | } else |
---|
1940 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 2067 | + if (source == extractGeometriesItem) |
---|
1941 | 2068 | { |
---|
1942 | 2069 | boolean one = false; |
---|
1943 | 2070 | |
---|
.. | .. |
---|
1964 | 2091 | ResetModel(); |
---|
1965 | 2092 | refreshContents(); |
---|
1966 | 2093 | } else |
---|
1967 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2094 | + if (source == cloneGeometriesItem) |
---|
1968 | 2095 | { |
---|
1969 | 2096 | boolean one = false; |
---|
1970 | 2097 | |
---|
.. | .. |
---|
1990 | 2117 | ResetModel(); |
---|
1991 | 2118 | refreshContents(); |
---|
1992 | 2119 | } else |
---|
1993 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2120 | + if (source == shareGeometriesItem) |
---|
1994 | 2121 | { |
---|
1995 | 2122 | boolean one = false; |
---|
1996 | 2123 | |
---|
1997 | 2124 | if (group.selection.size() == 1) |
---|
1998 | 2125 | one = true; |
---|
1999 | 2126 | |
---|
| 2127 | + Object3D merge = null; |
---|
| 2128 | + |
---|
2000 | 2129 | Object3D content = new cGroup(); |
---|
2001 | 2130 | |
---|
2002 | 2131 | for (int i=0; i<group.selection.size(); i++) |
---|
2003 | 2132 | { |
---|
2004 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2133 | + merge = new Merge(group.selection.get(i)); |
---|
2005 | 2134 | |
---|
2006 | 2135 | if (one) |
---|
2007 | | - makeSomething(sel, false); |
---|
| 2136 | + makeSomething(merge, false); |
---|
2008 | 2137 | else |
---|
2009 | | - content.addChild(sel); |
---|
| 2138 | + content.addChild(merge); |
---|
2010 | 2139 | } |
---|
2011 | 2140 | |
---|
2012 | 2141 | if (!one) |
---|
2013 | | - makeSomething(content, false); |
---|
2014 | | - |
---|
2015 | | - ResetModel(); |
---|
2016 | | - refreshContents(); |
---|
| 2142 | + makeSomething(content, true); |
---|
| 2143 | + else |
---|
| 2144 | + { |
---|
| 2145 | + ResetModel(); |
---|
| 2146 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2147 | + refreshContents(); |
---|
| 2148 | + } |
---|
2017 | 2149 | } else |
---|
2018 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2150 | + if (source == mergeGeometriesItem) |
---|
2019 | 2151 | { |
---|
2020 | 2152 | boolean one = false; |
---|
2021 | 2153 | |
---|
.. | .. |
---|
2045 | 2177 | ResetModel(); |
---|
2046 | 2178 | refreshContents(); |
---|
2047 | 2179 | } else |
---|
2048 | | - if (event.getSource() == linkverticesItem) |
---|
| 2180 | + if (source == linkverticesItem) |
---|
2049 | 2181 | { |
---|
2050 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2182 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2051 | 2183 | // { |
---|
2052 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2184 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2053 | 2185 | // |
---|
2054 | 2186 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2055 | 2187 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2058 | 2190 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2059 | 2191 | // refreshContents(); |
---|
2060 | 2192 | // } |
---|
2061 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2193 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2062 | 2194 | { |
---|
2063 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2195 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2064 | 2196 | |
---|
2065 | 2197 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2066 | 2198 | content = ((cGroup)content).get(0); |
---|
2067 | 2199 | |
---|
2068 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2200 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2069 | 2201 | for (int i=0; i<group.selection.size(); i++) |
---|
2070 | 2202 | { |
---|
2071 | | - boolean random = CameraPane.RANDOM; |
---|
2072 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2203 | + boolean random = CameraPane.SWITCH; |
---|
| 2204 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2073 | 2205 | group.selection.get(i).linkVerticesThis(content); |
---|
2074 | 2206 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2075 | | - CameraPane.RANDOM = random; |
---|
| 2207 | + CameraPane.SWITCH = random; |
---|
2076 | 2208 | } |
---|
2077 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2209 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2078 | 2210 | refreshContents(); |
---|
2079 | 2211 | } |
---|
2080 | 2212 | } else |
---|
2081 | | - if (event.getSource() == resetsupportItem) |
---|
| 2213 | + if (source == resetsupportItem) |
---|
2082 | 2214 | { |
---|
2083 | 2215 | for (int i=0; i<group.selection.size(); i++) |
---|
2084 | 2216 | { |
---|
2085 | | - boolean random = CameraPane.RANDOM; |
---|
2086 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2217 | + boolean random = CameraPane.SWITCH; |
---|
| 2218 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2087 | 2219 | group.selection.get(i).linkVerticesThis(null); |
---|
2088 | | - CameraPane.RANDOM = random; |
---|
| 2220 | + CameraPane.SWITCH = random; |
---|
2089 | 2221 | } |
---|
2090 | 2222 | |
---|
2091 | 2223 | refreshContents(); |
---|
2092 | 2224 | } else |
---|
2093 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2225 | + if (source == relinkverticesItem) |
---|
| 2226 | + { |
---|
| 2227 | + boolean random = CameraPane.SWITCH; |
---|
| 2228 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
| 2229 | + group.selection.RelinkToSupport(); |
---|
| 2230 | + CameraPane.SWITCH = random; |
---|
| 2231 | + |
---|
| 2232 | + refreshContents(); |
---|
| 2233 | + } else |
---|
| 2234 | + if (source == resetreferencesItem) |
---|
2094 | 2235 | { |
---|
2095 | 2236 | for (int i=0; i<group.selection.size(); i++) |
---|
2096 | 2237 | { |
---|
.. | .. |
---|
2099 | 2240 | |
---|
2100 | 2241 | refreshContents(); |
---|
2101 | 2242 | } else |
---|
2102 | | - if (event.getSource() == setMasterItem) |
---|
| 2243 | + if (source == setMasterItem) |
---|
2103 | 2244 | { |
---|
2104 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2245 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2105 | 2246 | { |
---|
2106 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2247 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2107 | 2248 | |
---|
2108 | 2249 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2109 | 2250 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2112 | 2253 | refreshContents(); |
---|
2113 | 2254 | } |
---|
2114 | 2255 | } else |
---|
2115 | | - if (event.getSource() == poseMeshItem) |
---|
| 2256 | + if (source == poseMeshItem) |
---|
2116 | 2257 | { |
---|
2117 | 2258 | if (group.selection.size() == 1) |
---|
2118 | 2259 | { |
---|
2119 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2260 | + if (GrafreeD.clipboard.size() == 1) |
---|
2120 | 2261 | { |
---|
2121 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2262 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2122 | 2263 | |
---|
2123 | 2264 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2124 | 2265 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2131 | 2272 | } |
---|
2132 | 2273 | |
---|
2133 | 2274 | } else |
---|
2134 | | - if (event.getSource() == revertMeshItem) |
---|
| 2275 | + if (source == revertMeshItem) |
---|
2135 | 2276 | { |
---|
2136 | 2277 | RevertMeshes(); |
---|
2137 | 2278 | } else |
---|
2138 | | - if (event.getSource() == resetMeshItem) |
---|
| 2279 | + if (source == resetMeshItem) |
---|
2139 | 2280 | { |
---|
2140 | 2281 | ResetAll(); |
---|
2141 | 2282 | } else |
---|
2142 | | - if (event.getSource() == stepAllItem) |
---|
| 2283 | + if (source == stepAllItem) |
---|
2143 | 2284 | { |
---|
2144 | 2285 | StepAll(); |
---|
2145 | 2286 | } else |
---|
2146 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2287 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2147 | 2288 | { |
---|
2148 | 2289 | //int indices[] = jList.getSelectedIndices(); |
---|
2149 | 2290 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2151 | 2292 | |
---|
2152 | 2293 | ClearSelection(false); |
---|
2153 | 2294 | } else |
---|
2154 | | - if (event.getSource() == clearAllItem) |
---|
| 2295 | + if (source == clearAllItem) |
---|
2155 | 2296 | { |
---|
2156 | 2297 | ClearSelection(true); |
---|
2157 | 2298 | } else |
---|
2158 | | - if (event.getSource() == grabItem) |
---|
| 2299 | + if (source == grabItem) |
---|
2159 | 2300 | { |
---|
2160 | 2301 | group(new cGroup(), true); |
---|
2161 | 2302 | } else |
---|
2162 | | - if (event.getSource() == frontItem) |
---|
| 2303 | + if (source == hideItem) |
---|
| 2304 | + { |
---|
| 2305 | + group(new HiddenObject()); |
---|
| 2306 | + } else |
---|
| 2307 | + if (source == frontItem) |
---|
2163 | 2308 | { |
---|
2164 | 2309 | front(); |
---|
2165 | 2310 | } else |
---|
2166 | | - if (event.getSource() == backItem) |
---|
| 2311 | + if (source == backItem) |
---|
2167 | 2312 | { |
---|
2168 | 2313 | back(); |
---|
2169 | 2314 | } else |
---|
2170 | | - if (event.getSource() == cameraItem) |
---|
| 2315 | + if (source == cameraItem) |
---|
2171 | 2316 | { |
---|
2172 | 2317 | makeSomething(new Camera()); |
---|
2173 | 2318 | } else |
---|
2174 | | - if (event.getSource() == compositeItem) |
---|
| 2319 | + if (source == compositeItem) |
---|
2175 | 2320 | { |
---|
2176 | 2321 | group(new Composite()); |
---|
2177 | 2322 | } else |
---|
2178 | | - if (event.getSource() == randomItem) |
---|
| 2323 | + if (source == randomItem) |
---|
2179 | 2324 | { |
---|
2180 | 2325 | RandomNode random = new RandomNode(); |
---|
2181 | 2326 | group(random); |
---|
2182 | 2327 | if (random.size() > 0) |
---|
2183 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2328 | + random.name = random.get(0).name + "Switch"; |
---|
2184 | 2329 | } else |
---|
2185 | | - if (event.getSource() == physicsItem) |
---|
| 2330 | + if (source == physicsItem) |
---|
2186 | 2331 | { |
---|
2187 | 2332 | group(new PhysicsNode()); |
---|
2188 | 2333 | } else |
---|
2189 | | - if (event.getSource() == frameselectorItem) |
---|
| 2334 | + if (source == frameselectorItem) |
---|
2190 | 2335 | { |
---|
2191 | 2336 | for (int i=0; i<group.selection.size(); i++) |
---|
2192 | 2337 | { |
---|
.. | .. |
---|
2198 | 2343 | ResetModel(); |
---|
2199 | 2344 | refreshContents(); |
---|
2200 | 2345 | } else |
---|
2201 | | - if (event.getSource() == switchGeoItem) |
---|
| 2346 | + if (source == switchGeoItem) |
---|
2202 | 2347 | { |
---|
2203 | 2348 | for (int i=0; i<group.selection.size(); i++) |
---|
2204 | 2349 | { |
---|
.. | .. |
---|
2210 | 2355 | ResetModel(); |
---|
2211 | 2356 | refreshContents(); |
---|
2212 | 2357 | } else |
---|
2213 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2358 | + if (source == switchTransfoItem) |
---|
2214 | 2359 | { |
---|
2215 | 2360 | for (int i=0; i<group.selection.size(); i++) |
---|
2216 | 2361 | { |
---|
.. | .. |
---|
2222 | 2367 | ResetModel(); |
---|
2223 | 2368 | refreshContents(); |
---|
2224 | 2369 | } else |
---|
2225 | | - if (event.getSource() == morphItem) |
---|
| 2370 | + if (source == morphItem) |
---|
2226 | 2371 | { |
---|
2227 | 2372 | for (int i=0; i<group.selection.size(); i++) |
---|
2228 | 2373 | { |
---|
.. | .. |
---|
2234 | 2379 | ResetModel(); |
---|
2235 | 2380 | refreshContents(); |
---|
2236 | 2381 | } else |
---|
2237 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2382 | + if (source == scriptNodeItem) |
---|
2238 | 2383 | { |
---|
2239 | 2384 | boolean atleastone = false; |
---|
2240 | 2385 | |
---|
.. | .. |
---|
2273 | 2418 | } |
---|
2274 | 2419 | } |
---|
2275 | 2420 | } else |
---|
2276 | | - if (event.getSource() == linkerItem) |
---|
| 2421 | + if (source == linkerItem) |
---|
2277 | 2422 | { |
---|
2278 | 2423 | group(new cLinker()); |
---|
2279 | 2424 | } else |
---|
2280 | | - if (event.getSource() == textureItem) |
---|
| 2425 | + if (source == textureItem) |
---|
2281 | 2426 | { |
---|
2282 | 2427 | group(new TextureNode()); |
---|
2283 | 2428 | } else |
---|
2284 | | - if (event.getSource() == shadowXItem) |
---|
| 2429 | + if (source == billboardItem) |
---|
| 2430 | + { |
---|
| 2431 | + group(new BillboardNode()); |
---|
| 2432 | + } else |
---|
| 2433 | + if (source == shadowXItem) |
---|
2285 | 2434 | { |
---|
2286 | 2435 | CastShadow(0); |
---|
2287 | 2436 | } else |
---|
2288 | | - if (event.getSource() == shadowYItem) |
---|
| 2437 | + if (source == shadowYItem) |
---|
2289 | 2438 | { |
---|
2290 | 2439 | CastShadow(1); |
---|
2291 | 2440 | } else |
---|
2292 | | - if (event.getSource() == shadowZItem) |
---|
| 2441 | + if (source == shadowZItem) |
---|
2293 | 2442 | { |
---|
2294 | 2443 | CastShadow(2); |
---|
2295 | 2444 | } else |
---|
2296 | | - if (event.getSource() == ungroupItem) |
---|
| 2445 | + if (source == ungroupItem) |
---|
2297 | 2446 | { |
---|
2298 | | - ungroup(); |
---|
| 2447 | + //ungroup(); |
---|
| 2448 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2449 | + { |
---|
| 2450 | + Ungroup(group.selection.get(i)); |
---|
| 2451 | + } |
---|
| 2452 | + |
---|
| 2453 | + ClearSelection(false); |
---|
| 2454 | + |
---|
| 2455 | + refreshContents(); |
---|
2299 | 2456 | } else |
---|
2300 | | - if (event.getSource() == genUVItem) |
---|
| 2457 | + if (source == genUVItem) |
---|
2301 | 2458 | { |
---|
2302 | 2459 | GenUV(); |
---|
2303 | 2460 | } else |
---|
2304 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2461 | + if (source == genNormalsCADItem) |
---|
2305 | 2462 | { |
---|
2306 | 2463 | GenNormals(true); |
---|
2307 | 2464 | } else |
---|
2308 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2465 | + if (source == genNormalsMESHItem) |
---|
| 2466 | + { |
---|
| 2467 | + GenNormals(true); // TODO |
---|
| 2468 | + } else |
---|
| 2469 | + if (source == genNormalsORGANItem) |
---|
2309 | 2470 | { |
---|
2310 | 2471 | GenNormals(false); |
---|
2311 | 2472 | } else |
---|
2312 | | - if (event.getSource() == stripifyItem) |
---|
| 2473 | + if (source == genNormalsMINEItem) |
---|
| 2474 | + { |
---|
| 2475 | + GenNormalsMINE(); |
---|
| 2476 | + } else |
---|
| 2477 | + if (source == stripifyItem) |
---|
2313 | 2478 | { |
---|
2314 | 2479 | Stripify(); |
---|
2315 | 2480 | } else |
---|
2316 | | - if (event.getSource() == unstripifyItem) |
---|
| 2481 | + if (source == unstripifyItem) |
---|
2317 | 2482 | { |
---|
2318 | 2483 | Unstripify(); |
---|
2319 | 2484 | } else |
---|
2320 | | - if (event.getSource() == trimItem) |
---|
| 2485 | + if (source == trimItem) |
---|
2321 | 2486 | { |
---|
2322 | 2487 | Trim(); |
---|
2323 | 2488 | } else |
---|
2324 | | - if (event.getSource() == untrimItem) |
---|
| 2489 | + if (source == untrimItem) |
---|
2325 | 2490 | { |
---|
2326 | 2491 | Untrim(); |
---|
2327 | 2492 | } else |
---|
2328 | | - if (event.getSource() == clearColorsItem) |
---|
| 2493 | + if (source == clearColorsItem) |
---|
2329 | 2494 | { |
---|
2330 | 2495 | ClearColors(); |
---|
2331 | 2496 | } else |
---|
2332 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2497 | + if (source == clearMaterialsItem) |
---|
2333 | 2498 | { |
---|
2334 | 2499 | ClearMaterials(); |
---|
2335 | 2500 | } else |
---|
2336 | | - if (event.getSource() == liveleavesItem) |
---|
| 2501 | + if (source == liveleavesItem) |
---|
2337 | 2502 | { |
---|
2338 | 2503 | LiveLeaves(true); |
---|
2339 | 2504 | } else |
---|
2340 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2505 | + if (source == unliveleavesItem) |
---|
2341 | 2506 | { |
---|
2342 | 2507 | LiveLeaves(false); |
---|
2343 | 2508 | } else |
---|
2344 | | - if (event.getSource() == supportleavesItem) |
---|
| 2509 | + if (source == supportleavesItem) |
---|
2345 | 2510 | { |
---|
2346 | 2511 | SupportLeaves(true); |
---|
2347 | 2512 | } else |
---|
2348 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2513 | + if (source == unsupportleavesItem) |
---|
2349 | 2514 | { |
---|
2350 | 2515 | SupportLeaves(false); |
---|
2351 | 2516 | } else |
---|
2352 | | - if (event.getSource() == hideleavesItem) |
---|
| 2517 | + if (source == hideleavesItem) |
---|
2353 | 2518 | { |
---|
2354 | 2519 | HideLeaves(true); |
---|
2355 | 2520 | } else |
---|
2356 | | - if (event.getSource() == showleavesItem) |
---|
| 2521 | + if (source == showleavesItem) |
---|
2357 | 2522 | { |
---|
2358 | 2523 | HideLeaves(false); |
---|
2359 | 2524 | } else |
---|
2360 | | - if (event.getSource() == markleavesItem) |
---|
| 2525 | + if (source == markleavesItem) |
---|
2361 | 2526 | { |
---|
2362 | 2527 | MarkLeaves(true); |
---|
2363 | 2528 | } else |
---|
2364 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2529 | + if (source == unmarkleavesItem) |
---|
2365 | 2530 | { |
---|
2366 | 2531 | MarkLeaves(false); |
---|
2367 | 2532 | } else |
---|
2368 | | - if (event.getSource() == flipVItem) |
---|
| 2533 | + if (source == flipVItem) |
---|
2369 | 2534 | { |
---|
2370 | 2535 | FlipV(true); |
---|
2371 | 2536 | } else |
---|
2372 | | - if (event.getSource() == unflipVItem) |
---|
| 2537 | + if (source == unflipVItem) |
---|
2373 | 2538 | { |
---|
2374 | 2539 | FlipV(false); |
---|
2375 | 2540 | } else |
---|
2376 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2541 | + if (source == lowTexturesItem) |
---|
2377 | 2542 | { |
---|
2378 | 2543 | SetTexRes(0); |
---|
2379 | 2544 | } else |
---|
2380 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2545 | + if (source == normalTexturesItem) |
---|
2381 | 2546 | { |
---|
2382 | 2547 | SetTexRes(1); |
---|
2383 | 2548 | } else |
---|
2384 | | - if (event.getSource() == highTexturesItem) |
---|
| 2549 | + if (source == highTexturesItem) |
---|
2385 | 2550 | { |
---|
2386 | 2551 | SetTexRes(2); |
---|
2387 | 2552 | } else |
---|
2388 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2553 | + if (source == veryhighTexturesItem) |
---|
2389 | 2554 | { |
---|
2390 | 2555 | SetTexRes(3); |
---|
2391 | 2556 | } else |
---|
2392 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2557 | + if (source == maxTexturesItem) |
---|
2393 | 2558 | { |
---|
2394 | 2559 | SetTexRes(4); |
---|
2395 | 2560 | } else |
---|
2396 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2561 | + if (source == panoTexturesItem) |
---|
2397 | 2562 | { |
---|
2398 | 2563 | SetTexRes(5); |
---|
2399 | 2564 | } else |
---|
2400 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2565 | + if (source == reverseNormalsItem) |
---|
2401 | 2566 | { |
---|
2402 | 2567 | ReverseNormals(); |
---|
2403 | 2568 | } else |
---|
2404 | | - if (event.getSource() == parseverticesItem) |
---|
| 2569 | + if (source == parseverticesItem) |
---|
2405 | 2570 | { |
---|
2406 | 2571 | ParseVertices(); |
---|
2407 | 2572 | } else |
---|
2408 | | - if (event.getSource() == textureFieldItem) |
---|
| 2573 | + if (source == textureFieldItem) |
---|
2409 | 2574 | { |
---|
2410 | 2575 | TextureVertices(); |
---|
2411 | 2576 | } else |
---|
2412 | | - if (event.getSource() == alignItem) |
---|
| 2577 | + if (source == alignItem) |
---|
2413 | 2578 | { |
---|
2414 | 2579 | Align(); |
---|
2415 | 2580 | } else |
---|
2416 | | - if (event.getSource() == mirrorItem) |
---|
| 2581 | + if (source == mirrorItem) |
---|
2417 | 2582 | { |
---|
2418 | 2583 | MirrorPoses(); |
---|
2419 | 2584 | } else |
---|
2420 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2585 | + if (source == reduceMorphItem) |
---|
2421 | 2586 | { |
---|
2422 | 2587 | MeshReduction(false); |
---|
2423 | 2588 | } else |
---|
2424 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2589 | + if (source == reduce34MorphItem) |
---|
2425 | 2590 | { |
---|
2426 | 2591 | MeshReduction(true); |
---|
2427 | 2592 | } else |
---|
2428 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2593 | + if (source == reverseTrianglesItem) |
---|
2429 | 2594 | { |
---|
2430 | 2595 | ReverseTriangles(); |
---|
2431 | 2596 | } else |
---|
2432 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2597 | + if (source == reduceMeshItem) |
---|
2433 | 2598 | { |
---|
2434 | 2599 | ReduceMesh(false); |
---|
2435 | 2600 | } else |
---|
2436 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2601 | + if (source == reduce34MeshItem) |
---|
2437 | 2602 | { |
---|
2438 | 2603 | ReduceMesh(true); |
---|
2439 | 2604 | } else |
---|
2440 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2605 | + if (source == increaseMeshItem) |
---|
2441 | 2606 | { |
---|
2442 | 2607 | IncreaseMesh(); |
---|
2443 | 2608 | } else |
---|
2444 | | - if (event.getSource() == clipMeshItem) |
---|
| 2609 | + if (source == clipMeshItem) |
---|
2445 | 2610 | { |
---|
2446 | 2611 | ClipMesh(); |
---|
2447 | 2612 | } else |
---|
2448 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2613 | + if (source == smoothMeshItem) |
---|
2449 | 2614 | { |
---|
2450 | 2615 | SmoothMesh(); |
---|
2451 | 2616 | } else |
---|
2452 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2617 | + if (source == transformgeometryItem) |
---|
2453 | 2618 | { |
---|
2454 | 2619 | TransformGeometry(); |
---|
2455 | 2620 | } else |
---|
2456 | | - if (event.getSource() == resetTransformItem) |
---|
| 2621 | + if (source == resetTransformItem) |
---|
2457 | 2622 | { |
---|
2458 | 2623 | ResetTransform(); |
---|
2459 | 2624 | } else |
---|
2460 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2625 | + if (source == resetCentroidItem) |
---|
2461 | 2626 | { |
---|
2462 | 2627 | ResetCentroid(); |
---|
2463 | 2628 | } else |
---|
2464 | | - if (event.getSource() == resetParentItem) |
---|
| 2629 | + if (source == resetParentItem) |
---|
2465 | 2630 | { |
---|
2466 | 2631 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2467 | 2632 | { |
---|
.. | .. |
---|
2471 | 2636 | |
---|
2472 | 2637 | refreshContents(); |
---|
2473 | 2638 | } else |
---|
2474 | | - if (event.getSource() == repairParentItem) |
---|
| 2639 | + if (source == repairParentItem) |
---|
2475 | 2640 | { |
---|
2476 | 2641 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2477 | 2642 | { |
---|
.. | .. |
---|
2485 | 2650 | |
---|
2486 | 2651 | refreshContents(); |
---|
2487 | 2652 | } else |
---|
2488 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2653 | + if (source == repairShadowItem) |
---|
| 2654 | + { |
---|
| 2655 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2656 | + { |
---|
| 2657 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2658 | + obj.RepairShadow(); |
---|
| 2659 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2660 | +// { |
---|
| 2661 | +// obj.get(i).parent = obj; |
---|
| 2662 | +// } |
---|
| 2663 | + } |
---|
| 2664 | + |
---|
| 2665 | + refreshContents(); |
---|
| 2666 | + } else |
---|
| 2667 | + if (source == sortbysizeItem) |
---|
2489 | 2668 | { |
---|
2490 | 2669 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2491 | 2670 | { |
---|
.. | .. |
---|
2497 | 2676 | ResetModel(); |
---|
2498 | 2677 | refreshContents(); |
---|
2499 | 2678 | } else |
---|
2500 | | - if (event.getSource() == sortbynameItem) |
---|
| 2679 | + if (source == sortbynameItem) |
---|
2501 | 2680 | { |
---|
2502 | 2681 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2503 | 2682 | { |
---|
.. | .. |
---|
2509 | 2688 | ResetModel(); |
---|
2510 | 2689 | refreshContents(); |
---|
2511 | 2690 | } else |
---|
2512 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2691 | + if (source == attachPigmentItem) |
---|
2513 | 2692 | { |
---|
2514 | 2693 | String texture = GetFile("Attach pigment"); |
---|
2515 | 2694 | Object3D obj; |
---|
.. | .. |
---|
2521 | 2700 | |
---|
2522 | 2701 | refreshContents(); |
---|
2523 | 2702 | } else |
---|
2524 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2703 | + if (source == detachPigmentItem) |
---|
2525 | 2704 | { |
---|
2526 | 2705 | Object3D obj; |
---|
2527 | 2706 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2532 | 2711 | |
---|
2533 | 2712 | refreshContents(); |
---|
2534 | 2713 | } else |
---|
2535 | | - if (event.getSource() == attachBumpItem) |
---|
| 2714 | + if (source == attachBumpItem) |
---|
2536 | 2715 | { |
---|
2537 | 2716 | String texture = GetFile("Attach bump"); |
---|
2538 | 2717 | Object3D obj; |
---|
.. | .. |
---|
2544 | 2723 | |
---|
2545 | 2724 | refreshContents(); |
---|
2546 | 2725 | } else |
---|
2547 | | - if (event.getSource() == detachBumpItem) |
---|
| 2726 | + if (source == detachBumpItem) |
---|
2548 | 2727 | { |
---|
2549 | 2728 | Object3D obj; |
---|
2550 | 2729 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2555 | 2734 | |
---|
2556 | 2735 | refreshContents(); |
---|
2557 | 2736 | } else |
---|
2558 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2737 | + if (source == pigmentBumpItem) |
---|
2559 | 2738 | { |
---|
2560 | 2739 | Object3D obj; |
---|
2561 | 2740 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2566 | 2745 | |
---|
2567 | 2746 | refreshContents(); |
---|
2568 | 2747 | } else |
---|
2569 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2748 | + if (source == flashSelectionButton) |
---|
2570 | 2749 | { |
---|
2571 | 2750 | CameraPane.flash = true; |
---|
2572 | 2751 | refreshContents(); |
---|
2573 | 2752 | } else |
---|
2574 | | - if (event.getSource() == oneButton) |
---|
| 2753 | + if (source == oneButton) |
---|
2575 | 2754 | { |
---|
2576 | 2755 | } else |
---|
2577 | | - if (event.getSource() == twoButton) |
---|
| 2756 | + if (source == twoButton) |
---|
2578 | 2757 | { |
---|
2579 | 2758 | radio.layout = twoButton; |
---|
2580 | 2759 | // bug |
---|
2581 | 2760 | //gridPanel.setDividerLocation(1.0); |
---|
2582 | 2761 | //bigPanel.setDividerLocation(0.0); |
---|
2583 | | - bigThree.remove(jtp); |
---|
2584 | | - bigThree.remove(cameraPanel); |
---|
2585 | | - bigThree.remove(XYZPanel); |
---|
2586 | | - aWindowConstraints.gridx = 0; |
---|
2587 | | - aWindowConstraints.gridy = 0; |
---|
2588 | | - aWindowConstraints.gridwidth = 1; |
---|
2589 | | - // aConstraints.gridheight = 3; |
---|
2590 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2591 | | - aWindowConstraints.weightx = 0; |
---|
2592 | | - aWindowConstraints.weighty = 1; |
---|
2593 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2594 | | - aWindowConstraints.weightx = 1; |
---|
2595 | | - aWindowConstraints.gridwidth = 3; |
---|
2596 | | - // aConstraints.gridheight = 3; |
---|
2597 | | - aWindowConstraints.gridx = 1; |
---|
2598 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2599 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2600 | | - aWindowConstraints.weightx = 0; |
---|
2601 | | - aWindowConstraints.gridx = 4; |
---|
2602 | | - aWindowConstraints.gridwidth = 1; |
---|
2603 | | - // aConstraints.gridheight = 3; |
---|
2604 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2605 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2606 | | - bigThree.revalidate(); |
---|
| 2762 | +// bigThree.remove(scenePanel); |
---|
| 2763 | +// bigThree.remove(centralPanel); |
---|
| 2764 | +// bigThree.remove(XYZPanel); |
---|
| 2765 | +// aWindowConstraints.gridx = 0; |
---|
| 2766 | +// aWindowConstraints.gridy = 0; |
---|
| 2767 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2768 | +// // aConstraints.gridheight = 3; |
---|
| 2769 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2770 | +// aWindowConstraints.weightx = 0; |
---|
| 2771 | +// aWindowConstraints.weighty = 1; |
---|
| 2772 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2773 | +// aWindowConstraints.weightx = 1; |
---|
| 2774 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2775 | +// // aConstraints.gridheight = 3; |
---|
| 2776 | +// aWindowConstraints.gridx = 1; |
---|
| 2777 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2778 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2779 | +// aWindowConstraints.weightx = 0; |
---|
| 2780 | +// aWindowConstraints.gridx = 4; |
---|
| 2781 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2782 | +// // aConstraints.gridheight = 3; |
---|
| 2783 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2784 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2785 | +// scenePanel.setVisible(false); |
---|
| 2786 | +// centralPanel.setVisible(true); |
---|
| 2787 | +// XYZPanel.setVisible(false); |
---|
| 2788 | + bigThree.ClearUI(); |
---|
| 2789 | + bigThree.add(centralPanel); |
---|
| 2790 | + bigThree.FlushUI(); |
---|
2607 | 2791 | } else |
---|
2608 | | - if (event.getSource() == threeButton) |
---|
| 2792 | + if (source == threeButton) |
---|
2609 | 2793 | { |
---|
2610 | 2794 | radio.layout = threeButton; |
---|
2611 | | - bigThree.remove(jtp); |
---|
2612 | | - bigThree.remove(cameraPanel); |
---|
2613 | | - bigThree.remove(XYZPanel); |
---|
2614 | | - aWindowConstraints.gridx = 0; |
---|
2615 | | - aWindowConstraints.gridy = 0; |
---|
2616 | | - aWindowConstraints.gridwidth = 1; |
---|
2617 | | - // aConstraints.gridheight = 3; |
---|
2618 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2619 | | - aWindowConstraints.weightx = 0; |
---|
2620 | | - aWindowConstraints.weighty = 1; |
---|
2621 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2622 | | - aWindowConstraints.weightx = 1; |
---|
2623 | | - aWindowConstraints.gridwidth = 3; |
---|
2624 | | - // aConstraints.gridheight = 3; |
---|
2625 | | - aWindowConstraints.gridx = 1; |
---|
2626 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2627 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2628 | | - aWindowConstraints.weightx = 0; |
---|
2629 | | - aWindowConstraints.gridx = 4; |
---|
2630 | | - aWindowConstraints.gridwidth = 1; |
---|
2631 | | - // aConstraints.gridheight = 3; |
---|
2632 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2633 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2634 | | - bigThree.revalidate(); |
---|
| 2795 | + |
---|
| 2796 | +// bigThree.remove(scenePanel); |
---|
| 2797 | +// bigThree.remove(centralPanel); |
---|
| 2798 | +// bigThree.remove(XYZPanel); |
---|
| 2799 | +// aWindowConstraints.gridx = 0; |
---|
| 2800 | +// aWindowConstraints.gridy = 0; |
---|
| 2801 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2802 | +// // aConstraints.gridheight = 3; |
---|
| 2803 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2804 | +// aWindowConstraints.weightx = 0; |
---|
| 2805 | +// aWindowConstraints.weighty = 1; |
---|
| 2806 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2807 | +// aWindowConstraints.weightx = 1; |
---|
| 2808 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2809 | +// // aConstraints.gridheight = 3; |
---|
| 2810 | +// aWindowConstraints.gridx = 1; |
---|
| 2811 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2812 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2813 | +// aWindowConstraints.weightx = 0; |
---|
| 2814 | +// aWindowConstraints.gridx = 4; |
---|
| 2815 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2816 | +// // aConstraints.gridheight = 3; |
---|
| 2817 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2818 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2819 | +// bigThree.validate(); |
---|
| 2820 | +// scenePanel.setVisible(false); |
---|
| 2821 | +// centralPanel.setVisible(true); |
---|
| 2822 | +// XYZPanel.setVisible(true); |
---|
| 2823 | + bigThree.ClearUI(); |
---|
| 2824 | + bigThree.add(centralPanel); |
---|
| 2825 | + bigThree.add(XYZPanel); |
---|
| 2826 | + bigThree.FlushUI(); |
---|
2635 | 2827 | } else |
---|
2636 | | - if (event.getSource() == fourButton) |
---|
| 2828 | + if (source == fourButton) |
---|
2637 | 2829 | { |
---|
2638 | 2830 | radio.layout = fourButton; |
---|
2639 | | - bigThree.remove(jtp); |
---|
2640 | | - bigThree.remove(cameraPanel); |
---|
2641 | | - bigThree.remove(XYZPanel); |
---|
2642 | | - aWindowConstraints.gridx = 0; |
---|
2643 | | - aWindowConstraints.gridy = 0; |
---|
2644 | | - aWindowConstraints.gridwidth = 1; |
---|
2645 | | - // aWindowConstraints.gridheight = 3; |
---|
2646 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2647 | | - aWindowConstraints.weightx = 1; |
---|
2648 | | - aWindowConstraints.weighty = 1; |
---|
2649 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2650 | | - aWindowConstraints.weightx = 1; |
---|
2651 | | - aWindowConstraints.gridwidth = 3; |
---|
2652 | | - // aConstraints.gridheight = 3; |
---|
2653 | | - aWindowConstraints.gridx = 1; |
---|
2654 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2655 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2656 | | - aWindowConstraints.weightx = 0; |
---|
2657 | | - aWindowConstraints.gridx = 4; |
---|
2658 | | - aWindowConstraints.gridwidth = 1; |
---|
2659 | | - // aWindowConstraints.gridheight = 3; |
---|
2660 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2661 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2662 | | - bigThree.revalidate(); |
---|
| 2831 | + |
---|
| 2832 | +// bigThree.remove(scenePanel); |
---|
| 2833 | +// bigThree.remove(centralPanel); |
---|
| 2834 | +// bigThree.remove(XYZPanel); |
---|
| 2835 | +// aWindowConstraints.gridx = 0; |
---|
| 2836 | +// aWindowConstraints.gridy = 0; |
---|
| 2837 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2838 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2839 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2840 | +// aWindowConstraints.weightx = 1; |
---|
| 2841 | +// aWindowConstraints.weighty = 1; |
---|
| 2842 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2843 | +// aWindowConstraints.weightx = 1; |
---|
| 2844 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2845 | +// // aConstraints.gridheight = 3; |
---|
| 2846 | +// aWindowConstraints.gridx = 1; |
---|
| 2847 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2848 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2849 | +// aWindowConstraints.weightx = 0; |
---|
| 2850 | +// aWindowConstraints.gridx = 4; |
---|
| 2851 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2852 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2853 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2854 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2855 | +// bigThree.validate(); |
---|
| 2856 | +// scenePanel.setVisible(true); |
---|
| 2857 | +// centralPanel.setVisible(false); |
---|
| 2858 | +// XYZPanel.setVisible(false); |
---|
| 2859 | + bigThree.ClearUI(); |
---|
| 2860 | + bigThree.add(scenePanel); |
---|
| 2861 | + bigThree.FlushUI(); |
---|
2663 | 2862 | } else |
---|
2664 | | - if (event.getSource() == sixButton) |
---|
| 2863 | + if (source == sixButton) |
---|
2665 | 2864 | { |
---|
2666 | 2865 | radio.layout = sixButton; |
---|
2667 | | - bigThree.remove(jtp); |
---|
2668 | | - bigThree.remove(cameraPanel); |
---|
2669 | | - bigThree.remove(XYZPanel); |
---|
2670 | | - aWindowConstraints.gridx = 0; |
---|
2671 | | - aWindowConstraints.gridy = 0; |
---|
2672 | | - aWindowConstraints.gridwidth = 1; |
---|
2673 | | - // aConstraints.gridheight = 3; |
---|
2674 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2675 | | - aWindowConstraints.weightx = 0; |
---|
2676 | | - aWindowConstraints.weighty = 1; |
---|
2677 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2678 | | - aWindowConstraints.weightx = 1; |
---|
2679 | | - aWindowConstraints.gridwidth = 3; |
---|
2680 | | - // aWindowConstraints.gridheight = 3; |
---|
2681 | | - aWindowConstraints.gridx = 1; |
---|
2682 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2683 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2684 | | - aWindowConstraints.weightx = 0; |
---|
2685 | | - aWindowConstraints.gridx = 4; |
---|
2686 | | - aWindowConstraints.gridwidth = 1; |
---|
2687 | | - // aWindowConstraints.gridheight = 3; |
---|
2688 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2689 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2690 | | - bigThree.revalidate(); |
---|
| 2866 | + |
---|
| 2867 | +// bigThree.remove(scenePanel); |
---|
| 2868 | +// bigThree.remove(centralPanel); |
---|
| 2869 | +// bigThree.remove(XYZPanel); |
---|
| 2870 | +// aWindowConstraints.gridx = 0; |
---|
| 2871 | +// aWindowConstraints.gridy = 0; |
---|
| 2872 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2873 | +// // aConstraints.gridheight = 3; |
---|
| 2874 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2875 | +// aWindowConstraints.weightx = 0; |
---|
| 2876 | +// aWindowConstraints.weighty = 1; |
---|
| 2877 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2878 | +// aWindowConstraints.weightx = 1; |
---|
| 2879 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2880 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2881 | +// aWindowConstraints.gridx = 1; |
---|
| 2882 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2883 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2884 | +// aWindowConstraints.weightx = 0; |
---|
| 2885 | +// aWindowConstraints.gridx = 4; |
---|
| 2886 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2887 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2888 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2889 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2890 | +// bigThree.validate(); |
---|
| 2891 | +// scenePanel.setVisible(true); |
---|
| 2892 | +// centralPanel.setVisible(true); |
---|
| 2893 | +// XYZPanel.setVisible(false); |
---|
| 2894 | + bigThree.ClearUI(); |
---|
| 2895 | + bigThree.add(scenePanel); |
---|
| 2896 | + bigThree.add(centralPanel); |
---|
| 2897 | + bigThree.FlushUI(); |
---|
2691 | 2898 | } else |
---|
2692 | | - if (event.getSource() == sevenButton) |
---|
| 2899 | + if (source == sevenButton) |
---|
2693 | 2900 | { |
---|
2694 | 2901 | radio.layout = sevenButton; |
---|
2695 | | - bigThree.remove(jtp); |
---|
2696 | | - bigThree.remove(cameraPanel); |
---|
2697 | | - bigThree.remove(XYZPanel); |
---|
2698 | | - aWindowConstraints.gridx = 0; |
---|
2699 | | - aWindowConstraints.gridy = 0; |
---|
2700 | | - aWindowConstraints.gridwidth = 1; |
---|
2701 | | - // aWindowConstraints.gridheight = 3; |
---|
2702 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2703 | | - aWindowConstraints.weightx = 0; |
---|
2704 | | - aWindowConstraints.weighty = 1; |
---|
2705 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2706 | | - aWindowConstraints.weightx = 1; |
---|
2707 | | - aWindowConstraints.gridwidth = 3; |
---|
2708 | | - // aWindowConstraints.gridheight = 3; |
---|
2709 | | - aWindowConstraints.gridx = 1; |
---|
2710 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2711 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2712 | | - aWindowConstraints.weightx = 0; |
---|
2713 | | - aWindowConstraints.gridx = 4; |
---|
2714 | | - aWindowConstraints.gridwidth = 1; |
---|
2715 | | - // aConstraints.gridheight = 3; |
---|
2716 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2717 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2718 | | - bigThree.revalidate(); |
---|
| 2902 | + |
---|
| 2903 | +// bigThree.remove(scenePanel); |
---|
| 2904 | +// bigThree.remove(centralPanel); |
---|
| 2905 | +// bigThree.remove(XYZPanel); |
---|
| 2906 | +// aWindowConstraints.gridx = 0; |
---|
| 2907 | +// aWindowConstraints.gridy = 0; |
---|
| 2908 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2909 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2910 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2911 | +// aWindowConstraints.weightx = 0; |
---|
| 2912 | +// aWindowConstraints.weighty = 1; |
---|
| 2913 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2914 | +// aWindowConstraints.weightx = 1; |
---|
| 2915 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2916 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2917 | +// aWindowConstraints.gridx = 1; |
---|
| 2918 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2919 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2920 | +// aWindowConstraints.weightx = 0; |
---|
| 2921 | +// aWindowConstraints.gridx = 4; |
---|
| 2922 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2923 | +// // aConstraints.gridheight = 3; |
---|
| 2924 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2925 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2926 | +// bigThree.validate(); |
---|
| 2927 | +// scenePanel.setVisible(true); |
---|
| 2928 | +// centralPanel.setVisible(true); |
---|
| 2929 | +// XYZPanel.setVisible(true); |
---|
| 2930 | + bigThree.ClearUI(); |
---|
| 2931 | + bigThree.add(scenePanel); |
---|
| 2932 | + bigThree.add(centralPanel); |
---|
| 2933 | + bigThree.add(XYZPanel); |
---|
| 2934 | + bigThree.FlushUI(); |
---|
2719 | 2935 | } else |
---|
2720 | | - if (event.getSource() == rootButton) |
---|
| 2936 | + if (source == rootButton) |
---|
2721 | 2937 | { |
---|
2722 | 2938 | Object3D obj; |
---|
2723 | 2939 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2729 | 2945 | |
---|
2730 | 2946 | refreshContents(true); |
---|
2731 | 2947 | } else |
---|
2732 | | - if (event.getSource() == closeButton) |
---|
| 2948 | + if (source == closeButton) |
---|
2733 | 2949 | { |
---|
2734 | 2950 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2735 | 2951 | cRadio ab; |
---|
.. | .. |
---|
2750 | 2966 | } |
---|
2751 | 2967 | refreshContents(true); |
---|
2752 | 2968 | } else |
---|
2753 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2969 | + if (source == editItem || source == editButton) |
---|
2754 | 2970 | { |
---|
2755 | 2971 | EditSelection(false); |
---|
2756 | 2972 | } else |
---|
2757 | | - if (event.getSource() == uneditButton) |
---|
| 2973 | + if (source == uneditButton) |
---|
2758 | 2974 | { |
---|
2759 | 2975 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2760 | 2976 | { |
---|
.. | .. |
---|
2766 | 2982 | |
---|
2767 | 2983 | child.editWindow = null; // ??????????? |
---|
2768 | 2984 | } |
---|
2769 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2985 | + objEditor.ctrlPanel.FlushUI(); |
---|
2770 | 2986 | //objEditor.jTree.clearSelection(); |
---|
2771 | 2987 | //objEditor.ResetSliders(); |
---|
2772 | 2988 | refreshContents(true); |
---|
2773 | 2989 | } else |
---|
2774 | | - if (event.getSource() == clearPanelButton) |
---|
| 2990 | + if (source == clearPanelButton) |
---|
2775 | 2991 | { |
---|
2776 | 2992 | assert(copy == group); |
---|
2777 | 2993 | //copy.ClearUI(); |
---|
.. | .. |
---|
2782 | 2998 | listUI.clear(); |
---|
2783 | 2999 | refreshContents(true); |
---|
2784 | 3000 | } else |
---|
2785 | | - if (event.getSource() == allParamsButton) |
---|
| 3001 | + if (source == allParamsButton) |
---|
2786 | 3002 | { |
---|
2787 | 3003 | assert(copy == group); |
---|
2788 | 3004 | |
---|
.. | .. |
---|
2803 | 3019 | |
---|
2804 | 3020 | refreshContents(true); |
---|
2805 | 3021 | } else |
---|
2806 | | - if (event.getSource() == unselectButton) |
---|
| 3022 | + if (source == unselectButton) |
---|
2807 | 3023 | { |
---|
2808 | 3024 | objEditor.jTree.clearSelection(); |
---|
2809 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 3025 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2810 | 3026 | objEditor.ResetSliders(); |
---|
2811 | 3027 | refreshContents(true); |
---|
2812 | 3028 | } else |
---|
2813 | | - if(event.getSource() instanceof cRadio) |
---|
| 3029 | + if(source instanceof cRadio) |
---|
2814 | 3030 | { |
---|
2815 | 3031 | group.parent = keepparent; |
---|
2816 | 3032 | group.attributes = 0; |
---|
2817 | 3033 | //group.editWindow = null; |
---|
2818 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 3034 | + /*cRadio*/ radio = (cRadio)source; |
---|
2819 | 3035 | Object3D obj = radio.GetObject(); |
---|
2820 | 3036 | System.out.println("Edit " + obj); |
---|
2821 | 3037 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2835 | 3051 | } |
---|
2836 | 3052 | |
---|
2837 | 3053 | copy = group; |
---|
2838 | | - //CameraPane.theRenderer.object = group; |
---|
| 3054 | + //Globals.theRenderer.object = group; |
---|
2839 | 3055 | if(!useclient) |
---|
2840 | 3056 | { |
---|
2841 | 3057 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2844 | 3060 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2845 | 3061 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2846 | 3062 | cameraView.object = group; |
---|
2847 | | - cameraView.lighttouched = true; |
---|
| 3063 | + //cameraView.lighttouched = true; |
---|
| 3064 | + Globals.lighttouched = true; |
---|
2848 | 3065 | topView.object = group; |
---|
2849 | 3066 | frontView.object = group; |
---|
2850 | 3067 | sideView.object = group; |
---|
.. | .. |
---|
2880 | 3097 | if (useclient) |
---|
2881 | 3098 | { |
---|
2882 | 3099 | cameraView.object = client; |
---|
2883 | | - cameraView.lighttouched = true; |
---|
| 3100 | + Globals.lighttouched = true; |
---|
2884 | 3101 | //topView.object = client; |
---|
2885 | 3102 | //frontView.object = client; |
---|
2886 | 3103 | //sideView.object = client; |
---|
.. | .. |
---|
2888 | 3105 | else |
---|
2889 | 3106 | { |
---|
2890 | 3107 | cameraView.object = group; |
---|
2891 | | - cameraView.lighttouched = true; |
---|
| 3108 | + Globals.lighttouched = true; |
---|
2892 | 3109 | //topView.object = group; |
---|
2893 | 3110 | //frontView.object = group; |
---|
2894 | 3111 | //sideView.object = group; |
---|
.. | .. |
---|
3121 | 3338 | obj = (Object3D)e.nextElement(); |
---|
3122 | 3339 | |
---|
3123 | 3340 | System.out.println("Object is: " + obj); |
---|
3124 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3341 | + GrafreeD.AnalyzeObject(obj); |
---|
3125 | 3342 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3126 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3343 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3127 | 3344 | |
---|
3128 | 3345 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3129 | 3346 | } |
---|
.. | .. |
---|
3165 | 3382 | void GenNormals(boolean crease) |
---|
3166 | 3383 | { |
---|
3167 | 3384 | group.GenNormalsS(crease); |
---|
| 3385 | + |
---|
| 3386 | + refreshContents(); |
---|
| 3387 | + } |
---|
| 3388 | + |
---|
| 3389 | + void GenNormalsMINE() |
---|
| 3390 | + { |
---|
| 3391 | + group.selection.GenNormalsMINE(); |
---|
3168 | 3392 | |
---|
3169 | 3393 | refreshContents(); |
---|
3170 | 3394 | } |
---|
.. | .. |
---|
3250 | 3474 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3251 | 3475 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3252 | 3476 | // |
---|
3253 | | -// g.add(GraphreeD.clipboard); |
---|
| 3477 | +// g.add(GrafreeD.clipboard); |
---|
3254 | 3478 | // |
---|
3255 | 3479 | // buffer.add(g); |
---|
3256 | 3480 | // } |
---|
.. | .. |
---|
3269 | 3493 | // nodes = new Object3D(); |
---|
3270 | 3494 | // vertices = new Vector<Vertex>(); |
---|
3271 | 3495 | // |
---|
3272 | | -// boolean epsequal = GraphreeD.epsequal; |
---|
3273 | | -// GraphreeD.epsequal = true; |
---|
| 3496 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3497 | +// GrafreeD.epsequal = true; |
---|
3274 | 3498 | // |
---|
3275 | 3499 | // for (int i=0; i<group.selection.size(); i++) |
---|
3276 | 3500 | // { |
---|
.. | .. |
---|
3311 | 3535 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3312 | 3536 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3313 | 3537 | // |
---|
3314 | | -// g.add(GraphreeD.clipboard); |
---|
| 3538 | +// g.add(GrafreeD.clipboard); |
---|
3315 | 3539 | // |
---|
3316 | 3540 | // buffer.add(g); |
---|
3317 | 3541 | // } |
---|
.. | .. |
---|
3319 | 3543 | // makeSomething(buffer, i==group.selection.size()-1); |
---|
3320 | 3544 | // } |
---|
3321 | 3545 | // |
---|
3322 | | -// GraphreeD.epsequal = epsequal; |
---|
| 3546 | +// GrafreeD.epsequal = epsequal; |
---|
3323 | 3547 | // |
---|
3324 | 3548 | // //buffer = null; |
---|
3325 | 3549 | // temprep = null; |
---|
.. | .. |
---|
3330 | 3554 | |
---|
3331 | 3555 | void ParseVertices() |
---|
3332 | 3556 | { |
---|
3333 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3334 | | - GraphreeD.epsequal = true; |
---|
| 3557 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3558 | + GrafreeD.epsequal = true; |
---|
3335 | 3559 | |
---|
3336 | 3560 | for (int i=0; i<group.selection.size(); i++) |
---|
3337 | 3561 | { |
---|
.. | .. |
---|
3356 | 3580 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3357 | 3581 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3358 | 3582 | |
---|
3359 | | - g.add(GraphreeD.clipboard); |
---|
| 3583 | + g.add(GrafreeD.clipboard); |
---|
3360 | 3584 | |
---|
3361 | 3585 | buffer.add(g); |
---|
3362 | 3586 | } |
---|
.. | .. |
---|
3371 | 3595 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3372 | 3596 | } |
---|
3373 | 3597 | |
---|
3374 | | - GraphreeD.epsequal = epsequal; |
---|
| 3598 | + GrafreeD.epsequal = epsequal; |
---|
3375 | 3599 | |
---|
3376 | 3600 | refreshContents(); |
---|
3377 | 3601 | } |
---|
.. | .. |
---|
3389 | 3613 | String pigment = Object3D.GetPigment(tex); |
---|
3390 | 3614 | //String bump = Object3D.GetBump(tex); |
---|
3391 | 3615 | |
---|
3392 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3616 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
3393 | 3617 | |
---|
3394 | 3618 | double s = v.s; |
---|
3395 | 3619 | |
---|
.. | .. |
---|
3416 | 3640 | scale /= 3; |
---|
3417 | 3641 | |
---|
3418 | 3642 | scale /= 0xFF; |
---|
3419 | | - scale /= 4; |
---|
| 3643 | + // c'est quoi ca? scale /= 4; |
---|
3420 | 3644 | |
---|
3421 | 3645 | //v.AO = scale; |
---|
3422 | 3646 | |
---|
.. | .. |
---|
3437 | 3661 | |
---|
3438 | 3662 | void Align() |
---|
3439 | 3663 | { |
---|
| 3664 | + if (group.selection.size() == 0) |
---|
| 3665 | + return; |
---|
| 3666 | + |
---|
| 3667 | + cVector bbmin = new cVector(); |
---|
| 3668 | + cVector bbmax = new cVector(); |
---|
| 3669 | + |
---|
| 3670 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3671 | + |
---|
| 3672 | + double dx = bbmax.x - bbmin.x; |
---|
| 3673 | + double dy = bbmax.y - bbmin.y; |
---|
| 3674 | + double dz = bbmax.z - bbmin.z; |
---|
| 3675 | + |
---|
| 3676 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3677 | + |
---|
3440 | 3678 | for (int i=0; i<group.selection.size(); i++) |
---|
3441 | 3679 | { |
---|
3442 | 3680 | Object3D obj = group.selection.get(i); |
---|
3443 | 3681 | |
---|
3444 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3445 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3682 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3683 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3446 | 3684 | } |
---|
3447 | 3685 | |
---|
3448 | 3686 | refreshContents(); |
---|
.. | .. |
---|
3455 | 3693 | // ref.SaveSupports(); |
---|
3456 | 3694 | // Object3D par = ref.parent; |
---|
3457 | 3695 | // ref.parent = null; |
---|
3458 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3696 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3459 | 3697 | // ref.parent = par; |
---|
3460 | 3698 | // ref.RestoreSupports(); |
---|
3461 | 3699 | |
---|
.. | .. |
---|
3463 | 3701 | |
---|
3464 | 3702 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3465 | 3703 | |
---|
3466 | | - boolean random = CameraPane.RANDOM; |
---|
3467 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3704 | + boolean random = CameraPane.SWITCH; |
---|
| 3705 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3468 | 3706 | lowres.linkVerticesThis(null); |
---|
3469 | 3707 | lowres.linkVerticesThis(sn); |
---|
3470 | | - CameraPane.RANDOM = random; |
---|
| 3708 | + CameraPane.SWITCH = random; |
---|
3471 | 3709 | |
---|
3472 | 3710 | System.err.flush(); |
---|
3473 | 3711 | |
---|
.. | .. |
---|
3485 | 3723 | // lowres.SaveSupports(); |
---|
3486 | 3724 | // par = lowres.parent; |
---|
3487 | 3725 | // lowres.parent = null; |
---|
3488 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3726 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3489 | 3727 | Object3D newlow = CloneObject(lowres, false); |
---|
3490 | 3728 | newlow.name = sn.switchobject.get(i).name; |
---|
3491 | 3729 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3507 | 3745 | return; |
---|
3508 | 3746 | |
---|
3509 | 3747 | Object3D poses = group.selection.get(0); |
---|
3510 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3748 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3511 | 3749 | |
---|
3512 | 3750 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3513 | 3751 | |
---|
.. | .. |
---|
3676 | 3914 | group.selection.RelinkToSupport(); // july 2014 |
---|
3677 | 3915 | System.out.println("DONE."); |
---|
3678 | 3916 | refreshContents(); |
---|
3679 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3917 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3680 | 3918 | } |
---|
3681 | 3919 | |
---|
3682 | 3920 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3701 | 3939 | |
---|
3702 | 3940 | void ClipMesh() |
---|
3703 | 3941 | { |
---|
3704 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3942 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3705 | 3943 | { |
---|
3706 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3944 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3707 | 3945 | |
---|
3708 | 3946 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3709 | 3947 | content = ((cGroup)content).get(0); |
---|
3710 | 3948 | |
---|
3711 | 3949 | // for (int i=0; i<group.selection.size(); i++) |
---|
3712 | 3950 | // { |
---|
3713 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3951 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3714 | 3952 | // } |
---|
3715 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3953 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3716 | 3954 | } |
---|
3717 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3955 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3718 | 3956 | System.out.println("DONE."); |
---|
3719 | 3957 | refreshContents(); |
---|
3720 | 3958 | } |
---|
.. | .. |
---|
3952 | 4190 | System.err.println("info : " + child.GetPath()); |
---|
3953 | 4191 | } |
---|
3954 | 4192 | } |
---|
3955 | | - else |
---|
3956 | | - { |
---|
3957 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3958 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3959 | | - System.err.println("info : " + group.GetPath()); |
---|
3960 | | - } |
---|
| 4193 | +// else |
---|
| 4194 | +// { |
---|
| 4195 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4196 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4197 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4198 | +// } |
---|
3961 | 4199 | |
---|
3962 | 4200 | objEditor.SetText(); // jan 2014 |
---|
3963 | 4201 | |
---|
3964 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4202 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3965 | 4203 | CameraPane.flash = true; |
---|
3966 | 4204 | |
---|
3967 | 4205 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3968 | 4206 | // a camera |
---|
3969 | 4207 | { |
---|
3970 | 4208 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
3971 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
3972 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
3973 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4209 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4210 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4211 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3974 | 4212 | } |
---|
3975 | 4213 | |
---|
3976 | 4214 | refreshContents(); |
---|
.. | .. |
---|
4052 | 4290 | { |
---|
4053 | 4291 | if (group.selection.isEmpty()) |
---|
4054 | 4292 | return; |
---|
4055 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4293 | + GrafreeD.clipboardIsTempGroup = false; |
---|
4056 | 4294 | Composite tGroup = null; |
---|
4057 | 4295 | if (group.selection.size() > 0) // 1) |
---|
4058 | 4296 | { |
---|
4059 | 4297 | tGroup = new cGroup(); |
---|
4060 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4298 | + GrafreeD.clipboardIsTempGroup = true; |
---|
4061 | 4299 | } |
---|
4062 | 4300 | |
---|
4063 | 4301 | if (cut) |
---|
.. | .. |
---|
4097 | 4335 | //System.out.println("cut " + child); |
---|
4098 | 4336 | //System.out.println("parent = " + child.parent); |
---|
4099 | 4337 | // tmp.addChild(child); |
---|
4100 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4338 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4101 | 4339 | tGroup.add/*Child*/(tmp); |
---|
4102 | 4340 | else |
---|
4103 | | - GraphreeD.clipboard = tmp; |
---|
| 4341 | + GrafreeD.clipboard = tmp; |
---|
4104 | 4342 | } |
---|
4105 | 4343 | else |
---|
4106 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4344 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4107 | 4345 | tGroup.add/*Child*/(child); |
---|
4108 | 4346 | else |
---|
4109 | | - GraphreeD.clipboard = child; |
---|
| 4347 | + GrafreeD.clipboard = child; |
---|
4110 | 4348 | } |
---|
4111 | 4349 | |
---|
4112 | 4350 | //ResetModel(); |
---|
.. | .. |
---|
4138 | 4376 | //System.out.println("cut " + elem); |
---|
4139 | 4377 | //System.out.println("parent = " + elem.parent); |
---|
4140 | 4378 | // tmp.addChild(elem); |
---|
4141 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4379 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4142 | 4380 | tGroup.add/*Child*/(tmp); |
---|
4143 | 4381 | else |
---|
4144 | | - GraphreeD.clipboard = tmp; |
---|
| 4382 | + GrafreeD.clipboard = tmp; |
---|
4145 | 4383 | } |
---|
4146 | 4384 | else |
---|
4147 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4385 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4148 | 4386 | tGroup.add/*Child*/(child); |
---|
4149 | 4387 | else |
---|
4150 | | - GraphreeD.clipboard = child; |
---|
| 4388 | + GrafreeD.clipboard = child; |
---|
4151 | 4389 | } |
---|
4152 | 4390 | |
---|
4153 | 4391 | } |
---|
4154 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
4155 | | - GraphreeD.clipboard = tGroup; |
---|
| 4392 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4393 | + GrafreeD.clipboard = tGroup; |
---|
4156 | 4394 | if (cut) |
---|
4157 | 4395 | { |
---|
4158 | 4396 | ResetModel(); |
---|
.. | .. |
---|
4162 | 4400 | |
---|
4163 | 4401 | void paste(boolean expand) |
---|
4164 | 4402 | { |
---|
4165 | | - // if (GraphreeD.clipboard == null) |
---|
| 4403 | + // if (GrafreeD.clipboard == null) |
---|
4166 | 4404 | // return; |
---|
4167 | 4405 | boolean first = true; |
---|
4168 | 4406 | |
---|
4169 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4407 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4170 | 4408 | { |
---|
4171 | 4409 | Composite temp; |
---|
4172 | 4410 | |
---|
.. | .. |
---|
4177 | 4415 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4178 | 4416 | */ |
---|
4179 | 4417 | Object3D elem; |
---|
4180 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4418 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4181 | 4419 | { |
---|
4182 | 4420 | Object3D child = (Object3D)e.nextElement(); |
---|
4183 | 4421 | |
---|
.. | .. |
---|
4191 | 4429 | else |
---|
4192 | 4430 | elem = child.deepCopy(); // ? |
---|
4193 | 4431 | child.parent = keepparent; |
---|
4194 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4432 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4195 | 4433 | // elem = elem.get(0); |
---|
4196 | 4434 | makeSomething(elem, true); // ?? first); |
---|
4197 | 4435 | //group.addChild(elem); |
---|
.. | .. |
---|
4211 | 4449 | //Object3D cb = Applet3D.clipboard; |
---|
4212 | 4450 | //temp.addChild(cb); |
---|
4213 | 4451 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4214 | | - assert(GraphreeD.clipboard.parent == null); |
---|
4215 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
4216 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4217 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
4218 | | - makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy()); |
---|
| 4452 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4453 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4454 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4455 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4456 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4219 | 4457 | else |
---|
4220 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4221 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4458 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4459 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4222 | 4460 | } |
---|
4223 | 4461 | |
---|
4224 | 4462 | ResetModel(); |
---|
4225 | 4463 | refreshContents(); |
---|
4226 | 4464 | } |
---|
4227 | 4465 | |
---|
4228 | | - void pasteInto(boolean copyit) |
---|
| 4466 | + void pasteInto(boolean copyit, boolean clone) |
---|
4229 | 4467 | { |
---|
4230 | | -// if (GraphreeD.clipboard == null) |
---|
| 4468 | +// if (GrafreeD.clipboard == null) |
---|
4231 | 4469 | // return; |
---|
4232 | 4470 | |
---|
4233 | 4471 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4254 | 4492 | if (copyit) |
---|
4255 | 4493 | { |
---|
4256 | 4494 | // paste(false); |
---|
4257 | | - CloneClipboard(false); // sept 2014 |
---|
| 4495 | + if (clone) |
---|
| 4496 | + { |
---|
| 4497 | + CloneClipboard(false); // sept 2014 |
---|
| 4498 | + } |
---|
| 4499 | + else |
---|
| 4500 | + { |
---|
| 4501 | + paste(false); |
---|
| 4502 | + } |
---|
4258 | 4503 | } |
---|
4259 | 4504 | else |
---|
4260 | 4505 | { |
---|
4261 | 4506 | boolean first = true; |
---|
4262 | 4507 | |
---|
4263 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4508 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4264 | 4509 | { |
---|
4265 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4510 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4266 | 4511 | Object3D copy; |
---|
4267 | 4512 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4268 | 4513 | { |
---|
.. | .. |
---|
4272 | 4517 | } |
---|
4273 | 4518 | } else |
---|
4274 | 4519 | { |
---|
4275 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4520 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4276 | 4521 | } |
---|
4277 | 4522 | } |
---|
4278 | 4523 | } |
---|
.. | .. |
---|
4464 | 4709 | makeSomething(csg); |
---|
4465 | 4710 | } |
---|
4466 | 4711 | |
---|
| 4712 | + void Ungroup(Object3D g) |
---|
| 4713 | + { |
---|
| 4714 | + if (g instanceof HiddenObject) |
---|
| 4715 | + { |
---|
| 4716 | + HiddenObject h = (HiddenObject) g; |
---|
| 4717 | + |
---|
| 4718 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4719 | + { |
---|
| 4720 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4721 | + } |
---|
| 4722 | + } |
---|
| 4723 | + else |
---|
| 4724 | + { |
---|
| 4725 | + for (int i=0; i<g.Size(); i++) |
---|
| 4726 | + { |
---|
| 4727 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4728 | + } |
---|
| 4729 | + } |
---|
| 4730 | + } |
---|
| 4731 | + |
---|
4467 | 4732 | void ungroup() |
---|
4468 | 4733 | { |
---|
4469 | 4734 | /* |
---|
.. | .. |
---|
4659 | 4924 | |
---|
4660 | 4925 | void ImportGFD() |
---|
4661 | 4926 | { |
---|
4662 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4927 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4663 | 4928 | browser.show(); |
---|
4664 | 4929 | String filename = browser.getFile(); |
---|
4665 | 4930 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4697 | 4962 | |
---|
4698 | 4963 | void ImportVRMLX3D() |
---|
4699 | 4964 | { |
---|
4700 | | - if (GraphreeD.standAlone) |
---|
| 4965 | + if (GrafreeD.standAlone) |
---|
4701 | 4966 | { |
---|
4702 | 4967 | /**/ |
---|
4703 | 4968 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4714 | 4979 | |
---|
4715 | 4980 | String GetFile(String dialogName) |
---|
4716 | 4981 | { |
---|
4717 | | - if (GraphreeD.standAlone) |
---|
| 4982 | + if (GrafreeD.standAlone) |
---|
4718 | 4983 | { |
---|
4719 | 4984 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4720 | 4985 | browser.show(); |
---|
.. | .. |
---|
4778 | 5043 | cButton flashSelectionButton; |
---|
4779 | 5044 | cButton editButton; |
---|
4780 | 5045 | cButton uneditButton; |
---|
| 5046 | + JCheckBox allParamsButton; |
---|
4781 | 5047 | cButton clearpanelButton; |
---|
4782 | | - cButton allParamsButton; |
---|
4783 | 5048 | cButton unselectButton; |
---|
4784 | 5049 | |
---|
| 5050 | + cButton oneStepButton; |
---|
| 5051 | + |
---|
4785 | 5052 | cButton screenfitButton; |
---|
4786 | 5053 | cButton screenfitpointButton; |
---|
4787 | 5054 | cButton snapobjectButton; |
---|
.. | .. |
---|
4823 | 5090 | private MenuItem resetsupportItem; |
---|
4824 | 5091 | private MenuItem resetreferencesItem; |
---|
4825 | 5092 | private MenuItem linkverticesItem; |
---|
| 5093 | + private MenuItem relinkverticesItem; |
---|
4826 | 5094 | private MenuItem setMasterItem; |
---|
4827 | 5095 | private MenuItem resetMeshItem; |
---|
4828 | 5096 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4835 | 5103 | private MenuItem mergeGeometriesItem; |
---|
4836 | 5104 | private MenuItem copyItem; |
---|
4837 | 5105 | private MenuItem pasteItem; |
---|
| 5106 | + private MenuItem pasteIntoItem; |
---|
4838 | 5107 | private MenuItem pasteLinkItem; |
---|
4839 | 5108 | private MenuItem pasteCloneItem; |
---|
4840 | 5109 | private MenuItem pasteExpandItem; |
---|
4841 | 5110 | private MenuItem clearItem; |
---|
4842 | 5111 | private MenuItem clearAllItem; |
---|
4843 | 5112 | private MenuItem genUVItem; |
---|
| 5113 | + private MenuItem genNormalsMESHItem; |
---|
4844 | 5114 | private MenuItem genNormalsCADItem; |
---|
4845 | 5115 | private MenuItem genNormalsORGANItem; |
---|
| 5116 | + private MenuItem genNormalsMINEItem; |
---|
4846 | 5117 | private MenuItem stripifyItem; |
---|
4847 | 5118 | private MenuItem unstripifyItem; |
---|
4848 | 5119 | private MenuItem trimItem; |
---|
.. | .. |
---|
4884 | 5155 | private MenuItem resetCentroidItem; |
---|
4885 | 5156 | private MenuItem transformgeometryItem; |
---|
4886 | 5157 | private MenuItem resetTransformItem; |
---|
| 5158 | + private MenuItem hideItem; |
---|
4887 | 5159 | private MenuItem grabItem; |
---|
4888 | 5160 | private MenuItem backItem; |
---|
4889 | 5161 | private MenuItem frontItem; |
---|
.. | .. |
---|
4904 | 5176 | |
---|
4905 | 5177 | private MenuItem resetParentItem; |
---|
4906 | 5178 | private MenuItem repairParentItem; |
---|
| 5179 | + private MenuItem repairShadowItem; |
---|
4907 | 5180 | private MenuItem sortbysizeItem; |
---|
4908 | 5181 | private MenuItem sortbynameItem; |
---|
4909 | 5182 | |
---|
.. | .. |
---|
4924 | 5197 | private MenuItem coneItem; |
---|
4925 | 5198 | private MenuItem torusItem; |
---|
4926 | 5199 | private MenuItem superItem; |
---|
| 5200 | + private MenuItem kleinItem; |
---|
4927 | 5201 | private MenuItem blobItem; |
---|
4928 | 5202 | private MenuItem latheItem; |
---|
4929 | 5203 | private MenuItem bezierItem; |
---|
4930 | | - private MenuItem checkerItem; |
---|
| 5204 | + private MenuItem overlayItem; |
---|
4931 | 5205 | private MenuItem meshItem; |
---|
4932 | 5206 | // private MenuItem meshGroupItem; |
---|
4933 | 5207 | private MenuItem springItem; |
---|
.. | .. |
---|
4936 | 5210 | private MenuItem csgItem; |
---|
4937 | 5211 | private MenuItem templateItem; |
---|
4938 | 5212 | private MenuItem textureItem; |
---|
| 5213 | + private MenuItem billboardItem; |
---|
4939 | 5214 | private MenuItem shadowXItem; |
---|
4940 | 5215 | private MenuItem shadowYItem; |
---|
4941 | 5216 | private MenuItem shadowZItem; |
---|