.. | .. |
---|
74 | 74 | this.copy = this.group = copy; |
---|
75 | 75 | //selectees = this.group.selectees; |
---|
76 | 76 | |
---|
77 | | - SetupMenu2(objEditor); |
---|
| 77 | + SetupMenu2(this); //objEditor); |
---|
78 | 78 | SetupUI2(objEditor); |
---|
79 | 79 | objEditor.SetupUI(true); |
---|
80 | 80 | SetupViews(objEditor); |
---|
.. | .. |
---|
98 | 98 | |
---|
99 | 99 | void CloneClipboard(boolean supports) |
---|
100 | 100 | { |
---|
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)); |
---|
| 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)); |
---|
106 | 106 | else |
---|
107 | | - makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
108 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 107 | + makeSomething(CloneObject(Grafreed.clipboard, false)); |
---|
| 108 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
109 | 109 | } |
---|
110 | 110 | |
---|
111 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
119 | 119 | // obj.support = null; |
---|
120 | 120 | if (!supports) |
---|
121 | 121 | obj.SaveSupports(); |
---|
122 | | - Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
123 | 123 | obj.parent = parent; |
---|
124 | 124 | // obj.support = support; |
---|
125 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
148 | 148 | |
---|
149 | 149 | //JTextField nameField; |
---|
150 | 150 | |
---|
151 | | - void SetupMenu2(ObjEditor oe) |
---|
| 151 | + void SetupMenu2(GroupEditor oe) |
---|
152 | 152 | { |
---|
| 153 | + oe.jTree = new cTree(); |
---|
| 154 | + |
---|
| 155 | + Menu menu; |
---|
| 156 | + oe.menuBar.add(menu = new Menu("Edit")); |
---|
| 157 | + //editItem = menu.add(new MenuItem("Edit")); |
---|
| 158 | + //editItem.addActionListener(this); |
---|
| 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")); |
---|
| 166 | + duplicateItem.addActionListener(this); |
---|
| 167 | + cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 168 | + cloneItem.addActionListener(this); |
---|
| 169 | + if (Globals.ADVANCED) |
---|
| 170 | + { |
---|
| 171 | + cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
| 172 | + cloneSupportItem.addActionListener(this); |
---|
| 173 | + } |
---|
| 174 | + menu.add("-"); |
---|
| 175 | + cutItem = menu.add(new MenuItem("Cut")); |
---|
| 176 | + cutItem.addActionListener(this); |
---|
| 177 | + copyItem = menu.add(new MenuItem("Copy")); |
---|
| 178 | + copyItem.addActionListener(this); |
---|
| 179 | + pasteItem = menu.add(new MenuItem("Paste")); |
---|
| 180 | + pasteItem.addActionListener(this); |
---|
| 181 | + |
---|
| 182 | + menu.add("-"); |
---|
| 183 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 184 | + pasteIntoItem.addActionListener(this); |
---|
| 185 | + pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
| 186 | + pasteLinkItem.addActionListener(this); |
---|
| 187 | + pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
| 188 | + pasteCloneItem.addActionListener(this); |
---|
| 189 | +// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
| 190 | +// pasteExpandItem.addActionListener(this); |
---|
| 191 | + menu.add("-"); |
---|
| 192 | + clearItem = menu.add(new MenuItem("Clear")); |
---|
| 193 | + clearItem.addActionListener(this); |
---|
| 194 | + |
---|
| 195 | + if (Globals.ADVANCED) |
---|
| 196 | + { |
---|
| 197 | + // Deletes the cameras... |
---|
| 198 | + clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
| 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(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 208 | + revertCameraItem.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()); |
---|
| 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 | + { |
---|
153 | 276 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
154 | 277 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
155 | 278 | //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
.. | .. |
---|
161 | 284 | lookAtItem.addActionListener(this); |
---|
162 | 285 | //lookFromItem.addActinoListener(this); |
---|
163 | 286 | //switchItem.addActionListener(this); |
---|
164 | | - Menu menu; |
---|
165 | | - oe.menuBar.add(menu = new Menu("Edit")); |
---|
166 | | - //editItem = menu.add(new MenuItem("Edit")); |
---|
167 | | - //editItem.addActionListener(this); |
---|
168 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
169 | | - duplicateItem.addActionListener(this); |
---|
170 | | - menu.add("-"); |
---|
171 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
172 | | - cloneItem.addActionListener(this); |
---|
173 | | - cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
174 | | - cloneSupportItem.addActionListener(this); |
---|
175 | | - menu.add("-"); |
---|
176 | | - cutItem = menu.add(new MenuItem("Cut")); |
---|
177 | | - cutItem.addActionListener(this); |
---|
178 | | - copyItem = menu.add(new MenuItem("Copy")); |
---|
179 | | - copyItem.addActionListener(this); |
---|
180 | | - pasteItem = menu.add(new MenuItem("Paste")); |
---|
181 | | - pasteItem.addActionListener(this); |
---|
182 | | - pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
183 | | - pasteLinkItem.addActionListener(this); |
---|
184 | | - pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
185 | | - pasteCloneItem.addActionListener(this); |
---|
186 | | -// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
187 | | -// pasteExpandItem.addActionListener(this); |
---|
188 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
189 | | - clearItem.addActionListener(this); |
---|
190 | | - clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
191 | | - clearAllItem.addActionListener(this); |
---|
192 | | - |
---|
| 287 | + } |
---|
| 288 | + |
---|
193 | 289 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
194 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
195 | | - resetMeshItem.addActionListener(this); |
---|
196 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
197 | | - stepAllItem.addActionListener(this); |
---|
| 290 | + if (Globals.ADVANCED) |
---|
| 291 | + { |
---|
198 | 292 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
199 | 293 | revertMeshItem.addActionListener(this); |
---|
200 | 294 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
201 | 295 | resetreferencesItem.addActionListener(this); |
---|
202 | 296 | menu.add("-"); |
---|
| 297 | + } |
---|
203 | 298 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
204 | 299 | overwriteGeoItem.addActionListener(this); |
---|
205 | 300 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
211 | 306 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
212 | 307 | overwriteUVItem.addActionListener(this); |
---|
213 | 308 | menu.add("-"); |
---|
| 309 | + if (Globals.ADVANCED) |
---|
| 310 | + { |
---|
214 | 311 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
215 | 312 | generateMeshItem.addActionListener(this); |
---|
216 | 313 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
217 | 314 | poseMeshItem.addActionListener(this); |
---|
218 | 315 | menu.add("-"); |
---|
| 316 | + } |
---|
219 | 317 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
220 | 318 | resetsupportItem.addActionListener(this); |
---|
221 | 319 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
222 | 320 | linkverticesItem.addActionListener(this); |
---|
223 | 321 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
224 | 322 | relinkverticesItem.addActionListener(this); |
---|
| 323 | + |
---|
| 324 | + if (Globals.ADVANCED) |
---|
| 325 | + { |
---|
225 | 326 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
226 | 327 | setMasterItem.addActionListener(this); |
---|
| 328 | + } |
---|
227 | 329 | |
---|
228 | 330 | oe.menuBar.add(menu = new Menu("Group")); |
---|
229 | 331 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
234 | 336 | frontItem.addActionListener(this); |
---|
235 | 337 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
236 | 338 | compositeItem.addActionListener(this); |
---|
237 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 339 | + |
---|
| 340 | + if (Globals.ADVANCED) |
---|
| 341 | + { |
---|
| 342 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
238 | 343 | hideItem.addActionListener(this); |
---|
| 344 | + } |
---|
239 | 345 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
240 | 346 | ungroupItem.addActionListener(this); |
---|
| 347 | + |
---|
241 | 348 | menu.add("-"); |
---|
| 349 | + |
---|
242 | 350 | randomItem = menu.add(new MenuItem("Switch node")); |
---|
243 | 351 | randomItem.addActionListener(this); |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
244 | 354 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
245 | 355 | switchGeoItem.addActionListener(this); |
---|
246 | 356 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
247 | 357 | switchTransfoItem.addActionListener(this); |
---|
| 358 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
| 359 | + morphItem.addActionListener(this); |
---|
| 360 | + |
---|
| 361 | + menu.add("-"); |
---|
248 | 362 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
249 | 363 | physicsItem.addActionListener(this); |
---|
250 | 364 | frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
251 | 365 | frameselectorItem.addActionListener(this); |
---|
252 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
253 | | - morphItem.addActionListener(this); |
---|
254 | 366 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
255 | 367 | scriptNodeItem.addActionListener(this); |
---|
256 | 368 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
257 | 369 | cameraItem.addActionListener(this); |
---|
| 370 | + } |
---|
258 | 371 | |
---|
259 | 372 | oe.menuBar.add(menu = new Menu("Object")); |
---|
260 | 373 | textureItem = menu.add(new MenuItem("Texture")); |
---|
.. | .. |
---|
263 | 376 | billboardItem.addActionListener(this); |
---|
264 | 377 | csgItem = menu.add(new MenuItem("CSG")); |
---|
265 | 378 | csgItem.addActionListener(this); |
---|
266 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 379 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
267 | 380 | shadowXItem.addActionListener(this); |
---|
268 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 381 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
269 | 382 | shadowYItem.addActionListener(this); |
---|
270 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 383 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
271 | 384 | shadowZItem.addActionListener(this); |
---|
| 385 | + if (Globals.ADVANCED) |
---|
| 386 | + { |
---|
| 387 | + menu.add("-"); |
---|
272 | 388 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
273 | 389 | linkerItem.addActionListener(this); |
---|
274 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
275 | | - templateItem.addActionListener(this); |
---|
276 | 390 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
277 | 391 | attributeItem.addActionListener(this); |
---|
| 392 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 393 | + templateItem.addActionListener(this); |
---|
278 | 394 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
279 | 395 | pointflowItem.addActionListener(this); |
---|
| 396 | + } |
---|
280 | 397 | menu.add("-"); |
---|
281 | 398 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
282 | 399 | resetTransformItem.addActionListener(this); |
---|
283 | 400 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
284 | 401 | resetCentroidItem.addActionListener(this); |
---|
285 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
286 | | - transformgeometryItem.addActionListener(this); |
---|
| 402 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 403 | + resetCentroidXZItem.addActionListener(this); |
---|
| 404 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 405 | + transformGeometryItem.addActionListener(this); |
---|
| 406 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 407 | + transformChildrenItem.addActionListener(this); |
---|
287 | 408 | |
---|
288 | 409 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
289 | 410 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
294 | 415 | genNormalsCADItem.addActionListener(this); |
---|
295 | 416 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
296 | 417 | genNormalsMESHItem.addActionListener(this); |
---|
| 418 | + if (Globals.ADVANCED) |
---|
| 419 | + { |
---|
297 | 420 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
298 | 421 | genNormalsMINEItem.addActionListener(this); |
---|
| 422 | + } |
---|
299 | 423 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
300 | 424 | stripifyItem.addActionListener(this); |
---|
301 | 425 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
317 | 441 | reduce34MeshItem.addActionListener(this); |
---|
318 | 442 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
319 | 443 | increaseMeshItem.addActionListener(this); |
---|
320 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
321 | | - smoothMeshItem.addActionListener(this); |
---|
322 | 444 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
323 | 445 | clipMeshItem.addActionListener(this); |
---|
| 446 | + |
---|
| 447 | + if (Globals.ADVANCED) |
---|
| 448 | + { |
---|
| 449 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 450 | + smoothMeshItem.addActionListener(this); |
---|
| 451 | + } |
---|
324 | 452 | |
---|
325 | 453 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
326 | 454 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
327 | 455 | clearMaterialsItem.addActionListener(this); |
---|
| 456 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 457 | + resetAllItem.addActionListener(this); |
---|
| 458 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 459 | + stepAllItem.addActionListener(this); |
---|
328 | 460 | menu.add("-"); |
---|
329 | 461 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
330 | 462 | liveleavesItem.addActionListener(this); |
---|
331 | 463 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
332 | 464 | unliveleavesItem.addActionListener(this); |
---|
| 465 | + if (Globals.ADVANCED) |
---|
| 466 | + { |
---|
333 | 467 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
334 | 468 | supportleavesItem.addActionListener(this); |
---|
335 | 469 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
336 | 470 | unsupportleavesItem.addActionListener(this); |
---|
| 471 | + } |
---|
337 | 472 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
338 | 473 | hideleavesItem.addActionListener(this); |
---|
339 | 474 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
342 | 477 | markleavesItem.addActionListener(this); |
---|
343 | 478 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
344 | 479 | unmarkleavesItem.addActionListener(this); |
---|
| 480 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 481 | + rewindleavesItem.addActionListener(this); |
---|
| 482 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 483 | + unrewindleavesItem.addActionListener(this); |
---|
| 484 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 485 | + randomleavesItem.addActionListener(this); |
---|
| 486 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 487 | + unrandomleavesItem.addActionListener(this); |
---|
345 | 488 | menu.add("-"); |
---|
346 | 489 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
347 | 490 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
377 | 520 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
378 | 521 | sortbynameItem.addActionListener(this); |
---|
379 | 522 | menu.add("-"); |
---|
| 523 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 524 | + shareGeometriesItem.addActionListener(this); |
---|
| 525 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 526 | + mergeGeometriesItem.addActionListener(this); |
---|
| 527 | + if (Globals.ADVANCED) |
---|
| 528 | + { |
---|
| 529 | + // Pretty much the same as duplicate and clone. |
---|
380 | 530 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
381 | 531 | extractGeometriesItem.addActionListener(this); |
---|
382 | 532 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
383 | 533 | cloneGeometriesItem.addActionListener(this); |
---|
384 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
385 | | - shareGeometriesItem.addActionListener(this); |
---|
386 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
387 | | - mergeGeometriesItem.addActionListener(this); |
---|
| 534 | + } |
---|
388 | 535 | |
---|
389 | 536 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
390 | 537 | buildCreateMenu(menu); |
---|
391 | 538 | |
---|
392 | | - |
---|
393 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
394 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
395 | | - importGFDItem.addActionListener(this); |
---|
396 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
397 | | - importVRMLX3DItem.addActionListener(this); |
---|
398 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
399 | | - importOBJItem.addActionListener(this); |
---|
400 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
401 | | - import3DSItem.addActionListener(this); |
---|
402 | | - |
---|
403 | 539 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
404 | 540 | buildToolsMenu(menu); |
---|
405 | 541 | } |
---|
406 | 542 | |
---|
407 | 543 | void SetupUI2(ObjEditor oe) |
---|
408 | 544 | { |
---|
| 545 | + // June 2019 |
---|
| 546 | + if (oe == null) |
---|
| 547 | + { |
---|
| 548 | + //super.SetupUI2(this); |
---|
| 549 | + //return; |
---|
| 550 | + } |
---|
| 551 | + |
---|
| 552 | + if (copy != group) |
---|
| 553 | + { |
---|
| 554 | + //super.SetupUI2(this); |
---|
| 555 | + } |
---|
| 556 | + |
---|
409 | 557 | //new Exception().printStackTrace(); |
---|
410 | 558 | |
---|
411 | 559 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
436 | 584 | */ |
---|
437 | 585 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
438 | 586 | |
---|
439 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
440 | | - liveCB.setToolTipText("Enabled animation"); |
---|
| 587 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 588 | + //minButton.setToolTipText("Minimize window"); |
---|
| 589 | + //minButton.addActionListener(this); |
---|
| 590 | + |
---|
| 591 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 592 | + maxButton.setToolTipText("Maximize window"); |
---|
| 593 | + maxButton.addActionListener(this); |
---|
| 594 | + |
---|
| 595 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 597 | + fullButton.addActionListener(this); |
---|
| 598 | + |
---|
| 599 | + oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 600 | + undoButton.setToolTipText("Undo changes"); |
---|
| 601 | + undoButton.addActionListener(this); |
---|
| 602 | + |
---|
| 603 | + oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 604 | + redoButton.setToolTipText("Redo changes"); |
---|
| 605 | + redoButton.addActionListener(this); |
---|
| 606 | + |
---|
| 607 | + oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 608 | + saveButton.setToolTipText("Save changes"); |
---|
| 609 | + saveButton.addActionListener(this); |
---|
| 610 | + |
---|
| 611 | + oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 612 | + liveCB.setToolTipText("Enable animation"); |
---|
441 | 613 | liveCB.addItemListener(this); |
---|
442 | 614 | |
---|
443 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 615 | + oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 616 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 617 | + oneStepButton.addActionListener(this); |
---|
| 618 | + |
---|
| 619 | + oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
444 | 620 | fastCB.setToolTipText("Fast mode"); |
---|
445 | 621 | fastCB.addItemListener(this); |
---|
446 | 622 | |
---|
447 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 623 | + oe.toolboxPanel.Return(); |
---|
| 624 | + |
---|
| 625 | + oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
448 | 626 | trackCB.setToolTipText("Enable tracking"); |
---|
449 | 627 | trackCB.addItemListener(this); |
---|
450 | 628 | |
---|
451 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 629 | + oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
452 | 630 | screenfitButton.setToolTipText("Screen fit"); |
---|
453 | 631 | screenfitButton.addActionListener(this); |
---|
454 | 632 | |
---|
.. | .. |
---|
457 | 635 | |
---|
458 | 636 | if (Globals.ADVANCED) |
---|
459 | 637 | { |
---|
460 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 638 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
461 | 639 | snapobjectButton.addActionListener(this); |
---|
462 | 640 | snapobjectButton.setToolTipText("Snap Object"); |
---|
463 | 641 | } |
---|
464 | 642 | |
---|
465 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
466 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
| 643 | + oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 644 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
467 | 645 | flashSelectionButton.addActionListener(this); |
---|
468 | 646 | |
---|
469 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 647 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
470 | 648 | |
---|
471 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 649 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
472 | 650 | twoButton.setToolTipText("Show center view only"); |
---|
473 | 651 | twoButton.addActionListener(this); |
---|
474 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 652 | + this.fullscreenLayout = twoButton; |
---|
| 653 | + |
---|
| 654 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
475 | 655 | fourButton.addActionListener(this); |
---|
476 | 656 | fourButton.setToolTipText("Show left panel only"); |
---|
477 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 657 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
478 | 658 | sixButton.setToolTipText("2-column layout left"); |
---|
479 | 659 | sixButton.addActionListener(this); |
---|
480 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 660 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
481 | 661 | threeButton.setToolTipText("2-column layout right"); |
---|
482 | 662 | threeButton.addActionListener(this); |
---|
483 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 663 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
484 | 664 | sevenButton.setToolTipText("3-column layout"); |
---|
485 | 665 | sevenButton.addActionListener(this); |
---|
486 | 666 | // |
---|
487 | 667 | |
---|
488 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 668 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
489 | 669 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
490 | 670 | rootButton.addActionListener(this); |
---|
491 | 671 | |
---|
492 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 672 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
493 | 673 | closeButton.setToolTipText("Close tab"); |
---|
494 | 674 | closeButton.addActionListener(this); |
---|
495 | 675 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
496 | 676 | //clearButton.addActionListener(this); |
---|
497 | | - |
---|
498 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 677 | + |
---|
| 678 | + // INSERT |
---|
| 679 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 680 | + gridButton.setToolTipText("Create grid"); |
---|
| 681 | + gridButton.addActionListener(this); |
---|
| 682 | + |
---|
| 683 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 684 | + boxButton.setToolTipText("Create box"); |
---|
| 685 | + boxButton.addActionListener(this); |
---|
| 686 | + |
---|
| 687 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 688 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 689 | + sphereButton.addActionListener(this); |
---|
| 690 | + |
---|
| 691 | + oe.toolboxPanel.Return(); |
---|
499 | 692 | |
---|
500 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 694 | + coneButton.setToolTipText("Create cone"); |
---|
| 695 | + coneButton.addActionListener(this); |
---|
| 696 | + |
---|
| 697 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 698 | + torusButton.setToolTipText("Create torus"); |
---|
| 699 | + torusButton.addActionListener(this); |
---|
| 700 | + |
---|
| 701 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 702 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 703 | + superButton.addActionListener(this); |
---|
| 704 | + |
---|
| 705 | + if (Globals.ADVANCED) |
---|
| 706 | + { |
---|
| 707 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 708 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 709 | + kleinButton.addActionListener(this); |
---|
| 710 | + } |
---|
| 711 | + |
---|
| 712 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 713 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 714 | + particlesButton.addActionListener(this); |
---|
| 715 | + |
---|
| 716 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 717 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 718 | + overlayButton.addActionListener(this); |
---|
| 719 | + |
---|
| 720 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 721 | + lightButton.setToolTipText("Create light"); |
---|
| 722 | + lightButton.addActionListener(this); |
---|
| 723 | + |
---|
| 724 | + // EDIT panel |
---|
| 725 | + editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
501 | 726 | editButton.setToolTipText("Edit selection"); |
---|
502 | 727 | editButton.addActionListener(this); |
---|
503 | 728 | |
---|
504 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 729 | + editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
505 | 730 | uneditButton.setToolTipText("Unedit selection"); |
---|
506 | 731 | uneditButton.addActionListener(this); |
---|
507 | 732 | |
---|
508 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 733 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 734 | + allParamsButton.setToolTipText("Edit all params"); |
---|
| 735 | + allParamsButton.addActionListener(this); |
---|
| 736 | + |
---|
| 737 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
509 | 738 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
510 | 739 | clearPanelButton.addActionListener(this); |
---|
511 | 740 | |
---|
512 | | - commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
513 | | - allParamsButton.setToolTipText("All params??"); |
---|
514 | | - allParamsButton.addActionListener(this); |
---|
515 | | - |
---|
516 | | - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 741 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
517 | 742 | unselectButton.setToolTipText("Unselect"); |
---|
518 | 743 | unselectButton.addActionListener(this); |
---|
519 | 744 | |
---|
520 | | - commandsPanel.preferredHeight = 1; |
---|
| 745 | + editCommandsPanel.preferredHeight = 1; |
---|
521 | 746 | |
---|
522 | | - oe.treePanel.add(commandsPanel); |
---|
523 | | - oe.treePanel.Return(); |
---|
| 747 | +// oe.treePanel.add(commandsPanel); |
---|
| 748 | +// oe.treePanel.Return(); |
---|
524 | 749 | |
---|
525 | 750 | // oe.aConstraints.gridx += 1; |
---|
526 | 751 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
537 | 762 | |
---|
538 | 763 | JScrollPane jSP; |
---|
539 | 764 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
540 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 765 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
541 | 766 | ResetModel(); |
---|
542 | 767 | |
---|
543 | 768 | oe.treePanel.add(jSPPanel); |
---|
.. | .. |
---|
588 | 813 | |
---|
589 | 814 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
590 | 815 | { |
---|
| 816 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 817 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 818 | + boxCB.addItemListener(this); |
---|
| 819 | + |
---|
| 820 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 821 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 822 | + zoomBoxCB.addItemListener(this); |
---|
| 823 | + |
---|
| 824 | + if (true) // Globals.ADVANCED) |
---|
| 825 | + { |
---|
591 | 826 | panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
592 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
| 827 | + supportCB.setToolTipText("Enable rigging"); |
---|
593 | 828 | supportCB.addItemListener(this); |
---|
594 | 829 | |
---|
595 | 830 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
.. | .. |
---|
607 | 842 | slowCB.setToolTipText("Smooth interpolation"); |
---|
608 | 843 | slowCB.addItemListener(this); |
---|
609 | 844 | |
---|
610 | | - panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
611 | | - boxCB.setToolTipText("Display bounding boxes"); |
---|
612 | | - boxCB.addItemListener(this); |
---|
613 | | - |
---|
614 | | - panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
615 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
616 | | - zoomBoxCB.addItemListener(this); |
---|
617 | | - |
---|
618 | 845 | // constraints.gridy += 1; |
---|
619 | 846 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
620 | 847 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
640 | 867 | // debugCB.addItemListener(this); |
---|
641 | 868 | |
---|
642 | 869 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 870 | + oeilCB.setToolTipText("Move camera when tracking target"); |
---|
643 | 871 | oeilCB.addItemListener(this); |
---|
644 | 872 | |
---|
| 873 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 874 | + shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 875 | + shadowCB.addItemListener(this); |
---|
| 876 | + |
---|
| 877 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 878 | + autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 879 | + autosaveCB.addItemListener(this); |
---|
| 880 | + |
---|
| 881 | + if (Globals.ADVANCED) |
---|
| 882 | + { |
---|
645 | 883 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
646 | 884 | lookAtCB.setToolTipText("Look-at target"); |
---|
647 | 885 | lookAtCB.addItemListener(this); |
---|
| 886 | + } |
---|
| 887 | + |
---|
| 888 | + } |
---|
648 | 889 | |
---|
649 | 890 | cGridBag fill = new cGridBag(); |
---|
650 | 891 | |
---|
.. | .. |
---|
657 | 898 | void EditObject(Object3D obj) |
---|
658 | 899 | { |
---|
659 | 900 | cRadio radioButton = new cRadio(obj.name); |
---|
| 901 | + |
---|
| 902 | + // Patch to avoid bug with transparency. |
---|
| 903 | + radioButton.hadMaterial = obj.material != null; |
---|
| 904 | + if (!radioButton.hadMaterial) |
---|
| 905 | + { |
---|
| 906 | + obj.material = new cMaterial(); |
---|
| 907 | + } |
---|
| 908 | + |
---|
660 | 909 | radioButton.SetObject(obj); |
---|
661 | 910 | radioButton.layout = sevenButton; |
---|
662 | 911 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
665 | 914 | buttonGroup.add(radioButton); |
---|
666 | 915 | radioButton.doClick(); |
---|
667 | 916 | } |
---|
| 917 | + |
---|
668 | 918 | void SetupViews(ObjEditor oe) |
---|
669 | 919 | { |
---|
| 920 | + theFrame = this; |
---|
| 921 | + |
---|
670 | 922 | oe.SetupViews(); |
---|
671 | 923 | |
---|
672 | 924 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
675 | 927 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
676 | 928 | } |
---|
677 | 929 | |
---|
678 | | - JCheckBox liveCB; |
---|
679 | | - JCheckBox supportCB; |
---|
680 | | - JCheckBox localCB; |
---|
681 | | - JCheckBox crowdCB; |
---|
682 | | - JCheckBox smoothCB; |
---|
683 | | - JCheckBox fastCB; |
---|
684 | | - JCheckBox slowCB; |
---|
685 | | - JCheckBox boxCB; |
---|
686 | | - JCheckBox zoomBoxCB; |
---|
687 | | - JCheckBox trackCB; |
---|
688 | | - JCheckBox smoothfocusCB; |
---|
| 930 | + cToggleButton liveCB; |
---|
| 931 | + cCheckBox supportCB; |
---|
| 932 | + cCheckBox localCB; |
---|
| 933 | + cCheckBox crowdCB; |
---|
| 934 | + cCheckBox smoothCB; |
---|
| 935 | + cToggleButton fastCB; |
---|
| 936 | + cCheckBox slowCB; |
---|
| 937 | + cCheckBox boxCB; |
---|
| 938 | + cCheckBox zoomBoxCB; |
---|
| 939 | + cToggleButton trackCB; |
---|
| 940 | + cCheckBox smoothfocusCB; |
---|
689 | 941 | // JCheckBox speakerMocapCB; |
---|
690 | | - JCheckBox speakerCameraCB; |
---|
691 | | - JCheckBox speakerFocusCB; |
---|
692 | | - JCheckBox debugCB; |
---|
693 | | - JCheckBox oeilCB; |
---|
694 | | - JCheckBox lookAtCB; |
---|
| 942 | + cCheckBox speakerCameraCB; |
---|
| 943 | + cCheckBox speakerFocusCB; |
---|
| 944 | + cCheckBox debugCB; |
---|
| 945 | + |
---|
| 946 | + cCheckBox oeilCB; |
---|
| 947 | + cCheckBox shadowCB; |
---|
| 948 | + cCheckBox autosaveCB; |
---|
| 949 | + cCheckBox lookAtCB; |
---|
695 | 950 | |
---|
696 | 951 | // static int COLOR = 1; |
---|
697 | 952 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
699 | 954 | |
---|
700 | 955 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
701 | 956 | |
---|
702 | | - JCheckBox colorCB; |
---|
703 | | - JCheckBox materialCB; |
---|
704 | | - JCheckBox textureCB; |
---|
| 957 | + cCheckBox colorCB; |
---|
| 958 | + cCheckBox materialCB; |
---|
| 959 | + cCheckBox textureCB; |
---|
705 | 960 | |
---|
706 | 961 | public void itemStateChanged(ItemEvent e) |
---|
707 | 962 | { |
---|
.. | .. |
---|
729 | 984 | } else if(e.getSource() == liveCB) |
---|
730 | 985 | { |
---|
731 | 986 | cameraView.ToggleLive(); |
---|
| 987 | + refreshContents(false); |
---|
732 | 988 | } |
---|
733 | 989 | else if(e.getSource() == supportCB) |
---|
734 | 990 | { |
---|
.. | .. |
---|
793 | 1049 | { |
---|
794 | 1050 | cameraView.ToggleOeil(); |
---|
795 | 1051 | } |
---|
| 1052 | + else if(e.getSource() == shadowCB) |
---|
| 1053 | + { |
---|
| 1054 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1055 | + } |
---|
| 1056 | + else if(e.getSource() == autosaveCB) |
---|
| 1057 | + { |
---|
| 1058 | + Globals.SAVEONMAKE ^= true; |
---|
| 1059 | + } |
---|
796 | 1060 | else if(e.getSource() == lookAtCB) |
---|
797 | 1061 | { |
---|
798 | 1062 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
809 | 1073 | |
---|
810 | 1074 | /**/ |
---|
811 | 1075 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
812 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1076 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1077 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
813 | 1078 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
814 | 1079 | // We can't move the root node or an empty selection |
---|
815 | 1080 | return; |
---|
.. | .. |
---|
881 | 1146 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
882 | 1147 | // return; |
---|
883 | 1148 | // } |
---|
884 | | - if (string.charAt(0) == '/') |
---|
| 1149 | + |
---|
| 1150 | + // File path for Mac and Windows |
---|
| 1151 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
885 | 1152 | { |
---|
886 | 1153 | // file(s) |
---|
887 | 1154 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
908 | 1175 | |
---|
909 | 1176 | flashIt = false; |
---|
910 | 1177 | CameraPane pane = (CameraPane) target; |
---|
911 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1178 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
912 | 1179 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
913 | 1180 | |
---|
914 | 1181 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
931 | 1198 | return; |
---|
932 | 1199 | } |
---|
933 | 1200 | |
---|
934 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
935 | | - { |
---|
| 1201 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1202 | +// { |
---|
936 | 1203 | loadClipboard(true); |
---|
937 | 1204 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
938 | | - pasteInto(false); |
---|
939 | | - } else { |
---|
940 | | - loadClipboard(false); |
---|
941 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
942 | | - pasteInto(false); // true); // ??? |
---|
943 | | - } |
---|
| 1205 | + pasteInto(false, false); |
---|
| 1206 | +// } else { |
---|
| 1207 | +// loadClipboard(false); |
---|
| 1208 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1209 | +// pasteInto(false, false); // true); // ??? |
---|
| 1210 | +// } |
---|
944 | 1211 | } |
---|
945 | 1212 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
946 | 1213 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1061 | 1328 | kleinItem.addActionListener(this); |
---|
1062 | 1329 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1063 | 1330 | particleItem.addActionListener(this); |
---|
| 1331 | + if (Globals.ADVANCED) |
---|
| 1332 | + { |
---|
1064 | 1333 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1065 | 1334 | ragdollItem.addActionListener(this); |
---|
1066 | 1335 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1067 | 1336 | ragdoll2Item.addActionListener(this); |
---|
| 1337 | + } |
---|
1068 | 1338 | menu.add("-"); |
---|
1069 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1339 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1070 | 1340 | meshItem.addActionListener(this); |
---|
1071 | 1341 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1072 | 1342 | // meshGroupItem.addActionListener(this); |
---|
| 1343 | + if (Globals.ADVANCED) |
---|
| 1344 | + { |
---|
1073 | 1345 | springItem = menu.add(new MenuItem("Spring")); |
---|
1074 | 1346 | springItem.addActionListener(this); |
---|
1075 | 1347 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1076 | 1348 | flagItem.addActionListener(this); |
---|
1077 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1078 | | - bezierItem.addActionListener(this); |
---|
1079 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1080 | | - checkerItem.addActionListener(this); |
---|
1081 | 1349 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1082 | 1350 | blobItem.addActionListener(this); |
---|
1083 | 1351 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1084 | 1352 | latheItem.addActionListener(this); |
---|
| 1353 | + } |
---|
| 1354 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1355 | + bezierItem.addActionListener(this); |
---|
| 1356 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1357 | + overlayItem.addActionListener(this); |
---|
1085 | 1358 | lightItem = menu.add(new MenuItem("Light")); |
---|
1086 | 1359 | lightItem.addActionListener(this); |
---|
1087 | 1360 | menu.add("-"); |
---|
.. | .. |
---|
1091 | 1364 | loopItem.addActionListener(this); |
---|
1092 | 1365 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1093 | 1366 | doubleItem.addActionListener(this); |
---|
| 1367 | + if (Globals.ADVANCED) |
---|
| 1368 | + { |
---|
1094 | 1369 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1095 | 1370 | tripleItem.addActionListener(this); |
---|
| 1371 | + } |
---|
1096 | 1372 | } |
---|
1097 | 1373 | |
---|
1098 | 1374 | void buildToolsMenu(Menu menu) |
---|
.. | .. |
---|
1106 | 1382 | parseverticesItem.addActionListener(this); |
---|
1107 | 1383 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1108 | 1384 | textureFieldItem.addActionListener(this); |
---|
1109 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1385 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1110 | 1386 | alignItem.addActionListener(this); |
---|
1111 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1112 | | - mirrorItem.addActionListener(this); |
---|
1113 | 1387 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1114 | 1388 | reduceMorphItem.addActionListener(this); |
---|
1115 | 1389 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1116 | 1390 | reduce34MorphItem.addActionListener(this); |
---|
1117 | | - |
---|
| 1391 | + menu.add("-"); |
---|
1118 | 1392 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1119 | 1393 | computeAOItem.addActionListener(this); |
---|
1120 | | - menu.add("-"); |
---|
1121 | 1394 | |
---|
| 1395 | + if (Globals.ADVANCED) |
---|
| 1396 | + { |
---|
| 1397 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1398 | + mirrorItem.addActionListener(this); |
---|
| 1399 | + menu.add("-"); |
---|
1122 | 1400 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1123 | 1401 | memoryItem.addActionListener(this); |
---|
1124 | 1402 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1125 | 1403 | analyzeItem.addActionListener(this); |
---|
1126 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1404 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1127 | 1405 | dumpItem.addActionListener(this); |
---|
1128 | 1406 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1129 | 1407 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1141 | 1419 | menu.add("-"); |
---|
1142 | 1420 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1143 | 1421 | editScriptItem.addActionListener(this); |
---|
| 1422 | + } |
---|
1144 | 1423 | } |
---|
1145 | 1424 | |
---|
1146 | 1425 | void ScreenFit() |
---|
.. | .. |
---|
1263 | 1542 | shadow.material = new cMaterial(obj.material); |
---|
1264 | 1543 | shadow.material.diffuse = 0.0001f; |
---|
1265 | 1544 | shadow.material.specular = 0.0001f; |
---|
| 1545 | + //shadow.projectedVertices[1].x = 300; |
---|
1266 | 1546 | |
---|
1267 | 1547 | makeSomething(shadow); |
---|
1268 | 1548 | } |
---|
.. | .. |
---|
1469 | 1749 | |
---|
1470 | 1750 | void Overwrite(int mask) |
---|
1471 | 1751 | { |
---|
1472 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1752 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1473 | 1753 | { |
---|
1474 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1754 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1475 | 1755 | |
---|
1476 | 1756 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1477 | 1757 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1519 | 1799 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1520 | 1800 | objEditor.cameraView.repaint(); |
---|
1521 | 1801 | } else |
---|
1522 | | - if (source == rectoidItem) |
---|
| 1802 | + if (source == rectoidItem || source == boxButton) |
---|
1523 | 1803 | { |
---|
1524 | 1804 | makeSomething(new Box()); |
---|
1525 | 1805 | } else |
---|
1526 | | - if (source == particleItem) |
---|
| 1806 | + if (source == particleItem || source == particlesButton) |
---|
1527 | 1807 | { |
---|
1528 | 1808 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1529 | 1809 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1602 | 1882 | |
---|
1603 | 1883 | makeSomething(obj); |
---|
1604 | 1884 | } else |
---|
1605 | | - if (source == gridItem) |
---|
| 1885 | + if (source == gridItem || source == gridButton) |
---|
1606 | 1886 | { |
---|
1607 | 1887 | makeSomething(new Grid()); |
---|
1608 | 1888 | } else |
---|
1609 | | - if (source == ellipsoidItem) |
---|
| 1889 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1610 | 1890 | { |
---|
1611 | 1891 | makeSomething(new Sphere()); |
---|
1612 | 1892 | } else |
---|
1613 | | - if (source == coneItem) |
---|
| 1893 | + if (source == coneItem || source == coneButton) |
---|
1614 | 1894 | { |
---|
1615 | 1895 | makeSomething(new Cone()); |
---|
1616 | 1896 | } else |
---|
1617 | | - if (source == torusItem) |
---|
| 1897 | + if (source == torusItem || source == torusButton) |
---|
1618 | 1898 | { |
---|
1619 | 1899 | makeSomething(new Torus()); |
---|
1620 | 1900 | } else |
---|
1621 | | - if (source == superItem) |
---|
| 1901 | + if (source == superItem || source == superButton) |
---|
1622 | 1902 | { |
---|
1623 | 1903 | makeSomething(new Superellipsoid()); |
---|
1624 | 1904 | } else |
---|
1625 | | - if (source == kleinItem) |
---|
| 1905 | + if (source == kleinItem || source == kleinButton) |
---|
1626 | 1906 | { |
---|
1627 | 1907 | makeSomething(new Klein()); |
---|
1628 | 1908 | } else |
---|
.. | .. |
---|
1642 | 1922 | { |
---|
1643 | 1923 | makeSomething(new BezierSurface()); |
---|
1644 | 1924 | } else |
---|
1645 | | - if (source == checkerItem) |
---|
| 1925 | + if (source == overlayItem || source == overlayButton) |
---|
1646 | 1926 | { |
---|
1647 | 1927 | /* |
---|
1648 | 1928 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1690 | 1970 | s.setup(); |
---|
1691 | 1971 | makeSomething(s); |
---|
1692 | 1972 | } else |
---|
1693 | | - if (source == lightItem) |
---|
| 1973 | + if (source == lightItem || source == lightButton) |
---|
1694 | 1974 | { |
---|
1695 | 1975 | makeSomething(new Light()); |
---|
1696 | 1976 | } else |
---|
.. | .. |
---|
1776 | 2056 | csg.addChild(child); |
---|
1777 | 2057 | child.addChild(csg); |
---|
1778 | 2058 | } else |
---|
1779 | | - |
---|
1780 | | - if (source == importGFDItem) |
---|
1781 | | - { |
---|
1782 | | - ImportGFD(); |
---|
1783 | | - } else |
---|
1784 | | - if (source == importVRMLX3DItem) |
---|
1785 | | - { |
---|
1786 | | - ImportVRMLX3D(); |
---|
1787 | | - } else |
---|
1788 | | - if (source == import3DSItem) |
---|
1789 | | - { |
---|
1790 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1791 | | - } else |
---|
1792 | | - if (source == importOBJItem) |
---|
1793 | | - { |
---|
1794 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1795 | | - } else |
---|
1796 | 2059 | if (source == computeAOItem) |
---|
1797 | 2060 | { |
---|
1798 | 2061 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
.. | .. |
---|
1811 | 2074 | if (source == invariantsItem) |
---|
1812 | 2075 | { |
---|
1813 | 2076 | System.out.println("Invariants:"); |
---|
1814 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 2077 | + Grafreed.grafreeD.universe.invariants(); |
---|
1815 | 2078 | } else |
---|
1816 | 2079 | if (source == memoryItem) |
---|
1817 | 2080 | { |
---|
.. | .. |
---|
1829 | 2092 | if (source == dumpItem) |
---|
1830 | 2093 | { |
---|
1831 | 2094 | DumpObject(); |
---|
| 2095 | + } else |
---|
| 2096 | + if (source == minButton) |
---|
| 2097 | + { |
---|
| 2098 | + Minimize(); |
---|
| 2099 | + } else |
---|
| 2100 | + if (source == maxButton) |
---|
| 2101 | + { |
---|
| 2102 | + Maximize(); |
---|
| 2103 | + } else |
---|
| 2104 | + if (source == fullButton) |
---|
| 2105 | + { |
---|
| 2106 | + ToggleFullScreen(); |
---|
| 2107 | + } else |
---|
| 2108 | + if (source == undoButton) |
---|
| 2109 | + { |
---|
| 2110 | + Undo(); |
---|
| 2111 | + } else |
---|
| 2112 | + if (source == redoButton) |
---|
| 2113 | + { |
---|
| 2114 | + Redo(); |
---|
| 2115 | + } else |
---|
| 2116 | + if (source == saveButton) |
---|
| 2117 | + { |
---|
| 2118 | + Save(); |
---|
| 2119 | + } else |
---|
| 2120 | + if (source == oneStepButton) |
---|
| 2121 | + { |
---|
| 2122 | + Globals.ONESTEP = true; |
---|
| 2123 | + cameraView.repaint(); |
---|
1832 | 2124 | } else |
---|
1833 | 2125 | if (source == screenfitButton) |
---|
1834 | 2126 | { |
---|
.. | .. |
---|
1879 | 2171 | { |
---|
1880 | 2172 | loadClipboard(true); |
---|
1881 | 2173 | } else |
---|
| 2174 | + if (source == undoItem) |
---|
| 2175 | + { |
---|
| 2176 | + Undo(); |
---|
| 2177 | + } else |
---|
| 2178 | + if (source == redoItem) |
---|
| 2179 | + { |
---|
| 2180 | + Redo(); |
---|
| 2181 | + } else |
---|
1882 | 2182 | if (source == duplicateItem) |
---|
1883 | 2183 | { |
---|
1884 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2184 | + Object3D keep = Grafreed.clipboard; |
---|
1885 | 2185 | loadClipboard(false); |
---|
1886 | 2186 | paste(false); |
---|
1887 | | - GrafreeD.clipboard = keep; |
---|
| 2187 | + Grafreed.clipboard = keep; |
---|
1888 | 2188 | } else |
---|
1889 | 2189 | if (source == cloneItem) |
---|
1890 | 2190 | { |
---|
.. | .. |
---|
1902 | 2202 | { |
---|
1903 | 2203 | paste(false); |
---|
1904 | 2204 | } else |
---|
| 2205 | + if (source == pasteIntoItem) |
---|
| 2206 | + { |
---|
| 2207 | + pasteInto(true, false); |
---|
| 2208 | + } else |
---|
1905 | 2209 | if (source == pasteLinkItem) |
---|
1906 | 2210 | { |
---|
1907 | | - pasteInto(false); |
---|
| 2211 | + pasteInto(false, false); |
---|
1908 | 2212 | } else |
---|
1909 | 2213 | if (source == pasteCloneItem) |
---|
1910 | 2214 | { |
---|
1911 | | - pasteInto(true); |
---|
| 2215 | + pasteInto(true, true); |
---|
1912 | 2216 | } else |
---|
1913 | 2217 | if (source == pasteExpandItem) |
---|
1914 | 2218 | { |
---|
.. | .. |
---|
2100 | 2404 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2101 | 2405 | // refreshContents(); |
---|
2102 | 2406 | // } |
---|
2103 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2407 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2104 | 2408 | { |
---|
2105 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2409 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2106 | 2410 | |
---|
2107 | 2411 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2108 | 2412 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2110 | 2414 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2111 | 2415 | for (int i=0; i<group.selection.size(); i++) |
---|
2112 | 2416 | { |
---|
2113 | | - boolean random = CameraPane.RANDOM; |
---|
2114 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2417 | + boolean random = CameraPane.SWITCH; |
---|
| 2418 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2115 | 2419 | group.selection.get(i).linkVerticesThis(content); |
---|
2116 | 2420 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2117 | | - CameraPane.RANDOM = random; |
---|
| 2421 | + CameraPane.SWITCH = random; |
---|
2118 | 2422 | } |
---|
2119 | 2423 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2120 | 2424 | refreshContents(); |
---|
.. | .. |
---|
2124 | 2428 | { |
---|
2125 | 2429 | for (int i=0; i<group.selection.size(); i++) |
---|
2126 | 2430 | { |
---|
2127 | | - boolean random = CameraPane.RANDOM; |
---|
2128 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2431 | + boolean random = CameraPane.SWITCH; |
---|
| 2432 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2129 | 2433 | group.selection.get(i).linkVerticesThis(null); |
---|
2130 | | - CameraPane.RANDOM = random; |
---|
| 2434 | + CameraPane.SWITCH = random; |
---|
2131 | 2435 | } |
---|
2132 | 2436 | |
---|
2133 | 2437 | refreshContents(); |
---|
2134 | 2438 | } else |
---|
2135 | 2439 | if (source == relinkverticesItem) |
---|
2136 | 2440 | { |
---|
2137 | | - boolean random = CameraPane.RANDOM; |
---|
2138 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2441 | + boolean random = CameraPane.SWITCH; |
---|
| 2442 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2139 | 2443 | group.selection.RelinkToSupport(); |
---|
2140 | | - CameraPane.RANDOM = random; |
---|
| 2444 | + CameraPane.SWITCH = random; |
---|
2141 | 2445 | |
---|
2142 | 2446 | refreshContents(); |
---|
2143 | 2447 | } else |
---|
.. | .. |
---|
2152 | 2456 | } else |
---|
2153 | 2457 | if (source == setMasterItem) |
---|
2154 | 2458 | { |
---|
2155 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2459 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2156 | 2460 | { |
---|
2157 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2461 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2158 | 2462 | |
---|
2159 | 2463 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2160 | 2464 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2167 | 2471 | { |
---|
2168 | 2472 | if (group.selection.size() == 1) |
---|
2169 | 2473 | { |
---|
2170 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2474 | + if (Grafreed.clipboard.size() == 1) |
---|
2171 | 2475 | { |
---|
2172 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2476 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2173 | 2477 | |
---|
2174 | 2478 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2175 | 2479 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2186 | 2490 | { |
---|
2187 | 2491 | RevertMeshes(); |
---|
2188 | 2492 | } else |
---|
2189 | | - if (source == resetMeshItem) |
---|
| 2493 | + if (source == resetAllItem) |
---|
2190 | 2494 | { |
---|
2191 | 2495 | ResetAll(); |
---|
2192 | 2496 | } else |
---|
.. | .. |
---|
2352 | 2656 | { |
---|
2353 | 2657 | CastShadow(2); |
---|
2354 | 2658 | } else |
---|
2355 | | - if (source == ungroupItem) |
---|
| 2659 | + if (source == ungroupItem || source == ungroupButton) |
---|
2356 | 2660 | { |
---|
2357 | 2661 | //ungroup(); |
---|
2358 | 2662 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2374 | 2678 | } else |
---|
2375 | 2679 | if (source == genNormalsMESHItem) |
---|
2376 | 2680 | { |
---|
2377 | | - GenNormals(true); // TODO |
---|
| 2681 | + GenNormalsMESH(); |
---|
2378 | 2682 | } else |
---|
2379 | 2683 | if (source == genNormalsORGANItem) |
---|
2380 | 2684 | { |
---|
.. | .. |
---|
2439 | 2743 | if (source == unmarkleavesItem) |
---|
2440 | 2744 | { |
---|
2441 | 2745 | MarkLeaves(false); |
---|
| 2746 | + } else |
---|
| 2747 | + if (source == rewindleavesItem) |
---|
| 2748 | + { |
---|
| 2749 | + RewindLeaves(true); |
---|
| 2750 | + } else |
---|
| 2751 | + if (source == unrewindleavesItem) |
---|
| 2752 | + { |
---|
| 2753 | + RewindLeaves(false); |
---|
| 2754 | + } else |
---|
| 2755 | + if (source == randomleavesItem) |
---|
| 2756 | + { |
---|
| 2757 | + RandomLeaves(true); |
---|
| 2758 | + } else |
---|
| 2759 | + if (source == unrandomleavesItem) |
---|
| 2760 | + { |
---|
| 2761 | + RandomLeaves(false); |
---|
2442 | 2762 | } else |
---|
2443 | 2763 | if (source == flipVItem) |
---|
2444 | 2764 | { |
---|
.. | .. |
---|
2524 | 2844 | { |
---|
2525 | 2845 | SmoothMesh(); |
---|
2526 | 2846 | } else |
---|
2527 | | - if (source == transformgeometryItem) |
---|
| 2847 | + if (source == transformGeometryItem) |
---|
2528 | 2848 | { |
---|
2529 | 2849 | TransformGeometry(); |
---|
| 2850 | + } else |
---|
| 2851 | + if (source == transformChildrenItem) |
---|
| 2852 | + { |
---|
| 2853 | + TransformChildren(); |
---|
2530 | 2854 | } else |
---|
2531 | 2855 | if (source == resetTransformItem) |
---|
2532 | 2856 | { |
---|
.. | .. |
---|
2534 | 2858 | } else |
---|
2535 | 2859 | if (source == resetCentroidItem) |
---|
2536 | 2860 | { |
---|
2537 | | - ResetCentroid(); |
---|
| 2861 | + ResetCentroid(true); |
---|
| 2862 | + } else |
---|
| 2863 | + if (source == resetCentroidXZItem) |
---|
| 2864 | + { |
---|
| 2865 | + ResetCentroid(false); |
---|
2538 | 2866 | } else |
---|
2539 | 2867 | if (source == resetParentItem) |
---|
2540 | 2868 | { |
---|
.. | .. |
---|
2666 | 2994 | if (source == twoButton) |
---|
2667 | 2995 | { |
---|
2668 | 2996 | radio.layout = twoButton; |
---|
| 2997 | + |
---|
| 2998 | + if (CameraPane.FULLSCREEN) |
---|
| 2999 | + fullscreenLayout = radio.layout; |
---|
| 3000 | + |
---|
2669 | 3001 | // bug |
---|
2670 | 3002 | //gridPanel.setDividerLocation(1.0); |
---|
2671 | 3003 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2698 | 3030 | bigThree.ClearUI(); |
---|
2699 | 3031 | bigThree.add(centralPanel); |
---|
2700 | 3032 | bigThree.FlushUI(); |
---|
| 3033 | + |
---|
| 3034 | + cameraView.requestFocusInWindow(); |
---|
| 3035 | + |
---|
| 3036 | +// refreshContents(true); |
---|
| 3037 | +// |
---|
| 3038 | +// try |
---|
| 3039 | +// { |
---|
| 3040 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3041 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3042 | +// bot.mouseMove(100, 100); |
---|
| 3043 | +// bot.mousePress(mask); |
---|
| 3044 | +// bot.mouseRelease(mask); |
---|
| 3045 | +// } |
---|
| 3046 | +// catch (Exception e) |
---|
| 3047 | +// { |
---|
| 3048 | +// |
---|
| 3049 | +// } |
---|
| 3050 | + |
---|
2701 | 3051 | } else |
---|
2702 | 3052 | if (source == threeButton) |
---|
2703 | 3053 | { |
---|
2704 | 3054 | radio.layout = threeButton; |
---|
| 3055 | + |
---|
| 3056 | + if (CameraPane.FULLSCREEN) |
---|
| 3057 | + fullscreenLayout = radio.layout; |
---|
2705 | 3058 | |
---|
2706 | 3059 | // bigThree.remove(scenePanel); |
---|
2707 | 3060 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2734 | 3087 | bigThree.add(centralPanel); |
---|
2735 | 3088 | bigThree.add(XYZPanel); |
---|
2736 | 3089 | bigThree.FlushUI(); |
---|
| 3090 | + |
---|
| 3091 | + cameraView.requestFocusInWindow(); |
---|
2737 | 3092 | } else |
---|
2738 | 3093 | if (source == fourButton) |
---|
2739 | 3094 | { |
---|
2740 | 3095 | radio.layout = fourButton; |
---|
| 3096 | + |
---|
| 3097 | + if (CameraPane.FULLSCREEN) |
---|
| 3098 | + fullscreenLayout = radio.layout; |
---|
2741 | 3099 | |
---|
2742 | 3100 | // bigThree.remove(scenePanel); |
---|
2743 | 3101 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2769 | 3127 | bigThree.ClearUI(); |
---|
2770 | 3128 | bigThree.add(scenePanel); |
---|
2771 | 3129 | bigThree.FlushUI(); |
---|
| 3130 | + |
---|
| 3131 | + cameraView.requestFocusInWindow(); |
---|
2772 | 3132 | } else |
---|
2773 | 3133 | if (source == sixButton) |
---|
2774 | 3134 | { |
---|
2775 | 3135 | radio.layout = sixButton; |
---|
| 3136 | + |
---|
| 3137 | + if (CameraPane.FULLSCREEN) |
---|
| 3138 | + fullscreenLayout = radio.layout; |
---|
2776 | 3139 | |
---|
2777 | 3140 | // bigThree.remove(scenePanel); |
---|
2778 | 3141 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2805 | 3168 | bigThree.add(scenePanel); |
---|
2806 | 3169 | bigThree.add(centralPanel); |
---|
2807 | 3170 | bigThree.FlushUI(); |
---|
| 3171 | + |
---|
| 3172 | + cameraView.requestFocusInWindow(); |
---|
2808 | 3173 | } else |
---|
2809 | 3174 | if (source == sevenButton) |
---|
2810 | 3175 | { |
---|
2811 | 3176 | radio.layout = sevenButton; |
---|
| 3177 | + |
---|
| 3178 | + if (CameraPane.FULLSCREEN) |
---|
| 3179 | + fullscreenLayout = radio.layout; |
---|
2812 | 3180 | |
---|
2813 | 3181 | // bigThree.remove(scenePanel); |
---|
2814 | 3182 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2842 | 3210 | bigThree.add(centralPanel); |
---|
2843 | 3211 | bigThree.add(XYZPanel); |
---|
2844 | 3212 | bigThree.FlushUI(); |
---|
| 3213 | + |
---|
| 3214 | + cameraView.requestFocusInWindow(); |
---|
2845 | 3215 | } else |
---|
2846 | 3216 | if (source == rootButton) |
---|
2847 | 3217 | { |
---|
.. | .. |
---|
2853 | 3223 | EditObject(obj); |
---|
2854 | 3224 | } |
---|
2855 | 3225 | |
---|
| 3226 | + cameraView.requestFocusInWindow(); |
---|
2856 | 3227 | refreshContents(true); |
---|
2857 | 3228 | } else |
---|
2858 | 3229 | if (source == closeButton) |
---|
.. | .. |
---|
2862 | 3233 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
2863 | 3234 | { |
---|
2864 | 3235 | ab = (cRadio)e.nextElement(); |
---|
2865 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3236 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
2866 | 3237 | { |
---|
| 3238 | + // Patch to avoid bug with transparency. |
---|
| 3239 | + if (!ab.hadMaterial) |
---|
| 3240 | + { |
---|
| 3241 | + ab.object.material = null; |
---|
| 3242 | + } |
---|
| 3243 | + |
---|
2867 | 3244 | buttonGroup.remove(ab); |
---|
2868 | 3245 | radioPanel.remove(ab); |
---|
2869 | 3246 | |
---|
2870 | | - ab.GetObject().editWindow = null; |
---|
| 3247 | + //ab.GetObject().editWindow = null; |
---|
| 3248 | + ab.GetObject().manipWindow = null; |
---|
2871 | 3249 | // ab.GetObject().objectUI = null; // ????????? |
---|
2872 | 3250 | |
---|
2873 | 3251 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
2874 | 3252 | break; |
---|
2875 | 3253 | } |
---|
2876 | 3254 | } |
---|
| 3255 | + |
---|
| 3256 | + cameraView.requestFocusInWindow(); |
---|
2877 | 3257 | refreshContents(true); |
---|
2878 | 3258 | } else |
---|
2879 | 3259 | if (source == editItem || source == editButton) |
---|
.. | .. |
---|
2890 | 3270 | child.CloseUI(); |
---|
2891 | 3271 | listUI.remove(child); |
---|
2892 | 3272 | |
---|
2893 | | - child.editWindow = null; // ??????????? |
---|
| 3273 | + //child.editWindow = null; // ??????????? |
---|
2894 | 3274 | } |
---|
2895 | | - objEditor.ctrlPanel.validate(); |
---|
| 3275 | + objEditor.ctrlPanel.FlushUI(); |
---|
2896 | 3276 | //objEditor.jTree.clearSelection(); |
---|
2897 | 3277 | //objEditor.ResetSliders(); |
---|
2898 | 3278 | refreshContents(true); |
---|
.. | .. |
---|
2976 | 3356 | frontView.object = group; |
---|
2977 | 3357 | sideView.object = group; |
---|
2978 | 3358 | } |
---|
2979 | | - group.editWindow = this; |
---|
| 3359 | + |
---|
| 3360 | +// fix "+" issue |
---|
| 3361 | + //group.editWindow = this; |
---|
| 3362 | + group.manipWindow = this; |
---|
| 3363 | + |
---|
2980 | 3364 | /* |
---|
2981 | 3365 | currentLayout = radio.layout; |
---|
2982 | 3366 | if (currentLayout == null) |
---|
.. | .. |
---|
2988 | 3372 | //group.parent = null; // ROOT |
---|
2989 | 3373 | //group.attributes = -1; |
---|
2990 | 3374 | ResetModel(); |
---|
| 3375 | + |
---|
| 3376 | + cameraView.requestFocusInWindow(); |
---|
2991 | 3377 | refreshContents(true); |
---|
2992 | | - } |
---|
| 3378 | + } else if (event.getSource() == editCameraItem) |
---|
| 3379 | + { |
---|
| 3380 | + cameraView.ProtectCamera(); |
---|
| 3381 | + cameraView.repaint(); |
---|
| 3382 | + return; |
---|
| 3383 | + } else if (event.getSource() == revertCameraItem) |
---|
| 3384 | + { |
---|
| 3385 | + cameraView.RevertCamera(); |
---|
| 3386 | + cameraView.repaint(); |
---|
| 3387 | + return; |
---|
| 3388 | + // } else if (event.getSource() == textureButton) |
---|
| 3389 | + // { |
---|
| 3390 | + // return; // true; |
---|
| 3391 | + } |
---|
2993 | 3392 | else |
---|
2994 | 3393 | { |
---|
2995 | 3394 | //return super.action(event, arg); |
---|
.. | .. |
---|
2998 | 3397 | } |
---|
2999 | 3398 | |
---|
3000 | 3399 | boolean useclient = false; |
---|
3001 | | - cRadio radio; |
---|
3002 | 3400 | |
---|
3003 | 3401 | void ToggleRoot() |
---|
3004 | 3402 | { |
---|
.. | .. |
---|
3050 | 3448 | refreshContents(); |
---|
3051 | 3449 | } |
---|
3052 | 3450 | |
---|
| 3451 | + void TransformChildren() |
---|
| 3452 | + { |
---|
| 3453 | + Object3D obj; |
---|
| 3454 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3455 | + { |
---|
| 3456 | + obj = (Object3D)e.nextElement(); |
---|
| 3457 | + obj.KeepTextureMatrices(); |
---|
| 3458 | + obj.TransformChildren(); |
---|
| 3459 | + obj.RestoreTextureMatrices(); |
---|
| 3460 | + |
---|
| 3461 | +// if (obj.parent == null) |
---|
| 3462 | +// { |
---|
| 3463 | +// System.out.println("NULL PARENT!"); |
---|
| 3464 | +// new Exception().printStackTrace(); |
---|
| 3465 | +// } |
---|
| 3466 | +// else |
---|
| 3467 | +// TouchTransform(obj); |
---|
| 3468 | +// //obj.parent.Touch(); |
---|
| 3469 | + } |
---|
| 3470 | + |
---|
| 3471 | + refreshContents(); |
---|
| 3472 | + } |
---|
3053 | 3473 | |
---|
3054 | 3474 | void ResetTransform() |
---|
3055 | 3475 | { |
---|
.. | .. |
---|
3162 | 3582 | refreshContents(); |
---|
3163 | 3583 | } |
---|
3164 | 3584 | |
---|
3165 | | - void ResetCentroid() |
---|
| 3585 | + void ResetCentroid(boolean full) |
---|
3166 | 3586 | { |
---|
3167 | 3587 | Object3D obj; |
---|
3168 | 3588 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3177 | 3597 | LA.matIdentity(Object3D.mat); |
---|
3178 | 3598 | obj.getBounds(minima, maxima, false); |
---|
3179 | 3599 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3180 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3600 | + if (full) |
---|
| 3601 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3181 | 3602 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3182 | 3603 | obj.TransformMesh(Object3D.mat); |
---|
| 3604 | + |
---|
3183 | 3605 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3184 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3606 | + if (full) |
---|
| 3607 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3185 | 3608 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3609 | + |
---|
3186 | 3610 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3187 | 3611 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3188 | 3612 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3211 | 3635 | |
---|
3212 | 3636 | int size = obj.MemorySize(); |
---|
3213 | 3637 | |
---|
3214 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3638 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3639 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3215 | 3640 | } |
---|
3216 | 3641 | } |
---|
3217 | 3642 | catch (Exception e) |
---|
.. | .. |
---|
3248 | 3673 | obj = (Object3D)e.nextElement(); |
---|
3249 | 3674 | |
---|
3250 | 3675 | System.out.println("Object is: " + obj); |
---|
3251 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3676 | + Grafreed.AnalyzeObject(obj); |
---|
3252 | 3677 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3253 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3678 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3254 | 3679 | |
---|
3255 | 3680 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3256 | 3681 | } |
---|
.. | .. |
---|
3292 | 3717 | void GenNormals(boolean crease) |
---|
3293 | 3718 | { |
---|
3294 | 3719 | group.GenNormalsS(crease); |
---|
| 3720 | + |
---|
| 3721 | + refreshContents(); |
---|
| 3722 | + } |
---|
| 3723 | + |
---|
| 3724 | + void GenNormalsMESH() |
---|
| 3725 | + { |
---|
| 3726 | + group.GenNormalsMeshS(); |
---|
3295 | 3727 | |
---|
3296 | 3728 | refreshContents(); |
---|
3297 | 3729 | } |
---|
.. | .. |
---|
3464 | 3896 | |
---|
3465 | 3897 | void ParseVertices() |
---|
3466 | 3898 | { |
---|
3467 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3468 | | - GrafreeD.epsequal = true; |
---|
| 3899 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3900 | + Grafreed.epsequal = true; |
---|
3469 | 3901 | |
---|
3470 | 3902 | for (int i=0; i<group.selection.size(); i++) |
---|
3471 | 3903 | { |
---|
.. | .. |
---|
3490 | 3922 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3491 | 3923 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3492 | 3924 | |
---|
3493 | | - g.add(GrafreeD.clipboard); |
---|
| 3925 | + g.add(Grafreed.clipboard); |
---|
3494 | 3926 | |
---|
3495 | 3927 | buffer.add(g); |
---|
3496 | 3928 | } |
---|
.. | .. |
---|
3505 | 3937 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3506 | 3938 | } |
---|
3507 | 3939 | |
---|
3508 | | - GrafreeD.epsequal = epsequal; |
---|
| 3940 | + Grafreed.epsequal = epsequal; |
---|
3509 | 3941 | |
---|
3510 | 3942 | refreshContents(); |
---|
3511 | 3943 | } |
---|
.. | .. |
---|
3523 | 3955 | String pigment = Object3D.GetPigment(tex); |
---|
3524 | 3956 | //String bump = Object3D.GetBump(tex); |
---|
3525 | 3957 | |
---|
3526 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3958 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3959 | + |
---|
| 3960 | + try |
---|
| 3961 | + { |
---|
| 3962 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3963 | + } |
---|
| 3964 | + catch (Exception e) |
---|
| 3965 | + { |
---|
| 3966 | + System.err.println("FAIL: " + node); |
---|
| 3967 | + } |
---|
3527 | 3968 | |
---|
3528 | 3969 | double s = v.s; |
---|
3529 | 3970 | |
---|
.. | .. |
---|
3611 | 4052 | |
---|
3612 | 4053 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3613 | 4054 | |
---|
3614 | | - boolean random = CameraPane.RANDOM; |
---|
3615 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 4055 | + boolean random = CameraPane.SWITCH; |
---|
| 4056 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3616 | 4057 | lowres.linkVerticesThis(null); |
---|
3617 | 4058 | lowres.linkVerticesThis(sn); |
---|
3618 | | - CameraPane.RANDOM = random; |
---|
| 4059 | + CameraPane.SWITCH = random; |
---|
3619 | 4060 | |
---|
3620 | 4061 | System.err.flush(); |
---|
3621 | 4062 | |
---|
.. | .. |
---|
3655 | 4096 | return; |
---|
3656 | 4097 | |
---|
3657 | 4098 | Object3D poses = group.selection.get(0); |
---|
3658 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 4099 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3659 | 4100 | |
---|
3660 | 4101 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3661 | 4102 | |
---|
.. | .. |
---|
3849 | 4290 | |
---|
3850 | 4291 | void ClipMesh() |
---|
3851 | 4292 | { |
---|
3852 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4293 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3853 | 4294 | { |
---|
3854 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4295 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3855 | 4296 | |
---|
3856 | 4297 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3857 | 4298 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3860 | 4301 | // { |
---|
3861 | 4302 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3862 | 4303 | // } |
---|
3863 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4304 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3864 | 4305 | } |
---|
3865 | 4306 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3866 | 4307 | System.out.println("DONE."); |
---|
.. | .. |
---|
3907 | 4348 | void MarkLeaves(boolean hide) |
---|
3908 | 4349 | { |
---|
3909 | 4350 | group.selection.MarkLeaves(hide); |
---|
| 4351 | + refreshContents(); |
---|
| 4352 | + } |
---|
| 4353 | + |
---|
| 4354 | + void RewindLeaves(boolean hide) |
---|
| 4355 | + { |
---|
| 4356 | + group.selection.RewindLeaves(hide); |
---|
| 4357 | + refreshContents(); |
---|
| 4358 | + } |
---|
| 4359 | + |
---|
| 4360 | + void RandomLeaves(boolean hide) |
---|
| 4361 | + { |
---|
| 4362 | + group.selection.RandomLeaves(hide); |
---|
3910 | 4363 | refreshContents(); |
---|
3911 | 4364 | } |
---|
3912 | 4365 | |
---|
.. | .. |
---|
3992 | 4445 | { |
---|
3993 | 4446 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
3994 | 4447 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
3995 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4448 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3996 | 4449 | |
---|
3997 | 4450 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
3998 | | - if(elem != group) |
---|
| 4451 | + if(elem != group || !newWindow) |
---|
3999 | 4452 | { |
---|
4000 | 4453 | // if (!(elem instanceof Composite)) |
---|
4001 | 4454 | // newWindow = false; |
---|
.. | .. |
---|
4085 | 4538 | //case 702: // Event.LIST_DESELECT |
---|
4086 | 4539 | group.deselectAll(); |
---|
4087 | 4540 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4088 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4089 | 4541 | if (tps != null) |
---|
4090 | 4542 | { |
---|
4091 | 4543 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4094 | 4546 | |
---|
4095 | 4547 | //if (child.parent != null) |
---|
4096 | 4548 | //child.parent.addSelectee(child); |
---|
| 4549 | + objEditor.SetMaterial(child); |
---|
4097 | 4550 | group.addSelectee(child); |
---|
4098 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4099 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4100 | | - System.err.println("info : " + child.GetPath()); |
---|
4101 | 4551 | } |
---|
4102 | 4552 | } |
---|
4103 | 4553 | // else |
---|
.. | .. |
---|
4107 | 4557 | // System.err.println("info : " + group.GetPath()); |
---|
4108 | 4558 | // } |
---|
4109 | 4559 | |
---|
4110 | | - objEditor.SetText(); // jan 2014 |
---|
4111 | | - |
---|
4112 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4560 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4113 | 4561 | CameraPane.flash = true; |
---|
4114 | 4562 | |
---|
4115 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4563 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4116 | 4564 | // a camera |
---|
4117 | 4565 | { |
---|
4118 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4119 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4566 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4567 | + { |
---|
| 4568 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4569 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4570 | + } |
---|
4120 | 4571 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4121 | 4572 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4122 | 4573 | } |
---|
.. | .. |
---|
4129 | 4580 | |
---|
4130 | 4581 | freezemodel = false; |
---|
4131 | 4582 | } |
---|
| 4583 | + |
---|
| 4584 | + void refreshContents(boolean cp) |
---|
| 4585 | + { |
---|
| 4586 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4587 | + { |
---|
| 4588 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4589 | + |
---|
| 4590 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4591 | + { |
---|
| 4592 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4593 | + |
---|
| 4594 | + objEditor.AddInfo(child, this, true); |
---|
| 4595 | + System.err.println("info : " + child.GetPath()); |
---|
| 4596 | + } |
---|
| 4597 | + |
---|
| 4598 | + objEditor.SetText(); // jan 2014 |
---|
| 4599 | + } |
---|
| 4600 | + |
---|
| 4601 | + super.refreshContents(cp); |
---|
| 4602 | + } |
---|
4132 | 4603 | |
---|
4133 | 4604 | void linkSomething(Object3D thing) |
---|
4134 | 4605 | { |
---|
.. | .. |
---|
4200 | 4671 | { |
---|
4201 | 4672 | if (group.selection.isEmpty()) |
---|
4202 | 4673 | return; |
---|
4203 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4674 | + |
---|
| 4675 | + Grafreed.clipboardIsTempGroup = false; |
---|
4204 | 4676 | Composite tGroup = null; |
---|
4205 | 4677 | if (group.selection.size() > 0) // 1) |
---|
4206 | 4678 | { |
---|
4207 | 4679 | tGroup = new cGroup(); |
---|
4208 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4680 | + Grafreed.clipboardIsTempGroup = true; |
---|
4209 | 4681 | } |
---|
4210 | 4682 | |
---|
4211 | 4683 | if (cut) |
---|
4212 | 4684 | { |
---|
| 4685 | + if (Globals.SAVEONMAKE) |
---|
| 4686 | + Save(); |
---|
4213 | 4687 | //int indices[] = jList.getSelectedIndices(); |
---|
4214 | 4688 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4215 | 4689 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4245 | 4719 | //System.out.println("cut " + child); |
---|
4246 | 4720 | //System.out.println("parent = " + child.parent); |
---|
4247 | 4721 | // tmp.addChild(child); |
---|
4248 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4722 | + if (Grafreed.clipboardIsTempGroup) |
---|
4249 | 4723 | tGroup.add/*Child*/(tmp); |
---|
4250 | 4724 | else |
---|
4251 | | - GrafreeD.clipboard = tmp; |
---|
| 4725 | + Grafreed.clipboard = tmp; |
---|
4252 | 4726 | } |
---|
4253 | 4727 | else |
---|
4254 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4728 | + if (Grafreed.clipboardIsTempGroup) |
---|
4255 | 4729 | tGroup.add/*Child*/(child); |
---|
4256 | 4730 | else |
---|
4257 | | - GrafreeD.clipboard = child; |
---|
| 4731 | + Grafreed.clipboard = child; |
---|
4258 | 4732 | } |
---|
4259 | 4733 | |
---|
4260 | 4734 | //ResetModel(); |
---|
.. | .. |
---|
4286 | 4760 | //System.out.println("cut " + elem); |
---|
4287 | 4761 | //System.out.println("parent = " + elem.parent); |
---|
4288 | 4762 | // tmp.addChild(elem); |
---|
4289 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4763 | + if (Grafreed.clipboardIsTempGroup) |
---|
4290 | 4764 | tGroup.add/*Child*/(tmp); |
---|
4291 | 4765 | else |
---|
4292 | | - GrafreeD.clipboard = tmp; |
---|
| 4766 | + Grafreed.clipboard = tmp; |
---|
4293 | 4767 | } |
---|
4294 | 4768 | else |
---|
4295 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4769 | + if (Grafreed.clipboardIsTempGroup) |
---|
4296 | 4770 | tGroup.add/*Child*/(child); |
---|
4297 | 4771 | else |
---|
4298 | | - GrafreeD.clipboard = child; |
---|
| 4772 | + Grafreed.clipboard = child; |
---|
4299 | 4773 | } |
---|
4300 | 4774 | |
---|
4301 | 4775 | } |
---|
4302 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4303 | | - GrafreeD.clipboard = tGroup; |
---|
| 4776 | + |
---|
| 4777 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4778 | + Grafreed.clipboard = tGroup; |
---|
| 4779 | + |
---|
4304 | 4780 | if (cut) |
---|
4305 | 4781 | { |
---|
4306 | 4782 | ResetModel(); |
---|
.. | .. |
---|
4314 | 4790 | // return; |
---|
4315 | 4791 | boolean first = true; |
---|
4316 | 4792 | |
---|
4317 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4793 | + if (Grafreed.clipboardIsTempGroup) |
---|
4318 | 4794 | { |
---|
4319 | 4795 | Composite temp; |
---|
4320 | 4796 | |
---|
.. | .. |
---|
4325 | 4801 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4326 | 4802 | */ |
---|
4327 | 4803 | Object3D elem; |
---|
4328 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4804 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4329 | 4805 | { |
---|
4330 | 4806 | Object3D child = (Object3D)e.nextElement(); |
---|
4331 | 4807 | |
---|
.. | .. |
---|
4359 | 4835 | //Object3D cb = Applet3D.clipboard; |
---|
4360 | 4836 | //temp.addChild(cb); |
---|
4361 | 4837 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4362 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4363 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4364 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4365 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4366 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4838 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4839 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4840 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4841 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4842 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4367 | 4843 | else |
---|
4368 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4369 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4844 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4845 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4370 | 4846 | } |
---|
4371 | 4847 | |
---|
4372 | 4848 | ResetModel(); |
---|
4373 | 4849 | refreshContents(); |
---|
4374 | 4850 | } |
---|
4375 | 4851 | |
---|
4376 | | - void pasteInto(boolean copyit) |
---|
| 4852 | + void pasteInto(boolean copyit, boolean clone) |
---|
4377 | 4853 | { |
---|
4378 | 4854 | // if (GrafreeD.clipboard == null) |
---|
4379 | 4855 | // return; |
---|
.. | .. |
---|
4402 | 4878 | if (copyit) |
---|
4403 | 4879 | { |
---|
4404 | 4880 | // paste(false); |
---|
4405 | | - CloneClipboard(false); // sept 2014 |
---|
| 4881 | + if (clone) |
---|
| 4882 | + { |
---|
| 4883 | + CloneClipboard(false); // sept 2014 |
---|
| 4884 | + } |
---|
| 4885 | + else |
---|
| 4886 | + { |
---|
| 4887 | + paste(false); |
---|
| 4888 | + } |
---|
4406 | 4889 | } |
---|
4407 | 4890 | else |
---|
4408 | 4891 | { |
---|
4409 | 4892 | boolean first = true; |
---|
4410 | 4893 | |
---|
4411 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4894 | + if (Grafreed.clipboardIsTempGroup) |
---|
4412 | 4895 | { |
---|
4413 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4896 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4414 | 4897 | Object3D copy; |
---|
4415 | 4898 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4416 | 4899 | { |
---|
.. | .. |
---|
4420 | 4903 | } |
---|
4421 | 4904 | } else |
---|
4422 | 4905 | { |
---|
4423 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4906 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4424 | 4907 | } |
---|
4425 | 4908 | } |
---|
4426 | 4909 | } |
---|
.. | .. |
---|
4825 | 5308 | } |
---|
4826 | 5309 | */ |
---|
4827 | 5310 | |
---|
4828 | | - void ImportGFD() |
---|
4829 | | - { |
---|
4830 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4831 | | - browser.show(); |
---|
4832 | | - String filename = browser.getFile(); |
---|
4833 | | - if (filename != null && filename.length() > 0) |
---|
4834 | | - { |
---|
4835 | | - String fullname = browser.getDirectory() + filename; |
---|
4836 | | - |
---|
4837 | | - //Object3D readobj = |
---|
4838 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4839 | | - //makeSomething(readobj); |
---|
4840 | | - } |
---|
4841 | | - } |
---|
4842 | | - |
---|
4843 | 5311 | /* |
---|
4844 | 5312 | public void Callback(Object obj) |
---|
4845 | 5313 | { |
---|
.. | .. |
---|
4863 | 5331 | } |
---|
4864 | 5332 | */ |
---|
4865 | 5333 | |
---|
4866 | | - void ImportVRMLX3D() |
---|
4867 | | - { |
---|
4868 | | - if (GrafreeD.standAlone) |
---|
4869 | | - { |
---|
4870 | | - /**/ |
---|
4871 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4872 | | - browser.show(); |
---|
4873 | | - String filename = browser.getFile(); |
---|
4874 | | - if (filename != null && filename.length() > 0) |
---|
4875 | | - { |
---|
4876 | | - String fullname = browser.getDirectory() + filename; |
---|
4877 | | - LoadVRMLX3D(fullname); |
---|
4878 | | - } |
---|
4879 | | - /**/ |
---|
4880 | | - } |
---|
4881 | | - } |
---|
4882 | | - |
---|
4883 | 5334 | String GetFile(String dialogName) |
---|
4884 | 5335 | { |
---|
4885 | | - if (GrafreeD.standAlone) |
---|
| 5336 | + if (Grafreed.standAlone) |
---|
4886 | 5337 | { |
---|
4887 | 5338 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4888 | 5339 | browser.show(); |
---|
.. | .. |
---|
4946 | 5397 | cButton flashSelectionButton; |
---|
4947 | 5398 | cButton editButton; |
---|
4948 | 5399 | cButton uneditButton; |
---|
| 5400 | + JCheckBox allParamsButton; |
---|
4949 | 5401 | cButton clearpanelButton; |
---|
4950 | | - cButton allParamsButton; |
---|
4951 | 5402 | cButton unselectButton; |
---|
4952 | 5403 | |
---|
| 5404 | + cButton minButton; |
---|
| 5405 | + cButton maxButton; |
---|
| 5406 | + cButton fullButton; |
---|
| 5407 | + cButton undoButton; |
---|
| 5408 | + cButton redoButton; |
---|
| 5409 | + cButton saveButton; |
---|
| 5410 | + cButton oneStepButton; |
---|
| 5411 | + |
---|
| 5412 | + cButton groupButton; |
---|
| 5413 | + cButton ungroupButton; |
---|
| 5414 | + cButton compositeButton; |
---|
| 5415 | + |
---|
| 5416 | + cButton gridButton; |
---|
| 5417 | + cButton boxButton; |
---|
| 5418 | + cButton sphereButton; |
---|
| 5419 | + cButton coneButton; |
---|
| 5420 | + cButton torusButton; |
---|
| 5421 | + cButton superButton; |
---|
| 5422 | + cButton kleinButton; |
---|
| 5423 | + cButton particlesButton; |
---|
| 5424 | + cButton overlayButton; |
---|
| 5425 | + cButton lightButton; |
---|
| 5426 | + |
---|
4953 | 5427 | cButton screenfitButton; |
---|
4954 | 5428 | cButton screenfitpointButton; |
---|
4955 | 5429 | cButton snapobjectButton; |
---|
.. | .. |
---|
4960 | 5434 | cButton closeButton; |
---|
4961 | 5435 | |
---|
4962 | 5436 | cButton setsupportButton; |
---|
4963 | | - |
---|
4964 | | - cButton twoButton; |
---|
4965 | | - cButton sixButton; |
---|
4966 | | - cButton threeButton; |
---|
4967 | | - cButton sevenButton; |
---|
4968 | | - cButton fourButton; // full panel |
---|
4969 | | - cButton oneButton; // full XYZ |
---|
4970 | | - //cButton currentLayout; |
---|
4971 | 5437 | |
---|
4972 | 5438 | // |
---|
4973 | 5439 | //Composite |
---|
.. | .. |
---|
4980 | 5446 | private MenuItem lookFromItem; |
---|
4981 | 5447 | private MenuItem switchItem; |
---|
4982 | 5448 | private MenuItem cutItem; |
---|
4983 | | - private MenuItem duplicateItem; |
---|
| 5449 | + private MenuItem undoItem; |
---|
| 5450 | + private MenuItem redoItem; |
---|
| 5451 | + private JMenuItem duplicateItem; |
---|
4984 | 5452 | private MenuItem cloneItem; |
---|
4985 | 5453 | private MenuItem cloneSupportItem; |
---|
4986 | 5454 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
4993 | 5461 | private MenuItem linkverticesItem; |
---|
4994 | 5462 | private MenuItem relinkverticesItem; |
---|
4995 | 5463 | private MenuItem setMasterItem; |
---|
4996 | | - private MenuItem resetMeshItem; |
---|
| 5464 | + private MenuItem resetAllItem; |
---|
4997 | 5465 | private MenuItem stepAllItem; |
---|
4998 | 5466 | private MenuItem revertMeshItem; |
---|
4999 | 5467 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5004 | 5472 | private MenuItem mergeGeometriesItem; |
---|
5005 | 5473 | private MenuItem copyItem; |
---|
5006 | 5474 | private MenuItem pasteItem; |
---|
| 5475 | + private MenuItem pasteIntoItem; |
---|
5007 | 5476 | private MenuItem pasteLinkItem; |
---|
5008 | 5477 | private MenuItem pasteCloneItem; |
---|
5009 | 5478 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5042 | 5511 | private MenuItem showleavesItem; |
---|
5043 | 5512 | private MenuItem markleavesItem; |
---|
5044 | 5513 | private MenuItem unmarkleavesItem; |
---|
| 5514 | + private MenuItem rewindleavesItem; |
---|
| 5515 | + private MenuItem unrewindleavesItem; |
---|
| 5516 | + private MenuItem randomleavesItem; |
---|
| 5517 | + private MenuItem unrandomleavesItem; |
---|
5045 | 5518 | |
---|
5046 | 5519 | private MenuItem flipVItem; |
---|
5047 | 5520 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5053 | 5526 | private MenuItem panoTexturesItem; |
---|
5054 | 5527 | |
---|
5055 | 5528 | private MenuItem resetCentroidItem; |
---|
5056 | | - private MenuItem transformgeometryItem; |
---|
| 5529 | + private MenuItem resetCentroidXZItem; |
---|
5057 | 5530 | private MenuItem resetTransformItem; |
---|
| 5531 | + private MenuItem transformGeometryItem; |
---|
| 5532 | + private MenuItem transformChildrenItem; |
---|
5058 | 5533 | private MenuItem hideItem; |
---|
5059 | 5534 | private MenuItem grabItem; |
---|
5060 | 5535 | private MenuItem backItem; |
---|
.. | .. |
---|
5101 | 5576 | private MenuItem blobItem; |
---|
5102 | 5577 | private MenuItem latheItem; |
---|
5103 | 5578 | private MenuItem bezierItem; |
---|
5104 | | - private MenuItem checkerItem; |
---|
| 5579 | + private MenuItem overlayItem; |
---|
5105 | 5580 | private MenuItem meshItem; |
---|
5106 | 5581 | // private MenuItem meshGroupItem; |
---|
5107 | 5582 | private MenuItem springItem; |
---|
.. | .. |
---|
5123 | 5598 | private MenuItem doubleItem; |
---|
5124 | 5599 | private MenuItem tripleItem; |
---|
5125 | 5600 | |
---|
5126 | | - private MenuItem importGFDItem; |
---|
5127 | | - private MenuItem importVRMLX3DItem; |
---|
5128 | | - private MenuItem import3DSItem; |
---|
5129 | | - private MenuItem importOBJItem; |
---|
5130 | | - |
---|
5131 | 5601 | private MenuItem computeAOItem; |
---|
5132 | 5602 | private MenuItem recompileItem; |
---|
5133 | 5603 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5137 | 5607 | private MenuItem analyzeItem; |
---|
5138 | 5608 | private MenuItem dumpItem; |
---|
5139 | 5609 | //boolean freezemodel = false; |
---|
| 5610 | + |
---|
| 5611 | + Menu cameraMenu; |
---|
| 5612 | + MenuItem editCameraItem; |
---|
| 5613 | + MenuItem revertCameraItem; |
---|
5140 | 5614 | } |
---|