.. | .. |
---|
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 | { |
---|
152 | | - oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
153 | | - //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
154 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
155 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
156 | | - oe.cameraMenu.add("-"); |
---|
157 | | - openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
158 | | - openWindowItem.addActionListener(this); |
---|
159 | | - editLeafItem.addActionListener(this); |
---|
160 | | - lookAtItem.addActionListener(this); |
---|
161 | | - //lookFromItem.addActinoListener(this); |
---|
162 | | - //switchItem.addActionListener(this); |
---|
| 153 | + oe.jTree = new cTree(); |
---|
| 154 | + |
---|
163 | 155 | Menu menu; |
---|
164 | 156 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
165 | 157 | //editItem = menu.add(new MenuItem("Edit")); |
---|
166 | 158 | //editItem.addActionListener(this); |
---|
167 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 159 | + |
---|
| 160 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 161 | +// undoItem.addActionListener(this); |
---|
| 162 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 163 | +// redoItem.addActionListener(this); |
---|
| 164 | +// menu.add("-"); |
---|
| 165 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
168 | 166 | duplicateItem.addActionListener(this); |
---|
169 | | - menu.add("-"); |
---|
170 | 167 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | 168 | cloneItem.addActionListener(this); |
---|
| 169 | + if (Globals.ADVANCED) |
---|
| 170 | + { |
---|
172 | 171 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | 172 | cloneSupportItem.addActionListener(this); |
---|
| 173 | + } |
---|
174 | 174 | menu.add("-"); |
---|
175 | 175 | cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | 176 | cutItem.addActionListener(this); |
---|
.. | .. |
---|
178 | 178 | copyItem.addActionListener(this); |
---|
179 | 179 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | 180 | pasteItem.addActionListener(this); |
---|
| 181 | + |
---|
| 182 | + menu.add("-"); |
---|
| 183 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 184 | + pasteIntoItem.addActionListener(this); |
---|
181 | 185 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | 186 | pasteLinkItem.addActionListener(this); |
---|
183 | 187 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | 188 | pasteCloneItem.addActionListener(this); |
---|
185 | 189 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | 190 | // pasteExpandItem.addActionListener(this); |
---|
| 191 | + menu.add("-"); |
---|
187 | 192 | clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | 193 | clearItem.addActionListener(this); |
---|
| 194 | + |
---|
| 195 | + if (Globals.ADVANCED) |
---|
| 196 | + { |
---|
| 197 | + // Deletes the cameras... |
---|
189 | 198 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 199 | clearAllItem.addActionListener(this); |
---|
| 200 | + } |
---|
| 201 | + |
---|
| 202 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 203 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 204 | + //zBufferItem.addActionListener(this); |
---|
| 205 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 206 | + //normalLensItem.addActionListener(this); |
---|
| 207 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 208 | + restoreCameraItem.addActionListener(this); |
---|
| 209 | + |
---|
| 210 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 211 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 212 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 213 | +// cameraMenu.add("-"); |
---|
| 214 | +// |
---|
| 215 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 216 | +// toggleTextureItem.addItemListener(this); |
---|
| 217 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 218 | +// |
---|
| 219 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 220 | +// toggleSwitchItem.addItemListener(this); |
---|
| 221 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 222 | + |
---|
| 223 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 224 | + toggleHandleItem.addItemListener(this); |
---|
| 225 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 226 | + |
---|
| 227 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 228 | + togglePaintItem.addItemListener(this); |
---|
| 229 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 230 | + |
---|
| 231 | + if (Globals.ADVANCED) |
---|
| 232 | + { |
---|
| 233 | + cameraMenu.add("-"); |
---|
| 234 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 235 | + toggleLiveItem.addItemListener(this); |
---|
| 236 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
191 | 237 | |
---|
| 238 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 239 | + stepItem.addActionListener(this); |
---|
| 240 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 241 | + // toggleDLItem.addItemListener(this); |
---|
| 242 | + // toggleDLItem.setState(false); |
---|
| 243 | + |
---|
| 244 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 245 | + toggleRenderItem.addItemListener(this); |
---|
| 246 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 247 | + |
---|
| 248 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 249 | + toggleDebugItem.addItemListener(this); |
---|
| 250 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
| 251 | + |
---|
| 252 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 253 | + toggleFrustumItem.addItemListener(this); |
---|
| 254 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 255 | + |
---|
| 256 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 257 | + toggleFootContactItem.addItemListener(this); |
---|
| 258 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 259 | + |
---|
| 260 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 261 | + toggleTimelineItem.addItemListener(this); |
---|
| 262 | + } |
---|
| 263 | + |
---|
| 264 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 265 | +// toggleRootItem.addItemListener(this); |
---|
| 266 | +// toggleRootItem.setState(false); |
---|
| 267 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 268 | +// animationItem.addItemListener(this); |
---|
| 269 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 270 | + cameraMenu.add("-"); |
---|
| 271 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 272 | + editCameraItem.addActionListener(this); |
---|
| 273 | + |
---|
| 274 | + if (Globals.ADVANCED) |
---|
| 275 | + { |
---|
| 276 | + oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
| 277 | + //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
| 278 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
| 279 | + editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
| 280 | + oe.cameraMenu.add("-"); |
---|
| 281 | + openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
| 282 | + openWindowItem.addActionListener(this); |
---|
| 283 | + editLeafItem.addActionListener(this); |
---|
| 284 | + lookAtItem.addActionListener(this); |
---|
| 285 | + //lookFromItem.addActinoListener(this); |
---|
| 286 | + //switchViewItem.addActionListener(this); |
---|
| 287 | + } |
---|
| 288 | + |
---|
192 | 289 | 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); |
---|
| 290 | + if (Globals.ADVANCED) |
---|
| 291 | + { |
---|
197 | 292 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
198 | 293 | revertMeshItem.addActionListener(this); |
---|
199 | 294 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
200 | 295 | resetreferencesItem.addActionListener(this); |
---|
201 | 296 | menu.add("-"); |
---|
| 297 | + } |
---|
202 | 298 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
203 | 299 | overwriteGeoItem.addActionListener(this); |
---|
204 | 300 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
210 | 306 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
211 | 307 | overwriteUVItem.addActionListener(this); |
---|
212 | 308 | menu.add("-"); |
---|
| 309 | + if (Globals.ADVANCED) |
---|
| 310 | + { |
---|
213 | 311 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
214 | 312 | generateMeshItem.addActionListener(this); |
---|
215 | 313 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
216 | 314 | poseMeshItem.addActionListener(this); |
---|
217 | 315 | menu.add("-"); |
---|
| 316 | + } |
---|
218 | 317 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
219 | 318 | resetsupportItem.addActionListener(this); |
---|
220 | 319 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 320 | linkverticesItem.addActionListener(this); |
---|
222 | 321 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
223 | 322 | relinkverticesItem.addActionListener(this); |
---|
| 323 | + |
---|
| 324 | + if (Globals.ADVANCED) |
---|
| 325 | + { |
---|
224 | 326 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
225 | 327 | setMasterItem.addActionListener(this); |
---|
| 328 | + } |
---|
226 | 329 | |
---|
227 | 330 | oe.menuBar.add(menu = new Menu("Group")); |
---|
228 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
229 | | - grabItem.addActionListener(this); |
---|
| 331 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 332 | +// grabItem.addActionListener(this); |
---|
230 | 333 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 334 | backItem.addActionListener(this); |
---|
232 | 335 | frontItem = menu.add(new MenuItem("Front")); |
---|
233 | 336 | frontItem.addActionListener(this); |
---|
234 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
235 | | - compositeItem.addActionListener(this); |
---|
236 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 337 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 338 | +// compositeItem.addActionListener(this); |
---|
| 339 | + |
---|
| 340 | + if (Globals.ADVANCED) |
---|
| 341 | + { |
---|
| 342 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
237 | 343 | hideItem.addActionListener(this); |
---|
| 344 | + } |
---|
238 | 345 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
239 | 346 | ungroupItem.addActionListener(this); |
---|
240 | | - menu.add("-"); |
---|
241 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
242 | | - randomItem.addActionListener(this); |
---|
243 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
244 | | - physicsItem.addActionListener(this); |
---|
245 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
246 | | - frameselectorItem.addActionListener(this); |
---|
| 347 | + |
---|
| 348 | +// menu.add("-"); |
---|
| 349 | +// |
---|
| 350 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 351 | +// switchItem.addActionListener(this); |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
247 | 354 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
248 | 355 | switchGeoItem.addActionListener(this); |
---|
249 | 356 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
250 | 357 | switchTransfoItem.addActionListener(this); |
---|
251 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 358 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
252 | 359 | morphItem.addActionListener(this); |
---|
| 360 | + |
---|
| 361 | + menu.add("-"); |
---|
| 362 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 363 | + physicsItem.addActionListener(this); |
---|
| 364 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 365 | + frameselectorItem.addActionListener(this); |
---|
253 | 366 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
254 | 367 | scriptNodeItem.addActionListener(this); |
---|
255 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
256 | | - cameraItem.addActionListener(this); |
---|
| 368 | + } |
---|
257 | 369 | |
---|
258 | 370 | oe.menuBar.add(menu = new Menu("Object")); |
---|
259 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
260 | | - textureItem.addActionListener(this); |
---|
| 371 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 372 | +// textureItem.addActionListener(this); |
---|
261 | 373 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
262 | 374 | billboardItem.addActionListener(this); |
---|
263 | 375 | csgItem = menu.add(new MenuItem("CSG")); |
---|
264 | 376 | csgItem.addActionListener(this); |
---|
265 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 377 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
266 | 378 | shadowXItem.addActionListener(this); |
---|
267 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 379 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
268 | 380 | shadowYItem.addActionListener(this); |
---|
269 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 381 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
270 | 382 | shadowZItem.addActionListener(this); |
---|
| 383 | + if (Globals.ADVANCED) |
---|
| 384 | + { |
---|
| 385 | + menu.add("-"); |
---|
271 | 386 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
272 | 387 | linkerItem.addActionListener(this); |
---|
273 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
274 | | - templateItem.addActionListener(this); |
---|
275 | 388 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
276 | 389 | attributeItem.addActionListener(this); |
---|
| 390 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 391 | + templateItem.addActionListener(this); |
---|
277 | 392 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
278 | 393 | pointflowItem.addActionListener(this); |
---|
| 394 | + } |
---|
279 | 395 | menu.add("-"); |
---|
280 | 396 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
281 | 397 | resetTransformItem.addActionListener(this); |
---|
282 | 398 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
283 | 399 | resetCentroidItem.addActionListener(this); |
---|
284 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
285 | | - transformgeometryItem.addActionListener(this); |
---|
| 400 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 401 | + resetCentroidXZItem.addActionListener(this); |
---|
| 402 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 403 | + transformGeometryItem.addActionListener(this); |
---|
| 404 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 405 | + transformChildrenItem.addActionListener(this); |
---|
286 | 406 | |
---|
287 | 407 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
288 | 408 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
293 | 413 | genNormalsCADItem.addActionListener(this); |
---|
294 | 414 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
295 | 415 | genNormalsMESHItem.addActionListener(this); |
---|
| 416 | + if (Globals.ADVANCED) |
---|
| 417 | + { |
---|
296 | 418 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
297 | 419 | genNormalsMINEItem.addActionListener(this); |
---|
| 420 | + } |
---|
298 | 421 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
299 | 422 | stripifyItem.addActionListener(this); |
---|
300 | 423 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
316 | 439 | reduce34MeshItem.addActionListener(this); |
---|
317 | 440 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
318 | 441 | increaseMeshItem.addActionListener(this); |
---|
319 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
320 | | - smoothMeshItem.addActionListener(this); |
---|
321 | 442 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
322 | 443 | clipMeshItem.addActionListener(this); |
---|
| 444 | + |
---|
| 445 | + if (Globals.ADVANCED) |
---|
| 446 | + { |
---|
| 447 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 448 | + smoothMeshItem.addActionListener(this); |
---|
| 449 | + } |
---|
323 | 450 | |
---|
324 | 451 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
325 | 452 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
326 | 453 | clearMaterialsItem.addActionListener(this); |
---|
| 454 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 455 | + resetAllItem.addActionListener(this); |
---|
| 456 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 457 | + stepAllItem.addActionListener(this); |
---|
327 | 458 | menu.add("-"); |
---|
328 | 459 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
329 | 460 | liveleavesItem.addActionListener(this); |
---|
330 | 461 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
331 | 462 | unliveleavesItem.addActionListener(this); |
---|
| 463 | + if (Globals.ADVANCED) |
---|
| 464 | + { |
---|
332 | 465 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
333 | 466 | supportleavesItem.addActionListener(this); |
---|
334 | 467 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
335 | 468 | unsupportleavesItem.addActionListener(this); |
---|
| 469 | + } |
---|
336 | 470 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
337 | 471 | hideleavesItem.addActionListener(this); |
---|
338 | 472 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
341 | 475 | markleavesItem.addActionListener(this); |
---|
342 | 476 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
343 | 477 | unmarkleavesItem.addActionListener(this); |
---|
| 478 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 479 | + rewindleavesItem.addActionListener(this); |
---|
| 480 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 481 | + unrewindleavesItem.addActionListener(this); |
---|
| 482 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 483 | + randomleavesItem.addActionListener(this); |
---|
| 484 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 485 | + unrandomleavesItem.addActionListener(this); |
---|
344 | 486 | menu.add("-"); |
---|
345 | 487 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
346 | 488 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
376 | 518 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
377 | 519 | sortbynameItem.addActionListener(this); |
---|
378 | 520 | menu.add("-"); |
---|
| 521 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 522 | + shareGeometriesItem.addActionListener(this); |
---|
| 523 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 524 | + mergeGeometriesItem.addActionListener(this); |
---|
| 525 | + if (Globals.ADVANCED) |
---|
| 526 | + { |
---|
| 527 | + // Pretty much the same as duplicate and clone. |
---|
379 | 528 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
380 | 529 | extractGeometriesItem.addActionListener(this); |
---|
381 | 530 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
382 | 531 | cloneGeometriesItem.addActionListener(this); |
---|
383 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
384 | | - shareGeometriesItem.addActionListener(this); |
---|
385 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
386 | | - mergeGeometriesItem.addActionListener(this); |
---|
| 532 | + } |
---|
387 | 533 | |
---|
388 | 534 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
389 | 535 | buildCreateMenu(menu); |
---|
390 | 536 | |
---|
391 | | - |
---|
392 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
393 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
394 | | - importGFDItem.addActionListener(this); |
---|
395 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
396 | | - importVRMLX3DItem.addActionListener(this); |
---|
397 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
398 | | - importOBJItem.addActionListener(this); |
---|
399 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
400 | | - import3DSItem.addActionListener(this); |
---|
401 | | - |
---|
402 | 537 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
403 | 538 | buildToolsMenu(menu); |
---|
404 | 539 | } |
---|
405 | 540 | |
---|
406 | 541 | void SetupUI2(ObjEditor oe) |
---|
407 | 542 | { |
---|
| 543 | + // June 2019 |
---|
| 544 | + if (oe == null) |
---|
| 545 | + { |
---|
| 546 | + //super.SetupUI2(this); |
---|
| 547 | + //return; |
---|
| 548 | + } |
---|
| 549 | + |
---|
| 550 | + if (copy != group) |
---|
| 551 | + { |
---|
| 552 | + //super.SetupUI2(this); |
---|
| 553 | + } |
---|
| 554 | + |
---|
408 | 555 | //new Exception().printStackTrace(); |
---|
409 | 556 | |
---|
410 | 557 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
433 | 580 | oe.radioPanel.add(dummyButton); |
---|
434 | 581 | oe.buttonGroup.add(dummyButton); |
---|
435 | 582 | */ |
---|
436 | | - aConstraints.gridy += 1; |
---|
437 | | - oe.aConstraints.gridwidth = 1; |
---|
438 | | - oe.aConstraints.gridx = 0; |
---|
| 583 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 584 | + |
---|
| 585 | + copyOptionsPanel.preferredHeight = 2; |
---|
439 | 586 | |
---|
440 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 587 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
| 588 | + |
---|
| 589 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 590 | + //minButton.setToolTipText("Minimize window"); |
---|
| 591 | + //minButton.addActionListener(this); |
---|
| 592 | + |
---|
| 593 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 594 | + maxButton.setToolTipText("Maximize window"); |
---|
| 595 | + maxButton.addActionListener(this); |
---|
| 596 | + |
---|
| 597 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 598 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 599 | + fullButton.addActionListener(this); |
---|
| 600 | + |
---|
| 601 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 603 | + restoreCameraButton.addActionListener(this); |
---|
| 604 | + |
---|
| 605 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 606 | + undoButton.setToolTipText("Undo changes"); |
---|
| 607 | + undoButton.addActionListener(this); |
---|
| 608 | + undoButton.setEnabled(false); |
---|
| 609 | + |
---|
| 610 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 611 | + redoButton.setToolTipText("Redo changes"); |
---|
| 612 | + redoButton.addActionListener(this); |
---|
| 613 | + redoButton.setEnabled(false); |
---|
| 614 | + |
---|
| 615 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 616 | + saveButton.setToolTipText("Save changes"); |
---|
| 617 | + saveButton.addActionListener(this); |
---|
| 618 | + |
---|
| 619 | + copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 620 | + liveCB.setToolTipText("Enable animation"); |
---|
441 | 621 | liveCB.addItemListener(this); |
---|
442 | 622 | |
---|
443 | | - oe.aConstraints.gridx += 1; |
---|
444 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
445 | | - supportCB.addItemListener(this); |
---|
446 | | - |
---|
447 | | - // oe.aConstraints.gridx += 1; |
---|
448 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
449 | | - // localCB.addItemListener(this); |
---|
450 | | - |
---|
451 | | - oe.aConstraints.gridx += 1; |
---|
452 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
453 | | - crowdCB.addItemListener(this); |
---|
454 | | - |
---|
455 | | - oe.aConstraints.gridx += 1; |
---|
456 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
457 | | - smoothCB.addItemListener(this); |
---|
458 | | - |
---|
459 | | - oe.aConstraints.gridx += 1; |
---|
460 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints); |
---|
| 623 | + copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 624 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 625 | + oneStepButton.addActionListener(this); |
---|
| 626 | + |
---|
| 627 | + copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 628 | + fastCB.setToolTipText("Fast mode"); |
---|
461 | 629 | fastCB.addItemListener(this); |
---|
462 | | - oe.aConstraints.gridx += 1; |
---|
463 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
464 | | - slowCB.addItemListener(this); |
---|
465 | | - oe.aConstraints.gridx += 1; |
---|
466 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
467 | | - boxCB.addItemListener(this); |
---|
468 | | - |
---|
469 | | -// oe.aConstraints.gridx += 1; |
---|
470 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
471 | | -// speakerMocapCB.addItemListener(this); |
---|
472 | | - |
---|
473 | | - if (false) |
---|
474 | | - { |
---|
475 | | - // handled in scripts |
---|
476 | | - oe.aConstraints.gridx += 1; |
---|
477 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
478 | | - speakerCameraCB.addItemListener(this); |
---|
479 | | - |
---|
480 | | - oe.aConstraints.gridx += 1; |
---|
481 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
482 | | - speakerFocusCB.addItemListener(this); |
---|
483 | | - |
---|
484 | | - oe.aConstraints.gridx += 1; |
---|
485 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
486 | | - smoothfocusCB.addItemListener(this); |
---|
487 | | - } |
---|
488 | | - |
---|
489 | | -//oe.aConstraints.gridx += 1; |
---|
490 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
491 | | -// debugCB.addItemListener(this); |
---|
492 | | - |
---|
493 | | - oe.aConstraints.gridx += 1; |
---|
494 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
495 | | - oeilCB.addItemListener(this); |
---|
496 | | - |
---|
497 | | - oe.aConstraints.gridx += 1; |
---|
498 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
499 | | - lookAtCB.addItemListener(this); |
---|
500 | | - |
---|
501 | | - oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
503 | | - trackCB.addItemListener(this); |
---|
504 | | - |
---|
505 | | - oe.aConstraints.gridx += 1; |
---|
506 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 630 | + |
---|
| 631 | + //oe.toolboxPanel.Return(); |
---|
| 632 | + |
---|
| 633 | + copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 634 | + screenfitButton.setToolTipText("Screen fit"); |
---|
507 | 635 | screenfitButton.addActionListener(this); |
---|
508 | | - oe.aConstraints.gridx += 1; |
---|
| 636 | + |
---|
| 637 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 638 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 639 | +// trackCB.addItemListener(this); |
---|
| 640 | + |
---|
509 | 641 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
510 | 642 | // screenfitpointButton.addActionListener(this); |
---|
511 | | -// oe.aConstraints.gridx += 1; |
---|
512 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
513 | | - snapobjectButton.addActionListener(this); |
---|
514 | | - oe.aConstraints.gridx += 1; |
---|
515 | 643 | |
---|
516 | | - //aConstraints.gridx = 0; |
---|
517 | | - //aConstraints.gridy += 1; |
---|
518 | | - oe.aConstraints.weighty = 0; |
---|
519 | | - oe.aConstraints.gridwidth = 1; |
---|
520 | | - |
---|
521 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
522 | | - flashSelectionButton.addActionListener(this); |
---|
| 644 | + if (Globals.ADVANCED) |
---|
| 645 | + { |
---|
| 646 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 647 | + snapobjectButton.addActionListener(this); |
---|
| 648 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 649 | + } |
---|
| 650 | + |
---|
| 651 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
523 | 652 | |
---|
524 | | - oe.toolbarPanel.add(new cButton(" ", false)); |
---|
525 | | - |
---|
526 | | - oe.aConstraints.gridx += 1; |
---|
527 | | - oe.aConstraints.weighty = 0; |
---|
528 | | - oe.aConstraints.gridwidth = 1; |
---|
529 | | - |
---|
530 | | - // |
---|
531 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 653 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 654 | + twoButton.setToolTipText("Show center view only"); |
---|
532 | 655 | twoButton.addActionListener(this); |
---|
533 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 656 | + this.fullscreenLayout = twoButton; |
---|
| 657 | + |
---|
| 658 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
534 | 659 | fourButton.addActionListener(this); |
---|
535 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 660 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 661 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 662 | + sixButton.setToolTipText("2-column layout left"); |
---|
536 | 663 | sixButton.addActionListener(this); |
---|
537 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 664 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 665 | + threeButton.setToolTipText("2-column layout right"); |
---|
538 | 666 | threeButton.addActionListener(this); |
---|
539 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 667 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 668 | + sevenButton.setToolTipText("3-column layout"); |
---|
540 | 669 | sevenButton.addActionListener(this); |
---|
541 | 670 | // |
---|
542 | 671 | |
---|
543 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 672 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 673 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
544 | 674 | rootButton.addActionListener(this); |
---|
545 | | - oe.aConstraints.gridx += 1; |
---|
546 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 675 | + |
---|
| 676 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 677 | + closeButton.setToolTipText("Close tab"); |
---|
547 | 678 | closeButton.addActionListener(this); |
---|
548 | 679 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
549 | 680 | //clearButton.addActionListener(this); |
---|
550 | | - oe.aConstraints.gridx += 1; |
---|
551 | | - |
---|
552 | | - oe.aConstraints.gridx = 1; // |
---|
553 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
554 | | - editButton.addActionListener(this); |
---|
555 | | - oe.aConstraints.gridx += 1; |
---|
556 | | - oe.aConstraints.weighty = 0; |
---|
557 | | - oe.aConstraints.gridwidth = 1; |
---|
558 | 681 | |
---|
559 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 682 | + // INSERT |
---|
| 683 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 684 | + gridButton.setToolTipText("Create grid"); |
---|
| 685 | + gridButton.addActionListener(this); |
---|
| 686 | + |
---|
| 687 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 688 | + boxButton.setToolTipText("Create box"); |
---|
| 689 | + boxButton.addActionListener(this); |
---|
| 690 | + |
---|
| 691 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 692 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 693 | + sphereButton.addActionListener(this); |
---|
| 694 | + |
---|
| 695 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 696 | + coneButton.setToolTipText("Create cone"); |
---|
| 697 | + coneButton.addActionListener(this); |
---|
| 698 | + |
---|
| 699 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 700 | + torusButton.setToolTipText("Create torus"); |
---|
| 701 | + torusButton.addActionListener(this); |
---|
| 702 | + |
---|
| 703 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 704 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 705 | + superButton.addActionListener(this); |
---|
| 706 | + |
---|
| 707 | + if (Globals.ADVANCED) |
---|
| 708 | + { |
---|
| 709 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 710 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 711 | + kleinButton.addActionListener(this); |
---|
| 712 | + } |
---|
| 713 | + |
---|
| 714 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 715 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 716 | + particlesButton.addActionListener(this); |
---|
| 717 | + |
---|
| 718 | + oe.toolboxPanel.Return(); |
---|
| 719 | + |
---|
| 720 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 721 | + groupButton.setToolTipText("Create group"); |
---|
| 722 | + groupButton.addActionListener(this); |
---|
| 723 | + |
---|
| 724 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 725 | + compositeButton.setToolTipText("Create composite"); |
---|
| 726 | + compositeButton.addActionListener(this); |
---|
| 727 | + |
---|
| 728 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 729 | + switchButton.setToolTipText("Create switch"); |
---|
| 730 | + switchButton.addActionListener(this); |
---|
| 731 | + |
---|
| 732 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 733 | + loopButton.setToolTipText("Create loop"); |
---|
| 734 | + loopButton.addActionListener(this); |
---|
| 735 | + |
---|
| 736 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 737 | + textureButton.setToolTipText("Create texture"); |
---|
| 738 | + textureButton.addActionListener(this); |
---|
| 739 | + |
---|
| 740 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 741 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 742 | + overlayButton.addActionListener(this); |
---|
| 743 | + |
---|
| 744 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 745 | + lightButton.setToolTipText("Create light"); |
---|
| 746 | + lightButton.addActionListener(this); |
---|
| 747 | + |
---|
| 748 | + for (int i=6; --i>=0;) |
---|
| 749 | + { |
---|
| 750 | + oe.toolboxPanel.Return(); |
---|
| 751 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 752 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 753 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 754 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 755 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 756 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 757 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 758 | + } |
---|
| 759 | + |
---|
| 760 | + // EDIT panel |
---|
| 761 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 762 | + editButton.setToolTipText("Pin selection controls"); |
---|
| 763 | + editButton.addActionListener(this); |
---|
| 764 | + |
---|
| 765 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 766 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
560 | 767 | uneditButton.addActionListener(this); |
---|
561 | 768 | |
---|
562 | | - oe.aConstraints.gridx += 1; |
---|
563 | | - oe.aConstraints.weighty = 0; |
---|
564 | | - oe.aConstraints.gridwidth = 1; |
---|
565 | | - |
---|
566 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
567 | | - clearPanelButton.addActionListener(this); |
---|
568 | | - |
---|
569 | | - oe.aConstraints.gridx += 1; |
---|
570 | | - oe.aConstraints.weighty = 0; |
---|
571 | | - oe.aConstraints.gridwidth = 1; |
---|
572 | | - |
---|
573 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 769 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 770 | + allParamsButton.setToolTipText("Show all controle"); |
---|
574 | 771 | allParamsButton.addActionListener(this); |
---|
575 | 772 | |
---|
576 | | - oe.aConstraints.gridx += 1; |
---|
577 | | - oe.aConstraints.weighty = 0; |
---|
578 | | - oe.aConstraints.gridwidth = 1; |
---|
579 | | - |
---|
580 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 773 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 774 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 775 | + clearPanelButton.addActionListener(this); |
---|
| 776 | + |
---|
| 777 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 778 | + unselectButton.setToolTipText("Unselect"); |
---|
581 | 779 | unselectButton.addActionListener(this); |
---|
582 | 780 | |
---|
| 781 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 782 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 783 | + flashSelectionButton.addActionListener(this); |
---|
| 784 | + |
---|
| 785 | + editCommandsPanel.preferredHeight = 1; |
---|
| 786 | + |
---|
| 787 | + SetPinStates(false); |
---|
| 788 | +// oe.treePanel.add(commandsPanel); |
---|
| 789 | +// oe.treePanel.Return(); |
---|
| 790 | + |
---|
583 | 791 | // oe.aConstraints.gridx += 1; |
---|
584 | 792 | // oe.aConstraints.weighty = 0; |
---|
585 | 793 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
591 | 799 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
592 | 800 | // gcButton.addActionListener(this); |
---|
593 | 801 | |
---|
594 | | - oe.aConstraints.gridx = 0; |
---|
595 | | - oe.aConstraints.gridy += 1; |
---|
596 | | - |
---|
597 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
598 | | - oe.aConstraints.gridwidth = 100; |
---|
599 | | - // oe.aConstraints.gridheight = 100; |
---|
600 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
601 | | - oe.aConstraints.gridheight = 1; |
---|
602 | | - oe.aConstraints.weighty = 0.5; |
---|
603 | | - oe.aConstraints.gridx = 0; |
---|
604 | | - JScrollPane jSP; |
---|
| 802 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 803 | + |
---|
| 804 | + JScrollPane jSP; |
---|
605 | 805 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
606 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 806 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
607 | 807 | ResetModel(); |
---|
608 | | - oe.aConstraints.weighty = 0.5; |
---|
609 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
610 | | - oe.aConstraints.gridy += 1; |
---|
611 | | - oe.aConstraints.gridwidth = 1; |
---|
612 | | - |
---|
613 | | - oe.aConstraints.weighty = 0; |
---|
614 | | - oe.aConstraints.gridwidth = 2; |
---|
615 | | - |
---|
616 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
617 | | - colorCB.addItemListener(this); |
---|
618 | | - oe.aConstraints.gridx += 2; |
---|
619 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
620 | | - materialCB.addItemListener(this); |
---|
621 | | - oe.aConstraints.gridx += 2; |
---|
622 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
623 | | - textureCB.addItemListener(this); |
---|
624 | | - |
---|
625 | | - oe.aConstraints.gridx = 0; |
---|
626 | | - oe.aConstraints.gridy += 1; |
---|
627 | 808 | |
---|
| 809 | + oe.treePanel.add(jSPPanel); |
---|
| 810 | + oe.treePanel.Return(); |
---|
| 811 | + |
---|
| 812 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 813 | + oe.treePanel.Return(); |
---|
| 814 | + |
---|
| 815 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 816 | +// mainPanel.setResizeWeight(0.5); |
---|
| 817 | + |
---|
628 | 818 | //jList.addListSelectionListener(this); |
---|
629 | 819 | oe.jTree.addTreeSelectionListener(this); |
---|
630 | 820 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
646 | 836 | radio.layout = sevenButton; |
---|
647 | 837 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
648 | 838 | } |
---|
| 839 | + |
---|
| 840 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 841 | + { |
---|
| 842 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 843 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 844 | + colorCB.addItemListener(this); |
---|
| 845 | + |
---|
| 846 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 847 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 848 | + materialCB.addItemListener(this); |
---|
| 849 | + |
---|
| 850 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 851 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 852 | + textureCB.addItemListener(this); |
---|
| 853 | + |
---|
| 854 | + panel.Return(); |
---|
| 855 | + |
---|
| 856 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 857 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 858 | + boxCB.addItemListener(this); |
---|
| 859 | + |
---|
| 860 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 861 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
| 862 | + zoomBoxCB.addItemListener(this); |
---|
| 863 | + |
---|
| 864 | + if (true) // Globals.ADVANCED) |
---|
| 865 | + { |
---|
| 866 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 867 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 868 | + supportCB.addItemListener(this); |
---|
| 869 | + |
---|
| 870 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 871 | + // localCB.addItemListener(this); |
---|
| 872 | + |
---|
| 873 | + panel.Return(); |
---|
| 874 | + |
---|
| 875 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 876 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 877 | + crowdCB.addItemListener(this); |
---|
| 878 | + |
---|
| 879 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 880 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 881 | + smoothCB.addItemListener(this); |
---|
| 882 | + |
---|
| 883 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 884 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 885 | + slowCB.addItemListener(this); |
---|
| 886 | + |
---|
| 887 | +// constraints.gridy += 1; |
---|
| 888 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 889 | +// speakerMocapCB.addItemListener(this); |
---|
| 890 | + |
---|
| 891 | + panel.Return(); |
---|
| 892 | + |
---|
| 893 | + if (false) |
---|
| 894 | + { |
---|
| 895 | + // handled in scripts |
---|
| 896 | + //constraints.gridy += 1; |
---|
| 897 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 898 | + speakerCameraCB.addItemListener(this); |
---|
| 899 | + |
---|
| 900 | + //constraints.gridy += 1; |
---|
| 901 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 902 | + speakerFocusCB.addItemListener(this); |
---|
| 903 | + |
---|
| 904 | + //constraints.gridy += 1; |
---|
| 905 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 906 | + smoothfocusCB.addItemListener(this); |
---|
| 907 | + panel.Return(); |
---|
| 908 | + } |
---|
| 909 | + |
---|
| 910 | +//constraints.gridx += 1; |
---|
| 911 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 912 | +// debugCB.addItemListener(this); |
---|
| 913 | + |
---|
| 914 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 915 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 916 | + trackCB.addItemListener(this); |
---|
| 917 | + |
---|
| 918 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 919 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
| 920 | + oeilCB.addItemListener(this); |
---|
| 921 | + |
---|
| 922 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 923 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 924 | + shadowCB.addItemListener(this); |
---|
| 925 | + |
---|
| 926 | + panel.Return(); |
---|
| 927 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 928 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 929 | + toggleTextureCB.addItemListener(this); |
---|
| 930 | + |
---|
| 931 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 932 | + toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 933 | + toggleSwitchCB.addItemListener(this); |
---|
| 934 | + |
---|
| 935 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 936 | + autosaveCB.setToolTipText("On structure change"); |
---|
| 937 | + autosaveCB.addItemListener(this); |
---|
| 938 | + |
---|
| 939 | + panel.Return(); |
---|
| 940 | + if (Globals.ADVANCED) |
---|
| 941 | + { |
---|
| 942 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 943 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 944 | + lookAtCB.addItemListener(this); |
---|
| 945 | + } |
---|
| 946 | + |
---|
| 947 | + } |
---|
| 948 | + |
---|
| 949 | + cGridBag fill = new cGridBag(); |
---|
| 950 | + fill.preferredHeight = 200; |
---|
| 951 | + cGridBag fill2 = new cGridBag(); |
---|
| 952 | + fill2.preferredHeight = 200; |
---|
| 953 | + cGridBag fill3 = new cGridBag(); |
---|
| 954 | + fill3.preferredHeight = 200; |
---|
| 955 | + |
---|
| 956 | + panel.add(fill); |
---|
| 957 | + panel.add(fill2); |
---|
| 958 | + panel.add(fill3); |
---|
| 959 | + |
---|
| 960 | + } |
---|
649 | 961 | |
---|
650 | 962 | void EditObject(Object3D obj) |
---|
651 | 963 | { |
---|
652 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
653 | | - dummyButton.SetObject(obj); |
---|
654 | | - dummyButton.layout = sevenButton; |
---|
655 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
656 | | - dummyButton.addActionListener(this); |
---|
657 | | - radioPanel.add(dummyButton); |
---|
658 | | - buttonGroup.add(dummyButton); |
---|
659 | | - dummyButton.doClick(); |
---|
| 964 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 965 | + |
---|
| 966 | + // Patch to avoid bug with transparency. |
---|
| 967 | + radioButton.hadMaterial = obj.material != null; |
---|
| 968 | + if (!radioButton.hadMaterial) |
---|
| 969 | + { |
---|
| 970 | + obj.material = new cMaterial(); |
---|
| 971 | + } |
---|
| 972 | + |
---|
| 973 | + radioButton.SetObject(obj); |
---|
| 974 | + radioButton.layout = sevenButton; |
---|
| 975 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 976 | + radioButton.addActionListener(this); |
---|
| 977 | + radioPanel.add(radioButton); |
---|
| 978 | + buttonGroup.add(radioButton); |
---|
| 979 | + radioButton.doClick(); |
---|
660 | 980 | } |
---|
| 981 | + |
---|
661 | 982 | void SetupViews(ObjEditor oe) |
---|
662 | 983 | { |
---|
| 984 | + theFrame = this; |
---|
| 985 | + |
---|
663 | 986 | oe.SetupViews(); |
---|
664 | 987 | |
---|
665 | 988 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
668 | 991 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
669 | 992 | } |
---|
670 | 993 | |
---|
671 | | - JCheckBox liveCB; |
---|
672 | | - JCheckBox supportCB; |
---|
673 | | - JCheckBox localCB; |
---|
674 | | - JCheckBox crowdCB; |
---|
675 | | - JCheckBox smoothCB; |
---|
676 | | - JCheckBox fastCB; |
---|
677 | | - JCheckBox slowCB; |
---|
678 | | - JCheckBox boxCB; |
---|
679 | | - JCheckBox trackCB; |
---|
680 | | - JCheckBox smoothfocusCB; |
---|
| 994 | + cToggleButton liveCB; |
---|
| 995 | + cCheckBox supportCB; |
---|
| 996 | + cCheckBox localCB; |
---|
| 997 | + cCheckBox crowdCB; |
---|
| 998 | + cCheckBox smoothCB; |
---|
| 999 | + cToggleButton fastCB; |
---|
| 1000 | + cCheckBox slowCB; |
---|
| 1001 | + cCheckBox boxCB; |
---|
| 1002 | + cCheckBox zoomBoxCB; |
---|
| 1003 | + //cToggleButton trackCB; |
---|
| 1004 | + cCheckBox trackCB; |
---|
| 1005 | + cCheckBox smoothfocusCB; |
---|
681 | 1006 | // JCheckBox speakerMocapCB; |
---|
682 | | - JCheckBox speakerCameraCB; |
---|
683 | | - JCheckBox speakerFocusCB; |
---|
684 | | - JCheckBox debugCB; |
---|
685 | | - JCheckBox oeilCB; |
---|
686 | | - JCheckBox lookAtCB; |
---|
| 1007 | + cCheckBox speakerCameraCB; |
---|
| 1008 | + cCheckBox speakerFocusCB; |
---|
| 1009 | + cCheckBox debugCB; |
---|
| 1010 | + |
---|
| 1011 | + cCheckBox oeilCB; |
---|
| 1012 | + cCheckBox shadowCB; |
---|
| 1013 | + cCheckBox autosaveCB; |
---|
| 1014 | + cCheckBox lookAtCB; |
---|
687 | 1015 | |
---|
688 | 1016 | // static int COLOR = 1; |
---|
689 | 1017 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
691 | 1019 | |
---|
692 | 1020 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
693 | 1021 | |
---|
694 | | - JCheckBox colorCB; |
---|
695 | | - JCheckBox materialCB; |
---|
696 | | - JCheckBox textureCB; |
---|
| 1022 | + cCheckBox colorCB; |
---|
| 1023 | + cCheckBox materialCB; |
---|
| 1024 | + cCheckBox textureCB; |
---|
697 | 1025 | |
---|
698 | 1026 | public void itemStateChanged(ItemEvent e) |
---|
699 | 1027 | { |
---|
.. | .. |
---|
721 | 1049 | } else if(e.getSource() == liveCB) |
---|
722 | 1050 | { |
---|
723 | 1051 | cameraView.ToggleLive(); |
---|
| 1052 | + refreshContents(false); |
---|
724 | 1053 | } |
---|
725 | 1054 | else if(e.getSource() == supportCB) |
---|
726 | 1055 | { |
---|
.. | .. |
---|
756 | 1085 | cameraView.repaint(); |
---|
757 | 1086 | // refreshContents(); |
---|
758 | 1087 | } |
---|
| 1088 | + else if(e.getSource() == zoomBoxCB) |
---|
| 1089 | + { |
---|
| 1090 | + cameraView.ToggleZoomBoxMode(); |
---|
| 1091 | + } |
---|
759 | 1092 | else if(e.getSource() == smoothfocusCB) |
---|
760 | 1093 | { |
---|
761 | 1094 | cameraView.ToggleSmoothFocus(); |
---|
.. | .. |
---|
781 | 1114 | { |
---|
782 | 1115 | cameraView.ToggleOeil(); |
---|
783 | 1116 | } |
---|
| 1117 | + else if(e.getSource() == shadowCB) |
---|
| 1118 | + { |
---|
| 1119 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1120 | + } |
---|
| 1121 | + else if(e.getSource() == autosaveCB) |
---|
| 1122 | + { |
---|
| 1123 | + Globals.SAVEONMAKE ^= true; |
---|
| 1124 | + } |
---|
784 | 1125 | else if(e.getSource() == lookAtCB) |
---|
785 | 1126 | { |
---|
786 | 1127 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
797 | 1138 | |
---|
798 | 1139 | /**/ |
---|
799 | 1140 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
800 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1141 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1142 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
801 | 1143 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
802 | 1144 | // We can't move the root node or an empty selection |
---|
803 | 1145 | return; |
---|
.. | .. |
---|
869 | 1211 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
870 | 1212 | // return; |
---|
871 | 1213 | // } |
---|
872 | | - if (string.charAt(0) == '/') |
---|
| 1214 | + |
---|
| 1215 | + // File path for Mac and Windows |
---|
| 1216 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
873 | 1217 | { |
---|
874 | 1218 | // file(s) |
---|
875 | 1219 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
896 | 1240 | |
---|
897 | 1241 | flashIt = false; |
---|
898 | 1242 | CameraPane pane = (CameraPane) target; |
---|
899 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1243 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
900 | 1244 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
901 | 1245 | |
---|
902 | 1246 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
912 | 1256 | |
---|
913 | 1257 | assert target == objEditor.jTree; |
---|
914 | 1258 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1259 | + Object3D destinationLeaf; |
---|
915 | 1260 | try { |
---|
916 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1261 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
917 | 1262 | } catch (Exception e) { |
---|
918 | 1263 | System.out.println("destinationPath : " + destinationPath); |
---|
919 | 1264 | return; |
---|
920 | 1265 | } |
---|
921 | 1266 | |
---|
922 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1267 | + for (int i=group.selection.size(); --i>=0;) |
---|
923 | 1268 | { |
---|
| 1269 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1270 | + |
---|
| 1271 | + // Cannot move into itself |
---|
| 1272 | + if (child == destinationLeaf) |
---|
| 1273 | + return; |
---|
| 1274 | + } |
---|
| 1275 | + |
---|
| 1276 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1277 | +// { |
---|
924 | 1278 | loadClipboard(true); |
---|
925 | 1279 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
926 | | - pasteInto(false); |
---|
927 | | - } else { |
---|
928 | | - loadClipboard(false); |
---|
929 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
930 | | - pasteInto(false); // true); // ??? |
---|
931 | | - } |
---|
| 1280 | + pasteInto(false, false); |
---|
| 1281 | +// } else { |
---|
| 1282 | +// loadClipboard(false); |
---|
| 1283 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1284 | +// pasteInto(false, false); // true); // ??? |
---|
| 1285 | +// } |
---|
932 | 1286 | } |
---|
933 | 1287 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
934 | 1288 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1033 | 1387 | { |
---|
1034 | 1388 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1035 | 1389 | //heightFieldItem.addActionListener(this); |
---|
1036 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1037 | | - gridItem.addActionListener(this); |
---|
1038 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1039 | | - rectoidItem.addActionListener(this); |
---|
1040 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1041 | | - ellipsoidItem.addActionListener(this); |
---|
1042 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1043 | | - coneItem.addActionListener(this); |
---|
1044 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1045 | | - torusItem.addActionListener(this); |
---|
1046 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1047 | | - superItem.addActionListener(this); |
---|
| 1390 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1391 | +// gridItem.addActionListener(this); |
---|
| 1392 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1393 | +// rectoidItem.addActionListener(this); |
---|
| 1394 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1395 | +// ellipsoidItem.addActionListener(this); |
---|
| 1396 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1397 | +// coneItem.addActionListener(this); |
---|
| 1398 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1399 | +// torusItem.addActionListener(this); |
---|
| 1400 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1401 | +// superItem.addActionListener(this); |
---|
| 1402 | + |
---|
| 1403 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1404 | + cameraItem.addActionListener(this); |
---|
| 1405 | + |
---|
| 1406 | + if (!Globals.ADVANCED) |
---|
| 1407 | + { |
---|
1048 | 1408 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1049 | 1409 | kleinItem.addActionListener(this); |
---|
1050 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1051 | | - particleItem.addActionListener(this); |
---|
| 1410 | + } |
---|
| 1411 | + |
---|
| 1412 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1413 | +// particleItem.addActionListener(this); |
---|
| 1414 | + if (Globals.ADVANCED) |
---|
| 1415 | + { |
---|
1052 | 1416 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1053 | 1417 | ragdollItem.addActionListener(this); |
---|
1054 | 1418 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1055 | 1419 | ragdoll2Item.addActionListener(this); |
---|
| 1420 | + } |
---|
1056 | 1421 | menu.add("-"); |
---|
1057 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1422 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1058 | 1423 | meshItem.addActionListener(this); |
---|
1059 | 1424 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1060 | 1425 | // meshGroupItem.addActionListener(this); |
---|
| 1426 | + if (Globals.ADVANCED) |
---|
| 1427 | + { |
---|
1061 | 1428 | springItem = menu.add(new MenuItem("Spring")); |
---|
1062 | 1429 | springItem.addActionListener(this); |
---|
1063 | 1430 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1064 | 1431 | flagItem.addActionListener(this); |
---|
1065 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1066 | | - bezierItem.addActionListener(this); |
---|
1067 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1068 | | - checkerItem.addActionListener(this); |
---|
1069 | 1432 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1070 | 1433 | blobItem.addActionListener(this); |
---|
1071 | 1434 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1072 | 1435 | latheItem.addActionListener(this); |
---|
1073 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1074 | | - lightItem.addActionListener(this); |
---|
| 1436 | + } |
---|
| 1437 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1438 | + bezierItem.addActionListener(this); |
---|
| 1439 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1440 | +// overlayItem.addActionListener(this); |
---|
| 1441 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1442 | +// lightItem.addActionListener(this); |
---|
1075 | 1443 | menu.add("-"); |
---|
1076 | 1444 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1077 | 1445 | //superLoopItem.addActionListener(this); |
---|
1078 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1079 | | - loopItem.addActionListener(this); |
---|
| 1446 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1447 | +// loopItem.addActionListener(this); |
---|
1080 | 1448 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1081 | 1449 | doubleItem.addActionListener(this); |
---|
| 1450 | + if (Globals.ADVANCED) |
---|
| 1451 | + { |
---|
1082 | 1452 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1083 | 1453 | tripleItem.addActionListener(this); |
---|
| 1454 | + } |
---|
1084 | 1455 | } |
---|
1085 | 1456 | |
---|
1086 | 1457 | void buildToolsMenu(Menu menu) |
---|
1087 | 1458 | { |
---|
1088 | 1459 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1089 | 1460 | animationItem.addItemListener(this); |
---|
1090 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1461 | + animationItem.setState(Globals.ANIMATION); |
---|
1091 | 1462 | |
---|
1092 | 1463 | menu.add("-"); |
---|
1093 | 1464 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1094 | 1465 | parseverticesItem.addActionListener(this); |
---|
1095 | 1466 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1096 | 1467 | textureFieldItem.addActionListener(this); |
---|
1097 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1468 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1098 | 1469 | alignItem.addActionListener(this); |
---|
1099 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1100 | | - mirrorItem.addActionListener(this); |
---|
1101 | 1470 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1102 | 1471 | reduceMorphItem.addActionListener(this); |
---|
1103 | 1472 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1104 | 1473 | reduce34MorphItem.addActionListener(this); |
---|
1105 | | - |
---|
| 1474 | + menu.add("-"); |
---|
1106 | 1475 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1107 | 1476 | computeAOItem.addActionListener(this); |
---|
1108 | | - menu.add("-"); |
---|
1109 | 1477 | |
---|
| 1478 | + if (Globals.ADVANCED) |
---|
| 1479 | + { |
---|
| 1480 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1481 | + mirrorItem.addActionListener(this); |
---|
| 1482 | + menu.add("-"); |
---|
1110 | 1483 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1111 | 1484 | memoryItem.addActionListener(this); |
---|
1112 | 1485 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1113 | 1486 | analyzeItem.addActionListener(this); |
---|
1114 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1487 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1115 | 1488 | dumpItem.addActionListener(this); |
---|
1116 | 1489 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1117 | 1490 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1120 | 1493 | resetParentItem.addActionListener(this); |
---|
1121 | 1494 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1122 | 1495 | repairParentItem.addActionListener(this); |
---|
| 1496 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1497 | + repairShadowItem.addActionListener(this); |
---|
1123 | 1498 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1124 | 1499 | invariantsItem.addActionListener(this); |
---|
1125 | 1500 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1127 | 1502 | menu.add("-"); |
---|
1128 | 1503 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1129 | 1504 | editScriptItem.addActionListener(this); |
---|
| 1505 | + } |
---|
1130 | 1506 | } |
---|
1131 | 1507 | |
---|
1132 | 1508 | void ScreenFit() |
---|
.. | .. |
---|
1249 | 1625 | shadow.material = new cMaterial(obj.material); |
---|
1250 | 1626 | shadow.material.diffuse = 0.0001f; |
---|
1251 | 1627 | shadow.material.specular = 0.0001f; |
---|
| 1628 | + //shadow.projectedVertices[1].x = 300; |
---|
1252 | 1629 | |
---|
1253 | 1630 | makeSomething(shadow); |
---|
1254 | 1631 | } |
---|
| 1632 | + |
---|
| 1633 | + private void ClearUnpinned() |
---|
| 1634 | + { |
---|
| 1635 | + //for (Object3D obj : listUI) |
---|
| 1636 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1637 | + { |
---|
| 1638 | + Object3D obj = listUI.elementAt(i); |
---|
| 1639 | + if (!obj.pinned) |
---|
| 1640 | + { |
---|
| 1641 | + obj.CloseUI(); |
---|
| 1642 | + listUI.remove(i); |
---|
| 1643 | + } |
---|
| 1644 | + } |
---|
| 1645 | + } |
---|
1255 | 1646 | |
---|
1256 | 1647 | /** |
---|
1257 | 1648 | * applyExample |
---|
.. | .. |
---|
1455 | 1846 | |
---|
1456 | 1847 | void Overwrite(int mask) |
---|
1457 | 1848 | { |
---|
1458 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1849 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1459 | 1850 | { |
---|
1460 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1851 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1461 | 1852 | |
---|
1462 | 1853 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1463 | 1854 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1480 | 1871 | // |
---|
1481 | 1872 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1482 | 1873 | { |
---|
| 1874 | + Object source = event.getSource(); |
---|
1483 | 1875 | /* |
---|
1484 | 1876 | if (event.getSource() == nameField) |
---|
1485 | 1877 | { |
---|
.. | .. |
---|
1491 | 1883 | } |
---|
1492 | 1884 | else |
---|
1493 | 1885 | */ |
---|
1494 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1886 | + if (source == lookAtItem || source == lookFromItem) |
---|
1495 | 1887 | { |
---|
1496 | 1888 | ScreenFit(); |
---|
1497 | 1889 | } else |
---|
1498 | | - if (event.getSource() == switchItem) |
---|
| 1890 | + if (source == switchViewItem) |
---|
1499 | 1891 | { |
---|
1500 | 1892 | cVector v1 = new cVector(); |
---|
1501 | 1893 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1504 | 1896 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1505 | 1897 | objEditor.cameraView.repaint(); |
---|
1506 | 1898 | } else |
---|
1507 | | - if (event.getSource() == rectoidItem) |
---|
| 1899 | + if (source == rectoidItem || source == boxButton) |
---|
1508 | 1900 | { |
---|
1509 | 1901 | makeSomething(new Box()); |
---|
1510 | 1902 | } else |
---|
1511 | | - if (event.getSource() == particleItem) |
---|
| 1903 | + if (source == particleItem || source == particlesButton) |
---|
1512 | 1904 | { |
---|
1513 | 1905 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1514 | 1906 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1529 | 1921 | applyExample(particleGeom, "SMOKE"); |
---|
1530 | 1922 | makeSomething(particleGeom); |
---|
1531 | 1923 | } else |
---|
1532 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1924 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1533 | 1925 | { |
---|
1534 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1926 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1535 | 1927 | |
---|
1536 | 1928 | ragdoll.toParent = LA.newMatrix(); |
---|
1537 | 1929 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1549 | 1941 | } else |
---|
1550 | 1942 | /* |
---|
1551 | 1943 | */ |
---|
1552 | | - if (event.getSource() == heightFieldItem) |
---|
| 1944 | + if (source == heightFieldItem) |
---|
1553 | 1945 | { |
---|
1554 | 1946 | Object3D obj = new Object3D(); |
---|
1555 | 1947 | |
---|
.. | .. |
---|
1587 | 1979 | |
---|
1588 | 1980 | makeSomething(obj); |
---|
1589 | 1981 | } else |
---|
1590 | | - if (event.getSource() == gridItem) |
---|
| 1982 | + if (source == gridItem || source == gridButton) |
---|
1591 | 1983 | { |
---|
1592 | 1984 | makeSomething(new Grid()); |
---|
1593 | 1985 | } else |
---|
1594 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1986 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1595 | 1987 | { |
---|
1596 | 1988 | makeSomething(new Sphere()); |
---|
1597 | 1989 | } else |
---|
1598 | | - if (event.getSource() == coneItem) |
---|
| 1990 | + if (source == coneItem || source == coneButton) |
---|
1599 | 1991 | { |
---|
1600 | 1992 | makeSomething(new Cone()); |
---|
1601 | 1993 | } else |
---|
1602 | | - if (event.getSource() == torusItem) |
---|
| 1994 | + if (source == torusItem || source == torusButton) |
---|
1603 | 1995 | { |
---|
1604 | 1996 | makeSomething(new Torus()); |
---|
1605 | 1997 | } else |
---|
1606 | | - if (event.getSource() == superItem) |
---|
| 1998 | + if (source == superItem || source == superButton) |
---|
1607 | 1999 | { |
---|
1608 | 2000 | makeSomething(new Superellipsoid()); |
---|
1609 | 2001 | } else |
---|
1610 | | - if (event.getSource() == kleinItem) |
---|
| 2002 | + if (source == kleinItem || source == kleinButton) |
---|
1611 | 2003 | { |
---|
1612 | 2004 | makeSomething(new Klein()); |
---|
1613 | 2005 | } else |
---|
1614 | | - if (event.getSource() == blobItem) |
---|
| 2006 | + if (source == blobItem) |
---|
1615 | 2007 | { |
---|
1616 | 2008 | Blob blob = new Blob(); |
---|
1617 | 2009 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1619 | 2011 | //blob.retile(); |
---|
1620 | 2012 | makeSomething(blob); |
---|
1621 | 2013 | } else |
---|
1622 | | - if (event.getSource() == latheItem) |
---|
| 2014 | + if (source == latheItem) |
---|
1623 | 2015 | { |
---|
1624 | 2016 | makeSomething(new Lathe()); |
---|
1625 | 2017 | } else |
---|
1626 | | - if (event.getSource() == bezierItem) |
---|
| 2018 | + if (source == bezierItem) |
---|
1627 | 2019 | { |
---|
1628 | 2020 | makeSomething(new BezierSurface()); |
---|
1629 | 2021 | } else |
---|
1630 | | - if (event.getSource() == checkerItem) |
---|
| 2022 | + if (source == overlayItem || source == overlayButton) |
---|
1631 | 2023 | { |
---|
1632 | 2024 | /* |
---|
1633 | 2025 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1642 | 2034 | */ |
---|
1643 | 2035 | makeSomething(new Checker()); |
---|
1644 | 2036 | } else |
---|
1645 | | - if (event.getSource() == meshItem) |
---|
| 2037 | + if (source == meshItem) |
---|
1646 | 2038 | { |
---|
1647 | 2039 | Object3D itemtomake = new Object3D(); |
---|
1648 | 2040 | Object3D child; |
---|
.. | .. |
---|
1663 | 2055 | makeSomething(child); |
---|
1664 | 2056 | } |
---|
1665 | 2057 | } else |
---|
1666 | | - if (event.getSource() == springItem) |
---|
| 2058 | + if (source == springItem) |
---|
1667 | 2059 | { |
---|
1668 | 2060 | cSpring s = new cSpring(); |
---|
1669 | 2061 | s.setup(); |
---|
1670 | 2062 | makeSomething(s); |
---|
1671 | 2063 | } else |
---|
1672 | | - if (event.getSource() == flagItem) |
---|
| 2064 | + if (source == flagItem) |
---|
1673 | 2065 | { |
---|
1674 | 2066 | cSpring s = new cFlag(); |
---|
1675 | 2067 | s.setup(); |
---|
1676 | 2068 | makeSomething(s); |
---|
1677 | 2069 | } else |
---|
1678 | | - if (event.getSource() == lightItem) |
---|
| 2070 | + if (source == lightItem || source == lightButton) |
---|
1679 | 2071 | { |
---|
1680 | 2072 | makeSomething(new Light()); |
---|
1681 | 2073 | } else |
---|
1682 | | - if (event.getSource() == csgItem) |
---|
| 2074 | + if (source == csgItem) |
---|
1683 | 2075 | { |
---|
1684 | 2076 | group(new CSG()); |
---|
1685 | 2077 | } else |
---|
1686 | | - if (event.getSource() == templateItem) |
---|
| 2078 | + if (source == templateItem) |
---|
1687 | 2079 | { |
---|
1688 | 2080 | group(new cTemplate()); |
---|
1689 | 2081 | } else |
---|
1690 | | - if (event.getSource() == attributeItem) |
---|
| 2082 | + if (source == attributeItem) |
---|
1691 | 2083 | { |
---|
1692 | 2084 | makeSomething(new Attribute()); |
---|
1693 | 2085 | } else |
---|
1694 | | - if (event.getSource() == pointflowItem) |
---|
| 2086 | + if (source == pointflowItem) |
---|
1695 | 2087 | { |
---|
1696 | 2088 | makeSomething(new PointFlow()); |
---|
1697 | 2089 | } else |
---|
.. | .. |
---|
1703 | 2095 | } else |
---|
1704 | 2096 | */ |
---|
1705 | 2097 | |
---|
1706 | | - if (event.getSource() == superLoopItem) |
---|
| 2098 | + if (source == superLoopItem) |
---|
1707 | 2099 | { |
---|
1708 | 2100 | Composite g = new cGroup(); |
---|
1709 | 2101 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1725 | 2117 | |
---|
1726 | 2118 | group(g); |
---|
1727 | 2119 | } else |
---|
1728 | | - if (event.getSource() == loopItem) |
---|
| 2120 | + if (source == loopItem || source == loopButton) |
---|
1729 | 2121 | { |
---|
1730 | 2122 | Composite csg = new GroupLeaf(); |
---|
1731 | 2123 | csg.count = 5; |
---|
.. | .. |
---|
1734 | 2126 | csg.addChild(child); |
---|
1735 | 2127 | child.addChild(csg); |
---|
1736 | 2128 | } else |
---|
1737 | | - if (event.getSource() == doubleItem) |
---|
| 2129 | + if (source == doubleItem) |
---|
1738 | 2130 | { |
---|
1739 | 2131 | Composite csg = new GroupLeaf(); |
---|
1740 | 2132 | csg.count = 5; |
---|
.. | .. |
---|
1746 | 2138 | csg.addChild(child); |
---|
1747 | 2139 | child.addChild(csg); |
---|
1748 | 2140 | } else |
---|
1749 | | - if (event.getSource() == tripleItem) |
---|
| 2141 | + if (source == tripleItem) |
---|
1750 | 2142 | { |
---|
1751 | 2143 | Composite csg = new GroupLeaf(); |
---|
1752 | 2144 | csg.count = 4; |
---|
.. | .. |
---|
1761 | 2153 | csg.addChild(child); |
---|
1762 | 2154 | child.addChild(csg); |
---|
1763 | 2155 | } else |
---|
1764 | | - |
---|
1765 | | - if (event.getSource() == importGFDItem) |
---|
| 2156 | + if (source == computeAOItem) |
---|
1766 | 2157 | { |
---|
1767 | | - ImportGFD(); |
---|
| 2158 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 2159 | + Globals.theRenderer.repaint(); |
---|
1768 | 2160 | } else |
---|
1769 | | - if (event.getSource() == importVRMLX3DItem) |
---|
1770 | | - { |
---|
1771 | | - ImportVRMLX3D(); |
---|
1772 | | - } else |
---|
1773 | | - if (event.getSource() == import3DSItem) |
---|
1774 | | - { |
---|
1775 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1776 | | - } else |
---|
1777 | | - if (event.getSource() == importOBJItem) |
---|
1778 | | - { |
---|
1779 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1780 | | - } else |
---|
1781 | | - if (event.getSource() == computeAOItem) |
---|
1782 | | - { |
---|
1783 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1784 | | - CameraPane.theRenderer.repaint(); |
---|
1785 | | - } else |
---|
1786 | | - if (event.getSource() == recompileItem) |
---|
| 2161 | + if (source == recompileItem) |
---|
1787 | 2162 | { |
---|
1788 | 2163 | Recompile(); |
---|
1789 | 2164 | refreshContents(); |
---|
1790 | 2165 | } else |
---|
1791 | | - if (event.getSource() == editScriptItem) |
---|
| 2166 | + if (source == editScriptItem) |
---|
1792 | 2167 | { |
---|
1793 | 2168 | OpenDialog(); |
---|
1794 | 2169 | refreshContents(); |
---|
1795 | 2170 | } else |
---|
1796 | | - if (event.getSource() == invariantsItem) |
---|
| 2171 | + if (source == invariantsItem) |
---|
1797 | 2172 | { |
---|
1798 | 2173 | System.out.println("Invariants:"); |
---|
1799 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 2174 | + Grafreed.grafreeD.universe.invariants(); |
---|
1800 | 2175 | } else |
---|
1801 | | - if (event.getSource() == memoryItem) |
---|
| 2176 | + if (source == memoryItem) |
---|
1802 | 2177 | { |
---|
1803 | 2178 | //System.out.println("Invariants:"); |
---|
1804 | 2179 | PrintMemory(); |
---|
1805 | 2180 | } else |
---|
1806 | | - if (event.getSource() == pathItem) |
---|
| 2181 | + if (source == pathItem) |
---|
1807 | 2182 | { |
---|
1808 | 2183 | PrintPath(); |
---|
1809 | 2184 | } else |
---|
1810 | | - if (event.getSource() == analyzeItem) |
---|
| 2185 | + if (source == analyzeItem) |
---|
1811 | 2186 | { |
---|
1812 | 2187 | AnalyzeObject(); |
---|
1813 | 2188 | } else |
---|
1814 | | - if (event.getSource() == dumpItem) |
---|
| 2189 | + if (source == dumpItem) |
---|
1815 | 2190 | { |
---|
1816 | 2191 | DumpObject(); |
---|
1817 | 2192 | } else |
---|
1818 | | - if (event.getSource() == screenfitButton) |
---|
| 2193 | + if (source == minButton) |
---|
| 2194 | + { |
---|
| 2195 | + Minimize(); |
---|
| 2196 | + } else |
---|
| 2197 | + if (source == maxButton) |
---|
| 2198 | + { |
---|
| 2199 | + Maximize(); |
---|
| 2200 | + } else |
---|
| 2201 | + if (source == fullButton) |
---|
| 2202 | + { |
---|
| 2203 | + ToggleFullScreen(); |
---|
| 2204 | + } else |
---|
| 2205 | + if (source == undoButton) |
---|
| 2206 | + { |
---|
| 2207 | + Undo(); |
---|
| 2208 | + } else |
---|
| 2209 | + if (source == redoButton) |
---|
| 2210 | + { |
---|
| 2211 | + Redo(); |
---|
| 2212 | + } else |
---|
| 2213 | + if (source == saveButton) |
---|
| 2214 | + { |
---|
| 2215 | + Save(); |
---|
| 2216 | + } else |
---|
| 2217 | + if (source == oneStepButton) |
---|
| 2218 | + { |
---|
| 2219 | + Globals.ONESTEP = true; |
---|
| 2220 | + cameraView.repaint(); |
---|
| 2221 | + } else |
---|
| 2222 | + if (source == screenfitButton) |
---|
1819 | 2223 | { |
---|
1820 | 2224 | //Reload(lastConverter, lastFilename, true); |
---|
1821 | 2225 | ScreenFit(); |
---|
1822 | 2226 | } else |
---|
1823 | | - if (event.getSource() == screenfitpointButton) |
---|
| 2227 | + if (source == screenfitpointButton) |
---|
1824 | 2228 | { |
---|
1825 | 2229 | //Reload(lastConverter, lastFilename, true); |
---|
1826 | 2230 | ScreenFitPoint(); |
---|
1827 | 2231 | } else |
---|
1828 | | - if (event.getSource() == snapobjectButton) |
---|
| 2232 | + if (source == snapobjectButton) |
---|
1829 | 2233 | { |
---|
1830 | 2234 | //Reload(lastConverter, lastFilename, true); |
---|
1831 | 2235 | SnapObject(); |
---|
.. | .. |
---|
1836 | 2240 | // Recompile(); |
---|
1837 | 2241 | // refreshContents(); |
---|
1838 | 2242 | // } else |
---|
1839 | | - if (event.getSource() == gcButton) |
---|
| 2243 | + if (source == gcButton) |
---|
1840 | 2244 | { |
---|
1841 | 2245 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1842 | 2246 | System.gc(); |
---|
1843 | 2247 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1844 | 2248 | } else |
---|
1845 | | - if (event.getSource() == editLeafItem) |
---|
| 2249 | + if (source == editLeafItem) |
---|
1846 | 2250 | { |
---|
1847 | 2251 | Object3D obj; |
---|
1848 | 2252 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1856 | 2260 | } |
---|
1857 | 2261 | refreshContents(true); |
---|
1858 | 2262 | } else |
---|
1859 | | - if (event.getSource() == openWindowItem) |
---|
| 2263 | + if (source == openWindowItem) |
---|
1860 | 2264 | { |
---|
1861 | 2265 | EditSelection(true); |
---|
1862 | 2266 | } else |
---|
1863 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 2267 | + if (source == cutItem || source == clearButton) |
---|
1864 | 2268 | { |
---|
1865 | 2269 | loadClipboard(true); |
---|
1866 | 2270 | } else |
---|
1867 | | - if (event.getSource() == duplicateItem) |
---|
| 2271 | + if (source == undoItem) |
---|
1868 | 2272 | { |
---|
1869 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2273 | + Undo(); |
---|
| 2274 | + } else |
---|
| 2275 | + if (source == redoItem) |
---|
| 2276 | + { |
---|
| 2277 | + Redo(); |
---|
| 2278 | + } else |
---|
| 2279 | + if (source == duplicateItem) |
---|
| 2280 | + { |
---|
| 2281 | + Object3D keep = Grafreed.clipboard; |
---|
1870 | 2282 | loadClipboard(false); |
---|
1871 | 2283 | paste(false); |
---|
1872 | | - GrafreeD.clipboard = keep; |
---|
| 2284 | + Grafreed.clipboard = keep; |
---|
1873 | 2285 | } else |
---|
1874 | | - if (event.getSource() == cloneItem) |
---|
| 2286 | + if (source == cloneItem) |
---|
1875 | 2287 | { |
---|
1876 | 2288 | CloneSelection(false); |
---|
1877 | 2289 | } else |
---|
1878 | | - if (event.getSource() == cloneSupportItem) |
---|
| 2290 | + if (source == cloneSupportItem) |
---|
1879 | 2291 | { |
---|
1880 | 2292 | CloneSelection(true); |
---|
1881 | 2293 | } else |
---|
1882 | | - if (event.getSource() == copyItem) |
---|
| 2294 | + if (source == copyItem) |
---|
1883 | 2295 | { |
---|
1884 | 2296 | loadClipboard(false); |
---|
1885 | 2297 | } else |
---|
1886 | | - if (event.getSource() == pasteItem) |
---|
| 2298 | + if (source == pasteItem) |
---|
1887 | 2299 | { |
---|
1888 | 2300 | paste(false); |
---|
1889 | 2301 | } else |
---|
1890 | | - if (event.getSource() == pasteLinkItem) |
---|
| 2302 | + if (source == pasteIntoItem) |
---|
1891 | 2303 | { |
---|
1892 | | - pasteInto(false); |
---|
| 2304 | + pasteInto(true, false); |
---|
1893 | 2305 | } else |
---|
1894 | | - if (event.getSource() == pasteCloneItem) |
---|
| 2306 | + if (source == pasteLinkItem) |
---|
1895 | 2307 | { |
---|
1896 | | - pasteInto(true); |
---|
| 2308 | + pasteInto(false, false); |
---|
1897 | 2309 | } else |
---|
1898 | | - if (event.getSource() == pasteExpandItem) |
---|
| 2310 | + if (source == pasteCloneItem) |
---|
| 2311 | + { |
---|
| 2312 | + pasteInto(true, true); |
---|
| 2313 | + } else |
---|
| 2314 | + if (source == pasteExpandItem) |
---|
1899 | 2315 | { |
---|
1900 | 2316 | paste(true); |
---|
1901 | 2317 | } else |
---|
1902 | | - if (event.getSource() == synchronizeItem) |
---|
| 2318 | + if (source == synchronizeItem) |
---|
1903 | 2319 | { |
---|
1904 | 2320 | Overwrite(Object3D.TRANSFORM); |
---|
1905 | 2321 | } else |
---|
1906 | | - if (event.getSource() == overwriteNameItem) |
---|
| 2322 | + if (source == overwriteNameItem) |
---|
1907 | 2323 | { |
---|
1908 | 2324 | Overwrite(Object3D.NAME); |
---|
1909 | 2325 | } else |
---|
1910 | | - if (event.getSource() == overwriteUVItem) |
---|
| 2326 | + if (source == overwriteUVItem) |
---|
1911 | 2327 | { |
---|
1912 | 2328 | Overwrite(Object3D.UV); |
---|
1913 | 2329 | } else |
---|
1914 | | - if (event.getSource() == overwriteMatItem) |
---|
| 2330 | + if (source == overwriteMatItem) |
---|
1915 | 2331 | { |
---|
1916 | 2332 | /* july 2015 |
---|
1917 | 2333 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
.. | .. |
---|
1931 | 2347 | |
---|
1932 | 2348 | Overwrite(dropAttributes); |
---|
1933 | 2349 | } |
---|
1934 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 2350 | + if (source == overwriteGeoItem) |
---|
1935 | 2351 | { |
---|
1936 | 2352 | Overwrite(Object3D.GEOMETRY); |
---|
1937 | 2353 | // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
.. | .. |
---|
1948 | 2364 | // refreshContents(); |
---|
1949 | 2365 | // } |
---|
1950 | 2366 | } else |
---|
1951 | | - if (event.getSource() == generateMeshItem) |
---|
| 2367 | + if (source == generateMeshItem) |
---|
1952 | 2368 | { |
---|
1953 | 2369 | //if (group.selection.size() == 1) |
---|
1954 | 2370 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1959 | 2375 | ResetModel(); |
---|
1960 | 2376 | refreshContents(); |
---|
1961 | 2377 | } else |
---|
1962 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 2378 | + if (source == extractGeometriesItem) |
---|
1963 | 2379 | { |
---|
1964 | 2380 | boolean one = false; |
---|
1965 | 2381 | |
---|
.. | .. |
---|
1986 | 2402 | ResetModel(); |
---|
1987 | 2403 | refreshContents(); |
---|
1988 | 2404 | } else |
---|
1989 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2405 | + if (source == cloneGeometriesItem) |
---|
1990 | 2406 | { |
---|
1991 | 2407 | boolean one = false; |
---|
1992 | 2408 | |
---|
.. | .. |
---|
2012 | 2428 | ResetModel(); |
---|
2013 | 2429 | refreshContents(); |
---|
2014 | 2430 | } else |
---|
2015 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2431 | + if (source == shareGeometriesItem) |
---|
2016 | 2432 | { |
---|
2017 | 2433 | boolean one = false; |
---|
2018 | 2434 | |
---|
.. | .. |
---|
2042 | 2458 | refreshContents(); |
---|
2043 | 2459 | } |
---|
2044 | 2460 | } else |
---|
2045 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2461 | + if (source == mergeGeometriesItem) |
---|
2046 | 2462 | { |
---|
2047 | 2463 | boolean one = false; |
---|
2048 | 2464 | |
---|
.. | .. |
---|
2072 | 2488 | ResetModel(); |
---|
2073 | 2489 | refreshContents(); |
---|
2074 | 2490 | } else |
---|
2075 | | - if (event.getSource() == linkverticesItem) |
---|
| 2491 | + if (source == linkverticesItem) |
---|
2076 | 2492 | { |
---|
2077 | 2493 | // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2078 | 2494 | // { |
---|
.. | .. |
---|
2085 | 2501 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2086 | 2502 | // refreshContents(); |
---|
2087 | 2503 | // } |
---|
2088 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2504 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2089 | 2505 | { |
---|
2090 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2506 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2091 | 2507 | |
---|
2092 | 2508 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2093 | 2509 | content = ((cGroup)content).get(0); |
---|
2094 | 2510 | |
---|
2095 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2511 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2096 | 2512 | for (int i=0; i<group.selection.size(); i++) |
---|
2097 | 2513 | { |
---|
2098 | | - boolean random = CameraPane.RANDOM; |
---|
2099 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2514 | + boolean random = CameraPane.SWITCH; |
---|
| 2515 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2100 | 2516 | group.selection.get(i).linkVerticesThis(content); |
---|
2101 | 2517 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2102 | | - CameraPane.RANDOM = random; |
---|
| 2518 | + CameraPane.SWITCH = random; |
---|
2103 | 2519 | } |
---|
2104 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2520 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2105 | 2521 | refreshContents(); |
---|
2106 | 2522 | } |
---|
2107 | 2523 | } else |
---|
2108 | | - if (event.getSource() == resetsupportItem) |
---|
| 2524 | + if (source == resetsupportItem) |
---|
2109 | 2525 | { |
---|
2110 | 2526 | for (int i=0; i<group.selection.size(); i++) |
---|
2111 | 2527 | { |
---|
2112 | | - boolean random = CameraPane.RANDOM; |
---|
2113 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2528 | + boolean random = CameraPane.SWITCH; |
---|
| 2529 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2114 | 2530 | group.selection.get(i).linkVerticesThis(null); |
---|
2115 | | - CameraPane.RANDOM = random; |
---|
| 2531 | + CameraPane.SWITCH = random; |
---|
2116 | 2532 | } |
---|
2117 | 2533 | |
---|
2118 | 2534 | refreshContents(); |
---|
2119 | 2535 | } else |
---|
2120 | | - if (event.getSource() == relinkverticesItem) |
---|
| 2536 | + if (source == relinkverticesItem) |
---|
2121 | 2537 | { |
---|
2122 | | - boolean random = CameraPane.RANDOM; |
---|
2123 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2538 | + boolean random = CameraPane.SWITCH; |
---|
| 2539 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2124 | 2540 | group.selection.RelinkToSupport(); |
---|
2125 | | - CameraPane.RANDOM = random; |
---|
| 2541 | + CameraPane.SWITCH = random; |
---|
2126 | 2542 | |
---|
2127 | 2543 | refreshContents(); |
---|
2128 | 2544 | } else |
---|
2129 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2545 | + if (source == resetreferencesItem) |
---|
2130 | 2546 | { |
---|
2131 | 2547 | for (int i=0; i<group.selection.size(); i++) |
---|
2132 | 2548 | { |
---|
.. | .. |
---|
2135 | 2551 | |
---|
2136 | 2552 | refreshContents(); |
---|
2137 | 2553 | } else |
---|
2138 | | - if (event.getSource() == setMasterItem) |
---|
| 2554 | + if (source == setMasterItem) |
---|
2139 | 2555 | { |
---|
2140 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2556 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2141 | 2557 | { |
---|
2142 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2558 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2143 | 2559 | |
---|
2144 | 2560 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2145 | 2561 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2148 | 2564 | refreshContents(); |
---|
2149 | 2565 | } |
---|
2150 | 2566 | } else |
---|
2151 | | - if (event.getSource() == poseMeshItem) |
---|
| 2567 | + if (source == poseMeshItem) |
---|
2152 | 2568 | { |
---|
2153 | 2569 | if (group.selection.size() == 1) |
---|
2154 | 2570 | { |
---|
2155 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2571 | + if (Grafreed.clipboard.size() == 1) |
---|
2156 | 2572 | { |
---|
2157 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2573 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2158 | 2574 | |
---|
2159 | 2575 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2160 | 2576 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2167 | 2583 | } |
---|
2168 | 2584 | |
---|
2169 | 2585 | } else |
---|
2170 | | - if (event.getSource() == revertMeshItem) |
---|
| 2586 | + if (source == revertMeshItem) |
---|
2171 | 2587 | { |
---|
2172 | 2588 | RevertMeshes(); |
---|
2173 | 2589 | } else |
---|
2174 | | - if (event.getSource() == resetMeshItem) |
---|
| 2590 | + if (source == resetAllItem) |
---|
2175 | 2591 | { |
---|
2176 | 2592 | ResetAll(); |
---|
2177 | 2593 | } else |
---|
2178 | | - if (event.getSource() == stepAllItem) |
---|
| 2594 | + if (source == stepAllItem) |
---|
2179 | 2595 | { |
---|
2180 | 2596 | StepAll(); |
---|
2181 | 2597 | } else |
---|
2182 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2598 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2183 | 2599 | { |
---|
2184 | 2600 | //int indices[] = jList.getSelectedIndices(); |
---|
2185 | 2601 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2187 | 2603 | |
---|
2188 | 2604 | ClearSelection(false); |
---|
2189 | 2605 | } else |
---|
2190 | | - if (event.getSource() == clearAllItem) |
---|
| 2606 | + if (source == clearAllItem) |
---|
2191 | 2607 | { |
---|
2192 | 2608 | ClearSelection(true); |
---|
2193 | 2609 | } else |
---|
2194 | | - if (event.getSource() == grabItem) |
---|
| 2610 | + if (source == grabItem || source == groupButton) |
---|
2195 | 2611 | { |
---|
2196 | | - group(new cGroup(), true); |
---|
| 2612 | + group(new cGroup(), false); // true); |
---|
2197 | 2613 | } else |
---|
2198 | | - if (event.getSource() == hideItem) |
---|
| 2614 | + if (source == hideItem) |
---|
2199 | 2615 | { |
---|
2200 | 2616 | group(new HiddenObject()); |
---|
2201 | 2617 | } else |
---|
2202 | | - if (event.getSource() == frontItem) |
---|
| 2618 | + if (source == frontItem) |
---|
2203 | 2619 | { |
---|
2204 | 2620 | front(); |
---|
2205 | 2621 | } else |
---|
2206 | | - if (event.getSource() == backItem) |
---|
| 2622 | + if (source == backItem) |
---|
2207 | 2623 | { |
---|
2208 | 2624 | back(); |
---|
2209 | 2625 | } else |
---|
2210 | | - if (event.getSource() == cameraItem) |
---|
| 2626 | + if (source == cameraItem) |
---|
2211 | 2627 | { |
---|
2212 | 2628 | makeSomething(new Camera()); |
---|
2213 | 2629 | } else |
---|
2214 | | - if (event.getSource() == compositeItem) |
---|
| 2630 | + if (source == compositeItem || source == compositeButton) |
---|
2215 | 2631 | { |
---|
2216 | 2632 | group(new Composite()); |
---|
2217 | 2633 | } else |
---|
2218 | | - if (event.getSource() == randomItem) |
---|
| 2634 | + if (source == switchItem || source == switchButton) |
---|
2219 | 2635 | { |
---|
2220 | 2636 | RandomNode random = new RandomNode(); |
---|
2221 | 2637 | group(random); |
---|
2222 | 2638 | if (random.size() > 0) |
---|
2223 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2639 | + random.name = random.get(0).name + "Switch"; |
---|
2224 | 2640 | } else |
---|
2225 | | - if (event.getSource() == physicsItem) |
---|
| 2641 | + if (source == physicsItem) |
---|
2226 | 2642 | { |
---|
2227 | 2643 | group(new PhysicsNode()); |
---|
2228 | 2644 | } else |
---|
2229 | | - if (event.getSource() == frameselectorItem) |
---|
| 2645 | + if (source == frameselectorItem) |
---|
2230 | 2646 | { |
---|
2231 | 2647 | for (int i=0; i<group.selection.size(); i++) |
---|
2232 | 2648 | { |
---|
.. | .. |
---|
2238 | 2654 | ResetModel(); |
---|
2239 | 2655 | refreshContents(); |
---|
2240 | 2656 | } else |
---|
2241 | | - if (event.getSource() == switchGeoItem) |
---|
| 2657 | + if (source == switchGeoItem) |
---|
2242 | 2658 | { |
---|
2243 | 2659 | for (int i=0; i<group.selection.size(); i++) |
---|
2244 | 2660 | { |
---|
.. | .. |
---|
2250 | 2666 | ResetModel(); |
---|
2251 | 2667 | refreshContents(); |
---|
2252 | 2668 | } else |
---|
2253 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2669 | + if (source == switchTransfoItem) |
---|
2254 | 2670 | { |
---|
2255 | 2671 | for (int i=0; i<group.selection.size(); i++) |
---|
2256 | 2672 | { |
---|
.. | .. |
---|
2262 | 2678 | ResetModel(); |
---|
2263 | 2679 | refreshContents(); |
---|
2264 | 2680 | } else |
---|
2265 | | - if (event.getSource() == morphItem) |
---|
| 2681 | + if (source == morphItem) |
---|
2266 | 2682 | { |
---|
2267 | 2683 | for (int i=0; i<group.selection.size(); i++) |
---|
2268 | 2684 | { |
---|
.. | .. |
---|
2274 | 2690 | ResetModel(); |
---|
2275 | 2691 | refreshContents(); |
---|
2276 | 2692 | } else |
---|
2277 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2693 | + if (source == scriptNodeItem) |
---|
2278 | 2694 | { |
---|
2279 | 2695 | boolean atleastone = false; |
---|
2280 | 2696 | |
---|
.. | .. |
---|
2313 | 2729 | } |
---|
2314 | 2730 | } |
---|
2315 | 2731 | } else |
---|
2316 | | - if (event.getSource() == linkerItem) |
---|
| 2732 | + if (source == linkerItem) |
---|
2317 | 2733 | { |
---|
2318 | 2734 | group(new cLinker()); |
---|
2319 | 2735 | } else |
---|
2320 | | - if (event.getSource() == textureItem) |
---|
| 2736 | + if (source == textureItem || source == textureButton) |
---|
2321 | 2737 | { |
---|
2322 | 2738 | group(new TextureNode()); |
---|
2323 | 2739 | } else |
---|
2324 | | - if (event.getSource() == billboardItem) |
---|
| 2740 | + if (source == billboardItem) |
---|
2325 | 2741 | { |
---|
2326 | 2742 | group(new BillboardNode()); |
---|
2327 | 2743 | } else |
---|
2328 | | - if (event.getSource() == shadowXItem) |
---|
| 2744 | + if (source == shadowXItem) |
---|
2329 | 2745 | { |
---|
2330 | 2746 | CastShadow(0); |
---|
2331 | 2747 | } else |
---|
2332 | | - if (event.getSource() == shadowYItem) |
---|
| 2748 | + if (source == shadowYItem) |
---|
2333 | 2749 | { |
---|
2334 | 2750 | CastShadow(1); |
---|
2335 | 2751 | } else |
---|
2336 | | - if (event.getSource() == shadowZItem) |
---|
| 2752 | + if (source == shadowZItem) |
---|
2337 | 2753 | { |
---|
2338 | 2754 | CastShadow(2); |
---|
2339 | 2755 | } else |
---|
2340 | | - if (event.getSource() == ungroupItem) |
---|
| 2756 | + if (source == ungroupItem || source == ungroupButton) |
---|
2341 | 2757 | { |
---|
2342 | 2758 | //ungroup(); |
---|
2343 | 2759 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2349 | 2765 | |
---|
2350 | 2766 | refreshContents(); |
---|
2351 | 2767 | } else |
---|
2352 | | - if (event.getSource() == genUVItem) |
---|
| 2768 | + if (source == genUVItem) |
---|
2353 | 2769 | { |
---|
2354 | 2770 | GenUV(); |
---|
2355 | 2771 | } else |
---|
2356 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2772 | + if (source == genNormalsCADItem) |
---|
2357 | 2773 | { |
---|
2358 | 2774 | GenNormals(true); |
---|
2359 | 2775 | } else |
---|
2360 | | - if (event.getSource() == genNormalsMESHItem) |
---|
| 2776 | + if (source == genNormalsMESHItem) |
---|
2361 | 2777 | { |
---|
2362 | | - GenNormals(true); // TODO |
---|
| 2778 | + GenNormalsMESH(); |
---|
2363 | 2779 | } else |
---|
2364 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2780 | + if (source == genNormalsORGANItem) |
---|
2365 | 2781 | { |
---|
2366 | 2782 | GenNormals(false); |
---|
2367 | 2783 | } else |
---|
2368 | | - if (event.getSource() == genNormalsMINEItem) |
---|
| 2784 | + if (source == genNormalsMINEItem) |
---|
2369 | 2785 | { |
---|
2370 | 2786 | GenNormalsMINE(); |
---|
2371 | 2787 | } else |
---|
2372 | | - if (event.getSource() == stripifyItem) |
---|
| 2788 | + if (source == stripifyItem) |
---|
2373 | 2789 | { |
---|
2374 | 2790 | Stripify(); |
---|
2375 | 2791 | } else |
---|
2376 | | - if (event.getSource() == unstripifyItem) |
---|
| 2792 | + if (source == unstripifyItem) |
---|
2377 | 2793 | { |
---|
2378 | 2794 | Unstripify(); |
---|
2379 | 2795 | } else |
---|
2380 | | - if (event.getSource() == trimItem) |
---|
| 2796 | + if (source == trimItem) |
---|
2381 | 2797 | { |
---|
2382 | 2798 | Trim(); |
---|
2383 | 2799 | } else |
---|
2384 | | - if (event.getSource() == untrimItem) |
---|
| 2800 | + if (source == untrimItem) |
---|
2385 | 2801 | { |
---|
2386 | 2802 | Untrim(); |
---|
2387 | 2803 | } else |
---|
2388 | | - if (event.getSource() == clearColorsItem) |
---|
| 2804 | + if (source == clearColorsItem) |
---|
2389 | 2805 | { |
---|
2390 | 2806 | ClearColors(); |
---|
2391 | 2807 | } else |
---|
2392 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2808 | + if (source == clearMaterialsItem) |
---|
2393 | 2809 | { |
---|
2394 | 2810 | ClearMaterials(); |
---|
2395 | 2811 | } else |
---|
2396 | | - if (event.getSource() == liveleavesItem) |
---|
| 2812 | + if (source == liveleavesItem) |
---|
2397 | 2813 | { |
---|
2398 | 2814 | LiveLeaves(true); |
---|
2399 | 2815 | } else |
---|
2400 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2816 | + if (source == unliveleavesItem) |
---|
2401 | 2817 | { |
---|
2402 | 2818 | LiveLeaves(false); |
---|
2403 | 2819 | } else |
---|
2404 | | - if (event.getSource() == supportleavesItem) |
---|
| 2820 | + if (source == supportleavesItem) |
---|
2405 | 2821 | { |
---|
2406 | 2822 | SupportLeaves(true); |
---|
2407 | 2823 | } else |
---|
2408 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2824 | + if (source == unsupportleavesItem) |
---|
2409 | 2825 | { |
---|
2410 | 2826 | SupportLeaves(false); |
---|
2411 | 2827 | } else |
---|
2412 | | - if (event.getSource() == hideleavesItem) |
---|
| 2828 | + if (source == hideleavesItem) |
---|
2413 | 2829 | { |
---|
2414 | 2830 | HideLeaves(true); |
---|
2415 | 2831 | } else |
---|
2416 | | - if (event.getSource() == showleavesItem) |
---|
| 2832 | + if (source == showleavesItem) |
---|
2417 | 2833 | { |
---|
2418 | 2834 | HideLeaves(false); |
---|
2419 | 2835 | } else |
---|
2420 | | - if (event.getSource() == markleavesItem) |
---|
| 2836 | + if (source == markleavesItem) |
---|
2421 | 2837 | { |
---|
2422 | 2838 | MarkLeaves(true); |
---|
2423 | 2839 | } else |
---|
2424 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2840 | + if (source == unmarkleavesItem) |
---|
2425 | 2841 | { |
---|
2426 | 2842 | MarkLeaves(false); |
---|
2427 | 2843 | } else |
---|
2428 | | - if (event.getSource() == flipVItem) |
---|
| 2844 | + if (source == rewindleavesItem) |
---|
| 2845 | + { |
---|
| 2846 | + RewindLeaves(true); |
---|
| 2847 | + } else |
---|
| 2848 | + if (source == unrewindleavesItem) |
---|
| 2849 | + { |
---|
| 2850 | + RewindLeaves(false); |
---|
| 2851 | + } else |
---|
| 2852 | + if (source == randomleavesItem) |
---|
| 2853 | + { |
---|
| 2854 | + RandomLeaves(true); |
---|
| 2855 | + } else |
---|
| 2856 | + if (source == unrandomleavesItem) |
---|
| 2857 | + { |
---|
| 2858 | + RandomLeaves(false); |
---|
| 2859 | + } else |
---|
| 2860 | + if (source == flipVItem) |
---|
2429 | 2861 | { |
---|
2430 | 2862 | FlipV(true); |
---|
2431 | 2863 | } else |
---|
2432 | | - if (event.getSource() == unflipVItem) |
---|
| 2864 | + if (source == unflipVItem) |
---|
2433 | 2865 | { |
---|
2434 | 2866 | FlipV(false); |
---|
2435 | 2867 | } else |
---|
2436 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2868 | + if (source == lowTexturesItem) |
---|
2437 | 2869 | { |
---|
2438 | 2870 | SetTexRes(0); |
---|
2439 | 2871 | } else |
---|
2440 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2872 | + if (source == normalTexturesItem) |
---|
2441 | 2873 | { |
---|
2442 | 2874 | SetTexRes(1); |
---|
2443 | 2875 | } else |
---|
2444 | | - if (event.getSource() == highTexturesItem) |
---|
| 2876 | + if (source == highTexturesItem) |
---|
2445 | 2877 | { |
---|
2446 | 2878 | SetTexRes(2); |
---|
2447 | 2879 | } else |
---|
2448 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2880 | + if (source == veryhighTexturesItem) |
---|
2449 | 2881 | { |
---|
2450 | 2882 | SetTexRes(3); |
---|
2451 | 2883 | } else |
---|
2452 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2884 | + if (source == maxTexturesItem) |
---|
2453 | 2885 | { |
---|
2454 | 2886 | SetTexRes(4); |
---|
2455 | 2887 | } else |
---|
2456 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2888 | + if (source == panoTexturesItem) |
---|
2457 | 2889 | { |
---|
2458 | 2890 | SetTexRes(5); |
---|
2459 | 2891 | } else |
---|
2460 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2892 | + if (source == reverseNormalsItem) |
---|
2461 | 2893 | { |
---|
2462 | 2894 | ReverseNormals(); |
---|
2463 | 2895 | } else |
---|
2464 | | - if (event.getSource() == parseverticesItem) |
---|
| 2896 | + if (source == parseverticesItem) |
---|
2465 | 2897 | { |
---|
2466 | 2898 | ParseVertices(); |
---|
2467 | 2899 | } else |
---|
2468 | | - if (event.getSource() == textureFieldItem) |
---|
| 2900 | + if (source == textureFieldItem) |
---|
2469 | 2901 | { |
---|
2470 | 2902 | TextureVertices(); |
---|
2471 | 2903 | } else |
---|
2472 | | - if (event.getSource() == alignItem) |
---|
| 2904 | + if (source == alignItem) |
---|
2473 | 2905 | { |
---|
2474 | 2906 | Align(); |
---|
2475 | 2907 | } else |
---|
2476 | | - if (event.getSource() == mirrorItem) |
---|
| 2908 | + if (source == mirrorItem) |
---|
2477 | 2909 | { |
---|
2478 | 2910 | MirrorPoses(); |
---|
2479 | 2911 | } else |
---|
2480 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2912 | + if (source == reduceMorphItem) |
---|
2481 | 2913 | { |
---|
2482 | 2914 | MeshReduction(false); |
---|
2483 | 2915 | } else |
---|
2484 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2916 | + if (source == reduce34MorphItem) |
---|
2485 | 2917 | { |
---|
2486 | 2918 | MeshReduction(true); |
---|
2487 | 2919 | } else |
---|
2488 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2920 | + if (source == reverseTrianglesItem) |
---|
2489 | 2921 | { |
---|
2490 | 2922 | ReverseTriangles(); |
---|
2491 | 2923 | } else |
---|
2492 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2924 | + if (source == reduceMeshItem) |
---|
2493 | 2925 | { |
---|
2494 | 2926 | ReduceMesh(false); |
---|
2495 | 2927 | } else |
---|
2496 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2928 | + if (source == reduce34MeshItem) |
---|
2497 | 2929 | { |
---|
2498 | 2930 | ReduceMesh(true); |
---|
2499 | 2931 | } else |
---|
2500 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2932 | + if (source == increaseMeshItem) |
---|
2501 | 2933 | { |
---|
2502 | 2934 | IncreaseMesh(); |
---|
2503 | 2935 | } else |
---|
2504 | | - if (event.getSource() == clipMeshItem) |
---|
| 2936 | + if (source == clipMeshItem) |
---|
2505 | 2937 | { |
---|
2506 | 2938 | ClipMesh(); |
---|
2507 | 2939 | } else |
---|
2508 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2940 | + if (source == smoothMeshItem) |
---|
2509 | 2941 | { |
---|
2510 | 2942 | SmoothMesh(); |
---|
2511 | 2943 | } else |
---|
2512 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2944 | + if (source == transformGeometryItem) |
---|
2513 | 2945 | { |
---|
2514 | 2946 | TransformGeometry(); |
---|
2515 | 2947 | } else |
---|
2516 | | - if (event.getSource() == resetTransformItem) |
---|
| 2948 | + if (source == transformChildrenItem) |
---|
| 2949 | + { |
---|
| 2950 | + TransformChildren(); |
---|
| 2951 | + } else |
---|
| 2952 | + if (source == resetTransformItem) |
---|
2517 | 2953 | { |
---|
2518 | 2954 | ResetTransform(); |
---|
2519 | 2955 | } else |
---|
2520 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2956 | + if (source == resetCentroidItem) |
---|
2521 | 2957 | { |
---|
2522 | | - ResetCentroid(); |
---|
| 2958 | + ResetCentroid(true); |
---|
2523 | 2959 | } else |
---|
2524 | | - if (event.getSource() == resetParentItem) |
---|
| 2960 | + if (source == resetCentroidXZItem) |
---|
| 2961 | + { |
---|
| 2962 | + ResetCentroid(false); |
---|
| 2963 | + } else |
---|
| 2964 | + if (source == resetParentItem) |
---|
2525 | 2965 | { |
---|
2526 | 2966 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2527 | 2967 | { |
---|
.. | .. |
---|
2531 | 2971 | |
---|
2532 | 2972 | refreshContents(); |
---|
2533 | 2973 | } else |
---|
2534 | | - if (event.getSource() == repairParentItem) |
---|
| 2974 | + if (source == repairParentItem) |
---|
2535 | 2975 | { |
---|
2536 | 2976 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2537 | 2977 | { |
---|
.. | .. |
---|
2545 | 2985 | |
---|
2546 | 2986 | refreshContents(); |
---|
2547 | 2987 | } else |
---|
2548 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2988 | + if (source == repairShadowItem) |
---|
| 2989 | + { |
---|
| 2990 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2991 | + { |
---|
| 2992 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2993 | + obj.RepairShadow(); |
---|
| 2994 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2995 | +// { |
---|
| 2996 | +// obj.get(i).parent = obj; |
---|
| 2997 | +// } |
---|
| 2998 | + } |
---|
| 2999 | + |
---|
| 3000 | + refreshContents(); |
---|
| 3001 | + } else |
---|
| 3002 | + if (source == sortbysizeItem) |
---|
2549 | 3003 | { |
---|
2550 | 3004 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2551 | 3005 | { |
---|
.. | .. |
---|
2557 | 3011 | ResetModel(); |
---|
2558 | 3012 | refreshContents(); |
---|
2559 | 3013 | } else |
---|
2560 | | - if (event.getSource() == sortbynameItem) |
---|
| 3014 | + if (source == sortbynameItem) |
---|
2561 | 3015 | { |
---|
2562 | 3016 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2563 | 3017 | { |
---|
.. | .. |
---|
2569 | 3023 | ResetModel(); |
---|
2570 | 3024 | refreshContents(); |
---|
2571 | 3025 | } else |
---|
2572 | | - if (event.getSource() == attachPigmentItem) |
---|
| 3026 | + if (source == attachPigmentItem) |
---|
2573 | 3027 | { |
---|
2574 | 3028 | String texture = GetFile("Attach pigment"); |
---|
2575 | 3029 | Object3D obj; |
---|
.. | .. |
---|
2581 | 3035 | |
---|
2582 | 3036 | refreshContents(); |
---|
2583 | 3037 | } else |
---|
2584 | | - if (event.getSource() == detachPigmentItem) |
---|
| 3038 | + if (source == detachPigmentItem) |
---|
2585 | 3039 | { |
---|
2586 | 3040 | Object3D obj; |
---|
2587 | 3041 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2592 | 3046 | |
---|
2593 | 3047 | refreshContents(); |
---|
2594 | 3048 | } else |
---|
2595 | | - if (event.getSource() == attachBumpItem) |
---|
| 3049 | + if (source == attachBumpItem) |
---|
2596 | 3050 | { |
---|
2597 | 3051 | String texture = GetFile("Attach bump"); |
---|
2598 | 3052 | Object3D obj; |
---|
.. | .. |
---|
2604 | 3058 | |
---|
2605 | 3059 | refreshContents(); |
---|
2606 | 3060 | } else |
---|
2607 | | - if (event.getSource() == detachBumpItem) |
---|
| 3061 | + if (source == detachBumpItem) |
---|
2608 | 3062 | { |
---|
2609 | 3063 | Object3D obj; |
---|
2610 | 3064 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2615 | 3069 | |
---|
2616 | 3070 | refreshContents(); |
---|
2617 | 3071 | } else |
---|
2618 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 3072 | + if (source == pigmentBumpItem) |
---|
2619 | 3073 | { |
---|
2620 | 3074 | Object3D obj; |
---|
2621 | 3075 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2626 | 3080 | |
---|
2627 | 3081 | refreshContents(); |
---|
2628 | 3082 | } else |
---|
2629 | | - if (event.getSource() == flashSelectionButton) |
---|
| 3083 | + if (source == flashSelectionButton) |
---|
2630 | 3084 | { |
---|
2631 | 3085 | CameraPane.flash = true; |
---|
2632 | 3086 | refreshContents(); |
---|
2633 | 3087 | } else |
---|
2634 | | - if (event.getSource() == oneButton) |
---|
| 3088 | + if (source == oneButton) |
---|
2635 | 3089 | { |
---|
2636 | 3090 | } else |
---|
2637 | | - if (event.getSource() == twoButton) |
---|
| 3091 | + if (source == twoButton) |
---|
2638 | 3092 | { |
---|
2639 | 3093 | radio.layout = twoButton; |
---|
| 3094 | + |
---|
| 3095 | + if (CameraPane.FULLSCREEN) |
---|
| 3096 | + fullscreenLayout = radio.layout; |
---|
| 3097 | + |
---|
2640 | 3098 | // bug |
---|
2641 | 3099 | //gridPanel.setDividerLocation(1.0); |
---|
2642 | 3100 | //bigPanel.setDividerLocation(0.0); |
---|
2643 | | - bigThree.remove(scenePanel); |
---|
2644 | | - bigThree.remove(centralPanel); |
---|
2645 | | - bigThree.remove(XYZPanel); |
---|
2646 | | - aWindowConstraints.gridx = 0; |
---|
2647 | | - aWindowConstraints.gridy = 0; |
---|
2648 | | - aWindowConstraints.gridwidth = 1; |
---|
2649 | | - // aConstraints.gridheight = 3; |
---|
2650 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2651 | | - aWindowConstraints.weightx = 0; |
---|
2652 | | - aWindowConstraints.weighty = 1; |
---|
2653 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2654 | | - aWindowConstraints.weightx = 1; |
---|
2655 | | - aWindowConstraints.gridwidth = 3; |
---|
2656 | | - // aConstraints.gridheight = 3; |
---|
2657 | | - aWindowConstraints.gridx = 1; |
---|
2658 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2659 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2660 | | - aWindowConstraints.weightx = 0; |
---|
2661 | | - aWindowConstraints.gridx = 4; |
---|
2662 | | - aWindowConstraints.gridwidth = 1; |
---|
2663 | | - // aConstraints.gridheight = 3; |
---|
2664 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2665 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2666 | | - bigThree.revalidate(); |
---|
| 3101 | +// bigThree.remove(scenePanel); |
---|
| 3102 | +// bigThree.remove(centralPanel); |
---|
| 3103 | +// bigThree.remove(XYZPanel); |
---|
| 3104 | +// aWindowConstraints.gridx = 0; |
---|
| 3105 | +// aWindowConstraints.gridy = 0; |
---|
| 3106 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3107 | +// // aConstraints.gridheight = 3; |
---|
| 3108 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3109 | +// aWindowConstraints.weightx = 0; |
---|
| 3110 | +// aWindowConstraints.weighty = 1; |
---|
| 3111 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 3112 | +// aWindowConstraints.weightx = 1; |
---|
| 3113 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3114 | +// // aConstraints.gridheight = 3; |
---|
| 3115 | +// aWindowConstraints.gridx = 1; |
---|
| 3116 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3117 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 3118 | +// aWindowConstraints.weightx = 0; |
---|
| 3119 | +// aWindowConstraints.gridx = 4; |
---|
| 3120 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3121 | +// // aConstraints.gridheight = 3; |
---|
| 3122 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3123 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 3124 | +// scenePanel.setVisible(false); |
---|
| 3125 | +// centralPanel.setVisible(true); |
---|
| 3126 | +// XYZPanel.setVisible(false); |
---|
| 3127 | + bigThree.ClearUI(); |
---|
| 3128 | + bigThree.add(centralPanel); |
---|
| 3129 | + bigThree.FlushUI(); |
---|
| 3130 | + |
---|
| 3131 | + cameraView.requestFocusInWindow(); |
---|
| 3132 | + |
---|
| 3133 | +// refreshContents(true); |
---|
| 3134 | +// |
---|
| 3135 | +// try |
---|
| 3136 | +// { |
---|
| 3137 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3138 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3139 | +// bot.mouseMove(100, 100); |
---|
| 3140 | +// bot.mousePress(mask); |
---|
| 3141 | +// bot.mouseRelease(mask); |
---|
| 3142 | +// } |
---|
| 3143 | +// catch (Exception e) |
---|
| 3144 | +// { |
---|
| 3145 | +// |
---|
| 3146 | +// } |
---|
| 3147 | + |
---|
2667 | 3148 | } else |
---|
2668 | | - if (event.getSource() == threeButton) |
---|
| 3149 | + if (source == threeButton) |
---|
2669 | 3150 | { |
---|
2670 | 3151 | radio.layout = threeButton; |
---|
2671 | | - bigThree.remove(scenePanel); |
---|
2672 | | - bigThree.remove(centralPanel); |
---|
2673 | | - bigThree.remove(XYZPanel); |
---|
2674 | | - aWindowConstraints.gridx = 0; |
---|
2675 | | - aWindowConstraints.gridy = 0; |
---|
2676 | | - aWindowConstraints.gridwidth = 1; |
---|
2677 | | - // aConstraints.gridheight = 3; |
---|
2678 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2679 | | - aWindowConstraints.weightx = 0; |
---|
2680 | | - aWindowConstraints.weighty = 1; |
---|
2681 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2682 | | - aWindowConstraints.weightx = 1; |
---|
2683 | | - aWindowConstraints.gridwidth = 3; |
---|
2684 | | - // aConstraints.gridheight = 3; |
---|
2685 | | - aWindowConstraints.gridx = 1; |
---|
2686 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2687 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2688 | | - aWindowConstraints.weightx = 0; |
---|
2689 | | - aWindowConstraints.gridx = 4; |
---|
2690 | | - aWindowConstraints.gridwidth = 1; |
---|
2691 | | - // aConstraints.gridheight = 3; |
---|
2692 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2693 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2694 | | - bigThree.revalidate(); |
---|
| 3152 | + |
---|
| 3153 | + if (CameraPane.FULLSCREEN) |
---|
| 3154 | + fullscreenLayout = radio.layout; |
---|
| 3155 | + |
---|
| 3156 | +// bigThree.remove(scenePanel); |
---|
| 3157 | +// bigThree.remove(centralPanel); |
---|
| 3158 | +// bigThree.remove(XYZPanel); |
---|
| 3159 | +// aWindowConstraints.gridx = 0; |
---|
| 3160 | +// aWindowConstraints.gridy = 0; |
---|
| 3161 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3162 | +// // aConstraints.gridheight = 3; |
---|
| 3163 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3164 | +// aWindowConstraints.weightx = 0; |
---|
| 3165 | +// aWindowConstraints.weighty = 1; |
---|
| 3166 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 3167 | +// aWindowConstraints.weightx = 1; |
---|
| 3168 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3169 | +// // aConstraints.gridheight = 3; |
---|
| 3170 | +// aWindowConstraints.gridx = 1; |
---|
| 3171 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3172 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 3173 | +// aWindowConstraints.weightx = 0; |
---|
| 3174 | +// aWindowConstraints.gridx = 4; |
---|
| 3175 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3176 | +// // aConstraints.gridheight = 3; |
---|
| 3177 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3178 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 3179 | +// bigThree.validate(); |
---|
| 3180 | +// scenePanel.setVisible(false); |
---|
| 3181 | +// centralPanel.setVisible(true); |
---|
| 3182 | +// XYZPanel.setVisible(true); |
---|
| 3183 | + bigThree.ClearUI(); |
---|
| 3184 | + bigThree.add(centralPanel); |
---|
| 3185 | + bigThree.add(XYZPanel); |
---|
| 3186 | + bigThree.FlushUI(); |
---|
| 3187 | + |
---|
| 3188 | + cameraView.requestFocusInWindow(); |
---|
2695 | 3189 | } else |
---|
2696 | | - if (event.getSource() == fourButton) |
---|
| 3190 | + if (source == fourButton) |
---|
2697 | 3191 | { |
---|
2698 | 3192 | radio.layout = fourButton; |
---|
2699 | | - bigThree.remove(scenePanel); |
---|
2700 | | - bigThree.remove(centralPanel); |
---|
2701 | | - bigThree.remove(XYZPanel); |
---|
2702 | | - aWindowConstraints.gridx = 0; |
---|
2703 | | - aWindowConstraints.gridy = 0; |
---|
2704 | | - aWindowConstraints.gridwidth = 1; |
---|
2705 | | - // aWindowConstraints.gridheight = 3; |
---|
2706 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2707 | | - aWindowConstraints.weightx = 1; |
---|
2708 | | - aWindowConstraints.weighty = 1; |
---|
2709 | | - bigThree.add(scenePanel, aWindowConstraints); |
---|
2710 | | - aWindowConstraints.weightx = 1; |
---|
2711 | | - aWindowConstraints.gridwidth = 3; |
---|
2712 | | - // aConstraints.gridheight = 3; |
---|
2713 | | - aWindowConstraints.gridx = 1; |
---|
2714 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2715 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2716 | | - aWindowConstraints.weightx = 0; |
---|
2717 | | - aWindowConstraints.gridx = 4; |
---|
2718 | | - aWindowConstraints.gridwidth = 1; |
---|
2719 | | - // aWindowConstraints.gridheight = 3; |
---|
2720 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2721 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2722 | | - bigThree.revalidate(); |
---|
| 3193 | + |
---|
| 3194 | + if (CameraPane.FULLSCREEN) |
---|
| 3195 | + fullscreenLayout = radio.layout; |
---|
| 3196 | + |
---|
| 3197 | +// bigThree.remove(scenePanel); |
---|
| 3198 | +// bigThree.remove(centralPanel); |
---|
| 3199 | +// bigThree.remove(XYZPanel); |
---|
| 3200 | +// aWindowConstraints.gridx = 0; |
---|
| 3201 | +// aWindowConstraints.gridy = 0; |
---|
| 3202 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3203 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3204 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3205 | +// aWindowConstraints.weightx = 1; |
---|
| 3206 | +// aWindowConstraints.weighty = 1; |
---|
| 3207 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 3208 | +// aWindowConstraints.weightx = 1; |
---|
| 3209 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3210 | +// // aConstraints.gridheight = 3; |
---|
| 3211 | +// aWindowConstraints.gridx = 1; |
---|
| 3212 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3213 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 3214 | +// aWindowConstraints.weightx = 0; |
---|
| 3215 | +// aWindowConstraints.gridx = 4; |
---|
| 3216 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3217 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3218 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3219 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 3220 | +// bigThree.validate(); |
---|
| 3221 | +// scenePanel.setVisible(true); |
---|
| 3222 | +// centralPanel.setVisible(false); |
---|
| 3223 | +// XYZPanel.setVisible(false); |
---|
| 3224 | + bigThree.ClearUI(); |
---|
| 3225 | + bigThree.add(scenePanel); |
---|
| 3226 | + bigThree.FlushUI(); |
---|
| 3227 | + |
---|
| 3228 | + cameraView.requestFocusInWindow(); |
---|
2723 | 3229 | } else |
---|
2724 | | - if (event.getSource() == sixButton) |
---|
| 3230 | + if (source == sixButton) |
---|
2725 | 3231 | { |
---|
2726 | 3232 | radio.layout = sixButton; |
---|
2727 | | - bigThree.remove(scenePanel); |
---|
2728 | | - bigThree.remove(centralPanel); |
---|
2729 | | - bigThree.remove(XYZPanel); |
---|
2730 | | - aWindowConstraints.gridx = 0; |
---|
2731 | | - aWindowConstraints.gridy = 0; |
---|
2732 | | - aWindowConstraints.gridwidth = 1; |
---|
2733 | | - // aConstraints.gridheight = 3; |
---|
2734 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2735 | | - aWindowConstraints.weightx = 0; |
---|
2736 | | - aWindowConstraints.weighty = 1; |
---|
2737 | | - bigThree.add(scenePanel, aWindowConstraints); |
---|
2738 | | - aWindowConstraints.weightx = 1; |
---|
2739 | | - aWindowConstraints.gridwidth = 3; |
---|
2740 | | - // aWindowConstraints.gridheight = 3; |
---|
2741 | | - aWindowConstraints.gridx = 1; |
---|
2742 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2743 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2744 | | - aWindowConstraints.weightx = 0; |
---|
2745 | | - aWindowConstraints.gridx = 4; |
---|
2746 | | - aWindowConstraints.gridwidth = 1; |
---|
2747 | | - // aWindowConstraints.gridheight = 3; |
---|
2748 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2749 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2750 | | - bigThree.revalidate(); |
---|
| 3233 | + |
---|
| 3234 | + if (CameraPane.FULLSCREEN) |
---|
| 3235 | + fullscreenLayout = radio.layout; |
---|
| 3236 | + |
---|
| 3237 | +// bigThree.remove(scenePanel); |
---|
| 3238 | +// bigThree.remove(centralPanel); |
---|
| 3239 | +// bigThree.remove(XYZPanel); |
---|
| 3240 | +// aWindowConstraints.gridx = 0; |
---|
| 3241 | +// aWindowConstraints.gridy = 0; |
---|
| 3242 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3243 | +// // aConstraints.gridheight = 3; |
---|
| 3244 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3245 | +// aWindowConstraints.weightx = 0; |
---|
| 3246 | +// aWindowConstraints.weighty = 1; |
---|
| 3247 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 3248 | +// aWindowConstraints.weightx = 1; |
---|
| 3249 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3250 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3251 | +// aWindowConstraints.gridx = 1; |
---|
| 3252 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3253 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 3254 | +// aWindowConstraints.weightx = 0; |
---|
| 3255 | +// aWindowConstraints.gridx = 4; |
---|
| 3256 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3257 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3258 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3259 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 3260 | +// bigThree.validate(); |
---|
| 3261 | +// scenePanel.setVisible(true); |
---|
| 3262 | +// centralPanel.setVisible(true); |
---|
| 3263 | +// XYZPanel.setVisible(false); |
---|
| 3264 | + bigThree.ClearUI(); |
---|
| 3265 | + bigThree.add(scenePanel); |
---|
| 3266 | + bigThree.add(centralPanel); |
---|
| 3267 | + bigThree.FlushUI(); |
---|
| 3268 | + |
---|
| 3269 | + cameraView.requestFocusInWindow(); |
---|
2751 | 3270 | } else |
---|
2752 | | - if (event.getSource() == sevenButton) |
---|
| 3271 | + if (source == sevenButton) |
---|
2753 | 3272 | { |
---|
2754 | 3273 | radio.layout = sevenButton; |
---|
2755 | | - bigThree.remove(scenePanel); |
---|
2756 | | - bigThree.remove(centralPanel); |
---|
2757 | | - bigThree.remove(XYZPanel); |
---|
2758 | | - aWindowConstraints.gridx = 0; |
---|
2759 | | - aWindowConstraints.gridy = 0; |
---|
2760 | | - aWindowConstraints.gridwidth = 1; |
---|
2761 | | - // aWindowConstraints.gridheight = 3; |
---|
2762 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2763 | | - aWindowConstraints.weightx = 0; |
---|
2764 | | - aWindowConstraints.weighty = 1; |
---|
2765 | | - bigThree.add(scenePanel, aWindowConstraints); |
---|
2766 | | - aWindowConstraints.weightx = 1; |
---|
2767 | | - aWindowConstraints.gridwidth = 3; |
---|
2768 | | - // aWindowConstraints.gridheight = 3; |
---|
2769 | | - aWindowConstraints.gridx = 1; |
---|
2770 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2771 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2772 | | - aWindowConstraints.weightx = 0; |
---|
2773 | | - aWindowConstraints.gridx = 4; |
---|
2774 | | - aWindowConstraints.gridwidth = 1; |
---|
2775 | | - // aConstraints.gridheight = 3; |
---|
2776 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2777 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2778 | | - bigThree.revalidate(); |
---|
| 3274 | + |
---|
| 3275 | + if (CameraPane.FULLSCREEN) |
---|
| 3276 | + fullscreenLayout = radio.layout; |
---|
| 3277 | + |
---|
| 3278 | +// bigThree.remove(scenePanel); |
---|
| 3279 | +// bigThree.remove(centralPanel); |
---|
| 3280 | +// bigThree.remove(XYZPanel); |
---|
| 3281 | +// aWindowConstraints.gridx = 0; |
---|
| 3282 | +// aWindowConstraints.gridy = 0; |
---|
| 3283 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3284 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3285 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3286 | +// aWindowConstraints.weightx = 0; |
---|
| 3287 | +// aWindowConstraints.weighty = 1; |
---|
| 3288 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 3289 | +// aWindowConstraints.weightx = 1; |
---|
| 3290 | +// aWindowConstraints.gridwidth = 3; |
---|
| 3291 | +// // aWindowConstraints.gridheight = 3; |
---|
| 3292 | +// aWindowConstraints.gridx = 1; |
---|
| 3293 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 3294 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 3295 | +// aWindowConstraints.weightx = 0; |
---|
| 3296 | +// aWindowConstraints.gridx = 4; |
---|
| 3297 | +// aWindowConstraints.gridwidth = 1; |
---|
| 3298 | +// // aConstraints.gridheight = 3; |
---|
| 3299 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 3300 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 3301 | +// bigThree.validate(); |
---|
| 3302 | +// scenePanel.setVisible(true); |
---|
| 3303 | +// centralPanel.setVisible(true); |
---|
| 3304 | +// XYZPanel.setVisible(true); |
---|
| 3305 | + bigThree.ClearUI(); |
---|
| 3306 | + bigThree.add(scenePanel); |
---|
| 3307 | + bigThree.add(centralPanel); |
---|
| 3308 | + bigThree.add(XYZPanel); |
---|
| 3309 | + bigThree.FlushUI(); |
---|
| 3310 | + |
---|
| 3311 | + cameraView.requestFocusInWindow(); |
---|
2779 | 3312 | } else |
---|
2780 | | - if (event.getSource() == rootButton) |
---|
| 3313 | + if (source == rootButton) |
---|
2781 | 3314 | { |
---|
2782 | 3315 | Object3D obj; |
---|
2783 | 3316 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2787 | 3320 | EditObject(obj); |
---|
2788 | 3321 | } |
---|
2789 | 3322 | |
---|
| 3323 | + cameraView.requestFocusInWindow(); |
---|
2790 | 3324 | refreshContents(true); |
---|
2791 | 3325 | } else |
---|
2792 | | - if (event.getSource() == closeButton) |
---|
| 3326 | + if (source == closeButton) |
---|
2793 | 3327 | { |
---|
2794 | 3328 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2795 | 3329 | cRadio ab; |
---|
2796 | 3330 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
2797 | 3331 | { |
---|
2798 | 3332 | ab = (cRadio)e.nextElement(); |
---|
2799 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3333 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
2800 | 3334 | { |
---|
| 3335 | + // Patch to avoid bug with transparency. |
---|
| 3336 | + if (!ab.hadMaterial) |
---|
| 3337 | + { |
---|
| 3338 | + ab.object.material = null; |
---|
| 3339 | + } |
---|
| 3340 | + |
---|
2801 | 3341 | buttonGroup.remove(ab); |
---|
2802 | 3342 | radioPanel.remove(ab); |
---|
2803 | 3343 | |
---|
2804 | | - ab.GetObject().editWindow = null; |
---|
| 3344 | + //ab.GetObject().editWindow = null; |
---|
| 3345 | + ab.GetObject().manipWindow = null; |
---|
2805 | 3346 | // ab.GetObject().objectUI = null; // ????????? |
---|
2806 | 3347 | |
---|
2807 | 3348 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
2808 | 3349 | break; |
---|
2809 | 3350 | } |
---|
2810 | 3351 | } |
---|
| 3352 | + |
---|
| 3353 | + cameraView.requestFocusInWindow(); |
---|
2811 | 3354 | refreshContents(true); |
---|
2812 | 3355 | } else |
---|
2813 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 3356 | + if (source == editItem || source == editButton) |
---|
2814 | 3357 | { |
---|
| 3358 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3359 | + { |
---|
| 3360 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3361 | + child.pinned = true; |
---|
| 3362 | + } |
---|
| 3363 | + |
---|
2815 | 3364 | EditSelection(false); |
---|
2816 | 3365 | } else |
---|
2817 | | - if (event.getSource() == uneditButton) |
---|
| 3366 | + if (source == uneditButton) |
---|
2818 | 3367 | { |
---|
2819 | 3368 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2820 | 3369 | { |
---|
2821 | 3370 | Object3D child = (Object3D)e.nextElement(); |
---|
2822 | 3371 | if(child.editWindow != null) |
---|
2823 | 3372 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3373 | + child.pinned = false; |
---|
2824 | 3374 | child.CloseUI(); |
---|
2825 | 3375 | listUI.remove(child); |
---|
2826 | 3376 | |
---|
2827 | | - child.editWindow = null; // ??????????? |
---|
| 3377 | + //child.editWindow = null; // ??????????? |
---|
2828 | 3378 | } |
---|
2829 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 3379 | + objEditor.ctrlPanel.FlushUI(); |
---|
2830 | 3380 | //objEditor.jTree.clearSelection(); |
---|
2831 | 3381 | //objEditor.ResetSliders(); |
---|
2832 | 3382 | refreshContents(true); |
---|
2833 | 3383 | } else |
---|
2834 | | - if (event.getSource() == clearPanelButton) |
---|
| 3384 | + if (source == clearPanelButton) |
---|
2835 | 3385 | { |
---|
2836 | 3386 | assert(copy == group); |
---|
2837 | 3387 | //copy.ClearUI(); |
---|
2838 | 3388 | for (Object3D obj : listUI) |
---|
2839 | 3389 | { |
---|
| 3390 | + obj.pinned = false; |
---|
2840 | 3391 | obj.CloseUI(); |
---|
2841 | 3392 | } |
---|
2842 | 3393 | listUI.clear(); |
---|
2843 | 3394 | refreshContents(true); |
---|
2844 | 3395 | } else |
---|
2845 | | - if (event.getSource() == allParamsButton) |
---|
| 3396 | + if (source == allParamsButton) |
---|
2846 | 3397 | { |
---|
2847 | 3398 | assert(copy == group); |
---|
2848 | 3399 | |
---|
2849 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3400 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
2850 | 3401 | |
---|
2851 | 3402 | for (Object3D obj : listUI) |
---|
2852 | 3403 | { |
---|
.. | .. |
---|
2863 | 3414 | |
---|
2864 | 3415 | refreshContents(true); |
---|
2865 | 3416 | } else |
---|
2866 | | - if (event.getSource() == unselectButton) |
---|
| 3417 | + if (source == unselectButton) |
---|
2867 | 3418 | { |
---|
2868 | 3419 | objEditor.jTree.clearSelection(); |
---|
2869 | 3420 | // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2870 | 3421 | objEditor.ResetSliders(); |
---|
2871 | 3422 | refreshContents(true); |
---|
2872 | 3423 | } else |
---|
2873 | | - if(event.getSource() instanceof cRadio) |
---|
| 3424 | + if(source instanceof cRadio) |
---|
2874 | 3425 | { |
---|
2875 | 3426 | group.parent = keepparent; |
---|
2876 | 3427 | group.attributes = 0; |
---|
2877 | 3428 | //group.editWindow = null; |
---|
2878 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 3429 | + /*cRadio*/ radio = (cRadio)source; |
---|
2879 | 3430 | Object3D obj = radio.GetObject(); |
---|
2880 | 3431 | System.out.println("Edit " + obj); |
---|
2881 | 3432 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2895 | 3446 | } |
---|
2896 | 3447 | |
---|
2897 | 3448 | copy = group; |
---|
2898 | | - //CameraPane.theRenderer.object = group; |
---|
| 3449 | + //Globals.theRenderer.object = group; |
---|
2899 | 3450 | if(!useclient) |
---|
2900 | 3451 | { |
---|
2901 | 3452 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2904 | 3455 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2905 | 3456 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2906 | 3457 | cameraView.object = group; |
---|
2907 | | - cameraView.lighttouched = true; |
---|
| 3458 | + //cameraView.lighttouched = true; |
---|
| 3459 | + Globals.lighttouched = true; |
---|
2908 | 3460 | topView.object = group; |
---|
2909 | 3461 | frontView.object = group; |
---|
2910 | 3462 | sideView.object = group; |
---|
2911 | 3463 | } |
---|
2912 | | - group.editWindow = this; |
---|
| 3464 | + |
---|
| 3465 | +// fix "+" issue |
---|
| 3466 | + //group.editWindow = this; |
---|
| 3467 | + group.manipWindow = this; |
---|
| 3468 | + |
---|
2913 | 3469 | /* |
---|
2914 | 3470 | currentLayout = radio.layout; |
---|
2915 | 3471 | if (currentLayout == null) |
---|
2916 | 3472 | currentLayout = sevenButton; |
---|
2917 | 3473 | */ |
---|
2918 | 3474 | radio.layout.doClick(); |
---|
| 3475 | + |
---|
| 3476 | + ClearUnpinned(); |
---|
| 3477 | + SetPinStates(group.selection.size() > 0); |
---|
| 3478 | + if (group.selection.size() == 1) |
---|
| 3479 | + EditSelection(false); |
---|
2919 | 3480 | keepparent = group.parent; |
---|
2920 | 3481 | // PARENT = NULL or not??? |
---|
2921 | 3482 | //group.parent = null; // ROOT |
---|
2922 | 3483 | //group.attributes = -1; |
---|
2923 | 3484 | ResetModel(); |
---|
| 3485 | + |
---|
| 3486 | + cameraView.requestFocusInWindow(); |
---|
2924 | 3487 | refreshContents(true); |
---|
2925 | | - } |
---|
| 3488 | + } else if (event.getSource() == editCameraItem) |
---|
| 3489 | + { |
---|
| 3490 | + cameraView.ProtectCamera(); |
---|
| 3491 | + cameraView.repaint(); |
---|
| 3492 | + return; |
---|
| 3493 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
| 3494 | + { |
---|
| 3495 | + cameraView.RevertCamera(); |
---|
| 3496 | + cameraView.repaint(); |
---|
| 3497 | + return; |
---|
| 3498 | + // } else if (event.getSource() == textureButton) |
---|
| 3499 | + // { |
---|
| 3500 | + // return; // true; |
---|
| 3501 | + } |
---|
2926 | 3502 | else |
---|
2927 | 3503 | { |
---|
2928 | 3504 | //return super.action(event, arg); |
---|
.. | .. |
---|
2931 | 3507 | } |
---|
2932 | 3508 | |
---|
2933 | 3509 | boolean useclient = false; |
---|
2934 | | - cRadio radio; |
---|
2935 | 3510 | |
---|
2936 | 3511 | void ToggleRoot() |
---|
2937 | 3512 | { |
---|
.. | .. |
---|
2940 | 3515 | if (useclient) |
---|
2941 | 3516 | { |
---|
2942 | 3517 | cameraView.object = client; |
---|
2943 | | - cameraView.lighttouched = true; |
---|
| 3518 | + Globals.lighttouched = true; |
---|
2944 | 3519 | //topView.object = client; |
---|
2945 | 3520 | //frontView.object = client; |
---|
2946 | 3521 | //sideView.object = client; |
---|
.. | .. |
---|
2948 | 3523 | else |
---|
2949 | 3524 | { |
---|
2950 | 3525 | cameraView.object = group; |
---|
2951 | | - cameraView.lighttouched = true; |
---|
| 3526 | + Globals.lighttouched = true; |
---|
2952 | 3527 | //topView.object = group; |
---|
2953 | 3528 | //frontView.object = group; |
---|
2954 | 3529 | //sideView.object = group; |
---|
.. | .. |
---|
2983 | 3558 | refreshContents(); |
---|
2984 | 3559 | } |
---|
2985 | 3560 | |
---|
| 3561 | + void TransformChildren() |
---|
| 3562 | + { |
---|
| 3563 | + Object3D obj; |
---|
| 3564 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3565 | + { |
---|
| 3566 | + obj = (Object3D)e.nextElement(); |
---|
| 3567 | + obj.KeepTextureMatrices(); |
---|
| 3568 | + obj.TransformChildren(); |
---|
| 3569 | + obj.RestoreTextureMatrices(); |
---|
| 3570 | + |
---|
| 3571 | +// if (obj.parent == null) |
---|
| 3572 | +// { |
---|
| 3573 | +// System.out.println("NULL PARENT!"); |
---|
| 3574 | +// new Exception().printStackTrace(); |
---|
| 3575 | +// } |
---|
| 3576 | +// else |
---|
| 3577 | +// TouchTransform(obj); |
---|
| 3578 | +// //obj.parent.Touch(); |
---|
| 3579 | + } |
---|
| 3580 | + |
---|
| 3581 | + refreshContents(); |
---|
| 3582 | + } |
---|
2986 | 3583 | |
---|
2987 | 3584 | void ResetTransform() |
---|
2988 | 3585 | { |
---|
.. | .. |
---|
3095 | 3692 | refreshContents(); |
---|
3096 | 3693 | } |
---|
3097 | 3694 | |
---|
3098 | | - void ResetCentroid() |
---|
| 3695 | + void ResetCentroid(boolean full) |
---|
3099 | 3696 | { |
---|
3100 | 3697 | Object3D obj; |
---|
3101 | 3698 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3110 | 3707 | LA.matIdentity(Object3D.mat); |
---|
3111 | 3708 | obj.getBounds(minima, maxima, false); |
---|
3112 | 3709 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3113 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3710 | + if (full) |
---|
| 3711 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3114 | 3712 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3115 | 3713 | obj.TransformMesh(Object3D.mat); |
---|
| 3714 | + |
---|
3116 | 3715 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3117 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3716 | + if (full) |
---|
| 3717 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3118 | 3718 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3719 | + |
---|
3119 | 3720 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3120 | 3721 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3121 | 3722 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3144 | 3745 | |
---|
3145 | 3746 | int size = obj.MemorySize(); |
---|
3146 | 3747 | |
---|
3147 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3748 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3749 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3148 | 3750 | } |
---|
3149 | 3751 | } |
---|
3150 | 3752 | catch (Exception e) |
---|
.. | .. |
---|
3181 | 3783 | obj = (Object3D)e.nextElement(); |
---|
3182 | 3784 | |
---|
3183 | 3785 | System.out.println("Object is: " + obj); |
---|
3184 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3786 | + Grafreed.AnalyzeObject(obj); |
---|
3185 | 3787 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3186 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3788 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3187 | 3789 | |
---|
3188 | 3790 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3189 | 3791 | } |
---|
.. | .. |
---|
3225 | 3827 | void GenNormals(boolean crease) |
---|
3226 | 3828 | { |
---|
3227 | 3829 | group.GenNormalsS(crease); |
---|
| 3830 | + |
---|
| 3831 | + refreshContents(); |
---|
| 3832 | + } |
---|
| 3833 | + |
---|
| 3834 | + void GenNormalsMESH() |
---|
| 3835 | + { |
---|
| 3836 | + group.GenNormalsMeshS(); |
---|
3228 | 3837 | |
---|
3229 | 3838 | refreshContents(); |
---|
3230 | 3839 | } |
---|
.. | .. |
---|
3397 | 4006 | |
---|
3398 | 4007 | void ParseVertices() |
---|
3399 | 4008 | { |
---|
3400 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3401 | | - GrafreeD.epsequal = true; |
---|
| 4009 | + boolean epsequal = Grafreed.epsequal; |
---|
| 4010 | + Grafreed.epsequal = true; |
---|
3402 | 4011 | |
---|
3403 | 4012 | for (int i=0; i<group.selection.size(); i++) |
---|
3404 | 4013 | { |
---|
.. | .. |
---|
3423 | 4032 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3424 | 4033 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3425 | 4034 | |
---|
3426 | | - g.add(GrafreeD.clipboard); |
---|
| 4035 | + g.add(Grafreed.clipboard); |
---|
3427 | 4036 | |
---|
3428 | 4037 | buffer.add(g); |
---|
3429 | 4038 | } |
---|
.. | .. |
---|
3438 | 4047 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3439 | 4048 | } |
---|
3440 | 4049 | |
---|
3441 | | - GrafreeD.epsequal = epsequal; |
---|
| 4050 | + Grafreed.epsequal = epsequal; |
---|
3442 | 4051 | |
---|
3443 | 4052 | refreshContents(); |
---|
3444 | 4053 | } |
---|
.. | .. |
---|
3456 | 4065 | String pigment = Object3D.GetPigment(tex); |
---|
3457 | 4066 | //String bump = Object3D.GetBump(tex); |
---|
3458 | 4067 | |
---|
3459 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4068 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 4069 | + |
---|
| 4070 | + try |
---|
| 4071 | + { |
---|
| 4072 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4073 | + } |
---|
| 4074 | + catch (Exception e) |
---|
| 4075 | + { |
---|
| 4076 | + System.err.println("FAIL: " + node); |
---|
| 4077 | + } |
---|
3460 | 4078 | |
---|
3461 | 4079 | double s = v.s; |
---|
3462 | 4080 | |
---|
.. | .. |
---|
3544 | 4162 | |
---|
3545 | 4163 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3546 | 4164 | |
---|
3547 | | - boolean random = CameraPane.RANDOM; |
---|
3548 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 4165 | + boolean random = CameraPane.SWITCH; |
---|
| 4166 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3549 | 4167 | lowres.linkVerticesThis(null); |
---|
3550 | 4168 | lowres.linkVerticesThis(sn); |
---|
3551 | | - CameraPane.RANDOM = random; |
---|
| 4169 | + CameraPane.SWITCH = random; |
---|
3552 | 4170 | |
---|
3553 | 4171 | System.err.flush(); |
---|
3554 | 4172 | |
---|
.. | .. |
---|
3588 | 4206 | return; |
---|
3589 | 4207 | |
---|
3590 | 4208 | Object3D poses = group.selection.get(0); |
---|
3591 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 4209 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3592 | 4210 | |
---|
3593 | 4211 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3594 | 4212 | |
---|
.. | .. |
---|
3757 | 4375 | group.selection.RelinkToSupport(); // july 2014 |
---|
3758 | 4376 | System.out.println("DONE."); |
---|
3759 | 4377 | refreshContents(); |
---|
3760 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 4378 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3761 | 4379 | } |
---|
3762 | 4380 | |
---|
3763 | 4381 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3782 | 4400 | |
---|
3783 | 4401 | void ClipMesh() |
---|
3784 | 4402 | { |
---|
3785 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4403 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3786 | 4404 | { |
---|
3787 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4405 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3788 | 4406 | |
---|
3789 | 4407 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3790 | 4408 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3793 | 4411 | // { |
---|
3794 | 4412 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3795 | 4413 | // } |
---|
3796 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4414 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3797 | 4415 | } |
---|
3798 | 4416 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3799 | 4417 | System.out.println("DONE."); |
---|
.. | .. |
---|
3840 | 4458 | void MarkLeaves(boolean hide) |
---|
3841 | 4459 | { |
---|
3842 | 4460 | group.selection.MarkLeaves(hide); |
---|
| 4461 | + refreshContents(); |
---|
| 4462 | + } |
---|
| 4463 | + |
---|
| 4464 | + void RewindLeaves(boolean hide) |
---|
| 4465 | + { |
---|
| 4466 | + group.selection.RewindLeaves(hide); |
---|
| 4467 | + refreshContents(); |
---|
| 4468 | + } |
---|
| 4469 | + |
---|
| 4470 | + void RandomLeaves(boolean hide) |
---|
| 4471 | + { |
---|
| 4472 | + group.selection.RandomLeaves(hide); |
---|
3843 | 4473 | refreshContents(); |
---|
3844 | 4474 | } |
---|
3845 | 4475 | |
---|
.. | .. |
---|
3914 | 4544 | // } |
---|
3915 | 4545 | // } |
---|
3916 | 4546 | |
---|
3917 | | - static boolean allparams = true; |
---|
3918 | | - |
---|
3919 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
3920 | | - |
---|
3921 | 4547 | void EditSelection(boolean newWindow) |
---|
3922 | 4548 | { |
---|
3923 | 4549 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
3925 | 4551 | { |
---|
3926 | 4552 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
3927 | 4553 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
3928 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4554 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3929 | 4555 | |
---|
3930 | 4556 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
3931 | | - if(elem != group) |
---|
| 4557 | + if(elem != group || !newWindow) |
---|
3932 | 4558 | { |
---|
3933 | 4559 | // if (!(elem instanceof Composite)) |
---|
3934 | 4560 | // newWindow = false; |
---|
.. | .. |
---|
4010 | 4636 | //new Exception().printStackTrace(); |
---|
4011 | 4637 | |
---|
4012 | 4638 | freezemodel = true; |
---|
4013 | | - |
---|
| 4639 | + ClearUnpinned(); |
---|
| 4640 | + |
---|
4014 | 4641 | /**/ |
---|
4015 | 4642 | //switch (event.id) |
---|
4016 | 4643 | { |
---|
.. | .. |
---|
4018 | 4645 | //case 702: // Event.LIST_DESELECT |
---|
4019 | 4646 | group.deselectAll(); |
---|
4020 | 4647 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4021 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4022 | 4648 | if (tps != null) |
---|
4023 | 4649 | { |
---|
4024 | 4650 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4027 | 4653 | |
---|
4028 | 4654 | //if (child.parent != null) |
---|
4029 | 4655 | //child.parent.addSelectee(child); |
---|
| 4656 | + objEditor.SetMaterial(child); |
---|
4030 | 4657 | group.addSelectee(child); |
---|
4031 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4032 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4033 | | - System.err.println("info : " + child.GetPath()); |
---|
4034 | 4658 | } |
---|
4035 | 4659 | } |
---|
4036 | | - else |
---|
4037 | | - { |
---|
4038 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
4039 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
4040 | | - System.err.println("info : " + group.GetPath()); |
---|
4041 | | - } |
---|
| 4660 | +// else |
---|
| 4661 | +// { |
---|
| 4662 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4663 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4664 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4665 | +// } |
---|
4042 | 4666 | |
---|
4043 | | - objEditor.SetText(); // jan 2014 |
---|
4044 | | - |
---|
4045 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4667 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4046 | 4668 | CameraPane.flash = true; |
---|
4047 | 4669 | |
---|
4048 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4670 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4049 | 4671 | // a camera |
---|
4050 | 4672 | { |
---|
4051 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4052 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
4053 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
4054 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4673 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
| 4674 | + { |
---|
| 4675 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4676 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4677 | + } |
---|
| 4678 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4679 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4055 | 4680 | } |
---|
4056 | 4681 | |
---|
| 4682 | + if (tps != null && tps.length == 1) |
---|
| 4683 | + { |
---|
| 4684 | + EditSelection(false); |
---|
| 4685 | + } |
---|
| 4686 | + |
---|
| 4687 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4688 | + |
---|
4057 | 4689 | refreshContents(); |
---|
4058 | 4690 | //return true; |
---|
4059 | 4691 | } |
---|
.. | .. |
---|
4062 | 4694 | |
---|
4063 | 4695 | freezemodel = false; |
---|
4064 | 4696 | } |
---|
| 4697 | + |
---|
| 4698 | + void SetPinStates(boolean enabled) |
---|
| 4699 | + { |
---|
| 4700 | + editButton.setEnabled(enabled); |
---|
| 4701 | + uneditButton.setEnabled(enabled); |
---|
| 4702 | + unselectButton.setEnabled(enabled); |
---|
| 4703 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4704 | + } |
---|
| 4705 | + |
---|
| 4706 | + void refreshContents(boolean cp) |
---|
| 4707 | + { |
---|
| 4708 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4709 | + if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
| 4710 | + { |
---|
| 4711 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4712 | + |
---|
| 4713 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4714 | + { |
---|
| 4715 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4716 | + |
---|
| 4717 | + objEditor.AddInfo(child, this, true); |
---|
| 4718 | + System.err.println("info : " + child.GetPath()); |
---|
| 4719 | + } |
---|
| 4720 | + |
---|
| 4721 | + objEditor.SetText(); // jan 2014 |
---|
| 4722 | + } |
---|
| 4723 | + |
---|
| 4724 | + super.refreshContents(cp); |
---|
| 4725 | + } |
---|
4065 | 4726 | |
---|
4066 | 4727 | void linkSomething(Object3D thing) |
---|
4067 | 4728 | { |
---|
.. | .. |
---|
4133 | 4794 | { |
---|
4134 | 4795 | if (group.selection.isEmpty()) |
---|
4135 | 4796 | return; |
---|
4136 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4797 | + |
---|
| 4798 | + Grafreed.clipboardIsTempGroup = false; |
---|
4137 | 4799 | Composite tGroup = null; |
---|
4138 | 4800 | if (group.selection.size() > 0) // 1) |
---|
4139 | 4801 | { |
---|
4140 | 4802 | tGroup = new cGroup(); |
---|
4141 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4803 | + Grafreed.clipboardIsTempGroup = true; |
---|
4142 | 4804 | } |
---|
4143 | 4805 | |
---|
4144 | 4806 | if (cut) |
---|
4145 | 4807 | { |
---|
| 4808 | + if (Globals.SAVEONMAKE) |
---|
| 4809 | + Save(); |
---|
4146 | 4810 | //int indices[] = jList.getSelectedIndices(); |
---|
4147 | 4811 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4148 | 4812 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4178 | 4842 | //System.out.println("cut " + child); |
---|
4179 | 4843 | //System.out.println("parent = " + child.parent); |
---|
4180 | 4844 | // tmp.addChild(child); |
---|
4181 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4845 | + if (Grafreed.clipboardIsTempGroup) |
---|
4182 | 4846 | tGroup.add/*Child*/(tmp); |
---|
4183 | 4847 | else |
---|
4184 | | - GrafreeD.clipboard = tmp; |
---|
| 4848 | + Grafreed.clipboard = tmp; |
---|
4185 | 4849 | } |
---|
4186 | 4850 | else |
---|
4187 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4851 | + if (Grafreed.clipboardIsTempGroup) |
---|
4188 | 4852 | tGroup.add/*Child*/(child); |
---|
4189 | 4853 | else |
---|
4190 | | - GrafreeD.clipboard = child; |
---|
| 4854 | + Grafreed.clipboard = child; |
---|
4191 | 4855 | } |
---|
4192 | 4856 | |
---|
4193 | 4857 | //ResetModel(); |
---|
.. | .. |
---|
4219 | 4883 | //System.out.println("cut " + elem); |
---|
4220 | 4884 | //System.out.println("parent = " + elem.parent); |
---|
4221 | 4885 | // tmp.addChild(elem); |
---|
4222 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4886 | + if (Grafreed.clipboardIsTempGroup) |
---|
4223 | 4887 | tGroup.add/*Child*/(tmp); |
---|
4224 | 4888 | else |
---|
4225 | | - GrafreeD.clipboard = tmp; |
---|
| 4889 | + Grafreed.clipboard = tmp; |
---|
4226 | 4890 | } |
---|
4227 | 4891 | else |
---|
4228 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4892 | + if (Grafreed.clipboardIsTempGroup) |
---|
4229 | 4893 | tGroup.add/*Child*/(child); |
---|
4230 | 4894 | else |
---|
4231 | | - GrafreeD.clipboard = child; |
---|
| 4895 | + Grafreed.clipboard = child; |
---|
4232 | 4896 | } |
---|
4233 | 4897 | |
---|
4234 | 4898 | } |
---|
4235 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4236 | | - GrafreeD.clipboard = tGroup; |
---|
| 4899 | + |
---|
| 4900 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4901 | + Grafreed.clipboard = tGroup; |
---|
| 4902 | + |
---|
4237 | 4903 | if (cut) |
---|
4238 | 4904 | { |
---|
4239 | 4905 | ResetModel(); |
---|
.. | .. |
---|
4247 | 4913 | // return; |
---|
4248 | 4914 | boolean first = true; |
---|
4249 | 4915 | |
---|
4250 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4916 | + if (Grafreed.clipboardIsTempGroup) |
---|
4251 | 4917 | { |
---|
4252 | 4918 | Composite temp; |
---|
4253 | 4919 | |
---|
.. | .. |
---|
4258 | 4924 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4259 | 4925 | */ |
---|
4260 | 4926 | Object3D elem; |
---|
4261 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4927 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4262 | 4928 | { |
---|
4263 | 4929 | Object3D child = (Object3D)e.nextElement(); |
---|
4264 | 4930 | |
---|
.. | .. |
---|
4292 | 4958 | //Object3D cb = Applet3D.clipboard; |
---|
4293 | 4959 | //temp.addChild(cb); |
---|
4294 | 4960 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4295 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4296 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4297 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4298 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4299 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4961 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4962 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4963 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4964 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4965 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4300 | 4966 | else |
---|
4301 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4302 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4967 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4968 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4303 | 4969 | } |
---|
4304 | 4970 | |
---|
4305 | 4971 | ResetModel(); |
---|
4306 | 4972 | refreshContents(); |
---|
4307 | 4973 | } |
---|
4308 | 4974 | |
---|
4309 | | - void pasteInto(boolean copyit) |
---|
| 4975 | + void pasteInto(boolean copyit, boolean clone) |
---|
4310 | 4976 | { |
---|
4311 | 4977 | // if (GrafreeD.clipboard == null) |
---|
4312 | 4978 | // return; |
---|
.. | .. |
---|
4335 | 5001 | if (copyit) |
---|
4336 | 5002 | { |
---|
4337 | 5003 | // paste(false); |
---|
4338 | | - CloneClipboard(false); // sept 2014 |
---|
| 5004 | + if (clone) |
---|
| 5005 | + { |
---|
| 5006 | + CloneClipboard(false); // sept 2014 |
---|
| 5007 | + } |
---|
| 5008 | + else |
---|
| 5009 | + { |
---|
| 5010 | + paste(false); |
---|
| 5011 | + } |
---|
4339 | 5012 | } |
---|
4340 | 5013 | else |
---|
4341 | 5014 | { |
---|
4342 | 5015 | boolean first = true; |
---|
4343 | 5016 | |
---|
4344 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5017 | + if (Grafreed.clipboardIsTempGroup) |
---|
4345 | 5018 | { |
---|
4346 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 5019 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4347 | 5020 | Object3D copy; |
---|
4348 | 5021 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4349 | 5022 | { |
---|
.. | .. |
---|
4353 | 5026 | } |
---|
4354 | 5027 | } else |
---|
4355 | 5028 | { |
---|
4356 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 5029 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4357 | 5030 | } |
---|
4358 | 5031 | } |
---|
4359 | 5032 | } |
---|
.. | .. |
---|
4758 | 5431 | } |
---|
4759 | 5432 | */ |
---|
4760 | 5433 | |
---|
4761 | | - void ImportGFD() |
---|
4762 | | - { |
---|
4763 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4764 | | - browser.show(); |
---|
4765 | | - String filename = browser.getFile(); |
---|
4766 | | - if (filename != null && filename.length() > 0) |
---|
4767 | | - { |
---|
4768 | | - String fullname = browser.getDirectory() + filename; |
---|
4769 | | - |
---|
4770 | | - //Object3D readobj = |
---|
4771 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4772 | | - //makeSomething(readobj); |
---|
4773 | | - } |
---|
4774 | | - } |
---|
4775 | | - |
---|
4776 | 5434 | /* |
---|
4777 | 5435 | public void Callback(Object obj) |
---|
4778 | 5436 | { |
---|
.. | .. |
---|
4796 | 5454 | } |
---|
4797 | 5455 | */ |
---|
4798 | 5456 | |
---|
4799 | | - void ImportVRMLX3D() |
---|
4800 | | - { |
---|
4801 | | - if (GrafreeD.standAlone) |
---|
4802 | | - { |
---|
4803 | | - /**/ |
---|
4804 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4805 | | - browser.show(); |
---|
4806 | | - String filename = browser.getFile(); |
---|
4807 | | - if (filename != null && filename.length() > 0) |
---|
4808 | | - { |
---|
4809 | | - String fullname = browser.getDirectory() + filename; |
---|
4810 | | - LoadVRMLX3D(fullname); |
---|
4811 | | - } |
---|
4812 | | - /**/ |
---|
4813 | | - } |
---|
4814 | | - } |
---|
4815 | | - |
---|
4816 | 5457 | String GetFile(String dialogName) |
---|
4817 | 5458 | { |
---|
4818 | | - if (GrafreeD.standAlone) |
---|
| 5459 | + if (Grafreed.standAlone) |
---|
4819 | 5460 | { |
---|
4820 | 5461 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4821 | 5462 | browser.show(); |
---|
.. | .. |
---|
4879 | 5520 | cButton flashSelectionButton; |
---|
4880 | 5521 | cButton editButton; |
---|
4881 | 5522 | cButton uneditButton; |
---|
| 5523 | + JCheckBox allParamsButton; |
---|
4882 | 5524 | cButton clearpanelButton; |
---|
4883 | | - cButton allParamsButton; |
---|
4884 | 5525 | cButton unselectButton; |
---|
4885 | 5526 | |
---|
| 5527 | + cButton restoreCameraButton; |
---|
| 5528 | + |
---|
| 5529 | + cButton minButton; |
---|
| 5530 | + cButton maxButton; |
---|
| 5531 | + cButton fullButton; |
---|
| 5532 | + cButton saveButton; |
---|
| 5533 | + cButton oneStepButton; |
---|
| 5534 | + |
---|
| 5535 | + cButton groupButton; |
---|
| 5536 | + cButton ungroupButton; |
---|
| 5537 | + cButton compositeButton; |
---|
| 5538 | + cButton switchButton; |
---|
| 5539 | + cButton loopButton; |
---|
| 5540 | + cButton textureButton; |
---|
| 5541 | + |
---|
| 5542 | + cButton gridButton; |
---|
| 5543 | + cButton boxButton; |
---|
| 5544 | + cButton sphereButton; |
---|
| 5545 | + cButton coneButton; |
---|
| 5546 | + cButton torusButton; |
---|
| 5547 | + cButton superButton; |
---|
| 5548 | + cButton kleinButton; |
---|
| 5549 | + cButton particlesButton; |
---|
| 5550 | + cButton overlayButton; |
---|
| 5551 | + cButton lightButton; |
---|
| 5552 | + |
---|
4886 | 5553 | cButton screenfitButton; |
---|
4887 | 5554 | cButton screenfitpointButton; |
---|
4888 | 5555 | cButton snapobjectButton; |
---|
.. | .. |
---|
4894 | 5561 | |
---|
4895 | 5562 | cButton setsupportButton; |
---|
4896 | 5563 | |
---|
4897 | | - cButton twoButton; |
---|
4898 | | - cButton sixButton; |
---|
4899 | | - cButton threeButton; |
---|
4900 | | - cButton sevenButton; |
---|
4901 | | - cButton fourButton; // full panel |
---|
4902 | | - cButton oneButton; // full XYZ |
---|
4903 | | - //cButton currentLayout; |
---|
4904 | | - |
---|
4905 | 5564 | // |
---|
4906 | 5565 | //Composite |
---|
4907 | 5566 | Object3D // to do !! |
---|
.. | .. |
---|
4911 | 5570 | //JTree jTree; |
---|
4912 | 5571 | private MenuItem lookAtItem; |
---|
4913 | 5572 | private MenuItem lookFromItem; |
---|
4914 | | - private MenuItem switchItem; |
---|
| 5573 | + private MenuItem switchViewItem; |
---|
4915 | 5574 | private MenuItem cutItem; |
---|
4916 | | - private MenuItem duplicateItem; |
---|
| 5575 | + private MenuItem undoItem; |
---|
| 5576 | + private MenuItem redoItem; |
---|
| 5577 | + private JMenuItem duplicateItem; |
---|
4917 | 5578 | private MenuItem cloneItem; |
---|
4918 | 5579 | private MenuItem cloneSupportItem; |
---|
4919 | 5580 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
4926 | 5587 | private MenuItem linkverticesItem; |
---|
4927 | 5588 | private MenuItem relinkverticesItem; |
---|
4928 | 5589 | private MenuItem setMasterItem; |
---|
4929 | | - private MenuItem resetMeshItem; |
---|
| 5590 | + private MenuItem resetAllItem; |
---|
4930 | 5591 | private MenuItem stepAllItem; |
---|
4931 | 5592 | private MenuItem revertMeshItem; |
---|
4932 | 5593 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
4937 | 5598 | private MenuItem mergeGeometriesItem; |
---|
4938 | 5599 | private MenuItem copyItem; |
---|
4939 | 5600 | private MenuItem pasteItem; |
---|
| 5601 | + private MenuItem pasteIntoItem; |
---|
4940 | 5602 | private MenuItem pasteLinkItem; |
---|
4941 | 5603 | private MenuItem pasteCloneItem; |
---|
4942 | 5604 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
4975 | 5637 | private MenuItem showleavesItem; |
---|
4976 | 5638 | private MenuItem markleavesItem; |
---|
4977 | 5639 | private MenuItem unmarkleavesItem; |
---|
| 5640 | + private MenuItem rewindleavesItem; |
---|
| 5641 | + private MenuItem unrewindleavesItem; |
---|
| 5642 | + private MenuItem randomleavesItem; |
---|
| 5643 | + private MenuItem unrandomleavesItem; |
---|
4978 | 5644 | |
---|
4979 | 5645 | private MenuItem flipVItem; |
---|
4980 | 5646 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
4986 | 5652 | private MenuItem panoTexturesItem; |
---|
4987 | 5653 | |
---|
4988 | 5654 | private MenuItem resetCentroidItem; |
---|
4989 | | - private MenuItem transformgeometryItem; |
---|
| 5655 | + private MenuItem resetCentroidXZItem; |
---|
4990 | 5656 | private MenuItem resetTransformItem; |
---|
| 5657 | + private MenuItem transformGeometryItem; |
---|
| 5658 | + private MenuItem transformChildrenItem; |
---|
4991 | 5659 | private MenuItem hideItem; |
---|
4992 | 5660 | private MenuItem grabItem; |
---|
4993 | 5661 | private MenuItem backItem; |
---|
4994 | 5662 | private MenuItem frontItem; |
---|
4995 | 5663 | private MenuItem cameraItem; |
---|
4996 | 5664 | private MenuItem compositeItem; |
---|
4997 | | - private MenuItem randomItem; |
---|
| 5665 | + private MenuItem switchItem; |
---|
4998 | 5666 | private MenuItem physicsItem; |
---|
4999 | 5667 | private MenuItem frameselectorItem; |
---|
5000 | 5668 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5009 | 5677 | |
---|
5010 | 5678 | private MenuItem resetParentItem; |
---|
5011 | 5679 | private MenuItem repairParentItem; |
---|
| 5680 | + private MenuItem repairShadowItem; |
---|
5012 | 5681 | private MenuItem sortbysizeItem; |
---|
5013 | 5682 | private MenuItem sortbynameItem; |
---|
5014 | 5683 | |
---|
.. | .. |
---|
5033 | 5702 | private MenuItem blobItem; |
---|
5034 | 5703 | private MenuItem latheItem; |
---|
5035 | 5704 | private MenuItem bezierItem; |
---|
5036 | | - private MenuItem checkerItem; |
---|
| 5705 | + private MenuItem overlayItem; |
---|
5037 | 5706 | private MenuItem meshItem; |
---|
5038 | 5707 | // private MenuItem meshGroupItem; |
---|
5039 | 5708 | private MenuItem springItem; |
---|
.. | .. |
---|
5055 | 5724 | private MenuItem doubleItem; |
---|
5056 | 5725 | private MenuItem tripleItem; |
---|
5057 | 5726 | |
---|
5058 | | - private MenuItem importGFDItem; |
---|
5059 | | - private MenuItem importVRMLX3DItem; |
---|
5060 | | - private MenuItem import3DSItem; |
---|
5061 | | - private MenuItem importOBJItem; |
---|
5062 | | - |
---|
5063 | 5727 | private MenuItem computeAOItem; |
---|
5064 | 5728 | private MenuItem recompileItem; |
---|
5065 | 5729 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5069 | 5733 | private MenuItem analyzeItem; |
---|
5070 | 5734 | private MenuItem dumpItem; |
---|
5071 | 5735 | //boolean freezemodel = false; |
---|
| 5736 | + |
---|
| 5737 | + Menu cameraMenu; |
---|
| 5738 | + MenuItem editCameraItem; |
---|
| 5739 | + MenuItem restoreCameraItem; |
---|
5072 | 5740 | } |
---|