.. | .. |
---|
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 | | -class GroupEditor extends ObjEditor implements iParse, //iCallBack, |
---|
| 18 | +class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
18 | 19 | ObjectUI, |
---|
19 | 20 | Runnable, |
---|
20 | 21 | ActionListener, |
---|
.. | .. |
---|
83 | 84 | |
---|
84 | 85 | void CloneSelection(boolean supports) |
---|
85 | 86 | { |
---|
86 | | - // Object3D keep = GraphreeD.clipboard; |
---|
| 87 | + // Object3D keep = GrafreeD.clipboard; |
---|
87 | 88 | //Object3D obj; |
---|
88 | 89 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
89 | 90 | { |
---|
.. | .. |
---|
97 | 98 | |
---|
98 | 99 | void CloneClipboard(boolean supports) |
---|
99 | 100 | { |
---|
100 | | - assert(GraphreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
102 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GraphreeD.clipboard.get(0), false)); |
---|
| 101 | + assert(Grafreed.clipboard.parent == null); |
---|
| 102 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 103 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 104 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 105 | + makeSomething(CloneObject(Grafreed.clipboard.get(0), false)); |
---|
105 | 106 | else |
---|
106 | | - makeSomething(CloneObject(GraphreeD.clipboard, false)); |
---|
107 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 107 | + makeSomething(CloneObject(Grafreed.clipboard, false)); |
---|
| 108 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
108 | 109 | } |
---|
109 | 110 | |
---|
110 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 119 | // obj.support = null; |
---|
119 | 120 | if (!supports) |
---|
120 | 121 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GraphreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
122 | 123 | obj.parent = parent; |
---|
123 | 124 | // obj.support = support; |
---|
124 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
149 | 150 | |
---|
150 | 151 | void SetupMenu2(ObjEditor oe) |
---|
151 | 152 | { |
---|
| 153 | + if (Globals.ADVANCED) |
---|
| 154 | + { |
---|
152 | 155 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
153 | 156 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
154 | 157 | //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
.. | .. |
---|
160 | 163 | lookAtItem.addActionListener(this); |
---|
161 | 164 | //lookFromItem.addActinoListener(this); |
---|
162 | 165 | //switchItem.addActionListener(this); |
---|
| 166 | + } |
---|
| 167 | + |
---|
163 | 168 | Menu menu; |
---|
164 | 169 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
165 | 170 | //editItem = menu.add(new MenuItem("Edit")); |
---|
166 | 171 | //editItem.addActionListener(this); |
---|
167 | 172 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
168 | 173 | duplicateItem.addActionListener(this); |
---|
169 | | - menu.add("-"); |
---|
170 | 174 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | 175 | cloneItem.addActionListener(this); |
---|
| 176 | + if (Globals.ADVANCED) |
---|
| 177 | + { |
---|
172 | 178 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | 179 | cloneSupportItem.addActionListener(this); |
---|
| 180 | + } |
---|
174 | 181 | menu.add("-"); |
---|
175 | 182 | cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | 183 | cutItem.addActionListener(this); |
---|
.. | .. |
---|
178 | 185 | copyItem.addActionListener(this); |
---|
179 | 186 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | 187 | pasteItem.addActionListener(this); |
---|
| 188 | + menu.add("-"); |
---|
| 189 | + |
---|
| 190 | + menu.add("-"); |
---|
| 191 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 192 | + pasteIntoItem.addActionListener(this); |
---|
181 | 193 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | 194 | pasteLinkItem.addActionListener(this); |
---|
183 | 195 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | 196 | pasteCloneItem.addActionListener(this); |
---|
185 | 197 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | 198 | // pasteExpandItem.addActionListener(this); |
---|
| 199 | + menu.add("-"); |
---|
187 | 200 | clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | 201 | clearItem.addActionListener(this); |
---|
| 202 | + |
---|
| 203 | + if (Globals.ADVANCED) |
---|
| 204 | + { |
---|
| 205 | + // Deletes the cameras... |
---|
189 | 206 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 207 | clearAllItem.addActionListener(this); |
---|
191 | | - menu.add("-"); |
---|
192 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
193 | | - resetMeshItem.addActionListener(this); |
---|
194 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
195 | | - stepAllItem.addActionListener(this); |
---|
| 208 | + } |
---|
| 209 | + |
---|
| 210 | + oe.menuBar.add(menu = new Menu("Setting")); |
---|
| 211 | + if (Globals.ADVANCED) |
---|
| 212 | + { |
---|
196 | 213 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
197 | 214 | revertMeshItem.addActionListener(this); |
---|
198 | 215 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
199 | 216 | resetreferencesItem.addActionListener(this); |
---|
200 | 217 | menu.add("-"); |
---|
| 218 | + } |
---|
201 | 219 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
202 | 220 | overwriteGeoItem.addActionListener(this); |
---|
203 | 221 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
209 | 227 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
210 | 228 | overwriteUVItem.addActionListener(this); |
---|
211 | 229 | menu.add("-"); |
---|
| 230 | + if (Globals.ADVANCED) |
---|
| 231 | + { |
---|
212 | 232 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
213 | 233 | generateMeshItem.addActionListener(this); |
---|
214 | 234 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
215 | 235 | poseMeshItem.addActionListener(this); |
---|
216 | 236 | menu.add("-"); |
---|
| 237 | + } |
---|
217 | 238 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
218 | 239 | resetsupportItem.addActionListener(this); |
---|
219 | 240 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
220 | 241 | linkverticesItem.addActionListener(this); |
---|
| 242 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 243 | + relinkverticesItem.addActionListener(this); |
---|
| 244 | + |
---|
| 245 | + if (Globals.ADVANCED) |
---|
| 246 | + { |
---|
221 | 247 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
222 | 248 | setMasterItem.addActionListener(this); |
---|
| 249 | + } |
---|
223 | 250 | |
---|
224 | | - oe.menuBar.add(menu = new Menu("Object")); |
---|
| 251 | + oe.menuBar.add(menu = new Menu("Group")); |
---|
225 | 252 | grabItem = menu.add(new MenuItem("Grab")); |
---|
226 | 253 | grabItem.addActionListener(this); |
---|
227 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
228 | | - frontItem.addActionListener(this); |
---|
229 | 254 | backItem = menu.add(new MenuItem("Back")); |
---|
230 | 255 | backItem.addActionListener(this); |
---|
| 256 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 257 | + frontItem.addActionListener(this); |
---|
231 | 258 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
232 | 259 | compositeItem.addActionListener(this); |
---|
| 260 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
| 261 | + hideItem.addActionListener(this); |
---|
| 262 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 263 | + ungroupItem.addActionListener(this); |
---|
233 | 264 | menu.add("-"); |
---|
234 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 265 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
235 | 266 | randomItem.addActionListener(this); |
---|
236 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
237 | | - physicsItem.addActionListener(this); |
---|
238 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
239 | | - frameselectorItem.addActionListener(this); |
---|
240 | 267 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
241 | 268 | switchGeoItem.addActionListener(this); |
---|
242 | 269 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
243 | 270 | switchTransfoItem.addActionListener(this); |
---|
244 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 271 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
245 | 272 | morphItem.addActionListener(this); |
---|
| 273 | + |
---|
| 274 | + if (Globals.ADVANCED) |
---|
| 275 | + { |
---|
| 276 | + menu.add("-"); |
---|
| 277 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 278 | + physicsItem.addActionListener(this); |
---|
| 279 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 280 | + frameselectorItem.addActionListener(this); |
---|
246 | 281 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
247 | 282 | scriptNodeItem.addActionListener(this); |
---|
248 | 283 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
249 | 284 | cameraItem.addActionListener(this); |
---|
250 | | - menu.add("-"); |
---|
| 285 | + } |
---|
| 286 | + |
---|
| 287 | + oe.menuBar.add(menu = new Menu("Object")); |
---|
251 | 288 | textureItem = menu.add(new MenuItem("Texture")); |
---|
252 | 289 | textureItem.addActionListener(this); |
---|
| 290 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 291 | + billboardItem.addActionListener(this); |
---|
253 | 292 | csgItem = menu.add(new MenuItem("CSG")); |
---|
254 | 293 | csgItem.addActionListener(this); |
---|
255 | 294 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
258 | 297 | shadowYItem.addActionListener(this); |
---|
259 | 298 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
260 | 299 | shadowZItem.addActionListener(this); |
---|
| 300 | + if (Globals.ADVANCED) |
---|
| 301 | + { |
---|
| 302 | + menu.add("-"); |
---|
261 | 303 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
262 | 304 | linkerItem.addActionListener(this); |
---|
263 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
264 | | - templateItem.addActionListener(this); |
---|
265 | 305 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
266 | 306 | attributeItem.addActionListener(this); |
---|
| 307 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 308 | + templateItem.addActionListener(this); |
---|
267 | 309 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
268 | 310 | pointflowItem.addActionListener(this); |
---|
| 311 | + } |
---|
269 | 312 | menu.add("-"); |
---|
270 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
271 | | - transformgeometryItem.addActionListener(this); |
---|
272 | 313 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
273 | 314 | resetTransformItem.addActionListener(this); |
---|
274 | 315 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
275 | 316 | resetCentroidItem.addActionListener(this); |
---|
276 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
277 | | - ungroupItem.addActionListener(this); |
---|
| 317 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 318 | + resetCentroidXZItem.addActionListener(this); |
---|
| 319 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 320 | + transformGeometryItem.addActionListener(this); |
---|
| 321 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 322 | + transformChildrenItem.addActionListener(this); |
---|
278 | 323 | |
---|
279 | 324 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
280 | 325 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
283 | 328 | genNormalsORGANItem.addActionListener(this); |
---|
284 | 329 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
285 | 330 | genNormalsCADItem.addActionListener(this); |
---|
| 331 | + genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
| 332 | + genNormalsMESHItem.addActionListener(this); |
---|
| 333 | + if (Globals.ADVANCED) |
---|
| 334 | + { |
---|
| 335 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 336 | + genNormalsMINEItem.addActionListener(this); |
---|
| 337 | + } |
---|
286 | 338 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
287 | 339 | stripifyItem.addActionListener(this); |
---|
288 | 340 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
292 | 344 | untrimItem = menu.add(new MenuItem("Untrim")); |
---|
293 | 345 | untrimItem.addActionListener(this); |
---|
294 | 346 | menu.add("-"); |
---|
295 | | - clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
296 | | - clearMaterialsItem.addActionListener(this); |
---|
297 | 347 | clearColorsItem = menu.add(new MenuItem("Clear AO")); |
---|
298 | 348 | clearColorsItem.addActionListener(this); |
---|
299 | 349 | reverseNormalsItem = menu.add(new MenuItem("Reverse Normals")); |
---|
.. | .. |
---|
306 | 356 | reduce34MeshItem.addActionListener(this); |
---|
307 | 357 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
308 | 358 | increaseMeshItem.addActionListener(this); |
---|
309 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
310 | | - smoothMeshItem.addActionListener(this); |
---|
311 | 359 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
312 | 360 | clipMeshItem.addActionListener(this); |
---|
| 361 | + |
---|
| 362 | + if (Globals.ADVANCED) |
---|
| 363 | + { |
---|
| 364 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 365 | + smoothMeshItem.addActionListener(this); |
---|
| 366 | + } |
---|
| 367 | + |
---|
| 368 | + oe.menuBar.add(menu = new Menu("Attributes")); |
---|
| 369 | + clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
| 370 | + clearMaterialsItem.addActionListener(this); |
---|
| 371 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 372 | + resetAllItem.addActionListener(this); |
---|
| 373 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 374 | + stepAllItem.addActionListener(this); |
---|
313 | 375 | menu.add("-"); |
---|
314 | 376 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
315 | 377 | liveleavesItem.addActionListener(this); |
---|
316 | 378 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
317 | 379 | unliveleavesItem.addActionListener(this); |
---|
| 380 | + if (Globals.ADVANCED) |
---|
| 381 | + { |
---|
318 | 382 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
319 | 383 | supportleavesItem.addActionListener(this); |
---|
320 | 384 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
321 | 385 | unsupportleavesItem.addActionListener(this); |
---|
| 386 | + } |
---|
322 | 387 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
323 | 388 | hideleavesItem.addActionListener(this); |
---|
324 | 389 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
332 | 397 | flipVItem.addActionListener(this); |
---|
333 | 398 | unflipVItem = menu.add(new MenuItem("Unflip V")); |
---|
334 | 399 | unflipVItem.addActionListener(this); |
---|
335 | | - lowTexturesItem = menu.add(new MenuItem("Low Texture")); |
---|
| 400 | + lowTexturesItem = menu.add(new MenuItem("Low Texture (256)")); |
---|
336 | 401 | lowTexturesItem.addActionListener(this); |
---|
337 | | - normalTexturesItem = menu.add(new MenuItem("Normal Texture")); |
---|
| 402 | + normalTexturesItem = menu.add(new MenuItem("Normal Texture (512)")); |
---|
338 | 403 | normalTexturesItem.addActionListener(this); |
---|
339 | | - highTexturesItem = menu.add(new MenuItem("High Texture")); |
---|
| 404 | + highTexturesItem = menu.add(new MenuItem("High Texture (1024)")); |
---|
340 | 405 | highTexturesItem.addActionListener(this); |
---|
341 | | - veryhighTexturesItem = menu.add(new MenuItem("Very high Texture")); |
---|
| 406 | + veryhighTexturesItem = menu.add(new MenuItem("Very high Texture (2048)")); |
---|
342 | 407 | veryhighTexturesItem.addActionListener(this); |
---|
343 | | - maxTexturesItem = menu.add(new MenuItem("Max Texture")); |
---|
| 408 | + maxTexturesItem = menu.add(new MenuItem("Max Texture (4096)")); |
---|
344 | 409 | maxTexturesItem.addActionListener(this); |
---|
345 | | - panoTexturesItem = menu.add(new MenuItem("Panoramic Texture")); |
---|
| 410 | + panoTexturesItem = menu.add(new MenuItem("Panoramic Texture (8192)")); |
---|
346 | 411 | panoTexturesItem.addActionListener(this); |
---|
347 | | - menu.add("-"); |
---|
348 | | - extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
349 | | - extractGeometriesItem.addActionListener(this); |
---|
350 | | - cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
351 | | - cloneGeometriesItem.addActionListener(this); |
---|
352 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
353 | | - shareGeometriesItem.addActionListener(this); |
---|
354 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
355 | | - mergeGeometriesItem.addActionListener(this); |
---|
356 | 412 | |
---|
357 | 413 | oe.menuBar.add(menu = new Menu("Selection")); |
---|
358 | 414 | attachPigmentItem = menu.add(new MenuItem("Attach Pigment...")); |
---|
.. | .. |
---|
370 | 426 | sortbysizeItem.addActionListener(this); |
---|
371 | 427 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
372 | 428 | sortbynameItem.addActionListener(this); |
---|
| 429 | + menu.add("-"); |
---|
| 430 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 431 | + shareGeometriesItem.addActionListener(this); |
---|
| 432 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 433 | + mergeGeometriesItem.addActionListener(this); |
---|
| 434 | + if (Globals.ADVANCED) |
---|
| 435 | + { |
---|
| 436 | + // Pretty much the same as duplicate and clone. |
---|
| 437 | + extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
| 438 | + extractGeometriesItem.addActionListener(this); |
---|
| 439 | + cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
| 440 | + cloneGeometriesItem.addActionListener(this); |
---|
| 441 | + } |
---|
| 442 | + |
---|
373 | 443 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
374 | 444 | buildCreateMenu(menu); |
---|
375 | | - oe.menuBar.add(menu = new Menu("Tools")); |
---|
| 445 | + |
---|
| 446 | + oe.menuBar.add(menu = new Menu("Include")); |
---|
| 447 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 448 | + importOBJItem.addActionListener(this); |
---|
| 449 | + menu.add("-"); |
---|
| 450 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 451 | + import3DSItem.addActionListener(this); |
---|
| 452 | + menu.add("-"); |
---|
| 453 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 454 | + importVRMLX3DItem.addActionListener(this); |
---|
| 455 | + menu.add("-"); |
---|
| 456 | + importGFDItem = menu.add(new MenuItem("GrafreeD file...")); |
---|
| 457 | + importGFDItem.addActionListener(this); |
---|
| 458 | + |
---|
| 459 | + oe.menuBar.add(menu = new Menu("Tools")); |
---|
376 | 460 | buildToolsMenu(menu); |
---|
377 | 461 | } |
---|
378 | 462 | |
---|
.. | .. |
---|
406 | 490 | oe.radioPanel.add(dummyButton); |
---|
407 | 491 | oe.buttonGroup.add(dummyButton); |
---|
408 | 492 | */ |
---|
409 | | - aConstraints.gridy += 1; |
---|
410 | | - oe.aConstraints.gridwidth = 1; |
---|
411 | | - oe.aConstraints.gridx = 0; |
---|
| 493 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
412 | 494 | |
---|
413 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 495 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 496 | + liveCB.setToolTipText("Enable animation"); |
---|
414 | 497 | liveCB.addItemListener(this); |
---|
415 | 498 | |
---|
416 | | - oe.aConstraints.gridx += 1; |
---|
417 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
418 | | - supportCB.addItemListener(this); |
---|
419 | | - |
---|
420 | | - // oe.aConstraints.gridx += 1; |
---|
421 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
422 | | - // localCB.addItemListener(this); |
---|
423 | | - |
---|
424 | | - oe.aConstraints.gridx += 1; |
---|
425 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
426 | | - crowdCB.addItemListener(this); |
---|
427 | | - |
---|
428 | | - oe.aConstraints.gridx += 1; |
---|
429 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
430 | | - smoothCB.addItemListener(this); |
---|
431 | | - |
---|
432 | | - oe.aConstraints.gridx += 1; |
---|
433 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints); |
---|
| 499 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 500 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 501 | + oneStepButton.addActionListener(this); |
---|
| 502 | + |
---|
| 503 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 504 | + fastCB.setToolTipText("Fast mode"); |
---|
434 | 505 | fastCB.addItemListener(this); |
---|
435 | | - oe.aConstraints.gridx += 1; |
---|
436 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
437 | | - slowCB.addItemListener(this); |
---|
438 | | - oe.aConstraints.gridx += 1; |
---|
439 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
440 | | - boxCB.addItemListener(this); |
---|
441 | | - |
---|
442 | | -// oe.aConstraints.gridx += 1; |
---|
443 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
444 | | -// speakerMocapCB.addItemListener(this); |
---|
445 | | - |
---|
446 | | - if (false) |
---|
447 | | - { |
---|
448 | | - // handled in scripts |
---|
449 | | - oe.aConstraints.gridx += 1; |
---|
450 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
451 | | - speakerCameraCB.addItemListener(this); |
---|
452 | | - |
---|
453 | | - oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
455 | | - speakerFocusCB.addItemListener(this); |
---|
456 | | - |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
459 | | - smoothfocusCB.addItemListener(this); |
---|
460 | | - } |
---|
461 | | - |
---|
462 | | -//oe.aConstraints.gridx += 1; |
---|
463 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
464 | | -// debugCB.addItemListener(this); |
---|
465 | | - |
---|
466 | | - oe.aConstraints.gridx += 1; |
---|
467 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
468 | | - oeilCB.addItemListener(this); |
---|
469 | | - |
---|
470 | | - oe.aConstraints.gridx += 1; |
---|
471 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
472 | | - lookAtCB.addItemListener(this); |
---|
473 | | - |
---|
474 | | - oe.aConstraints.gridx += 1; |
---|
475 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 506 | + |
---|
| 507 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 508 | + trackCB.setToolTipText("Enable tracking"); |
---|
476 | 509 | trackCB.addItemListener(this); |
---|
477 | 510 | |
---|
478 | | - oe.aConstraints.gridx += 1; |
---|
479 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 511 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 512 | + screenfitButton.setToolTipText("Screen fit"); |
---|
480 | 513 | screenfitButton.addActionListener(this); |
---|
481 | | - oe.aConstraints.gridx += 1; |
---|
| 514 | + |
---|
482 | 515 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
483 | 516 | // screenfitpointButton.addActionListener(this); |
---|
484 | | -// oe.aConstraints.gridx += 1; |
---|
485 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
486 | | - snapobjectButton.addActionListener(this); |
---|
487 | | - oe.aConstraints.gridx += 1; |
---|
488 | 517 | |
---|
489 | | - //aConstraints.gridx = 0; |
---|
490 | | - //aConstraints.gridy += 1; |
---|
491 | | - oe.aConstraints.weighty = 0; |
---|
492 | | - oe.aConstraints.gridwidth = 1; |
---|
493 | | - |
---|
494 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 518 | + if (Globals.ADVANCED) |
---|
| 519 | + { |
---|
| 520 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 521 | + snapobjectButton.addActionListener(this); |
---|
| 522 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 523 | + } |
---|
| 524 | + |
---|
| 525 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 526 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
495 | 527 | flashSelectionButton.addActionListener(this); |
---|
496 | | - oe.aConstraints.gridx += 1; |
---|
497 | | - oe.aConstraints.weighty = 0; |
---|
498 | | - oe.aConstraints.gridwidth = 1; |
---|
499 | 528 | |
---|
500 | | - // |
---|
501 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 529 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 530 | + |
---|
| 531 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 532 | + twoButton.setToolTipText("Show center view only"); |
---|
502 | 533 | twoButton.addActionListener(this); |
---|
503 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 534 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | 535 | fourButton.addActionListener(this); |
---|
505 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 536 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 537 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 538 | + sixButton.setToolTipText("2-column layout left"); |
---|
506 | 539 | sixButton.addActionListener(this); |
---|
507 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 540 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 541 | + threeButton.setToolTipText("2-column layout right"); |
---|
508 | 542 | threeButton.addActionListener(this); |
---|
509 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 543 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 544 | + sevenButton.setToolTipText("3-column layout"); |
---|
510 | 545 | sevenButton.addActionListener(this); |
---|
511 | 546 | // |
---|
512 | 547 | |
---|
513 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 548 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 549 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
514 | 550 | rootButton.addActionListener(this); |
---|
515 | | - oe.aConstraints.gridx += 1; |
---|
516 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 551 | + |
---|
| 552 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 553 | + closeButton.setToolTipText("Close tab"); |
---|
517 | 554 | closeButton.addActionListener(this); |
---|
518 | 555 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
519 | 556 | //clearButton.addActionListener(this); |
---|
520 | | - oe.aConstraints.gridx += 1; |
---|
521 | 557 | |
---|
522 | | - oe.aConstraints.gridx = 1; // |
---|
523 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 558 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 559 | + |
---|
| 560 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 561 | + editButton.setToolTipText("Edit selection"); |
---|
524 | 562 | editButton.addActionListener(this); |
---|
525 | | - oe.aConstraints.gridx += 1; |
---|
526 | | - oe.aConstraints.weighty = 0; |
---|
527 | | - oe.aConstraints.gridwidth = 1; |
---|
528 | 563 | |
---|
529 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 564 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 565 | + uneditButton.setToolTipText("Unedit selection"); |
---|
530 | 566 | uneditButton.addActionListener(this); |
---|
531 | 567 | |
---|
532 | | - oe.aConstraints.gridx += 1; |
---|
533 | | - oe.aConstraints.weighty = 0; |
---|
534 | | - oe.aConstraints.gridwidth = 1; |
---|
535 | | - |
---|
536 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
537 | | - clearPanelButton.addActionListener(this); |
---|
538 | | - |
---|
539 | | - oe.aConstraints.gridx += 1; |
---|
540 | | - oe.aConstraints.weighty = 0; |
---|
541 | | - oe.aConstraints.gridwidth = 1; |
---|
542 | | - |
---|
543 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 568 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 569 | + allParamsButton.setToolTipText("Edit all params"); |
---|
544 | 570 | allParamsButton.addActionListener(this); |
---|
545 | 571 | |
---|
546 | | - oe.aConstraints.gridx += 1; |
---|
547 | | - oe.aConstraints.weighty = 0; |
---|
548 | | - oe.aConstraints.gridwidth = 1; |
---|
549 | | - |
---|
550 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 572 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 573 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 574 | + clearPanelButton.addActionListener(this); |
---|
| 575 | + |
---|
| 576 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 577 | + unselectButton.setToolTipText("Unselect"); |
---|
551 | 578 | unselectButton.addActionListener(this); |
---|
552 | 579 | |
---|
| 580 | + commandsPanel.preferredHeight = 1; |
---|
| 581 | + |
---|
| 582 | + oe.treePanel.add(commandsPanel); |
---|
| 583 | + oe.treePanel.Return(); |
---|
| 584 | + |
---|
553 | 585 | // oe.aConstraints.gridx += 1; |
---|
554 | 586 | // oe.aConstraints.weighty = 0; |
---|
555 | 587 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
561 | 593 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
562 | 594 | // gcButton.addActionListener(this); |
---|
563 | 595 | |
---|
564 | | - oe.aConstraints.gridx = 0; |
---|
565 | | - oe.aConstraints.gridy += 1; |
---|
566 | | - |
---|
567 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
568 | | - oe.aConstraints.gridwidth = 100; |
---|
569 | | - // oe.aConstraints.gridheight = 100; |
---|
570 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
571 | | - oe.aConstraints.gridheight = 1; |
---|
572 | | - oe.aConstraints.weighty = 0.5; |
---|
573 | | - oe.aConstraints.gridx = 0; |
---|
574 | | - JScrollPane jSP; |
---|
| 596 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 597 | + |
---|
| 598 | + JScrollPane jSP; |
---|
575 | 599 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
576 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 600 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
577 | 601 | ResetModel(); |
---|
578 | | - oe.aConstraints.weighty = 0.5; |
---|
579 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
580 | | - oe.aConstraints.gridy += 1; |
---|
581 | | - oe.aConstraints.gridwidth = 1; |
---|
| 602 | + |
---|
| 603 | + oe.treePanel.add(jSPPanel); |
---|
| 604 | + oe.treePanel.Return(); |
---|
582 | 605 | |
---|
583 | | - oe.aConstraints.weighty = 0; |
---|
584 | | - oe.aConstraints.gridwidth = 2; |
---|
585 | | - |
---|
586 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
| 606 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 607 | + |
---|
| 608 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 609 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
587 | 610 | colorCB.addItemListener(this); |
---|
588 | | - oe.aConstraints.gridx += 2; |
---|
589 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 611 | + |
---|
| 612 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 613 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
590 | 614 | materialCB.addItemListener(this); |
---|
591 | | - oe.aConstraints.gridx += 2; |
---|
592 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 615 | + |
---|
| 616 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 617 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
593 | 618 | textureCB.addItemListener(this); |
---|
594 | 619 | |
---|
595 | | - oe.aConstraints.gridx = 0; |
---|
596 | | - oe.aConstraints.gridy += 1; |
---|
| 620 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 621 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 622 | + oe.treePanel.Return(); |
---|
597 | 623 | |
---|
| 624 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 625 | +// mainPanel.setResizeWeight(0.5); |
---|
| 626 | + |
---|
598 | 627 | //jList.addListSelectionListener(this); |
---|
599 | 628 | oe.jTree.addTreeSelectionListener(this); |
---|
600 | 629 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
616 | 645 | radio.layout = sevenButton; |
---|
617 | 646 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
618 | 647 | } |
---|
| 648 | + |
---|
| 649 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 650 | + { |
---|
| 651 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 652 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 653 | + boxCB.addItemListener(this); |
---|
| 654 | + |
---|
| 655 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 656 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 657 | + zoomBoxCB.addItemListener(this); |
---|
| 658 | + |
---|
| 659 | + if (true) // Globals.ADVANCED) |
---|
| 660 | + { |
---|
| 661 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 662 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 663 | + supportCB.addItemListener(this); |
---|
| 664 | + |
---|
| 665 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 666 | + // localCB.addItemListener(this); |
---|
| 667 | + |
---|
| 668 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 669 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 670 | + crowdCB.addItemListener(this); |
---|
| 671 | + |
---|
| 672 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 673 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 674 | + smoothCB.addItemListener(this); |
---|
| 675 | + |
---|
| 676 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 677 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 678 | + slowCB.addItemListener(this); |
---|
| 679 | + |
---|
| 680 | +// constraints.gridy += 1; |
---|
| 681 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 682 | +// speakerMocapCB.addItemListener(this); |
---|
| 683 | + |
---|
| 684 | + if (false) |
---|
| 685 | + { |
---|
| 686 | + // handled in scripts |
---|
| 687 | + //constraints.gridy += 1; |
---|
| 688 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 689 | + speakerCameraCB.addItemListener(this); |
---|
| 690 | + |
---|
| 691 | + //constraints.gridy += 1; |
---|
| 692 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 693 | + speakerFocusCB.addItemListener(this); |
---|
| 694 | + |
---|
| 695 | + //constraints.gridy += 1; |
---|
| 696 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 697 | + smoothfocusCB.addItemListener(this); |
---|
| 698 | + } |
---|
| 699 | + |
---|
| 700 | +//constraints.gridx += 1; |
---|
| 701 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 702 | +// debugCB.addItemListener(this); |
---|
| 703 | + |
---|
| 704 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 705 | + oeilCB.addItemListener(this); |
---|
| 706 | + |
---|
| 707 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 708 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 709 | + lookAtCB.addItemListener(this); |
---|
| 710 | + |
---|
| 711 | + } |
---|
| 712 | + |
---|
| 713 | + cGridBag fill = new cGridBag(); |
---|
| 714 | + |
---|
| 715 | + fill.preferredHeight = 200; |
---|
| 716 | + |
---|
| 717 | + panel.add(fill); |
---|
| 718 | + |
---|
| 719 | + } |
---|
619 | 720 | |
---|
620 | 721 | void EditObject(Object3D obj) |
---|
621 | 722 | { |
---|
622 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
623 | | - dummyButton.SetObject(obj); |
---|
624 | | - dummyButton.layout = sevenButton; |
---|
625 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
626 | | - dummyButton.addActionListener(this); |
---|
627 | | - radioPanel.add(dummyButton); |
---|
628 | | - buttonGroup.add(dummyButton); |
---|
629 | | - dummyButton.doClick(); |
---|
| 723 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 724 | + radioButton.SetObject(obj); |
---|
| 725 | + radioButton.layout = sevenButton; |
---|
| 726 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 727 | + radioButton.addActionListener(this); |
---|
| 728 | + radioPanel.add(radioButton); |
---|
| 729 | + buttonGroup.add(radioButton); |
---|
| 730 | + radioButton.doClick(); |
---|
630 | 731 | } |
---|
| 732 | + |
---|
631 | 733 | void SetupViews(ObjEditor oe) |
---|
632 | 734 | { |
---|
633 | 735 | oe.SetupViews(); |
---|
.. | .. |
---|
646 | 748 | JCheckBox fastCB; |
---|
647 | 749 | JCheckBox slowCB; |
---|
648 | 750 | JCheckBox boxCB; |
---|
| 751 | + JCheckBox zoomBoxCB; |
---|
649 | 752 | JCheckBox trackCB; |
---|
650 | 753 | JCheckBox smoothfocusCB; |
---|
651 | 754 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
688 | 791 | dropAttributes |= Object3D.TEXTURE; |
---|
689 | 792 | else |
---|
690 | 793 | dropAttributes &= ~Object3D.TEXTURE; |
---|
691 | | - } |
---|
692 | | - else if(e.getSource() == liveCB) |
---|
| 794 | + } else if(e.getSource() == liveCB) |
---|
693 | 795 | { |
---|
694 | 796 | cameraView.ToggleLive(); |
---|
695 | 797 | } |
---|
.. | .. |
---|
726 | 828 | Recompile(); |
---|
727 | 829 | cameraView.repaint(); |
---|
728 | 830 | // refreshContents(); |
---|
| 831 | + } |
---|
| 832 | + else if(e.getSource() == zoomBoxCB) |
---|
| 833 | + { |
---|
| 834 | + cameraView.ToggleZoomBoxMode(); |
---|
729 | 835 | } |
---|
730 | 836 | else if(e.getSource() == smoothfocusCB) |
---|
731 | 837 | { |
---|
.. | .. |
---|
840 | 946 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
841 | 947 | // return; |
---|
842 | 948 | // } |
---|
843 | | - if (string.charAt(0) == '/') |
---|
| 949 | + |
---|
| 950 | + // File path for Mac and Windows |
---|
| 951 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
844 | 952 | { |
---|
845 | 953 | // file(s) |
---|
846 | 954 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
867 | 975 | |
---|
868 | 976 | flashIt = false; |
---|
869 | 977 | CameraPane pane = (CameraPane) target; |
---|
870 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 978 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
871 | 979 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
872 | 980 | |
---|
873 | 981 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
894 | 1002 | { |
---|
895 | 1003 | loadClipboard(true); |
---|
896 | 1004 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
897 | | - pasteInto(false); |
---|
| 1005 | + pasteInto(false, false); |
---|
898 | 1006 | } else { |
---|
899 | 1007 | loadClipboard(false); |
---|
900 | 1008 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
901 | | - pasteInto(false); // true); // ??? |
---|
| 1009 | + pasteInto(false, false); // true); // ??? |
---|
902 | 1010 | } |
---|
903 | 1011 | } |
---|
904 | 1012 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1002 | 1110 | |
---|
1003 | 1111 | void buildCreateMenu(Menu menu) |
---|
1004 | 1112 | { |
---|
| 1113 | + //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
| 1114 | + //heightFieldItem.addActionListener(this); |
---|
1005 | 1115 | gridItem = menu.add(new MenuItem("Grid")); |
---|
1006 | 1116 | gridItem.addActionListener(this); |
---|
1007 | 1117 | rectoidItem = menu.add(new MenuItem("Box")); |
---|
.. | .. |
---|
1014 | 1124 | torusItem.addActionListener(this); |
---|
1015 | 1125 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1016 | 1126 | superItem.addActionListener(this); |
---|
| 1127 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1128 | + kleinItem.addActionListener(this); |
---|
1017 | 1129 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1018 | 1130 | particleItem.addActionListener(this); |
---|
| 1131 | + if (Globals.ADVANCED) |
---|
| 1132 | + { |
---|
1019 | 1133 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1020 | 1134 | ragdollItem.addActionListener(this); |
---|
1021 | 1135 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1022 | 1136 | ragdoll2Item.addActionListener(this); |
---|
| 1137 | + } |
---|
1023 | 1138 | menu.add("-"); |
---|
1024 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1139 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1025 | 1140 | meshItem.addActionListener(this); |
---|
1026 | 1141 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1027 | 1142 | // meshGroupItem.addActionListener(this); |
---|
| 1143 | + if (Globals.ADVANCED) |
---|
| 1144 | + { |
---|
1028 | 1145 | springItem = menu.add(new MenuItem("Spring")); |
---|
1029 | 1146 | springItem.addActionListener(this); |
---|
1030 | 1147 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1031 | 1148 | flagItem.addActionListener(this); |
---|
1032 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1033 | | - bezierItem.addActionListener(this); |
---|
1034 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1035 | | - checkerItem.addActionListener(this); |
---|
1036 | 1149 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1037 | 1150 | blobItem.addActionListener(this); |
---|
1038 | 1151 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1039 | 1152 | latheItem.addActionListener(this); |
---|
| 1153 | + } |
---|
| 1154 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1155 | + bezierItem.addActionListener(this); |
---|
| 1156 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1157 | + overlayItem.addActionListener(this); |
---|
1040 | 1158 | lightItem = menu.add(new MenuItem("Light")); |
---|
1041 | 1159 | lightItem.addActionListener(this); |
---|
1042 | 1160 | menu.add("-"); |
---|
.. | .. |
---|
1046 | 1164 | loopItem.addActionListener(this); |
---|
1047 | 1165 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1048 | 1166 | doubleItem.addActionListener(this); |
---|
| 1167 | + if (Globals.ADVANCED) |
---|
| 1168 | + { |
---|
1049 | 1169 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1050 | 1170 | tripleItem.addActionListener(this); |
---|
1051 | | - menu.add("-"); |
---|
1052 | | - importGFDItem = menu.add(new MenuItem("GraphreeD Object...")); |
---|
1053 | | - importGFDItem.addActionListener(this); |
---|
1054 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
1055 | | - importVRMLX3DItem.addActionListener(this); |
---|
1056 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
1057 | | - importOBJItem.addActionListener(this); |
---|
1058 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
1059 | | - import3DSItem.addActionListener(this); |
---|
| 1171 | + } |
---|
1060 | 1172 | } |
---|
1061 | 1173 | |
---|
1062 | 1174 | void buildToolsMenu(Menu menu) |
---|
1063 | 1175 | { |
---|
1064 | 1176 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1065 | 1177 | animationItem.addItemListener(this); |
---|
1066 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1178 | + animationItem.setState(Globals.ANIMATION); |
---|
1067 | 1179 | |
---|
1068 | 1180 | menu.add("-"); |
---|
1069 | 1181 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1070 | 1182 | parseverticesItem.addActionListener(this); |
---|
1071 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1183 | + textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
| 1184 | + textureFieldItem.addActionListener(this); |
---|
| 1185 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1072 | 1186 | alignItem.addActionListener(this); |
---|
1073 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1074 | | - mirrorItem.addActionListener(this); |
---|
1075 | 1187 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1076 | 1188 | reduceMorphItem.addActionListener(this); |
---|
1077 | 1189 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1078 | 1190 | reduce34MorphItem.addActionListener(this); |
---|
1079 | | - |
---|
| 1191 | + menu.add("-"); |
---|
1080 | 1192 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1081 | 1193 | computeAOItem.addActionListener(this); |
---|
1082 | | - menu.add("-"); |
---|
1083 | 1194 | |
---|
| 1195 | + if (Globals.ADVANCED) |
---|
| 1196 | + { |
---|
| 1197 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1198 | + mirrorItem.addActionListener(this); |
---|
| 1199 | + menu.add("-"); |
---|
1084 | 1200 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1085 | 1201 | memoryItem.addActionListener(this); |
---|
1086 | 1202 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
.. | .. |
---|
1094 | 1210 | resetParentItem.addActionListener(this); |
---|
1095 | 1211 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1096 | 1212 | repairParentItem.addActionListener(this); |
---|
| 1213 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1214 | + repairShadowItem.addActionListener(this); |
---|
1097 | 1215 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1098 | 1216 | invariantsItem.addActionListener(this); |
---|
1099 | 1217 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1101 | 1219 | menu.add("-"); |
---|
1102 | 1220 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1103 | 1221 | editScriptItem.addActionListener(this); |
---|
| 1222 | + } |
---|
1104 | 1223 | } |
---|
1105 | 1224 | |
---|
1106 | 1225 | void ScreenFit() |
---|
.. | .. |
---|
1429 | 1548 | |
---|
1430 | 1549 | void Overwrite(int mask) |
---|
1431 | 1550 | { |
---|
1432 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1551 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1433 | 1552 | { |
---|
1434 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1553 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1435 | 1554 | |
---|
1436 | 1555 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1437 | 1556 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1454 | 1573 | // |
---|
1455 | 1574 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1456 | 1575 | { |
---|
| 1576 | + Object source = event.getSource(); |
---|
1457 | 1577 | /* |
---|
1458 | 1578 | if (event.getSource() == nameField) |
---|
1459 | 1579 | { |
---|
.. | .. |
---|
1465 | 1585 | } |
---|
1466 | 1586 | else |
---|
1467 | 1587 | */ |
---|
1468 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1588 | + if (source == lookAtItem || source == lookFromItem) |
---|
1469 | 1589 | { |
---|
1470 | 1590 | ScreenFit(); |
---|
1471 | 1591 | } else |
---|
1472 | | - if (event.getSource() == switchItem) |
---|
| 1592 | + if (source == switchItem) |
---|
1473 | 1593 | { |
---|
1474 | 1594 | cVector v1 = new cVector(); |
---|
1475 | 1595 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1478 | 1598 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1479 | 1599 | objEditor.cameraView.repaint(); |
---|
1480 | 1600 | } else |
---|
1481 | | - if (event.getSource() == rectoidItem) |
---|
| 1601 | + if (source == rectoidItem) |
---|
1482 | 1602 | { |
---|
1483 | 1603 | makeSomething(new Box()); |
---|
1484 | 1604 | } else |
---|
1485 | | - if (event.getSource() == particleItem) |
---|
| 1605 | + if (source == particleItem) |
---|
1486 | 1606 | { |
---|
1487 | 1607 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1488 | 1608 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1503 | 1623 | applyExample(particleGeom, "SMOKE"); |
---|
1504 | 1624 | makeSomething(particleGeom); |
---|
1505 | 1625 | } else |
---|
1506 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1626 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1507 | 1627 | { |
---|
1508 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1628 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1509 | 1629 | |
---|
1510 | 1630 | ragdoll.toParent = LA.newMatrix(); |
---|
1511 | 1631 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1521 | 1641 | makeSomething(ragdoll); |
---|
1522 | 1642 | //makeSomething(new VehicleDemo()); |
---|
1523 | 1643 | } else |
---|
1524 | | - if (event.getSource() == gridItem) |
---|
| 1644 | + /* |
---|
| 1645 | + */ |
---|
| 1646 | + if (source == heightFieldItem) |
---|
| 1647 | + { |
---|
| 1648 | + Object3D obj = new Object3D(); |
---|
| 1649 | + |
---|
| 1650 | + obj.CreateMaterial(); |
---|
| 1651 | + obj.bRep = new BoundaryRep(); |
---|
| 1652 | + |
---|
| 1653 | + obj.bRep.CreateMesh(new iHeightField() |
---|
| 1654 | + { |
---|
| 1655 | + public double f(double x, double y) |
---|
| 1656 | + { |
---|
| 1657 | + // The Mandelbrot set is represented by coloring |
---|
| 1658 | + // each point (x,y) according to the number of |
---|
| 1659 | + // iterations it takes before the while loop in |
---|
| 1660 | + // this method ends. For points that are actually |
---|
| 1661 | + // in the Mandelbrot set, or very close to it, the |
---|
| 1662 | + // count will reach the maximum value, 80. These |
---|
| 1663 | + // points will be colored purple. All other colors |
---|
| 1664 | + // represent points that are definitely NOT in the set. |
---|
| 1665 | + x -= 600; |
---|
| 1666 | + y -= 500; |
---|
| 1667 | + x /= 200; |
---|
| 1668 | + y /= 200; |
---|
| 1669 | + int count = 0; |
---|
| 1670 | + double zx = x; |
---|
| 1671 | + double zy = y; |
---|
| 1672 | + while (count < 80 && Math.abs(x) < 100 && Math.abs(zy) < 100) { |
---|
| 1673 | + double new_zx = zx*zx - zy*zy + x; |
---|
| 1674 | + zy = 2*zx*zy + y; |
---|
| 1675 | + zx = new_zx; |
---|
| 1676 | + count++; |
---|
| 1677 | + } |
---|
| 1678 | + return count; // Math.sqrt(count); |
---|
| 1679 | + } |
---|
| 1680 | + }, 1000,1000); |
---|
| 1681 | + |
---|
| 1682 | + makeSomething(obj); |
---|
| 1683 | + } else |
---|
| 1684 | + if (source == gridItem) |
---|
1525 | 1685 | { |
---|
1526 | 1686 | makeSomething(new Grid()); |
---|
1527 | 1687 | } else |
---|
1528 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1688 | + if (source == ellipsoidItem) |
---|
1529 | 1689 | { |
---|
1530 | 1690 | makeSomething(new Sphere()); |
---|
1531 | 1691 | } else |
---|
1532 | | - if (event.getSource() == coneItem) |
---|
| 1692 | + if (source == coneItem) |
---|
1533 | 1693 | { |
---|
1534 | 1694 | makeSomething(new Cone()); |
---|
1535 | 1695 | } else |
---|
1536 | | - if (event.getSource() == torusItem) |
---|
| 1696 | + if (source == torusItem) |
---|
1537 | 1697 | { |
---|
1538 | 1698 | makeSomething(new Torus()); |
---|
1539 | 1699 | } else |
---|
1540 | | - if (event.getSource() == superItem) |
---|
| 1700 | + if (source == superItem) |
---|
1541 | 1701 | { |
---|
1542 | 1702 | makeSomething(new Superellipsoid()); |
---|
1543 | 1703 | } else |
---|
1544 | | - if (event.getSource() == blobItem) |
---|
| 1704 | + if (source == kleinItem) |
---|
| 1705 | + { |
---|
| 1706 | + makeSomething(new Klein()); |
---|
| 1707 | + } else |
---|
| 1708 | + if (source == blobItem) |
---|
1545 | 1709 | { |
---|
1546 | 1710 | Blob blob = new Blob(); |
---|
1547 | 1711 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1549 | 1713 | //blob.retile(); |
---|
1550 | 1714 | makeSomething(blob); |
---|
1551 | 1715 | } else |
---|
1552 | | - if (event.getSource() == latheItem) |
---|
| 1716 | + if (source == latheItem) |
---|
1553 | 1717 | { |
---|
1554 | 1718 | makeSomething(new Lathe()); |
---|
1555 | 1719 | } else |
---|
1556 | | - if (event.getSource() == bezierItem) |
---|
| 1720 | + if (source == bezierItem) |
---|
1557 | 1721 | { |
---|
1558 | 1722 | makeSomething(new BezierSurface()); |
---|
1559 | 1723 | } else |
---|
1560 | | - if (event.getSource() == checkerItem) |
---|
| 1724 | + if (source == overlayItem) |
---|
1561 | 1725 | { |
---|
1562 | 1726 | /* |
---|
1563 | 1727 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1570 | 1734 | LA.matConcat(obj.toParent, cameraView.renderCamera.fromParent, obj.toParent); |
---|
1571 | 1735 | LA.matInvert(obj.toParent, obj.fromParent); |
---|
1572 | 1736 | */ |
---|
1573 | | - makeSomething(new CheckerIG()); |
---|
| 1737 | + makeSomething(new Checker()); |
---|
1574 | 1738 | } else |
---|
1575 | | - if (event.getSource() == meshItem) |
---|
| 1739 | + if (source == meshItem) |
---|
1576 | 1740 | { |
---|
1577 | 1741 | Object3D itemtomake = new Object3D(); |
---|
1578 | 1742 | Object3D child; |
---|
.. | .. |
---|
1593 | 1757 | makeSomething(child); |
---|
1594 | 1758 | } |
---|
1595 | 1759 | } else |
---|
1596 | | - if (event.getSource() == springItem) |
---|
| 1760 | + if (source == springItem) |
---|
1597 | 1761 | { |
---|
1598 | 1762 | cSpring s = new cSpring(); |
---|
1599 | 1763 | s.setup(); |
---|
1600 | 1764 | makeSomething(s); |
---|
1601 | 1765 | } else |
---|
1602 | | - if (event.getSource() == flagItem) |
---|
| 1766 | + if (source == flagItem) |
---|
1603 | 1767 | { |
---|
1604 | 1768 | cSpring s = new cFlag(); |
---|
1605 | 1769 | s.setup(); |
---|
1606 | 1770 | makeSomething(s); |
---|
1607 | 1771 | } else |
---|
1608 | | - if (event.getSource() == lightItem) |
---|
| 1772 | + if (source == lightItem) |
---|
1609 | 1773 | { |
---|
1610 | 1774 | makeSomething(new Light()); |
---|
1611 | 1775 | } else |
---|
1612 | | - if (event.getSource() == csgItem) |
---|
| 1776 | + if (source == csgItem) |
---|
1613 | 1777 | { |
---|
1614 | 1778 | group(new CSG()); |
---|
1615 | 1779 | } else |
---|
1616 | | - if (event.getSource() == templateItem) |
---|
| 1780 | + if (source == templateItem) |
---|
1617 | 1781 | { |
---|
1618 | 1782 | group(new cTemplate()); |
---|
1619 | 1783 | } else |
---|
1620 | | - if (event.getSource() == attributeItem) |
---|
| 1784 | + if (source == attributeItem) |
---|
1621 | 1785 | { |
---|
1622 | 1786 | makeSomething(new Attribute()); |
---|
1623 | 1787 | } else |
---|
1624 | | - if (event.getSource() == pointflowItem) |
---|
| 1788 | + if (source == pointflowItem) |
---|
1625 | 1789 | { |
---|
1626 | 1790 | makeSomething(new PointFlow()); |
---|
1627 | 1791 | } else |
---|
.. | .. |
---|
1633 | 1797 | } else |
---|
1634 | 1798 | */ |
---|
1635 | 1799 | |
---|
1636 | | - if (event.getSource() == superLoopItem) |
---|
| 1800 | + if (source == superLoopItem) |
---|
1637 | 1801 | { |
---|
1638 | 1802 | Composite g = new cGroup(); |
---|
1639 | 1803 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1655 | 1819 | |
---|
1656 | 1820 | group(g); |
---|
1657 | 1821 | } else |
---|
1658 | | - if (event.getSource() == loopItem) |
---|
| 1822 | + if (source == loopItem) |
---|
1659 | 1823 | { |
---|
1660 | 1824 | Composite csg = new GroupLeaf(); |
---|
1661 | 1825 | csg.count = 5; |
---|
.. | .. |
---|
1664 | 1828 | csg.addChild(child); |
---|
1665 | 1829 | child.addChild(csg); |
---|
1666 | 1830 | } else |
---|
1667 | | - if (event.getSource() == doubleItem) |
---|
| 1831 | + if (source == doubleItem) |
---|
1668 | 1832 | { |
---|
1669 | 1833 | Composite csg = new GroupLeaf(); |
---|
1670 | 1834 | csg.count = 5; |
---|
.. | .. |
---|
1676 | 1840 | csg.addChild(child); |
---|
1677 | 1841 | child.addChild(csg); |
---|
1678 | 1842 | } else |
---|
1679 | | - if (event.getSource() == tripleItem) |
---|
| 1843 | + if (source == tripleItem) |
---|
1680 | 1844 | { |
---|
1681 | 1845 | Composite csg = new GroupLeaf(); |
---|
1682 | 1846 | csg.count = 4; |
---|
.. | .. |
---|
1692 | 1856 | child.addChild(csg); |
---|
1693 | 1857 | } else |
---|
1694 | 1858 | |
---|
1695 | | - if (event.getSource() == importGFDItem) |
---|
| 1859 | + if (source == importGFDItem) |
---|
1696 | 1860 | { |
---|
1697 | 1861 | ImportGFD(); |
---|
1698 | 1862 | } else |
---|
1699 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1863 | + if (source == importVRMLX3DItem) |
---|
1700 | 1864 | { |
---|
1701 | 1865 | ImportVRMLX3D(); |
---|
1702 | 1866 | } else |
---|
1703 | | - if (event.getSource() == import3DSItem) |
---|
| 1867 | + if (source == import3DSItem) |
---|
1704 | 1868 | { |
---|
1705 | 1869 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1706 | 1870 | } else |
---|
1707 | | - if (event.getSource() == importOBJItem) |
---|
| 1871 | + if (source == importOBJItem) |
---|
1708 | 1872 | { |
---|
1709 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 1873 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 1874 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 1875 | + browser.setVisible(true); |
---|
| 1876 | + String filename = browser.getFile(); |
---|
| 1877 | + if (filename != null && filename.length() > 0) |
---|
| 1878 | + { |
---|
| 1879 | + String fullname = browser.getDirectory() + filename; |
---|
| 1880 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 1881 | + } |
---|
1710 | 1882 | } else |
---|
1711 | | - if (event.getSource() == computeAOItem) |
---|
| 1883 | + if (source == computeAOItem) |
---|
1712 | 1884 | { |
---|
1713 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1714 | | - CameraPane.theRenderer.repaint(); |
---|
| 1885 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1886 | + Globals.theRenderer.repaint(); |
---|
1715 | 1887 | } else |
---|
1716 | | - if (event.getSource() == recompileItem) |
---|
| 1888 | + if (source == recompileItem) |
---|
1717 | 1889 | { |
---|
1718 | 1890 | Recompile(); |
---|
1719 | 1891 | refreshContents(); |
---|
1720 | 1892 | } else |
---|
1721 | | - if (event.getSource() == editScriptItem) |
---|
| 1893 | + if (source == editScriptItem) |
---|
1722 | 1894 | { |
---|
1723 | 1895 | OpenDialog(); |
---|
1724 | 1896 | refreshContents(); |
---|
1725 | 1897 | } else |
---|
1726 | | - if (event.getSource() == invariantsItem) |
---|
| 1898 | + if (source == invariantsItem) |
---|
1727 | 1899 | { |
---|
1728 | 1900 | System.out.println("Invariants:"); |
---|
1729 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1901 | + Grafreed.grafreeD.universe.invariants(); |
---|
1730 | 1902 | } else |
---|
1731 | | - if (event.getSource() == memoryItem) |
---|
| 1903 | + if (source == memoryItem) |
---|
1732 | 1904 | { |
---|
1733 | 1905 | //System.out.println("Invariants:"); |
---|
1734 | 1906 | PrintMemory(); |
---|
1735 | 1907 | } else |
---|
1736 | | - if (event.getSource() == pathItem) |
---|
| 1908 | + if (source == pathItem) |
---|
1737 | 1909 | { |
---|
1738 | 1910 | PrintPath(); |
---|
1739 | 1911 | } else |
---|
1740 | | - if (event.getSource() == analyzeItem) |
---|
| 1912 | + if (source == analyzeItem) |
---|
1741 | 1913 | { |
---|
1742 | 1914 | AnalyzeObject(); |
---|
1743 | 1915 | } else |
---|
1744 | | - if (event.getSource() == dumpItem) |
---|
| 1916 | + if (source == dumpItem) |
---|
1745 | 1917 | { |
---|
1746 | 1918 | DumpObject(); |
---|
1747 | 1919 | } else |
---|
1748 | | - if (event.getSource() == screenfitButton) |
---|
| 1920 | + if (source == oneStepButton) |
---|
| 1921 | + { |
---|
| 1922 | + Globals.ONESTEP = true; |
---|
| 1923 | + cameraView.repaint(); |
---|
| 1924 | + } else |
---|
| 1925 | + if (source == screenfitButton) |
---|
1749 | 1926 | { |
---|
1750 | 1927 | //Reload(lastConverter, lastFilename, true); |
---|
1751 | 1928 | ScreenFit(); |
---|
1752 | 1929 | } else |
---|
1753 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1930 | + if (source == screenfitpointButton) |
---|
1754 | 1931 | { |
---|
1755 | 1932 | //Reload(lastConverter, lastFilename, true); |
---|
1756 | 1933 | ScreenFitPoint(); |
---|
1757 | 1934 | } else |
---|
1758 | | - if (event.getSource() == snapobjectButton) |
---|
| 1935 | + if (source == snapobjectButton) |
---|
1759 | 1936 | { |
---|
1760 | 1937 | //Reload(lastConverter, lastFilename, true); |
---|
1761 | 1938 | SnapObject(); |
---|
.. | .. |
---|
1766 | 1943 | // Recompile(); |
---|
1767 | 1944 | // refreshContents(); |
---|
1768 | 1945 | // } else |
---|
1769 | | - if (event.getSource() == gcButton) |
---|
| 1946 | + if (source == gcButton) |
---|
1770 | 1947 | { |
---|
1771 | 1948 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1772 | 1949 | System.gc(); |
---|
1773 | 1950 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1774 | 1951 | } else |
---|
1775 | | - if (event.getSource() == editLeafItem) |
---|
| 1952 | + if (source == editLeafItem) |
---|
1776 | 1953 | { |
---|
1777 | 1954 | Object3D obj; |
---|
1778 | 1955 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1786 | 1963 | } |
---|
1787 | 1964 | refreshContents(true); |
---|
1788 | 1965 | } else |
---|
1789 | | - if (event.getSource() == openWindowItem) |
---|
| 1966 | + if (source == openWindowItem) |
---|
1790 | 1967 | { |
---|
1791 | 1968 | EditSelection(true); |
---|
1792 | 1969 | } else |
---|
1793 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1970 | + if (source == cutItem || source == clearButton) |
---|
1794 | 1971 | { |
---|
1795 | 1972 | loadClipboard(true); |
---|
1796 | 1973 | } else |
---|
1797 | | - if (event.getSource() == duplicateItem) |
---|
| 1974 | + if (source == duplicateItem) |
---|
1798 | 1975 | { |
---|
1799 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1976 | + Object3D keep = Grafreed.clipboard; |
---|
1800 | 1977 | loadClipboard(false); |
---|
1801 | 1978 | paste(false); |
---|
1802 | | - GraphreeD.clipboard = keep; |
---|
| 1979 | + Grafreed.clipboard = keep; |
---|
1803 | 1980 | } else |
---|
1804 | | - if (event.getSource() == cloneItem) |
---|
| 1981 | + if (source == cloneItem) |
---|
1805 | 1982 | { |
---|
1806 | 1983 | CloneSelection(false); |
---|
1807 | 1984 | } else |
---|
1808 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1985 | + if (source == cloneSupportItem) |
---|
1809 | 1986 | { |
---|
1810 | 1987 | CloneSelection(true); |
---|
1811 | 1988 | } else |
---|
1812 | | - if (event.getSource() == copyItem) |
---|
| 1989 | + if (source == copyItem) |
---|
1813 | 1990 | { |
---|
1814 | 1991 | loadClipboard(false); |
---|
1815 | 1992 | } else |
---|
1816 | | - if (event.getSource() == pasteItem) |
---|
| 1993 | + if (source == pasteItem) |
---|
1817 | 1994 | { |
---|
1818 | 1995 | paste(false); |
---|
1819 | 1996 | } else |
---|
1820 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1997 | + if (source == pasteIntoItem) |
---|
1821 | 1998 | { |
---|
1822 | | - pasteInto(false); |
---|
| 1999 | + pasteInto(true, false); |
---|
1823 | 2000 | } else |
---|
1824 | | - if (event.getSource() == pasteCloneItem) |
---|
| 2001 | + if (source == pasteLinkItem) |
---|
1825 | 2002 | { |
---|
1826 | | - pasteInto(true); |
---|
| 2003 | + pasteInto(false, false); |
---|
1827 | 2004 | } else |
---|
1828 | | - if (event.getSource() == pasteExpandItem) |
---|
| 2005 | + if (source == pasteCloneItem) |
---|
| 2006 | + { |
---|
| 2007 | + pasteInto(true, true); |
---|
| 2008 | + } else |
---|
| 2009 | + if (source == pasteExpandItem) |
---|
1829 | 2010 | { |
---|
1830 | 2011 | paste(true); |
---|
1831 | 2012 | } else |
---|
1832 | | - if (event.getSource() == synchronizeItem) |
---|
| 2013 | + if (source == synchronizeItem) |
---|
1833 | 2014 | { |
---|
1834 | 2015 | Overwrite(Object3D.TRANSFORM); |
---|
1835 | 2016 | } else |
---|
1836 | | - if (event.getSource() == overwriteNameItem) |
---|
| 2017 | + if (source == overwriteNameItem) |
---|
1837 | 2018 | { |
---|
1838 | 2019 | Overwrite(Object3D.NAME); |
---|
1839 | 2020 | } else |
---|
1840 | | - if (event.getSource() == overwriteUVItem) |
---|
| 2021 | + if (source == overwriteUVItem) |
---|
1841 | 2022 | { |
---|
1842 | 2023 | Overwrite(Object3D.UV); |
---|
1843 | 2024 | } else |
---|
1844 | | - if (event.getSource() == overwriteMatItem) |
---|
| 2025 | + if (source == overwriteMatItem) |
---|
1845 | 2026 | { |
---|
| 2027 | + /* july 2015 |
---|
1846 | 2028 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1847 | | - Overwrite(Object3D.MATERIAL); |
---|
| 2029 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1848 | 2030 | else |
---|
1849 | 2031 | { |
---|
1850 | 2032 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1856 | 2038 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1857 | 2039 | } |
---|
1858 | 2040 | } |
---|
| 2041 | + */ |
---|
| 2042 | + |
---|
| 2043 | + Overwrite(dropAttributes); |
---|
1859 | 2044 | } |
---|
1860 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 2045 | + if (source == overwriteGeoItem) |
---|
1861 | 2046 | { |
---|
1862 | 2047 | Overwrite(Object3D.GEOMETRY); |
---|
1863 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2048 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1864 | 2049 | // { |
---|
1865 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2050 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1866 | 2051 | // |
---|
1867 | 2052 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1868 | 2053 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1874 | 2059 | // refreshContents(); |
---|
1875 | 2060 | // } |
---|
1876 | 2061 | } else |
---|
1877 | | - if (event.getSource() == generateMeshItem) |
---|
| 2062 | + if (source == generateMeshItem) |
---|
1878 | 2063 | { |
---|
1879 | 2064 | //if (group.selection.size() == 1) |
---|
1880 | 2065 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1885 | 2070 | ResetModel(); |
---|
1886 | 2071 | refreshContents(); |
---|
1887 | 2072 | } else |
---|
1888 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 2073 | + if (source == extractGeometriesItem) |
---|
1889 | 2074 | { |
---|
1890 | 2075 | boolean one = false; |
---|
1891 | 2076 | |
---|
.. | .. |
---|
1912 | 2097 | ResetModel(); |
---|
1913 | 2098 | refreshContents(); |
---|
1914 | 2099 | } else |
---|
1915 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2100 | + if (source == cloneGeometriesItem) |
---|
1916 | 2101 | { |
---|
1917 | 2102 | boolean one = false; |
---|
1918 | 2103 | |
---|
.. | .. |
---|
1938 | 2123 | ResetModel(); |
---|
1939 | 2124 | refreshContents(); |
---|
1940 | 2125 | } else |
---|
1941 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2126 | + if (source == shareGeometriesItem) |
---|
1942 | 2127 | { |
---|
1943 | 2128 | boolean one = false; |
---|
1944 | 2129 | |
---|
1945 | 2130 | if (group.selection.size() == 1) |
---|
1946 | 2131 | one = true; |
---|
1947 | 2132 | |
---|
| 2133 | + Object3D merge = null; |
---|
| 2134 | + |
---|
1948 | 2135 | Object3D content = new cGroup(); |
---|
1949 | 2136 | |
---|
1950 | 2137 | for (int i=0; i<group.selection.size(); i++) |
---|
1951 | 2138 | { |
---|
1952 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2139 | + merge = new Merge(group.selection.get(i)); |
---|
1953 | 2140 | |
---|
1954 | 2141 | if (one) |
---|
1955 | | - makeSomething(sel, false); |
---|
| 2142 | + makeSomething(merge, false); |
---|
1956 | 2143 | else |
---|
1957 | | - content.addChild(sel); |
---|
| 2144 | + content.addChild(merge); |
---|
1958 | 2145 | } |
---|
1959 | 2146 | |
---|
1960 | 2147 | if (!one) |
---|
1961 | | - makeSomething(content, false); |
---|
1962 | | - |
---|
1963 | | - ResetModel(); |
---|
1964 | | - refreshContents(); |
---|
| 2148 | + makeSomething(content, true); |
---|
| 2149 | + else |
---|
| 2150 | + { |
---|
| 2151 | + ResetModel(); |
---|
| 2152 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2153 | + refreshContents(); |
---|
| 2154 | + } |
---|
1965 | 2155 | } else |
---|
1966 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2156 | + if (source == mergeGeometriesItem) |
---|
1967 | 2157 | { |
---|
1968 | 2158 | boolean one = false; |
---|
1969 | 2159 | |
---|
.. | .. |
---|
1993 | 2183 | ResetModel(); |
---|
1994 | 2184 | refreshContents(); |
---|
1995 | 2185 | } else |
---|
1996 | | - if (event.getSource() == linkverticesItem) |
---|
| 2186 | + if (source == linkverticesItem) |
---|
1997 | 2187 | { |
---|
1998 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2188 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
1999 | 2189 | // { |
---|
2000 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2190 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2001 | 2191 | // |
---|
2002 | 2192 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2003 | 2193 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2006 | 2196 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2007 | 2197 | // refreshContents(); |
---|
2008 | 2198 | // } |
---|
2009 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2199 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2010 | 2200 | { |
---|
2011 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2201 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2012 | 2202 | |
---|
2013 | 2203 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2014 | 2204 | content = ((cGroup)content).get(0); |
---|
2015 | 2205 | |
---|
2016 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2206 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2017 | 2207 | for (int i=0; i<group.selection.size(); i++) |
---|
2018 | 2208 | { |
---|
2019 | | - boolean random = CameraPane.RANDOM; |
---|
2020 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2209 | + boolean random = CameraPane.SWITCH; |
---|
| 2210 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2021 | 2211 | group.selection.get(i).linkVerticesThis(content); |
---|
2022 | 2212 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2023 | | - CameraPane.RANDOM = random; |
---|
| 2213 | + CameraPane.SWITCH = random; |
---|
2024 | 2214 | } |
---|
2025 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2215 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2026 | 2216 | refreshContents(); |
---|
2027 | 2217 | } |
---|
2028 | 2218 | } else |
---|
2029 | | - if (event.getSource() == resetsupportItem) |
---|
| 2219 | + if (source == resetsupportItem) |
---|
2030 | 2220 | { |
---|
2031 | 2221 | for (int i=0; i<group.selection.size(); i++) |
---|
2032 | 2222 | { |
---|
2033 | | - boolean random = CameraPane.RANDOM; |
---|
2034 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2223 | + boolean random = CameraPane.SWITCH; |
---|
| 2224 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2035 | 2225 | group.selection.get(i).linkVerticesThis(null); |
---|
2036 | | - CameraPane.RANDOM = random; |
---|
| 2226 | + CameraPane.SWITCH = random; |
---|
2037 | 2227 | } |
---|
2038 | 2228 | |
---|
2039 | 2229 | refreshContents(); |
---|
2040 | 2230 | } else |
---|
2041 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2231 | + if (source == relinkverticesItem) |
---|
| 2232 | + { |
---|
| 2233 | + boolean random = CameraPane.SWITCH; |
---|
| 2234 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
| 2235 | + group.selection.RelinkToSupport(); |
---|
| 2236 | + CameraPane.SWITCH = random; |
---|
| 2237 | + |
---|
| 2238 | + refreshContents(); |
---|
| 2239 | + } else |
---|
| 2240 | + if (source == resetreferencesItem) |
---|
2042 | 2241 | { |
---|
2043 | 2242 | for (int i=0; i<group.selection.size(); i++) |
---|
2044 | 2243 | { |
---|
.. | .. |
---|
2047 | 2246 | |
---|
2048 | 2247 | refreshContents(); |
---|
2049 | 2248 | } else |
---|
2050 | | - if (event.getSource() == setMasterItem) |
---|
| 2249 | + if (source == setMasterItem) |
---|
2051 | 2250 | { |
---|
2052 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2251 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2053 | 2252 | { |
---|
2054 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2253 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2055 | 2254 | |
---|
2056 | 2255 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2057 | 2256 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2060 | 2259 | refreshContents(); |
---|
2061 | 2260 | } |
---|
2062 | 2261 | } else |
---|
2063 | | - if (event.getSource() == poseMeshItem) |
---|
| 2262 | + if (source == poseMeshItem) |
---|
2064 | 2263 | { |
---|
2065 | 2264 | if (group.selection.size() == 1) |
---|
2066 | 2265 | { |
---|
2067 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2266 | + if (Grafreed.clipboard.size() == 1) |
---|
2068 | 2267 | { |
---|
2069 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2268 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2070 | 2269 | |
---|
2071 | 2270 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2072 | 2271 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2079 | 2278 | } |
---|
2080 | 2279 | |
---|
2081 | 2280 | } else |
---|
2082 | | - if (event.getSource() == revertMeshItem) |
---|
| 2281 | + if (source == revertMeshItem) |
---|
2083 | 2282 | { |
---|
2084 | 2283 | RevertMeshes(); |
---|
2085 | 2284 | } else |
---|
2086 | | - if (event.getSource() == resetMeshItem) |
---|
| 2285 | + if (source == resetAllItem) |
---|
2087 | 2286 | { |
---|
2088 | 2287 | ResetAll(); |
---|
2089 | 2288 | } else |
---|
2090 | | - if (event.getSource() == stepAllItem) |
---|
| 2289 | + if (source == stepAllItem) |
---|
2091 | 2290 | { |
---|
2092 | 2291 | StepAll(); |
---|
2093 | 2292 | } else |
---|
2094 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2293 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2095 | 2294 | { |
---|
2096 | 2295 | //int indices[] = jList.getSelectedIndices(); |
---|
2097 | 2296 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2099 | 2298 | |
---|
2100 | 2299 | ClearSelection(false); |
---|
2101 | 2300 | } else |
---|
2102 | | - if (event.getSource() == clearAllItem) |
---|
| 2301 | + if (source == clearAllItem) |
---|
2103 | 2302 | { |
---|
2104 | 2303 | ClearSelection(true); |
---|
2105 | 2304 | } else |
---|
2106 | | - if (event.getSource() == grabItem) |
---|
| 2305 | + if (source == grabItem) |
---|
2107 | 2306 | { |
---|
2108 | 2307 | group(new cGroup(), true); |
---|
2109 | 2308 | } else |
---|
2110 | | - if (event.getSource() == frontItem) |
---|
| 2309 | + if (source == hideItem) |
---|
| 2310 | + { |
---|
| 2311 | + group(new HiddenObject()); |
---|
| 2312 | + } else |
---|
| 2313 | + if (source == frontItem) |
---|
2111 | 2314 | { |
---|
2112 | 2315 | front(); |
---|
2113 | 2316 | } else |
---|
2114 | | - if (event.getSource() == backItem) |
---|
| 2317 | + if (source == backItem) |
---|
2115 | 2318 | { |
---|
2116 | 2319 | back(); |
---|
2117 | 2320 | } else |
---|
2118 | | - if (event.getSource() == cameraItem) |
---|
| 2321 | + if (source == cameraItem) |
---|
2119 | 2322 | { |
---|
2120 | 2323 | makeSomething(new Camera()); |
---|
2121 | 2324 | } else |
---|
2122 | | - if (event.getSource() == compositeItem) |
---|
| 2325 | + if (source == compositeItem) |
---|
2123 | 2326 | { |
---|
2124 | 2327 | group(new Composite()); |
---|
2125 | 2328 | } else |
---|
2126 | | - if (event.getSource() == randomItem) |
---|
| 2329 | + if (source == randomItem) |
---|
2127 | 2330 | { |
---|
2128 | 2331 | RandomNode random = new RandomNode(); |
---|
2129 | 2332 | group(random); |
---|
2130 | 2333 | if (random.size() > 0) |
---|
2131 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2334 | + random.name = random.get(0).name + "Switch"; |
---|
2132 | 2335 | } else |
---|
2133 | | - if (event.getSource() == physicsItem) |
---|
| 2336 | + if (source == physicsItem) |
---|
2134 | 2337 | { |
---|
2135 | 2338 | group(new PhysicsNode()); |
---|
2136 | 2339 | } else |
---|
2137 | | - if (event.getSource() == frameselectorItem) |
---|
| 2340 | + if (source == frameselectorItem) |
---|
2138 | 2341 | { |
---|
2139 | 2342 | for (int i=0; i<group.selection.size(); i++) |
---|
2140 | 2343 | { |
---|
.. | .. |
---|
2146 | 2349 | ResetModel(); |
---|
2147 | 2350 | refreshContents(); |
---|
2148 | 2351 | } else |
---|
2149 | | - if (event.getSource() == switchGeoItem) |
---|
| 2352 | + if (source == switchGeoItem) |
---|
2150 | 2353 | { |
---|
2151 | 2354 | for (int i=0; i<group.selection.size(); i++) |
---|
2152 | 2355 | { |
---|
.. | .. |
---|
2158 | 2361 | ResetModel(); |
---|
2159 | 2362 | refreshContents(); |
---|
2160 | 2363 | } else |
---|
2161 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2364 | + if (source == switchTransfoItem) |
---|
2162 | 2365 | { |
---|
2163 | 2366 | for (int i=0; i<group.selection.size(); i++) |
---|
2164 | 2367 | { |
---|
.. | .. |
---|
2170 | 2373 | ResetModel(); |
---|
2171 | 2374 | refreshContents(); |
---|
2172 | 2375 | } else |
---|
2173 | | - if (event.getSource() == morphItem) |
---|
| 2376 | + if (source == morphItem) |
---|
2174 | 2377 | { |
---|
2175 | 2378 | for (int i=0; i<group.selection.size(); i++) |
---|
2176 | 2379 | { |
---|
.. | .. |
---|
2182 | 2385 | ResetModel(); |
---|
2183 | 2386 | refreshContents(); |
---|
2184 | 2387 | } else |
---|
2185 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2388 | + if (source == scriptNodeItem) |
---|
2186 | 2389 | { |
---|
2187 | 2390 | boolean atleastone = false; |
---|
2188 | 2391 | |
---|
.. | .. |
---|
2221 | 2424 | } |
---|
2222 | 2425 | } |
---|
2223 | 2426 | } else |
---|
2224 | | - if (event.getSource() == linkerItem) |
---|
| 2427 | + if (source == linkerItem) |
---|
2225 | 2428 | { |
---|
2226 | 2429 | group(new cLinker()); |
---|
2227 | 2430 | } else |
---|
2228 | | - if (event.getSource() == textureItem) |
---|
| 2431 | + if (source == textureItem) |
---|
2229 | 2432 | { |
---|
2230 | 2433 | group(new TextureNode()); |
---|
2231 | 2434 | } else |
---|
2232 | | - if (event.getSource() == shadowXItem) |
---|
| 2435 | + if (source == billboardItem) |
---|
| 2436 | + { |
---|
| 2437 | + group(new BillboardNode()); |
---|
| 2438 | + } else |
---|
| 2439 | + if (source == shadowXItem) |
---|
2233 | 2440 | { |
---|
2234 | 2441 | CastShadow(0); |
---|
2235 | 2442 | } else |
---|
2236 | | - if (event.getSource() == shadowYItem) |
---|
| 2443 | + if (source == shadowYItem) |
---|
2237 | 2444 | { |
---|
2238 | 2445 | CastShadow(1); |
---|
2239 | 2446 | } else |
---|
2240 | | - if (event.getSource() == shadowZItem) |
---|
| 2447 | + if (source == shadowZItem) |
---|
2241 | 2448 | { |
---|
2242 | 2449 | CastShadow(2); |
---|
2243 | 2450 | } else |
---|
2244 | | - if (event.getSource() == ungroupItem) |
---|
| 2451 | + if (source == ungroupItem) |
---|
2245 | 2452 | { |
---|
2246 | | - ungroup(); |
---|
| 2453 | + //ungroup(); |
---|
| 2454 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2455 | + { |
---|
| 2456 | + Ungroup(group.selection.get(i)); |
---|
| 2457 | + } |
---|
| 2458 | + |
---|
| 2459 | + ClearSelection(false); |
---|
| 2460 | + |
---|
| 2461 | + refreshContents(); |
---|
2247 | 2462 | } else |
---|
2248 | | - if (event.getSource() == genUVItem) |
---|
| 2463 | + if (source == genUVItem) |
---|
2249 | 2464 | { |
---|
2250 | 2465 | GenUV(); |
---|
2251 | 2466 | } else |
---|
2252 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2467 | + if (source == genNormalsCADItem) |
---|
2253 | 2468 | { |
---|
2254 | 2469 | GenNormals(true); |
---|
2255 | 2470 | } else |
---|
2256 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2471 | + if (source == genNormalsMESHItem) |
---|
| 2472 | + { |
---|
| 2473 | + GenNormals(true); // TODO |
---|
| 2474 | + } else |
---|
| 2475 | + if (source == genNormalsORGANItem) |
---|
2257 | 2476 | { |
---|
2258 | 2477 | GenNormals(false); |
---|
2259 | 2478 | } else |
---|
2260 | | - if (event.getSource() == stripifyItem) |
---|
| 2479 | + if (source == genNormalsMINEItem) |
---|
| 2480 | + { |
---|
| 2481 | + GenNormalsMINE(); |
---|
| 2482 | + } else |
---|
| 2483 | + if (source == stripifyItem) |
---|
2261 | 2484 | { |
---|
2262 | 2485 | Stripify(); |
---|
2263 | 2486 | } else |
---|
2264 | | - if (event.getSource() == unstripifyItem) |
---|
| 2487 | + if (source == unstripifyItem) |
---|
2265 | 2488 | { |
---|
2266 | 2489 | Unstripify(); |
---|
2267 | 2490 | } else |
---|
2268 | | - if (event.getSource() == trimItem) |
---|
| 2491 | + if (source == trimItem) |
---|
2269 | 2492 | { |
---|
2270 | 2493 | Trim(); |
---|
2271 | 2494 | } else |
---|
2272 | | - if (event.getSource() == untrimItem) |
---|
| 2495 | + if (source == untrimItem) |
---|
2273 | 2496 | { |
---|
2274 | 2497 | Untrim(); |
---|
2275 | 2498 | } else |
---|
2276 | | - if (event.getSource() == clearColorsItem) |
---|
| 2499 | + if (source == clearColorsItem) |
---|
2277 | 2500 | { |
---|
2278 | 2501 | ClearColors(); |
---|
2279 | 2502 | } else |
---|
2280 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2503 | + if (source == clearMaterialsItem) |
---|
2281 | 2504 | { |
---|
2282 | 2505 | ClearMaterials(); |
---|
2283 | 2506 | } else |
---|
2284 | | - if (event.getSource() == liveleavesItem) |
---|
| 2507 | + if (source == liveleavesItem) |
---|
2285 | 2508 | { |
---|
2286 | 2509 | LiveLeaves(true); |
---|
2287 | 2510 | } else |
---|
2288 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2511 | + if (source == unliveleavesItem) |
---|
2289 | 2512 | { |
---|
2290 | 2513 | LiveLeaves(false); |
---|
2291 | 2514 | } else |
---|
2292 | | - if (event.getSource() == supportleavesItem) |
---|
| 2515 | + if (source == supportleavesItem) |
---|
2293 | 2516 | { |
---|
2294 | 2517 | SupportLeaves(true); |
---|
2295 | 2518 | } else |
---|
2296 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2519 | + if (source == unsupportleavesItem) |
---|
2297 | 2520 | { |
---|
2298 | 2521 | SupportLeaves(false); |
---|
2299 | 2522 | } else |
---|
2300 | | - if (event.getSource() == hideleavesItem) |
---|
| 2523 | + if (source == hideleavesItem) |
---|
2301 | 2524 | { |
---|
2302 | 2525 | HideLeaves(true); |
---|
2303 | 2526 | } else |
---|
2304 | | - if (event.getSource() == showleavesItem) |
---|
| 2527 | + if (source == showleavesItem) |
---|
2305 | 2528 | { |
---|
2306 | 2529 | HideLeaves(false); |
---|
2307 | 2530 | } else |
---|
2308 | | - if (event.getSource() == markleavesItem) |
---|
| 2531 | + if (source == markleavesItem) |
---|
2309 | 2532 | { |
---|
2310 | 2533 | MarkLeaves(true); |
---|
2311 | 2534 | } else |
---|
2312 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2535 | + if (source == unmarkleavesItem) |
---|
2313 | 2536 | { |
---|
2314 | 2537 | MarkLeaves(false); |
---|
2315 | 2538 | } else |
---|
2316 | | - if (event.getSource() == flipVItem) |
---|
| 2539 | + if (source == flipVItem) |
---|
2317 | 2540 | { |
---|
2318 | 2541 | FlipV(true); |
---|
2319 | 2542 | } else |
---|
2320 | | - if (event.getSource() == unflipVItem) |
---|
| 2543 | + if (source == unflipVItem) |
---|
2321 | 2544 | { |
---|
2322 | 2545 | FlipV(false); |
---|
2323 | 2546 | } else |
---|
2324 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2547 | + if (source == lowTexturesItem) |
---|
2325 | 2548 | { |
---|
2326 | 2549 | SetTexRes(0); |
---|
2327 | 2550 | } else |
---|
2328 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2551 | + if (source == normalTexturesItem) |
---|
2329 | 2552 | { |
---|
2330 | 2553 | SetTexRes(1); |
---|
2331 | 2554 | } else |
---|
2332 | | - if (event.getSource() == highTexturesItem) |
---|
| 2555 | + if (source == highTexturesItem) |
---|
2333 | 2556 | { |
---|
2334 | 2557 | SetTexRes(2); |
---|
2335 | 2558 | } else |
---|
2336 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2559 | + if (source == veryhighTexturesItem) |
---|
2337 | 2560 | { |
---|
2338 | 2561 | SetTexRes(3); |
---|
2339 | 2562 | } else |
---|
2340 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2563 | + if (source == maxTexturesItem) |
---|
2341 | 2564 | { |
---|
2342 | 2565 | SetTexRes(4); |
---|
2343 | 2566 | } else |
---|
2344 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2567 | + if (source == panoTexturesItem) |
---|
2345 | 2568 | { |
---|
2346 | 2569 | SetTexRes(5); |
---|
2347 | 2570 | } else |
---|
2348 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2571 | + if (source == reverseNormalsItem) |
---|
2349 | 2572 | { |
---|
2350 | 2573 | ReverseNormals(); |
---|
2351 | 2574 | } else |
---|
2352 | | - if (event.getSource() == parseverticesItem) |
---|
| 2575 | + if (source == parseverticesItem) |
---|
2353 | 2576 | { |
---|
2354 | 2577 | ParseVertices(); |
---|
2355 | 2578 | } else |
---|
2356 | | - if (event.getSource() == alignItem) |
---|
| 2579 | + if (source == textureFieldItem) |
---|
| 2580 | + { |
---|
| 2581 | + TextureVertices(); |
---|
| 2582 | + } else |
---|
| 2583 | + if (source == alignItem) |
---|
2357 | 2584 | { |
---|
2358 | 2585 | Align(); |
---|
2359 | 2586 | } else |
---|
2360 | | - if (event.getSource() == mirrorItem) |
---|
| 2587 | + if (source == mirrorItem) |
---|
2361 | 2588 | { |
---|
2362 | 2589 | MirrorPoses(); |
---|
2363 | 2590 | } else |
---|
2364 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2591 | + if (source == reduceMorphItem) |
---|
2365 | 2592 | { |
---|
2366 | 2593 | MeshReduction(false); |
---|
2367 | 2594 | } else |
---|
2368 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2595 | + if (source == reduce34MorphItem) |
---|
2369 | 2596 | { |
---|
2370 | 2597 | MeshReduction(true); |
---|
2371 | 2598 | } else |
---|
2372 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2599 | + if (source == reverseTrianglesItem) |
---|
2373 | 2600 | { |
---|
2374 | 2601 | ReverseTriangles(); |
---|
2375 | 2602 | } else |
---|
2376 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2603 | + if (source == reduceMeshItem) |
---|
2377 | 2604 | { |
---|
2378 | 2605 | ReduceMesh(false); |
---|
2379 | 2606 | } else |
---|
2380 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2607 | + if (source == reduce34MeshItem) |
---|
2381 | 2608 | { |
---|
2382 | 2609 | ReduceMesh(true); |
---|
2383 | 2610 | } else |
---|
2384 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2611 | + if (source == increaseMeshItem) |
---|
2385 | 2612 | { |
---|
2386 | 2613 | IncreaseMesh(); |
---|
2387 | 2614 | } else |
---|
2388 | | - if (event.getSource() == clipMeshItem) |
---|
| 2615 | + if (source == clipMeshItem) |
---|
2389 | 2616 | { |
---|
2390 | 2617 | ClipMesh(); |
---|
2391 | 2618 | } else |
---|
2392 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2619 | + if (source == smoothMeshItem) |
---|
2393 | 2620 | { |
---|
2394 | 2621 | SmoothMesh(); |
---|
2395 | 2622 | } else |
---|
2396 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2623 | + if (source == transformGeometryItem) |
---|
2397 | 2624 | { |
---|
2398 | 2625 | TransformGeometry(); |
---|
2399 | 2626 | } else |
---|
2400 | | - if (event.getSource() == resetTransformItem) |
---|
| 2627 | + if (source == transformChildrenItem) |
---|
| 2628 | + { |
---|
| 2629 | + TransformChildren(); |
---|
| 2630 | + } else |
---|
| 2631 | + if (source == resetTransformItem) |
---|
2401 | 2632 | { |
---|
2402 | 2633 | ResetTransform(); |
---|
2403 | 2634 | } else |
---|
2404 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2635 | + if (source == resetCentroidItem) |
---|
2405 | 2636 | { |
---|
2406 | | - ResetCentroid(); |
---|
| 2637 | + ResetCentroid(true); |
---|
2407 | 2638 | } else |
---|
2408 | | - if (event.getSource() == resetParentItem) |
---|
| 2639 | + if (source == resetCentroidXZItem) |
---|
| 2640 | + { |
---|
| 2641 | + ResetCentroid(false); |
---|
| 2642 | + } else |
---|
| 2643 | + if (source == resetParentItem) |
---|
2409 | 2644 | { |
---|
2410 | 2645 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2411 | 2646 | { |
---|
.. | .. |
---|
2415 | 2650 | |
---|
2416 | 2651 | refreshContents(); |
---|
2417 | 2652 | } else |
---|
2418 | | - if (event.getSource() == repairParentItem) |
---|
| 2653 | + if (source == repairParentItem) |
---|
2419 | 2654 | { |
---|
2420 | 2655 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2421 | 2656 | { |
---|
.. | .. |
---|
2429 | 2664 | |
---|
2430 | 2665 | refreshContents(); |
---|
2431 | 2666 | } else |
---|
2432 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2667 | + if (source == repairShadowItem) |
---|
| 2668 | + { |
---|
| 2669 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2670 | + { |
---|
| 2671 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2672 | + obj.RepairShadow(); |
---|
| 2673 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2674 | +// { |
---|
| 2675 | +// obj.get(i).parent = obj; |
---|
| 2676 | +// } |
---|
| 2677 | + } |
---|
| 2678 | + |
---|
| 2679 | + refreshContents(); |
---|
| 2680 | + } else |
---|
| 2681 | + if (source == sortbysizeItem) |
---|
2433 | 2682 | { |
---|
2434 | 2683 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2435 | 2684 | { |
---|
.. | .. |
---|
2441 | 2690 | ResetModel(); |
---|
2442 | 2691 | refreshContents(); |
---|
2443 | 2692 | } else |
---|
2444 | | - if (event.getSource() == sortbynameItem) |
---|
| 2693 | + if (source == sortbynameItem) |
---|
2445 | 2694 | { |
---|
2446 | 2695 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2447 | 2696 | { |
---|
.. | .. |
---|
2453 | 2702 | ResetModel(); |
---|
2454 | 2703 | refreshContents(); |
---|
2455 | 2704 | } else |
---|
2456 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2705 | + if (source == attachPigmentItem) |
---|
2457 | 2706 | { |
---|
2458 | 2707 | String texture = GetFile("Attach pigment"); |
---|
2459 | 2708 | Object3D obj; |
---|
.. | .. |
---|
2465 | 2714 | |
---|
2466 | 2715 | refreshContents(); |
---|
2467 | 2716 | } else |
---|
2468 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2717 | + if (source == detachPigmentItem) |
---|
2469 | 2718 | { |
---|
2470 | 2719 | Object3D obj; |
---|
2471 | 2720 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2476 | 2725 | |
---|
2477 | 2726 | refreshContents(); |
---|
2478 | 2727 | } else |
---|
2479 | | - if (event.getSource() == attachBumpItem) |
---|
| 2728 | + if (source == attachBumpItem) |
---|
2480 | 2729 | { |
---|
2481 | 2730 | String texture = GetFile("Attach bump"); |
---|
2482 | 2731 | Object3D obj; |
---|
.. | .. |
---|
2488 | 2737 | |
---|
2489 | 2738 | refreshContents(); |
---|
2490 | 2739 | } else |
---|
2491 | | - if (event.getSource() == detachBumpItem) |
---|
| 2740 | + if (source == detachBumpItem) |
---|
2492 | 2741 | { |
---|
2493 | 2742 | Object3D obj; |
---|
2494 | 2743 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2499 | 2748 | |
---|
2500 | 2749 | refreshContents(); |
---|
2501 | 2750 | } else |
---|
2502 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2751 | + if (source == pigmentBumpItem) |
---|
2503 | 2752 | { |
---|
2504 | 2753 | Object3D obj; |
---|
2505 | 2754 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2510 | 2759 | |
---|
2511 | 2760 | refreshContents(); |
---|
2512 | 2761 | } else |
---|
2513 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2762 | + if (source == flashSelectionButton) |
---|
2514 | 2763 | { |
---|
2515 | 2764 | CameraPane.flash = true; |
---|
2516 | 2765 | refreshContents(); |
---|
2517 | 2766 | } else |
---|
2518 | | - if (event.getSource() == oneButton) |
---|
| 2767 | + if (source == oneButton) |
---|
2519 | 2768 | { |
---|
2520 | 2769 | } else |
---|
2521 | | - if (event.getSource() == twoButton) |
---|
| 2770 | + if (source == twoButton) |
---|
2522 | 2771 | { |
---|
2523 | 2772 | radio.layout = twoButton; |
---|
2524 | 2773 | // bug |
---|
2525 | 2774 | //gridPanel.setDividerLocation(1.0); |
---|
2526 | 2775 | //bigPanel.setDividerLocation(0.0); |
---|
2527 | | - bigThree.remove(jtp); |
---|
2528 | | - bigThree.remove(cameraPanel); |
---|
2529 | | - bigThree.remove(XYZPanel); |
---|
2530 | | - aWindowConstraints.gridx = 0; |
---|
2531 | | - aWindowConstraints.gridy = 0; |
---|
2532 | | - aWindowConstraints.gridwidth = 1; |
---|
2533 | | - // aConstraints.gridheight = 3; |
---|
2534 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2535 | | - aWindowConstraints.weightx = 0; |
---|
2536 | | - aWindowConstraints.weighty = 1; |
---|
2537 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2538 | | - aWindowConstraints.weightx = 1; |
---|
2539 | | - aWindowConstraints.gridwidth = 3; |
---|
2540 | | - // aConstraints.gridheight = 3; |
---|
2541 | | - aWindowConstraints.gridx = 1; |
---|
2542 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2543 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2544 | | - aWindowConstraints.weightx = 0; |
---|
2545 | | - aWindowConstraints.gridx = 4; |
---|
2546 | | - aWindowConstraints.gridwidth = 1; |
---|
2547 | | - // aConstraints.gridheight = 3; |
---|
2548 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2549 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2550 | | - bigThree.revalidate(); |
---|
| 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 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2798 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2799 | +// scenePanel.setVisible(false); |
---|
| 2800 | +// centralPanel.setVisible(true); |
---|
| 2801 | +// XYZPanel.setVisible(false); |
---|
| 2802 | + bigThree.ClearUI(); |
---|
| 2803 | + bigThree.add(centralPanel); |
---|
| 2804 | + bigThree.FlushUI(); |
---|
2551 | 2805 | } else |
---|
2552 | | - if (event.getSource() == threeButton) |
---|
| 2806 | + if (source == threeButton) |
---|
2553 | 2807 | { |
---|
2554 | 2808 | radio.layout = threeButton; |
---|
2555 | | - bigThree.remove(jtp); |
---|
2556 | | - bigThree.remove(cameraPanel); |
---|
2557 | | - bigThree.remove(XYZPanel); |
---|
2558 | | - aWindowConstraints.gridx = 0; |
---|
2559 | | - aWindowConstraints.gridy = 0; |
---|
2560 | | - aWindowConstraints.gridwidth = 1; |
---|
2561 | | - // aConstraints.gridheight = 3; |
---|
2562 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2563 | | - aWindowConstraints.weightx = 0; |
---|
2564 | | - aWindowConstraints.weighty = 1; |
---|
2565 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2566 | | - aWindowConstraints.weightx = 1; |
---|
2567 | | - aWindowConstraints.gridwidth = 3; |
---|
2568 | | - // aConstraints.gridheight = 3; |
---|
2569 | | - aWindowConstraints.gridx = 1; |
---|
2570 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2571 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2572 | | - aWindowConstraints.weightx = 0; |
---|
2573 | | - aWindowConstraints.gridx = 4; |
---|
2574 | | - aWindowConstraints.gridwidth = 1; |
---|
2575 | | - // aConstraints.gridheight = 3; |
---|
2576 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2577 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2578 | | - bigThree.revalidate(); |
---|
| 2809 | + |
---|
| 2810 | +// bigThree.remove(scenePanel); |
---|
| 2811 | +// bigThree.remove(centralPanel); |
---|
| 2812 | +// bigThree.remove(XYZPanel); |
---|
| 2813 | +// aWindowConstraints.gridx = 0; |
---|
| 2814 | +// aWindowConstraints.gridy = 0; |
---|
| 2815 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2816 | +// // aConstraints.gridheight = 3; |
---|
| 2817 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2818 | +// aWindowConstraints.weightx = 0; |
---|
| 2819 | +// aWindowConstraints.weighty = 1; |
---|
| 2820 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2821 | +// aWindowConstraints.weightx = 1; |
---|
| 2822 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2823 | +// // aConstraints.gridheight = 3; |
---|
| 2824 | +// aWindowConstraints.gridx = 1; |
---|
| 2825 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2826 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2827 | +// aWindowConstraints.weightx = 0; |
---|
| 2828 | +// aWindowConstraints.gridx = 4; |
---|
| 2829 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2830 | +// // aConstraints.gridheight = 3; |
---|
| 2831 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2832 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2833 | +// bigThree.validate(); |
---|
| 2834 | +// scenePanel.setVisible(false); |
---|
| 2835 | +// centralPanel.setVisible(true); |
---|
| 2836 | +// XYZPanel.setVisible(true); |
---|
| 2837 | + bigThree.ClearUI(); |
---|
| 2838 | + bigThree.add(centralPanel); |
---|
| 2839 | + bigThree.add(XYZPanel); |
---|
| 2840 | + bigThree.FlushUI(); |
---|
2579 | 2841 | } else |
---|
2580 | | - if (event.getSource() == fourButton) |
---|
| 2842 | + if (source == fourButton) |
---|
2581 | 2843 | { |
---|
2582 | 2844 | radio.layout = fourButton; |
---|
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 | | - // aWindowConstraints.gridheight = 3; |
---|
2590 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2591 | | - aWindowConstraints.weightx = 1; |
---|
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 | | - // aWindowConstraints.gridheight = 3; |
---|
2604 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2605 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2606 | | - bigThree.revalidate(); |
---|
| 2845 | + |
---|
| 2846 | +// bigThree.remove(scenePanel); |
---|
| 2847 | +// bigThree.remove(centralPanel); |
---|
| 2848 | +// bigThree.remove(XYZPanel); |
---|
| 2849 | +// aWindowConstraints.gridx = 0; |
---|
| 2850 | +// aWindowConstraints.gridy = 0; |
---|
| 2851 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2852 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2853 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2854 | +// aWindowConstraints.weightx = 1; |
---|
| 2855 | +// aWindowConstraints.weighty = 1; |
---|
| 2856 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2857 | +// aWindowConstraints.weightx = 1; |
---|
| 2858 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2859 | +// // aConstraints.gridheight = 3; |
---|
| 2860 | +// aWindowConstraints.gridx = 1; |
---|
| 2861 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2862 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2863 | +// aWindowConstraints.weightx = 0; |
---|
| 2864 | +// aWindowConstraints.gridx = 4; |
---|
| 2865 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2866 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2867 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2868 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2869 | +// bigThree.validate(); |
---|
| 2870 | +// scenePanel.setVisible(true); |
---|
| 2871 | +// centralPanel.setVisible(false); |
---|
| 2872 | +// XYZPanel.setVisible(false); |
---|
| 2873 | + bigThree.ClearUI(); |
---|
| 2874 | + bigThree.add(scenePanel); |
---|
| 2875 | + bigThree.FlushUI(); |
---|
2607 | 2876 | } else |
---|
2608 | | - if (event.getSource() == sixButton) |
---|
| 2877 | + if (source == sixButton) |
---|
2609 | 2878 | { |
---|
2610 | 2879 | radio.layout = sixButton; |
---|
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 | | - // aWindowConstraints.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 | | - // aWindowConstraints.gridheight = 3; |
---|
2632 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2633 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2634 | | - bigThree.revalidate(); |
---|
| 2880 | + |
---|
| 2881 | +// bigThree.remove(scenePanel); |
---|
| 2882 | +// bigThree.remove(centralPanel); |
---|
| 2883 | +// bigThree.remove(XYZPanel); |
---|
| 2884 | +// aWindowConstraints.gridx = 0; |
---|
| 2885 | +// aWindowConstraints.gridy = 0; |
---|
| 2886 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2887 | +// // aConstraints.gridheight = 3; |
---|
| 2888 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2889 | +// aWindowConstraints.weightx = 0; |
---|
| 2890 | +// aWindowConstraints.weighty = 1; |
---|
| 2891 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2892 | +// aWindowConstraints.weightx = 1; |
---|
| 2893 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2894 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2895 | +// aWindowConstraints.gridx = 1; |
---|
| 2896 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2897 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2898 | +// aWindowConstraints.weightx = 0; |
---|
| 2899 | +// aWindowConstraints.gridx = 4; |
---|
| 2900 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2901 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2902 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2903 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2904 | +// bigThree.validate(); |
---|
| 2905 | +// scenePanel.setVisible(true); |
---|
| 2906 | +// centralPanel.setVisible(true); |
---|
| 2907 | +// XYZPanel.setVisible(false); |
---|
| 2908 | + bigThree.ClearUI(); |
---|
| 2909 | + bigThree.add(scenePanel); |
---|
| 2910 | + bigThree.add(centralPanel); |
---|
| 2911 | + bigThree.FlushUI(); |
---|
2635 | 2912 | } else |
---|
2636 | | - if (event.getSource() == sevenButton) |
---|
| 2913 | + if (source == sevenButton) |
---|
2637 | 2914 | { |
---|
2638 | 2915 | radio.layout = sevenButton; |
---|
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.VERTICAL; |
---|
2647 | | - aWindowConstraints.weightx = 0; |
---|
2648 | | - aWindowConstraints.weighty = 1; |
---|
2649 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2650 | | - aWindowConstraints.weightx = 1; |
---|
2651 | | - aWindowConstraints.gridwidth = 3; |
---|
2652 | | - // aWindowConstraints.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 | | - // aConstraints.gridheight = 3; |
---|
2660 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2661 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2662 | | - bigThree.revalidate(); |
---|
| 2916 | + |
---|
| 2917 | +// bigThree.remove(scenePanel); |
---|
| 2918 | +// bigThree.remove(centralPanel); |
---|
| 2919 | +// bigThree.remove(XYZPanel); |
---|
| 2920 | +// aWindowConstraints.gridx = 0; |
---|
| 2921 | +// aWindowConstraints.gridy = 0; |
---|
| 2922 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2923 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2924 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2925 | +// aWindowConstraints.weightx = 0; |
---|
| 2926 | +// aWindowConstraints.weighty = 1; |
---|
| 2927 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2928 | +// aWindowConstraints.weightx = 1; |
---|
| 2929 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2930 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2931 | +// aWindowConstraints.gridx = 1; |
---|
| 2932 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2933 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2934 | +// aWindowConstraints.weightx = 0; |
---|
| 2935 | +// aWindowConstraints.gridx = 4; |
---|
| 2936 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2937 | +// // aConstraints.gridheight = 3; |
---|
| 2938 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2939 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2940 | +// bigThree.validate(); |
---|
| 2941 | +// scenePanel.setVisible(true); |
---|
| 2942 | +// centralPanel.setVisible(true); |
---|
| 2943 | +// XYZPanel.setVisible(true); |
---|
| 2944 | + bigThree.ClearUI(); |
---|
| 2945 | + bigThree.add(scenePanel); |
---|
| 2946 | + bigThree.add(centralPanel); |
---|
| 2947 | + bigThree.add(XYZPanel); |
---|
| 2948 | + bigThree.FlushUI(); |
---|
2663 | 2949 | } else |
---|
2664 | | - if (event.getSource() == rootButton) |
---|
| 2950 | + if (source == rootButton) |
---|
2665 | 2951 | { |
---|
2666 | 2952 | Object3D obj; |
---|
2667 | 2953 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2673 | 2959 | |
---|
2674 | 2960 | refreshContents(true); |
---|
2675 | 2961 | } else |
---|
2676 | | - if (event.getSource() == closeButton) |
---|
| 2962 | + if (source == closeButton) |
---|
2677 | 2963 | { |
---|
2678 | 2964 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2679 | 2965 | cRadio ab; |
---|
.. | .. |
---|
2694 | 2980 | } |
---|
2695 | 2981 | refreshContents(true); |
---|
2696 | 2982 | } else |
---|
2697 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2983 | + if (source == editItem || source == editButton) |
---|
2698 | 2984 | { |
---|
2699 | 2985 | EditSelection(false); |
---|
2700 | 2986 | } else |
---|
2701 | | - if (event.getSource() == uneditButton) |
---|
| 2987 | + if (source == uneditButton) |
---|
2702 | 2988 | { |
---|
2703 | 2989 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2704 | 2990 | { |
---|
.. | .. |
---|
2710 | 2996 | |
---|
2711 | 2997 | child.editWindow = null; // ??????????? |
---|
2712 | 2998 | } |
---|
2713 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2999 | + objEditor.ctrlPanel.FlushUI(); |
---|
2714 | 3000 | //objEditor.jTree.clearSelection(); |
---|
2715 | 3001 | //objEditor.ResetSliders(); |
---|
2716 | 3002 | refreshContents(true); |
---|
2717 | 3003 | } else |
---|
2718 | | - if (event.getSource() == clearPanelButton) |
---|
| 3004 | + if (source == clearPanelButton) |
---|
2719 | 3005 | { |
---|
2720 | 3006 | assert(copy == group); |
---|
2721 | 3007 | //copy.ClearUI(); |
---|
.. | .. |
---|
2726 | 3012 | listUI.clear(); |
---|
2727 | 3013 | refreshContents(true); |
---|
2728 | 3014 | } else |
---|
2729 | | - if (event.getSource() == allParamsButton) |
---|
| 3015 | + if (source == allParamsButton) |
---|
2730 | 3016 | { |
---|
2731 | 3017 | assert(copy == group); |
---|
2732 | 3018 | |
---|
.. | .. |
---|
2747 | 3033 | |
---|
2748 | 3034 | refreshContents(true); |
---|
2749 | 3035 | } else |
---|
2750 | | - if (event.getSource() == unselectButton) |
---|
| 3036 | + if (source == unselectButton) |
---|
2751 | 3037 | { |
---|
2752 | 3038 | objEditor.jTree.clearSelection(); |
---|
2753 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 3039 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2754 | 3040 | objEditor.ResetSliders(); |
---|
2755 | 3041 | refreshContents(true); |
---|
2756 | 3042 | } else |
---|
2757 | | - if(event.getSource() instanceof cRadio) |
---|
| 3043 | + if(source instanceof cRadio) |
---|
2758 | 3044 | { |
---|
2759 | 3045 | group.parent = keepparent; |
---|
2760 | 3046 | group.attributes = 0; |
---|
2761 | 3047 | //group.editWindow = null; |
---|
2762 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 3048 | + /*cRadio*/ radio = (cRadio)source; |
---|
2763 | 3049 | Object3D obj = radio.GetObject(); |
---|
2764 | 3050 | System.out.println("Edit " + obj); |
---|
2765 | 3051 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2779 | 3065 | } |
---|
2780 | 3066 | |
---|
2781 | 3067 | copy = group; |
---|
2782 | | - //CameraPane.theRenderer.object = group; |
---|
| 3068 | + //Globals.theRenderer.object = group; |
---|
2783 | 3069 | if(!useclient) |
---|
2784 | 3070 | { |
---|
2785 | 3071 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2788 | 3074 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2789 | 3075 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2790 | 3076 | cameraView.object = group; |
---|
2791 | | - cameraView.lighttouched = true; |
---|
| 3077 | + //cameraView.lighttouched = true; |
---|
| 3078 | + Globals.lighttouched = true; |
---|
2792 | 3079 | topView.object = group; |
---|
2793 | 3080 | frontView.object = group; |
---|
2794 | 3081 | sideView.object = group; |
---|
2795 | 3082 | } |
---|
2796 | | - group.editWindow = this; |
---|
| 3083 | + |
---|
| 3084 | +// fix "+" issue group.editWindow = this; |
---|
| 3085 | + |
---|
2797 | 3086 | /* |
---|
2798 | 3087 | currentLayout = radio.layout; |
---|
2799 | 3088 | if (currentLayout == null) |
---|
.. | .. |
---|
2824 | 3113 | if (useclient) |
---|
2825 | 3114 | { |
---|
2826 | 3115 | cameraView.object = client; |
---|
2827 | | - cameraView.lighttouched = true; |
---|
| 3116 | + Globals.lighttouched = true; |
---|
2828 | 3117 | //topView.object = client; |
---|
2829 | 3118 | //frontView.object = client; |
---|
2830 | 3119 | //sideView.object = client; |
---|
.. | .. |
---|
2832 | 3121 | else |
---|
2833 | 3122 | { |
---|
2834 | 3123 | cameraView.object = group; |
---|
2835 | | - cameraView.lighttouched = true; |
---|
| 3124 | + Globals.lighttouched = true; |
---|
2836 | 3125 | //topView.object = group; |
---|
2837 | 3126 | //frontView.object = group; |
---|
2838 | 3127 | //sideView.object = group; |
---|
.. | .. |
---|
2867 | 3156 | refreshContents(); |
---|
2868 | 3157 | } |
---|
2869 | 3158 | |
---|
| 3159 | + void TransformChildren() |
---|
| 3160 | + { |
---|
| 3161 | + Object3D obj; |
---|
| 3162 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3163 | + { |
---|
| 3164 | + obj = (Object3D)e.nextElement(); |
---|
| 3165 | + obj.KeepTextureMatrices(); |
---|
| 3166 | + obj.TransformChildren(); |
---|
| 3167 | + obj.RestoreTextureMatrices(); |
---|
| 3168 | + |
---|
| 3169 | +// if (obj.parent == null) |
---|
| 3170 | +// { |
---|
| 3171 | +// System.out.println("NULL PARENT!"); |
---|
| 3172 | +// new Exception().printStackTrace(); |
---|
| 3173 | +// } |
---|
| 3174 | +// else |
---|
| 3175 | +// TouchTransform(obj); |
---|
| 3176 | +// //obj.parent.Touch(); |
---|
| 3177 | + } |
---|
| 3178 | + |
---|
| 3179 | + refreshContents(); |
---|
| 3180 | + } |
---|
2870 | 3181 | |
---|
2871 | 3182 | void ResetTransform() |
---|
2872 | 3183 | { |
---|
.. | .. |
---|
2979 | 3290 | refreshContents(); |
---|
2980 | 3291 | } |
---|
2981 | 3292 | |
---|
2982 | | - void ResetCentroid() |
---|
| 3293 | + void ResetCentroid(boolean full) |
---|
2983 | 3294 | { |
---|
2984 | 3295 | Object3D obj; |
---|
2985 | 3296 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2994 | 3305 | LA.matIdentity(Object3D.mat); |
---|
2995 | 3306 | obj.getBounds(minima, maxima, false); |
---|
2996 | 3307 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
2997 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3308 | + if (full) |
---|
| 3309 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
2998 | 3310 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
2999 | 3311 | obj.TransformMesh(Object3D.mat); |
---|
| 3312 | + |
---|
3000 | 3313 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3001 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3314 | + if (full) |
---|
| 3315 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3002 | 3316 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3317 | + |
---|
3003 | 3318 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3004 | 3319 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3005 | 3320 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3065 | 3380 | obj = (Object3D)e.nextElement(); |
---|
3066 | 3381 | |
---|
3067 | 3382 | System.out.println("Object is: " + obj); |
---|
3068 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3383 | + Grafreed.AnalyzeObject(obj); |
---|
3069 | 3384 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3070 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3385 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3071 | 3386 | |
---|
3072 | 3387 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3073 | 3388 | } |
---|
.. | .. |
---|
3109 | 3424 | void GenNormals(boolean crease) |
---|
3110 | 3425 | { |
---|
3111 | 3426 | group.GenNormalsS(crease); |
---|
| 3427 | + |
---|
| 3428 | + refreshContents(); |
---|
| 3429 | + } |
---|
| 3430 | + |
---|
| 3431 | + void GenNormalsMINE() |
---|
| 3432 | + { |
---|
| 3433 | + group.selection.GenNormalsMINE(); |
---|
3112 | 3434 | |
---|
3113 | 3435 | refreshContents(); |
---|
3114 | 3436 | } |
---|
.. | .. |
---|
3157 | 3479 | |
---|
3158 | 3480 | //Object3D buffer; |
---|
3159 | 3481 | cVector temp = new cVector(); |
---|
3160 | | - BoundaryRep temprep; |
---|
3161 | | - Object3D nodes; |
---|
3162 | | - Vector<Vertex> vertices; |
---|
3163 | | - |
---|
3164 | | - public void Vertex(Object3D node, Vertex v) |
---|
3165 | | - { |
---|
3166 | | - vertices.add(v); |
---|
3167 | | - nodes.addElement(node); |
---|
3168 | | - |
---|
3169 | | - if (temprep.GetCache(v) != null) |
---|
3170 | | - { |
---|
3171 | | - temprep.Remove(v); |
---|
3172 | | - } |
---|
3173 | | - else |
---|
3174 | | - { |
---|
3175 | | - temprep.Remember(v); |
---|
3176 | | - } |
---|
3177 | | - } |
---|
3178 | | - |
---|
3179 | | - public void Face(Object3D node, Face f) |
---|
3180 | | - { |
---|
3181 | | - |
---|
3182 | | - } |
---|
3183 | | - |
---|
| 3482 | +// BoundaryRep temprep; |
---|
| 3483 | +// Object3D nodes; |
---|
| 3484 | +// Vector<Vertex> vertices; |
---|
| 3485 | +// |
---|
| 3486 | +// cGroup buffer; |
---|
| 3487 | +// |
---|
| 3488 | +// public void Vertex(Object3D node, Vertex v) |
---|
| 3489 | +// { |
---|
| 3490 | +//// vertices.add(v); |
---|
| 3491 | +//// nodes.addElement(node); |
---|
| 3492 | +//// |
---|
| 3493 | +//// if (temprep.GetCache(v) != null) |
---|
| 3494 | +//// { |
---|
| 3495 | +//// temprep.Remove(v); |
---|
| 3496 | +//// } else |
---|
| 3497 | +//// { |
---|
| 3498 | +//// temprep.Remember(v); |
---|
| 3499 | +//// } |
---|
| 3500 | +// |
---|
| 3501 | +// //Object3D node = nodes.get(index); |
---|
| 3502 | +// temp.set(v); // vertices.get(index)); // temprep.GetVertex(k)); |
---|
| 3503 | +// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3504 | +// |
---|
| 3505 | +// LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
| 3506 | +// |
---|
| 3507 | +// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3508 | +// |
---|
| 3509 | +// cGroup g = new cGroup(); |
---|
| 3510 | +// |
---|
| 3511 | +// if (g.toParent == null) |
---|
| 3512 | +// { |
---|
| 3513 | +// g.toParent = LA.newMatrix(); |
---|
| 3514 | +// g.fromParent = LA.newMatrix(); |
---|
| 3515 | +// } |
---|
| 3516 | +// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3517 | +// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3518 | +// |
---|
| 3519 | +// g.add(GrafreeD.clipboard); |
---|
| 3520 | +// |
---|
| 3521 | +// buffer.add(g); |
---|
| 3522 | +// } |
---|
| 3523 | +// |
---|
| 3524 | +// public void Face(Object3D node, Face f) |
---|
| 3525 | +// { |
---|
| 3526 | +// |
---|
| 3527 | +// } |
---|
| 3528 | +// |
---|
| 3529 | +// void ParseVerticesOld() // ?? |
---|
| 3530 | +// { |
---|
| 3531 | +// //if (group.selection.size() != 1) |
---|
| 3532 | +// // return; |
---|
| 3533 | +// |
---|
| 3534 | +// temprep = new BoundaryRep(); |
---|
| 3535 | +// nodes = new Object3D(); |
---|
| 3536 | +// vertices = new Vector<Vertex>(); |
---|
| 3537 | +// |
---|
| 3538 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3539 | +// GrafreeD.epsequal = true; |
---|
| 3540 | +// |
---|
| 3541 | +// for (int i=0; i<group.selection.size(); i++) |
---|
| 3542 | +// { |
---|
| 3543 | +// Object3D buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
| 3544 | +// |
---|
| 3545 | +// group.selection.get(i).Parse( |
---|
| 3546 | +//this ); |
---|
| 3547 | +// |
---|
| 3548 | +// int repsize = temprep.VertexCount(); |
---|
| 3549 | +// int tablesize = temprep.vertextable.size(); |
---|
| 3550 | +// int nodesize = nodes.size(); |
---|
| 3551 | +// |
---|
| 3552 | +// assert(vertices.size() == nodes.size()); |
---|
| 3553 | +// |
---|
| 3554 | +// temprep.vertextable.elements(); |
---|
| 3555 | +// |
---|
| 3556 | +// java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet(); |
---|
| 3557 | +// |
---|
| 3558 | +// for (java.util.Map.Entry<Vertex,Vertex> entry : set) |
---|
| 3559 | +// { |
---|
| 3560 | +// cGroup g = new cGroup(); |
---|
| 3561 | +// |
---|
| 3562 | +// int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k)); |
---|
| 3563 | +// |
---|
| 3564 | +// Object3D node = nodes.get(index); |
---|
| 3565 | +// temp.set(vertices.get(index)); // temprep.GetVertex(k)); |
---|
| 3566 | +// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3567 | +// |
---|
| 3568 | +// LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
| 3569 | +// |
---|
| 3570 | +// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3571 | +// |
---|
| 3572 | +// if (g.toParent == null) |
---|
| 3573 | +// { |
---|
| 3574 | +// g.toParent = LA.newMatrix(); |
---|
| 3575 | +// g.fromParent = LA.newMatrix(); |
---|
| 3576 | +// } |
---|
| 3577 | +// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3578 | +// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3579 | +// |
---|
| 3580 | +// g.add(GrafreeD.clipboard); |
---|
| 3581 | +// |
---|
| 3582 | +// buffer.add(g); |
---|
| 3583 | +// } |
---|
| 3584 | +// |
---|
| 3585 | +// makeSomething(buffer, i==group.selection.size()-1); |
---|
| 3586 | +// } |
---|
| 3587 | +// |
---|
| 3588 | +// GrafreeD.epsequal = epsequal; |
---|
| 3589 | +// |
---|
| 3590 | +// //buffer = null; |
---|
| 3591 | +// temprep = null; |
---|
| 3592 | +// nodes = null; |
---|
| 3593 | +// |
---|
| 3594 | +// refreshContents(); |
---|
| 3595 | +// } |
---|
| 3596 | + |
---|
3184 | 3597 | void ParseVertices() |
---|
3185 | 3598 | { |
---|
3186 | | - //if (group.selection.size() != 1) |
---|
3187 | | - // return; |
---|
3188 | | - |
---|
3189 | | - temprep = new BoundaryRep(); |
---|
3190 | | - nodes = new Object3D(); |
---|
3191 | | - vertices = new Vector<Vertex>(); |
---|
3192 | | - |
---|
3193 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3194 | | - GraphreeD.epsequal = true; |
---|
| 3599 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3600 | + Grafreed.epsequal = true; |
---|
3195 | 3601 | |
---|
3196 | 3602 | for (int i=0; i<group.selection.size(); i++) |
---|
3197 | 3603 | { |
---|
3198 | | - Object3D buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
| 3604 | + final cGroup buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
3199 | 3605 | |
---|
3200 | | - group.selection.get(i).Parse(this); |
---|
3201 | | - |
---|
3202 | | - int repsize = temprep.VertexCount(); |
---|
3203 | | - int tablesize = temprep.vertextable.size(); |
---|
3204 | | - int nodesize = nodes.size(); |
---|
| 3606 | + group.selection.get(i).Parse( |
---|
| 3607 | + |
---|
| 3608 | + new iParse() |
---|
| 3609 | + { |
---|
| 3610 | + public void Vertex(Object3D node, Vertex v) |
---|
| 3611 | + { |
---|
| 3612 | + temp.set(v); |
---|
| 3613 | + LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
3205 | 3614 | |
---|
3206 | | - assert(vertices.size() == nodes.size()); |
---|
3207 | | - |
---|
3208 | | - temprep.vertextable.elements(); |
---|
3209 | | - |
---|
3210 | | - java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet(); |
---|
| 3615 | + cGroup g = new cGroup(); |
---|
3211 | 3616 | |
---|
3212 | | - for (java.util.Map.Entry<Vertex,Vertex> entry : set) |
---|
3213 | | - { |
---|
3214 | | - cGroup g = new cGroup(); |
---|
| 3617 | + if (g.toParent == null) |
---|
| 3618 | + { |
---|
| 3619 | + g.toParent = LA.newMatrix(); |
---|
| 3620 | + g.fromParent = LA.newMatrix(); |
---|
| 3621 | + } |
---|
| 3622 | + LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3623 | + LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3215 | 3624 | |
---|
3216 | | - int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k)); |
---|
3217 | | - Object3D node = nodes.get(index); |
---|
3218 | | - temp.set(vertices.get(index)); // temprep.GetVertex(k)); |
---|
3219 | | - // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3625 | + g.add(Grafreed.clipboard); |
---|
3220 | 3626 | |
---|
3221 | | - LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
3222 | | - |
---|
3223 | | - // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
3224 | | - |
---|
3225 | | - if (g.toParent == null) |
---|
3226 | | - { |
---|
3227 | | - g.toParent = LA.newMatrix(); |
---|
3228 | | - g.fromParent = LA.newMatrix(); |
---|
3229 | | - } |
---|
3230 | | - LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3231 | | - LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3627 | + buffer.add(g); |
---|
| 3628 | + } |
---|
3232 | 3629 | |
---|
3233 | | - g.add(GraphreeD.clipboard); |
---|
| 3630 | + public void Face(Object3D node, Face f) |
---|
| 3631 | + { |
---|
3234 | 3632 | |
---|
3235 | | - buffer.add(g); |
---|
3236 | | - } |
---|
| 3633 | + } |
---|
| 3634 | + } |
---|
| 3635 | + ); |
---|
3237 | 3636 | |
---|
3238 | 3637 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3239 | 3638 | } |
---|
3240 | 3639 | |
---|
3241 | | - GraphreeD.epsequal = epsequal; |
---|
3242 | | - |
---|
3243 | | - //buffer = null; |
---|
3244 | | - temprep = null; |
---|
3245 | | - nodes = null; |
---|
| 3640 | + Grafreed.epsequal = epsequal; |
---|
3246 | 3641 | |
---|
3247 | 3642 | refreshContents(); |
---|
3248 | 3643 | } |
---|
3249 | | - |
---|
| 3644 | + |
---|
| 3645 | + void TextureVertices() |
---|
| 3646 | + { |
---|
| 3647 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 3648 | + { |
---|
| 3649 | + group.selection.get(i).Parse( |
---|
| 3650 | + new iParse() |
---|
| 3651 | + { |
---|
| 3652 | + public void Vertex(Object3D node, Vertex v) |
---|
| 3653 | + { |
---|
| 3654 | + cTexture tex = node.GetTextures(); |
---|
| 3655 | + String pigment = Object3D.GetPigment(tex); |
---|
| 3656 | + //String bump = Object3D.GetBump(tex); |
---|
| 3657 | + |
---|
| 3658 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3659 | + |
---|
| 3660 | + try |
---|
| 3661 | + { |
---|
| 3662 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3663 | + } |
---|
| 3664 | + catch (Exception e) |
---|
| 3665 | + { |
---|
| 3666 | + System.err.println("FAIL: " + node); |
---|
| 3667 | + } |
---|
| 3668 | + |
---|
| 3669 | + double s = v.s; |
---|
| 3670 | + |
---|
| 3671 | + if (s == 1) |
---|
| 3672 | + s = 0; |
---|
| 3673 | + |
---|
| 3674 | + double t = v.t; |
---|
| 3675 | + |
---|
| 3676 | + if (t == 1) |
---|
| 3677 | + t = 0; |
---|
| 3678 | + |
---|
| 3679 | + int indexs = (int) (texturedata.getWidth() * s); |
---|
| 3680 | + int indext = (int) (texturedata.getHeight() * t); |
---|
| 3681 | + |
---|
| 3682 | + int index = indext * texturedata.getWidth() + indexs; |
---|
| 3683 | + |
---|
| 3684 | + java.nio.ByteBuffer bytebuf = (java.nio.ByteBuffer)texturedata.getBuffer(); |
---|
| 3685 | + |
---|
| 3686 | + int slide = bytebuf.capacity() / texturedata.getWidth() / texturedata.getHeight(); |
---|
| 3687 | + |
---|
| 3688 | + float scale = bytebuf.get(index*slide) & 0xFF; |
---|
| 3689 | + scale += bytebuf.get(index*slide+1) & 0xFF; |
---|
| 3690 | + scale += bytebuf.get(index*slide+2) & 0xFF; |
---|
| 3691 | + scale /= 3; |
---|
| 3692 | + |
---|
| 3693 | + scale /= 0xFF; |
---|
| 3694 | + // c'est quoi ca? scale /= 4; |
---|
| 3695 | + |
---|
| 3696 | + //v.AO = scale; |
---|
| 3697 | + |
---|
| 3698 | + v.x += v.norm.x * scale; |
---|
| 3699 | + v.y += v.norm.y * scale; |
---|
| 3700 | + v.z += v.norm.z * scale; |
---|
| 3701 | + } |
---|
| 3702 | + |
---|
| 3703 | + public void Face(Object3D node, Face f) |
---|
| 3704 | + { |
---|
| 3705 | + } |
---|
| 3706 | + } |
---|
| 3707 | + ); |
---|
| 3708 | + } |
---|
| 3709 | + |
---|
| 3710 | + refreshContents(); |
---|
| 3711 | + } |
---|
| 3712 | + |
---|
3250 | 3713 | void Align() |
---|
3251 | 3714 | { |
---|
| 3715 | + if (group.selection.size() == 0) |
---|
| 3716 | + return; |
---|
| 3717 | + |
---|
| 3718 | + cVector bbmin = new cVector(); |
---|
| 3719 | + cVector bbmax = new cVector(); |
---|
| 3720 | + |
---|
| 3721 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3722 | + |
---|
| 3723 | + double dx = bbmax.x - bbmin.x; |
---|
| 3724 | + double dy = bbmax.y - bbmin.y; |
---|
| 3725 | + double dz = bbmax.z - bbmin.z; |
---|
| 3726 | + |
---|
| 3727 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3728 | + |
---|
3252 | 3729 | for (int i=0; i<group.selection.size(); i++) |
---|
3253 | 3730 | { |
---|
3254 | 3731 | Object3D obj = group.selection.get(i); |
---|
3255 | 3732 | |
---|
3256 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3257 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3733 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3734 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3258 | 3735 | } |
---|
3259 | 3736 | |
---|
3260 | 3737 | refreshContents(); |
---|
.. | .. |
---|
3267 | 3744 | // ref.SaveSupports(); |
---|
3268 | 3745 | // Object3D par = ref.parent; |
---|
3269 | 3746 | // ref.parent = null; |
---|
3270 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3747 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3271 | 3748 | // ref.parent = par; |
---|
3272 | 3749 | // ref.RestoreSupports(); |
---|
3273 | 3750 | |
---|
.. | .. |
---|
3275 | 3752 | |
---|
3276 | 3753 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3277 | 3754 | |
---|
3278 | | - boolean random = CameraPane.RANDOM; |
---|
3279 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3755 | + boolean random = CameraPane.SWITCH; |
---|
| 3756 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3280 | 3757 | lowres.linkVerticesThis(null); |
---|
3281 | 3758 | lowres.linkVerticesThis(sn); |
---|
3282 | | - CameraPane.RANDOM = random; |
---|
| 3759 | + CameraPane.SWITCH = random; |
---|
3283 | 3760 | |
---|
3284 | 3761 | System.err.flush(); |
---|
3285 | 3762 | |
---|
.. | .. |
---|
3297 | 3774 | // lowres.SaveSupports(); |
---|
3298 | 3775 | // par = lowres.parent; |
---|
3299 | 3776 | // lowres.parent = null; |
---|
3300 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3777 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3301 | 3778 | Object3D newlow = CloneObject(lowres, false); |
---|
3302 | 3779 | newlow.name = sn.switchobject.get(i).name; |
---|
3303 | 3780 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3319 | 3796 | return; |
---|
3320 | 3797 | |
---|
3321 | 3798 | Object3D poses = group.selection.get(0); |
---|
3322 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3799 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3323 | 3800 | |
---|
3324 | 3801 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3325 | 3802 | |
---|
.. | .. |
---|
3488 | 3965 | group.selection.RelinkToSupport(); // july 2014 |
---|
3489 | 3966 | System.out.println("DONE."); |
---|
3490 | 3967 | refreshContents(); |
---|
3491 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3968 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3492 | 3969 | } |
---|
3493 | 3970 | |
---|
3494 | 3971 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3513 | 3990 | |
---|
3514 | 3991 | void ClipMesh() |
---|
3515 | 3992 | { |
---|
3516 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3993 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3517 | 3994 | { |
---|
3518 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3995 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3519 | 3996 | |
---|
3520 | 3997 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3521 | 3998 | content = ((cGroup)content).get(0); |
---|
3522 | 3999 | |
---|
3523 | 4000 | // for (int i=0; i<group.selection.size(); i++) |
---|
3524 | 4001 | // { |
---|
3525 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 4002 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3526 | 4003 | // } |
---|
3527 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 4004 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3528 | 4005 | } |
---|
3529 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 4006 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3530 | 4007 | System.out.println("DONE."); |
---|
3531 | 4008 | refreshContents(); |
---|
3532 | 4009 | } |
---|
.. | .. |
---|
3659 | 4136 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3660 | 4137 | |
---|
3661 | 4138 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
3662 | | - if(elem != group) |
---|
| 4139 | + if(elem != group || !newWindow) |
---|
3663 | 4140 | { |
---|
3664 | 4141 | // if (!(elem instanceof Composite)) |
---|
3665 | 4142 | // newWindow = false; |
---|
.. | .. |
---|
3764 | 4241 | System.err.println("info : " + child.GetPath()); |
---|
3765 | 4242 | } |
---|
3766 | 4243 | } |
---|
3767 | | - else |
---|
3768 | | - { |
---|
3769 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3770 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3771 | | - System.err.println("info : " + group.GetPath()); |
---|
3772 | | - } |
---|
| 4244 | +// else |
---|
| 4245 | +// { |
---|
| 4246 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4247 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4248 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4249 | +// } |
---|
3773 | 4250 | |
---|
3774 | 4251 | objEditor.SetText(); // jan 2014 |
---|
3775 | 4252 | |
---|
3776 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4253 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3777 | 4254 | CameraPane.flash = true; |
---|
3778 | 4255 | |
---|
3779 | 4256 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3780 | 4257 | // a camera |
---|
3781 | 4258 | { |
---|
3782 | 4259 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
3783 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
3784 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
3785 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4260 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4261 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4262 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3786 | 4263 | } |
---|
3787 | 4264 | |
---|
3788 | 4265 | refreshContents(); |
---|
.. | .. |
---|
3864 | 4341 | { |
---|
3865 | 4342 | if (group.selection.isEmpty()) |
---|
3866 | 4343 | return; |
---|
3867 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4344 | + Grafreed.clipboardIsTempGroup = false; |
---|
3868 | 4345 | Composite tGroup = null; |
---|
3869 | 4346 | if (group.selection.size() > 0) // 1) |
---|
3870 | 4347 | { |
---|
3871 | 4348 | tGroup = new cGroup(); |
---|
3872 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4349 | + Grafreed.clipboardIsTempGroup = true; |
---|
3873 | 4350 | } |
---|
3874 | 4351 | |
---|
3875 | 4352 | if (cut) |
---|
.. | .. |
---|
3909 | 4386 | //System.out.println("cut " + child); |
---|
3910 | 4387 | //System.out.println("parent = " + child.parent); |
---|
3911 | 4388 | // tmp.addChild(child); |
---|
3912 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4389 | + if (Grafreed.clipboardIsTempGroup) |
---|
3913 | 4390 | tGroup.add/*Child*/(tmp); |
---|
3914 | 4391 | else |
---|
3915 | | - GraphreeD.clipboard = tmp; |
---|
| 4392 | + Grafreed.clipboard = tmp; |
---|
3916 | 4393 | } |
---|
3917 | 4394 | else |
---|
3918 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4395 | + if (Grafreed.clipboardIsTempGroup) |
---|
3919 | 4396 | tGroup.add/*Child*/(child); |
---|
3920 | 4397 | else |
---|
3921 | | - GraphreeD.clipboard = child; |
---|
| 4398 | + Grafreed.clipboard = child; |
---|
3922 | 4399 | } |
---|
3923 | 4400 | |
---|
3924 | 4401 | //ResetModel(); |
---|
.. | .. |
---|
3950 | 4427 | //System.out.println("cut " + elem); |
---|
3951 | 4428 | //System.out.println("parent = " + elem.parent); |
---|
3952 | 4429 | // tmp.addChild(elem); |
---|
3953 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4430 | + if (Grafreed.clipboardIsTempGroup) |
---|
3954 | 4431 | tGroup.add/*Child*/(tmp); |
---|
3955 | 4432 | else |
---|
3956 | | - GraphreeD.clipboard = tmp; |
---|
| 4433 | + Grafreed.clipboard = tmp; |
---|
3957 | 4434 | } |
---|
3958 | 4435 | else |
---|
3959 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4436 | + if (Grafreed.clipboardIsTempGroup) |
---|
3960 | 4437 | tGroup.add/*Child*/(child); |
---|
3961 | 4438 | else |
---|
3962 | | - GraphreeD.clipboard = child; |
---|
| 4439 | + Grafreed.clipboard = child; |
---|
3963 | 4440 | } |
---|
3964 | 4441 | |
---|
3965 | 4442 | } |
---|
3966 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
3967 | | - GraphreeD.clipboard = tGroup; |
---|
| 4443 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4444 | + Grafreed.clipboard = tGroup; |
---|
3968 | 4445 | if (cut) |
---|
3969 | 4446 | { |
---|
3970 | 4447 | ResetModel(); |
---|
.. | .. |
---|
3974 | 4451 | |
---|
3975 | 4452 | void paste(boolean expand) |
---|
3976 | 4453 | { |
---|
3977 | | - // if (GraphreeD.clipboard == null) |
---|
| 4454 | + // if (GrafreeD.clipboard == null) |
---|
3978 | 4455 | // return; |
---|
3979 | 4456 | boolean first = true; |
---|
3980 | 4457 | |
---|
3981 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4458 | + if (Grafreed.clipboardIsTempGroup) |
---|
3982 | 4459 | { |
---|
3983 | 4460 | Composite temp; |
---|
3984 | 4461 | |
---|
.. | .. |
---|
3989 | 4466 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
3990 | 4467 | */ |
---|
3991 | 4468 | Object3D elem; |
---|
3992 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4469 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
3993 | 4470 | { |
---|
3994 | 4471 | Object3D child = (Object3D)e.nextElement(); |
---|
3995 | 4472 | |
---|
.. | .. |
---|
4003 | 4480 | else |
---|
4004 | 4481 | elem = child.deepCopy(); // ? |
---|
4005 | 4482 | child.parent = keepparent; |
---|
4006 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4483 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4007 | 4484 | // elem = elem.get(0); |
---|
4008 | 4485 | makeSomething(elem, true); // ?? first); |
---|
4009 | 4486 | //group.addChild(elem); |
---|
.. | .. |
---|
4023 | 4500 | //Object3D cb = Applet3D.clipboard; |
---|
4024 | 4501 | //temp.addChild(cb); |
---|
4025 | 4502 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4026 | | - assert(GraphreeD.clipboard.parent == null); |
---|
4027 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
4028 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4029 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
4030 | | - makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy()); |
---|
| 4503 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4504 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4505 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4506 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4507 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4031 | 4508 | else |
---|
4032 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4033 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4509 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4510 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4034 | 4511 | } |
---|
4035 | 4512 | |
---|
4036 | 4513 | ResetModel(); |
---|
4037 | 4514 | refreshContents(); |
---|
4038 | 4515 | } |
---|
4039 | 4516 | |
---|
4040 | | - void pasteInto(boolean copyit) |
---|
| 4517 | + void pasteInto(boolean copyit, boolean clone) |
---|
4041 | 4518 | { |
---|
4042 | | -// if (GraphreeD.clipboard == null) |
---|
| 4519 | +// if (GrafreeD.clipboard == null) |
---|
4043 | 4520 | // return; |
---|
4044 | 4521 | |
---|
4045 | 4522 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4066 | 4543 | if (copyit) |
---|
4067 | 4544 | { |
---|
4068 | 4545 | // paste(false); |
---|
4069 | | - CloneClipboard(false); // sept 2014 |
---|
| 4546 | + if (clone) |
---|
| 4547 | + { |
---|
| 4548 | + CloneClipboard(false); // sept 2014 |
---|
| 4549 | + } |
---|
| 4550 | + else |
---|
| 4551 | + { |
---|
| 4552 | + paste(false); |
---|
| 4553 | + } |
---|
4070 | 4554 | } |
---|
4071 | 4555 | else |
---|
4072 | 4556 | { |
---|
4073 | 4557 | boolean first = true; |
---|
4074 | 4558 | |
---|
4075 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4559 | + if (Grafreed.clipboardIsTempGroup) |
---|
4076 | 4560 | { |
---|
4077 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4561 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4078 | 4562 | Object3D copy; |
---|
4079 | 4563 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4080 | 4564 | { |
---|
.. | .. |
---|
4084 | 4568 | } |
---|
4085 | 4569 | } else |
---|
4086 | 4570 | { |
---|
4087 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4571 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4088 | 4572 | } |
---|
4089 | 4573 | } |
---|
4090 | 4574 | } |
---|
.. | .. |
---|
4276 | 4760 | makeSomething(csg); |
---|
4277 | 4761 | } |
---|
4278 | 4762 | |
---|
| 4763 | + void Ungroup(Object3D g) |
---|
| 4764 | + { |
---|
| 4765 | + if (g instanceof HiddenObject) |
---|
| 4766 | + { |
---|
| 4767 | + HiddenObject h = (HiddenObject) g; |
---|
| 4768 | + |
---|
| 4769 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4770 | + { |
---|
| 4771 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4772 | + } |
---|
| 4773 | + } |
---|
| 4774 | + else |
---|
| 4775 | + { |
---|
| 4776 | + for (int i=0; i<g.Size(); i++) |
---|
| 4777 | + { |
---|
| 4778 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4779 | + } |
---|
| 4780 | + } |
---|
| 4781 | + } |
---|
| 4782 | + |
---|
4279 | 4783 | void ungroup() |
---|
4280 | 4784 | { |
---|
4281 | 4785 | /* |
---|
.. | .. |
---|
4471 | 4975 | |
---|
4472 | 4976 | void ImportGFD() |
---|
4473 | 4977 | { |
---|
4474 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4978 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4475 | 4979 | browser.show(); |
---|
4476 | 4980 | String filename = browser.getFile(); |
---|
4477 | 4981 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4509 | 5013 | |
---|
4510 | 5014 | void ImportVRMLX3D() |
---|
4511 | 5015 | { |
---|
4512 | | - if (GraphreeD.standAlone) |
---|
| 5016 | + if (Grafreed.standAlone) |
---|
4513 | 5017 | { |
---|
4514 | 5018 | /**/ |
---|
4515 | 5019 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4526 | 5030 | |
---|
4527 | 5031 | String GetFile(String dialogName) |
---|
4528 | 5032 | { |
---|
4529 | | - if (GraphreeD.standAlone) |
---|
| 5033 | + if (Grafreed.standAlone) |
---|
4530 | 5034 | { |
---|
4531 | 5035 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4532 | 5036 | browser.show(); |
---|
.. | .. |
---|
4590 | 5094 | cButton flashSelectionButton; |
---|
4591 | 5095 | cButton editButton; |
---|
4592 | 5096 | cButton uneditButton; |
---|
| 5097 | + JCheckBox allParamsButton; |
---|
4593 | 5098 | cButton clearpanelButton; |
---|
4594 | | - cButton allParamsButton; |
---|
4595 | 5099 | cButton unselectButton; |
---|
4596 | 5100 | |
---|
| 5101 | + cButton oneStepButton; |
---|
| 5102 | + |
---|
4597 | 5103 | cButton screenfitButton; |
---|
4598 | 5104 | cButton screenfitpointButton; |
---|
4599 | 5105 | cButton snapobjectButton; |
---|
.. | .. |
---|
4635 | 5141 | private MenuItem resetsupportItem; |
---|
4636 | 5142 | private MenuItem resetreferencesItem; |
---|
4637 | 5143 | private MenuItem linkverticesItem; |
---|
| 5144 | + private MenuItem relinkverticesItem; |
---|
4638 | 5145 | private MenuItem setMasterItem; |
---|
4639 | | - private MenuItem resetMeshItem; |
---|
| 5146 | + private MenuItem resetAllItem; |
---|
4640 | 5147 | private MenuItem stepAllItem; |
---|
4641 | 5148 | private MenuItem revertMeshItem; |
---|
4642 | 5149 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
4647 | 5154 | private MenuItem mergeGeometriesItem; |
---|
4648 | 5155 | private MenuItem copyItem; |
---|
4649 | 5156 | private MenuItem pasteItem; |
---|
| 5157 | + private MenuItem pasteIntoItem; |
---|
4650 | 5158 | private MenuItem pasteLinkItem; |
---|
4651 | 5159 | private MenuItem pasteCloneItem; |
---|
4652 | 5160 | private MenuItem pasteExpandItem; |
---|
4653 | 5161 | private MenuItem clearItem; |
---|
4654 | 5162 | private MenuItem clearAllItem; |
---|
4655 | 5163 | private MenuItem genUVItem; |
---|
| 5164 | + private MenuItem genNormalsMESHItem; |
---|
4656 | 5165 | private MenuItem genNormalsCADItem; |
---|
4657 | 5166 | private MenuItem genNormalsORGANItem; |
---|
| 5167 | + private MenuItem genNormalsMINEItem; |
---|
4658 | 5168 | private MenuItem stripifyItem; |
---|
4659 | 5169 | private MenuItem unstripifyItem; |
---|
4660 | 5170 | private MenuItem trimItem; |
---|
.. | .. |
---|
4694 | 5204 | private MenuItem panoTexturesItem; |
---|
4695 | 5205 | |
---|
4696 | 5206 | private MenuItem resetCentroidItem; |
---|
4697 | | - private MenuItem transformgeometryItem; |
---|
| 5207 | + private MenuItem resetCentroidXZItem; |
---|
4698 | 5208 | private MenuItem resetTransformItem; |
---|
| 5209 | + private MenuItem transformGeometryItem; |
---|
| 5210 | + private MenuItem transformChildrenItem; |
---|
| 5211 | + private MenuItem hideItem; |
---|
4699 | 5212 | private MenuItem grabItem; |
---|
4700 | 5213 | private MenuItem backItem; |
---|
4701 | 5214 | private MenuItem frontItem; |
---|
.. | .. |
---|
4716 | 5229 | |
---|
4717 | 5230 | private MenuItem resetParentItem; |
---|
4718 | 5231 | private MenuItem repairParentItem; |
---|
| 5232 | + private MenuItem repairShadowItem; |
---|
4719 | 5233 | private MenuItem sortbysizeItem; |
---|
4720 | 5234 | private MenuItem sortbynameItem; |
---|
4721 | 5235 | |
---|
.. | .. |
---|
4728 | 5242 | private MenuItem particleItem; |
---|
4729 | 5243 | private MenuItem ragdollItem; |
---|
4730 | 5244 | private MenuItem ragdoll2Item; |
---|
| 5245 | + private MenuItem heightFieldItem; |
---|
| 5246 | + private MenuItem textureFieldItem; |
---|
4731 | 5247 | private MenuItem gridItem; |
---|
4732 | 5248 | private MenuItem rectoidItem; |
---|
4733 | 5249 | private MenuItem ellipsoidItem; |
---|
4734 | 5250 | private MenuItem coneItem; |
---|
4735 | 5251 | private MenuItem torusItem; |
---|
4736 | 5252 | private MenuItem superItem; |
---|
| 5253 | + private MenuItem kleinItem; |
---|
4737 | 5254 | private MenuItem blobItem; |
---|
4738 | 5255 | private MenuItem latheItem; |
---|
4739 | 5256 | private MenuItem bezierItem; |
---|
4740 | | - private MenuItem checkerItem; |
---|
| 5257 | + private MenuItem overlayItem; |
---|
4741 | 5258 | private MenuItem meshItem; |
---|
4742 | 5259 | // private MenuItem meshGroupItem; |
---|
4743 | 5260 | private MenuItem springItem; |
---|
.. | .. |
---|
4746 | 5263 | private MenuItem csgItem; |
---|
4747 | 5264 | private MenuItem templateItem; |
---|
4748 | 5265 | private MenuItem textureItem; |
---|
| 5266 | + private MenuItem billboardItem; |
---|
4749 | 5267 | private MenuItem shadowXItem; |
---|
4750 | 5268 | private MenuItem shadowYItem; |
---|
4751 | 5269 | private MenuItem shadowZItem; |
---|