.. | .. |
---|
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 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | | - cloneItem.addActionListener(this); |
---|
172 | | - cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | | - cloneSupportItem.addActionListener(this); |
---|
174 | | - menu.add("-"); |
---|
175 | 174 | cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | 175 | cutItem.addActionListener(this); |
---|
177 | 176 | copyItem = menu.add(new MenuItem("Copy")); |
---|
178 | 177 | copyItem.addActionListener(this); |
---|
179 | 178 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | 179 | pasteItem.addActionListener(this); |
---|
| 180 | + menu.add("-"); |
---|
| 181 | + cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 182 | + cloneItem.addActionListener(this); |
---|
| 183 | + cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
| 184 | + cloneSupportItem.addActionListener(this); |
---|
| 185 | + menu.add("-"); |
---|
| 186 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 187 | + pasteIntoItem.addActionListener(this); |
---|
181 | 188 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | 189 | pasteLinkItem.addActionListener(this); |
---|
183 | 190 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | 191 | pasteCloneItem.addActionListener(this); |
---|
185 | 192 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | 193 | // pasteExpandItem.addActionListener(this); |
---|
| 194 | + menu.add("-"); |
---|
187 | 195 | clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | 196 | clearItem.addActionListener(this); |
---|
| 197 | + |
---|
| 198 | + if (Globals.ADVANCED) |
---|
| 199 | + { |
---|
| 200 | + // Deletes the cameras... |
---|
189 | 201 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 202 | clearAllItem.addActionListener(this); |
---|
| 203 | + } |
---|
191 | 204 | |
---|
192 | 205 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
| 206 | + if (Globals.ADVANCED) |
---|
| 207 | + { |
---|
193 | 208 | resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
194 | 209 | resetMeshItem.addActionListener(this); |
---|
195 | 210 | stepAllItem = menu.add(new MenuItem("Step All")); |
---|
.. | .. |
---|
199 | 214 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
200 | 215 | resetreferencesItem.addActionListener(this); |
---|
201 | 216 | menu.add("-"); |
---|
| 217 | + } |
---|
202 | 218 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
203 | 219 | overwriteGeoItem.addActionListener(this); |
---|
204 | 220 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
210 | 226 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
211 | 227 | overwriteUVItem.addActionListener(this); |
---|
212 | 228 | menu.add("-"); |
---|
| 229 | + if (Globals.ADVANCED) |
---|
| 230 | + { |
---|
213 | 231 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
214 | 232 | generateMeshItem.addActionListener(this); |
---|
215 | 233 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
216 | 234 | poseMeshItem.addActionListener(this); |
---|
217 | 235 | menu.add("-"); |
---|
| 236 | + } |
---|
218 | 237 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
219 | 238 | resetsupportItem.addActionListener(this); |
---|
220 | 239 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 240 | linkverticesItem.addActionListener(this); |
---|
| 241 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 242 | + relinkverticesItem.addActionListener(this); |
---|
| 243 | + |
---|
| 244 | + if (Globals.ADVANCED) |
---|
| 245 | + { |
---|
222 | 246 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
223 | 247 | setMasterItem.addActionListener(this); |
---|
| 248 | + } |
---|
224 | 249 | |
---|
225 | 250 | oe.menuBar.add(menu = new Menu("Group")); |
---|
226 | 251 | grabItem = menu.add(new MenuItem("Grab")); |
---|
227 | 252 | grabItem.addActionListener(this); |
---|
228 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
229 | | - frontItem.addActionListener(this); |
---|
230 | 253 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 254 | backItem.addActionListener(this); |
---|
| 255 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 256 | + frontItem.addActionListener(this); |
---|
232 | 257 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 258 | compositeItem.addActionListener(this); |
---|
| 259 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
| 260 | + hideItem.addActionListener(this); |
---|
| 261 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 262 | + ungroupItem.addActionListener(this); |
---|
234 | 263 | menu.add("-"); |
---|
235 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 264 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
236 | 265 | 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 | 266 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
242 | 267 | switchGeoItem.addActionListener(this); |
---|
243 | 268 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
244 | 269 | switchTransfoItem.addActionListener(this); |
---|
245 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 270 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
246 | 271 | morphItem.addActionListener(this); |
---|
| 272 | + |
---|
| 273 | + if (Globals.ADVANCED) |
---|
| 274 | + { |
---|
| 275 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 276 | + physicsItem.addActionListener(this); |
---|
| 277 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 278 | + frameselectorItem.addActionListener(this); |
---|
247 | 279 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
248 | 280 | scriptNodeItem.addActionListener(this); |
---|
249 | 281 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
250 | 282 | cameraItem.addActionListener(this); |
---|
| 283 | + } |
---|
251 | 284 | |
---|
252 | 285 | oe.menuBar.add(menu = new Menu("Object")); |
---|
253 | 286 | textureItem = menu.add(new MenuItem("Texture")); |
---|
254 | 287 | textureItem.addActionListener(this); |
---|
| 288 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 289 | + billboardItem.addActionListener(this); |
---|
255 | 290 | csgItem = menu.add(new MenuItem("CSG")); |
---|
256 | 291 | csgItem.addActionListener(this); |
---|
257 | 292 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
260 | 295 | shadowYItem.addActionListener(this); |
---|
261 | 296 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
262 | 297 | shadowZItem.addActionListener(this); |
---|
| 298 | + if (Globals.ADVANCED) |
---|
| 299 | + { |
---|
263 | 300 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
264 | 301 | linkerItem.addActionListener(this); |
---|
265 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
266 | | - templateItem.addActionListener(this); |
---|
267 | 302 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
268 | 303 | attributeItem.addActionListener(this); |
---|
| 304 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 305 | + templateItem.addActionListener(this); |
---|
269 | 306 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
270 | 307 | pointflowItem.addActionListener(this); |
---|
271 | 308 | menu.add("-"); |
---|
272 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
273 | | - transformgeometryItem.addActionListener(this); |
---|
| 309 | + } |
---|
274 | 310 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
275 | 311 | resetTransformItem.addActionListener(this); |
---|
276 | 312 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
277 | 313 | resetCentroidItem.addActionListener(this); |
---|
278 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
279 | | - ungroupItem.addActionListener(this); |
---|
| 314 | + transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 315 | + transformgeometryItem.addActionListener(this); |
---|
280 | 316 | |
---|
281 | 317 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
282 | 318 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
285 | 321 | genNormalsORGANItem.addActionListener(this); |
---|
286 | 322 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
287 | 323 | genNormalsCADItem.addActionListener(this); |
---|
| 324 | + genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
| 325 | + genNormalsMESHItem.addActionListener(this); |
---|
| 326 | + if (Globals.ADVANCED) |
---|
| 327 | + { |
---|
| 328 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 329 | + genNormalsMINEItem.addActionListener(this); |
---|
| 330 | + } |
---|
288 | 331 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
289 | 332 | stripifyItem.addActionListener(this); |
---|
290 | 333 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
306 | 349 | reduce34MeshItem.addActionListener(this); |
---|
307 | 350 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
308 | 351 | increaseMeshItem.addActionListener(this); |
---|
309 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
310 | | - smoothMeshItem.addActionListener(this); |
---|
311 | 352 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
312 | 353 | clipMeshItem.addActionListener(this); |
---|
| 354 | + |
---|
| 355 | + if (Globals.ADVANCED) |
---|
| 356 | + { |
---|
| 357 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 358 | + smoothMeshItem.addActionListener(this); |
---|
| 359 | + } |
---|
313 | 360 | |
---|
314 | 361 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
315 | 362 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
.. | .. |
---|
319 | 366 | liveleavesItem.addActionListener(this); |
---|
320 | 367 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
321 | 368 | unliveleavesItem.addActionListener(this); |
---|
| 369 | + if (Globals.ADVANCED) |
---|
| 370 | + { |
---|
322 | 371 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
323 | 372 | supportleavesItem.addActionListener(this); |
---|
324 | 373 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
325 | 374 | unsupportleavesItem.addActionListener(this); |
---|
| 375 | + } |
---|
326 | 376 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
327 | 377 | hideleavesItem.addActionListener(this); |
---|
328 | 378 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
365 | 415 | sortbysizeItem.addActionListener(this); |
---|
366 | 416 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
367 | 417 | sortbynameItem.addActionListener(this); |
---|
| 418 | + if (Globals.ADVANCED) |
---|
| 419 | + { |
---|
368 | 420 | menu.add("-"); |
---|
369 | 421 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
370 | 422 | extractGeometriesItem.addActionListener(this); |
---|
.. | .. |
---|
374 | 426 | shareGeometriesItem.addActionListener(this); |
---|
375 | 427 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
376 | 428 | mergeGeometriesItem.addActionListener(this); |
---|
| 429 | + } |
---|
377 | 430 | |
---|
378 | 431 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
379 | 432 | buildCreateMenu(menu); |
---|
380 | 433 | |
---|
381 | | - |
---|
382 | 434 | oe.menuBar.add(menu = new Menu("Include")); |
---|
383 | | - importGFDItem = menu.add(new MenuItem("GraphreeD Object...")); |
---|
| 435 | + importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
384 | 436 | importGFDItem.addActionListener(this); |
---|
385 | 437 | importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
386 | 438 | importVRMLX3DItem.addActionListener(this); |
---|
.. | .. |
---|
423 | 475 | oe.radioPanel.add(dummyButton); |
---|
424 | 476 | oe.buttonGroup.add(dummyButton); |
---|
425 | 477 | */ |
---|
426 | | - aConstraints.gridy += 1; |
---|
427 | | - oe.aConstraints.gridwidth = 1; |
---|
428 | | - oe.aConstraints.gridx = 0; |
---|
| 478 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
429 | 479 | |
---|
430 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 480 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 481 | + liveCB.setToolTipText("Enabled animation"); |
---|
431 | 482 | liveCB.addItemListener(this); |
---|
432 | 483 | |
---|
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); |
---|
| 484 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 485 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 486 | + oneStepButton.addActionListener(this); |
---|
| 487 | + |
---|
| 488 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 489 | + fastCB.setToolTipText("Fast mode"); |
---|
451 | 490 | 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); |
---|
| 491 | + |
---|
| 492 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 493 | + trackCB.setToolTipText("Enable tracking"); |
---|
493 | 494 | trackCB.addItemListener(this); |
---|
494 | 495 | |
---|
495 | | - oe.aConstraints.gridx += 1; |
---|
496 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 496 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 497 | + screenfitButton.setToolTipText("Screen fit"); |
---|
497 | 498 | screenfitButton.addActionListener(this); |
---|
498 | | - oe.aConstraints.gridx += 1; |
---|
| 499 | + |
---|
499 | 500 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
500 | 501 | // 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 | 502 | |
---|
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); |
---|
| 503 | + if (Globals.ADVANCED) |
---|
| 504 | + { |
---|
| 505 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 506 | + snapobjectButton.addActionListener(this); |
---|
| 507 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 508 | + } |
---|
| 509 | + |
---|
| 510 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 511 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
512 | 512 | flashSelectionButton.addActionListener(this); |
---|
513 | | - oe.aConstraints.gridx += 1; |
---|
514 | | - oe.aConstraints.weighty = 0; |
---|
515 | | - oe.aConstraints.gridwidth = 1; |
---|
516 | 513 | |
---|
517 | | - // |
---|
518 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 514 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 515 | + |
---|
| 516 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 517 | + twoButton.setToolTipText("Show center view only"); |
---|
519 | 518 | twoButton.addActionListener(this); |
---|
520 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 519 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
521 | 520 | fourButton.addActionListener(this); |
---|
522 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 521 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 522 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 523 | + sixButton.setToolTipText("2-column layout left"); |
---|
523 | 524 | sixButton.addActionListener(this); |
---|
524 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 525 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 526 | + threeButton.setToolTipText("2-column layout right"); |
---|
525 | 527 | threeButton.addActionListener(this); |
---|
526 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 528 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 529 | + sevenButton.setToolTipText("3-column layout"); |
---|
527 | 530 | sevenButton.addActionListener(this); |
---|
528 | 531 | // |
---|
529 | 532 | |
---|
530 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 533 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 534 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
531 | 535 | rootButton.addActionListener(this); |
---|
532 | | - oe.aConstraints.gridx += 1; |
---|
533 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 536 | + |
---|
| 537 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 538 | + closeButton.setToolTipText("Close tab"); |
---|
534 | 539 | closeButton.addActionListener(this); |
---|
535 | 540 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
536 | 541 | //clearButton.addActionListener(this); |
---|
537 | | - oe.aConstraints.gridx += 1; |
---|
538 | 542 | |
---|
539 | | - oe.aConstraints.gridx = 1; // |
---|
540 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 543 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 544 | + |
---|
| 545 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 546 | + editButton.setToolTipText("Edit selection"); |
---|
541 | 547 | editButton.addActionListener(this); |
---|
542 | | - oe.aConstraints.gridx += 1; |
---|
543 | | - oe.aConstraints.weighty = 0; |
---|
544 | | - oe.aConstraints.gridwidth = 1; |
---|
545 | 548 | |
---|
546 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 549 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 550 | + uneditButton.setToolTipText("Unedit selection"); |
---|
547 | 551 | uneditButton.addActionListener(this); |
---|
548 | 552 | |
---|
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); |
---|
| 553 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 554 | + allParamsButton.setToolTipText("Edit all params"); |
---|
561 | 555 | allParamsButton.addActionListener(this); |
---|
562 | 556 | |
---|
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); |
---|
| 557 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 558 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 559 | + clearPanelButton.addActionListener(this); |
---|
| 560 | + |
---|
| 561 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 562 | + unselectButton.setToolTipText("Unselect"); |
---|
568 | 563 | unselectButton.addActionListener(this); |
---|
569 | 564 | |
---|
| 565 | + commandsPanel.preferredHeight = 1; |
---|
| 566 | + |
---|
| 567 | + oe.treePanel.add(commandsPanel); |
---|
| 568 | + oe.treePanel.Return(); |
---|
| 569 | + |
---|
570 | 570 | // oe.aConstraints.gridx += 1; |
---|
571 | 571 | // oe.aConstraints.weighty = 0; |
---|
572 | 572 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
578 | 578 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
579 | 579 | // gcButton.addActionListener(this); |
---|
580 | 580 | |
---|
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; |
---|
| 581 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 582 | + |
---|
| 583 | + JScrollPane jSP; |
---|
592 | 584 | //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); |
---|
| 585 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
594 | 586 | ResetModel(); |
---|
595 | | - oe.aConstraints.weighty = 0.5; |
---|
596 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
597 | | - oe.aConstraints.gridy += 1; |
---|
598 | | - oe.aConstraints.gridwidth = 1; |
---|
| 587 | + |
---|
| 588 | + oe.treePanel.add(jSPPanel); |
---|
| 589 | + oe.treePanel.Return(); |
---|
599 | 590 | |
---|
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); |
---|
| 591 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 592 | + |
---|
| 593 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 594 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
604 | 595 | colorCB.addItemListener(this); |
---|
605 | | - oe.aConstraints.gridx += 2; |
---|
606 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 596 | + |
---|
| 597 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 598 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
607 | 599 | materialCB.addItemListener(this); |
---|
608 | | - oe.aConstraints.gridx += 2; |
---|
609 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 600 | + |
---|
| 601 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 602 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
610 | 603 | textureCB.addItemListener(this); |
---|
611 | 604 | |
---|
612 | | - oe.aConstraints.gridx = 0; |
---|
613 | | - oe.aConstraints.gridy += 1; |
---|
| 605 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 606 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 607 | + oe.treePanel.Return(); |
---|
614 | 608 | |
---|
| 609 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 610 | +// mainPanel.setResizeWeight(0.5); |
---|
| 611 | + |
---|
615 | 612 | //jList.addListSelectionListener(this); |
---|
616 | 613 | oe.jTree.addTreeSelectionListener(this); |
---|
617 | 614 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
633 | 630 | radio.layout = sevenButton; |
---|
634 | 631 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
635 | 632 | } |
---|
| 633 | + |
---|
| 634 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 635 | + { |
---|
| 636 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 637 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 638 | + boxCB.addItemListener(this); |
---|
| 639 | + |
---|
| 640 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 641 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 642 | + zoomBoxCB.addItemListener(this); |
---|
| 643 | + |
---|
| 644 | + if (Globals.ADVANCED) |
---|
| 645 | + { |
---|
| 646 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 647 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 648 | + supportCB.addItemListener(this); |
---|
| 649 | + |
---|
| 650 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 651 | + // localCB.addItemListener(this); |
---|
| 652 | + |
---|
| 653 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 654 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 655 | + crowdCB.addItemListener(this); |
---|
| 656 | + |
---|
| 657 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 658 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 659 | + smoothCB.addItemListener(this); |
---|
| 660 | + |
---|
| 661 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 662 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 663 | + slowCB.addItemListener(this); |
---|
| 664 | + |
---|
| 665 | +// constraints.gridy += 1; |
---|
| 666 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 667 | +// speakerMocapCB.addItemListener(this); |
---|
| 668 | + |
---|
| 669 | + if (false) |
---|
| 670 | + { |
---|
| 671 | + // handled in scripts |
---|
| 672 | + //constraints.gridy += 1; |
---|
| 673 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 674 | + speakerCameraCB.addItemListener(this); |
---|
| 675 | + |
---|
| 676 | + //constraints.gridy += 1; |
---|
| 677 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 678 | + speakerFocusCB.addItemListener(this); |
---|
| 679 | + |
---|
| 680 | + //constraints.gridy += 1; |
---|
| 681 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 682 | + smoothfocusCB.addItemListener(this); |
---|
| 683 | + } |
---|
| 684 | + |
---|
| 685 | +//constraints.gridx += 1; |
---|
| 686 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 687 | +// debugCB.addItemListener(this); |
---|
| 688 | + |
---|
| 689 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 690 | + oeilCB.addItemListener(this); |
---|
| 691 | + |
---|
| 692 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 693 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 694 | + lookAtCB.addItemListener(this); |
---|
| 695 | + |
---|
| 696 | + } |
---|
| 697 | + |
---|
| 698 | + cGridBag fill = new cGridBag(); |
---|
| 699 | + |
---|
| 700 | + fill.preferredHeight = 200; |
---|
| 701 | + |
---|
| 702 | + panel.add(fill); |
---|
| 703 | + |
---|
| 704 | + } |
---|
636 | 705 | |
---|
637 | 706 | void EditObject(Object3D obj) |
---|
638 | 707 | { |
---|
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(); |
---|
| 708 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 709 | + radioButton.SetObject(obj); |
---|
| 710 | + radioButton.layout = sevenButton; |
---|
| 711 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 712 | + radioButton.addActionListener(this); |
---|
| 713 | + radioPanel.add(radioButton); |
---|
| 714 | + buttonGroup.add(radioButton); |
---|
| 715 | + radioButton.doClick(); |
---|
647 | 716 | } |
---|
648 | 717 | void SetupViews(ObjEditor oe) |
---|
649 | 718 | { |
---|
.. | .. |
---|
663 | 732 | JCheckBox fastCB; |
---|
664 | 733 | JCheckBox slowCB; |
---|
665 | 734 | JCheckBox boxCB; |
---|
| 735 | + JCheckBox zoomBoxCB; |
---|
666 | 736 | JCheckBox trackCB; |
---|
667 | 737 | JCheckBox smoothfocusCB; |
---|
668 | 738 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
705 | 775 | dropAttributes |= Object3D.TEXTURE; |
---|
706 | 776 | else |
---|
707 | 777 | dropAttributes &= ~Object3D.TEXTURE; |
---|
708 | | - } |
---|
709 | | - else if(e.getSource() == liveCB) |
---|
| 778 | + } else if(e.getSource() == liveCB) |
---|
710 | 779 | { |
---|
711 | 780 | cameraView.ToggleLive(); |
---|
712 | 781 | } |
---|
.. | .. |
---|
743 | 812 | Recompile(); |
---|
744 | 813 | cameraView.repaint(); |
---|
745 | 814 | // refreshContents(); |
---|
| 815 | + } |
---|
| 816 | + else if(e.getSource() == zoomBoxCB) |
---|
| 817 | + { |
---|
| 818 | + cameraView.ToggleZoomBoxMode(); |
---|
746 | 819 | } |
---|
747 | 820 | else if(e.getSource() == smoothfocusCB) |
---|
748 | 821 | { |
---|
.. | .. |
---|
911 | 984 | { |
---|
912 | 985 | loadClipboard(true); |
---|
913 | 986 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
914 | | - pasteInto(false); |
---|
| 987 | + pasteInto(false, false); |
---|
915 | 988 | } else { |
---|
916 | 989 | loadClipboard(false); |
---|
917 | 990 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
918 | | - pasteInto(false); // true); // ??? |
---|
| 991 | + pasteInto(false, false); // true); // ??? |
---|
919 | 992 | } |
---|
920 | 993 | } |
---|
921 | 994 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1033 | 1106 | torusItem.addActionListener(this); |
---|
1034 | 1107 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1035 | 1108 | superItem.addActionListener(this); |
---|
| 1109 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1110 | + kleinItem.addActionListener(this); |
---|
1036 | 1111 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1037 | 1112 | particleItem.addActionListener(this); |
---|
| 1113 | + if (Globals.ADVANCED) |
---|
| 1114 | + { |
---|
1038 | 1115 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1039 | 1116 | ragdollItem.addActionListener(this); |
---|
1040 | 1117 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1041 | 1118 | ragdoll2Item.addActionListener(this); |
---|
| 1119 | + } |
---|
1042 | 1120 | menu.add("-"); |
---|
1043 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1121 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1044 | 1122 | meshItem.addActionListener(this); |
---|
1045 | 1123 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1046 | 1124 | // meshGroupItem.addActionListener(this); |
---|
| 1125 | + if (Globals.ADVANCED) |
---|
| 1126 | + { |
---|
1047 | 1127 | springItem = menu.add(new MenuItem("Spring")); |
---|
1048 | 1128 | springItem.addActionListener(this); |
---|
1049 | 1129 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1050 | 1130 | 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 | 1131 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1056 | 1132 | blobItem.addActionListener(this); |
---|
1057 | 1133 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1058 | 1134 | latheItem.addActionListener(this); |
---|
| 1135 | + } |
---|
| 1136 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1137 | + bezierItem.addActionListener(this); |
---|
| 1138 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1139 | + overlayItem.addActionListener(this); |
---|
1059 | 1140 | lightItem = menu.add(new MenuItem("Light")); |
---|
1060 | 1141 | lightItem.addActionListener(this); |
---|
1061 | 1142 | menu.add("-"); |
---|
.. | .. |
---|
1065 | 1146 | loopItem.addActionListener(this); |
---|
1066 | 1147 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1067 | 1148 | doubleItem.addActionListener(this); |
---|
| 1149 | + if (Globals.ADVANCED) |
---|
| 1150 | + { |
---|
1068 | 1151 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1069 | 1152 | tripleItem.addActionListener(this); |
---|
| 1153 | + } |
---|
1070 | 1154 | } |
---|
1071 | 1155 | |
---|
1072 | 1156 | void buildToolsMenu(Menu menu) |
---|
1073 | 1157 | { |
---|
1074 | 1158 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1075 | 1159 | animationItem.addItemListener(this); |
---|
1076 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1160 | + animationItem.setState(Globals.ANIMATION); |
---|
1077 | 1161 | |
---|
1078 | 1162 | menu.add("-"); |
---|
1079 | 1163 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1080 | 1164 | parseverticesItem.addActionListener(this); |
---|
1081 | 1165 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1082 | 1166 | textureFieldItem.addActionListener(this); |
---|
1083 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1167 | + alignItem = menu.add(new MenuItem("Align Object")); |
---|
1084 | 1168 | alignItem.addActionListener(this); |
---|
1085 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1086 | | - mirrorItem.addActionListener(this); |
---|
1087 | 1169 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1088 | 1170 | reduceMorphItem.addActionListener(this); |
---|
1089 | 1171 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
.. | .. |
---|
1091 | 1173 | |
---|
1092 | 1174 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1093 | 1175 | computeAOItem.addActionListener(this); |
---|
1094 | | - menu.add("-"); |
---|
1095 | 1176 | |
---|
| 1177 | + if (Globals.ADVANCED) |
---|
| 1178 | + { |
---|
| 1179 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1180 | + mirrorItem.addActionListener(this); |
---|
| 1181 | + menu.add("-"); |
---|
1096 | 1182 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1097 | 1183 | memoryItem.addActionListener(this); |
---|
1098 | 1184 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1106 | 1192 | resetParentItem.addActionListener(this); |
---|
1107 | 1193 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1108 | 1194 | repairParentItem.addActionListener(this); |
---|
| 1195 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1196 | + repairShadowItem.addActionListener(this); |
---|
1109 | 1197 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1110 | 1198 | invariantsItem.addActionListener(this); |
---|
1111 | 1199 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1113 | 1201 | menu.add("-"); |
---|
1114 | 1202 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1115 | 1203 | editScriptItem.addActionListener(this); |
---|
| 1204 | + } |
---|
1116 | 1205 | } |
---|
1117 | 1206 | |
---|
1118 | 1207 | void ScreenFit() |
---|
.. | .. |
---|
1441 | 1530 | |
---|
1442 | 1531 | void Overwrite(int mask) |
---|
1443 | 1532 | { |
---|
1444 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1533 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1445 | 1534 | { |
---|
1446 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1535 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1447 | 1536 | |
---|
1448 | 1537 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1449 | 1538 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1466 | 1555 | // |
---|
1467 | 1556 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1468 | 1557 | { |
---|
| 1558 | + Object source = event.getSource(); |
---|
1469 | 1559 | /* |
---|
1470 | 1560 | if (event.getSource() == nameField) |
---|
1471 | 1561 | { |
---|
.. | .. |
---|
1477 | 1567 | } |
---|
1478 | 1568 | else |
---|
1479 | 1569 | */ |
---|
1480 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1570 | + if (source == lookAtItem || source == lookFromItem) |
---|
1481 | 1571 | { |
---|
1482 | 1572 | ScreenFit(); |
---|
1483 | 1573 | } else |
---|
1484 | | - if (event.getSource() == switchItem) |
---|
| 1574 | + if (source == switchItem) |
---|
1485 | 1575 | { |
---|
1486 | 1576 | cVector v1 = new cVector(); |
---|
1487 | 1577 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1490 | 1580 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1491 | 1581 | objEditor.cameraView.repaint(); |
---|
1492 | 1582 | } else |
---|
1493 | | - if (event.getSource() == rectoidItem) |
---|
| 1583 | + if (source == rectoidItem) |
---|
1494 | 1584 | { |
---|
1495 | 1585 | makeSomething(new Box()); |
---|
1496 | 1586 | } else |
---|
1497 | | - if (event.getSource() == particleItem) |
---|
| 1587 | + if (source == particleItem) |
---|
1498 | 1588 | { |
---|
1499 | 1589 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1500 | 1590 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1515 | 1605 | applyExample(particleGeom, "SMOKE"); |
---|
1516 | 1606 | makeSomething(particleGeom); |
---|
1517 | 1607 | } else |
---|
1518 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1608 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1519 | 1609 | { |
---|
1520 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1610 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1521 | 1611 | |
---|
1522 | 1612 | ragdoll.toParent = LA.newMatrix(); |
---|
1523 | 1613 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1535 | 1625 | } else |
---|
1536 | 1626 | /* |
---|
1537 | 1627 | */ |
---|
1538 | | - if (event.getSource() == heightFieldItem) |
---|
| 1628 | + if (source == heightFieldItem) |
---|
1539 | 1629 | { |
---|
1540 | 1630 | Object3D obj = new Object3D(); |
---|
1541 | 1631 | |
---|
.. | .. |
---|
1573 | 1663 | |
---|
1574 | 1664 | makeSomething(obj); |
---|
1575 | 1665 | } else |
---|
1576 | | - if (event.getSource() == gridItem) |
---|
| 1666 | + if (source == gridItem) |
---|
1577 | 1667 | { |
---|
1578 | 1668 | makeSomething(new Grid()); |
---|
1579 | 1669 | } else |
---|
1580 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1670 | + if (source == ellipsoidItem) |
---|
1581 | 1671 | { |
---|
1582 | 1672 | makeSomething(new Sphere()); |
---|
1583 | 1673 | } else |
---|
1584 | | - if (event.getSource() == coneItem) |
---|
| 1674 | + if (source == coneItem) |
---|
1585 | 1675 | { |
---|
1586 | 1676 | makeSomething(new Cone()); |
---|
1587 | 1677 | } else |
---|
1588 | | - if (event.getSource() == torusItem) |
---|
| 1678 | + if (source == torusItem) |
---|
1589 | 1679 | { |
---|
1590 | 1680 | makeSomething(new Torus()); |
---|
1591 | 1681 | } else |
---|
1592 | | - if (event.getSource() == superItem) |
---|
| 1682 | + if (source == superItem) |
---|
1593 | 1683 | { |
---|
1594 | 1684 | makeSomething(new Superellipsoid()); |
---|
1595 | 1685 | } else |
---|
1596 | | - if (event.getSource() == blobItem) |
---|
| 1686 | + if (source == kleinItem) |
---|
| 1687 | + { |
---|
| 1688 | + makeSomething(new Klein()); |
---|
| 1689 | + } else |
---|
| 1690 | + if (source == blobItem) |
---|
1597 | 1691 | { |
---|
1598 | 1692 | Blob blob = new Blob(); |
---|
1599 | 1693 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1601 | 1695 | //blob.retile(); |
---|
1602 | 1696 | makeSomething(blob); |
---|
1603 | 1697 | } else |
---|
1604 | | - if (event.getSource() == latheItem) |
---|
| 1698 | + if (source == latheItem) |
---|
1605 | 1699 | { |
---|
1606 | 1700 | makeSomething(new Lathe()); |
---|
1607 | 1701 | } else |
---|
1608 | | - if (event.getSource() == bezierItem) |
---|
| 1702 | + if (source == bezierItem) |
---|
1609 | 1703 | { |
---|
1610 | 1704 | makeSomething(new BezierSurface()); |
---|
1611 | 1705 | } else |
---|
1612 | | - if (event.getSource() == checkerItem) |
---|
| 1706 | + if (source == overlayItem) |
---|
1613 | 1707 | { |
---|
1614 | 1708 | /* |
---|
1615 | 1709 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1624 | 1718 | */ |
---|
1625 | 1719 | makeSomething(new Checker()); |
---|
1626 | 1720 | } else |
---|
1627 | | - if (event.getSource() == meshItem) |
---|
| 1721 | + if (source == meshItem) |
---|
1628 | 1722 | { |
---|
1629 | 1723 | Object3D itemtomake = new Object3D(); |
---|
1630 | 1724 | Object3D child; |
---|
.. | .. |
---|
1645 | 1739 | makeSomething(child); |
---|
1646 | 1740 | } |
---|
1647 | 1741 | } else |
---|
1648 | | - if (event.getSource() == springItem) |
---|
| 1742 | + if (source == springItem) |
---|
1649 | 1743 | { |
---|
1650 | 1744 | cSpring s = new cSpring(); |
---|
1651 | 1745 | s.setup(); |
---|
1652 | 1746 | makeSomething(s); |
---|
1653 | 1747 | } else |
---|
1654 | | - if (event.getSource() == flagItem) |
---|
| 1748 | + if (source == flagItem) |
---|
1655 | 1749 | { |
---|
1656 | 1750 | cSpring s = new cFlag(); |
---|
1657 | 1751 | s.setup(); |
---|
1658 | 1752 | makeSomething(s); |
---|
1659 | 1753 | } else |
---|
1660 | | - if (event.getSource() == lightItem) |
---|
| 1754 | + if (source == lightItem) |
---|
1661 | 1755 | { |
---|
1662 | 1756 | makeSomething(new Light()); |
---|
1663 | 1757 | } else |
---|
1664 | | - if (event.getSource() == csgItem) |
---|
| 1758 | + if (source == csgItem) |
---|
1665 | 1759 | { |
---|
1666 | 1760 | group(new CSG()); |
---|
1667 | 1761 | } else |
---|
1668 | | - if (event.getSource() == templateItem) |
---|
| 1762 | + if (source == templateItem) |
---|
1669 | 1763 | { |
---|
1670 | 1764 | group(new cTemplate()); |
---|
1671 | 1765 | } else |
---|
1672 | | - if (event.getSource() == attributeItem) |
---|
| 1766 | + if (source == attributeItem) |
---|
1673 | 1767 | { |
---|
1674 | 1768 | makeSomething(new Attribute()); |
---|
1675 | 1769 | } else |
---|
1676 | | - if (event.getSource() == pointflowItem) |
---|
| 1770 | + if (source == pointflowItem) |
---|
1677 | 1771 | { |
---|
1678 | 1772 | makeSomething(new PointFlow()); |
---|
1679 | 1773 | } else |
---|
.. | .. |
---|
1685 | 1779 | } else |
---|
1686 | 1780 | */ |
---|
1687 | 1781 | |
---|
1688 | | - if (event.getSource() == superLoopItem) |
---|
| 1782 | + if (source == superLoopItem) |
---|
1689 | 1783 | { |
---|
1690 | 1784 | Composite g = new cGroup(); |
---|
1691 | 1785 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1707 | 1801 | |
---|
1708 | 1802 | group(g); |
---|
1709 | 1803 | } else |
---|
1710 | | - if (event.getSource() == loopItem) |
---|
| 1804 | + if (source == loopItem) |
---|
1711 | 1805 | { |
---|
1712 | 1806 | Composite csg = new GroupLeaf(); |
---|
1713 | 1807 | csg.count = 5; |
---|
.. | .. |
---|
1716 | 1810 | csg.addChild(child); |
---|
1717 | 1811 | child.addChild(csg); |
---|
1718 | 1812 | } else |
---|
1719 | | - if (event.getSource() == doubleItem) |
---|
| 1813 | + if (source == doubleItem) |
---|
1720 | 1814 | { |
---|
1721 | 1815 | Composite csg = new GroupLeaf(); |
---|
1722 | 1816 | csg.count = 5; |
---|
.. | .. |
---|
1728 | 1822 | csg.addChild(child); |
---|
1729 | 1823 | child.addChild(csg); |
---|
1730 | 1824 | } else |
---|
1731 | | - if (event.getSource() == tripleItem) |
---|
| 1825 | + if (source == tripleItem) |
---|
1732 | 1826 | { |
---|
1733 | 1827 | Composite csg = new GroupLeaf(); |
---|
1734 | 1828 | csg.count = 4; |
---|
.. | .. |
---|
1744 | 1838 | child.addChild(csg); |
---|
1745 | 1839 | } else |
---|
1746 | 1840 | |
---|
1747 | | - if (event.getSource() == importGFDItem) |
---|
| 1841 | + if (source == importGFDItem) |
---|
1748 | 1842 | { |
---|
1749 | 1843 | ImportGFD(); |
---|
1750 | 1844 | } else |
---|
1751 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1845 | + if (source == importVRMLX3DItem) |
---|
1752 | 1846 | { |
---|
1753 | 1847 | ImportVRMLX3D(); |
---|
1754 | 1848 | } else |
---|
1755 | | - if (event.getSource() == import3DSItem) |
---|
| 1849 | + if (source == import3DSItem) |
---|
1756 | 1850 | { |
---|
1757 | 1851 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1758 | 1852 | } else |
---|
1759 | | - if (event.getSource() == importOBJItem) |
---|
| 1853 | + if (source == importOBJItem) |
---|
1760 | 1854 | { |
---|
1761 | 1855 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1762 | 1856 | } else |
---|
1763 | | - if (event.getSource() == computeAOItem) |
---|
| 1857 | + if (source == computeAOItem) |
---|
1764 | 1858 | { |
---|
1765 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1766 | | - CameraPane.theRenderer.repaint(); |
---|
| 1859 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1860 | + Globals.theRenderer.repaint(); |
---|
1767 | 1861 | } else |
---|
1768 | | - if (event.getSource() == recompileItem) |
---|
| 1862 | + if (source == recompileItem) |
---|
1769 | 1863 | { |
---|
1770 | 1864 | Recompile(); |
---|
1771 | 1865 | refreshContents(); |
---|
1772 | 1866 | } else |
---|
1773 | | - if (event.getSource() == editScriptItem) |
---|
| 1867 | + if (source == editScriptItem) |
---|
1774 | 1868 | { |
---|
1775 | 1869 | OpenDialog(); |
---|
1776 | 1870 | refreshContents(); |
---|
1777 | 1871 | } else |
---|
1778 | | - if (event.getSource() == invariantsItem) |
---|
| 1872 | + if (source == invariantsItem) |
---|
1779 | 1873 | { |
---|
1780 | 1874 | System.out.println("Invariants:"); |
---|
1781 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1875 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1782 | 1876 | } else |
---|
1783 | | - if (event.getSource() == memoryItem) |
---|
| 1877 | + if (source == memoryItem) |
---|
1784 | 1878 | { |
---|
1785 | 1879 | //System.out.println("Invariants:"); |
---|
1786 | 1880 | PrintMemory(); |
---|
1787 | 1881 | } else |
---|
1788 | | - if (event.getSource() == pathItem) |
---|
| 1882 | + if (source == pathItem) |
---|
1789 | 1883 | { |
---|
1790 | 1884 | PrintPath(); |
---|
1791 | 1885 | } else |
---|
1792 | | - if (event.getSource() == analyzeItem) |
---|
| 1886 | + if (source == analyzeItem) |
---|
1793 | 1887 | { |
---|
1794 | 1888 | AnalyzeObject(); |
---|
1795 | 1889 | } else |
---|
1796 | | - if (event.getSource() == dumpItem) |
---|
| 1890 | + if (source == dumpItem) |
---|
1797 | 1891 | { |
---|
1798 | 1892 | DumpObject(); |
---|
1799 | 1893 | } else |
---|
1800 | | - if (event.getSource() == screenfitButton) |
---|
| 1894 | + if (source == oneStepButton) |
---|
| 1895 | + { |
---|
| 1896 | + Globals.ONESTEP = true; |
---|
| 1897 | + cameraView.repaint(); |
---|
| 1898 | + } else |
---|
| 1899 | + if (source == screenfitButton) |
---|
1801 | 1900 | { |
---|
1802 | 1901 | //Reload(lastConverter, lastFilename, true); |
---|
1803 | 1902 | ScreenFit(); |
---|
1804 | 1903 | } else |
---|
1805 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1904 | + if (source == screenfitpointButton) |
---|
1806 | 1905 | { |
---|
1807 | 1906 | //Reload(lastConverter, lastFilename, true); |
---|
1808 | 1907 | ScreenFitPoint(); |
---|
1809 | 1908 | } else |
---|
1810 | | - if (event.getSource() == snapobjectButton) |
---|
| 1909 | + if (source == snapobjectButton) |
---|
1811 | 1910 | { |
---|
1812 | 1911 | //Reload(lastConverter, lastFilename, true); |
---|
1813 | 1912 | SnapObject(); |
---|
.. | .. |
---|
1818 | 1917 | // Recompile(); |
---|
1819 | 1918 | // refreshContents(); |
---|
1820 | 1919 | // } else |
---|
1821 | | - if (event.getSource() == gcButton) |
---|
| 1920 | + if (source == gcButton) |
---|
1822 | 1921 | { |
---|
1823 | 1922 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1824 | 1923 | System.gc(); |
---|
1825 | 1924 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1826 | 1925 | } else |
---|
1827 | | - if (event.getSource() == editLeafItem) |
---|
| 1926 | + if (source == editLeafItem) |
---|
1828 | 1927 | { |
---|
1829 | 1928 | Object3D obj; |
---|
1830 | 1929 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1838 | 1937 | } |
---|
1839 | 1938 | refreshContents(true); |
---|
1840 | 1939 | } else |
---|
1841 | | - if (event.getSource() == openWindowItem) |
---|
| 1940 | + if (source == openWindowItem) |
---|
1842 | 1941 | { |
---|
1843 | 1942 | EditSelection(true); |
---|
1844 | 1943 | } else |
---|
1845 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1944 | + if (source == cutItem || source == clearButton) |
---|
1846 | 1945 | { |
---|
1847 | 1946 | loadClipboard(true); |
---|
1848 | 1947 | } else |
---|
1849 | | - if (event.getSource() == duplicateItem) |
---|
| 1948 | + if (source == duplicateItem) |
---|
1850 | 1949 | { |
---|
1851 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1950 | + Object3D keep = GrafreeD.clipboard; |
---|
1852 | 1951 | loadClipboard(false); |
---|
1853 | 1952 | paste(false); |
---|
1854 | | - GraphreeD.clipboard = keep; |
---|
| 1953 | + GrafreeD.clipboard = keep; |
---|
1855 | 1954 | } else |
---|
1856 | | - if (event.getSource() == cloneItem) |
---|
| 1955 | + if (source == cloneItem) |
---|
1857 | 1956 | { |
---|
1858 | 1957 | CloneSelection(false); |
---|
1859 | 1958 | } else |
---|
1860 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1959 | + if (source == cloneSupportItem) |
---|
1861 | 1960 | { |
---|
1862 | 1961 | CloneSelection(true); |
---|
1863 | 1962 | } else |
---|
1864 | | - if (event.getSource() == copyItem) |
---|
| 1963 | + if (source == copyItem) |
---|
1865 | 1964 | { |
---|
1866 | 1965 | loadClipboard(false); |
---|
1867 | 1966 | } else |
---|
1868 | | - if (event.getSource() == pasteItem) |
---|
| 1967 | + if (source == pasteItem) |
---|
1869 | 1968 | { |
---|
1870 | 1969 | paste(false); |
---|
1871 | 1970 | } else |
---|
1872 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1971 | + if (source == pasteIntoItem) |
---|
1873 | 1972 | { |
---|
1874 | | - pasteInto(false); |
---|
| 1973 | + pasteInto(true, false); |
---|
1875 | 1974 | } else |
---|
1876 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1975 | + if (source == pasteLinkItem) |
---|
1877 | 1976 | { |
---|
1878 | | - pasteInto(true); |
---|
| 1977 | + pasteInto(false, false); |
---|
1879 | 1978 | } else |
---|
1880 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1979 | + if (source == pasteCloneItem) |
---|
| 1980 | + { |
---|
| 1981 | + pasteInto(true, true); |
---|
| 1982 | + } else |
---|
| 1983 | + if (source == pasteExpandItem) |
---|
1881 | 1984 | { |
---|
1882 | 1985 | paste(true); |
---|
1883 | 1986 | } else |
---|
1884 | | - if (event.getSource() == synchronizeItem) |
---|
| 1987 | + if (source == synchronizeItem) |
---|
1885 | 1988 | { |
---|
1886 | 1989 | Overwrite(Object3D.TRANSFORM); |
---|
1887 | 1990 | } else |
---|
1888 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1991 | + if (source == overwriteNameItem) |
---|
1889 | 1992 | { |
---|
1890 | 1993 | Overwrite(Object3D.NAME); |
---|
1891 | 1994 | } else |
---|
1892 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1995 | + if (source == overwriteUVItem) |
---|
1893 | 1996 | { |
---|
1894 | 1997 | Overwrite(Object3D.UV); |
---|
1895 | 1998 | } else |
---|
1896 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1999 | + if (source == overwriteMatItem) |
---|
1897 | 2000 | { |
---|
| 2001 | + /* july 2015 |
---|
1898 | 2002 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1899 | | - Overwrite(Object3D.MATERIAL); |
---|
| 2003 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1900 | 2004 | else |
---|
1901 | 2005 | { |
---|
1902 | 2006 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1908 | 2012 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1909 | 2013 | } |
---|
1910 | 2014 | } |
---|
| 2015 | + */ |
---|
| 2016 | + |
---|
| 2017 | + Overwrite(dropAttributes); |
---|
1911 | 2018 | } |
---|
1912 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 2019 | + if (source == overwriteGeoItem) |
---|
1913 | 2020 | { |
---|
1914 | 2021 | Overwrite(Object3D.GEOMETRY); |
---|
1915 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2022 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1916 | 2023 | // { |
---|
1917 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2024 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1918 | 2025 | // |
---|
1919 | 2026 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1920 | 2027 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1926 | 2033 | // refreshContents(); |
---|
1927 | 2034 | // } |
---|
1928 | 2035 | } else |
---|
1929 | | - if (event.getSource() == generateMeshItem) |
---|
| 2036 | + if (source == generateMeshItem) |
---|
1930 | 2037 | { |
---|
1931 | 2038 | //if (group.selection.size() == 1) |
---|
1932 | 2039 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1937 | 2044 | ResetModel(); |
---|
1938 | 2045 | refreshContents(); |
---|
1939 | 2046 | } else |
---|
1940 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 2047 | + if (source == extractGeometriesItem) |
---|
1941 | 2048 | { |
---|
1942 | 2049 | boolean one = false; |
---|
1943 | 2050 | |
---|
.. | .. |
---|
1964 | 2071 | ResetModel(); |
---|
1965 | 2072 | refreshContents(); |
---|
1966 | 2073 | } else |
---|
1967 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2074 | + if (source == cloneGeometriesItem) |
---|
1968 | 2075 | { |
---|
1969 | 2076 | boolean one = false; |
---|
1970 | 2077 | |
---|
.. | .. |
---|
1990 | 2097 | ResetModel(); |
---|
1991 | 2098 | refreshContents(); |
---|
1992 | 2099 | } else |
---|
1993 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2100 | + if (source == shareGeometriesItem) |
---|
1994 | 2101 | { |
---|
1995 | 2102 | boolean one = false; |
---|
1996 | 2103 | |
---|
1997 | 2104 | if (group.selection.size() == 1) |
---|
1998 | 2105 | one = true; |
---|
1999 | 2106 | |
---|
| 2107 | + Object3D merge = null; |
---|
| 2108 | + |
---|
2000 | 2109 | Object3D content = new cGroup(); |
---|
2001 | 2110 | |
---|
2002 | 2111 | for (int i=0; i<group.selection.size(); i++) |
---|
2003 | 2112 | { |
---|
2004 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2113 | + merge = new Merge(group.selection.get(i)); |
---|
2005 | 2114 | |
---|
2006 | 2115 | if (one) |
---|
2007 | | - makeSomething(sel, false); |
---|
| 2116 | + makeSomething(merge, false); |
---|
2008 | 2117 | else |
---|
2009 | | - content.addChild(sel); |
---|
| 2118 | + content.addChild(merge); |
---|
2010 | 2119 | } |
---|
2011 | 2120 | |
---|
2012 | 2121 | if (!one) |
---|
2013 | | - makeSomething(content, false); |
---|
2014 | | - |
---|
2015 | | - ResetModel(); |
---|
2016 | | - refreshContents(); |
---|
| 2122 | + makeSomething(content, true); |
---|
| 2123 | + else |
---|
| 2124 | + { |
---|
| 2125 | + ResetModel(); |
---|
| 2126 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2127 | + refreshContents(); |
---|
| 2128 | + } |
---|
2017 | 2129 | } else |
---|
2018 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2130 | + if (source == mergeGeometriesItem) |
---|
2019 | 2131 | { |
---|
2020 | 2132 | boolean one = false; |
---|
2021 | 2133 | |
---|
.. | .. |
---|
2045 | 2157 | ResetModel(); |
---|
2046 | 2158 | refreshContents(); |
---|
2047 | 2159 | } else |
---|
2048 | | - if (event.getSource() == linkverticesItem) |
---|
| 2160 | + if (source == linkverticesItem) |
---|
2049 | 2161 | { |
---|
2050 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2162 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2051 | 2163 | // { |
---|
2052 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2164 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2053 | 2165 | // |
---|
2054 | 2166 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2055 | 2167 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2058 | 2170 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2059 | 2171 | // refreshContents(); |
---|
2060 | 2172 | // } |
---|
2061 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2173 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2062 | 2174 | { |
---|
2063 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2175 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2064 | 2176 | |
---|
2065 | 2177 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2066 | 2178 | content = ((cGroup)content).get(0); |
---|
2067 | 2179 | |
---|
2068 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2180 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2069 | 2181 | for (int i=0; i<group.selection.size(); i++) |
---|
2070 | 2182 | { |
---|
2071 | | - boolean random = CameraPane.RANDOM; |
---|
2072 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2183 | + boolean random = CameraPane.SWITCH; |
---|
| 2184 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2073 | 2185 | group.selection.get(i).linkVerticesThis(content); |
---|
2074 | 2186 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2075 | | - CameraPane.RANDOM = random; |
---|
| 2187 | + CameraPane.SWITCH = random; |
---|
2076 | 2188 | } |
---|
2077 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2189 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2078 | 2190 | refreshContents(); |
---|
2079 | 2191 | } |
---|
2080 | 2192 | } else |
---|
2081 | | - if (event.getSource() == resetsupportItem) |
---|
| 2193 | + if (source == resetsupportItem) |
---|
2082 | 2194 | { |
---|
2083 | 2195 | for (int i=0; i<group.selection.size(); i++) |
---|
2084 | 2196 | { |
---|
2085 | | - boolean random = CameraPane.RANDOM; |
---|
2086 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2197 | + boolean random = CameraPane.SWITCH; |
---|
| 2198 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2087 | 2199 | group.selection.get(i).linkVerticesThis(null); |
---|
2088 | | - CameraPane.RANDOM = random; |
---|
| 2200 | + CameraPane.SWITCH = random; |
---|
2089 | 2201 | } |
---|
2090 | 2202 | |
---|
2091 | 2203 | refreshContents(); |
---|
2092 | 2204 | } else |
---|
2093 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2205 | + if (source == relinkverticesItem) |
---|
| 2206 | + { |
---|
| 2207 | + boolean random = CameraPane.SWITCH; |
---|
| 2208 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
| 2209 | + group.selection.RelinkToSupport(); |
---|
| 2210 | + CameraPane.SWITCH = random; |
---|
| 2211 | + |
---|
| 2212 | + refreshContents(); |
---|
| 2213 | + } else |
---|
| 2214 | + if (source == resetreferencesItem) |
---|
2094 | 2215 | { |
---|
2095 | 2216 | for (int i=0; i<group.selection.size(); i++) |
---|
2096 | 2217 | { |
---|
.. | .. |
---|
2099 | 2220 | |
---|
2100 | 2221 | refreshContents(); |
---|
2101 | 2222 | } else |
---|
2102 | | - if (event.getSource() == setMasterItem) |
---|
| 2223 | + if (source == setMasterItem) |
---|
2103 | 2224 | { |
---|
2104 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2225 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2105 | 2226 | { |
---|
2106 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2227 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2107 | 2228 | |
---|
2108 | 2229 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2109 | 2230 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2112 | 2233 | refreshContents(); |
---|
2113 | 2234 | } |
---|
2114 | 2235 | } else |
---|
2115 | | - if (event.getSource() == poseMeshItem) |
---|
| 2236 | + if (source == poseMeshItem) |
---|
2116 | 2237 | { |
---|
2117 | 2238 | if (group.selection.size() == 1) |
---|
2118 | 2239 | { |
---|
2119 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2240 | + if (GrafreeD.clipboard.size() == 1) |
---|
2120 | 2241 | { |
---|
2121 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2242 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2122 | 2243 | |
---|
2123 | 2244 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2124 | 2245 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2131 | 2252 | } |
---|
2132 | 2253 | |
---|
2133 | 2254 | } else |
---|
2134 | | - if (event.getSource() == revertMeshItem) |
---|
| 2255 | + if (source == revertMeshItem) |
---|
2135 | 2256 | { |
---|
2136 | 2257 | RevertMeshes(); |
---|
2137 | 2258 | } else |
---|
2138 | | - if (event.getSource() == resetMeshItem) |
---|
| 2259 | + if (source == resetMeshItem) |
---|
2139 | 2260 | { |
---|
2140 | 2261 | ResetAll(); |
---|
2141 | 2262 | } else |
---|
2142 | | - if (event.getSource() == stepAllItem) |
---|
| 2263 | + if (source == stepAllItem) |
---|
2143 | 2264 | { |
---|
2144 | 2265 | StepAll(); |
---|
2145 | 2266 | } else |
---|
2146 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2267 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2147 | 2268 | { |
---|
2148 | 2269 | //int indices[] = jList.getSelectedIndices(); |
---|
2149 | 2270 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2151 | 2272 | |
---|
2152 | 2273 | ClearSelection(false); |
---|
2153 | 2274 | } else |
---|
2154 | | - if (event.getSource() == clearAllItem) |
---|
| 2275 | + if (source == clearAllItem) |
---|
2155 | 2276 | { |
---|
2156 | 2277 | ClearSelection(true); |
---|
2157 | 2278 | } else |
---|
2158 | | - if (event.getSource() == grabItem) |
---|
| 2279 | + if (source == grabItem) |
---|
2159 | 2280 | { |
---|
2160 | 2281 | group(new cGroup(), true); |
---|
2161 | 2282 | } else |
---|
2162 | | - if (event.getSource() == frontItem) |
---|
| 2283 | + if (source == hideItem) |
---|
| 2284 | + { |
---|
| 2285 | + group(new HiddenObject()); |
---|
| 2286 | + } else |
---|
| 2287 | + if (source == frontItem) |
---|
2163 | 2288 | { |
---|
2164 | 2289 | front(); |
---|
2165 | 2290 | } else |
---|
2166 | | - if (event.getSource() == backItem) |
---|
| 2291 | + if (source == backItem) |
---|
2167 | 2292 | { |
---|
2168 | 2293 | back(); |
---|
2169 | 2294 | } else |
---|
2170 | | - if (event.getSource() == cameraItem) |
---|
| 2295 | + if (source == cameraItem) |
---|
2171 | 2296 | { |
---|
2172 | 2297 | makeSomething(new Camera()); |
---|
2173 | 2298 | } else |
---|
2174 | | - if (event.getSource() == compositeItem) |
---|
| 2299 | + if (source == compositeItem) |
---|
2175 | 2300 | { |
---|
2176 | 2301 | group(new Composite()); |
---|
2177 | 2302 | } else |
---|
2178 | | - if (event.getSource() == randomItem) |
---|
| 2303 | + if (source == randomItem) |
---|
2179 | 2304 | { |
---|
2180 | 2305 | RandomNode random = new RandomNode(); |
---|
2181 | 2306 | group(random); |
---|
2182 | 2307 | if (random.size() > 0) |
---|
2183 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2308 | + random.name = random.get(0).name + "Switch"; |
---|
2184 | 2309 | } else |
---|
2185 | | - if (event.getSource() == physicsItem) |
---|
| 2310 | + if (source == physicsItem) |
---|
2186 | 2311 | { |
---|
2187 | 2312 | group(new PhysicsNode()); |
---|
2188 | 2313 | } else |
---|
2189 | | - if (event.getSource() == frameselectorItem) |
---|
| 2314 | + if (source == frameselectorItem) |
---|
2190 | 2315 | { |
---|
2191 | 2316 | for (int i=0; i<group.selection.size(); i++) |
---|
2192 | 2317 | { |
---|
.. | .. |
---|
2198 | 2323 | ResetModel(); |
---|
2199 | 2324 | refreshContents(); |
---|
2200 | 2325 | } else |
---|
2201 | | - if (event.getSource() == switchGeoItem) |
---|
| 2326 | + if (source == switchGeoItem) |
---|
2202 | 2327 | { |
---|
2203 | 2328 | for (int i=0; i<group.selection.size(); i++) |
---|
2204 | 2329 | { |
---|
.. | .. |
---|
2210 | 2335 | ResetModel(); |
---|
2211 | 2336 | refreshContents(); |
---|
2212 | 2337 | } else |
---|
2213 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2338 | + if (source == switchTransfoItem) |
---|
2214 | 2339 | { |
---|
2215 | 2340 | for (int i=0; i<group.selection.size(); i++) |
---|
2216 | 2341 | { |
---|
.. | .. |
---|
2222 | 2347 | ResetModel(); |
---|
2223 | 2348 | refreshContents(); |
---|
2224 | 2349 | } else |
---|
2225 | | - if (event.getSource() == morphItem) |
---|
| 2350 | + if (source == morphItem) |
---|
2226 | 2351 | { |
---|
2227 | 2352 | for (int i=0; i<group.selection.size(); i++) |
---|
2228 | 2353 | { |
---|
.. | .. |
---|
2234 | 2359 | ResetModel(); |
---|
2235 | 2360 | refreshContents(); |
---|
2236 | 2361 | } else |
---|
2237 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2362 | + if (source == scriptNodeItem) |
---|
2238 | 2363 | { |
---|
2239 | 2364 | boolean atleastone = false; |
---|
2240 | 2365 | |
---|
.. | .. |
---|
2273 | 2398 | } |
---|
2274 | 2399 | } |
---|
2275 | 2400 | } else |
---|
2276 | | - if (event.getSource() == linkerItem) |
---|
| 2401 | + if (source == linkerItem) |
---|
2277 | 2402 | { |
---|
2278 | 2403 | group(new cLinker()); |
---|
2279 | 2404 | } else |
---|
2280 | | - if (event.getSource() == textureItem) |
---|
| 2405 | + if (source == textureItem) |
---|
2281 | 2406 | { |
---|
2282 | 2407 | group(new TextureNode()); |
---|
2283 | 2408 | } else |
---|
2284 | | - if (event.getSource() == shadowXItem) |
---|
| 2409 | + if (source == billboardItem) |
---|
| 2410 | + { |
---|
| 2411 | + group(new BillboardNode()); |
---|
| 2412 | + } else |
---|
| 2413 | + if (source == shadowXItem) |
---|
2285 | 2414 | { |
---|
2286 | 2415 | CastShadow(0); |
---|
2287 | 2416 | } else |
---|
2288 | | - if (event.getSource() == shadowYItem) |
---|
| 2417 | + if (source == shadowYItem) |
---|
2289 | 2418 | { |
---|
2290 | 2419 | CastShadow(1); |
---|
2291 | 2420 | } else |
---|
2292 | | - if (event.getSource() == shadowZItem) |
---|
| 2421 | + if (source == shadowZItem) |
---|
2293 | 2422 | { |
---|
2294 | 2423 | CastShadow(2); |
---|
2295 | 2424 | } else |
---|
2296 | | - if (event.getSource() == ungroupItem) |
---|
| 2425 | + if (source == ungroupItem) |
---|
2297 | 2426 | { |
---|
2298 | | - ungroup(); |
---|
| 2427 | + //ungroup(); |
---|
| 2428 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2429 | + { |
---|
| 2430 | + Ungroup(group.selection.get(i)); |
---|
| 2431 | + } |
---|
| 2432 | + |
---|
| 2433 | + ClearSelection(false); |
---|
| 2434 | + |
---|
| 2435 | + refreshContents(); |
---|
2299 | 2436 | } else |
---|
2300 | | - if (event.getSource() == genUVItem) |
---|
| 2437 | + if (source == genUVItem) |
---|
2301 | 2438 | { |
---|
2302 | 2439 | GenUV(); |
---|
2303 | 2440 | } else |
---|
2304 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2441 | + if (source == genNormalsCADItem) |
---|
2305 | 2442 | { |
---|
2306 | 2443 | GenNormals(true); |
---|
2307 | 2444 | } else |
---|
2308 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2445 | + if (source == genNormalsMESHItem) |
---|
| 2446 | + { |
---|
| 2447 | + GenNormals(true); // TODO |
---|
| 2448 | + } else |
---|
| 2449 | + if (source == genNormalsORGANItem) |
---|
2309 | 2450 | { |
---|
2310 | 2451 | GenNormals(false); |
---|
2311 | 2452 | } else |
---|
2312 | | - if (event.getSource() == stripifyItem) |
---|
| 2453 | + if (source == genNormalsMINEItem) |
---|
| 2454 | + { |
---|
| 2455 | + GenNormalsMINE(); |
---|
| 2456 | + } else |
---|
| 2457 | + if (source == stripifyItem) |
---|
2313 | 2458 | { |
---|
2314 | 2459 | Stripify(); |
---|
2315 | 2460 | } else |
---|
2316 | | - if (event.getSource() == unstripifyItem) |
---|
| 2461 | + if (source == unstripifyItem) |
---|
2317 | 2462 | { |
---|
2318 | 2463 | Unstripify(); |
---|
2319 | 2464 | } else |
---|
2320 | | - if (event.getSource() == trimItem) |
---|
| 2465 | + if (source == trimItem) |
---|
2321 | 2466 | { |
---|
2322 | 2467 | Trim(); |
---|
2323 | 2468 | } else |
---|
2324 | | - if (event.getSource() == untrimItem) |
---|
| 2469 | + if (source == untrimItem) |
---|
2325 | 2470 | { |
---|
2326 | 2471 | Untrim(); |
---|
2327 | 2472 | } else |
---|
2328 | | - if (event.getSource() == clearColorsItem) |
---|
| 2473 | + if (source == clearColorsItem) |
---|
2329 | 2474 | { |
---|
2330 | 2475 | ClearColors(); |
---|
2331 | 2476 | } else |
---|
2332 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2477 | + if (source == clearMaterialsItem) |
---|
2333 | 2478 | { |
---|
2334 | 2479 | ClearMaterials(); |
---|
2335 | 2480 | } else |
---|
2336 | | - if (event.getSource() == liveleavesItem) |
---|
| 2481 | + if (source == liveleavesItem) |
---|
2337 | 2482 | { |
---|
2338 | 2483 | LiveLeaves(true); |
---|
2339 | 2484 | } else |
---|
2340 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2485 | + if (source == unliveleavesItem) |
---|
2341 | 2486 | { |
---|
2342 | 2487 | LiveLeaves(false); |
---|
2343 | 2488 | } else |
---|
2344 | | - if (event.getSource() == supportleavesItem) |
---|
| 2489 | + if (source == supportleavesItem) |
---|
2345 | 2490 | { |
---|
2346 | 2491 | SupportLeaves(true); |
---|
2347 | 2492 | } else |
---|
2348 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2493 | + if (source == unsupportleavesItem) |
---|
2349 | 2494 | { |
---|
2350 | 2495 | SupportLeaves(false); |
---|
2351 | 2496 | } else |
---|
2352 | | - if (event.getSource() == hideleavesItem) |
---|
| 2497 | + if (source == hideleavesItem) |
---|
2353 | 2498 | { |
---|
2354 | 2499 | HideLeaves(true); |
---|
2355 | 2500 | } else |
---|
2356 | | - if (event.getSource() == showleavesItem) |
---|
| 2501 | + if (source == showleavesItem) |
---|
2357 | 2502 | { |
---|
2358 | 2503 | HideLeaves(false); |
---|
2359 | 2504 | } else |
---|
2360 | | - if (event.getSource() == markleavesItem) |
---|
| 2505 | + if (source == markleavesItem) |
---|
2361 | 2506 | { |
---|
2362 | 2507 | MarkLeaves(true); |
---|
2363 | 2508 | } else |
---|
2364 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2509 | + if (source == unmarkleavesItem) |
---|
2365 | 2510 | { |
---|
2366 | 2511 | MarkLeaves(false); |
---|
2367 | 2512 | } else |
---|
2368 | | - if (event.getSource() == flipVItem) |
---|
| 2513 | + if (source == flipVItem) |
---|
2369 | 2514 | { |
---|
2370 | 2515 | FlipV(true); |
---|
2371 | 2516 | } else |
---|
2372 | | - if (event.getSource() == unflipVItem) |
---|
| 2517 | + if (source == unflipVItem) |
---|
2373 | 2518 | { |
---|
2374 | 2519 | FlipV(false); |
---|
2375 | 2520 | } else |
---|
2376 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2521 | + if (source == lowTexturesItem) |
---|
2377 | 2522 | { |
---|
2378 | 2523 | SetTexRes(0); |
---|
2379 | 2524 | } else |
---|
2380 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2525 | + if (source == normalTexturesItem) |
---|
2381 | 2526 | { |
---|
2382 | 2527 | SetTexRes(1); |
---|
2383 | 2528 | } else |
---|
2384 | | - if (event.getSource() == highTexturesItem) |
---|
| 2529 | + if (source == highTexturesItem) |
---|
2385 | 2530 | { |
---|
2386 | 2531 | SetTexRes(2); |
---|
2387 | 2532 | } else |
---|
2388 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2533 | + if (source == veryhighTexturesItem) |
---|
2389 | 2534 | { |
---|
2390 | 2535 | SetTexRes(3); |
---|
2391 | 2536 | } else |
---|
2392 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2537 | + if (source == maxTexturesItem) |
---|
2393 | 2538 | { |
---|
2394 | 2539 | SetTexRes(4); |
---|
2395 | 2540 | } else |
---|
2396 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2541 | + if (source == panoTexturesItem) |
---|
2397 | 2542 | { |
---|
2398 | 2543 | SetTexRes(5); |
---|
2399 | 2544 | } else |
---|
2400 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2545 | + if (source == reverseNormalsItem) |
---|
2401 | 2546 | { |
---|
2402 | 2547 | ReverseNormals(); |
---|
2403 | 2548 | } else |
---|
2404 | | - if (event.getSource() == parseverticesItem) |
---|
| 2549 | + if (source == parseverticesItem) |
---|
2405 | 2550 | { |
---|
2406 | 2551 | ParseVertices(); |
---|
2407 | 2552 | } else |
---|
2408 | | - if (event.getSource() == textureFieldItem) |
---|
| 2553 | + if (source == textureFieldItem) |
---|
2409 | 2554 | { |
---|
2410 | 2555 | TextureVertices(); |
---|
2411 | 2556 | } else |
---|
2412 | | - if (event.getSource() == alignItem) |
---|
| 2557 | + if (source == alignItem) |
---|
2413 | 2558 | { |
---|
2414 | 2559 | Align(); |
---|
2415 | 2560 | } else |
---|
2416 | | - if (event.getSource() == mirrorItem) |
---|
| 2561 | + if (source == mirrorItem) |
---|
2417 | 2562 | { |
---|
2418 | 2563 | MirrorPoses(); |
---|
2419 | 2564 | } else |
---|
2420 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2565 | + if (source == reduceMorphItem) |
---|
2421 | 2566 | { |
---|
2422 | 2567 | MeshReduction(false); |
---|
2423 | 2568 | } else |
---|
2424 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2569 | + if (source == reduce34MorphItem) |
---|
2425 | 2570 | { |
---|
2426 | 2571 | MeshReduction(true); |
---|
2427 | 2572 | } else |
---|
2428 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2573 | + if (source == reverseTrianglesItem) |
---|
2429 | 2574 | { |
---|
2430 | 2575 | ReverseTriangles(); |
---|
2431 | 2576 | } else |
---|
2432 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2577 | + if (source == reduceMeshItem) |
---|
2433 | 2578 | { |
---|
2434 | 2579 | ReduceMesh(false); |
---|
2435 | 2580 | } else |
---|
2436 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2581 | + if (source == reduce34MeshItem) |
---|
2437 | 2582 | { |
---|
2438 | 2583 | ReduceMesh(true); |
---|
2439 | 2584 | } else |
---|
2440 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2585 | + if (source == increaseMeshItem) |
---|
2441 | 2586 | { |
---|
2442 | 2587 | IncreaseMesh(); |
---|
2443 | 2588 | } else |
---|
2444 | | - if (event.getSource() == clipMeshItem) |
---|
| 2589 | + if (source == clipMeshItem) |
---|
2445 | 2590 | { |
---|
2446 | 2591 | ClipMesh(); |
---|
2447 | 2592 | } else |
---|
2448 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2593 | + if (source == smoothMeshItem) |
---|
2449 | 2594 | { |
---|
2450 | 2595 | SmoothMesh(); |
---|
2451 | 2596 | } else |
---|
2452 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2597 | + if (source == transformgeometryItem) |
---|
2453 | 2598 | { |
---|
2454 | 2599 | TransformGeometry(); |
---|
2455 | 2600 | } else |
---|
2456 | | - if (event.getSource() == resetTransformItem) |
---|
| 2601 | + if (source == resetTransformItem) |
---|
2457 | 2602 | { |
---|
2458 | 2603 | ResetTransform(); |
---|
2459 | 2604 | } else |
---|
2460 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2605 | + if (source == resetCentroidItem) |
---|
2461 | 2606 | { |
---|
2462 | 2607 | ResetCentroid(); |
---|
2463 | 2608 | } else |
---|
2464 | | - if (event.getSource() == resetParentItem) |
---|
| 2609 | + if (source == resetParentItem) |
---|
2465 | 2610 | { |
---|
2466 | 2611 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2467 | 2612 | { |
---|
.. | .. |
---|
2471 | 2616 | |
---|
2472 | 2617 | refreshContents(); |
---|
2473 | 2618 | } else |
---|
2474 | | - if (event.getSource() == repairParentItem) |
---|
| 2619 | + if (source == repairParentItem) |
---|
2475 | 2620 | { |
---|
2476 | 2621 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2477 | 2622 | { |
---|
.. | .. |
---|
2485 | 2630 | |
---|
2486 | 2631 | refreshContents(); |
---|
2487 | 2632 | } else |
---|
2488 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2633 | + if (source == repairShadowItem) |
---|
| 2634 | + { |
---|
| 2635 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2636 | + { |
---|
| 2637 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2638 | + obj.RepairShadow(); |
---|
| 2639 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2640 | +// { |
---|
| 2641 | +// obj.get(i).parent = obj; |
---|
| 2642 | +// } |
---|
| 2643 | + } |
---|
| 2644 | + |
---|
| 2645 | + refreshContents(); |
---|
| 2646 | + } else |
---|
| 2647 | + if (source == sortbysizeItem) |
---|
2489 | 2648 | { |
---|
2490 | 2649 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2491 | 2650 | { |
---|
.. | .. |
---|
2497 | 2656 | ResetModel(); |
---|
2498 | 2657 | refreshContents(); |
---|
2499 | 2658 | } else |
---|
2500 | | - if (event.getSource() == sortbynameItem) |
---|
| 2659 | + if (source == sortbynameItem) |
---|
2501 | 2660 | { |
---|
2502 | 2661 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2503 | 2662 | { |
---|
.. | .. |
---|
2509 | 2668 | ResetModel(); |
---|
2510 | 2669 | refreshContents(); |
---|
2511 | 2670 | } else |
---|
2512 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2671 | + if (source == attachPigmentItem) |
---|
2513 | 2672 | { |
---|
2514 | 2673 | String texture = GetFile("Attach pigment"); |
---|
2515 | 2674 | Object3D obj; |
---|
.. | .. |
---|
2521 | 2680 | |
---|
2522 | 2681 | refreshContents(); |
---|
2523 | 2682 | } else |
---|
2524 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2683 | + if (source == detachPigmentItem) |
---|
2525 | 2684 | { |
---|
2526 | 2685 | Object3D obj; |
---|
2527 | 2686 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2532 | 2691 | |
---|
2533 | 2692 | refreshContents(); |
---|
2534 | 2693 | } else |
---|
2535 | | - if (event.getSource() == attachBumpItem) |
---|
| 2694 | + if (source == attachBumpItem) |
---|
2536 | 2695 | { |
---|
2537 | 2696 | String texture = GetFile("Attach bump"); |
---|
2538 | 2697 | Object3D obj; |
---|
.. | .. |
---|
2544 | 2703 | |
---|
2545 | 2704 | refreshContents(); |
---|
2546 | 2705 | } else |
---|
2547 | | - if (event.getSource() == detachBumpItem) |
---|
| 2706 | + if (source == detachBumpItem) |
---|
2548 | 2707 | { |
---|
2549 | 2708 | Object3D obj; |
---|
2550 | 2709 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2555 | 2714 | |
---|
2556 | 2715 | refreshContents(); |
---|
2557 | 2716 | } else |
---|
2558 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2717 | + if (source == pigmentBumpItem) |
---|
2559 | 2718 | { |
---|
2560 | 2719 | Object3D obj; |
---|
2561 | 2720 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2566 | 2725 | |
---|
2567 | 2726 | refreshContents(); |
---|
2568 | 2727 | } else |
---|
2569 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2728 | + if (source == flashSelectionButton) |
---|
2570 | 2729 | { |
---|
2571 | 2730 | CameraPane.flash = true; |
---|
2572 | 2731 | refreshContents(); |
---|
2573 | 2732 | } else |
---|
2574 | | - if (event.getSource() == oneButton) |
---|
| 2733 | + if (source == oneButton) |
---|
2575 | 2734 | { |
---|
2576 | 2735 | } else |
---|
2577 | | - if (event.getSource() == twoButton) |
---|
| 2736 | + if (source == twoButton) |
---|
2578 | 2737 | { |
---|
2579 | 2738 | radio.layout = twoButton; |
---|
2580 | 2739 | // bug |
---|
2581 | 2740 | //gridPanel.setDividerLocation(1.0); |
---|
2582 | 2741 | //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(); |
---|
| 2742 | +// bigThree.remove(scenePanel); |
---|
| 2743 | +// bigThree.remove(centralPanel); |
---|
| 2744 | +// bigThree.remove(XYZPanel); |
---|
| 2745 | +// aWindowConstraints.gridx = 0; |
---|
| 2746 | +// aWindowConstraints.gridy = 0; |
---|
| 2747 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2748 | +// // aConstraints.gridheight = 3; |
---|
| 2749 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2750 | +// aWindowConstraints.weightx = 0; |
---|
| 2751 | +// aWindowConstraints.weighty = 1; |
---|
| 2752 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2753 | +// aWindowConstraints.weightx = 1; |
---|
| 2754 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2755 | +// // aConstraints.gridheight = 3; |
---|
| 2756 | +// aWindowConstraints.gridx = 1; |
---|
| 2757 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2758 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2759 | +// aWindowConstraints.weightx = 0; |
---|
| 2760 | +// aWindowConstraints.gridx = 4; |
---|
| 2761 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2762 | +// // aConstraints.gridheight = 3; |
---|
| 2763 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2764 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2765 | +// scenePanel.setVisible(false); |
---|
| 2766 | +// centralPanel.setVisible(true); |
---|
| 2767 | +// XYZPanel.setVisible(false); |
---|
| 2768 | + bigThree.ClearUI(); |
---|
| 2769 | + bigThree.add(centralPanel); |
---|
| 2770 | + bigThree.FlushUI(); |
---|
2607 | 2771 | } else |
---|
2608 | | - if (event.getSource() == threeButton) |
---|
| 2772 | + if (source == threeButton) |
---|
2609 | 2773 | { |
---|
2610 | 2774 | 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(); |
---|
| 2775 | + |
---|
| 2776 | +// bigThree.remove(scenePanel); |
---|
| 2777 | +// bigThree.remove(centralPanel); |
---|
| 2778 | +// bigThree.remove(XYZPanel); |
---|
| 2779 | +// aWindowConstraints.gridx = 0; |
---|
| 2780 | +// aWindowConstraints.gridy = 0; |
---|
| 2781 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2782 | +// // aConstraints.gridheight = 3; |
---|
| 2783 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2784 | +// aWindowConstraints.weightx = 0; |
---|
| 2785 | +// aWindowConstraints.weighty = 1; |
---|
| 2786 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2787 | +// aWindowConstraints.weightx = 1; |
---|
| 2788 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2789 | +// // aConstraints.gridheight = 3; |
---|
| 2790 | +// aWindowConstraints.gridx = 1; |
---|
| 2791 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2792 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2793 | +// aWindowConstraints.weightx = 0; |
---|
| 2794 | +// aWindowConstraints.gridx = 4; |
---|
| 2795 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2796 | +// // aConstraints.gridheight = 3; |
---|
| 2797 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2798 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2799 | +// bigThree.validate(); |
---|
| 2800 | +// scenePanel.setVisible(false); |
---|
| 2801 | +// centralPanel.setVisible(true); |
---|
| 2802 | +// XYZPanel.setVisible(true); |
---|
| 2803 | + bigThree.ClearUI(); |
---|
| 2804 | + bigThree.add(centralPanel); |
---|
| 2805 | + bigThree.add(XYZPanel); |
---|
| 2806 | + bigThree.FlushUI(); |
---|
2635 | 2807 | } else |
---|
2636 | | - if (event.getSource() == fourButton) |
---|
| 2808 | + if (source == fourButton) |
---|
2637 | 2809 | { |
---|
2638 | 2810 | 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(); |
---|
| 2811 | + |
---|
| 2812 | +// bigThree.remove(scenePanel); |
---|
| 2813 | +// bigThree.remove(centralPanel); |
---|
| 2814 | +// bigThree.remove(XYZPanel); |
---|
| 2815 | +// aWindowConstraints.gridx = 0; |
---|
| 2816 | +// aWindowConstraints.gridy = 0; |
---|
| 2817 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2818 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2819 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2820 | +// aWindowConstraints.weightx = 1; |
---|
| 2821 | +// aWindowConstraints.weighty = 1; |
---|
| 2822 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2823 | +// aWindowConstraints.weightx = 1; |
---|
| 2824 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2825 | +// // aConstraints.gridheight = 3; |
---|
| 2826 | +// aWindowConstraints.gridx = 1; |
---|
| 2827 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2828 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2829 | +// aWindowConstraints.weightx = 0; |
---|
| 2830 | +// aWindowConstraints.gridx = 4; |
---|
| 2831 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2832 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2833 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2834 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2835 | +// bigThree.validate(); |
---|
| 2836 | +// scenePanel.setVisible(true); |
---|
| 2837 | +// centralPanel.setVisible(false); |
---|
| 2838 | +// XYZPanel.setVisible(false); |
---|
| 2839 | + bigThree.ClearUI(); |
---|
| 2840 | + bigThree.add(scenePanel); |
---|
| 2841 | + bigThree.FlushUI(); |
---|
2663 | 2842 | } else |
---|
2664 | | - if (event.getSource() == sixButton) |
---|
| 2843 | + if (source == sixButton) |
---|
2665 | 2844 | { |
---|
2666 | 2845 | 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(); |
---|
| 2846 | + |
---|
| 2847 | +// bigThree.remove(scenePanel); |
---|
| 2848 | +// bigThree.remove(centralPanel); |
---|
| 2849 | +// bigThree.remove(XYZPanel); |
---|
| 2850 | +// aWindowConstraints.gridx = 0; |
---|
| 2851 | +// aWindowConstraints.gridy = 0; |
---|
| 2852 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2853 | +// // aConstraints.gridheight = 3; |
---|
| 2854 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2855 | +// aWindowConstraints.weightx = 0; |
---|
| 2856 | +// aWindowConstraints.weighty = 1; |
---|
| 2857 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2858 | +// aWindowConstraints.weightx = 1; |
---|
| 2859 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2860 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2861 | +// aWindowConstraints.gridx = 1; |
---|
| 2862 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2863 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2864 | +// aWindowConstraints.weightx = 0; |
---|
| 2865 | +// aWindowConstraints.gridx = 4; |
---|
| 2866 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2867 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2868 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2869 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2870 | +// bigThree.validate(); |
---|
| 2871 | +// scenePanel.setVisible(true); |
---|
| 2872 | +// centralPanel.setVisible(true); |
---|
| 2873 | +// XYZPanel.setVisible(false); |
---|
| 2874 | + bigThree.ClearUI(); |
---|
| 2875 | + bigThree.add(scenePanel); |
---|
| 2876 | + bigThree.add(centralPanel); |
---|
| 2877 | + bigThree.FlushUI(); |
---|
2691 | 2878 | } else |
---|
2692 | | - if (event.getSource() == sevenButton) |
---|
| 2879 | + if (source == sevenButton) |
---|
2693 | 2880 | { |
---|
2694 | 2881 | 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(); |
---|
| 2882 | + |
---|
| 2883 | +// bigThree.remove(scenePanel); |
---|
| 2884 | +// bigThree.remove(centralPanel); |
---|
| 2885 | +// bigThree.remove(XYZPanel); |
---|
| 2886 | +// aWindowConstraints.gridx = 0; |
---|
| 2887 | +// aWindowConstraints.gridy = 0; |
---|
| 2888 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2889 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2890 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2891 | +// aWindowConstraints.weightx = 0; |
---|
| 2892 | +// aWindowConstraints.weighty = 1; |
---|
| 2893 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2894 | +// aWindowConstraints.weightx = 1; |
---|
| 2895 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2896 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2897 | +// aWindowConstraints.gridx = 1; |
---|
| 2898 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2899 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2900 | +// aWindowConstraints.weightx = 0; |
---|
| 2901 | +// aWindowConstraints.gridx = 4; |
---|
| 2902 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2903 | +// // aConstraints.gridheight = 3; |
---|
| 2904 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2905 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2906 | +// bigThree.validate(); |
---|
| 2907 | +// scenePanel.setVisible(true); |
---|
| 2908 | +// centralPanel.setVisible(true); |
---|
| 2909 | +// XYZPanel.setVisible(true); |
---|
| 2910 | + bigThree.ClearUI(); |
---|
| 2911 | + bigThree.add(scenePanel); |
---|
| 2912 | + bigThree.add(centralPanel); |
---|
| 2913 | + bigThree.add(XYZPanel); |
---|
| 2914 | + bigThree.FlushUI(); |
---|
2719 | 2915 | } else |
---|
2720 | | - if (event.getSource() == rootButton) |
---|
| 2916 | + if (source == rootButton) |
---|
2721 | 2917 | { |
---|
2722 | 2918 | Object3D obj; |
---|
2723 | 2919 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2729 | 2925 | |
---|
2730 | 2926 | refreshContents(true); |
---|
2731 | 2927 | } else |
---|
2732 | | - if (event.getSource() == closeButton) |
---|
| 2928 | + if (source == closeButton) |
---|
2733 | 2929 | { |
---|
2734 | 2930 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2735 | 2931 | cRadio ab; |
---|
.. | .. |
---|
2750 | 2946 | } |
---|
2751 | 2947 | refreshContents(true); |
---|
2752 | 2948 | } else |
---|
2753 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2949 | + if (source == editItem || source == editButton) |
---|
2754 | 2950 | { |
---|
2755 | 2951 | EditSelection(false); |
---|
2756 | 2952 | } else |
---|
2757 | | - if (event.getSource() == uneditButton) |
---|
| 2953 | + if (source == uneditButton) |
---|
2758 | 2954 | { |
---|
2759 | 2955 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2760 | 2956 | { |
---|
.. | .. |
---|
2766 | 2962 | |
---|
2767 | 2963 | child.editWindow = null; // ??????????? |
---|
2768 | 2964 | } |
---|
2769 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2965 | + objEditor.ctrlPanel.FlushUI(); |
---|
2770 | 2966 | //objEditor.jTree.clearSelection(); |
---|
2771 | 2967 | //objEditor.ResetSliders(); |
---|
2772 | 2968 | refreshContents(true); |
---|
2773 | 2969 | } else |
---|
2774 | | - if (event.getSource() == clearPanelButton) |
---|
| 2970 | + if (source == clearPanelButton) |
---|
2775 | 2971 | { |
---|
2776 | 2972 | assert(copy == group); |
---|
2777 | 2973 | //copy.ClearUI(); |
---|
.. | .. |
---|
2782 | 2978 | listUI.clear(); |
---|
2783 | 2979 | refreshContents(true); |
---|
2784 | 2980 | } else |
---|
2785 | | - if (event.getSource() == allParamsButton) |
---|
| 2981 | + if (source == allParamsButton) |
---|
2786 | 2982 | { |
---|
2787 | 2983 | assert(copy == group); |
---|
2788 | 2984 | |
---|
.. | .. |
---|
2803 | 2999 | |
---|
2804 | 3000 | refreshContents(true); |
---|
2805 | 3001 | } else |
---|
2806 | | - if (event.getSource() == unselectButton) |
---|
| 3002 | + if (source == unselectButton) |
---|
2807 | 3003 | { |
---|
2808 | 3004 | objEditor.jTree.clearSelection(); |
---|
2809 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 3005 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2810 | 3006 | objEditor.ResetSliders(); |
---|
2811 | 3007 | refreshContents(true); |
---|
2812 | 3008 | } else |
---|
2813 | | - if(event.getSource() instanceof cRadio) |
---|
| 3009 | + if(source instanceof cRadio) |
---|
2814 | 3010 | { |
---|
2815 | 3011 | group.parent = keepparent; |
---|
2816 | 3012 | group.attributes = 0; |
---|
2817 | 3013 | //group.editWindow = null; |
---|
2818 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 3014 | + /*cRadio*/ radio = (cRadio)source; |
---|
2819 | 3015 | Object3D obj = radio.GetObject(); |
---|
2820 | 3016 | System.out.println("Edit " + obj); |
---|
2821 | 3017 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2835 | 3031 | } |
---|
2836 | 3032 | |
---|
2837 | 3033 | copy = group; |
---|
2838 | | - //CameraPane.theRenderer.object = group; |
---|
| 3034 | + //Globals.theRenderer.object = group; |
---|
2839 | 3035 | if(!useclient) |
---|
2840 | 3036 | { |
---|
2841 | 3037 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2844 | 3040 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2845 | 3041 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2846 | 3042 | cameraView.object = group; |
---|
2847 | | - cameraView.lighttouched = true; |
---|
| 3043 | + //cameraView.lighttouched = true; |
---|
| 3044 | + Globals.lighttouched = true; |
---|
2848 | 3045 | topView.object = group; |
---|
2849 | 3046 | frontView.object = group; |
---|
2850 | 3047 | sideView.object = group; |
---|
.. | .. |
---|
2880 | 3077 | if (useclient) |
---|
2881 | 3078 | { |
---|
2882 | 3079 | cameraView.object = client; |
---|
2883 | | - cameraView.lighttouched = true; |
---|
| 3080 | + Globals.lighttouched = true; |
---|
2884 | 3081 | //topView.object = client; |
---|
2885 | 3082 | //frontView.object = client; |
---|
2886 | 3083 | //sideView.object = client; |
---|
.. | .. |
---|
2888 | 3085 | else |
---|
2889 | 3086 | { |
---|
2890 | 3087 | cameraView.object = group; |
---|
2891 | | - cameraView.lighttouched = true; |
---|
| 3088 | + Globals.lighttouched = true; |
---|
2892 | 3089 | //topView.object = group; |
---|
2893 | 3090 | //frontView.object = group; |
---|
2894 | 3091 | //sideView.object = group; |
---|
.. | .. |
---|
3121 | 3318 | obj = (Object3D)e.nextElement(); |
---|
3122 | 3319 | |
---|
3123 | 3320 | System.out.println("Object is: " + obj); |
---|
3124 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3321 | + GrafreeD.AnalyzeObject(obj); |
---|
3125 | 3322 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3126 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3323 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3127 | 3324 | |
---|
3128 | 3325 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3129 | 3326 | } |
---|
.. | .. |
---|
3165 | 3362 | void GenNormals(boolean crease) |
---|
3166 | 3363 | { |
---|
3167 | 3364 | group.GenNormalsS(crease); |
---|
| 3365 | + |
---|
| 3366 | + refreshContents(); |
---|
| 3367 | + } |
---|
| 3368 | + |
---|
| 3369 | + void GenNormalsMINE() |
---|
| 3370 | + { |
---|
| 3371 | + group.selection.GenNormalsMINE(); |
---|
3168 | 3372 | |
---|
3169 | 3373 | refreshContents(); |
---|
3170 | 3374 | } |
---|
.. | .. |
---|
3250 | 3454 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3251 | 3455 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3252 | 3456 | // |
---|
3253 | | -// g.add(GraphreeD.clipboard); |
---|
| 3457 | +// g.add(GrafreeD.clipboard); |
---|
3254 | 3458 | // |
---|
3255 | 3459 | // buffer.add(g); |
---|
3256 | 3460 | // } |
---|
.. | .. |
---|
3269 | 3473 | // nodes = new Object3D(); |
---|
3270 | 3474 | // vertices = new Vector<Vertex>(); |
---|
3271 | 3475 | // |
---|
3272 | | -// boolean epsequal = GraphreeD.epsequal; |
---|
3273 | | -// GraphreeD.epsequal = true; |
---|
| 3476 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3477 | +// GrafreeD.epsequal = true; |
---|
3274 | 3478 | // |
---|
3275 | 3479 | // for (int i=0; i<group.selection.size(); i++) |
---|
3276 | 3480 | // { |
---|
.. | .. |
---|
3311 | 3515 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3312 | 3516 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3313 | 3517 | // |
---|
3314 | | -// g.add(GraphreeD.clipboard); |
---|
| 3518 | +// g.add(GrafreeD.clipboard); |
---|
3315 | 3519 | // |
---|
3316 | 3520 | // buffer.add(g); |
---|
3317 | 3521 | // } |
---|
.. | .. |
---|
3319 | 3523 | // makeSomething(buffer, i==group.selection.size()-1); |
---|
3320 | 3524 | // } |
---|
3321 | 3525 | // |
---|
3322 | | -// GraphreeD.epsequal = epsequal; |
---|
| 3526 | +// GrafreeD.epsequal = epsequal; |
---|
3323 | 3527 | // |
---|
3324 | 3528 | // //buffer = null; |
---|
3325 | 3529 | // temprep = null; |
---|
.. | .. |
---|
3330 | 3534 | |
---|
3331 | 3535 | void ParseVertices() |
---|
3332 | 3536 | { |
---|
3333 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3334 | | - GraphreeD.epsequal = true; |
---|
| 3537 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3538 | + GrafreeD.epsequal = true; |
---|
3335 | 3539 | |
---|
3336 | 3540 | for (int i=0; i<group.selection.size(); i++) |
---|
3337 | 3541 | { |
---|
.. | .. |
---|
3356 | 3560 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3357 | 3561 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3358 | 3562 | |
---|
3359 | | - g.add(GraphreeD.clipboard); |
---|
| 3563 | + g.add(GrafreeD.clipboard); |
---|
3360 | 3564 | |
---|
3361 | 3565 | buffer.add(g); |
---|
3362 | 3566 | } |
---|
.. | .. |
---|
3371 | 3575 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3372 | 3576 | } |
---|
3373 | 3577 | |
---|
3374 | | - GraphreeD.epsequal = epsequal; |
---|
| 3578 | + GrafreeD.epsequal = epsequal; |
---|
3375 | 3579 | |
---|
3376 | 3580 | refreshContents(); |
---|
3377 | 3581 | } |
---|
.. | .. |
---|
3389 | 3593 | String pigment = Object3D.GetPigment(tex); |
---|
3390 | 3594 | //String bump = Object3D.GetBump(tex); |
---|
3391 | 3595 | |
---|
3392 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3596 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
3393 | 3597 | |
---|
3394 | 3598 | double s = v.s; |
---|
3395 | 3599 | |
---|
.. | .. |
---|
3416 | 3620 | scale /= 3; |
---|
3417 | 3621 | |
---|
3418 | 3622 | scale /= 0xFF; |
---|
3419 | | - scale /= 4; |
---|
| 3623 | + // c'est quoi ca? scale /= 4; |
---|
3420 | 3624 | |
---|
3421 | 3625 | //v.AO = scale; |
---|
3422 | 3626 | |
---|
.. | .. |
---|
3437 | 3641 | |
---|
3438 | 3642 | void Align() |
---|
3439 | 3643 | { |
---|
| 3644 | + if (group.selection.size() == 0) |
---|
| 3645 | + return; |
---|
| 3646 | + |
---|
| 3647 | + cVector bbmin = new cVector(); |
---|
| 3648 | + cVector bbmax = new cVector(); |
---|
| 3649 | + |
---|
| 3650 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3651 | + |
---|
| 3652 | + double dx = bbmax.x - bbmin.x; |
---|
| 3653 | + double dy = bbmax.y - bbmin.y; |
---|
| 3654 | + double dz = bbmax.z - bbmin.z; |
---|
| 3655 | + |
---|
| 3656 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3657 | + |
---|
3440 | 3658 | for (int i=0; i<group.selection.size(); i++) |
---|
3441 | 3659 | { |
---|
3442 | 3660 | Object3D obj = group.selection.get(i); |
---|
3443 | 3661 | |
---|
3444 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3445 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3662 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3663 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3446 | 3664 | } |
---|
3447 | 3665 | |
---|
3448 | 3666 | refreshContents(); |
---|
.. | .. |
---|
3455 | 3673 | // ref.SaveSupports(); |
---|
3456 | 3674 | // Object3D par = ref.parent; |
---|
3457 | 3675 | // ref.parent = null; |
---|
3458 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3676 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3459 | 3677 | // ref.parent = par; |
---|
3460 | 3678 | // ref.RestoreSupports(); |
---|
3461 | 3679 | |
---|
.. | .. |
---|
3463 | 3681 | |
---|
3464 | 3682 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3465 | 3683 | |
---|
3466 | | - boolean random = CameraPane.RANDOM; |
---|
3467 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3684 | + boolean random = CameraPane.SWITCH; |
---|
| 3685 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3468 | 3686 | lowres.linkVerticesThis(null); |
---|
3469 | 3687 | lowres.linkVerticesThis(sn); |
---|
3470 | | - CameraPane.RANDOM = random; |
---|
| 3688 | + CameraPane.SWITCH = random; |
---|
3471 | 3689 | |
---|
3472 | 3690 | System.err.flush(); |
---|
3473 | 3691 | |
---|
.. | .. |
---|
3485 | 3703 | // lowres.SaveSupports(); |
---|
3486 | 3704 | // par = lowres.parent; |
---|
3487 | 3705 | // lowres.parent = null; |
---|
3488 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3706 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3489 | 3707 | Object3D newlow = CloneObject(lowres, false); |
---|
3490 | 3708 | newlow.name = sn.switchobject.get(i).name; |
---|
3491 | 3709 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3507 | 3725 | return; |
---|
3508 | 3726 | |
---|
3509 | 3727 | Object3D poses = group.selection.get(0); |
---|
3510 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3728 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3511 | 3729 | |
---|
3512 | 3730 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3513 | 3731 | |
---|
.. | .. |
---|
3676 | 3894 | group.selection.RelinkToSupport(); // july 2014 |
---|
3677 | 3895 | System.out.println("DONE."); |
---|
3678 | 3896 | refreshContents(); |
---|
3679 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3897 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3680 | 3898 | } |
---|
3681 | 3899 | |
---|
3682 | 3900 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3701 | 3919 | |
---|
3702 | 3920 | void ClipMesh() |
---|
3703 | 3921 | { |
---|
3704 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3922 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3705 | 3923 | { |
---|
3706 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3924 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3707 | 3925 | |
---|
3708 | 3926 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3709 | 3927 | content = ((cGroup)content).get(0); |
---|
3710 | 3928 | |
---|
3711 | 3929 | // for (int i=0; i<group.selection.size(); i++) |
---|
3712 | 3930 | // { |
---|
3713 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3931 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3714 | 3932 | // } |
---|
3715 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3933 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3716 | 3934 | } |
---|
3717 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3935 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3718 | 3936 | System.out.println("DONE."); |
---|
3719 | 3937 | refreshContents(); |
---|
3720 | 3938 | } |
---|
.. | .. |
---|
3952 | 4170 | System.err.println("info : " + child.GetPath()); |
---|
3953 | 4171 | } |
---|
3954 | 4172 | } |
---|
3955 | | - else |
---|
3956 | | - { |
---|
3957 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3958 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3959 | | - System.err.println("info : " + group.GetPath()); |
---|
3960 | | - } |
---|
| 4173 | +// else |
---|
| 4174 | +// { |
---|
| 4175 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4176 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4177 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4178 | +// } |
---|
3961 | 4179 | |
---|
3962 | 4180 | objEditor.SetText(); // jan 2014 |
---|
3963 | 4181 | |
---|
3964 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4182 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3965 | 4183 | CameraPane.flash = true; |
---|
3966 | 4184 | |
---|
3967 | 4185 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3968 | 4186 | // a camera |
---|
3969 | 4187 | { |
---|
3970 | 4188 | 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; |
---|
| 4189 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4190 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4191 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3974 | 4192 | } |
---|
3975 | 4193 | |
---|
3976 | 4194 | refreshContents(); |
---|
.. | .. |
---|
4052 | 4270 | { |
---|
4053 | 4271 | if (group.selection.isEmpty()) |
---|
4054 | 4272 | return; |
---|
4055 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4273 | + GrafreeD.clipboardIsTempGroup = false; |
---|
4056 | 4274 | Composite tGroup = null; |
---|
4057 | 4275 | if (group.selection.size() > 0) // 1) |
---|
4058 | 4276 | { |
---|
4059 | 4277 | tGroup = new cGroup(); |
---|
4060 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4278 | + GrafreeD.clipboardIsTempGroup = true; |
---|
4061 | 4279 | } |
---|
4062 | 4280 | |
---|
4063 | 4281 | if (cut) |
---|
.. | .. |
---|
4097 | 4315 | //System.out.println("cut " + child); |
---|
4098 | 4316 | //System.out.println("parent = " + child.parent); |
---|
4099 | 4317 | // tmp.addChild(child); |
---|
4100 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4318 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4101 | 4319 | tGroup.add/*Child*/(tmp); |
---|
4102 | 4320 | else |
---|
4103 | | - GraphreeD.clipboard = tmp; |
---|
| 4321 | + GrafreeD.clipboard = tmp; |
---|
4104 | 4322 | } |
---|
4105 | 4323 | else |
---|
4106 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4324 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4107 | 4325 | tGroup.add/*Child*/(child); |
---|
4108 | 4326 | else |
---|
4109 | | - GraphreeD.clipboard = child; |
---|
| 4327 | + GrafreeD.clipboard = child; |
---|
4110 | 4328 | } |
---|
4111 | 4329 | |
---|
4112 | 4330 | //ResetModel(); |
---|
.. | .. |
---|
4138 | 4356 | //System.out.println("cut " + elem); |
---|
4139 | 4357 | //System.out.println("parent = " + elem.parent); |
---|
4140 | 4358 | // tmp.addChild(elem); |
---|
4141 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4359 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4142 | 4360 | tGroup.add/*Child*/(tmp); |
---|
4143 | 4361 | else |
---|
4144 | | - GraphreeD.clipboard = tmp; |
---|
| 4362 | + GrafreeD.clipboard = tmp; |
---|
4145 | 4363 | } |
---|
4146 | 4364 | else |
---|
4147 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4365 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4148 | 4366 | tGroup.add/*Child*/(child); |
---|
4149 | 4367 | else |
---|
4150 | | - GraphreeD.clipboard = child; |
---|
| 4368 | + GrafreeD.clipboard = child; |
---|
4151 | 4369 | } |
---|
4152 | 4370 | |
---|
4153 | 4371 | } |
---|
4154 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
4155 | | - GraphreeD.clipboard = tGroup; |
---|
| 4372 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4373 | + GrafreeD.clipboard = tGroup; |
---|
4156 | 4374 | if (cut) |
---|
4157 | 4375 | { |
---|
4158 | 4376 | ResetModel(); |
---|
.. | .. |
---|
4162 | 4380 | |
---|
4163 | 4381 | void paste(boolean expand) |
---|
4164 | 4382 | { |
---|
4165 | | - // if (GraphreeD.clipboard == null) |
---|
| 4383 | + // if (GrafreeD.clipboard == null) |
---|
4166 | 4384 | // return; |
---|
4167 | 4385 | boolean first = true; |
---|
4168 | 4386 | |
---|
4169 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4387 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4170 | 4388 | { |
---|
4171 | 4389 | Composite temp; |
---|
4172 | 4390 | |
---|
.. | .. |
---|
4177 | 4395 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4178 | 4396 | */ |
---|
4179 | 4397 | Object3D elem; |
---|
4180 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4398 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4181 | 4399 | { |
---|
4182 | 4400 | Object3D child = (Object3D)e.nextElement(); |
---|
4183 | 4401 | |
---|
.. | .. |
---|
4191 | 4409 | else |
---|
4192 | 4410 | elem = child.deepCopy(); // ? |
---|
4193 | 4411 | child.parent = keepparent; |
---|
4194 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4412 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4195 | 4413 | // elem = elem.get(0); |
---|
4196 | 4414 | makeSomething(elem, true); // ?? first); |
---|
4197 | 4415 | //group.addChild(elem); |
---|
.. | .. |
---|
4211 | 4429 | //Object3D cb = Applet3D.clipboard; |
---|
4212 | 4430 | //temp.addChild(cb); |
---|
4213 | 4431 | //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()); |
---|
| 4432 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4433 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4434 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4435 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4436 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4219 | 4437 | else |
---|
4220 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4221 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4438 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4439 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4222 | 4440 | } |
---|
4223 | 4441 | |
---|
4224 | 4442 | ResetModel(); |
---|
4225 | 4443 | refreshContents(); |
---|
4226 | 4444 | } |
---|
4227 | 4445 | |
---|
4228 | | - void pasteInto(boolean copyit) |
---|
| 4446 | + void pasteInto(boolean copyit, boolean clone) |
---|
4229 | 4447 | { |
---|
4230 | | -// if (GraphreeD.clipboard == null) |
---|
| 4448 | +// if (GrafreeD.clipboard == null) |
---|
4231 | 4449 | // return; |
---|
4232 | 4450 | |
---|
4233 | 4451 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4254 | 4472 | if (copyit) |
---|
4255 | 4473 | { |
---|
4256 | 4474 | // paste(false); |
---|
4257 | | - CloneClipboard(false); // sept 2014 |
---|
| 4475 | + if (clone) |
---|
| 4476 | + { |
---|
| 4477 | + CloneClipboard(false); // sept 2014 |
---|
| 4478 | + } |
---|
| 4479 | + else |
---|
| 4480 | + { |
---|
| 4481 | + paste(false); |
---|
| 4482 | + } |
---|
4258 | 4483 | } |
---|
4259 | 4484 | else |
---|
4260 | 4485 | { |
---|
4261 | 4486 | boolean first = true; |
---|
4262 | 4487 | |
---|
4263 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4488 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4264 | 4489 | { |
---|
4265 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4490 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4266 | 4491 | Object3D copy; |
---|
4267 | 4492 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4268 | 4493 | { |
---|
.. | .. |
---|
4272 | 4497 | } |
---|
4273 | 4498 | } else |
---|
4274 | 4499 | { |
---|
4275 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4500 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4276 | 4501 | } |
---|
4277 | 4502 | } |
---|
4278 | 4503 | } |
---|
.. | .. |
---|
4464 | 4689 | makeSomething(csg); |
---|
4465 | 4690 | } |
---|
4466 | 4691 | |
---|
| 4692 | + void Ungroup(Object3D g) |
---|
| 4693 | + { |
---|
| 4694 | + if (g instanceof HiddenObject) |
---|
| 4695 | + { |
---|
| 4696 | + HiddenObject h = (HiddenObject) g; |
---|
| 4697 | + |
---|
| 4698 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4699 | + { |
---|
| 4700 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4701 | + } |
---|
| 4702 | + } |
---|
| 4703 | + else |
---|
| 4704 | + { |
---|
| 4705 | + for (int i=0; i<g.Size(); i++) |
---|
| 4706 | + { |
---|
| 4707 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4708 | + } |
---|
| 4709 | + } |
---|
| 4710 | + } |
---|
| 4711 | + |
---|
4467 | 4712 | void ungroup() |
---|
4468 | 4713 | { |
---|
4469 | 4714 | /* |
---|
.. | .. |
---|
4659 | 4904 | |
---|
4660 | 4905 | void ImportGFD() |
---|
4661 | 4906 | { |
---|
4662 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4907 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4663 | 4908 | browser.show(); |
---|
4664 | 4909 | String filename = browser.getFile(); |
---|
4665 | 4910 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4697 | 4942 | |
---|
4698 | 4943 | void ImportVRMLX3D() |
---|
4699 | 4944 | { |
---|
4700 | | - if (GraphreeD.standAlone) |
---|
| 4945 | + if (GrafreeD.standAlone) |
---|
4701 | 4946 | { |
---|
4702 | 4947 | /**/ |
---|
4703 | 4948 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4714 | 4959 | |
---|
4715 | 4960 | String GetFile(String dialogName) |
---|
4716 | 4961 | { |
---|
4717 | | - if (GraphreeD.standAlone) |
---|
| 4962 | + if (GrafreeD.standAlone) |
---|
4718 | 4963 | { |
---|
4719 | 4964 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4720 | 4965 | browser.show(); |
---|
.. | .. |
---|
4778 | 5023 | cButton flashSelectionButton; |
---|
4779 | 5024 | cButton editButton; |
---|
4780 | 5025 | cButton uneditButton; |
---|
| 5026 | + JCheckBox allParamsButton; |
---|
4781 | 5027 | cButton clearpanelButton; |
---|
4782 | | - cButton allParamsButton; |
---|
4783 | 5028 | cButton unselectButton; |
---|
4784 | 5029 | |
---|
| 5030 | + cButton oneStepButton; |
---|
| 5031 | + |
---|
4785 | 5032 | cButton screenfitButton; |
---|
4786 | 5033 | cButton screenfitpointButton; |
---|
4787 | 5034 | cButton snapobjectButton; |
---|
.. | .. |
---|
4823 | 5070 | private MenuItem resetsupportItem; |
---|
4824 | 5071 | private MenuItem resetreferencesItem; |
---|
4825 | 5072 | private MenuItem linkverticesItem; |
---|
| 5073 | + private MenuItem relinkverticesItem; |
---|
4826 | 5074 | private MenuItem setMasterItem; |
---|
4827 | 5075 | private MenuItem resetMeshItem; |
---|
4828 | 5076 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4835 | 5083 | private MenuItem mergeGeometriesItem; |
---|
4836 | 5084 | private MenuItem copyItem; |
---|
4837 | 5085 | private MenuItem pasteItem; |
---|
| 5086 | + private MenuItem pasteIntoItem; |
---|
4838 | 5087 | private MenuItem pasteLinkItem; |
---|
4839 | 5088 | private MenuItem pasteCloneItem; |
---|
4840 | 5089 | private MenuItem pasteExpandItem; |
---|
4841 | 5090 | private MenuItem clearItem; |
---|
4842 | 5091 | private MenuItem clearAllItem; |
---|
4843 | 5092 | private MenuItem genUVItem; |
---|
| 5093 | + private MenuItem genNormalsMESHItem; |
---|
4844 | 5094 | private MenuItem genNormalsCADItem; |
---|
4845 | 5095 | private MenuItem genNormalsORGANItem; |
---|
| 5096 | + private MenuItem genNormalsMINEItem; |
---|
4846 | 5097 | private MenuItem stripifyItem; |
---|
4847 | 5098 | private MenuItem unstripifyItem; |
---|
4848 | 5099 | private MenuItem trimItem; |
---|
.. | .. |
---|
4884 | 5135 | private MenuItem resetCentroidItem; |
---|
4885 | 5136 | private MenuItem transformgeometryItem; |
---|
4886 | 5137 | private MenuItem resetTransformItem; |
---|
| 5138 | + private MenuItem hideItem; |
---|
4887 | 5139 | private MenuItem grabItem; |
---|
4888 | 5140 | private MenuItem backItem; |
---|
4889 | 5141 | private MenuItem frontItem; |
---|
.. | .. |
---|
4904 | 5156 | |
---|
4905 | 5157 | private MenuItem resetParentItem; |
---|
4906 | 5158 | private MenuItem repairParentItem; |
---|
| 5159 | + private MenuItem repairShadowItem; |
---|
4907 | 5160 | private MenuItem sortbysizeItem; |
---|
4908 | 5161 | private MenuItem sortbynameItem; |
---|
4909 | 5162 | |
---|
.. | .. |
---|
4924 | 5177 | private MenuItem coneItem; |
---|
4925 | 5178 | private MenuItem torusItem; |
---|
4926 | 5179 | private MenuItem superItem; |
---|
| 5180 | + private MenuItem kleinItem; |
---|
4927 | 5181 | private MenuItem blobItem; |
---|
4928 | 5182 | private MenuItem latheItem; |
---|
4929 | 5183 | private MenuItem bezierItem; |
---|
4930 | | - private MenuItem checkerItem; |
---|
| 5184 | + private MenuItem overlayItem; |
---|
4931 | 5185 | private MenuItem meshItem; |
---|
4932 | 5186 | // private MenuItem meshGroupItem; |
---|
4933 | 5187 | private MenuItem springItem; |
---|
.. | .. |
---|
4936 | 5190 | private MenuItem csgItem; |
---|
4937 | 5191 | private MenuItem templateItem; |
---|
4938 | 5192 | private MenuItem textureItem; |
---|
| 5193 | + private MenuItem billboardItem; |
---|
4939 | 5194 | private MenuItem shadowXItem; |
---|
4940 | 5195 | private MenuItem shadowYItem; |
---|
4941 | 5196 | private MenuItem shadowZItem; |
---|