.. | .. |
---|
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 | + Menu menu; |
---|
| 154 | + oe.menuBar.add(menu = new Menu("Edit")); |
---|
| 155 | + //editItem = menu.add(new MenuItem("Edit")); |
---|
| 156 | + //editItem.addActionListener(this); |
---|
| 157 | + |
---|
| 158 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 159 | +// undoItem.addActionListener(this); |
---|
| 160 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 161 | +// redoItem.addActionListener(this); |
---|
| 162 | +// menu.add("-"); |
---|
| 163 | + duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 164 | + duplicateItem.addActionListener(this); |
---|
| 165 | + cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 166 | + cloneItem.addActionListener(this); |
---|
| 167 | + if (Globals.ADVANCED) |
---|
| 168 | + { |
---|
| 169 | + cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
| 170 | + cloneSupportItem.addActionListener(this); |
---|
| 171 | + } |
---|
| 172 | + menu.add("-"); |
---|
| 173 | + cutItem = menu.add(new MenuItem("Cut")); |
---|
| 174 | + cutItem.addActionListener(this); |
---|
| 175 | + copyItem = menu.add(new MenuItem("Copy")); |
---|
| 176 | + copyItem.addActionListener(this); |
---|
| 177 | + pasteItem = menu.add(new MenuItem("Paste")); |
---|
| 178 | + pasteItem.addActionListener(this); |
---|
| 179 | + menu.add("-"); |
---|
| 180 | + |
---|
| 181 | + menu.add("-"); |
---|
| 182 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 183 | + pasteIntoItem.addActionListener(this); |
---|
| 184 | + pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
| 185 | + pasteLinkItem.addActionListener(this); |
---|
| 186 | + pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
| 187 | + pasteCloneItem.addActionListener(this); |
---|
| 188 | +// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
| 189 | +// pasteExpandItem.addActionListener(this); |
---|
| 190 | + menu.add("-"); |
---|
| 191 | + clearItem = menu.add(new MenuItem("Clear")); |
---|
| 192 | + clearItem.addActionListener(this); |
---|
| 193 | + |
---|
| 194 | + if (Globals.ADVANCED) |
---|
| 195 | + { |
---|
| 196 | + // Deletes the cameras... |
---|
| 197 | + clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
| 198 | + clearAllItem.addActionListener(this); |
---|
| 199 | + } |
---|
| 200 | + |
---|
| 201 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 202 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 203 | + //zBufferItem.addActionListener(this); |
---|
| 204 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 205 | + //normalLensItem.addActionListener(this); |
---|
| 206 | + cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 207 | + revertCameraItem.addActionListener(this); |
---|
| 208 | + |
---|
| 209 | + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 210 | + toggleFullScreenItem.addItemListener(this); |
---|
| 211 | + toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 212 | + cameraMenu.add("-"); |
---|
| 213 | + |
---|
| 214 | + cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 215 | + toggleTextureItem.addItemListener(this); |
---|
| 216 | + toggleTextureItem.setState(CameraPane.textureon); |
---|
| 217 | + |
---|
| 218 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 219 | + toggleSwitchItem.addItemListener(this); |
---|
| 220 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 221 | + |
---|
| 222 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 223 | + toggleHandleItem.addItemListener(this); |
---|
| 224 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 225 | + |
---|
| 226 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 227 | + togglePaintItem.addItemListener(this); |
---|
| 228 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 229 | + |
---|
| 230 | + if (Globals.ADVANCED) |
---|
| 231 | + { |
---|
| 232 | + cameraMenu.add("-"); |
---|
| 233 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 234 | + toggleLiveItem.addItemListener(this); |
---|
| 235 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
| 236 | + |
---|
| 237 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 238 | + stepItem.addActionListener(this); |
---|
| 239 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 240 | + // toggleDLItem.addItemListener(this); |
---|
| 241 | + // toggleDLItem.setState(false); |
---|
| 242 | + |
---|
| 243 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 244 | + toggleRenderItem.addItemListener(this); |
---|
| 245 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 246 | + |
---|
| 247 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 248 | + toggleDebugItem.addItemListener(this); |
---|
| 249 | + toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 250 | + |
---|
| 251 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 252 | + toggleFrustumItem.addItemListener(this); |
---|
| 253 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 254 | + |
---|
| 255 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 256 | + toggleFootContactItem.addItemListener(this); |
---|
| 257 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 258 | + |
---|
| 259 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 260 | + toggleTimelineItem.addItemListener(this); |
---|
| 261 | + } |
---|
| 262 | + |
---|
| 263 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 264 | +// toggleRootItem.addItemListener(this); |
---|
| 265 | +// toggleRootItem.setState(false); |
---|
| 266 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 267 | +// animationItem.addItemListener(this); |
---|
| 268 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 269 | + cameraMenu.add("-"); |
---|
| 270 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 271 | + editCameraItem.addActionListener(this); |
---|
| 272 | + |
---|
| 273 | + if (Globals.ADVANCED) |
---|
| 274 | + { |
---|
153 | 275 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
154 | 276 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
155 | 277 | //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
.. | .. |
---|
161 | 283 | lookAtItem.addActionListener(this); |
---|
162 | 284 | //lookFromItem.addActinoListener(this); |
---|
163 | 285 | //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 | | - |
---|
| 286 | + } |
---|
| 287 | + |
---|
193 | 288 | 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); |
---|
| 289 | + if (Globals.ADVANCED) |
---|
| 290 | + { |
---|
198 | 291 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
199 | 292 | revertMeshItem.addActionListener(this); |
---|
200 | 293 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
201 | 294 | resetreferencesItem.addActionListener(this); |
---|
202 | 295 | menu.add("-"); |
---|
| 296 | + } |
---|
203 | 297 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
204 | 298 | overwriteGeoItem.addActionListener(this); |
---|
205 | 299 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
211 | 305 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
212 | 306 | overwriteUVItem.addActionListener(this); |
---|
213 | 307 | menu.add("-"); |
---|
| 308 | + if (Globals.ADVANCED) |
---|
| 309 | + { |
---|
214 | 310 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
215 | 311 | generateMeshItem.addActionListener(this); |
---|
216 | 312 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
217 | 313 | poseMeshItem.addActionListener(this); |
---|
218 | 314 | menu.add("-"); |
---|
| 315 | + } |
---|
219 | 316 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
220 | 317 | resetsupportItem.addActionListener(this); |
---|
221 | 318 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
222 | 319 | linkverticesItem.addActionListener(this); |
---|
223 | 320 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
224 | 321 | relinkverticesItem.addActionListener(this); |
---|
| 322 | + |
---|
| 323 | + if (Globals.ADVANCED) |
---|
| 324 | + { |
---|
225 | 325 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
226 | 326 | setMasterItem.addActionListener(this); |
---|
| 327 | + } |
---|
227 | 328 | |
---|
228 | 329 | oe.menuBar.add(menu = new Menu("Group")); |
---|
229 | 330 | grabItem = menu.add(new MenuItem("Grab")); |
---|
.. | .. |
---|
234 | 335 | frontItem.addActionListener(this); |
---|
235 | 336 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
236 | 337 | compositeItem.addActionListener(this); |
---|
237 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 338 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
238 | 339 | hideItem.addActionListener(this); |
---|
239 | 340 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
240 | 341 | ungroupItem.addActionListener(this); |
---|
241 | 342 | menu.add("-"); |
---|
242 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 343 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
243 | 344 | randomItem.addActionListener(this); |
---|
244 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
245 | | - physicsItem.addActionListener(this); |
---|
246 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
247 | | - frameselectorItem.addActionListener(this); |
---|
248 | 345 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
249 | 346 | switchGeoItem.addActionListener(this); |
---|
250 | 347 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
251 | 348 | switchTransfoItem.addActionListener(this); |
---|
252 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 349 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
253 | 350 | morphItem.addActionListener(this); |
---|
| 351 | + |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
| 354 | + menu.add("-"); |
---|
| 355 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 356 | + physicsItem.addActionListener(this); |
---|
| 357 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 358 | + frameselectorItem.addActionListener(this); |
---|
254 | 359 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
255 | 360 | scriptNodeItem.addActionListener(this); |
---|
256 | 361 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
257 | 362 | cameraItem.addActionListener(this); |
---|
| 363 | + } |
---|
258 | 364 | |
---|
259 | 365 | oe.menuBar.add(menu = new Menu("Object")); |
---|
260 | 366 | textureItem = menu.add(new MenuItem("Texture")); |
---|
.. | .. |
---|
269 | 375 | shadowYItem.addActionListener(this); |
---|
270 | 376 | shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
271 | 377 | shadowZItem.addActionListener(this); |
---|
| 378 | + if (Globals.ADVANCED) |
---|
| 379 | + { |
---|
| 380 | + menu.add("-"); |
---|
272 | 381 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
273 | 382 | linkerItem.addActionListener(this); |
---|
274 | | - templateItem = menu.add(new MenuItem("Template")); |
---|
275 | | - templateItem.addActionListener(this); |
---|
276 | 383 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
277 | 384 | attributeItem.addActionListener(this); |
---|
| 385 | + templateItem = menu.add(new MenuItem("Template")); |
---|
| 386 | + templateItem.addActionListener(this); |
---|
278 | 387 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
279 | 388 | pointflowItem.addActionListener(this); |
---|
| 389 | + } |
---|
280 | 390 | menu.add("-"); |
---|
281 | 391 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
282 | 392 | resetTransformItem.addActionListener(this); |
---|
283 | 393 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
284 | 394 | resetCentroidItem.addActionListener(this); |
---|
285 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
286 | | - transformgeometryItem.addActionListener(this); |
---|
| 395 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 396 | + resetCentroidXZItem.addActionListener(this); |
---|
| 397 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 398 | + transformGeometryItem.addActionListener(this); |
---|
| 399 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 400 | + transformChildrenItem.addActionListener(this); |
---|
287 | 401 | |
---|
288 | 402 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
289 | 403 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
294 | 408 | genNormalsCADItem.addActionListener(this); |
---|
295 | 409 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
296 | 410 | genNormalsMESHItem.addActionListener(this); |
---|
| 411 | + if (Globals.ADVANCED) |
---|
| 412 | + { |
---|
297 | 413 | genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
298 | 414 | genNormalsMINEItem.addActionListener(this); |
---|
| 415 | + } |
---|
299 | 416 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
300 | 417 | stripifyItem.addActionListener(this); |
---|
301 | 418 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
317 | 434 | reduce34MeshItem.addActionListener(this); |
---|
318 | 435 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
319 | 436 | increaseMeshItem.addActionListener(this); |
---|
320 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
321 | | - smoothMeshItem.addActionListener(this); |
---|
322 | 437 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
323 | 438 | clipMeshItem.addActionListener(this); |
---|
| 439 | + |
---|
| 440 | + if (Globals.ADVANCED) |
---|
| 441 | + { |
---|
| 442 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 443 | + smoothMeshItem.addActionListener(this); |
---|
| 444 | + } |
---|
324 | 445 | |
---|
325 | 446 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
326 | 447 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
327 | 448 | clearMaterialsItem.addActionListener(this); |
---|
| 449 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 450 | + resetAllItem.addActionListener(this); |
---|
| 451 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 452 | + stepAllItem.addActionListener(this); |
---|
328 | 453 | menu.add("-"); |
---|
329 | 454 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
330 | 455 | liveleavesItem.addActionListener(this); |
---|
331 | 456 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
332 | 457 | unliveleavesItem.addActionListener(this); |
---|
| 458 | + if (Globals.ADVANCED) |
---|
| 459 | + { |
---|
333 | 460 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
334 | 461 | supportleavesItem.addActionListener(this); |
---|
335 | 462 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
336 | 463 | unsupportleavesItem.addActionListener(this); |
---|
| 464 | + } |
---|
337 | 465 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
338 | 466 | hideleavesItem.addActionListener(this); |
---|
339 | 467 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
342 | 470 | markleavesItem.addActionListener(this); |
---|
343 | 471 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
344 | 472 | unmarkleavesItem.addActionListener(this); |
---|
| 473 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 474 | + rewindleavesItem.addActionListener(this); |
---|
| 475 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 476 | + unrewindleavesItem.addActionListener(this); |
---|
| 477 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 478 | + randomleavesItem.addActionListener(this); |
---|
| 479 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 480 | + unrandomleavesItem.addActionListener(this); |
---|
345 | 481 | menu.add("-"); |
---|
346 | 482 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
347 | 483 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
377 | 513 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
378 | 514 | sortbynameItem.addActionListener(this); |
---|
379 | 515 | menu.add("-"); |
---|
| 516 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 517 | + shareGeometriesItem.addActionListener(this); |
---|
| 518 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 519 | + mergeGeometriesItem.addActionListener(this); |
---|
| 520 | + if (Globals.ADVANCED) |
---|
| 521 | + { |
---|
| 522 | + // Pretty much the same as duplicate and clone. |
---|
380 | 523 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
381 | 524 | extractGeometriesItem.addActionListener(this); |
---|
382 | 525 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
383 | 526 | 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); |
---|
| 527 | + } |
---|
388 | 528 | |
---|
389 | 529 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
390 | 530 | buildCreateMenu(menu); |
---|
391 | 531 | |
---|
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 | 532 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
404 | 533 | buildToolsMenu(menu); |
---|
405 | 534 | } |
---|
.. | .. |
---|
436 | 565 | */ |
---|
437 | 566 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
438 | 567 | |
---|
| 568 | + oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 569 | + undoButton.setToolTipText("Undo changes"); |
---|
| 570 | + undoButton.addActionListener(this); |
---|
| 571 | + |
---|
| 572 | + oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 573 | + redoButton.setToolTipText("Redo changes"); |
---|
| 574 | + redoButton.addActionListener(this); |
---|
| 575 | + |
---|
| 576 | + oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 577 | + saveButton.setToolTipText("Save changes"); |
---|
| 578 | + saveButton.addActionListener(this); |
---|
| 579 | + |
---|
439 | 580 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
440 | | - liveCB.setToolTipText("Enabled animation"); |
---|
| 581 | + liveCB.setToolTipText("Enable animation"); |
---|
441 | 582 | liveCB.addItemListener(this); |
---|
442 | 583 | |
---|
| 584 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 585 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 586 | + oneStepButton.addActionListener(this); |
---|
| 587 | + |
---|
| 588 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 589 | + fastCB.setToolTipText("Fast mode"); |
---|
| 590 | + fastCB.addItemListener(this); |
---|
| 591 | + |
---|
443 | 592 | oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
444 | 593 | trackCB.setToolTipText("Enable tracking"); |
---|
445 | 594 | trackCB.addItemListener(this); |
---|
446 | 595 | |
---|
447 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
448 | 597 | screenfitButton.setToolTipText("Screen fit"); |
---|
449 | 598 | screenfitButton.addActionListener(this); |
---|
450 | 599 | |
---|
451 | 600 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
452 | 601 | // screenfitpointButton.addActionListener(this); |
---|
453 | | -// oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
455 | | - snapobjectButton.addActionListener(this); |
---|
456 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | 602 | |
---|
459 | | - //aConstraints.gridx = 0; |
---|
460 | | - //aConstraints.gridy += 1; |
---|
461 | | - oe.aConstraints.weighty = 0; |
---|
462 | | - oe.aConstraints.gridwidth = 1; |
---|
463 | | - |
---|
464 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 603 | + if (Globals.ADVANCED) |
---|
| 604 | + { |
---|
| 605 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 606 | + snapobjectButton.addActionListener(this); |
---|
| 607 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 608 | + } |
---|
| 609 | + |
---|
| 610 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
465 | 611 | flashSelectionButton.setToolTipText("Show selection"); |
---|
466 | 612 | flashSelectionButton.addActionListener(this); |
---|
467 | 613 | |
---|
468 | 614 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
469 | 615 | |
---|
470 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 616 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
471 | 617 | twoButton.setToolTipText("Show center view only"); |
---|
472 | 618 | twoButton.addActionListener(this); |
---|
473 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 619 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
474 | 620 | fourButton.addActionListener(this); |
---|
475 | 621 | fourButton.setToolTipText("Show left panel only"); |
---|
476 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 622 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
477 | 623 | sixButton.setToolTipText("2-column layout left"); |
---|
478 | 624 | sixButton.addActionListener(this); |
---|
479 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 625 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
480 | 626 | threeButton.setToolTipText("2-column layout right"); |
---|
481 | 627 | threeButton.addActionListener(this); |
---|
482 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 628 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
483 | 629 | sevenButton.setToolTipText("3-column layout"); |
---|
484 | 630 | sevenButton.addActionListener(this); |
---|
485 | 631 | // |
---|
486 | 632 | |
---|
487 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 633 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
488 | 634 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
489 | 635 | rootButton.addActionListener(this); |
---|
490 | 636 | |
---|
491 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 637 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
492 | 638 | closeButton.setToolTipText("Close tab"); |
---|
493 | 639 | closeButton.addActionListener(this); |
---|
494 | 640 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
496 | 642 | |
---|
497 | 643 | cGridBag commandsPanel = new cGridBag(); |
---|
498 | 644 | |
---|
499 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 645 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
500 | 646 | editButton.setToolTipText("Edit selection"); |
---|
501 | 647 | editButton.addActionListener(this); |
---|
502 | 648 | |
---|
503 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 649 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | 650 | uneditButton.setToolTipText("Unedit selection"); |
---|
505 | 651 | uneditButton.addActionListener(this); |
---|
506 | 652 | |
---|
507 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 653 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 654 | + allParamsButton.setToolTipText("Edit all params"); |
---|
| 655 | + allParamsButton.addActionListener(this); |
---|
| 656 | + |
---|
| 657 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
508 | 658 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
509 | 659 | clearPanelButton.addActionListener(this); |
---|
510 | 660 | |
---|
511 | | - commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
512 | | - allParamsButton.setToolTipText("All params??"); |
---|
513 | | - allParamsButton.addActionListener(this); |
---|
514 | | - |
---|
515 | | - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 661 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
516 | 662 | unselectButton.setToolTipText("Unselect"); |
---|
517 | 663 | unselectButton.addActionListener(this); |
---|
518 | 664 | |
---|
.. | .. |
---|
587 | 733 | |
---|
588 | 734 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
589 | 735 | { |
---|
590 | | - //constraints.gridx = 0; |
---|
591 | | - //constraints.gridy = 0; |
---|
592 | | - panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
593 | | - fastCB.setToolTipText("Fast mode"); |
---|
594 | | - fastCB.addItemListener(this); |
---|
595 | | - //constraints.gridy += 1; |
---|
596 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
597 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
598 | | - supportCB.addItemListener(this); |
---|
599 | | - |
---|
600 | | - // constraints.gridy += 1; |
---|
601 | | - // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
602 | | - // localCB.addItemListener(this); |
---|
603 | | - |
---|
604 | | - //constraints.gridy += 1; |
---|
605 | | - panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
606 | | - crowdCB.setToolTipText("Used for crowds"); |
---|
607 | | - crowdCB.addItemListener(this); |
---|
608 | | - |
---|
609 | | - //constraints.gridy += 1; |
---|
610 | | - panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
611 | | - smoothCB.setToolTipText("Snapping delay"); |
---|
612 | | - smoothCB.addItemListener(this); |
---|
613 | | - |
---|
614 | | - //constraints.gridy += 1; |
---|
615 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
616 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
617 | | - slowCB.addItemListener(this); |
---|
618 | | - //constraints.gridy += 1; |
---|
619 | 736 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
620 | 737 | boxCB.setToolTipText("Display bounding boxes"); |
---|
621 | 738 | boxCB.addItemListener(this); |
---|
622 | | - //constraints.gridy += 1; |
---|
| 739 | + |
---|
623 | 740 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
624 | 741 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
625 | 742 | zoomBoxCB.addItemListener(this); |
---|
626 | 743 | |
---|
| 744 | + if (true) // Globals.ADVANCED) |
---|
| 745 | + { |
---|
| 746 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 747 | + supportCB.setToolTipText("Enable rigging"); |
---|
| 748 | + supportCB.addItemListener(this); |
---|
| 749 | + |
---|
| 750 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 751 | + // localCB.addItemListener(this); |
---|
| 752 | + |
---|
| 753 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 754 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 755 | + crowdCB.addItemListener(this); |
---|
| 756 | + |
---|
| 757 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 758 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 759 | + smoothCB.addItemListener(this); |
---|
| 760 | + |
---|
| 761 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 762 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 763 | + slowCB.addItemListener(this); |
---|
| 764 | + |
---|
627 | 765 | // constraints.gridy += 1; |
---|
628 | 766 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
629 | 767 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
648 | 786 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
649 | 787 | // debugCB.addItemListener(this); |
---|
650 | 788 | |
---|
651 | | - //constraints.gridy += 1; |
---|
652 | 789 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
653 | 790 | oeilCB.addItemListener(this); |
---|
654 | 791 | |
---|
655 | | - //constraints.gridy += 1; |
---|
656 | 792 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
657 | 793 | lookAtCB.setToolTipText("Look-at target"); |
---|
658 | 794 | lookAtCB.addItemListener(this); |
---|
| 795 | + |
---|
| 796 | + } |
---|
659 | 797 | |
---|
660 | 798 | cGridBag fill = new cGridBag(); |
---|
661 | 799 | |
---|
.. | .. |
---|
676 | 814 | buttonGroup.add(radioButton); |
---|
677 | 815 | radioButton.doClick(); |
---|
678 | 816 | } |
---|
| 817 | + |
---|
679 | 818 | void SetupViews(ObjEditor oe) |
---|
680 | 819 | { |
---|
681 | 820 | oe.SetupViews(); |
---|
.. | .. |
---|
740 | 879 | } else if(e.getSource() == liveCB) |
---|
741 | 880 | { |
---|
742 | 881 | cameraView.ToggleLive(); |
---|
| 882 | + refreshContents(false); |
---|
743 | 883 | } |
---|
744 | 884 | else if(e.getSource() == supportCB) |
---|
745 | 885 | { |
---|
.. | .. |
---|
892 | 1032 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
893 | 1033 | // return; |
---|
894 | 1034 | // } |
---|
895 | | - if (string.charAt(0) == '/') |
---|
| 1035 | + |
---|
| 1036 | + // File path for Mac and Windows |
---|
| 1037 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
896 | 1038 | { |
---|
897 | 1039 | // file(s) |
---|
898 | 1040 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
919 | 1061 | |
---|
920 | 1062 | flashIt = false; |
---|
921 | 1063 | CameraPane pane = (CameraPane) target; |
---|
922 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1064 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
923 | 1065 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
924 | 1066 | |
---|
925 | 1067 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
946 | 1088 | { |
---|
947 | 1089 | loadClipboard(true); |
---|
948 | 1090 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
949 | | - pasteInto(false); |
---|
| 1091 | + pasteInto(false, false); |
---|
950 | 1092 | } else { |
---|
951 | 1093 | loadClipboard(false); |
---|
952 | 1094 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
953 | | - pasteInto(false); // true); // ??? |
---|
| 1095 | + pasteInto(false, false); // true); // ??? |
---|
954 | 1096 | } |
---|
955 | 1097 | } |
---|
956 | 1098 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1072 | 1214 | kleinItem.addActionListener(this); |
---|
1073 | 1215 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1074 | 1216 | particleItem.addActionListener(this); |
---|
| 1217 | + if (Globals.ADVANCED) |
---|
| 1218 | + { |
---|
1075 | 1219 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1076 | 1220 | ragdollItem.addActionListener(this); |
---|
1077 | 1221 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1078 | 1222 | ragdoll2Item.addActionListener(this); |
---|
| 1223 | + } |
---|
1079 | 1224 | menu.add("-"); |
---|
1080 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1225 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1081 | 1226 | meshItem.addActionListener(this); |
---|
1082 | 1227 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1083 | 1228 | // meshGroupItem.addActionListener(this); |
---|
| 1229 | + if (Globals.ADVANCED) |
---|
| 1230 | + { |
---|
1084 | 1231 | springItem = menu.add(new MenuItem("Spring")); |
---|
1085 | 1232 | springItem.addActionListener(this); |
---|
1086 | 1233 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1087 | 1234 | flagItem.addActionListener(this); |
---|
1088 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1089 | | - bezierItem.addActionListener(this); |
---|
1090 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1091 | | - checkerItem.addActionListener(this); |
---|
1092 | 1235 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1093 | 1236 | blobItem.addActionListener(this); |
---|
1094 | 1237 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1095 | 1238 | latheItem.addActionListener(this); |
---|
| 1239 | + } |
---|
| 1240 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1241 | + bezierItem.addActionListener(this); |
---|
| 1242 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1243 | + overlayItem.addActionListener(this); |
---|
1096 | 1244 | lightItem = menu.add(new MenuItem("Light")); |
---|
1097 | 1245 | lightItem.addActionListener(this); |
---|
1098 | 1246 | menu.add("-"); |
---|
.. | .. |
---|
1102 | 1250 | loopItem.addActionListener(this); |
---|
1103 | 1251 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1104 | 1252 | doubleItem.addActionListener(this); |
---|
| 1253 | + if (Globals.ADVANCED) |
---|
| 1254 | + { |
---|
1105 | 1255 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1106 | 1256 | tripleItem.addActionListener(this); |
---|
| 1257 | + } |
---|
1107 | 1258 | } |
---|
1108 | 1259 | |
---|
1109 | 1260 | void buildToolsMenu(Menu menu) |
---|
1110 | 1261 | { |
---|
1111 | 1262 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1112 | 1263 | animationItem.addItemListener(this); |
---|
1113 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1264 | + animationItem.setState(Globals.ANIMATION); |
---|
1114 | 1265 | |
---|
1115 | 1266 | menu.add("-"); |
---|
1116 | 1267 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1117 | 1268 | parseverticesItem.addActionListener(this); |
---|
1118 | 1269 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1119 | 1270 | textureFieldItem.addActionListener(this); |
---|
1120 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1271 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1121 | 1272 | alignItem.addActionListener(this); |
---|
1122 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1123 | | - mirrorItem.addActionListener(this); |
---|
1124 | 1273 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1125 | 1274 | reduceMorphItem.addActionListener(this); |
---|
1126 | 1275 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1127 | 1276 | reduce34MorphItem.addActionListener(this); |
---|
1128 | | - |
---|
| 1277 | + menu.add("-"); |
---|
1129 | 1278 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1130 | 1279 | computeAOItem.addActionListener(this); |
---|
1131 | | - menu.add("-"); |
---|
1132 | 1280 | |
---|
| 1281 | + if (Globals.ADVANCED) |
---|
| 1282 | + { |
---|
| 1283 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1284 | + mirrorItem.addActionListener(this); |
---|
| 1285 | + menu.add("-"); |
---|
1133 | 1286 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1134 | 1287 | memoryItem.addActionListener(this); |
---|
1135 | 1288 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1136 | 1289 | analyzeItem.addActionListener(this); |
---|
1137 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1290 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1138 | 1291 | dumpItem.addActionListener(this); |
---|
1139 | 1292 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1140 | 1293 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1152 | 1305 | menu.add("-"); |
---|
1153 | 1306 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1154 | 1307 | editScriptItem.addActionListener(this); |
---|
| 1308 | + } |
---|
1155 | 1309 | } |
---|
1156 | 1310 | |
---|
1157 | 1311 | void ScreenFit() |
---|
.. | .. |
---|
1480 | 1634 | |
---|
1481 | 1635 | void Overwrite(int mask) |
---|
1482 | 1636 | { |
---|
1483 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1637 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1484 | 1638 | { |
---|
1485 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1639 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1486 | 1640 | |
---|
1487 | 1641 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1488 | 1642 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1653 | 1807 | { |
---|
1654 | 1808 | makeSomething(new BezierSurface()); |
---|
1655 | 1809 | } else |
---|
1656 | | - if (source == checkerItem) |
---|
| 1810 | + if (source == overlayItem) |
---|
1657 | 1811 | { |
---|
1658 | 1812 | /* |
---|
1659 | 1813 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1787 | 1941 | csg.addChild(child); |
---|
1788 | 1942 | child.addChild(csg); |
---|
1789 | 1943 | } else |
---|
1790 | | - |
---|
1791 | | - if (source == importGFDItem) |
---|
1792 | | - { |
---|
1793 | | - ImportGFD(); |
---|
1794 | | - } else |
---|
1795 | | - if (source == importVRMLX3DItem) |
---|
1796 | | - { |
---|
1797 | | - ImportVRMLX3D(); |
---|
1798 | | - } else |
---|
1799 | | - if (source == import3DSItem) |
---|
1800 | | - { |
---|
1801 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1802 | | - } else |
---|
1803 | | - if (source == importOBJItem) |
---|
1804 | | - { |
---|
1805 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1806 | | - } else |
---|
1807 | 1944 | if (source == computeAOItem) |
---|
1808 | 1945 | { |
---|
1809 | 1946 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
.. | .. |
---|
1822 | 1959 | if (source == invariantsItem) |
---|
1823 | 1960 | { |
---|
1824 | 1961 | System.out.println("Invariants:"); |
---|
1825 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 1962 | + Grafreed.grafreeD.universe.invariants(); |
---|
1826 | 1963 | } else |
---|
1827 | 1964 | if (source == memoryItem) |
---|
1828 | 1965 | { |
---|
.. | .. |
---|
1840 | 1977 | if (source == dumpItem) |
---|
1841 | 1978 | { |
---|
1842 | 1979 | DumpObject(); |
---|
| 1980 | + } else |
---|
| 1981 | + if (source == undoButton) |
---|
| 1982 | + { |
---|
| 1983 | + Undo(); |
---|
| 1984 | + } else |
---|
| 1985 | + if (source == redoButton) |
---|
| 1986 | + { |
---|
| 1987 | + Redo(); |
---|
| 1988 | + } else |
---|
| 1989 | + if (source == saveButton) |
---|
| 1990 | + { |
---|
| 1991 | + Save(); |
---|
| 1992 | + } else |
---|
| 1993 | + if (source == oneStepButton) |
---|
| 1994 | + { |
---|
| 1995 | + Globals.ONESTEP = true; |
---|
| 1996 | + cameraView.repaint(); |
---|
1843 | 1997 | } else |
---|
1844 | 1998 | if (source == screenfitButton) |
---|
1845 | 1999 | { |
---|
.. | .. |
---|
1890 | 2044 | { |
---|
1891 | 2045 | loadClipboard(true); |
---|
1892 | 2046 | } else |
---|
| 2047 | + if (source == undoItem) |
---|
| 2048 | + { |
---|
| 2049 | + Undo(); |
---|
| 2050 | + } else |
---|
| 2051 | + if (source == redoItem) |
---|
| 2052 | + { |
---|
| 2053 | + Redo(); |
---|
| 2054 | + } else |
---|
1893 | 2055 | if (source == duplicateItem) |
---|
1894 | 2056 | { |
---|
1895 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2057 | + Object3D keep = Grafreed.clipboard; |
---|
1896 | 2058 | loadClipboard(false); |
---|
1897 | 2059 | paste(false); |
---|
1898 | | - GrafreeD.clipboard = keep; |
---|
| 2060 | + Grafreed.clipboard = keep; |
---|
1899 | 2061 | } else |
---|
1900 | 2062 | if (source == cloneItem) |
---|
1901 | 2063 | { |
---|
.. | .. |
---|
1913 | 2075 | { |
---|
1914 | 2076 | paste(false); |
---|
1915 | 2077 | } else |
---|
| 2078 | + if (source == pasteIntoItem) |
---|
| 2079 | + { |
---|
| 2080 | + pasteInto(true, false); |
---|
| 2081 | + } else |
---|
1916 | 2082 | if (source == pasteLinkItem) |
---|
1917 | 2083 | { |
---|
1918 | | - pasteInto(false); |
---|
| 2084 | + pasteInto(false, false); |
---|
1919 | 2085 | } else |
---|
1920 | 2086 | if (source == pasteCloneItem) |
---|
1921 | 2087 | { |
---|
1922 | | - pasteInto(true); |
---|
| 2088 | + pasteInto(true, true); |
---|
1923 | 2089 | } else |
---|
1924 | 2090 | if (source == pasteExpandItem) |
---|
1925 | 2091 | { |
---|
.. | .. |
---|
2111 | 2277 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2112 | 2278 | // refreshContents(); |
---|
2113 | 2279 | // } |
---|
2114 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2280 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2115 | 2281 | { |
---|
2116 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2282 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2117 | 2283 | |
---|
2118 | 2284 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2119 | 2285 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2121 | 2287 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2122 | 2288 | for (int i=0; i<group.selection.size(); i++) |
---|
2123 | 2289 | { |
---|
2124 | | - boolean random = CameraPane.RANDOM; |
---|
2125 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2290 | + boolean random = CameraPane.SWITCH; |
---|
| 2291 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2126 | 2292 | group.selection.get(i).linkVerticesThis(content); |
---|
2127 | 2293 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2128 | | - CameraPane.RANDOM = random; |
---|
| 2294 | + CameraPane.SWITCH = random; |
---|
2129 | 2295 | } |
---|
2130 | 2296 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2131 | 2297 | refreshContents(); |
---|
.. | .. |
---|
2135 | 2301 | { |
---|
2136 | 2302 | for (int i=0; i<group.selection.size(); i++) |
---|
2137 | 2303 | { |
---|
2138 | | - boolean random = CameraPane.RANDOM; |
---|
2139 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2304 | + boolean random = CameraPane.SWITCH; |
---|
| 2305 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2140 | 2306 | group.selection.get(i).linkVerticesThis(null); |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2307 | + CameraPane.SWITCH = random; |
---|
2142 | 2308 | } |
---|
2143 | 2309 | |
---|
2144 | 2310 | refreshContents(); |
---|
2145 | 2311 | } else |
---|
2146 | 2312 | if (source == relinkverticesItem) |
---|
2147 | 2313 | { |
---|
2148 | | - boolean random = CameraPane.RANDOM; |
---|
2149 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2314 | + boolean random = CameraPane.SWITCH; |
---|
| 2315 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2150 | 2316 | group.selection.RelinkToSupport(); |
---|
2151 | | - CameraPane.RANDOM = random; |
---|
| 2317 | + CameraPane.SWITCH = random; |
---|
2152 | 2318 | |
---|
2153 | 2319 | refreshContents(); |
---|
2154 | 2320 | } else |
---|
.. | .. |
---|
2163 | 2329 | } else |
---|
2164 | 2330 | if (source == setMasterItem) |
---|
2165 | 2331 | { |
---|
2166 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2332 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2167 | 2333 | { |
---|
2168 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2334 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2169 | 2335 | |
---|
2170 | 2336 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2171 | 2337 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2178 | 2344 | { |
---|
2179 | 2345 | if (group.selection.size() == 1) |
---|
2180 | 2346 | { |
---|
2181 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2347 | + if (Grafreed.clipboard.size() == 1) |
---|
2182 | 2348 | { |
---|
2183 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2349 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2184 | 2350 | |
---|
2185 | 2351 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2186 | 2352 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2197 | 2363 | { |
---|
2198 | 2364 | RevertMeshes(); |
---|
2199 | 2365 | } else |
---|
2200 | | - if (source == resetMeshItem) |
---|
| 2366 | + if (source == resetAllItem) |
---|
2201 | 2367 | { |
---|
2202 | 2368 | ResetAll(); |
---|
2203 | 2369 | } else |
---|
.. | .. |
---|
2246 | 2412 | RandomNode random = new RandomNode(); |
---|
2247 | 2413 | group(random); |
---|
2248 | 2414 | if (random.size() > 0) |
---|
2249 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2415 | + random.name = random.get(0).name + "Switch"; |
---|
2250 | 2416 | } else |
---|
2251 | 2417 | if (source == physicsItem) |
---|
2252 | 2418 | { |
---|
.. | .. |
---|
2385 | 2551 | } else |
---|
2386 | 2552 | if (source == genNormalsMESHItem) |
---|
2387 | 2553 | { |
---|
2388 | | - GenNormals(true); // TODO |
---|
| 2554 | + GenNormalsMESH(); |
---|
2389 | 2555 | } else |
---|
2390 | 2556 | if (source == genNormalsORGANItem) |
---|
2391 | 2557 | { |
---|
.. | .. |
---|
2450 | 2616 | if (source == unmarkleavesItem) |
---|
2451 | 2617 | { |
---|
2452 | 2618 | MarkLeaves(false); |
---|
| 2619 | + } else |
---|
| 2620 | + if (source == rewindleavesItem) |
---|
| 2621 | + { |
---|
| 2622 | + RewindLeaves(true); |
---|
| 2623 | + } else |
---|
| 2624 | + if (source == unrewindleavesItem) |
---|
| 2625 | + { |
---|
| 2626 | + RewindLeaves(false); |
---|
| 2627 | + } else |
---|
| 2628 | + if (source == randomleavesItem) |
---|
| 2629 | + { |
---|
| 2630 | + RandomLeaves(true); |
---|
| 2631 | + } else |
---|
| 2632 | + if (source == unrandomleavesItem) |
---|
| 2633 | + { |
---|
| 2634 | + RandomLeaves(false); |
---|
2453 | 2635 | } else |
---|
2454 | 2636 | if (source == flipVItem) |
---|
2455 | 2637 | { |
---|
.. | .. |
---|
2535 | 2717 | { |
---|
2536 | 2718 | SmoothMesh(); |
---|
2537 | 2719 | } else |
---|
2538 | | - if (source == transformgeometryItem) |
---|
| 2720 | + if (source == transformGeometryItem) |
---|
2539 | 2721 | { |
---|
2540 | 2722 | TransformGeometry(); |
---|
| 2723 | + } else |
---|
| 2724 | + if (source == transformChildrenItem) |
---|
| 2725 | + { |
---|
| 2726 | + TransformChildren(); |
---|
2541 | 2727 | } else |
---|
2542 | 2728 | if (source == resetTransformItem) |
---|
2543 | 2729 | { |
---|
.. | .. |
---|
2545 | 2731 | } else |
---|
2546 | 2732 | if (source == resetCentroidItem) |
---|
2547 | 2733 | { |
---|
2548 | | - ResetCentroid(); |
---|
| 2734 | + ResetCentroid(true); |
---|
| 2735 | + } else |
---|
| 2736 | + if (source == resetCentroidXZItem) |
---|
| 2737 | + { |
---|
| 2738 | + ResetCentroid(false); |
---|
2549 | 2739 | } else |
---|
2550 | 2740 | if (source == resetParentItem) |
---|
2551 | 2741 | { |
---|
.. | .. |
---|
2901 | 3091 | child.CloseUI(); |
---|
2902 | 3092 | listUI.remove(child); |
---|
2903 | 3093 | |
---|
2904 | | - child.editWindow = null; // ??????????? |
---|
| 3094 | + //child.editWindow = null; // ??????????? |
---|
2905 | 3095 | } |
---|
2906 | | - objEditor.ctrlPanel.validate(); |
---|
| 3096 | + objEditor.ctrlPanel.FlushUI(); |
---|
2907 | 3097 | //objEditor.jTree.clearSelection(); |
---|
2908 | 3098 | //objEditor.ResetSliders(); |
---|
2909 | 3099 | refreshContents(true); |
---|
.. | .. |
---|
2987 | 3177 | frontView.object = group; |
---|
2988 | 3178 | sideView.object = group; |
---|
2989 | 3179 | } |
---|
| 3180 | + |
---|
| 3181 | +// fix "+" issue |
---|
2990 | 3182 | group.editWindow = this; |
---|
| 3183 | + |
---|
2991 | 3184 | /* |
---|
2992 | 3185 | currentLayout = radio.layout; |
---|
2993 | 3186 | if (currentLayout == null) |
---|
.. | .. |
---|
3000 | 3193 | //group.attributes = -1; |
---|
3001 | 3194 | ResetModel(); |
---|
3002 | 3195 | refreshContents(true); |
---|
3003 | | - } |
---|
| 3196 | + } else if (event.getSource() == editCameraItem) |
---|
| 3197 | + { |
---|
| 3198 | + cameraView.ProtectCamera(); |
---|
| 3199 | + cameraView.repaint(); |
---|
| 3200 | + return; |
---|
| 3201 | + } else if (event.getSource() == revertCameraItem) |
---|
| 3202 | + { |
---|
| 3203 | + cameraView.RevertCamera(); |
---|
| 3204 | + cameraView.repaint(); |
---|
| 3205 | + return; |
---|
| 3206 | + // } else if (event.getSource() == textureButton) |
---|
| 3207 | + // { |
---|
| 3208 | + // return; // true; |
---|
| 3209 | + } |
---|
3004 | 3210 | else |
---|
3005 | 3211 | { |
---|
3006 | 3212 | //return super.action(event, arg); |
---|
.. | .. |
---|
3061 | 3267 | refreshContents(); |
---|
3062 | 3268 | } |
---|
3063 | 3269 | |
---|
| 3270 | + void TransformChildren() |
---|
| 3271 | + { |
---|
| 3272 | + Object3D obj; |
---|
| 3273 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3274 | + { |
---|
| 3275 | + obj = (Object3D)e.nextElement(); |
---|
| 3276 | + obj.KeepTextureMatrices(); |
---|
| 3277 | + obj.TransformChildren(); |
---|
| 3278 | + obj.RestoreTextureMatrices(); |
---|
| 3279 | + |
---|
| 3280 | +// if (obj.parent == null) |
---|
| 3281 | +// { |
---|
| 3282 | +// System.out.println("NULL PARENT!"); |
---|
| 3283 | +// new Exception().printStackTrace(); |
---|
| 3284 | +// } |
---|
| 3285 | +// else |
---|
| 3286 | +// TouchTransform(obj); |
---|
| 3287 | +// //obj.parent.Touch(); |
---|
| 3288 | + } |
---|
| 3289 | + |
---|
| 3290 | + refreshContents(); |
---|
| 3291 | + } |
---|
3064 | 3292 | |
---|
3065 | 3293 | void ResetTransform() |
---|
3066 | 3294 | { |
---|
.. | .. |
---|
3173 | 3401 | refreshContents(); |
---|
3174 | 3402 | } |
---|
3175 | 3403 | |
---|
3176 | | - void ResetCentroid() |
---|
| 3404 | + void ResetCentroid(boolean full) |
---|
3177 | 3405 | { |
---|
3178 | 3406 | Object3D obj; |
---|
3179 | 3407 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3188 | 3416 | LA.matIdentity(Object3D.mat); |
---|
3189 | 3417 | obj.getBounds(minima, maxima, false); |
---|
3190 | 3418 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3191 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3419 | + if (full) |
---|
| 3420 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3192 | 3421 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3193 | 3422 | obj.TransformMesh(Object3D.mat); |
---|
| 3423 | + |
---|
3194 | 3424 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3195 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3425 | + if (full) |
---|
| 3426 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3196 | 3427 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3428 | + |
---|
3197 | 3429 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3198 | 3430 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3199 | 3431 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3222 | 3454 | |
---|
3223 | 3455 | int size = obj.MemorySize(); |
---|
3224 | 3456 | |
---|
3225 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3457 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3458 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3226 | 3459 | } |
---|
3227 | 3460 | } |
---|
3228 | 3461 | catch (Exception e) |
---|
.. | .. |
---|
3259 | 3492 | obj = (Object3D)e.nextElement(); |
---|
3260 | 3493 | |
---|
3261 | 3494 | System.out.println("Object is: " + obj); |
---|
3262 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3495 | + Grafreed.AnalyzeObject(obj); |
---|
3263 | 3496 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3264 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3497 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3265 | 3498 | |
---|
3266 | 3499 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3267 | 3500 | } |
---|
.. | .. |
---|
3303 | 3536 | void GenNormals(boolean crease) |
---|
3304 | 3537 | { |
---|
3305 | 3538 | group.GenNormalsS(crease); |
---|
| 3539 | + |
---|
| 3540 | + refreshContents(); |
---|
| 3541 | + } |
---|
| 3542 | + |
---|
| 3543 | + void GenNormalsMESH() |
---|
| 3544 | + { |
---|
| 3545 | + group.GenNormalsMeshS(); |
---|
3306 | 3546 | |
---|
3307 | 3547 | refreshContents(); |
---|
3308 | 3548 | } |
---|
.. | .. |
---|
3475 | 3715 | |
---|
3476 | 3716 | void ParseVertices() |
---|
3477 | 3717 | { |
---|
3478 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3479 | | - GrafreeD.epsequal = true; |
---|
| 3718 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3719 | + Grafreed.epsequal = true; |
---|
3480 | 3720 | |
---|
3481 | 3721 | for (int i=0; i<group.selection.size(); i++) |
---|
3482 | 3722 | { |
---|
.. | .. |
---|
3501 | 3741 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3502 | 3742 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3503 | 3743 | |
---|
3504 | | - g.add(GrafreeD.clipboard); |
---|
| 3744 | + g.add(Grafreed.clipboard); |
---|
3505 | 3745 | |
---|
3506 | 3746 | buffer.add(g); |
---|
3507 | 3747 | } |
---|
.. | .. |
---|
3516 | 3756 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3517 | 3757 | } |
---|
3518 | 3758 | |
---|
3519 | | - GrafreeD.epsequal = epsequal; |
---|
| 3759 | + Grafreed.epsequal = epsequal; |
---|
3520 | 3760 | |
---|
3521 | 3761 | refreshContents(); |
---|
3522 | 3762 | } |
---|
.. | .. |
---|
3534 | 3774 | String pigment = Object3D.GetPigment(tex); |
---|
3535 | 3775 | //String bump = Object3D.GetBump(tex); |
---|
3536 | 3776 | |
---|
3537 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3777 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3778 | + |
---|
| 3779 | + try |
---|
| 3780 | + { |
---|
| 3781 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3782 | + } |
---|
| 3783 | + catch (Exception e) |
---|
| 3784 | + { |
---|
| 3785 | + System.err.println("FAIL: " + node); |
---|
| 3786 | + } |
---|
3538 | 3787 | |
---|
3539 | 3788 | double s = v.s; |
---|
3540 | 3789 | |
---|
.. | .. |
---|
3622 | 3871 | |
---|
3623 | 3872 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3624 | 3873 | |
---|
3625 | | - boolean random = CameraPane.RANDOM; |
---|
3626 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3874 | + boolean random = CameraPane.SWITCH; |
---|
| 3875 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3627 | 3876 | lowres.linkVerticesThis(null); |
---|
3628 | 3877 | lowres.linkVerticesThis(sn); |
---|
3629 | | - CameraPane.RANDOM = random; |
---|
| 3878 | + CameraPane.SWITCH = random; |
---|
3630 | 3879 | |
---|
3631 | 3880 | System.err.flush(); |
---|
3632 | 3881 | |
---|
.. | .. |
---|
3666 | 3915 | return; |
---|
3667 | 3916 | |
---|
3668 | 3917 | Object3D poses = group.selection.get(0); |
---|
3669 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 3918 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3670 | 3919 | |
---|
3671 | 3920 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3672 | 3921 | |
---|
.. | .. |
---|
3860 | 4109 | |
---|
3861 | 4110 | void ClipMesh() |
---|
3862 | 4111 | { |
---|
3863 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4112 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3864 | 4113 | { |
---|
3865 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4114 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3866 | 4115 | |
---|
3867 | 4116 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3868 | 4117 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3871 | 4120 | // { |
---|
3872 | 4121 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3873 | 4122 | // } |
---|
3874 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4123 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3875 | 4124 | } |
---|
3876 | 4125 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3877 | 4126 | System.out.println("DONE."); |
---|
.. | .. |
---|
3918 | 4167 | void MarkLeaves(boolean hide) |
---|
3919 | 4168 | { |
---|
3920 | 4169 | group.selection.MarkLeaves(hide); |
---|
| 4170 | + refreshContents(); |
---|
| 4171 | + } |
---|
| 4172 | + |
---|
| 4173 | + void RewindLeaves(boolean hide) |
---|
| 4174 | + { |
---|
| 4175 | + group.selection.RewindLeaves(hide); |
---|
| 4176 | + refreshContents(); |
---|
| 4177 | + } |
---|
| 4178 | + |
---|
| 4179 | + void RandomLeaves(boolean hide) |
---|
| 4180 | + { |
---|
| 4181 | + group.selection.RandomLeaves(hide); |
---|
3921 | 4182 | refreshContents(); |
---|
3922 | 4183 | } |
---|
3923 | 4184 | |
---|
.. | .. |
---|
4006 | 4267 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4007 | 4268 | |
---|
4008 | 4269 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4009 | | - if(elem != group) |
---|
| 4270 | + if(elem != group || !newWindow) |
---|
4010 | 4271 | { |
---|
4011 | 4272 | // if (!(elem instanceof Composite)) |
---|
4012 | 4273 | // newWindow = false; |
---|
.. | .. |
---|
4096 | 4357 | //case 702: // Event.LIST_DESELECT |
---|
4097 | 4358 | group.deselectAll(); |
---|
4098 | 4359 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4099 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4100 | 4360 | if (tps != null) |
---|
4101 | 4361 | { |
---|
4102 | 4362 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4105 | 4365 | |
---|
4106 | 4366 | //if (child.parent != null) |
---|
4107 | 4367 | //child.parent.addSelectee(child); |
---|
| 4368 | + objEditor.SetMaterial(child); |
---|
4108 | 4369 | group.addSelectee(child); |
---|
4109 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4110 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4111 | | - System.err.println("info : " + child.GetPath()); |
---|
4112 | 4370 | } |
---|
4113 | 4371 | } |
---|
4114 | 4372 | // else |
---|
.. | .. |
---|
4118 | 4376 | // System.err.println("info : " + group.GetPath()); |
---|
4119 | 4377 | // } |
---|
4120 | 4378 | |
---|
4121 | | - objEditor.SetText(); // jan 2014 |
---|
4122 | | - |
---|
4123 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4379 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4124 | 4380 | CameraPane.flash = true; |
---|
4125 | 4381 | |
---|
4126 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4382 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4127 | 4383 | // a camera |
---|
4128 | 4384 | { |
---|
4129 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4130 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4385 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4386 | + { |
---|
| 4387 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4388 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4389 | + } |
---|
4131 | 4390 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4132 | 4391 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4133 | 4392 | } |
---|
.. | .. |
---|
4140 | 4399 | |
---|
4141 | 4400 | freezemodel = false; |
---|
4142 | 4401 | } |
---|
| 4402 | + |
---|
| 4403 | + void refreshContents(boolean cp) |
---|
| 4404 | + { |
---|
| 4405 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4406 | + { |
---|
| 4407 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4408 | + |
---|
| 4409 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4410 | + { |
---|
| 4411 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4412 | + |
---|
| 4413 | + objEditor.AddInfo(child, this, true); |
---|
| 4414 | + System.err.println("info : " + child.GetPath()); |
---|
| 4415 | + } |
---|
| 4416 | + |
---|
| 4417 | + objEditor.SetText(); // jan 2014 |
---|
| 4418 | + } |
---|
| 4419 | + |
---|
| 4420 | + super.refreshContents(cp); |
---|
| 4421 | + } |
---|
4143 | 4422 | |
---|
4144 | 4423 | void linkSomething(Object3D thing) |
---|
4145 | 4424 | { |
---|
.. | .. |
---|
4211 | 4490 | { |
---|
4212 | 4491 | if (group.selection.isEmpty()) |
---|
4213 | 4492 | return; |
---|
4214 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4493 | + |
---|
| 4494 | + Grafreed.clipboardIsTempGroup = false; |
---|
4215 | 4495 | Composite tGroup = null; |
---|
4216 | 4496 | if (group.selection.size() > 0) // 1) |
---|
4217 | 4497 | { |
---|
4218 | 4498 | tGroup = new cGroup(); |
---|
4219 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4499 | + Grafreed.clipboardIsTempGroup = true; |
---|
4220 | 4500 | } |
---|
4221 | 4501 | |
---|
4222 | 4502 | if (cut) |
---|
4223 | 4503 | { |
---|
| 4504 | + Save(); |
---|
4224 | 4505 | //int indices[] = jList.getSelectedIndices(); |
---|
4225 | 4506 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4226 | 4507 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4256 | 4537 | //System.out.println("cut " + child); |
---|
4257 | 4538 | //System.out.println("parent = " + child.parent); |
---|
4258 | 4539 | // tmp.addChild(child); |
---|
4259 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4540 | + if (Grafreed.clipboardIsTempGroup) |
---|
4260 | 4541 | tGroup.add/*Child*/(tmp); |
---|
4261 | 4542 | else |
---|
4262 | | - GrafreeD.clipboard = tmp; |
---|
| 4543 | + Grafreed.clipboard = tmp; |
---|
4263 | 4544 | } |
---|
4264 | 4545 | else |
---|
4265 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4546 | + if (Grafreed.clipboardIsTempGroup) |
---|
4266 | 4547 | tGroup.add/*Child*/(child); |
---|
4267 | 4548 | else |
---|
4268 | | - GrafreeD.clipboard = child; |
---|
| 4549 | + Grafreed.clipboard = child; |
---|
4269 | 4550 | } |
---|
4270 | 4551 | |
---|
4271 | 4552 | //ResetModel(); |
---|
.. | .. |
---|
4297 | 4578 | //System.out.println("cut " + elem); |
---|
4298 | 4579 | //System.out.println("parent = " + elem.parent); |
---|
4299 | 4580 | // tmp.addChild(elem); |
---|
4300 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4581 | + if (Grafreed.clipboardIsTempGroup) |
---|
4301 | 4582 | tGroup.add/*Child*/(tmp); |
---|
4302 | 4583 | else |
---|
4303 | | - GrafreeD.clipboard = tmp; |
---|
| 4584 | + Grafreed.clipboard = tmp; |
---|
4304 | 4585 | } |
---|
4305 | 4586 | else |
---|
4306 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4587 | + if (Grafreed.clipboardIsTempGroup) |
---|
4307 | 4588 | tGroup.add/*Child*/(child); |
---|
4308 | 4589 | else |
---|
4309 | | - GrafreeD.clipboard = child; |
---|
| 4590 | + Grafreed.clipboard = child; |
---|
4310 | 4591 | } |
---|
4311 | 4592 | |
---|
4312 | 4593 | } |
---|
4313 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4314 | | - GrafreeD.clipboard = tGroup; |
---|
| 4594 | + |
---|
| 4595 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4596 | + Grafreed.clipboard = tGroup; |
---|
| 4597 | + |
---|
4315 | 4598 | if (cut) |
---|
4316 | 4599 | { |
---|
4317 | 4600 | ResetModel(); |
---|
.. | .. |
---|
4325 | 4608 | // return; |
---|
4326 | 4609 | boolean first = true; |
---|
4327 | 4610 | |
---|
4328 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4611 | + if (Grafreed.clipboardIsTempGroup) |
---|
4329 | 4612 | { |
---|
4330 | 4613 | Composite temp; |
---|
4331 | 4614 | |
---|
.. | .. |
---|
4336 | 4619 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4337 | 4620 | */ |
---|
4338 | 4621 | Object3D elem; |
---|
4339 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4622 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4340 | 4623 | { |
---|
4341 | 4624 | Object3D child = (Object3D)e.nextElement(); |
---|
4342 | 4625 | |
---|
.. | .. |
---|
4370 | 4653 | //Object3D cb = Applet3D.clipboard; |
---|
4371 | 4654 | //temp.addChild(cb); |
---|
4372 | 4655 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4373 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4374 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4375 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4376 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4377 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4656 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4657 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4658 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4659 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4660 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4378 | 4661 | else |
---|
4379 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4380 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4662 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4663 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4381 | 4664 | } |
---|
4382 | 4665 | |
---|
4383 | 4666 | ResetModel(); |
---|
4384 | 4667 | refreshContents(); |
---|
4385 | 4668 | } |
---|
4386 | 4669 | |
---|
4387 | | - void pasteInto(boolean copyit) |
---|
| 4670 | + void pasteInto(boolean copyit, boolean clone) |
---|
4388 | 4671 | { |
---|
4389 | 4672 | // if (GrafreeD.clipboard == null) |
---|
4390 | 4673 | // return; |
---|
.. | .. |
---|
4413 | 4696 | if (copyit) |
---|
4414 | 4697 | { |
---|
4415 | 4698 | // paste(false); |
---|
4416 | | - CloneClipboard(false); // sept 2014 |
---|
| 4699 | + if (clone) |
---|
| 4700 | + { |
---|
| 4701 | + CloneClipboard(false); // sept 2014 |
---|
| 4702 | + } |
---|
| 4703 | + else |
---|
| 4704 | + { |
---|
| 4705 | + paste(false); |
---|
| 4706 | + } |
---|
4417 | 4707 | } |
---|
4418 | 4708 | else |
---|
4419 | 4709 | { |
---|
4420 | 4710 | boolean first = true; |
---|
4421 | 4711 | |
---|
4422 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4712 | + if (Grafreed.clipboardIsTempGroup) |
---|
4423 | 4713 | { |
---|
4424 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4714 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4425 | 4715 | Object3D copy; |
---|
4426 | 4716 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4427 | 4717 | { |
---|
.. | .. |
---|
4431 | 4721 | } |
---|
4432 | 4722 | } else |
---|
4433 | 4723 | { |
---|
4434 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4724 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4435 | 4725 | } |
---|
4436 | 4726 | } |
---|
4437 | 4727 | } |
---|
.. | .. |
---|
4836 | 5126 | } |
---|
4837 | 5127 | */ |
---|
4838 | 5128 | |
---|
4839 | | - void ImportGFD() |
---|
4840 | | - { |
---|
4841 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4842 | | - browser.show(); |
---|
4843 | | - String filename = browser.getFile(); |
---|
4844 | | - if (filename != null && filename.length() > 0) |
---|
4845 | | - { |
---|
4846 | | - String fullname = browser.getDirectory() + filename; |
---|
4847 | | - |
---|
4848 | | - //Object3D readobj = |
---|
4849 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4850 | | - //makeSomething(readobj); |
---|
4851 | | - } |
---|
4852 | | - } |
---|
4853 | | - |
---|
4854 | 5129 | /* |
---|
4855 | 5130 | public void Callback(Object obj) |
---|
4856 | 5131 | { |
---|
.. | .. |
---|
4874 | 5149 | } |
---|
4875 | 5150 | */ |
---|
4876 | 5151 | |
---|
4877 | | - void ImportVRMLX3D() |
---|
4878 | | - { |
---|
4879 | | - if (GrafreeD.standAlone) |
---|
4880 | | - { |
---|
4881 | | - /**/ |
---|
4882 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4883 | | - browser.show(); |
---|
4884 | | - String filename = browser.getFile(); |
---|
4885 | | - if (filename != null && filename.length() > 0) |
---|
4886 | | - { |
---|
4887 | | - String fullname = browser.getDirectory() + filename; |
---|
4888 | | - LoadVRMLX3D(fullname); |
---|
4889 | | - } |
---|
4890 | | - /**/ |
---|
4891 | | - } |
---|
4892 | | - } |
---|
4893 | | - |
---|
4894 | 5152 | String GetFile(String dialogName) |
---|
4895 | 5153 | { |
---|
4896 | | - if (GrafreeD.standAlone) |
---|
| 5154 | + if (Grafreed.standAlone) |
---|
4897 | 5155 | { |
---|
4898 | 5156 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4899 | 5157 | browser.show(); |
---|
.. | .. |
---|
4957 | 5215 | cButton flashSelectionButton; |
---|
4958 | 5216 | cButton editButton; |
---|
4959 | 5217 | cButton uneditButton; |
---|
| 5218 | + JCheckBox allParamsButton; |
---|
4960 | 5219 | cButton clearpanelButton; |
---|
4961 | | - cButton allParamsButton; |
---|
4962 | 5220 | cButton unselectButton; |
---|
4963 | 5221 | |
---|
| 5222 | + cButton saveButton; |
---|
| 5223 | + cButton undoButton; |
---|
| 5224 | + cButton redoButton; |
---|
| 5225 | + cButton oneStepButton; |
---|
| 5226 | + |
---|
4964 | 5227 | cButton screenfitButton; |
---|
4965 | 5228 | cButton screenfitpointButton; |
---|
4966 | 5229 | cButton snapobjectButton; |
---|
.. | .. |
---|
4991 | 5254 | private MenuItem lookFromItem; |
---|
4992 | 5255 | private MenuItem switchItem; |
---|
4993 | 5256 | private MenuItem cutItem; |
---|
| 5257 | + private MenuItem undoItem; |
---|
| 5258 | + private MenuItem redoItem; |
---|
4994 | 5259 | private MenuItem duplicateItem; |
---|
4995 | 5260 | private MenuItem cloneItem; |
---|
4996 | 5261 | private MenuItem cloneSupportItem; |
---|
.. | .. |
---|
5004 | 5269 | private MenuItem linkverticesItem; |
---|
5005 | 5270 | private MenuItem relinkverticesItem; |
---|
5006 | 5271 | private MenuItem setMasterItem; |
---|
5007 | | - private MenuItem resetMeshItem; |
---|
| 5272 | + private MenuItem resetAllItem; |
---|
5008 | 5273 | private MenuItem stepAllItem; |
---|
5009 | 5274 | private MenuItem revertMeshItem; |
---|
5010 | 5275 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5015 | 5280 | private MenuItem mergeGeometriesItem; |
---|
5016 | 5281 | private MenuItem copyItem; |
---|
5017 | 5282 | private MenuItem pasteItem; |
---|
| 5283 | + private MenuItem pasteIntoItem; |
---|
5018 | 5284 | private MenuItem pasteLinkItem; |
---|
5019 | 5285 | private MenuItem pasteCloneItem; |
---|
5020 | 5286 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5053 | 5319 | private MenuItem showleavesItem; |
---|
5054 | 5320 | private MenuItem markleavesItem; |
---|
5055 | 5321 | private MenuItem unmarkleavesItem; |
---|
| 5322 | + private MenuItem rewindleavesItem; |
---|
| 5323 | + private MenuItem unrewindleavesItem; |
---|
| 5324 | + private MenuItem randomleavesItem; |
---|
| 5325 | + private MenuItem unrandomleavesItem; |
---|
5056 | 5326 | |
---|
5057 | 5327 | private MenuItem flipVItem; |
---|
5058 | 5328 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5064 | 5334 | private MenuItem panoTexturesItem; |
---|
5065 | 5335 | |
---|
5066 | 5336 | private MenuItem resetCentroidItem; |
---|
5067 | | - private MenuItem transformgeometryItem; |
---|
| 5337 | + private MenuItem resetCentroidXZItem; |
---|
5068 | 5338 | private MenuItem resetTransformItem; |
---|
| 5339 | + private MenuItem transformGeometryItem; |
---|
| 5340 | + private MenuItem transformChildrenItem; |
---|
5069 | 5341 | private MenuItem hideItem; |
---|
5070 | 5342 | private MenuItem grabItem; |
---|
5071 | 5343 | private MenuItem backItem; |
---|
.. | .. |
---|
5112 | 5384 | private MenuItem blobItem; |
---|
5113 | 5385 | private MenuItem latheItem; |
---|
5114 | 5386 | private MenuItem bezierItem; |
---|
5115 | | - private MenuItem checkerItem; |
---|
| 5387 | + private MenuItem overlayItem; |
---|
5116 | 5388 | private MenuItem meshItem; |
---|
5117 | 5389 | // private MenuItem meshGroupItem; |
---|
5118 | 5390 | private MenuItem springItem; |
---|
.. | .. |
---|
5134 | 5406 | private MenuItem doubleItem; |
---|
5135 | 5407 | private MenuItem tripleItem; |
---|
5136 | 5408 | |
---|
5137 | | - private MenuItem importGFDItem; |
---|
5138 | | - private MenuItem importVRMLX3DItem; |
---|
5139 | | - private MenuItem import3DSItem; |
---|
5140 | | - private MenuItem importOBJItem; |
---|
5141 | | - |
---|
5142 | 5409 | private MenuItem computeAOItem; |
---|
5143 | 5410 | private MenuItem recompileItem; |
---|
5144 | 5411 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5148 | 5415 | private MenuItem analyzeItem; |
---|
5149 | 5416 | private MenuItem dumpItem; |
---|
5150 | 5417 | //boolean freezemodel = false; |
---|
| 5418 | + |
---|
| 5419 | + Menu cameraMenu; |
---|
| 5420 | + MenuItem editCameraItem; |
---|
| 5421 | + MenuItem revertCameraItem; |
---|
5151 | 5422 | } |
---|