.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
.. | .. |
---|
73 | 74 | this.copy = this.group = copy; |
---|
74 | 75 | //selectees = this.group.selectees; |
---|
75 | 76 | |
---|
76 | | - SetupMenu2(objEditor); |
---|
| 77 | + SetupMenu2(this); //objEditor); |
---|
77 | 78 | SetupUI2(objEditor); |
---|
78 | 79 | objEditor.SetupUI(true); |
---|
79 | 80 | SetupViews(objEditor); |
---|
.. | .. |
---|
97 | 98 | |
---|
98 | 99 | void CloneClipboard(boolean supports) |
---|
99 | 100 | { |
---|
100 | | - assert(GrafreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
102 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GrafreeD.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(GrafreeD.clipboard, false)); |
---|
107 | | - GrafreeD.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)GrafreeD.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 |
---|
.. | .. |
---|
147 | 148 | |
---|
148 | 149 | //JTextField nameField; |
---|
149 | 150 | |
---|
150 | | - void SetupMenu2(ObjEditor oe) |
---|
| 151 | + void SetupMenu2(GroupEditor oe) |
---|
151 | 152 | { |
---|
| 153 | + Menu menu; |
---|
| 154 | + oe.menuBar.add(menu = new Menu("Edit")); |
---|
| 155 | + //editItem = menu.add(new MenuItem("Edit")); |
---|
| 156 | + //editItem.addActionListener(this); |
---|
| 157 | + |
---|
| 158 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 159 | +// undoItem.addActionListener(this); |
---|
| 160 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 161 | +// redoItem.addActionListener(this); |
---|
| 162 | +// menu.add("-"); |
---|
| 163 | + duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 164 | + duplicateItem.addActionListener(this); |
---|
| 165 | + cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 166 | + cloneItem.addActionListener(this); |
---|
| 167 | + if (Globals.ADVANCED) |
---|
| 168 | + { |
---|
| 169 | + cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
| 170 | + cloneSupportItem.addActionListener(this); |
---|
| 171 | + } |
---|
| 172 | + menu.add("-"); |
---|
| 173 | + cutItem = menu.add(new MenuItem("Cut")); |
---|
| 174 | + cutItem.addActionListener(this); |
---|
| 175 | + copyItem = menu.add(new MenuItem("Copy")); |
---|
| 176 | + copyItem.addActionListener(this); |
---|
| 177 | + pasteItem = menu.add(new MenuItem("Paste")); |
---|
| 178 | + pasteItem.addActionListener(this); |
---|
| 179 | + menu.add("-"); |
---|
| 180 | + |
---|
| 181 | + menu.add("-"); |
---|
| 182 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 183 | + pasteIntoItem.addActionListener(this); |
---|
| 184 | + pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
| 185 | + pasteLinkItem.addActionListener(this); |
---|
| 186 | + pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
| 187 | + pasteCloneItem.addActionListener(this); |
---|
| 188 | +// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
| 189 | +// pasteExpandItem.addActionListener(this); |
---|
| 190 | + menu.add("-"); |
---|
| 191 | + clearItem = menu.add(new MenuItem("Clear")); |
---|
| 192 | + clearItem.addActionListener(this); |
---|
| 193 | + |
---|
| 194 | + if (Globals.ADVANCED) |
---|
| 195 | + { |
---|
| 196 | + // Deletes the cameras... |
---|
| 197 | + clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
| 198 | + clearAllItem.addActionListener(this); |
---|
| 199 | + } |
---|
| 200 | + |
---|
| 201 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 202 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 203 | + //zBufferItem.addActionListener(this); |
---|
| 204 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 205 | + //normalLensItem.addActionListener(this); |
---|
| 206 | + cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 207 | + revertCameraItem.addActionListener(this); |
---|
| 208 | + |
---|
| 209 | + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 210 | + toggleFullScreenItem.addItemListener(this); |
---|
| 211 | + toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 212 | + cameraMenu.add("-"); |
---|
| 213 | + |
---|
| 214 | + cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 215 | + toggleTextureItem.addItemListener(this); |
---|
| 216 | + toggleTextureItem.setState(CameraPane.textureon); |
---|
| 217 | + |
---|
| 218 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 219 | + toggleSwitchItem.addItemListener(this); |
---|
| 220 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 221 | + |
---|
| 222 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 223 | + toggleHandleItem.addItemListener(this); |
---|
| 224 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 225 | + |
---|
| 226 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 227 | + togglePaintItem.addItemListener(this); |
---|
| 228 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 229 | + |
---|
| 230 | + if (Globals.ADVANCED) |
---|
| 231 | + { |
---|
| 232 | + cameraMenu.add("-"); |
---|
| 233 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 234 | + toggleLiveItem.addItemListener(this); |
---|
| 235 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
| 236 | + |
---|
| 237 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 238 | + stepItem.addActionListener(this); |
---|
| 239 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 240 | + // toggleDLItem.addItemListener(this); |
---|
| 241 | + // toggleDLItem.setState(false); |
---|
| 242 | + |
---|
| 243 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 244 | + toggleRenderItem.addItemListener(this); |
---|
| 245 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 246 | + |
---|
| 247 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 248 | + toggleDebugItem.addItemListener(this); |
---|
| 249 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
| 250 | + |
---|
| 251 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 252 | + toggleFrustumItem.addItemListener(this); |
---|
| 253 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 254 | + |
---|
| 255 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 256 | + toggleFootContactItem.addItemListener(this); |
---|
| 257 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 258 | + |
---|
| 259 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 260 | + toggleTimelineItem.addItemListener(this); |
---|
| 261 | + } |
---|
| 262 | + |
---|
| 263 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 264 | +// toggleRootItem.addItemListener(this); |
---|
| 265 | +// toggleRootItem.setState(false); |
---|
| 266 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 267 | +// animationItem.addItemListener(this); |
---|
| 268 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 269 | + cameraMenu.add("-"); |
---|
| 270 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 271 | + editCameraItem.addActionListener(this); |
---|
| 272 | + |
---|
| 273 | + if (Globals.ADVANCED) |
---|
| 274 | + { |
---|
152 | 275 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
153 | 276 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
154 | 277 | //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
.. | .. |
---|
160 | 283 | lookAtItem.addActionListener(this); |
---|
161 | 284 | //lookFromItem.addActinoListener(this); |
---|
162 | 285 | //switchItem.addActionListener(this); |
---|
163 | | - Menu menu; |
---|
164 | | - oe.menuBar.add(menu = new Menu("Edit")); |
---|
165 | | - //editItem = menu.add(new MenuItem("Edit")); |
---|
166 | | - //editItem.addActionListener(this); |
---|
167 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
168 | | - duplicateItem.addActionListener(this); |
---|
169 | | - menu.add("-"); |
---|
170 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | | - cloneItem.addActionListener(this); |
---|
172 | | - cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | | - cloneSupportItem.addActionListener(this); |
---|
174 | | - menu.add("-"); |
---|
175 | | - cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | | - cutItem.addActionListener(this); |
---|
177 | | - copyItem = menu.add(new MenuItem("Copy")); |
---|
178 | | - copyItem.addActionListener(this); |
---|
179 | | - pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | | - pasteItem.addActionListener(this); |
---|
181 | | - pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | | - pasteLinkItem.addActionListener(this); |
---|
183 | | - pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | | - pasteCloneItem.addActionListener(this); |
---|
185 | | -// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | | -// pasteExpandItem.addActionListener(this); |
---|
187 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | | - clearItem.addActionListener(this); |
---|
189 | | - clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | | - clearAllItem.addActionListener(this); |
---|
191 | | - |
---|
| 286 | + } |
---|
| 287 | + |
---|
192 | 288 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
193 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
194 | | - resetMeshItem.addActionListener(this); |
---|
195 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
196 | | - stepAllItem.addActionListener(this); |
---|
| 289 | + if (Globals.ADVANCED) |
---|
| 290 | + { |
---|
197 | 291 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
198 | 292 | revertMeshItem.addActionListener(this); |
---|
199 | 293 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
200 | 294 | resetreferencesItem.addActionListener(this); |
---|
201 | 295 | menu.add("-"); |
---|
| 296 | + } |
---|
202 | 297 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
203 | 298 | overwriteGeoItem.addActionListener(this); |
---|
204 | 299 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
210 | 305 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
211 | 306 | overwriteUVItem.addActionListener(this); |
---|
212 | 307 | menu.add("-"); |
---|
| 308 | + if (Globals.ADVANCED) |
---|
| 309 | + { |
---|
213 | 310 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
214 | 311 | generateMeshItem.addActionListener(this); |
---|
215 | 312 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
216 | 313 | poseMeshItem.addActionListener(this); |
---|
217 | 314 | menu.add("-"); |
---|
| 315 | + } |
---|
218 | 316 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
219 | 317 | resetsupportItem.addActionListener(this); |
---|
220 | 318 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 319 | linkverticesItem.addActionListener(this); |
---|
| 320 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 321 | + relinkverticesItem.addActionListener(this); |
---|
| 322 | + |
---|
| 323 | + if (Globals.ADVANCED) |
---|
| 324 | + { |
---|
222 | 325 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
223 | 326 | setMasterItem.addActionListener(this); |
---|
| 327 | + } |
---|
224 | 328 | |
---|
225 | 329 | oe.menuBar.add(menu = new Menu("Group")); |
---|
226 | 330 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
231 | 335 | frontItem.addActionListener(this); |
---|
232 | 336 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 337 | compositeItem.addActionListener(this); |
---|
| 338 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
| 339 | + hideItem.addActionListener(this); |
---|
| 340 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 341 | + ungroupItem.addActionListener(this); |
---|
234 | 342 | menu.add("-"); |
---|
235 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 343 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
236 | 344 | randomItem.addActionListener(this); |
---|
237 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
238 | | - physicsItem.addActionListener(this); |
---|
239 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
240 | | - frameselectorItem.addActionListener(this); |
---|
241 | 345 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
242 | 346 | switchGeoItem.addActionListener(this); |
---|
243 | 347 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
244 | 348 | switchTransfoItem.addActionListener(this); |
---|
245 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 349 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
246 | 350 | morphItem.addActionListener(this); |
---|
| 351 | + |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
| 354 | + menu.add("-"); |
---|
| 355 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 356 | + physicsItem.addActionListener(this); |
---|
| 357 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 358 | + frameselectorItem.addActionListener(this); |
---|
247 | 359 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
248 | 360 | scriptNodeItem.addActionListener(this); |
---|
249 | 361 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
250 | 362 | cameraItem.addActionListener(this); |
---|
| 363 | + } |
---|
251 | 364 | |
---|
252 | 365 | oe.menuBar.add(menu = new Menu("Object")); |
---|
253 | 366 | textureItem = menu.add(new MenuItem("Texture")); |
---|
254 | 367 | textureItem.addActionListener(this); |
---|
| 368 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 369 | + billboardItem.addActionListener(this); |
---|
255 | 370 | csgItem = menu.add(new MenuItem("CSG")); |
---|
256 | 371 | csgItem.addActionListener(this); |
---|
257 | 372 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
260 | 375 | shadowYItem.addActionListener(this); |
---|
261 | 376 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
262 | 377 | shadowZItem.addActionListener(this); |
---|
| 378 | + if (Globals.ADVANCED) |
---|
| 379 | + { |
---|
| 380 | + menu.add("-"); |
---|
263 | 381 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
264 | 382 | linkerItem.addActionListener(this); |
---|
265 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
266 | | - templateItem.addActionListener(this); |
---|
267 | 383 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
268 | 384 | attributeItem.addActionListener(this); |
---|
| 385 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 386 | + templateItem.addActionListener(this); |
---|
269 | 387 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
270 | 388 | pointflowItem.addActionListener(this); |
---|
| 389 | + } |
---|
271 | 390 | menu.add("-"); |
---|
272 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
273 | | - transformgeometryItem.addActionListener(this); |
---|
274 | 391 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
275 | 392 | resetTransformItem.addActionListener(this); |
---|
276 | 393 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
277 | 394 | resetCentroidItem.addActionListener(this); |
---|
278 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
279 | | - ungroupItem.addActionListener(this); |
---|
| 395 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 396 | + resetCentroidXZItem.addActionListener(this); |
---|
| 397 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 398 | + transformGeometryItem.addActionListener(this); |
---|
| 399 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 400 | + transformChildrenItem.addActionListener(this); |
---|
280 | 401 | |
---|
281 | 402 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
282 | 403 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
287 | 408 | genNormalsCADItem.addActionListener(this); |
---|
288 | 409 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
289 | 410 | genNormalsMESHItem.addActionListener(this); |
---|
| 411 | + if (Globals.ADVANCED) |
---|
| 412 | + { |
---|
| 413 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 414 | + genNormalsMINEItem.addActionListener(this); |
---|
| 415 | + } |
---|
290 | 416 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
291 | 417 | stripifyItem.addActionListener(this); |
---|
292 | 418 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
308 | 434 | reduce34MeshItem.addActionListener(this); |
---|
309 | 435 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
310 | 436 | increaseMeshItem.addActionListener(this); |
---|
311 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
312 | | - smoothMeshItem.addActionListener(this); |
---|
313 | 437 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
314 | 438 | clipMeshItem.addActionListener(this); |
---|
| 439 | + |
---|
| 440 | + if (Globals.ADVANCED) |
---|
| 441 | + { |
---|
| 442 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 443 | + smoothMeshItem.addActionListener(this); |
---|
| 444 | + } |
---|
315 | 445 | |
---|
316 | 446 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
317 | 447 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
318 | 448 | clearMaterialsItem.addActionListener(this); |
---|
| 449 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 450 | + resetAllItem.addActionListener(this); |
---|
| 451 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 452 | + stepAllItem.addActionListener(this); |
---|
319 | 453 | menu.add("-"); |
---|
320 | 454 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
321 | 455 | liveleavesItem.addActionListener(this); |
---|
322 | 456 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
323 | 457 | unliveleavesItem.addActionListener(this); |
---|
| 458 | + if (Globals.ADVANCED) |
---|
| 459 | + { |
---|
324 | 460 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
325 | 461 | supportleavesItem.addActionListener(this); |
---|
326 | 462 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
327 | 463 | unsupportleavesItem.addActionListener(this); |
---|
| 464 | + } |
---|
328 | 465 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
329 | 466 | hideleavesItem.addActionListener(this); |
---|
330 | 467 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
333 | 470 | markleavesItem.addActionListener(this); |
---|
334 | 471 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
335 | 472 | unmarkleavesItem.addActionListener(this); |
---|
| 473 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 474 | + rewindleavesItem.addActionListener(this); |
---|
| 475 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 476 | + unrewindleavesItem.addActionListener(this); |
---|
| 477 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 478 | + randomleavesItem.addActionListener(this); |
---|
| 479 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 480 | + unrandomleavesItem.addActionListener(this); |
---|
336 | 481 | menu.add("-"); |
---|
337 | 482 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
338 | 483 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
368 | 513 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
369 | 514 | sortbynameItem.addActionListener(this); |
---|
370 | 515 | menu.add("-"); |
---|
| 516 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 517 | + shareGeometriesItem.addActionListener(this); |
---|
| 518 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 519 | + mergeGeometriesItem.addActionListener(this); |
---|
| 520 | + if (Globals.ADVANCED) |
---|
| 521 | + { |
---|
| 522 | + // Pretty much the same as duplicate and clone. |
---|
371 | 523 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
372 | 524 | extractGeometriesItem.addActionListener(this); |
---|
373 | 525 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
374 | 526 | cloneGeometriesItem.addActionListener(this); |
---|
375 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
376 | | - shareGeometriesItem.addActionListener(this); |
---|
377 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
378 | | - mergeGeometriesItem.addActionListener(this); |
---|
| 527 | + } |
---|
379 | 528 | |
---|
380 | 529 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
381 | 530 | buildCreateMenu(menu); |
---|
382 | 531 | |
---|
383 | | - |
---|
384 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
385 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
386 | | - importGFDItem.addActionListener(this); |
---|
387 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
388 | | - importVRMLX3DItem.addActionListener(this); |
---|
389 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
390 | | - importOBJItem.addActionListener(this); |
---|
391 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
392 | | - import3DSItem.addActionListener(this); |
---|
393 | | - |
---|
394 | 532 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
395 | 533 | buildToolsMenu(menu); |
---|
396 | 534 | } |
---|
397 | 535 | |
---|
398 | 536 | void SetupUI2(ObjEditor oe) |
---|
399 | 537 | { |
---|
| 538 | + // June 2019 |
---|
| 539 | + if (oe == null) |
---|
| 540 | + { |
---|
| 541 | + //super.SetupUI2(this); |
---|
| 542 | + //return; |
---|
| 543 | + } |
---|
| 544 | + |
---|
| 545 | + if (copy != group) |
---|
| 546 | + { |
---|
| 547 | + //super.SetupUI2(this); |
---|
| 548 | + } |
---|
| 549 | + |
---|
400 | 550 | //new Exception().printStackTrace(); |
---|
401 | 551 | |
---|
402 | 552 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
425 | 575 | oe.radioPanel.add(dummyButton); |
---|
426 | 576 | oe.buttonGroup.add(dummyButton); |
---|
427 | 577 | */ |
---|
428 | | - aConstraints.gridy += 1; |
---|
429 | | - oe.aConstraints.gridwidth = 1; |
---|
430 | | - oe.aConstraints.gridx = 0; |
---|
| 578 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
431 | 579 | |
---|
432 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 580 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 581 | + //minButton.setToolTipText("Minimize window"); |
---|
| 582 | + //minButton.addActionListener(this); |
---|
| 583 | + |
---|
| 584 | + oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 585 | + maxButton.setToolTipText("Maximize window"); |
---|
| 586 | + maxButton.addActionListener(this); |
---|
| 587 | + |
---|
| 588 | + oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 589 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 590 | + fullButton.addActionListener(this); |
---|
| 591 | + |
---|
| 592 | + oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 593 | + undoButton.setToolTipText("Undo changes"); |
---|
| 594 | + undoButton.addActionListener(this); |
---|
| 595 | + |
---|
| 596 | + oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + redoButton.setToolTipText("Redo changes"); |
---|
| 598 | + redoButton.addActionListener(this); |
---|
| 599 | + |
---|
| 600 | + oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 601 | + saveButton.setToolTipText("Save changes"); |
---|
| 602 | + saveButton.addActionListener(this); |
---|
| 603 | + |
---|
| 604 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 605 | + liveCB.setToolTipText("Enable animation"); |
---|
433 | 606 | liveCB.addItemListener(this); |
---|
434 | 607 | |
---|
435 | | - oe.aConstraints.gridx += 1; |
---|
436 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
437 | | - supportCB.addItemListener(this); |
---|
438 | | - |
---|
439 | | - // oe.aConstraints.gridx += 1; |
---|
440 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
441 | | - // localCB.addItemListener(this); |
---|
442 | | - |
---|
443 | | - oe.aConstraints.gridx += 1; |
---|
444 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
445 | | - crowdCB.addItemListener(this); |
---|
446 | | - |
---|
447 | | - oe.aConstraints.gridx += 1; |
---|
448 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
449 | | - smoothCB.addItemListener(this); |
---|
450 | | - |
---|
451 | | - oe.aConstraints.gridx += 1; |
---|
452 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints); |
---|
| 608 | + oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 609 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 610 | + oneStepButton.addActionListener(this); |
---|
| 611 | + |
---|
| 612 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 613 | + fastCB.setToolTipText("Fast mode"); |
---|
453 | 614 | fastCB.addItemListener(this); |
---|
454 | | - oe.aConstraints.gridx += 1; |
---|
455 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
456 | | - slowCB.addItemListener(this); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
459 | | - boxCB.addItemListener(this); |
---|
460 | | - |
---|
461 | | -// oe.aConstraints.gridx += 1; |
---|
462 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
463 | | -// speakerMocapCB.addItemListener(this); |
---|
464 | | - |
---|
465 | | - if (false) |
---|
466 | | - { |
---|
467 | | - // handled in scripts |
---|
468 | | - oe.aConstraints.gridx += 1; |
---|
469 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
470 | | - speakerCameraCB.addItemListener(this); |
---|
471 | | - |
---|
472 | | - oe.aConstraints.gridx += 1; |
---|
473 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
474 | | - speakerFocusCB.addItemListener(this); |
---|
475 | | - |
---|
476 | | - oe.aConstraints.gridx += 1; |
---|
477 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
478 | | - smoothfocusCB.addItemListener(this); |
---|
479 | | - } |
---|
480 | | - |
---|
481 | | -//oe.aConstraints.gridx += 1; |
---|
482 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
483 | | -// debugCB.addItemListener(this); |
---|
484 | | - |
---|
485 | | - oe.aConstraints.gridx += 1; |
---|
486 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
487 | | - oeilCB.addItemListener(this); |
---|
488 | | - |
---|
489 | | - oe.aConstraints.gridx += 1; |
---|
490 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
491 | | - lookAtCB.addItemListener(this); |
---|
492 | | - |
---|
493 | | - oe.aConstraints.gridx += 1; |
---|
494 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 615 | + |
---|
| 616 | + oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 617 | + trackCB.setToolTipText("Enable tracking"); |
---|
495 | 618 | trackCB.addItemListener(this); |
---|
496 | 619 | |
---|
497 | | - oe.aConstraints.gridx += 1; |
---|
498 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 620 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 621 | + screenfitButton.setToolTipText("Screen fit"); |
---|
499 | 622 | screenfitButton.addActionListener(this); |
---|
500 | | - oe.aConstraints.gridx += 1; |
---|
| 623 | + |
---|
501 | 624 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
502 | 625 | // screenfitpointButton.addActionListener(this); |
---|
503 | | -// oe.aConstraints.gridx += 1; |
---|
504 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
505 | | - snapobjectButton.addActionListener(this); |
---|
506 | | - oe.aConstraints.gridx += 1; |
---|
507 | 626 | |
---|
508 | | - //aConstraints.gridx = 0; |
---|
509 | | - //aConstraints.gridy += 1; |
---|
510 | | - oe.aConstraints.weighty = 0; |
---|
511 | | - oe.aConstraints.gridwidth = 1; |
---|
512 | | - |
---|
513 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 627 | + if (Globals.ADVANCED) |
---|
| 628 | + { |
---|
| 629 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 630 | + snapobjectButton.addActionListener(this); |
---|
| 631 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 632 | + } |
---|
| 633 | + |
---|
| 634 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 635 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
514 | 636 | flashSelectionButton.addActionListener(this); |
---|
515 | | - oe.aConstraints.gridx += 1; |
---|
516 | | - oe.aConstraints.weighty = 0; |
---|
517 | | - oe.aConstraints.gridwidth = 1; |
---|
518 | 637 | |
---|
519 | | - // |
---|
520 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 638 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 639 | + |
---|
| 640 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 641 | + twoButton.setToolTipText("Show center view only"); |
---|
521 | 642 | twoButton.addActionListener(this); |
---|
522 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 643 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
523 | 644 | fourButton.addActionListener(this); |
---|
524 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 645 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 646 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 647 | + sixButton.setToolTipText("2-column layout left"); |
---|
525 | 648 | sixButton.addActionListener(this); |
---|
526 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 649 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 650 | + threeButton.setToolTipText("2-column layout right"); |
---|
527 | 651 | threeButton.addActionListener(this); |
---|
528 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 652 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 653 | + sevenButton.setToolTipText("3-column layout"); |
---|
529 | 654 | sevenButton.addActionListener(this); |
---|
530 | 655 | // |
---|
531 | 656 | |
---|
532 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 657 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 658 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
533 | 659 | rootButton.addActionListener(this); |
---|
534 | | - oe.aConstraints.gridx += 1; |
---|
535 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 660 | + |
---|
| 661 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 662 | + closeButton.setToolTipText("Close tab"); |
---|
536 | 663 | closeButton.addActionListener(this); |
---|
537 | 664 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
538 | 665 | //clearButton.addActionListener(this); |
---|
539 | | - oe.aConstraints.gridx += 1; |
---|
540 | 666 | |
---|
541 | | - oe.aConstraints.gridx = 1; // |
---|
542 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 667 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 668 | + |
---|
| 669 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 670 | + editButton.setToolTipText("Edit selection"); |
---|
543 | 671 | editButton.addActionListener(this); |
---|
544 | | - oe.aConstraints.gridx += 1; |
---|
545 | | - oe.aConstraints.weighty = 0; |
---|
546 | | - oe.aConstraints.gridwidth = 1; |
---|
547 | 672 | |
---|
548 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 673 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 674 | + uneditButton.setToolTipText("Unedit selection"); |
---|
549 | 675 | uneditButton.addActionListener(this); |
---|
550 | 676 | |
---|
551 | | - oe.aConstraints.gridx += 1; |
---|
552 | | - oe.aConstraints.weighty = 0; |
---|
553 | | - oe.aConstraints.gridwidth = 1; |
---|
554 | | - |
---|
555 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
556 | | - clearPanelButton.addActionListener(this); |
---|
557 | | - |
---|
558 | | - oe.aConstraints.gridx += 1; |
---|
559 | | - oe.aConstraints.weighty = 0; |
---|
560 | | - oe.aConstraints.gridwidth = 1; |
---|
561 | | - |
---|
562 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 677 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 678 | + allParamsButton.setToolTipText("Edit all params"); |
---|
563 | 679 | allParamsButton.addActionListener(this); |
---|
564 | 680 | |
---|
565 | | - oe.aConstraints.gridx += 1; |
---|
566 | | - oe.aConstraints.weighty = 0; |
---|
567 | | - oe.aConstraints.gridwidth = 1; |
---|
568 | | - |
---|
569 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 681 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 682 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 683 | + clearPanelButton.addActionListener(this); |
---|
| 684 | + |
---|
| 685 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 686 | + unselectButton.setToolTipText("Unselect"); |
---|
570 | 687 | unselectButton.addActionListener(this); |
---|
571 | 688 | |
---|
| 689 | + commandsPanel.preferredHeight = 1; |
---|
| 690 | + |
---|
| 691 | + oe.treePanel.add(commandsPanel); |
---|
| 692 | + oe.treePanel.Return(); |
---|
| 693 | + |
---|
572 | 694 | // oe.aConstraints.gridx += 1; |
---|
573 | 695 | // oe.aConstraints.weighty = 0; |
---|
574 | 696 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
580 | 702 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
581 | 703 | // gcButton.addActionListener(this); |
---|
582 | 704 | |
---|
583 | | - oe.aConstraints.gridx = 0; |
---|
584 | | - oe.aConstraints.gridy += 1; |
---|
585 | | - |
---|
586 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
587 | | - oe.aConstraints.gridwidth = 100; |
---|
588 | | - // oe.aConstraints.gridheight = 100; |
---|
589 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
590 | | - oe.aConstraints.gridheight = 1; |
---|
591 | | - oe.aConstraints.weighty = 0.5; |
---|
592 | | - oe.aConstraints.gridx = 0; |
---|
593 | | - JScrollPane jSP; |
---|
| 705 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 706 | + |
---|
| 707 | + JScrollPane jSP; |
---|
594 | 708 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
595 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 709 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
596 | 710 | ResetModel(); |
---|
597 | | - oe.aConstraints.weighty = 0.5; |
---|
598 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
599 | | - oe.aConstraints.gridy += 1; |
---|
600 | | - oe.aConstraints.gridwidth = 1; |
---|
| 711 | + |
---|
| 712 | + oe.treePanel.add(jSPPanel); |
---|
| 713 | + oe.treePanel.Return(); |
---|
601 | 714 | |
---|
602 | | - oe.aConstraints.weighty = 0; |
---|
603 | | - oe.aConstraints.gridwidth = 2; |
---|
604 | | - |
---|
605 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
| 715 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 716 | + |
---|
| 717 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 718 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
606 | 719 | colorCB.addItemListener(this); |
---|
607 | | - oe.aConstraints.gridx += 2; |
---|
608 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 720 | + |
---|
| 721 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 722 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
609 | 723 | materialCB.addItemListener(this); |
---|
610 | | - oe.aConstraints.gridx += 2; |
---|
611 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 724 | + |
---|
| 725 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 726 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
612 | 727 | textureCB.addItemListener(this); |
---|
613 | 728 | |
---|
614 | | - oe.aConstraints.gridx = 0; |
---|
615 | | - oe.aConstraints.gridy += 1; |
---|
| 729 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 730 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 731 | + oe.treePanel.Return(); |
---|
616 | 732 | |
---|
| 733 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 734 | +// mainPanel.setResizeWeight(0.5); |
---|
| 735 | + |
---|
617 | 736 | //jList.addListSelectionListener(this); |
---|
618 | 737 | oe.jTree.addTreeSelectionListener(this); |
---|
619 | 738 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
635 | 754 | radio.layout = sevenButton; |
---|
636 | 755 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
637 | 756 | } |
---|
| 757 | + |
---|
| 758 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 759 | + { |
---|
| 760 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 761 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 762 | + boxCB.addItemListener(this); |
---|
| 763 | + |
---|
| 764 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 765 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 766 | + zoomBoxCB.addItemListener(this); |
---|
| 767 | + |
---|
| 768 | + if (true) // Globals.ADVANCED) |
---|
| 769 | + { |
---|
| 770 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 771 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 772 | + supportCB.addItemListener(this); |
---|
| 773 | + |
---|
| 774 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 775 | + // localCB.addItemListener(this); |
---|
| 776 | + |
---|
| 777 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 778 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 779 | + crowdCB.addItemListener(this); |
---|
| 780 | + |
---|
| 781 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 782 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 783 | + smoothCB.addItemListener(this); |
---|
| 784 | + |
---|
| 785 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 786 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 787 | + slowCB.addItemListener(this); |
---|
| 788 | + |
---|
| 789 | +// constraints.gridy += 1; |
---|
| 790 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 791 | +// speakerMocapCB.addItemListener(this); |
---|
| 792 | + |
---|
| 793 | + if (false) |
---|
| 794 | + { |
---|
| 795 | + // handled in scripts |
---|
| 796 | + //constraints.gridy += 1; |
---|
| 797 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 798 | + speakerCameraCB.addItemListener(this); |
---|
| 799 | + |
---|
| 800 | + //constraints.gridy += 1; |
---|
| 801 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 802 | + speakerFocusCB.addItemListener(this); |
---|
| 803 | + |
---|
| 804 | + //constraints.gridy += 1; |
---|
| 805 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 806 | + smoothfocusCB.addItemListener(this); |
---|
| 807 | + } |
---|
| 808 | + |
---|
| 809 | +//constraints.gridx += 1; |
---|
| 810 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 811 | +// debugCB.addItemListener(this); |
---|
| 812 | + |
---|
| 813 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 814 | + oeilCB.addItemListener(this); |
---|
| 815 | + |
---|
| 816 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 817 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 818 | + lookAtCB.addItemListener(this); |
---|
| 819 | + |
---|
| 820 | + } |
---|
| 821 | + |
---|
| 822 | + cGridBag fill = new cGridBag(); |
---|
| 823 | + |
---|
| 824 | + fill.preferredHeight = 200; |
---|
| 825 | + |
---|
| 826 | + panel.add(fill); |
---|
| 827 | + |
---|
| 828 | + } |
---|
638 | 829 | |
---|
639 | 830 | void EditObject(Object3D obj) |
---|
640 | 831 | { |
---|
641 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
642 | | - dummyButton.SetObject(obj); |
---|
643 | | - dummyButton.layout = sevenButton; |
---|
644 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
645 | | - dummyButton.addActionListener(this); |
---|
646 | | - radioPanel.add(dummyButton); |
---|
647 | | - buttonGroup.add(dummyButton); |
---|
648 | | - dummyButton.doClick(); |
---|
| 832 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 833 | + radioButton.SetObject(obj); |
---|
| 834 | + radioButton.layout = sevenButton; |
---|
| 835 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 836 | + radioButton.addActionListener(this); |
---|
| 837 | + radioPanel.add(radioButton); |
---|
| 838 | + buttonGroup.add(radioButton); |
---|
| 839 | + radioButton.doClick(); |
---|
649 | 840 | } |
---|
| 841 | + |
---|
650 | 842 | void SetupViews(ObjEditor oe) |
---|
651 | 843 | { |
---|
| 844 | + theFrame = this; |
---|
| 845 | + |
---|
652 | 846 | oe.SetupViews(); |
---|
653 | 847 | |
---|
654 | 848 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
665 | 859 | JCheckBox fastCB; |
---|
666 | 860 | JCheckBox slowCB; |
---|
667 | 861 | JCheckBox boxCB; |
---|
| 862 | + JCheckBox zoomBoxCB; |
---|
668 | 863 | JCheckBox trackCB; |
---|
669 | 864 | JCheckBox smoothfocusCB; |
---|
670 | 865 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
707 | 902 | dropAttributes |= Object3D.TEXTURE; |
---|
708 | 903 | else |
---|
709 | 904 | dropAttributes &= ~Object3D.TEXTURE; |
---|
710 | | - } |
---|
711 | | - else if(e.getSource() == liveCB) |
---|
| 905 | + } else if(e.getSource() == liveCB) |
---|
712 | 906 | { |
---|
713 | 907 | cameraView.ToggleLive(); |
---|
| 908 | + refreshContents(false); |
---|
714 | 909 | } |
---|
715 | 910 | else if(e.getSource() == supportCB) |
---|
716 | 911 | { |
---|
.. | .. |
---|
745 | 940 | Recompile(); |
---|
746 | 941 | cameraView.repaint(); |
---|
747 | 942 | // refreshContents(); |
---|
| 943 | + } |
---|
| 944 | + else if(e.getSource() == zoomBoxCB) |
---|
| 945 | + { |
---|
| 946 | + cameraView.ToggleZoomBoxMode(); |
---|
748 | 947 | } |
---|
749 | 948 | else if(e.getSource() == smoothfocusCB) |
---|
750 | 949 | { |
---|
.. | .. |
---|
859 | 1058 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
860 | 1059 | // return; |
---|
861 | 1060 | // } |
---|
862 | | - if (string.charAt(0) == '/') |
---|
| 1061 | + |
---|
| 1062 | + // File path for Mac and Windows |
---|
| 1063 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
863 | 1064 | { |
---|
864 | 1065 | // file(s) |
---|
865 | 1066 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
886 | 1087 | |
---|
887 | 1088 | flashIt = false; |
---|
888 | 1089 | CameraPane pane = (CameraPane) target; |
---|
889 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1090 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
890 | 1091 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
891 | 1092 | |
---|
892 | 1093 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
913 | 1114 | { |
---|
914 | 1115 | loadClipboard(true); |
---|
915 | 1116 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
916 | | - pasteInto(false); |
---|
| 1117 | + pasteInto(false, false); |
---|
917 | 1118 | } else { |
---|
918 | 1119 | loadClipboard(false); |
---|
919 | 1120 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
920 | | - pasteInto(false); // true); // ??? |
---|
| 1121 | + pasteInto(false, false); // true); // ??? |
---|
921 | 1122 | } |
---|
922 | 1123 | } |
---|
923 | 1124 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1035 | 1236 | torusItem.addActionListener(this); |
---|
1036 | 1237 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1037 | 1238 | superItem.addActionListener(this); |
---|
| 1239 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1240 | + kleinItem.addActionListener(this); |
---|
1038 | 1241 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1039 | 1242 | particleItem.addActionListener(this); |
---|
| 1243 | + if (Globals.ADVANCED) |
---|
| 1244 | + { |
---|
1040 | 1245 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1041 | 1246 | ragdollItem.addActionListener(this); |
---|
1042 | 1247 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1043 | 1248 | ragdoll2Item.addActionListener(this); |
---|
| 1249 | + } |
---|
1044 | 1250 | menu.add("-"); |
---|
1045 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1251 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1046 | 1252 | meshItem.addActionListener(this); |
---|
1047 | 1253 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1048 | 1254 | // meshGroupItem.addActionListener(this); |
---|
| 1255 | + if (Globals.ADVANCED) |
---|
| 1256 | + { |
---|
1049 | 1257 | springItem = menu.add(new MenuItem("Spring")); |
---|
1050 | 1258 | springItem.addActionListener(this); |
---|
1051 | 1259 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1052 | 1260 | flagItem.addActionListener(this); |
---|
1053 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1054 | | - bezierItem.addActionListener(this); |
---|
1055 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1056 | | - checkerItem.addActionListener(this); |
---|
1057 | 1261 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1058 | 1262 | blobItem.addActionListener(this); |
---|
1059 | 1263 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1060 | 1264 | latheItem.addActionListener(this); |
---|
| 1265 | + } |
---|
| 1266 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1267 | + bezierItem.addActionListener(this); |
---|
| 1268 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1269 | + overlayItem.addActionListener(this); |
---|
1061 | 1270 | lightItem = menu.add(new MenuItem("Light")); |
---|
1062 | 1271 | lightItem.addActionListener(this); |
---|
1063 | 1272 | menu.add("-"); |
---|
.. | .. |
---|
1067 | 1276 | loopItem.addActionListener(this); |
---|
1068 | 1277 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1069 | 1278 | doubleItem.addActionListener(this); |
---|
| 1279 | + if (Globals.ADVANCED) |
---|
| 1280 | + { |
---|
1070 | 1281 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1071 | 1282 | tripleItem.addActionListener(this); |
---|
| 1283 | + } |
---|
1072 | 1284 | } |
---|
1073 | 1285 | |
---|
1074 | 1286 | void buildToolsMenu(Menu menu) |
---|
1075 | 1287 | { |
---|
1076 | 1288 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1077 | 1289 | animationItem.addItemListener(this); |
---|
1078 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1290 | + animationItem.setState(Globals.ANIMATION); |
---|
1079 | 1291 | |
---|
1080 | 1292 | menu.add("-"); |
---|
1081 | 1293 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1082 | 1294 | parseverticesItem.addActionListener(this); |
---|
1083 | 1295 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1084 | 1296 | textureFieldItem.addActionListener(this); |
---|
1085 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1297 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1086 | 1298 | alignItem.addActionListener(this); |
---|
1087 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1088 | | - mirrorItem.addActionListener(this); |
---|
1089 | 1299 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1090 | 1300 | reduceMorphItem.addActionListener(this); |
---|
1091 | 1301 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1092 | 1302 | reduce34MorphItem.addActionListener(this); |
---|
1093 | | - |
---|
| 1303 | + menu.add("-"); |
---|
1094 | 1304 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1095 | 1305 | computeAOItem.addActionListener(this); |
---|
1096 | | - menu.add("-"); |
---|
1097 | 1306 | |
---|
| 1307 | + if (Globals.ADVANCED) |
---|
| 1308 | + { |
---|
| 1309 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1310 | + mirrorItem.addActionListener(this); |
---|
| 1311 | + menu.add("-"); |
---|
1098 | 1312 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1099 | 1313 | memoryItem.addActionListener(this); |
---|
1100 | 1314 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1101 | 1315 | analyzeItem.addActionListener(this); |
---|
1102 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1316 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1103 | 1317 | dumpItem.addActionListener(this); |
---|
1104 | 1318 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1105 | 1319 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1108 | 1322 | resetParentItem.addActionListener(this); |
---|
1109 | 1323 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1110 | 1324 | repairParentItem.addActionListener(this); |
---|
| 1325 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1326 | + repairShadowItem.addActionListener(this); |
---|
1111 | 1327 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1112 | 1328 | invariantsItem.addActionListener(this); |
---|
1113 | 1329 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1115 | 1331 | menu.add("-"); |
---|
1116 | 1332 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1117 | 1333 | editScriptItem.addActionListener(this); |
---|
| 1334 | + } |
---|
1118 | 1335 | } |
---|
1119 | 1336 | |
---|
1120 | 1337 | void ScreenFit() |
---|
.. | .. |
---|
1443 | 1660 | |
---|
1444 | 1661 | void Overwrite(int mask) |
---|
1445 | 1662 | { |
---|
1446 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1663 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1447 | 1664 | { |
---|
1448 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1665 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1449 | 1666 | |
---|
1450 | 1667 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1451 | 1668 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1468 | 1685 | // |
---|
1469 | 1686 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1470 | 1687 | { |
---|
| 1688 | + Object source = event.getSource(); |
---|
1471 | 1689 | /* |
---|
1472 | 1690 | if (event.getSource() == nameField) |
---|
1473 | 1691 | { |
---|
.. | .. |
---|
1479 | 1697 | } |
---|
1480 | 1698 | else |
---|
1481 | 1699 | */ |
---|
1482 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1700 | + if (source == lookAtItem || source == lookFromItem) |
---|
1483 | 1701 | { |
---|
1484 | 1702 | ScreenFit(); |
---|
1485 | 1703 | } else |
---|
1486 | | - if (event.getSource() == switchItem) |
---|
| 1704 | + if (source == switchItem) |
---|
1487 | 1705 | { |
---|
1488 | 1706 | cVector v1 = new cVector(); |
---|
1489 | 1707 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1492 | 1710 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1493 | 1711 | objEditor.cameraView.repaint(); |
---|
1494 | 1712 | } else |
---|
1495 | | - if (event.getSource() == rectoidItem) |
---|
| 1713 | + if (source == rectoidItem) |
---|
1496 | 1714 | { |
---|
1497 | 1715 | makeSomething(new Box()); |
---|
1498 | 1716 | } else |
---|
1499 | | - if (event.getSource() == particleItem) |
---|
| 1717 | + if (source == particleItem) |
---|
1500 | 1718 | { |
---|
1501 | 1719 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1502 | 1720 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1517 | 1735 | applyExample(particleGeom, "SMOKE"); |
---|
1518 | 1736 | makeSomething(particleGeom); |
---|
1519 | 1737 | } else |
---|
1520 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1738 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1521 | 1739 | { |
---|
1522 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1740 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1523 | 1741 | |
---|
1524 | 1742 | ragdoll.toParent = LA.newMatrix(); |
---|
1525 | 1743 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1537 | 1755 | } else |
---|
1538 | 1756 | /* |
---|
1539 | 1757 | */ |
---|
1540 | | - if (event.getSource() == heightFieldItem) |
---|
| 1758 | + if (source == heightFieldItem) |
---|
1541 | 1759 | { |
---|
1542 | 1760 | Object3D obj = new Object3D(); |
---|
1543 | 1761 | |
---|
.. | .. |
---|
1575 | 1793 | |
---|
1576 | 1794 | makeSomething(obj); |
---|
1577 | 1795 | } else |
---|
1578 | | - if (event.getSource() == gridItem) |
---|
| 1796 | + if (source == gridItem) |
---|
1579 | 1797 | { |
---|
1580 | 1798 | makeSomething(new Grid()); |
---|
1581 | 1799 | } else |
---|
1582 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1800 | + if (source == ellipsoidItem) |
---|
1583 | 1801 | { |
---|
1584 | 1802 | makeSomething(new Sphere()); |
---|
1585 | 1803 | } else |
---|
1586 | | - if (event.getSource() == coneItem) |
---|
| 1804 | + if (source == coneItem) |
---|
1587 | 1805 | { |
---|
1588 | 1806 | makeSomething(new Cone()); |
---|
1589 | 1807 | } else |
---|
1590 | | - if (event.getSource() == torusItem) |
---|
| 1808 | + if (source == torusItem) |
---|
1591 | 1809 | { |
---|
1592 | 1810 | makeSomething(new Torus()); |
---|
1593 | 1811 | } else |
---|
1594 | | - if (event.getSource() == superItem) |
---|
| 1812 | + if (source == superItem) |
---|
1595 | 1813 | { |
---|
1596 | 1814 | makeSomething(new Superellipsoid()); |
---|
1597 | 1815 | } else |
---|
1598 | | - if (event.getSource() == blobItem) |
---|
| 1816 | + if (source == kleinItem) |
---|
| 1817 | + { |
---|
| 1818 | + makeSomething(new Klein()); |
---|
| 1819 | + } else |
---|
| 1820 | + if (source == blobItem) |
---|
1599 | 1821 | { |
---|
1600 | 1822 | Blob blob = new Blob(); |
---|
1601 | 1823 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1603 | 1825 | //blob.retile(); |
---|
1604 | 1826 | makeSomething(blob); |
---|
1605 | 1827 | } else |
---|
1606 | | - if (event.getSource() == latheItem) |
---|
| 1828 | + if (source == latheItem) |
---|
1607 | 1829 | { |
---|
1608 | 1830 | makeSomething(new Lathe()); |
---|
1609 | 1831 | } else |
---|
1610 | | - if (event.getSource() == bezierItem) |
---|
| 1832 | + if (source == bezierItem) |
---|
1611 | 1833 | { |
---|
1612 | 1834 | makeSomething(new BezierSurface()); |
---|
1613 | 1835 | } else |
---|
1614 | | - if (event.getSource() == checkerItem) |
---|
| 1836 | + if (source == overlayItem) |
---|
1615 | 1837 | { |
---|
1616 | 1838 | /* |
---|
1617 | 1839 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1626 | 1848 | */ |
---|
1627 | 1849 | makeSomething(new Checker()); |
---|
1628 | 1850 | } else |
---|
1629 | | - if (event.getSource() == meshItem) |
---|
| 1851 | + if (source == meshItem) |
---|
1630 | 1852 | { |
---|
1631 | 1853 | Object3D itemtomake = new Object3D(); |
---|
1632 | 1854 | Object3D child; |
---|
.. | .. |
---|
1647 | 1869 | makeSomething(child); |
---|
1648 | 1870 | } |
---|
1649 | 1871 | } else |
---|
1650 | | - if (event.getSource() == springItem) |
---|
| 1872 | + if (source == springItem) |
---|
1651 | 1873 | { |
---|
1652 | 1874 | cSpring s = new cSpring(); |
---|
1653 | 1875 | s.setup(); |
---|
1654 | 1876 | makeSomething(s); |
---|
1655 | 1877 | } else |
---|
1656 | | - if (event.getSource() == flagItem) |
---|
| 1878 | + if (source == flagItem) |
---|
1657 | 1879 | { |
---|
1658 | 1880 | cSpring s = new cFlag(); |
---|
1659 | 1881 | s.setup(); |
---|
1660 | 1882 | makeSomething(s); |
---|
1661 | 1883 | } else |
---|
1662 | | - if (event.getSource() == lightItem) |
---|
| 1884 | + if (source == lightItem) |
---|
1663 | 1885 | { |
---|
1664 | 1886 | makeSomething(new Light()); |
---|
1665 | 1887 | } else |
---|
1666 | | - if (event.getSource() == csgItem) |
---|
| 1888 | + if (source == csgItem) |
---|
1667 | 1889 | { |
---|
1668 | 1890 | group(new CSG()); |
---|
1669 | 1891 | } else |
---|
1670 | | - if (event.getSource() == templateItem) |
---|
| 1892 | + if (source == templateItem) |
---|
1671 | 1893 | { |
---|
1672 | 1894 | group(new cTemplate()); |
---|
1673 | 1895 | } else |
---|
1674 | | - if (event.getSource() == attributeItem) |
---|
| 1896 | + if (source == attributeItem) |
---|
1675 | 1897 | { |
---|
1676 | 1898 | makeSomething(new Attribute()); |
---|
1677 | 1899 | } else |
---|
1678 | | - if (event.getSource() == pointflowItem) |
---|
| 1900 | + if (source == pointflowItem) |
---|
1679 | 1901 | { |
---|
1680 | 1902 | makeSomething(new PointFlow()); |
---|
1681 | 1903 | } else |
---|
.. | .. |
---|
1687 | 1909 | } else |
---|
1688 | 1910 | */ |
---|
1689 | 1911 | |
---|
1690 | | - if (event.getSource() == superLoopItem) |
---|
| 1912 | + if (source == superLoopItem) |
---|
1691 | 1913 | { |
---|
1692 | 1914 | Composite g = new cGroup(); |
---|
1693 | 1915 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1709 | 1931 | |
---|
1710 | 1932 | group(g); |
---|
1711 | 1933 | } else |
---|
1712 | | - if (event.getSource() == loopItem) |
---|
| 1934 | + if (source == loopItem) |
---|
1713 | 1935 | { |
---|
1714 | 1936 | Composite csg = new GroupLeaf(); |
---|
1715 | 1937 | csg.count = 5; |
---|
.. | .. |
---|
1718 | 1940 | csg.addChild(child); |
---|
1719 | 1941 | child.addChild(csg); |
---|
1720 | 1942 | } else |
---|
1721 | | - if (event.getSource() == doubleItem) |
---|
| 1943 | + if (source == doubleItem) |
---|
1722 | 1944 | { |
---|
1723 | 1945 | Composite csg = new GroupLeaf(); |
---|
1724 | 1946 | csg.count = 5; |
---|
.. | .. |
---|
1730 | 1952 | csg.addChild(child); |
---|
1731 | 1953 | child.addChild(csg); |
---|
1732 | 1954 | } else |
---|
1733 | | - if (event.getSource() == tripleItem) |
---|
| 1955 | + if (source == tripleItem) |
---|
1734 | 1956 | { |
---|
1735 | 1957 | Composite csg = new GroupLeaf(); |
---|
1736 | 1958 | csg.count = 4; |
---|
.. | .. |
---|
1745 | 1967 | csg.addChild(child); |
---|
1746 | 1968 | child.addChild(csg); |
---|
1747 | 1969 | } else |
---|
1748 | | - |
---|
1749 | | - if (event.getSource() == importGFDItem) |
---|
| 1970 | + if (source == computeAOItem) |
---|
1750 | 1971 | { |
---|
1751 | | - ImportGFD(); |
---|
| 1972 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1973 | + Globals.theRenderer.repaint(); |
---|
1752 | 1974 | } else |
---|
1753 | | - if (event.getSource() == importVRMLX3DItem) |
---|
1754 | | - { |
---|
1755 | | - ImportVRMLX3D(); |
---|
1756 | | - } else |
---|
1757 | | - if (event.getSource() == import3DSItem) |
---|
1758 | | - { |
---|
1759 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1760 | | - } else |
---|
1761 | | - if (event.getSource() == importOBJItem) |
---|
1762 | | - { |
---|
1763 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1764 | | - } else |
---|
1765 | | - if (event.getSource() == computeAOItem) |
---|
1766 | | - { |
---|
1767 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1768 | | - CameraPane.theRenderer.repaint(); |
---|
1769 | | - } else |
---|
1770 | | - if (event.getSource() == recompileItem) |
---|
| 1975 | + if (source == recompileItem) |
---|
1771 | 1976 | { |
---|
1772 | 1977 | Recompile(); |
---|
1773 | 1978 | refreshContents(); |
---|
1774 | 1979 | } else |
---|
1775 | | - if (event.getSource() == editScriptItem) |
---|
| 1980 | + if (source == editScriptItem) |
---|
1776 | 1981 | { |
---|
1777 | 1982 | OpenDialog(); |
---|
1778 | 1983 | refreshContents(); |
---|
1779 | 1984 | } else |
---|
1780 | | - if (event.getSource() == invariantsItem) |
---|
| 1985 | + if (source == invariantsItem) |
---|
1781 | 1986 | { |
---|
1782 | 1987 | System.out.println("Invariants:"); |
---|
1783 | | - GrafreeD.theApplet3D.universe.invariants(); |
---|
| 1988 | + Grafreed.grafreeD.universe.invariants(); |
---|
1784 | 1989 | } else |
---|
1785 | | - if (event.getSource() == memoryItem) |
---|
| 1990 | + if (source == memoryItem) |
---|
1786 | 1991 | { |
---|
1787 | 1992 | //System.out.println("Invariants:"); |
---|
1788 | 1993 | PrintMemory(); |
---|
1789 | 1994 | } else |
---|
1790 | | - if (event.getSource() == pathItem) |
---|
| 1995 | + if (source == pathItem) |
---|
1791 | 1996 | { |
---|
1792 | 1997 | PrintPath(); |
---|
1793 | 1998 | } else |
---|
1794 | | - if (event.getSource() == analyzeItem) |
---|
| 1999 | + if (source == analyzeItem) |
---|
1795 | 2000 | { |
---|
1796 | 2001 | AnalyzeObject(); |
---|
1797 | 2002 | } else |
---|
1798 | | - if (event.getSource() == dumpItem) |
---|
| 2003 | + if (source == dumpItem) |
---|
1799 | 2004 | { |
---|
1800 | 2005 | DumpObject(); |
---|
1801 | 2006 | } else |
---|
1802 | | - if (event.getSource() == screenfitButton) |
---|
| 2007 | + if (source == minButton) |
---|
| 2008 | + { |
---|
| 2009 | + Minimize(); |
---|
| 2010 | + } else |
---|
| 2011 | + if (source == maxButton) |
---|
| 2012 | + { |
---|
| 2013 | + Maximize(); |
---|
| 2014 | + } else |
---|
| 2015 | + if (source == fullButton) |
---|
| 2016 | + { |
---|
| 2017 | + ToggleFullScreen(); |
---|
| 2018 | + } else |
---|
| 2019 | + if (source == undoButton) |
---|
| 2020 | + { |
---|
| 2021 | + Undo(); |
---|
| 2022 | + } else |
---|
| 2023 | + if (source == redoButton) |
---|
| 2024 | + { |
---|
| 2025 | + Redo(); |
---|
| 2026 | + } else |
---|
| 2027 | + if (source == saveButton) |
---|
| 2028 | + { |
---|
| 2029 | + Save(); |
---|
| 2030 | + } else |
---|
| 2031 | + if (source == oneStepButton) |
---|
| 2032 | + { |
---|
| 2033 | + Globals.ONESTEP = true; |
---|
| 2034 | + cameraView.repaint(); |
---|
| 2035 | + } else |
---|
| 2036 | + if (source == screenfitButton) |
---|
1803 | 2037 | { |
---|
1804 | 2038 | //Reload(lastConverter, lastFilename, true); |
---|
1805 | 2039 | ScreenFit(); |
---|
1806 | 2040 | } else |
---|
1807 | | - if (event.getSource() == screenfitpointButton) |
---|
| 2041 | + if (source == screenfitpointButton) |
---|
1808 | 2042 | { |
---|
1809 | 2043 | //Reload(lastConverter, lastFilename, true); |
---|
1810 | 2044 | ScreenFitPoint(); |
---|
1811 | 2045 | } else |
---|
1812 | | - if (event.getSource() == snapobjectButton) |
---|
| 2046 | + if (source == snapobjectButton) |
---|
1813 | 2047 | { |
---|
1814 | 2048 | //Reload(lastConverter, lastFilename, true); |
---|
1815 | 2049 | SnapObject(); |
---|
.. | .. |
---|
1820 | 2054 | // Recompile(); |
---|
1821 | 2055 | // refreshContents(); |
---|
1822 | 2056 | // } else |
---|
1823 | | - if (event.getSource() == gcButton) |
---|
| 2057 | + if (source == gcButton) |
---|
1824 | 2058 | { |
---|
1825 | 2059 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1826 | 2060 | System.gc(); |
---|
1827 | 2061 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1828 | 2062 | } else |
---|
1829 | | - if (event.getSource() == editLeafItem) |
---|
| 2063 | + if (source == editLeafItem) |
---|
1830 | 2064 | { |
---|
1831 | 2065 | Object3D obj; |
---|
1832 | 2066 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1840 | 2074 | } |
---|
1841 | 2075 | refreshContents(true); |
---|
1842 | 2076 | } else |
---|
1843 | | - if (event.getSource() == openWindowItem) |
---|
| 2077 | + if (source == openWindowItem) |
---|
1844 | 2078 | { |
---|
1845 | 2079 | EditSelection(true); |
---|
1846 | 2080 | } else |
---|
1847 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 2081 | + if (source == cutItem || source == clearButton) |
---|
1848 | 2082 | { |
---|
1849 | 2083 | loadClipboard(true); |
---|
1850 | 2084 | } else |
---|
1851 | | - if (event.getSource() == duplicateItem) |
---|
| 2085 | + if (source == undoItem) |
---|
1852 | 2086 | { |
---|
1853 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2087 | + Undo(); |
---|
| 2088 | + } else |
---|
| 2089 | + if (source == redoItem) |
---|
| 2090 | + { |
---|
| 2091 | + Redo(); |
---|
| 2092 | + } else |
---|
| 2093 | + if (source == duplicateItem) |
---|
| 2094 | + { |
---|
| 2095 | + Object3D keep = Grafreed.clipboard; |
---|
1854 | 2096 | loadClipboard(false); |
---|
1855 | 2097 | paste(false); |
---|
1856 | | - GrafreeD.clipboard = keep; |
---|
| 2098 | + Grafreed.clipboard = keep; |
---|
1857 | 2099 | } else |
---|
1858 | | - if (event.getSource() == cloneItem) |
---|
| 2100 | + if (source == cloneItem) |
---|
1859 | 2101 | { |
---|
1860 | 2102 | CloneSelection(false); |
---|
1861 | 2103 | } else |
---|
1862 | | - if (event.getSource() == cloneSupportItem) |
---|
| 2104 | + if (source == cloneSupportItem) |
---|
1863 | 2105 | { |
---|
1864 | 2106 | CloneSelection(true); |
---|
1865 | 2107 | } else |
---|
1866 | | - if (event.getSource() == copyItem) |
---|
| 2108 | + if (source == copyItem) |
---|
1867 | 2109 | { |
---|
1868 | 2110 | loadClipboard(false); |
---|
1869 | 2111 | } else |
---|
1870 | | - if (event.getSource() == pasteItem) |
---|
| 2112 | + if (source == pasteItem) |
---|
1871 | 2113 | { |
---|
1872 | 2114 | paste(false); |
---|
1873 | 2115 | } else |
---|
1874 | | - if (event.getSource() == pasteLinkItem) |
---|
| 2116 | + if (source == pasteIntoItem) |
---|
1875 | 2117 | { |
---|
1876 | | - pasteInto(false); |
---|
| 2118 | + pasteInto(true, false); |
---|
1877 | 2119 | } else |
---|
1878 | | - if (event.getSource() == pasteCloneItem) |
---|
| 2120 | + if (source == pasteLinkItem) |
---|
1879 | 2121 | { |
---|
1880 | | - pasteInto(true); |
---|
| 2122 | + pasteInto(false, false); |
---|
1881 | 2123 | } else |
---|
1882 | | - if (event.getSource() == pasteExpandItem) |
---|
| 2124 | + if (source == pasteCloneItem) |
---|
| 2125 | + { |
---|
| 2126 | + pasteInto(true, true); |
---|
| 2127 | + } else |
---|
| 2128 | + if (source == pasteExpandItem) |
---|
1883 | 2129 | { |
---|
1884 | 2130 | paste(true); |
---|
1885 | 2131 | } else |
---|
1886 | | - if (event.getSource() == synchronizeItem) |
---|
| 2132 | + if (source == synchronizeItem) |
---|
1887 | 2133 | { |
---|
1888 | 2134 | Overwrite(Object3D.TRANSFORM); |
---|
1889 | 2135 | } else |
---|
1890 | | - if (event.getSource() == overwriteNameItem) |
---|
| 2136 | + if (source == overwriteNameItem) |
---|
1891 | 2137 | { |
---|
1892 | 2138 | Overwrite(Object3D.NAME); |
---|
1893 | 2139 | } else |
---|
1894 | | - if (event.getSource() == overwriteUVItem) |
---|
| 2140 | + if (source == overwriteUVItem) |
---|
1895 | 2141 | { |
---|
1896 | 2142 | Overwrite(Object3D.UV); |
---|
1897 | 2143 | } else |
---|
1898 | | - if (event.getSource() == overwriteMatItem) |
---|
| 2144 | + if (source == overwriteMatItem) |
---|
1899 | 2145 | { |
---|
1900 | 2146 | /* july 2015 |
---|
1901 | 2147 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
.. | .. |
---|
1915 | 2161 | |
---|
1916 | 2162 | Overwrite(dropAttributes); |
---|
1917 | 2163 | } |
---|
1918 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 2164 | + if (source == overwriteGeoItem) |
---|
1919 | 2165 | { |
---|
1920 | 2166 | Overwrite(Object3D.GEOMETRY); |
---|
1921 | 2167 | // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
.. | .. |
---|
1932 | 2178 | // refreshContents(); |
---|
1933 | 2179 | // } |
---|
1934 | 2180 | } else |
---|
1935 | | - if (event.getSource() == generateMeshItem) |
---|
| 2181 | + if (source == generateMeshItem) |
---|
1936 | 2182 | { |
---|
1937 | 2183 | //if (group.selection.size() == 1) |
---|
1938 | 2184 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1943 | 2189 | ResetModel(); |
---|
1944 | 2190 | refreshContents(); |
---|
1945 | 2191 | } else |
---|
1946 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 2192 | + if (source == extractGeometriesItem) |
---|
1947 | 2193 | { |
---|
1948 | 2194 | boolean one = false; |
---|
1949 | 2195 | |
---|
.. | .. |
---|
1970 | 2216 | ResetModel(); |
---|
1971 | 2217 | refreshContents(); |
---|
1972 | 2218 | } else |
---|
1973 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2219 | + if (source == cloneGeometriesItem) |
---|
1974 | 2220 | { |
---|
1975 | 2221 | boolean one = false; |
---|
1976 | 2222 | |
---|
.. | .. |
---|
1996 | 2242 | ResetModel(); |
---|
1997 | 2243 | refreshContents(); |
---|
1998 | 2244 | } else |
---|
1999 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2245 | + if (source == shareGeometriesItem) |
---|
2000 | 2246 | { |
---|
2001 | 2247 | boolean one = false; |
---|
2002 | 2248 | |
---|
2003 | 2249 | if (group.selection.size() == 1) |
---|
2004 | 2250 | one = true; |
---|
2005 | 2251 | |
---|
| 2252 | + Object3D merge = null; |
---|
| 2253 | + |
---|
2006 | 2254 | Object3D content = new cGroup(); |
---|
2007 | 2255 | |
---|
2008 | 2256 | for (int i=0; i<group.selection.size(); i++) |
---|
2009 | 2257 | { |
---|
2010 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2258 | + merge = new Merge(group.selection.get(i)); |
---|
2011 | 2259 | |
---|
2012 | 2260 | if (one) |
---|
2013 | | - makeSomething(sel, false); |
---|
| 2261 | + makeSomething(merge, false); |
---|
2014 | 2262 | else |
---|
2015 | | - content.addChild(sel); |
---|
| 2263 | + content.addChild(merge); |
---|
2016 | 2264 | } |
---|
2017 | 2265 | |
---|
2018 | 2266 | if (!one) |
---|
2019 | | - makeSomething(content, false); |
---|
2020 | | - |
---|
2021 | | - ResetModel(); |
---|
2022 | | - refreshContents(); |
---|
| 2267 | + makeSomething(content, true); |
---|
| 2268 | + else |
---|
| 2269 | + { |
---|
| 2270 | + ResetModel(); |
---|
| 2271 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2272 | + refreshContents(); |
---|
| 2273 | + } |
---|
2023 | 2274 | } else |
---|
2024 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2275 | + if (source == mergeGeometriesItem) |
---|
2025 | 2276 | { |
---|
2026 | 2277 | boolean one = false; |
---|
2027 | 2278 | |
---|
.. | .. |
---|
2051 | 2302 | ResetModel(); |
---|
2052 | 2303 | refreshContents(); |
---|
2053 | 2304 | } else |
---|
2054 | | - if (event.getSource() == linkverticesItem) |
---|
| 2305 | + if (source == linkverticesItem) |
---|
2055 | 2306 | { |
---|
2056 | 2307 | // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2057 | 2308 | // { |
---|
.. | .. |
---|
2064 | 2315 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2065 | 2316 | // refreshContents(); |
---|
2066 | 2317 | // } |
---|
2067 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2318 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2068 | 2319 | { |
---|
2069 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2320 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2070 | 2321 | |
---|
2071 | 2322 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2072 | 2323 | content = ((cGroup)content).get(0); |
---|
2073 | 2324 | |
---|
2074 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2325 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2075 | 2326 | for (int i=0; i<group.selection.size(); i++) |
---|
2076 | 2327 | { |
---|
2077 | | - boolean random = CameraPane.RANDOM; |
---|
2078 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2328 | + boolean random = CameraPane.SWITCH; |
---|
| 2329 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2079 | 2330 | group.selection.get(i).linkVerticesThis(content); |
---|
2080 | 2331 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2081 | | - CameraPane.RANDOM = random; |
---|
| 2332 | + CameraPane.SWITCH = random; |
---|
2082 | 2333 | } |
---|
2083 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2334 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2084 | 2335 | refreshContents(); |
---|
2085 | 2336 | } |
---|
2086 | 2337 | } else |
---|
2087 | | - if (event.getSource() == resetsupportItem) |
---|
| 2338 | + if (source == resetsupportItem) |
---|
2088 | 2339 | { |
---|
2089 | 2340 | for (int i=0; i<group.selection.size(); i++) |
---|
2090 | 2341 | { |
---|
2091 | | - boolean random = CameraPane.RANDOM; |
---|
2092 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2342 | + boolean random = CameraPane.SWITCH; |
---|
| 2343 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2093 | 2344 | group.selection.get(i).linkVerticesThis(null); |
---|
2094 | | - CameraPane.RANDOM = random; |
---|
| 2345 | + CameraPane.SWITCH = random; |
---|
2095 | 2346 | } |
---|
2096 | 2347 | |
---|
2097 | 2348 | refreshContents(); |
---|
2098 | 2349 | } else |
---|
2099 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2350 | + if (source == relinkverticesItem) |
---|
| 2351 | + { |
---|
| 2352 | + boolean random = CameraPane.SWITCH; |
---|
| 2353 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
| 2354 | + group.selection.RelinkToSupport(); |
---|
| 2355 | + CameraPane.SWITCH = random; |
---|
| 2356 | + |
---|
| 2357 | + refreshContents(); |
---|
| 2358 | + } else |
---|
| 2359 | + if (source == resetreferencesItem) |
---|
2100 | 2360 | { |
---|
2101 | 2361 | for (int i=0; i<group.selection.size(); i++) |
---|
2102 | 2362 | { |
---|
.. | .. |
---|
2105 | 2365 | |
---|
2106 | 2366 | refreshContents(); |
---|
2107 | 2367 | } else |
---|
2108 | | - if (event.getSource() == setMasterItem) |
---|
| 2368 | + if (source == setMasterItem) |
---|
2109 | 2369 | { |
---|
2110 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2370 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2111 | 2371 | { |
---|
2112 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2372 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2113 | 2373 | |
---|
2114 | 2374 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2115 | 2375 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2118 | 2378 | refreshContents(); |
---|
2119 | 2379 | } |
---|
2120 | 2380 | } else |
---|
2121 | | - if (event.getSource() == poseMeshItem) |
---|
| 2381 | + if (source == poseMeshItem) |
---|
2122 | 2382 | { |
---|
2123 | 2383 | if (group.selection.size() == 1) |
---|
2124 | 2384 | { |
---|
2125 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2385 | + if (Grafreed.clipboard.size() == 1) |
---|
2126 | 2386 | { |
---|
2127 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2387 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2128 | 2388 | |
---|
2129 | 2389 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2130 | 2390 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2137 | 2397 | } |
---|
2138 | 2398 | |
---|
2139 | 2399 | } else |
---|
2140 | | - if (event.getSource() == revertMeshItem) |
---|
| 2400 | + if (source == revertMeshItem) |
---|
2141 | 2401 | { |
---|
2142 | 2402 | RevertMeshes(); |
---|
2143 | 2403 | } else |
---|
2144 | | - if (event.getSource() == resetMeshItem) |
---|
| 2404 | + if (source == resetAllItem) |
---|
2145 | 2405 | { |
---|
2146 | 2406 | ResetAll(); |
---|
2147 | 2407 | } else |
---|
2148 | | - if (event.getSource() == stepAllItem) |
---|
| 2408 | + if (source == stepAllItem) |
---|
2149 | 2409 | { |
---|
2150 | 2410 | StepAll(); |
---|
2151 | 2411 | } else |
---|
2152 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2412 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2153 | 2413 | { |
---|
2154 | 2414 | //int indices[] = jList.getSelectedIndices(); |
---|
2155 | 2415 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2157 | 2417 | |
---|
2158 | 2418 | ClearSelection(false); |
---|
2159 | 2419 | } else |
---|
2160 | | - if (event.getSource() == clearAllItem) |
---|
| 2420 | + if (source == clearAllItem) |
---|
2161 | 2421 | { |
---|
2162 | 2422 | ClearSelection(true); |
---|
2163 | 2423 | } else |
---|
2164 | | - if (event.getSource() == grabItem) |
---|
| 2424 | + if (source == grabItem) |
---|
2165 | 2425 | { |
---|
2166 | 2426 | group(new cGroup(), true); |
---|
2167 | 2427 | } else |
---|
2168 | | - if (event.getSource() == frontItem) |
---|
| 2428 | + if (source == hideItem) |
---|
| 2429 | + { |
---|
| 2430 | + group(new HiddenObject()); |
---|
| 2431 | + } else |
---|
| 2432 | + if (source == frontItem) |
---|
2169 | 2433 | { |
---|
2170 | 2434 | front(); |
---|
2171 | 2435 | } else |
---|
2172 | | - if (event.getSource() == backItem) |
---|
| 2436 | + if (source == backItem) |
---|
2173 | 2437 | { |
---|
2174 | 2438 | back(); |
---|
2175 | 2439 | } else |
---|
2176 | | - if (event.getSource() == cameraItem) |
---|
| 2440 | + if (source == cameraItem) |
---|
2177 | 2441 | { |
---|
2178 | 2442 | makeSomething(new Camera()); |
---|
2179 | 2443 | } else |
---|
2180 | | - if (event.getSource() == compositeItem) |
---|
| 2444 | + if (source == compositeItem) |
---|
2181 | 2445 | { |
---|
2182 | 2446 | group(new Composite()); |
---|
2183 | 2447 | } else |
---|
2184 | | - if (event.getSource() == randomItem) |
---|
| 2448 | + if (source == randomItem) |
---|
2185 | 2449 | { |
---|
2186 | 2450 | RandomNode random = new RandomNode(); |
---|
2187 | 2451 | group(random); |
---|
2188 | 2452 | if (random.size() > 0) |
---|
2189 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2453 | + random.name = random.get(0).name + "Switch"; |
---|
2190 | 2454 | } else |
---|
2191 | | - if (event.getSource() == physicsItem) |
---|
| 2455 | + if (source == physicsItem) |
---|
2192 | 2456 | { |
---|
2193 | 2457 | group(new PhysicsNode()); |
---|
2194 | 2458 | } else |
---|
2195 | | - if (event.getSource() == frameselectorItem) |
---|
| 2459 | + if (source == frameselectorItem) |
---|
2196 | 2460 | { |
---|
2197 | 2461 | for (int i=0; i<group.selection.size(); i++) |
---|
2198 | 2462 | { |
---|
.. | .. |
---|
2204 | 2468 | ResetModel(); |
---|
2205 | 2469 | refreshContents(); |
---|
2206 | 2470 | } else |
---|
2207 | | - if (event.getSource() == switchGeoItem) |
---|
| 2471 | + if (source == switchGeoItem) |
---|
2208 | 2472 | { |
---|
2209 | 2473 | for (int i=0; i<group.selection.size(); i++) |
---|
2210 | 2474 | { |
---|
.. | .. |
---|
2216 | 2480 | ResetModel(); |
---|
2217 | 2481 | refreshContents(); |
---|
2218 | 2482 | } else |
---|
2219 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2483 | + if (source == switchTransfoItem) |
---|
2220 | 2484 | { |
---|
2221 | 2485 | for (int i=0; i<group.selection.size(); i++) |
---|
2222 | 2486 | { |
---|
.. | .. |
---|
2228 | 2492 | ResetModel(); |
---|
2229 | 2493 | refreshContents(); |
---|
2230 | 2494 | } else |
---|
2231 | | - if (event.getSource() == morphItem) |
---|
| 2495 | + if (source == morphItem) |
---|
2232 | 2496 | { |
---|
2233 | 2497 | for (int i=0; i<group.selection.size(); i++) |
---|
2234 | 2498 | { |
---|
.. | .. |
---|
2240 | 2504 | ResetModel(); |
---|
2241 | 2505 | refreshContents(); |
---|
2242 | 2506 | } else |
---|
2243 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2507 | + if (source == scriptNodeItem) |
---|
2244 | 2508 | { |
---|
2245 | 2509 | boolean atleastone = false; |
---|
2246 | 2510 | |
---|
.. | .. |
---|
2279 | 2543 | } |
---|
2280 | 2544 | } |
---|
2281 | 2545 | } else |
---|
2282 | | - if (event.getSource() == linkerItem) |
---|
| 2546 | + if (source == linkerItem) |
---|
2283 | 2547 | { |
---|
2284 | 2548 | group(new cLinker()); |
---|
2285 | 2549 | } else |
---|
2286 | | - if (event.getSource() == textureItem) |
---|
| 2550 | + if (source == textureItem) |
---|
2287 | 2551 | { |
---|
2288 | 2552 | group(new TextureNode()); |
---|
2289 | 2553 | } else |
---|
2290 | | - if (event.getSource() == shadowXItem) |
---|
| 2554 | + if (source == billboardItem) |
---|
| 2555 | + { |
---|
| 2556 | + group(new BillboardNode()); |
---|
| 2557 | + } else |
---|
| 2558 | + if (source == shadowXItem) |
---|
2291 | 2559 | { |
---|
2292 | 2560 | CastShadow(0); |
---|
2293 | 2561 | } else |
---|
2294 | | - if (event.getSource() == shadowYItem) |
---|
| 2562 | + if (source == shadowYItem) |
---|
2295 | 2563 | { |
---|
2296 | 2564 | CastShadow(1); |
---|
2297 | 2565 | } else |
---|
2298 | | - if (event.getSource() == shadowZItem) |
---|
| 2566 | + if (source == shadowZItem) |
---|
2299 | 2567 | { |
---|
2300 | 2568 | CastShadow(2); |
---|
2301 | 2569 | } else |
---|
2302 | | - if (event.getSource() == ungroupItem) |
---|
| 2570 | + if (source == ungroupItem) |
---|
2303 | 2571 | { |
---|
2304 | | - ungroup(); |
---|
| 2572 | + //ungroup(); |
---|
| 2573 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2574 | + { |
---|
| 2575 | + Ungroup(group.selection.get(i)); |
---|
| 2576 | + } |
---|
| 2577 | + |
---|
| 2578 | + ClearSelection(false); |
---|
| 2579 | + |
---|
| 2580 | + refreshContents(); |
---|
2305 | 2581 | } else |
---|
2306 | | - if (event.getSource() == genUVItem) |
---|
| 2582 | + if (source == genUVItem) |
---|
2307 | 2583 | { |
---|
2308 | 2584 | GenUV(); |
---|
2309 | 2585 | } else |
---|
2310 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2586 | + if (source == genNormalsCADItem) |
---|
2311 | 2587 | { |
---|
2312 | 2588 | GenNormals(true); |
---|
2313 | 2589 | } else |
---|
2314 | | - if (event.getSource() == genNormalsMESHItem) |
---|
| 2590 | + if (source == genNormalsMESHItem) |
---|
2315 | 2591 | { |
---|
2316 | | - GenNormals(true); // TODO |
---|
| 2592 | + GenNormalsMESH(); |
---|
2317 | 2593 | } else |
---|
2318 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2594 | + if (source == genNormalsORGANItem) |
---|
2319 | 2595 | { |
---|
2320 | 2596 | GenNormals(false); |
---|
2321 | 2597 | } else |
---|
2322 | | - if (event.getSource() == stripifyItem) |
---|
| 2598 | + if (source == genNormalsMINEItem) |
---|
| 2599 | + { |
---|
| 2600 | + GenNormalsMINE(); |
---|
| 2601 | + } else |
---|
| 2602 | + if (source == stripifyItem) |
---|
2323 | 2603 | { |
---|
2324 | 2604 | Stripify(); |
---|
2325 | 2605 | } else |
---|
2326 | | - if (event.getSource() == unstripifyItem) |
---|
| 2606 | + if (source == unstripifyItem) |
---|
2327 | 2607 | { |
---|
2328 | 2608 | Unstripify(); |
---|
2329 | 2609 | } else |
---|
2330 | | - if (event.getSource() == trimItem) |
---|
| 2610 | + if (source == trimItem) |
---|
2331 | 2611 | { |
---|
2332 | 2612 | Trim(); |
---|
2333 | 2613 | } else |
---|
2334 | | - if (event.getSource() == untrimItem) |
---|
| 2614 | + if (source == untrimItem) |
---|
2335 | 2615 | { |
---|
2336 | 2616 | Untrim(); |
---|
2337 | 2617 | } else |
---|
2338 | | - if (event.getSource() == clearColorsItem) |
---|
| 2618 | + if (source == clearColorsItem) |
---|
2339 | 2619 | { |
---|
2340 | 2620 | ClearColors(); |
---|
2341 | 2621 | } else |
---|
2342 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2622 | + if (source == clearMaterialsItem) |
---|
2343 | 2623 | { |
---|
2344 | 2624 | ClearMaterials(); |
---|
2345 | 2625 | } else |
---|
2346 | | - if (event.getSource() == liveleavesItem) |
---|
| 2626 | + if (source == liveleavesItem) |
---|
2347 | 2627 | { |
---|
2348 | 2628 | LiveLeaves(true); |
---|
2349 | 2629 | } else |
---|
2350 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2630 | + if (source == unliveleavesItem) |
---|
2351 | 2631 | { |
---|
2352 | 2632 | LiveLeaves(false); |
---|
2353 | 2633 | } else |
---|
2354 | | - if (event.getSource() == supportleavesItem) |
---|
| 2634 | + if (source == supportleavesItem) |
---|
2355 | 2635 | { |
---|
2356 | 2636 | SupportLeaves(true); |
---|
2357 | 2637 | } else |
---|
2358 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2638 | + if (source == unsupportleavesItem) |
---|
2359 | 2639 | { |
---|
2360 | 2640 | SupportLeaves(false); |
---|
2361 | 2641 | } else |
---|
2362 | | - if (event.getSource() == hideleavesItem) |
---|
| 2642 | + if (source == hideleavesItem) |
---|
2363 | 2643 | { |
---|
2364 | 2644 | HideLeaves(true); |
---|
2365 | 2645 | } else |
---|
2366 | | - if (event.getSource() == showleavesItem) |
---|
| 2646 | + if (source == showleavesItem) |
---|
2367 | 2647 | { |
---|
2368 | 2648 | HideLeaves(false); |
---|
2369 | 2649 | } else |
---|
2370 | | - if (event.getSource() == markleavesItem) |
---|
| 2650 | + if (source == markleavesItem) |
---|
2371 | 2651 | { |
---|
2372 | 2652 | MarkLeaves(true); |
---|
2373 | 2653 | } else |
---|
2374 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2654 | + if (source == unmarkleavesItem) |
---|
2375 | 2655 | { |
---|
2376 | 2656 | MarkLeaves(false); |
---|
2377 | 2657 | } else |
---|
2378 | | - if (event.getSource() == flipVItem) |
---|
| 2658 | + if (source == rewindleavesItem) |
---|
| 2659 | + { |
---|
| 2660 | + RewindLeaves(true); |
---|
| 2661 | + } else |
---|
| 2662 | + if (source == unrewindleavesItem) |
---|
| 2663 | + { |
---|
| 2664 | + RewindLeaves(false); |
---|
| 2665 | + } else |
---|
| 2666 | + if (source == randomleavesItem) |
---|
| 2667 | + { |
---|
| 2668 | + RandomLeaves(true); |
---|
| 2669 | + } else |
---|
| 2670 | + if (source == unrandomleavesItem) |
---|
| 2671 | + { |
---|
| 2672 | + RandomLeaves(false); |
---|
| 2673 | + } else |
---|
| 2674 | + if (source == flipVItem) |
---|
2379 | 2675 | { |
---|
2380 | 2676 | FlipV(true); |
---|
2381 | 2677 | } else |
---|
2382 | | - if (event.getSource() == unflipVItem) |
---|
| 2678 | + if (source == unflipVItem) |
---|
2383 | 2679 | { |
---|
2384 | 2680 | FlipV(false); |
---|
2385 | 2681 | } else |
---|
2386 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2682 | + if (source == lowTexturesItem) |
---|
2387 | 2683 | { |
---|
2388 | 2684 | SetTexRes(0); |
---|
2389 | 2685 | } else |
---|
2390 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2686 | + if (source == normalTexturesItem) |
---|
2391 | 2687 | { |
---|
2392 | 2688 | SetTexRes(1); |
---|
2393 | 2689 | } else |
---|
2394 | | - if (event.getSource() == highTexturesItem) |
---|
| 2690 | + if (source == highTexturesItem) |
---|
2395 | 2691 | { |
---|
2396 | 2692 | SetTexRes(2); |
---|
2397 | 2693 | } else |
---|
2398 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2694 | + if (source == veryhighTexturesItem) |
---|
2399 | 2695 | { |
---|
2400 | 2696 | SetTexRes(3); |
---|
2401 | 2697 | } else |
---|
2402 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2698 | + if (source == maxTexturesItem) |
---|
2403 | 2699 | { |
---|
2404 | 2700 | SetTexRes(4); |
---|
2405 | 2701 | } else |
---|
2406 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2702 | + if (source == panoTexturesItem) |
---|
2407 | 2703 | { |
---|
2408 | 2704 | SetTexRes(5); |
---|
2409 | 2705 | } else |
---|
2410 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2706 | + if (source == reverseNormalsItem) |
---|
2411 | 2707 | { |
---|
2412 | 2708 | ReverseNormals(); |
---|
2413 | 2709 | } else |
---|
2414 | | - if (event.getSource() == parseverticesItem) |
---|
| 2710 | + if (source == parseverticesItem) |
---|
2415 | 2711 | { |
---|
2416 | 2712 | ParseVertices(); |
---|
2417 | 2713 | } else |
---|
2418 | | - if (event.getSource() == textureFieldItem) |
---|
| 2714 | + if (source == textureFieldItem) |
---|
2419 | 2715 | { |
---|
2420 | 2716 | TextureVertices(); |
---|
2421 | 2717 | } else |
---|
2422 | | - if (event.getSource() == alignItem) |
---|
| 2718 | + if (source == alignItem) |
---|
2423 | 2719 | { |
---|
2424 | 2720 | Align(); |
---|
2425 | 2721 | } else |
---|
2426 | | - if (event.getSource() == mirrorItem) |
---|
| 2722 | + if (source == mirrorItem) |
---|
2427 | 2723 | { |
---|
2428 | 2724 | MirrorPoses(); |
---|
2429 | 2725 | } else |
---|
2430 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2726 | + if (source == reduceMorphItem) |
---|
2431 | 2727 | { |
---|
2432 | 2728 | MeshReduction(false); |
---|
2433 | 2729 | } else |
---|
2434 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2730 | + if (source == reduce34MorphItem) |
---|
2435 | 2731 | { |
---|
2436 | 2732 | MeshReduction(true); |
---|
2437 | 2733 | } else |
---|
2438 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2734 | + if (source == reverseTrianglesItem) |
---|
2439 | 2735 | { |
---|
2440 | 2736 | ReverseTriangles(); |
---|
2441 | 2737 | } else |
---|
2442 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2738 | + if (source == reduceMeshItem) |
---|
2443 | 2739 | { |
---|
2444 | 2740 | ReduceMesh(false); |
---|
2445 | 2741 | } else |
---|
2446 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2742 | + if (source == reduce34MeshItem) |
---|
2447 | 2743 | { |
---|
2448 | 2744 | ReduceMesh(true); |
---|
2449 | 2745 | } else |
---|
2450 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2746 | + if (source == increaseMeshItem) |
---|
2451 | 2747 | { |
---|
2452 | 2748 | IncreaseMesh(); |
---|
2453 | 2749 | } else |
---|
2454 | | - if (event.getSource() == clipMeshItem) |
---|
| 2750 | + if (source == clipMeshItem) |
---|
2455 | 2751 | { |
---|
2456 | 2752 | ClipMesh(); |
---|
2457 | 2753 | } else |
---|
2458 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2754 | + if (source == smoothMeshItem) |
---|
2459 | 2755 | { |
---|
2460 | 2756 | SmoothMesh(); |
---|
2461 | 2757 | } else |
---|
2462 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2758 | + if (source == transformGeometryItem) |
---|
2463 | 2759 | { |
---|
2464 | 2760 | TransformGeometry(); |
---|
2465 | 2761 | } else |
---|
2466 | | - if (event.getSource() == resetTransformItem) |
---|
| 2762 | + if (source == transformChildrenItem) |
---|
| 2763 | + { |
---|
| 2764 | + TransformChildren(); |
---|
| 2765 | + } else |
---|
| 2766 | + if (source == resetTransformItem) |
---|
2467 | 2767 | { |
---|
2468 | 2768 | ResetTransform(); |
---|
2469 | 2769 | } else |
---|
2470 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2770 | + if (source == resetCentroidItem) |
---|
2471 | 2771 | { |
---|
2472 | | - ResetCentroid(); |
---|
| 2772 | + ResetCentroid(true); |
---|
2473 | 2773 | } else |
---|
2474 | | - if (event.getSource() == resetParentItem) |
---|
| 2774 | + if (source == resetCentroidXZItem) |
---|
| 2775 | + { |
---|
| 2776 | + ResetCentroid(false); |
---|
| 2777 | + } else |
---|
| 2778 | + if (source == resetParentItem) |
---|
2475 | 2779 | { |
---|
2476 | 2780 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2477 | 2781 | { |
---|
.. | .. |
---|
2481 | 2785 | |
---|
2482 | 2786 | refreshContents(); |
---|
2483 | 2787 | } else |
---|
2484 | | - if (event.getSource() == repairParentItem) |
---|
| 2788 | + if (source == repairParentItem) |
---|
2485 | 2789 | { |
---|
2486 | 2790 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2487 | 2791 | { |
---|
.. | .. |
---|
2495 | 2799 | |
---|
2496 | 2800 | refreshContents(); |
---|
2497 | 2801 | } else |
---|
2498 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2802 | + if (source == repairShadowItem) |
---|
| 2803 | + { |
---|
| 2804 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2805 | + { |
---|
| 2806 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2807 | + obj.RepairShadow(); |
---|
| 2808 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2809 | +// { |
---|
| 2810 | +// obj.get(i).parent = obj; |
---|
| 2811 | +// } |
---|
| 2812 | + } |
---|
| 2813 | + |
---|
| 2814 | + refreshContents(); |
---|
| 2815 | + } else |
---|
| 2816 | + if (source == sortbysizeItem) |
---|
2499 | 2817 | { |
---|
2500 | 2818 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2501 | 2819 | { |
---|
.. | .. |
---|
2507 | 2825 | ResetModel(); |
---|
2508 | 2826 | refreshContents(); |
---|
2509 | 2827 | } else |
---|
2510 | | - if (event.getSource() == sortbynameItem) |
---|
| 2828 | + if (source == sortbynameItem) |
---|
2511 | 2829 | { |
---|
2512 | 2830 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2513 | 2831 | { |
---|
.. | .. |
---|
2519 | 2837 | ResetModel(); |
---|
2520 | 2838 | refreshContents(); |
---|
2521 | 2839 | } else |
---|
2522 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2840 | + if (source == attachPigmentItem) |
---|
2523 | 2841 | { |
---|
2524 | 2842 | String texture = GetFile("Attach pigment"); |
---|
2525 | 2843 | Object3D obj; |
---|
.. | .. |
---|
2531 | 2849 | |
---|
2532 | 2850 | refreshContents(); |
---|
2533 | 2851 | } else |
---|
2534 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2852 | + if (source == detachPigmentItem) |
---|
2535 | 2853 | { |
---|
2536 | 2854 | Object3D obj; |
---|
2537 | 2855 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2542 | 2860 | |
---|
2543 | 2861 | refreshContents(); |
---|
2544 | 2862 | } else |
---|
2545 | | - if (event.getSource() == attachBumpItem) |
---|
| 2863 | + if (source == attachBumpItem) |
---|
2546 | 2864 | { |
---|
2547 | 2865 | String texture = GetFile("Attach bump"); |
---|
2548 | 2866 | Object3D obj; |
---|
.. | .. |
---|
2554 | 2872 | |
---|
2555 | 2873 | refreshContents(); |
---|
2556 | 2874 | } else |
---|
2557 | | - if (event.getSource() == detachBumpItem) |
---|
| 2875 | + if (source == detachBumpItem) |
---|
2558 | 2876 | { |
---|
2559 | 2877 | Object3D obj; |
---|
2560 | 2878 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2565 | 2883 | |
---|
2566 | 2884 | refreshContents(); |
---|
2567 | 2885 | } else |
---|
2568 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2886 | + if (source == pigmentBumpItem) |
---|
2569 | 2887 | { |
---|
2570 | 2888 | Object3D obj; |
---|
2571 | 2889 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2576 | 2894 | |
---|
2577 | 2895 | refreshContents(); |
---|
2578 | 2896 | } else |
---|
2579 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2897 | + if (source == flashSelectionButton) |
---|
2580 | 2898 | { |
---|
2581 | 2899 | CameraPane.flash = true; |
---|
2582 | 2900 | refreshContents(); |
---|
2583 | 2901 | } else |
---|
2584 | | - if (event.getSource() == oneButton) |
---|
| 2902 | + if (source == oneButton) |
---|
2585 | 2903 | { |
---|
2586 | 2904 | } else |
---|
2587 | | - if (event.getSource() == twoButton) |
---|
| 2905 | + if (source == twoButton) |
---|
2588 | 2906 | { |
---|
2589 | 2907 | radio.layout = twoButton; |
---|
2590 | 2908 | // bug |
---|
2591 | 2909 | //gridPanel.setDividerLocation(1.0); |
---|
2592 | 2910 | //bigPanel.setDividerLocation(0.0); |
---|
2593 | | - bigThree.remove(jtp); |
---|
2594 | | - bigThree.remove(cameraPanel); |
---|
2595 | | - bigThree.remove(XYZPanel); |
---|
2596 | | - aWindowConstraints.gridx = 0; |
---|
2597 | | - aWindowConstraints.gridy = 0; |
---|
2598 | | - aWindowConstraints.gridwidth = 1; |
---|
2599 | | - // aConstraints.gridheight = 3; |
---|
2600 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2601 | | - aWindowConstraints.weightx = 0; |
---|
2602 | | - aWindowConstraints.weighty = 1; |
---|
2603 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2604 | | - aWindowConstraints.weightx = 1; |
---|
2605 | | - aWindowConstraints.gridwidth = 3; |
---|
2606 | | - // aConstraints.gridheight = 3; |
---|
2607 | | - aWindowConstraints.gridx = 1; |
---|
2608 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2609 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2610 | | - aWindowConstraints.weightx = 0; |
---|
2611 | | - aWindowConstraints.gridx = 4; |
---|
2612 | | - aWindowConstraints.gridwidth = 1; |
---|
2613 | | - // aConstraints.gridheight = 3; |
---|
2614 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2615 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2616 | | - bigThree.revalidate(); |
---|
| 2911 | +// bigThree.remove(scenePanel); |
---|
| 2912 | +// bigThree.remove(centralPanel); |
---|
| 2913 | +// bigThree.remove(XYZPanel); |
---|
| 2914 | +// aWindowConstraints.gridx = 0; |
---|
| 2915 | +// aWindowConstraints.gridy = 0; |
---|
| 2916 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2917 | +// // aConstraints.gridheight = 3; |
---|
| 2918 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2919 | +// aWindowConstraints.weightx = 0; |
---|
| 2920 | +// aWindowConstraints.weighty = 1; |
---|
| 2921 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2922 | +// aWindowConstraints.weightx = 1; |
---|
| 2923 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2924 | +// // aConstraints.gridheight = 3; |
---|
| 2925 | +// aWindowConstraints.gridx = 1; |
---|
| 2926 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2927 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2928 | +// aWindowConstraints.weightx = 0; |
---|
| 2929 | +// aWindowConstraints.gridx = 4; |
---|
| 2930 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2931 | +// // aConstraints.gridheight = 3; |
---|
| 2932 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2933 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2934 | +// scenePanel.setVisible(false); |
---|
| 2935 | +// centralPanel.setVisible(true); |
---|
| 2936 | +// XYZPanel.setVisible(false); |
---|
| 2937 | + bigThree.ClearUI(); |
---|
| 2938 | + bigThree.add(centralPanel); |
---|
| 2939 | + bigThree.FlushUI(); |
---|
| 2940 | + |
---|
| 2941 | + cameraView.requestFocusInWindow(); |
---|
| 2942 | + |
---|
| 2943 | +// refreshContents(true); |
---|
| 2944 | +// |
---|
| 2945 | +// try |
---|
| 2946 | +// { |
---|
| 2947 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 2948 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 2949 | +// bot.mouseMove(100, 100); |
---|
| 2950 | +// bot.mousePress(mask); |
---|
| 2951 | +// bot.mouseRelease(mask); |
---|
| 2952 | +// } |
---|
| 2953 | +// catch (Exception e) |
---|
| 2954 | +// { |
---|
| 2955 | +// |
---|
| 2956 | +// } |
---|
| 2957 | + |
---|
2617 | 2958 | } else |
---|
2618 | | - if (event.getSource() == threeButton) |
---|
| 2959 | + if (source == threeButton) |
---|
2619 | 2960 | { |
---|
2620 | 2961 | radio.layout = threeButton; |
---|
2621 | | - bigThree.remove(jtp); |
---|
2622 | | - bigThree.remove(cameraPanel); |
---|
2623 | | - bigThree.remove(XYZPanel); |
---|
2624 | | - aWindowConstraints.gridx = 0; |
---|
2625 | | - aWindowConstraints.gridy = 0; |
---|
2626 | | - aWindowConstraints.gridwidth = 1; |
---|
2627 | | - // aConstraints.gridheight = 3; |
---|
2628 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2629 | | - aWindowConstraints.weightx = 0; |
---|
2630 | | - aWindowConstraints.weighty = 1; |
---|
2631 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2632 | | - aWindowConstraints.weightx = 1; |
---|
2633 | | - aWindowConstraints.gridwidth = 3; |
---|
2634 | | - // aConstraints.gridheight = 3; |
---|
2635 | | - aWindowConstraints.gridx = 1; |
---|
2636 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2637 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2638 | | - aWindowConstraints.weightx = 0; |
---|
2639 | | - aWindowConstraints.gridx = 4; |
---|
2640 | | - aWindowConstraints.gridwidth = 1; |
---|
2641 | | - // aConstraints.gridheight = 3; |
---|
2642 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2643 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2644 | | - bigThree.revalidate(); |
---|
| 2962 | + |
---|
| 2963 | +// bigThree.remove(scenePanel); |
---|
| 2964 | +// bigThree.remove(centralPanel); |
---|
| 2965 | +// bigThree.remove(XYZPanel); |
---|
| 2966 | +// aWindowConstraints.gridx = 0; |
---|
| 2967 | +// aWindowConstraints.gridy = 0; |
---|
| 2968 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2969 | +// // aConstraints.gridheight = 3; |
---|
| 2970 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2971 | +// aWindowConstraints.weightx = 0; |
---|
| 2972 | +// aWindowConstraints.weighty = 1; |
---|
| 2973 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2974 | +// aWindowConstraints.weightx = 1; |
---|
| 2975 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2976 | +// // aConstraints.gridheight = 3; |
---|
| 2977 | +// aWindowConstraints.gridx = 1; |
---|
| 2978 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2979 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2980 | +// aWindowConstraints.weightx = 0; |
---|
| 2981 | +// aWindowConstraints.gridx = 4; |
---|
| 2982 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2983 | +// // aConstraints.gridheight = 3; |
---|
| 2984 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2985 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2986 | +// bigThree.validate(); |
---|
| 2987 | +// scenePanel.setVisible(false); |
---|
| 2988 | +// centralPanel.setVisible(true); |
---|
| 2989 | +// XYZPanel.setVisible(true); |
---|
| 2990 | + bigThree.ClearUI(); |
---|
| 2991 | + bigThree.add(centralPanel); |
---|
| 2992 | + bigThree.add(XYZPanel); |
---|
| 2993 | + bigThree.FlushUI(); |
---|
| 2994 | + |
---|
| 2995 | + cameraView.requestFocusInWindow(); |
---|
2645 | 2996 | } else |
---|
2646 | | - if (event.getSource() == fourButton) |
---|
| 2997 | + if (source == fourButton) |
---|
2647 | 2998 | { |
---|
2648 | 2999 | radio.layout = fourButton; |
---|
2649 | | - bigThree.remove(jtp); |
---|
2650 | | - bigThree.remove(cameraPanel); |
---|
2651 | | - bigThree.remove(XYZPanel); |
---|
2652 | | - aWindowConstraints.gridx = 0; |
---|
2653 | | - aWindowConstraints.gridy = 0; |
---|
2654 | | - aWindowConstraints.gridwidth = 1; |
---|
2655 | | - // aWindowConstraints.gridheight = 3; |
---|
2656 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2657 | | - aWindowConstraints.weightx = 1; |
---|
2658 | | - aWindowConstraints.weighty = 1; |
---|
2659 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2660 | | - aWindowConstraints.weightx = 1; |
---|
2661 | | - aWindowConstraints.gridwidth = 3; |
---|
2662 | | - // aConstraints.gridheight = 3; |
---|
2663 | | - aWindowConstraints.gridx = 1; |
---|
2664 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2665 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2666 | | - aWindowConstraints.weightx = 0; |
---|
2667 | | - aWindowConstraints.gridx = 4; |
---|
2668 | | - aWindowConstraints.gridwidth = 1; |
---|
2669 | | - // aWindowConstraints.gridheight = 3; |
---|
2670 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2671 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2672 | | - bigThree.revalidate(); |
---|
| 3000 | + |
---|
| 3001 | +// bigThree.remove(scenePanel); |
---|
| 3002 | +// bigThree.remove(centralPanel); |
---|
| 3003 | +// bigThree.remove(XYZPanel); |
---|
| 3004 | +// aWindowConstraints.gridx = 0; |
---|
| 3005 | +// aWindowConstraints.gridy = 0; |
---|
| 3006 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3007 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3008 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3009 | +// aWindowConstraints.weightx = 1; |
---|
| 3010 | +// aWindowConstraints.weighty = 1; |
---|
| 3011 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 3012 | +// aWindowConstraints.weightx = 1; |
---|
| 3013 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3014 | +// // aConstraints.gridheight = 3; |
---|
| 3015 | +// aWindowConstraints.gridx = 1; |
---|
| 3016 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3017 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 3018 | +// aWindowConstraints.weightx = 0; |
---|
| 3019 | +// aWindowConstraints.gridx = 4; |
---|
| 3020 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3021 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3022 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3023 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 3024 | +// bigThree.validate(); |
---|
| 3025 | +// scenePanel.setVisible(true); |
---|
| 3026 | +// centralPanel.setVisible(false); |
---|
| 3027 | +// XYZPanel.setVisible(false); |
---|
| 3028 | + bigThree.ClearUI(); |
---|
| 3029 | + bigThree.add(scenePanel); |
---|
| 3030 | + bigThree.FlushUI(); |
---|
| 3031 | + |
---|
| 3032 | + cameraView.requestFocusInWindow(); |
---|
2673 | 3033 | } else |
---|
2674 | | - if (event.getSource() == sixButton) |
---|
| 3034 | + if (source == sixButton) |
---|
2675 | 3035 | { |
---|
2676 | 3036 | radio.layout = sixButton; |
---|
2677 | | - bigThree.remove(jtp); |
---|
2678 | | - bigThree.remove(cameraPanel); |
---|
2679 | | - bigThree.remove(XYZPanel); |
---|
2680 | | - aWindowConstraints.gridx = 0; |
---|
2681 | | - aWindowConstraints.gridy = 0; |
---|
2682 | | - aWindowConstraints.gridwidth = 1; |
---|
2683 | | - // aConstraints.gridheight = 3; |
---|
2684 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2685 | | - aWindowConstraints.weightx = 0; |
---|
2686 | | - aWindowConstraints.weighty = 1; |
---|
2687 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2688 | | - aWindowConstraints.weightx = 1; |
---|
2689 | | - aWindowConstraints.gridwidth = 3; |
---|
2690 | | - // aWindowConstraints.gridheight = 3; |
---|
2691 | | - aWindowConstraints.gridx = 1; |
---|
2692 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2693 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2694 | | - aWindowConstraints.weightx = 0; |
---|
2695 | | - aWindowConstraints.gridx = 4; |
---|
2696 | | - aWindowConstraints.gridwidth = 1; |
---|
2697 | | - // aWindowConstraints.gridheight = 3; |
---|
2698 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2699 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2700 | | - bigThree.revalidate(); |
---|
| 3037 | + |
---|
| 3038 | +// bigThree.remove(scenePanel); |
---|
| 3039 | +// bigThree.remove(centralPanel); |
---|
| 3040 | +// bigThree.remove(XYZPanel); |
---|
| 3041 | +// aWindowConstraints.gridx = 0; |
---|
| 3042 | +// aWindowConstraints.gridy = 0; |
---|
| 3043 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3044 | +// // aConstraints.gridheight = 3; |
---|
| 3045 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3046 | +// aWindowConstraints.weightx = 0; |
---|
| 3047 | +// aWindowConstraints.weighty = 1; |
---|
| 3048 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 3049 | +// aWindowConstraints.weightx = 1; |
---|
| 3050 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3051 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3052 | +// aWindowConstraints.gridx = 1; |
---|
| 3053 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3054 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 3055 | +// aWindowConstraints.weightx = 0; |
---|
| 3056 | +// aWindowConstraints.gridx = 4; |
---|
| 3057 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3058 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3059 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3060 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 3061 | +// bigThree.validate(); |
---|
| 3062 | +// scenePanel.setVisible(true); |
---|
| 3063 | +// centralPanel.setVisible(true); |
---|
| 3064 | +// XYZPanel.setVisible(false); |
---|
| 3065 | + bigThree.ClearUI(); |
---|
| 3066 | + bigThree.add(scenePanel); |
---|
| 3067 | + bigThree.add(centralPanel); |
---|
| 3068 | + bigThree.FlushUI(); |
---|
| 3069 | + |
---|
| 3070 | + cameraView.requestFocusInWindow(); |
---|
2701 | 3071 | } else |
---|
2702 | | - if (event.getSource() == sevenButton) |
---|
| 3072 | + if (source == sevenButton) |
---|
2703 | 3073 | { |
---|
2704 | 3074 | radio.layout = sevenButton; |
---|
2705 | | - bigThree.remove(jtp); |
---|
2706 | | - bigThree.remove(cameraPanel); |
---|
2707 | | - bigThree.remove(XYZPanel); |
---|
2708 | | - aWindowConstraints.gridx = 0; |
---|
2709 | | - aWindowConstraints.gridy = 0; |
---|
2710 | | - aWindowConstraints.gridwidth = 1; |
---|
2711 | | - // aWindowConstraints.gridheight = 3; |
---|
2712 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2713 | | - aWindowConstraints.weightx = 0; |
---|
2714 | | - aWindowConstraints.weighty = 1; |
---|
2715 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2716 | | - aWindowConstraints.weightx = 1; |
---|
2717 | | - aWindowConstraints.gridwidth = 3; |
---|
2718 | | - // aWindowConstraints.gridheight = 3; |
---|
2719 | | - aWindowConstraints.gridx = 1; |
---|
2720 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2721 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2722 | | - aWindowConstraints.weightx = 0; |
---|
2723 | | - aWindowConstraints.gridx = 4; |
---|
2724 | | - aWindowConstraints.gridwidth = 1; |
---|
2725 | | - // aConstraints.gridheight = 3; |
---|
2726 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2727 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2728 | | - bigThree.revalidate(); |
---|
| 3075 | + |
---|
| 3076 | +// bigThree.remove(scenePanel); |
---|
| 3077 | +// bigThree.remove(centralPanel); |
---|
| 3078 | +// bigThree.remove(XYZPanel); |
---|
| 3079 | +// aWindowConstraints.gridx = 0; |
---|
| 3080 | +// aWindowConstraints.gridy = 0; |
---|
| 3081 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3082 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3083 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3084 | +// aWindowConstraints.weightx = 0; |
---|
| 3085 | +// aWindowConstraints.weighty = 1; |
---|
| 3086 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 3087 | +// aWindowConstraints.weightx = 1; |
---|
| 3088 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3089 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3090 | +// aWindowConstraints.gridx = 1; |
---|
| 3091 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3092 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 3093 | +// aWindowConstraints.weightx = 0; |
---|
| 3094 | +// aWindowConstraints.gridx = 4; |
---|
| 3095 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3096 | +// // aConstraints.gridheight = 3; |
---|
| 3097 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3098 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 3099 | +// bigThree.validate(); |
---|
| 3100 | +// scenePanel.setVisible(true); |
---|
| 3101 | +// centralPanel.setVisible(true); |
---|
| 3102 | +// XYZPanel.setVisible(true); |
---|
| 3103 | + bigThree.ClearUI(); |
---|
| 3104 | + bigThree.add(scenePanel); |
---|
| 3105 | + bigThree.add(centralPanel); |
---|
| 3106 | + bigThree.add(XYZPanel); |
---|
| 3107 | + bigThree.FlushUI(); |
---|
| 3108 | + |
---|
| 3109 | + cameraView.requestFocusInWindow(); |
---|
2729 | 3110 | } else |
---|
2730 | | - if (event.getSource() == rootButton) |
---|
| 3111 | + if (source == rootButton) |
---|
2731 | 3112 | { |
---|
2732 | 3113 | Object3D obj; |
---|
2733 | 3114 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2737 | 3118 | EditObject(obj); |
---|
2738 | 3119 | } |
---|
2739 | 3120 | |
---|
| 3121 | + cameraView.requestFocusInWindow(); |
---|
2740 | 3122 | refreshContents(true); |
---|
2741 | 3123 | } else |
---|
2742 | | - if (event.getSource() == closeButton) |
---|
| 3124 | + if (source == closeButton) |
---|
2743 | 3125 | { |
---|
2744 | 3126 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2745 | 3127 | cRadio ab; |
---|
.. | .. |
---|
2758 | 3140 | break; |
---|
2759 | 3141 | } |
---|
2760 | 3142 | } |
---|
| 3143 | + |
---|
| 3144 | + cameraView.requestFocusInWindow(); |
---|
2761 | 3145 | refreshContents(true); |
---|
2762 | 3146 | } else |
---|
2763 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 3147 | + if (source == editItem || source == editButton) |
---|
2764 | 3148 | { |
---|
2765 | 3149 | EditSelection(false); |
---|
2766 | 3150 | } else |
---|
2767 | | - if (event.getSource() == uneditButton) |
---|
| 3151 | + if (source == uneditButton) |
---|
2768 | 3152 | { |
---|
2769 | 3153 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2770 | 3154 | { |
---|
.. | .. |
---|
2774 | 3158 | child.CloseUI(); |
---|
2775 | 3159 | listUI.remove(child); |
---|
2776 | 3160 | |
---|
2777 | | - child.editWindow = null; // ??????????? |
---|
| 3161 | + //child.editWindow = null; // ??????????? |
---|
2778 | 3162 | } |
---|
2779 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 3163 | + objEditor.ctrlPanel.FlushUI(); |
---|
2780 | 3164 | //objEditor.jTree.clearSelection(); |
---|
2781 | 3165 | //objEditor.ResetSliders(); |
---|
2782 | 3166 | refreshContents(true); |
---|
2783 | 3167 | } else |
---|
2784 | | - if (event.getSource() == clearPanelButton) |
---|
| 3168 | + if (source == clearPanelButton) |
---|
2785 | 3169 | { |
---|
2786 | 3170 | assert(copy == group); |
---|
2787 | 3171 | //copy.ClearUI(); |
---|
.. | .. |
---|
2792 | 3176 | listUI.clear(); |
---|
2793 | 3177 | refreshContents(true); |
---|
2794 | 3178 | } else |
---|
2795 | | - if (event.getSource() == allParamsButton) |
---|
| 3179 | + if (source == allParamsButton) |
---|
2796 | 3180 | { |
---|
2797 | 3181 | assert(copy == group); |
---|
2798 | 3182 | |
---|
.. | .. |
---|
2813 | 3197 | |
---|
2814 | 3198 | refreshContents(true); |
---|
2815 | 3199 | } else |
---|
2816 | | - if (event.getSource() == unselectButton) |
---|
| 3200 | + if (source == unselectButton) |
---|
2817 | 3201 | { |
---|
2818 | 3202 | objEditor.jTree.clearSelection(); |
---|
2819 | 3203 | // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2820 | 3204 | objEditor.ResetSliders(); |
---|
2821 | 3205 | refreshContents(true); |
---|
2822 | 3206 | } else |
---|
2823 | | - if(event.getSource() instanceof cRadio) |
---|
| 3207 | + if(source instanceof cRadio) |
---|
2824 | 3208 | { |
---|
2825 | 3209 | group.parent = keepparent; |
---|
2826 | 3210 | group.attributes = 0; |
---|
2827 | 3211 | //group.editWindow = null; |
---|
2828 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 3212 | + /*cRadio*/ radio = (cRadio)source; |
---|
2829 | 3213 | Object3D obj = radio.GetObject(); |
---|
2830 | 3214 | System.out.println("Edit " + obj); |
---|
2831 | 3215 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2845 | 3229 | } |
---|
2846 | 3230 | |
---|
2847 | 3231 | copy = group; |
---|
2848 | | - //CameraPane.theRenderer.object = group; |
---|
| 3232 | + //Globals.theRenderer.object = group; |
---|
2849 | 3233 | if(!useclient) |
---|
2850 | 3234 | { |
---|
2851 | 3235 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2854 | 3238 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2855 | 3239 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2856 | 3240 | cameraView.object = group; |
---|
2857 | | - cameraView.lighttouched = true; |
---|
| 3241 | + //cameraView.lighttouched = true; |
---|
| 3242 | + Globals.lighttouched = true; |
---|
2858 | 3243 | topView.object = group; |
---|
2859 | 3244 | frontView.object = group; |
---|
2860 | 3245 | sideView.object = group; |
---|
2861 | 3246 | } |
---|
2862 | | - group.editWindow = this; |
---|
| 3247 | + |
---|
| 3248 | +// fix "+" issue |
---|
| 3249 | + //group.editWindow = this; |
---|
| 3250 | + |
---|
2863 | 3251 | /* |
---|
2864 | 3252 | currentLayout = radio.layout; |
---|
2865 | 3253 | if (currentLayout == null) |
---|
.. | .. |
---|
2871 | 3259 | //group.parent = null; // ROOT |
---|
2872 | 3260 | //group.attributes = -1; |
---|
2873 | 3261 | ResetModel(); |
---|
| 3262 | + |
---|
| 3263 | + cameraView.requestFocusInWindow(); |
---|
2874 | 3264 | refreshContents(true); |
---|
2875 | | - } |
---|
| 3265 | + } else if (event.getSource() == editCameraItem) |
---|
| 3266 | + { |
---|
| 3267 | + cameraView.ProtectCamera(); |
---|
| 3268 | + cameraView.repaint(); |
---|
| 3269 | + return; |
---|
| 3270 | + } else if (event.getSource() == revertCameraItem) |
---|
| 3271 | + { |
---|
| 3272 | + cameraView.RevertCamera(); |
---|
| 3273 | + cameraView.repaint(); |
---|
| 3274 | + return; |
---|
| 3275 | + // } else if (event.getSource() == textureButton) |
---|
| 3276 | + // { |
---|
| 3277 | + // return; // true; |
---|
| 3278 | + } |
---|
2876 | 3279 | else |
---|
2877 | 3280 | { |
---|
2878 | 3281 | //return super.action(event, arg); |
---|
.. | .. |
---|
2881 | 3284 | } |
---|
2882 | 3285 | |
---|
2883 | 3286 | boolean useclient = false; |
---|
2884 | | - cRadio radio; |
---|
2885 | 3287 | |
---|
2886 | 3288 | void ToggleRoot() |
---|
2887 | 3289 | { |
---|
.. | .. |
---|
2890 | 3292 | if (useclient) |
---|
2891 | 3293 | { |
---|
2892 | 3294 | cameraView.object = client; |
---|
2893 | | - cameraView.lighttouched = true; |
---|
| 3295 | + Globals.lighttouched = true; |
---|
2894 | 3296 | //topView.object = client; |
---|
2895 | 3297 | //frontView.object = client; |
---|
2896 | 3298 | //sideView.object = client; |
---|
.. | .. |
---|
2898 | 3300 | else |
---|
2899 | 3301 | { |
---|
2900 | 3302 | cameraView.object = group; |
---|
2901 | | - cameraView.lighttouched = true; |
---|
| 3303 | + Globals.lighttouched = true; |
---|
2902 | 3304 | //topView.object = group; |
---|
2903 | 3305 | //frontView.object = group; |
---|
2904 | 3306 | //sideView.object = group; |
---|
.. | .. |
---|
2933 | 3335 | refreshContents(); |
---|
2934 | 3336 | } |
---|
2935 | 3337 | |
---|
| 3338 | + void TransformChildren() |
---|
| 3339 | + { |
---|
| 3340 | + Object3D obj; |
---|
| 3341 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3342 | + { |
---|
| 3343 | + obj = (Object3D)e.nextElement(); |
---|
| 3344 | + obj.KeepTextureMatrices(); |
---|
| 3345 | + obj.TransformChildren(); |
---|
| 3346 | + obj.RestoreTextureMatrices(); |
---|
| 3347 | + |
---|
| 3348 | +// if (obj.parent == null) |
---|
| 3349 | +// { |
---|
| 3350 | +// System.out.println("NULL PARENT!"); |
---|
| 3351 | +// new Exception().printStackTrace(); |
---|
| 3352 | +// } |
---|
| 3353 | +// else |
---|
| 3354 | +// TouchTransform(obj); |
---|
| 3355 | +// //obj.parent.Touch(); |
---|
| 3356 | + } |
---|
| 3357 | + |
---|
| 3358 | + refreshContents(); |
---|
| 3359 | + } |
---|
2936 | 3360 | |
---|
2937 | 3361 | void ResetTransform() |
---|
2938 | 3362 | { |
---|
.. | .. |
---|
3045 | 3469 | refreshContents(); |
---|
3046 | 3470 | } |
---|
3047 | 3471 | |
---|
3048 | | - void ResetCentroid() |
---|
| 3472 | + void ResetCentroid(boolean full) |
---|
3049 | 3473 | { |
---|
3050 | 3474 | Object3D obj; |
---|
3051 | 3475 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3060 | 3484 | LA.matIdentity(Object3D.mat); |
---|
3061 | 3485 | obj.getBounds(minima, maxima, false); |
---|
3062 | 3486 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3063 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3487 | + if (full) |
---|
| 3488 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3064 | 3489 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3065 | 3490 | obj.TransformMesh(Object3D.mat); |
---|
| 3491 | + |
---|
3066 | 3492 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3067 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3493 | + if (full) |
---|
| 3494 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3068 | 3495 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3496 | + |
---|
3069 | 3497 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3070 | 3498 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3071 | 3499 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3094 | 3522 | |
---|
3095 | 3523 | int size = obj.MemorySize(); |
---|
3096 | 3524 | |
---|
3097 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3525 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3526 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3098 | 3527 | } |
---|
3099 | 3528 | } |
---|
3100 | 3529 | catch (Exception e) |
---|
.. | .. |
---|
3131 | 3560 | obj = (Object3D)e.nextElement(); |
---|
3132 | 3561 | |
---|
3133 | 3562 | System.out.println("Object is: " + obj); |
---|
3134 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3563 | + Grafreed.AnalyzeObject(obj); |
---|
3135 | 3564 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3136 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3565 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3137 | 3566 | |
---|
3138 | 3567 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3139 | 3568 | } |
---|
.. | .. |
---|
3175 | 3604 | void GenNormals(boolean crease) |
---|
3176 | 3605 | { |
---|
3177 | 3606 | group.GenNormalsS(crease); |
---|
| 3607 | + |
---|
| 3608 | + refreshContents(); |
---|
| 3609 | + } |
---|
| 3610 | + |
---|
| 3611 | + void GenNormalsMESH() |
---|
| 3612 | + { |
---|
| 3613 | + group.GenNormalsMeshS(); |
---|
| 3614 | + |
---|
| 3615 | + refreshContents(); |
---|
| 3616 | + } |
---|
| 3617 | + |
---|
| 3618 | + void GenNormalsMINE() |
---|
| 3619 | + { |
---|
| 3620 | + group.selection.GenNormalsMINE(); |
---|
3178 | 3621 | |
---|
3179 | 3622 | refreshContents(); |
---|
3180 | 3623 | } |
---|
.. | .. |
---|
3340 | 3783 | |
---|
3341 | 3784 | void ParseVertices() |
---|
3342 | 3785 | { |
---|
3343 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3344 | | - GrafreeD.epsequal = true; |
---|
| 3786 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3787 | + Grafreed.epsequal = true; |
---|
3345 | 3788 | |
---|
3346 | 3789 | for (int i=0; i<group.selection.size(); i++) |
---|
3347 | 3790 | { |
---|
.. | .. |
---|
3366 | 3809 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3367 | 3810 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3368 | 3811 | |
---|
3369 | | - g.add(GrafreeD.clipboard); |
---|
| 3812 | + g.add(Grafreed.clipboard); |
---|
3370 | 3813 | |
---|
3371 | 3814 | buffer.add(g); |
---|
3372 | 3815 | } |
---|
.. | .. |
---|
3381 | 3824 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3382 | 3825 | } |
---|
3383 | 3826 | |
---|
3384 | | - GrafreeD.epsequal = epsequal; |
---|
| 3827 | + Grafreed.epsequal = epsequal; |
---|
3385 | 3828 | |
---|
3386 | 3829 | refreshContents(); |
---|
3387 | 3830 | } |
---|
.. | .. |
---|
3399 | 3842 | String pigment = Object3D.GetPigment(tex); |
---|
3400 | 3843 | //String bump = Object3D.GetBump(tex); |
---|
3401 | 3844 | |
---|
3402 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3845 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3846 | + |
---|
| 3847 | + try |
---|
| 3848 | + { |
---|
| 3849 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3850 | + } |
---|
| 3851 | + catch (Exception e) |
---|
| 3852 | + { |
---|
| 3853 | + System.err.println("FAIL: " + node); |
---|
| 3854 | + } |
---|
3403 | 3855 | |
---|
3404 | 3856 | double s = v.s; |
---|
3405 | 3857 | |
---|
.. | .. |
---|
3447 | 3899 | |
---|
3448 | 3900 | void Align() |
---|
3449 | 3901 | { |
---|
| 3902 | + if (group.selection.size() == 0) |
---|
| 3903 | + return; |
---|
| 3904 | + |
---|
| 3905 | + cVector bbmin = new cVector(); |
---|
| 3906 | + cVector bbmax = new cVector(); |
---|
| 3907 | + |
---|
| 3908 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3909 | + |
---|
| 3910 | + double dx = bbmax.x - bbmin.x; |
---|
| 3911 | + double dy = bbmax.y - bbmin.y; |
---|
| 3912 | + double dz = bbmax.z - bbmin.z; |
---|
| 3913 | + |
---|
| 3914 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3915 | + |
---|
3450 | 3916 | for (int i=0; i<group.selection.size(); i++) |
---|
3451 | 3917 | { |
---|
3452 | 3918 | Object3D obj = group.selection.get(i); |
---|
3453 | 3919 | |
---|
3454 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3455 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3920 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3921 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3456 | 3922 | } |
---|
3457 | 3923 | |
---|
3458 | 3924 | refreshContents(); |
---|
.. | .. |
---|
3473 | 3939 | |
---|
3474 | 3940 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3475 | 3941 | |
---|
3476 | | - boolean random = CameraPane.RANDOM; |
---|
3477 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3942 | + boolean random = CameraPane.SWITCH; |
---|
| 3943 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3478 | 3944 | lowres.linkVerticesThis(null); |
---|
3479 | 3945 | lowres.linkVerticesThis(sn); |
---|
3480 | | - CameraPane.RANDOM = random; |
---|
| 3946 | + CameraPane.SWITCH = random; |
---|
3481 | 3947 | |
---|
3482 | 3948 | System.err.flush(); |
---|
3483 | 3949 | |
---|
.. | .. |
---|
3517 | 3983 | return; |
---|
3518 | 3984 | |
---|
3519 | 3985 | Object3D poses = group.selection.get(0); |
---|
3520 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 3986 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3521 | 3987 | |
---|
3522 | 3988 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3523 | 3989 | |
---|
.. | .. |
---|
3686 | 4152 | group.selection.RelinkToSupport(); // july 2014 |
---|
3687 | 4153 | System.out.println("DONE."); |
---|
3688 | 4154 | refreshContents(); |
---|
3689 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 4155 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3690 | 4156 | } |
---|
3691 | 4157 | |
---|
3692 | 4158 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3711 | 4177 | |
---|
3712 | 4178 | void ClipMesh() |
---|
3713 | 4179 | { |
---|
3714 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4180 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3715 | 4181 | { |
---|
3716 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4182 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3717 | 4183 | |
---|
3718 | 4184 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3719 | 4185 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3722 | 4188 | // { |
---|
3723 | 4189 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3724 | 4190 | // } |
---|
3725 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4191 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3726 | 4192 | } |
---|
3727 | 4193 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3728 | 4194 | System.out.println("DONE."); |
---|
.. | .. |
---|
3769 | 4235 | void MarkLeaves(boolean hide) |
---|
3770 | 4236 | { |
---|
3771 | 4237 | group.selection.MarkLeaves(hide); |
---|
| 4238 | + refreshContents(); |
---|
| 4239 | + } |
---|
| 4240 | + |
---|
| 4241 | + void RewindLeaves(boolean hide) |
---|
| 4242 | + { |
---|
| 4243 | + group.selection.RewindLeaves(hide); |
---|
| 4244 | + refreshContents(); |
---|
| 4245 | + } |
---|
| 4246 | + |
---|
| 4247 | + void RandomLeaves(boolean hide) |
---|
| 4248 | + { |
---|
| 4249 | + group.selection.RandomLeaves(hide); |
---|
3772 | 4250 | refreshContents(); |
---|
3773 | 4251 | } |
---|
3774 | 4252 | |
---|
.. | .. |
---|
3857 | 4335 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3858 | 4336 | |
---|
3859 | 4337 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
3860 | | - if(elem != group) |
---|
| 4338 | + if(elem != group || !newWindow) |
---|
3861 | 4339 | { |
---|
3862 | 4340 | // if (!(elem instanceof Composite)) |
---|
3863 | 4341 | // newWindow = false; |
---|
.. | .. |
---|
3947 | 4425 | //case 702: // Event.LIST_DESELECT |
---|
3948 | 4426 | group.deselectAll(); |
---|
3949 | 4427 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
3950 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
3951 | 4428 | if (tps != null) |
---|
3952 | 4429 | { |
---|
3953 | 4430 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
3956 | 4433 | |
---|
3957 | 4434 | //if (child.parent != null) |
---|
3958 | 4435 | //child.parent.addSelectee(child); |
---|
| 4436 | + objEditor.SetMaterial(child); |
---|
3959 | 4437 | group.addSelectee(child); |
---|
3960 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
3961 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
3962 | | - System.err.println("info : " + child.GetPath()); |
---|
3963 | 4438 | } |
---|
3964 | 4439 | } |
---|
3965 | | - else |
---|
3966 | | - { |
---|
3967 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3968 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3969 | | - System.err.println("info : " + group.GetPath()); |
---|
3970 | | - } |
---|
| 4440 | +// else |
---|
| 4441 | +// { |
---|
| 4442 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4443 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4444 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4445 | +// } |
---|
3971 | 4446 | |
---|
3972 | | - objEditor.SetText(); // jan 2014 |
---|
3973 | | - |
---|
3974 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4447 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
3975 | 4448 | CameraPane.flash = true; |
---|
3976 | 4449 | |
---|
3977 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4450 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
3978 | 4451 | // a camera |
---|
3979 | 4452 | { |
---|
3980 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
3981 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
3982 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
3983 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4453 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4454 | + { |
---|
| 4455 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4456 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4457 | + } |
---|
| 4458 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4459 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3984 | 4460 | } |
---|
3985 | 4461 | |
---|
3986 | 4462 | refreshContents(); |
---|
.. | .. |
---|
3991 | 4467 | |
---|
3992 | 4468 | freezemodel = false; |
---|
3993 | 4469 | } |
---|
| 4470 | + |
---|
| 4471 | + void refreshContents(boolean cp) |
---|
| 4472 | + { |
---|
| 4473 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4474 | + { |
---|
| 4475 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4476 | + |
---|
| 4477 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4478 | + { |
---|
| 4479 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4480 | + |
---|
| 4481 | + objEditor.AddInfo(child, this, true); |
---|
| 4482 | + System.err.println("info : " + child.GetPath()); |
---|
| 4483 | + } |
---|
| 4484 | + |
---|
| 4485 | + objEditor.SetText(); // jan 2014 |
---|
| 4486 | + } |
---|
| 4487 | + |
---|
| 4488 | + super.refreshContents(cp); |
---|
| 4489 | + } |
---|
3994 | 4490 | |
---|
3995 | 4491 | void linkSomething(Object3D thing) |
---|
3996 | 4492 | { |
---|
.. | .. |
---|
4062 | 4558 | { |
---|
4063 | 4559 | if (group.selection.isEmpty()) |
---|
4064 | 4560 | return; |
---|
4065 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4561 | + |
---|
| 4562 | + Grafreed.clipboardIsTempGroup = false; |
---|
4066 | 4563 | Composite tGroup = null; |
---|
4067 | 4564 | if (group.selection.size() > 0) // 1) |
---|
4068 | 4565 | { |
---|
4069 | 4566 | tGroup = new cGroup(); |
---|
4070 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4567 | + Grafreed.clipboardIsTempGroup = true; |
---|
4071 | 4568 | } |
---|
4072 | 4569 | |
---|
4073 | 4570 | if (cut) |
---|
4074 | 4571 | { |
---|
| 4572 | + Save(); |
---|
4075 | 4573 | //int indices[] = jList.getSelectedIndices(); |
---|
4076 | 4574 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4077 | 4575 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4107 | 4605 | //System.out.println("cut " + child); |
---|
4108 | 4606 | //System.out.println("parent = " + child.parent); |
---|
4109 | 4607 | // tmp.addChild(child); |
---|
4110 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4608 | + if (Grafreed.clipboardIsTempGroup) |
---|
4111 | 4609 | tGroup.add/*Child*/(tmp); |
---|
4112 | 4610 | else |
---|
4113 | | - GrafreeD.clipboard = tmp; |
---|
| 4611 | + Grafreed.clipboard = tmp; |
---|
4114 | 4612 | } |
---|
4115 | 4613 | else |
---|
4116 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4614 | + if (Grafreed.clipboardIsTempGroup) |
---|
4117 | 4615 | tGroup.add/*Child*/(child); |
---|
4118 | 4616 | else |
---|
4119 | | - GrafreeD.clipboard = child; |
---|
| 4617 | + Grafreed.clipboard = child; |
---|
4120 | 4618 | } |
---|
4121 | 4619 | |
---|
4122 | 4620 | //ResetModel(); |
---|
.. | .. |
---|
4148 | 4646 | //System.out.println("cut " + elem); |
---|
4149 | 4647 | //System.out.println("parent = " + elem.parent); |
---|
4150 | 4648 | // tmp.addChild(elem); |
---|
4151 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4649 | + if (Grafreed.clipboardIsTempGroup) |
---|
4152 | 4650 | tGroup.add/*Child*/(tmp); |
---|
4153 | 4651 | else |
---|
4154 | | - GrafreeD.clipboard = tmp; |
---|
| 4652 | + Grafreed.clipboard = tmp; |
---|
4155 | 4653 | } |
---|
4156 | 4654 | else |
---|
4157 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4655 | + if (Grafreed.clipboardIsTempGroup) |
---|
4158 | 4656 | tGroup.add/*Child*/(child); |
---|
4159 | 4657 | else |
---|
4160 | | - GrafreeD.clipboard = child; |
---|
| 4658 | + Grafreed.clipboard = child; |
---|
4161 | 4659 | } |
---|
4162 | 4660 | |
---|
4163 | 4661 | } |
---|
4164 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4165 | | - GrafreeD.clipboard = tGroup; |
---|
| 4662 | + |
---|
| 4663 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4664 | + Grafreed.clipboard = tGroup; |
---|
| 4665 | + |
---|
4166 | 4666 | if (cut) |
---|
4167 | 4667 | { |
---|
4168 | 4668 | ResetModel(); |
---|
.. | .. |
---|
4176 | 4676 | // return; |
---|
4177 | 4677 | boolean first = true; |
---|
4178 | 4678 | |
---|
4179 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4679 | + if (Grafreed.clipboardIsTempGroup) |
---|
4180 | 4680 | { |
---|
4181 | 4681 | Composite temp; |
---|
4182 | 4682 | |
---|
.. | .. |
---|
4187 | 4687 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4188 | 4688 | */ |
---|
4189 | 4689 | Object3D elem; |
---|
4190 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4690 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4191 | 4691 | { |
---|
4192 | 4692 | Object3D child = (Object3D)e.nextElement(); |
---|
4193 | 4693 | |
---|
.. | .. |
---|
4221 | 4721 | //Object3D cb = Applet3D.clipboard; |
---|
4222 | 4722 | //temp.addChild(cb); |
---|
4223 | 4723 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4224 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4225 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4226 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4227 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4228 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4724 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4725 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4726 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4727 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4728 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4229 | 4729 | else |
---|
4230 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4231 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4730 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4731 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4232 | 4732 | } |
---|
4233 | 4733 | |
---|
4234 | 4734 | ResetModel(); |
---|
4235 | 4735 | refreshContents(); |
---|
4236 | 4736 | } |
---|
4237 | 4737 | |
---|
4238 | | - void pasteInto(boolean copyit) |
---|
| 4738 | + void pasteInto(boolean copyit, boolean clone) |
---|
4239 | 4739 | { |
---|
4240 | 4740 | // if (GrafreeD.clipboard == null) |
---|
4241 | 4741 | // return; |
---|
.. | .. |
---|
4264 | 4764 | if (copyit) |
---|
4265 | 4765 | { |
---|
4266 | 4766 | // paste(false); |
---|
4267 | | - CloneClipboard(false); // sept 2014 |
---|
| 4767 | + if (clone) |
---|
| 4768 | + { |
---|
| 4769 | + CloneClipboard(false); // sept 2014 |
---|
| 4770 | + } |
---|
| 4771 | + else |
---|
| 4772 | + { |
---|
| 4773 | + paste(false); |
---|
| 4774 | + } |
---|
4268 | 4775 | } |
---|
4269 | 4776 | else |
---|
4270 | 4777 | { |
---|
4271 | 4778 | boolean first = true; |
---|
4272 | 4779 | |
---|
4273 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4780 | + if (Grafreed.clipboardIsTempGroup) |
---|
4274 | 4781 | { |
---|
4275 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4782 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4276 | 4783 | Object3D copy; |
---|
4277 | 4784 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4278 | 4785 | { |
---|
.. | .. |
---|
4282 | 4789 | } |
---|
4283 | 4790 | } else |
---|
4284 | 4791 | { |
---|
4285 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4792 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4286 | 4793 | } |
---|
4287 | 4794 | } |
---|
4288 | 4795 | } |
---|
.. | .. |
---|
4474 | 4981 | makeSomething(csg); |
---|
4475 | 4982 | } |
---|
4476 | 4983 | |
---|
| 4984 | + void Ungroup(Object3D g) |
---|
| 4985 | + { |
---|
| 4986 | + if (g instanceof HiddenObject) |
---|
| 4987 | + { |
---|
| 4988 | + HiddenObject h = (HiddenObject) g; |
---|
| 4989 | + |
---|
| 4990 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4991 | + { |
---|
| 4992 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4993 | + } |
---|
| 4994 | + } |
---|
| 4995 | + else |
---|
| 4996 | + { |
---|
| 4997 | + for (int i=0; i<g.Size(); i++) |
---|
| 4998 | + { |
---|
| 4999 | + objEditor.makeSomething(g.get(i), false); |
---|
| 5000 | + } |
---|
| 5001 | + } |
---|
| 5002 | + } |
---|
| 5003 | + |
---|
4477 | 5004 | void ungroup() |
---|
4478 | 5005 | { |
---|
4479 | 5006 | /* |
---|
.. | .. |
---|
4667 | 5194 | } |
---|
4668 | 5195 | */ |
---|
4669 | 5196 | |
---|
4670 | | - void ImportGFD() |
---|
4671 | | - { |
---|
4672 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4673 | | - browser.show(); |
---|
4674 | | - String filename = browser.getFile(); |
---|
4675 | | - if (filename != null && filename.length() > 0) |
---|
4676 | | - { |
---|
4677 | | - String fullname = browser.getDirectory() + filename; |
---|
4678 | | - |
---|
4679 | | - //Object3D readobj = |
---|
4680 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4681 | | - //makeSomething(readobj); |
---|
4682 | | - } |
---|
4683 | | - } |
---|
4684 | | - |
---|
4685 | 5197 | /* |
---|
4686 | 5198 | public void Callback(Object obj) |
---|
4687 | 5199 | { |
---|
.. | .. |
---|
4705 | 5217 | } |
---|
4706 | 5218 | */ |
---|
4707 | 5219 | |
---|
4708 | | - void ImportVRMLX3D() |
---|
4709 | | - { |
---|
4710 | | - if (GrafreeD.standAlone) |
---|
4711 | | - { |
---|
4712 | | - /**/ |
---|
4713 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4714 | | - browser.show(); |
---|
4715 | | - String filename = browser.getFile(); |
---|
4716 | | - if (filename != null && filename.length() > 0) |
---|
4717 | | - { |
---|
4718 | | - String fullname = browser.getDirectory() + filename; |
---|
4719 | | - LoadVRMLX3D(fullname); |
---|
4720 | | - } |
---|
4721 | | - /**/ |
---|
4722 | | - } |
---|
4723 | | - } |
---|
4724 | | - |
---|
4725 | 5220 | String GetFile(String dialogName) |
---|
4726 | 5221 | { |
---|
4727 | | - if (GrafreeD.standAlone) |
---|
| 5222 | + if (Grafreed.standAlone) |
---|
4728 | 5223 | { |
---|
4729 | 5224 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4730 | 5225 | browser.show(); |
---|
.. | .. |
---|
4788 | 5283 | cButton flashSelectionButton; |
---|
4789 | 5284 | cButton editButton; |
---|
4790 | 5285 | cButton uneditButton; |
---|
| 5286 | + JCheckBox allParamsButton; |
---|
4791 | 5287 | cButton clearpanelButton; |
---|
4792 | | - cButton allParamsButton; |
---|
4793 | 5288 | cButton unselectButton; |
---|
4794 | 5289 | |
---|
| 5290 | + cButton minButton; |
---|
| 5291 | + cButton maxButton; |
---|
| 5292 | + cButton fullButton; |
---|
| 5293 | + cButton undoButton; |
---|
| 5294 | + cButton redoButton; |
---|
| 5295 | + cButton saveButton; |
---|
| 5296 | + cButton oneStepButton; |
---|
| 5297 | + |
---|
4795 | 5298 | cButton screenfitButton; |
---|
4796 | 5299 | cButton screenfitpointButton; |
---|
4797 | 5300 | cButton snapobjectButton; |
---|
.. | .. |
---|
4802 | 5305 | cButton closeButton; |
---|
4803 | 5306 | |
---|
4804 | 5307 | cButton setsupportButton; |
---|
4805 | | - |
---|
4806 | | - cButton twoButton; |
---|
4807 | | - cButton sixButton; |
---|
4808 | | - cButton threeButton; |
---|
4809 | | - cButton sevenButton; |
---|
4810 | | - cButton fourButton; // full panel |
---|
4811 | | - cButton oneButton; // full XYZ |
---|
4812 | | - //cButton currentLayout; |
---|
4813 | 5308 | |
---|
4814 | 5309 | // |
---|
4815 | 5310 | //Composite |
---|
.. | .. |
---|
4822 | 5317 | private MenuItem lookFromItem; |
---|
4823 | 5318 | private MenuItem switchItem; |
---|
4824 | 5319 | private MenuItem cutItem; |
---|
| 5320 | + private MenuItem undoItem; |
---|
| 5321 | + private MenuItem redoItem; |
---|
4825 | 5322 | private MenuItem duplicateItem; |
---|
4826 | 5323 | private MenuItem cloneItem; |
---|
4827 | 5324 | private MenuItem cloneSupportItem; |
---|
.. | .. |
---|
4833 | 5330 | private MenuItem resetsupportItem; |
---|
4834 | 5331 | private MenuItem resetreferencesItem; |
---|
4835 | 5332 | private MenuItem linkverticesItem; |
---|
| 5333 | + private MenuItem relinkverticesItem; |
---|
4836 | 5334 | private MenuItem setMasterItem; |
---|
4837 | | - private MenuItem resetMeshItem; |
---|
| 5335 | + private MenuItem resetAllItem; |
---|
4838 | 5336 | private MenuItem stepAllItem; |
---|
4839 | 5337 | private MenuItem revertMeshItem; |
---|
4840 | 5338 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
4845 | 5343 | private MenuItem mergeGeometriesItem; |
---|
4846 | 5344 | private MenuItem copyItem; |
---|
4847 | 5345 | private MenuItem pasteItem; |
---|
| 5346 | + private MenuItem pasteIntoItem; |
---|
4848 | 5347 | private MenuItem pasteLinkItem; |
---|
4849 | 5348 | private MenuItem pasteCloneItem; |
---|
4850 | 5349 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
4854 | 5353 | private MenuItem genNormalsMESHItem; |
---|
4855 | 5354 | private MenuItem genNormalsCADItem; |
---|
4856 | 5355 | private MenuItem genNormalsORGANItem; |
---|
| 5356 | + private MenuItem genNormalsMINEItem; |
---|
4857 | 5357 | private MenuItem stripifyItem; |
---|
4858 | 5358 | private MenuItem unstripifyItem; |
---|
4859 | 5359 | private MenuItem trimItem; |
---|
.. | .. |
---|
4882 | 5382 | private MenuItem showleavesItem; |
---|
4883 | 5383 | private MenuItem markleavesItem; |
---|
4884 | 5384 | private MenuItem unmarkleavesItem; |
---|
| 5385 | + private MenuItem rewindleavesItem; |
---|
| 5386 | + private MenuItem unrewindleavesItem; |
---|
| 5387 | + private MenuItem randomleavesItem; |
---|
| 5388 | + private MenuItem unrandomleavesItem; |
---|
4885 | 5389 | |
---|
4886 | 5390 | private MenuItem flipVItem; |
---|
4887 | 5391 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
4893 | 5397 | private MenuItem panoTexturesItem; |
---|
4894 | 5398 | |
---|
4895 | 5399 | private MenuItem resetCentroidItem; |
---|
4896 | | - private MenuItem transformgeometryItem; |
---|
| 5400 | + private MenuItem resetCentroidXZItem; |
---|
4897 | 5401 | private MenuItem resetTransformItem; |
---|
| 5402 | + private MenuItem transformGeometryItem; |
---|
| 5403 | + private MenuItem transformChildrenItem; |
---|
| 5404 | + private MenuItem hideItem; |
---|
4898 | 5405 | private MenuItem grabItem; |
---|
4899 | 5406 | private MenuItem backItem; |
---|
4900 | 5407 | private MenuItem frontItem; |
---|
.. | .. |
---|
4915 | 5422 | |
---|
4916 | 5423 | private MenuItem resetParentItem; |
---|
4917 | 5424 | private MenuItem repairParentItem; |
---|
| 5425 | + private MenuItem repairShadowItem; |
---|
4918 | 5426 | private MenuItem sortbysizeItem; |
---|
4919 | 5427 | private MenuItem sortbynameItem; |
---|
4920 | 5428 | |
---|
.. | .. |
---|
4935 | 5443 | private MenuItem coneItem; |
---|
4936 | 5444 | private MenuItem torusItem; |
---|
4937 | 5445 | private MenuItem superItem; |
---|
| 5446 | + private MenuItem kleinItem; |
---|
4938 | 5447 | private MenuItem blobItem; |
---|
4939 | 5448 | private MenuItem latheItem; |
---|
4940 | 5449 | private MenuItem bezierItem; |
---|
4941 | | - private MenuItem checkerItem; |
---|
| 5450 | + private MenuItem overlayItem; |
---|
4942 | 5451 | private MenuItem meshItem; |
---|
4943 | 5452 | // private MenuItem meshGroupItem; |
---|
4944 | 5453 | private MenuItem springItem; |
---|
.. | .. |
---|
4947 | 5456 | private MenuItem csgItem; |
---|
4948 | 5457 | private MenuItem templateItem; |
---|
4949 | 5458 | private MenuItem textureItem; |
---|
| 5459 | + private MenuItem billboardItem; |
---|
4950 | 5460 | private MenuItem shadowXItem; |
---|
4951 | 5461 | private MenuItem shadowYItem; |
---|
4952 | 5462 | private MenuItem shadowZItem; |
---|
.. | .. |
---|
4959 | 5469 | private MenuItem doubleItem; |
---|
4960 | 5470 | private MenuItem tripleItem; |
---|
4961 | 5471 | |
---|
4962 | | - private MenuItem importGFDItem; |
---|
4963 | | - private MenuItem importVRMLX3DItem; |
---|
4964 | | - private MenuItem import3DSItem; |
---|
4965 | | - private MenuItem importOBJItem; |
---|
4966 | | - |
---|
4967 | 5472 | private MenuItem computeAOItem; |
---|
4968 | 5473 | private MenuItem recompileItem; |
---|
4969 | 5474 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
4973 | 5478 | private MenuItem analyzeItem; |
---|
4974 | 5479 | private MenuItem dumpItem; |
---|
4975 | 5480 | //boolean freezemodel = false; |
---|
| 5481 | + |
---|
| 5482 | + Menu cameraMenu; |
---|
| 5483 | + MenuItem editCameraItem; |
---|
| 5484 | + MenuItem revertCameraItem; |
---|
4976 | 5485 | } |
---|