.. | .. |
---|
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(Globals.DEBUG); |
---|
| 250 | + |
---|
| 251 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 252 | + toggleFrustumItem.addItemListener(this); |
---|
| 253 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 254 | + |
---|
| 255 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 256 | + toggleFootContactItem.addItemListener(this); |
---|
| 257 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 258 | + |
---|
| 259 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 260 | + toggleTimelineItem.addItemListener(this); |
---|
| 261 | + } |
---|
| 262 | + |
---|
| 263 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 264 | +// toggleRootItem.addItemListener(this); |
---|
| 265 | +// toggleRootItem.setState(false); |
---|
| 266 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 267 | +// animationItem.addItemListener(this); |
---|
| 268 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 269 | + cameraMenu.add("-"); |
---|
| 270 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 271 | + editCameraItem.addActionListener(this); |
---|
| 272 | + |
---|
| 273 | + if (Globals.ADVANCED) |
---|
| 274 | + { |
---|
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); |
---|
.. | .. |
---|
245 | 346 | switchGeoItem.addActionListener(this); |
---|
246 | 347 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
247 | 348 | switchTransfoItem.addActionListener(this); |
---|
| 349 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
| 350 | + morphItem.addActionListener(this); |
---|
| 351 | + |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
| 354 | + menu.add("-"); |
---|
248 | 355 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
249 | 356 | physicsItem.addActionListener(this); |
---|
250 | 357 | frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
251 | 358 | frameselectorItem.addActionListener(this); |
---|
252 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
253 | | - morphItem.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 | } |
---|
406 | 535 | |
---|
407 | 536 | void SetupUI2(ObjEditor oe) |
---|
408 | 537 | { |
---|
| 538 | + // June 2019 |
---|
| 539 | + if (oe == null) |
---|
| 540 | + { |
---|
| 541 | + //super.SetupUI2(this); |
---|
| 542 | + //return; |
---|
| 543 | + } |
---|
| 544 | + |
---|
| 545 | + if (copy != group) |
---|
| 546 | + { |
---|
| 547 | + //super.SetupUI2(this); |
---|
| 548 | + } |
---|
| 549 | + |
---|
409 | 550 | //new Exception().printStackTrace(); |
---|
410 | 551 | |
---|
411 | 552 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
436 | 577 | */ |
---|
437 | 578 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
438 | 579 | |
---|
| 580 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 581 | + //minButton.setToolTipText("Minimize window"); |
---|
| 582 | + //minButton.addActionListener(this); |
---|
| 583 | + |
---|
| 584 | + oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 585 | + maxButton.setToolTipText("Maximize window"); |
---|
| 586 | + maxButton.addActionListener(this); |
---|
| 587 | + |
---|
| 588 | + oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 589 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 590 | + fullButton.addActionListener(this); |
---|
| 591 | + |
---|
| 592 | + oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 593 | + undoButton.setToolTipText("Undo changes"); |
---|
| 594 | + undoButton.addActionListener(this); |
---|
| 595 | + |
---|
| 596 | + oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + redoButton.setToolTipText("Redo changes"); |
---|
| 598 | + redoButton.addActionListener(this); |
---|
| 599 | + |
---|
| 600 | + oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 601 | + saveButton.setToolTipText("Save changes"); |
---|
| 602 | + saveButton.addActionListener(this); |
---|
| 603 | + |
---|
439 | 604 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
440 | | - liveCB.setToolTipText("Enabled animation"); |
---|
| 605 | + liveCB.setToolTipText("Enable animation"); |
---|
441 | 606 | liveCB.addItemListener(this); |
---|
442 | 607 | |
---|
| 608 | + oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 609 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 610 | + oneStepButton.addActionListener(this); |
---|
| 611 | + |
---|
443 | 612 | oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
444 | 613 | fastCB.setToolTipText("Fast mode"); |
---|
445 | 614 | fastCB.addItemListener(this); |
---|
446 | 615 | |
---|
447 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 616 | + oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
448 | 617 | trackCB.setToolTipText("Enable tracking"); |
---|
449 | 618 | trackCB.addItemListener(this); |
---|
450 | 619 | |
---|
451 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 620 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
452 | 621 | screenfitButton.setToolTipText("Screen fit"); |
---|
453 | 622 | screenfitButton.addActionListener(this); |
---|
454 | 623 | |
---|
.. | .. |
---|
457 | 626 | |
---|
458 | 627 | if (Globals.ADVANCED) |
---|
459 | 628 | { |
---|
460 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 629 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
461 | 630 | snapobjectButton.addActionListener(this); |
---|
462 | 631 | snapobjectButton.setToolTipText("Snap Object"); |
---|
463 | 632 | } |
---|
464 | 633 | |
---|
465 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 634 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
466 | 635 | flashSelectionButton.setToolTipText("Show selection"); |
---|
467 | 636 | flashSelectionButton.addActionListener(this); |
---|
468 | 637 | |
---|
469 | 638 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
470 | 639 | |
---|
471 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 640 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
472 | 641 | twoButton.setToolTipText("Show center view only"); |
---|
473 | 642 | twoButton.addActionListener(this); |
---|
474 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 643 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
475 | 644 | fourButton.addActionListener(this); |
---|
476 | 645 | fourButton.setToolTipText("Show left panel only"); |
---|
477 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 646 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
478 | 647 | sixButton.setToolTipText("2-column layout left"); |
---|
479 | 648 | sixButton.addActionListener(this); |
---|
480 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 649 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
481 | 650 | threeButton.setToolTipText("2-column layout right"); |
---|
482 | 651 | threeButton.addActionListener(this); |
---|
483 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 652 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
484 | 653 | sevenButton.setToolTipText("3-column layout"); |
---|
485 | 654 | sevenButton.addActionListener(this); |
---|
486 | 655 | // |
---|
487 | 656 | |
---|
488 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 657 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
489 | 658 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
490 | 659 | rootButton.addActionListener(this); |
---|
491 | 660 | |
---|
492 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 661 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
493 | 662 | closeButton.setToolTipText("Close tab"); |
---|
494 | 663 | closeButton.addActionListener(this); |
---|
495 | 664 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
497 | 666 | |
---|
498 | 667 | cGridBag commandsPanel = new cGridBag(); |
---|
499 | 668 | |
---|
500 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 669 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
501 | 670 | editButton.setToolTipText("Edit selection"); |
---|
502 | 671 | editButton.addActionListener(this); |
---|
503 | 672 | |
---|
504 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 673 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
505 | 674 | uneditButton.setToolTipText("Unedit selection"); |
---|
506 | 675 | uneditButton.addActionListener(this); |
---|
507 | 676 | |
---|
508 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 677 | + commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 678 | + allParamsButton.setToolTipText("Edit all params"); |
---|
| 679 | + allParamsButton.addActionListener(this); |
---|
| 680 | + |
---|
| 681 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
509 | 682 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
510 | 683 | clearPanelButton.addActionListener(this); |
---|
511 | 684 | |
---|
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); |
---|
| 685 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
517 | 686 | unselectButton.setToolTipText("Unselect"); |
---|
518 | 687 | unselectButton.addActionListener(this); |
---|
519 | 688 | |
---|
.. | .. |
---|
588 | 757 | |
---|
589 | 758 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
590 | 759 | { |
---|
| 760 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 761 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 762 | + boxCB.addItemListener(this); |
---|
| 763 | + |
---|
| 764 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 765 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 766 | + zoomBoxCB.addItemListener(this); |
---|
| 767 | + |
---|
| 768 | + if (true) // Globals.ADVANCED) |
---|
| 769 | + { |
---|
591 | 770 | panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
592 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
| 771 | + supportCB.setToolTipText("Enable rigging"); |
---|
593 | 772 | supportCB.addItemListener(this); |
---|
594 | 773 | |
---|
595 | 774 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
.. | .. |
---|
607 | 786 | slowCB.setToolTipText("Smooth interpolation"); |
---|
608 | 787 | slowCB.addItemListener(this); |
---|
609 | 788 | |
---|
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 | 789 | // constraints.gridy += 1; |
---|
619 | 790 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
620 | 791 | // speakerMocapCB.addItemListener(this); |
---|
.. | .. |
---|
645 | 816 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
646 | 817 | lookAtCB.setToolTipText("Look-at target"); |
---|
647 | 818 | lookAtCB.addItemListener(this); |
---|
| 819 | + |
---|
| 820 | + } |
---|
648 | 821 | |
---|
649 | 822 | cGridBag fill = new cGridBag(); |
---|
650 | 823 | |
---|
.. | .. |
---|
665 | 838 | buttonGroup.add(radioButton); |
---|
666 | 839 | radioButton.doClick(); |
---|
667 | 840 | } |
---|
| 841 | + |
---|
668 | 842 | void SetupViews(ObjEditor oe) |
---|
669 | 843 | { |
---|
| 844 | + theFrame = this; |
---|
| 845 | + |
---|
670 | 846 | oe.SetupViews(); |
---|
671 | 847 | |
---|
672 | 848 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
729 | 905 | } else if(e.getSource() == liveCB) |
---|
730 | 906 | { |
---|
731 | 907 | cameraView.ToggleLive(); |
---|
| 908 | + refreshContents(false); |
---|
732 | 909 | } |
---|
733 | 910 | else if(e.getSource() == supportCB) |
---|
734 | 911 | { |
---|
.. | .. |
---|
881 | 1058 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
882 | 1059 | // return; |
---|
883 | 1060 | // } |
---|
884 | | - if (string.charAt(0) == '/') |
---|
| 1061 | + |
---|
| 1062 | + // File path for Mac and Windows |
---|
| 1063 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
885 | 1064 | { |
---|
886 | 1065 | // file(s) |
---|
887 | 1066 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
908 | 1087 | |
---|
909 | 1088 | flashIt = false; |
---|
910 | 1089 | CameraPane pane = (CameraPane) target; |
---|
911 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1090 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
912 | 1091 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
913 | 1092 | |
---|
914 | 1093 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
935 | 1114 | { |
---|
936 | 1115 | loadClipboard(true); |
---|
937 | 1116 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
938 | | - pasteInto(false); |
---|
| 1117 | + pasteInto(false, false); |
---|
939 | 1118 | } else { |
---|
940 | 1119 | loadClipboard(false); |
---|
941 | 1120 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
942 | | - pasteInto(false); // true); // ??? |
---|
| 1121 | + pasteInto(false, false); // true); // ??? |
---|
943 | 1122 | } |
---|
944 | 1123 | } |
---|
945 | 1124 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
.. | .. |
---|
1061 | 1240 | kleinItem.addActionListener(this); |
---|
1062 | 1241 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1063 | 1242 | particleItem.addActionListener(this); |
---|
| 1243 | + if (Globals.ADVANCED) |
---|
| 1244 | + { |
---|
1064 | 1245 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1065 | 1246 | ragdollItem.addActionListener(this); |
---|
1066 | 1247 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1067 | 1248 | ragdoll2Item.addActionListener(this); |
---|
| 1249 | + } |
---|
1068 | 1250 | menu.add("-"); |
---|
1069 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1251 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1070 | 1252 | meshItem.addActionListener(this); |
---|
1071 | 1253 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1072 | 1254 | // meshGroupItem.addActionListener(this); |
---|
| 1255 | + if (Globals.ADVANCED) |
---|
| 1256 | + { |
---|
1073 | 1257 | springItem = menu.add(new MenuItem("Spring")); |
---|
1074 | 1258 | springItem.addActionListener(this); |
---|
1075 | 1259 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1076 | 1260 | 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 | 1261 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1082 | 1262 | blobItem.addActionListener(this); |
---|
1083 | 1263 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1084 | 1264 | latheItem.addActionListener(this); |
---|
| 1265 | + } |
---|
| 1266 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1267 | + bezierItem.addActionListener(this); |
---|
| 1268 | + overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1269 | + overlayItem.addActionListener(this); |
---|
1085 | 1270 | lightItem = menu.add(new MenuItem("Light")); |
---|
1086 | 1271 | lightItem.addActionListener(this); |
---|
1087 | 1272 | menu.add("-"); |
---|
.. | .. |
---|
1091 | 1276 | loopItem.addActionListener(this); |
---|
1092 | 1277 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1093 | 1278 | doubleItem.addActionListener(this); |
---|
| 1279 | + if (Globals.ADVANCED) |
---|
| 1280 | + { |
---|
1094 | 1281 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1095 | 1282 | tripleItem.addActionListener(this); |
---|
| 1283 | + } |
---|
1096 | 1284 | } |
---|
1097 | 1285 | |
---|
1098 | 1286 | void buildToolsMenu(Menu menu) |
---|
.. | .. |
---|
1106 | 1294 | parseverticesItem.addActionListener(this); |
---|
1107 | 1295 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1108 | 1296 | textureFieldItem.addActionListener(this); |
---|
1109 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1297 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1110 | 1298 | alignItem.addActionListener(this); |
---|
1111 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1112 | | - mirrorItem.addActionListener(this); |
---|
1113 | 1299 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1114 | 1300 | reduceMorphItem.addActionListener(this); |
---|
1115 | 1301 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1116 | 1302 | reduce34MorphItem.addActionListener(this); |
---|
1117 | | - |
---|
| 1303 | + menu.add("-"); |
---|
1118 | 1304 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1119 | 1305 | computeAOItem.addActionListener(this); |
---|
1120 | | - menu.add("-"); |
---|
1121 | 1306 | |
---|
| 1307 | + if (Globals.ADVANCED) |
---|
| 1308 | + { |
---|
| 1309 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1310 | + mirrorItem.addActionListener(this); |
---|
| 1311 | + menu.add("-"); |
---|
1122 | 1312 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1123 | 1313 | memoryItem.addActionListener(this); |
---|
1124 | 1314 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1125 | 1315 | analyzeItem.addActionListener(this); |
---|
1126 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1316 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1127 | 1317 | dumpItem.addActionListener(this); |
---|
1128 | 1318 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1129 | 1319 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1141 | 1331 | menu.add("-"); |
---|
1142 | 1332 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1143 | 1333 | editScriptItem.addActionListener(this); |
---|
| 1334 | + } |
---|
1144 | 1335 | } |
---|
1145 | 1336 | |
---|
1146 | 1337 | void ScreenFit() |
---|
.. | .. |
---|
1469 | 1660 | |
---|
1470 | 1661 | void Overwrite(int mask) |
---|
1471 | 1662 | { |
---|
1472 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1663 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1473 | 1664 | { |
---|
1474 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1665 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1475 | 1666 | |
---|
1476 | 1667 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1477 | 1668 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1642 | 1833 | { |
---|
1643 | 1834 | makeSomething(new BezierSurface()); |
---|
1644 | 1835 | } else |
---|
1645 | | - if (source == checkerItem) |
---|
| 1836 | + if (source == overlayItem) |
---|
1646 | 1837 | { |
---|
1647 | 1838 | /* |
---|
1648 | 1839 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1776 | 1967 | csg.addChild(child); |
---|
1777 | 1968 | child.addChild(csg); |
---|
1778 | 1969 | } 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 | 1970 | if (source == computeAOItem) |
---|
1797 | 1971 | { |
---|
1798 | 1972 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
.. | .. |
---|
1811 | 1985 | if (source == invariantsItem) |
---|
1812 | 1986 | { |
---|
1813 | 1987 | System.out.println("Invariants:"); |
---|
1814 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 1988 | + Grafreed.grafreeD.universe.invariants(); |
---|
1815 | 1989 | } else |
---|
1816 | 1990 | if (source == memoryItem) |
---|
1817 | 1991 | { |
---|
.. | .. |
---|
1829 | 2003 | if (source == dumpItem) |
---|
1830 | 2004 | { |
---|
1831 | 2005 | DumpObject(); |
---|
| 2006 | + } else |
---|
| 2007 | + if (source == minButton) |
---|
| 2008 | + { |
---|
| 2009 | + Minimize(); |
---|
| 2010 | + } else |
---|
| 2011 | + if (source == maxButton) |
---|
| 2012 | + { |
---|
| 2013 | + Maximize(); |
---|
| 2014 | + } else |
---|
| 2015 | + if (source == fullButton) |
---|
| 2016 | + { |
---|
| 2017 | + ToggleFullScreen(); |
---|
| 2018 | + } else |
---|
| 2019 | + if (source == undoButton) |
---|
| 2020 | + { |
---|
| 2021 | + Undo(); |
---|
| 2022 | + } else |
---|
| 2023 | + if (source == redoButton) |
---|
| 2024 | + { |
---|
| 2025 | + Redo(); |
---|
| 2026 | + } else |
---|
| 2027 | + if (source == saveButton) |
---|
| 2028 | + { |
---|
| 2029 | + Save(); |
---|
| 2030 | + } else |
---|
| 2031 | + if (source == oneStepButton) |
---|
| 2032 | + { |
---|
| 2033 | + Globals.ONESTEP = true; |
---|
| 2034 | + cameraView.repaint(); |
---|
1832 | 2035 | } else |
---|
1833 | 2036 | if (source == screenfitButton) |
---|
1834 | 2037 | { |
---|
.. | .. |
---|
1879 | 2082 | { |
---|
1880 | 2083 | loadClipboard(true); |
---|
1881 | 2084 | } else |
---|
| 2085 | + if (source == undoItem) |
---|
| 2086 | + { |
---|
| 2087 | + Undo(); |
---|
| 2088 | + } else |
---|
| 2089 | + if (source == redoItem) |
---|
| 2090 | + { |
---|
| 2091 | + Redo(); |
---|
| 2092 | + } else |
---|
1882 | 2093 | if (source == duplicateItem) |
---|
1883 | 2094 | { |
---|
1884 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2095 | + Object3D keep = Grafreed.clipboard; |
---|
1885 | 2096 | loadClipboard(false); |
---|
1886 | 2097 | paste(false); |
---|
1887 | | - GrafreeD.clipboard = keep; |
---|
| 2098 | + Grafreed.clipboard = keep; |
---|
1888 | 2099 | } else |
---|
1889 | 2100 | if (source == cloneItem) |
---|
1890 | 2101 | { |
---|
.. | .. |
---|
1902 | 2113 | { |
---|
1903 | 2114 | paste(false); |
---|
1904 | 2115 | } else |
---|
| 2116 | + if (source == pasteIntoItem) |
---|
| 2117 | + { |
---|
| 2118 | + pasteInto(true, false); |
---|
| 2119 | + } else |
---|
1905 | 2120 | if (source == pasteLinkItem) |
---|
1906 | 2121 | { |
---|
1907 | | - pasteInto(false); |
---|
| 2122 | + pasteInto(false, false); |
---|
1908 | 2123 | } else |
---|
1909 | 2124 | if (source == pasteCloneItem) |
---|
1910 | 2125 | { |
---|
1911 | | - pasteInto(true); |
---|
| 2126 | + pasteInto(true, true); |
---|
1912 | 2127 | } else |
---|
1913 | 2128 | if (source == pasteExpandItem) |
---|
1914 | 2129 | { |
---|
.. | .. |
---|
2100 | 2315 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2101 | 2316 | // refreshContents(); |
---|
2102 | 2317 | // } |
---|
2103 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2318 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2104 | 2319 | { |
---|
2105 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2320 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2106 | 2321 | |
---|
2107 | 2322 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2108 | 2323 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2110 | 2325 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2111 | 2326 | for (int i=0; i<group.selection.size(); i++) |
---|
2112 | 2327 | { |
---|
2113 | | - boolean random = CameraPane.RANDOM; |
---|
2114 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2328 | + boolean random = CameraPane.SWITCH; |
---|
| 2329 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2115 | 2330 | group.selection.get(i).linkVerticesThis(content); |
---|
2116 | 2331 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2117 | | - CameraPane.RANDOM = random; |
---|
| 2332 | + CameraPane.SWITCH = random; |
---|
2118 | 2333 | } |
---|
2119 | 2334 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2120 | 2335 | refreshContents(); |
---|
.. | .. |
---|
2124 | 2339 | { |
---|
2125 | 2340 | for (int i=0; i<group.selection.size(); i++) |
---|
2126 | 2341 | { |
---|
2127 | | - boolean random = CameraPane.RANDOM; |
---|
2128 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2342 | + boolean random = CameraPane.SWITCH; |
---|
| 2343 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2129 | 2344 | group.selection.get(i).linkVerticesThis(null); |
---|
2130 | | - CameraPane.RANDOM = random; |
---|
| 2345 | + CameraPane.SWITCH = random; |
---|
2131 | 2346 | } |
---|
2132 | 2347 | |
---|
2133 | 2348 | refreshContents(); |
---|
2134 | 2349 | } else |
---|
2135 | 2350 | if (source == relinkverticesItem) |
---|
2136 | 2351 | { |
---|
2137 | | - boolean random = CameraPane.RANDOM; |
---|
2138 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2352 | + boolean random = CameraPane.SWITCH; |
---|
| 2353 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2139 | 2354 | group.selection.RelinkToSupport(); |
---|
2140 | | - CameraPane.RANDOM = random; |
---|
| 2355 | + CameraPane.SWITCH = random; |
---|
2141 | 2356 | |
---|
2142 | 2357 | refreshContents(); |
---|
2143 | 2358 | } else |
---|
.. | .. |
---|
2152 | 2367 | } else |
---|
2153 | 2368 | if (source == setMasterItem) |
---|
2154 | 2369 | { |
---|
2155 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2370 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2156 | 2371 | { |
---|
2157 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2372 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2158 | 2373 | |
---|
2159 | 2374 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2160 | 2375 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2167 | 2382 | { |
---|
2168 | 2383 | if (group.selection.size() == 1) |
---|
2169 | 2384 | { |
---|
2170 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2385 | + if (Grafreed.clipboard.size() == 1) |
---|
2171 | 2386 | { |
---|
2172 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2387 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2173 | 2388 | |
---|
2174 | 2389 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2175 | 2390 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2186 | 2401 | { |
---|
2187 | 2402 | RevertMeshes(); |
---|
2188 | 2403 | } else |
---|
2189 | | - if (source == resetMeshItem) |
---|
| 2404 | + if (source == resetAllItem) |
---|
2190 | 2405 | { |
---|
2191 | 2406 | ResetAll(); |
---|
2192 | 2407 | } else |
---|
.. | .. |
---|
2374 | 2589 | } else |
---|
2375 | 2590 | if (source == genNormalsMESHItem) |
---|
2376 | 2591 | { |
---|
2377 | | - GenNormals(true); // TODO |
---|
| 2592 | + GenNormalsMESH(); |
---|
2378 | 2593 | } else |
---|
2379 | 2594 | if (source == genNormalsORGANItem) |
---|
2380 | 2595 | { |
---|
.. | .. |
---|
2439 | 2654 | if (source == unmarkleavesItem) |
---|
2440 | 2655 | { |
---|
2441 | 2656 | MarkLeaves(false); |
---|
| 2657 | + } else |
---|
| 2658 | + if (source == rewindleavesItem) |
---|
| 2659 | + { |
---|
| 2660 | + RewindLeaves(true); |
---|
| 2661 | + } else |
---|
| 2662 | + if (source == unrewindleavesItem) |
---|
| 2663 | + { |
---|
| 2664 | + RewindLeaves(false); |
---|
| 2665 | + } else |
---|
| 2666 | + if (source == randomleavesItem) |
---|
| 2667 | + { |
---|
| 2668 | + RandomLeaves(true); |
---|
| 2669 | + } else |
---|
| 2670 | + if (source == unrandomleavesItem) |
---|
| 2671 | + { |
---|
| 2672 | + RandomLeaves(false); |
---|
2442 | 2673 | } else |
---|
2443 | 2674 | if (source == flipVItem) |
---|
2444 | 2675 | { |
---|
.. | .. |
---|
2524 | 2755 | { |
---|
2525 | 2756 | SmoothMesh(); |
---|
2526 | 2757 | } else |
---|
2527 | | - if (source == transformgeometryItem) |
---|
| 2758 | + if (source == transformGeometryItem) |
---|
2528 | 2759 | { |
---|
2529 | 2760 | TransformGeometry(); |
---|
| 2761 | + } else |
---|
| 2762 | + if (source == transformChildrenItem) |
---|
| 2763 | + { |
---|
| 2764 | + TransformChildren(); |
---|
2530 | 2765 | } else |
---|
2531 | 2766 | if (source == resetTransformItem) |
---|
2532 | 2767 | { |
---|
.. | .. |
---|
2534 | 2769 | } else |
---|
2535 | 2770 | if (source == resetCentroidItem) |
---|
2536 | 2771 | { |
---|
2537 | | - ResetCentroid(); |
---|
| 2772 | + ResetCentroid(true); |
---|
| 2773 | + } else |
---|
| 2774 | + if (source == resetCentroidXZItem) |
---|
| 2775 | + { |
---|
| 2776 | + ResetCentroid(false); |
---|
2538 | 2777 | } else |
---|
2539 | 2778 | if (source == resetParentItem) |
---|
2540 | 2779 | { |
---|
.. | .. |
---|
2698 | 2937 | bigThree.ClearUI(); |
---|
2699 | 2938 | bigThree.add(centralPanel); |
---|
2700 | 2939 | bigThree.FlushUI(); |
---|
| 2940 | + |
---|
| 2941 | + cameraView.requestFocusInWindow(); |
---|
| 2942 | + |
---|
| 2943 | +// refreshContents(true); |
---|
| 2944 | +// |
---|
| 2945 | +// try |
---|
| 2946 | +// { |
---|
| 2947 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 2948 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 2949 | +// bot.mouseMove(100, 100); |
---|
| 2950 | +// bot.mousePress(mask); |
---|
| 2951 | +// bot.mouseRelease(mask); |
---|
| 2952 | +// } |
---|
| 2953 | +// catch (Exception e) |
---|
| 2954 | +// { |
---|
| 2955 | +// |
---|
| 2956 | +// } |
---|
| 2957 | + |
---|
2701 | 2958 | } else |
---|
2702 | 2959 | if (source == threeButton) |
---|
2703 | 2960 | { |
---|
.. | .. |
---|
2734 | 2991 | bigThree.add(centralPanel); |
---|
2735 | 2992 | bigThree.add(XYZPanel); |
---|
2736 | 2993 | bigThree.FlushUI(); |
---|
| 2994 | + |
---|
| 2995 | + cameraView.requestFocusInWindow(); |
---|
2737 | 2996 | } else |
---|
2738 | 2997 | if (source == fourButton) |
---|
2739 | 2998 | { |
---|
.. | .. |
---|
2769 | 3028 | bigThree.ClearUI(); |
---|
2770 | 3029 | bigThree.add(scenePanel); |
---|
2771 | 3030 | bigThree.FlushUI(); |
---|
| 3031 | + |
---|
| 3032 | + cameraView.requestFocusInWindow(); |
---|
2772 | 3033 | } else |
---|
2773 | 3034 | if (source == sixButton) |
---|
2774 | 3035 | { |
---|
.. | .. |
---|
2805 | 3066 | bigThree.add(scenePanel); |
---|
2806 | 3067 | bigThree.add(centralPanel); |
---|
2807 | 3068 | bigThree.FlushUI(); |
---|
| 3069 | + |
---|
| 3070 | + cameraView.requestFocusInWindow(); |
---|
2808 | 3071 | } else |
---|
2809 | 3072 | if (source == sevenButton) |
---|
2810 | 3073 | { |
---|
.. | .. |
---|
2842 | 3105 | bigThree.add(centralPanel); |
---|
2843 | 3106 | bigThree.add(XYZPanel); |
---|
2844 | 3107 | bigThree.FlushUI(); |
---|
| 3108 | + |
---|
| 3109 | + cameraView.requestFocusInWindow(); |
---|
2845 | 3110 | } else |
---|
2846 | 3111 | if (source == rootButton) |
---|
2847 | 3112 | { |
---|
.. | .. |
---|
2853 | 3118 | EditObject(obj); |
---|
2854 | 3119 | } |
---|
2855 | 3120 | |
---|
| 3121 | + cameraView.requestFocusInWindow(); |
---|
2856 | 3122 | refreshContents(true); |
---|
2857 | 3123 | } else |
---|
2858 | 3124 | if (source == closeButton) |
---|
.. | .. |
---|
2874 | 3140 | break; |
---|
2875 | 3141 | } |
---|
2876 | 3142 | } |
---|
| 3143 | + |
---|
| 3144 | + cameraView.requestFocusInWindow(); |
---|
2877 | 3145 | refreshContents(true); |
---|
2878 | 3146 | } else |
---|
2879 | 3147 | if (source == editItem || source == editButton) |
---|
.. | .. |
---|
2890 | 3158 | child.CloseUI(); |
---|
2891 | 3159 | listUI.remove(child); |
---|
2892 | 3160 | |
---|
2893 | | - child.editWindow = null; // ??????????? |
---|
| 3161 | + //child.editWindow = null; // ??????????? |
---|
2894 | 3162 | } |
---|
2895 | | - objEditor.ctrlPanel.validate(); |
---|
| 3163 | + objEditor.ctrlPanel.FlushUI(); |
---|
2896 | 3164 | //objEditor.jTree.clearSelection(); |
---|
2897 | 3165 | //objEditor.ResetSliders(); |
---|
2898 | 3166 | refreshContents(true); |
---|
.. | .. |
---|
2976 | 3244 | frontView.object = group; |
---|
2977 | 3245 | sideView.object = group; |
---|
2978 | 3246 | } |
---|
2979 | | - group.editWindow = this; |
---|
| 3247 | + |
---|
| 3248 | +// fix "+" issue |
---|
| 3249 | + //group.editWindow = this; |
---|
| 3250 | + |
---|
2980 | 3251 | /* |
---|
2981 | 3252 | currentLayout = radio.layout; |
---|
2982 | 3253 | if (currentLayout == null) |
---|
.. | .. |
---|
2988 | 3259 | //group.parent = null; // ROOT |
---|
2989 | 3260 | //group.attributes = -1; |
---|
2990 | 3261 | ResetModel(); |
---|
| 3262 | + |
---|
| 3263 | + cameraView.requestFocusInWindow(); |
---|
2991 | 3264 | refreshContents(true); |
---|
2992 | | - } |
---|
| 3265 | + } else if (event.getSource() == editCameraItem) |
---|
| 3266 | + { |
---|
| 3267 | + cameraView.ProtectCamera(); |
---|
| 3268 | + cameraView.repaint(); |
---|
| 3269 | + return; |
---|
| 3270 | + } else if (event.getSource() == revertCameraItem) |
---|
| 3271 | + { |
---|
| 3272 | + cameraView.RevertCamera(); |
---|
| 3273 | + cameraView.repaint(); |
---|
| 3274 | + return; |
---|
| 3275 | + // } else if (event.getSource() == textureButton) |
---|
| 3276 | + // { |
---|
| 3277 | + // return; // true; |
---|
| 3278 | + } |
---|
2993 | 3279 | else |
---|
2994 | 3280 | { |
---|
2995 | 3281 | //return super.action(event, arg); |
---|
.. | .. |
---|
2998 | 3284 | } |
---|
2999 | 3285 | |
---|
3000 | 3286 | boolean useclient = false; |
---|
3001 | | - cRadio radio; |
---|
3002 | 3287 | |
---|
3003 | 3288 | void ToggleRoot() |
---|
3004 | 3289 | { |
---|
.. | .. |
---|
3050 | 3335 | refreshContents(); |
---|
3051 | 3336 | } |
---|
3052 | 3337 | |
---|
| 3338 | + void TransformChildren() |
---|
| 3339 | + { |
---|
| 3340 | + Object3D obj; |
---|
| 3341 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3342 | + { |
---|
| 3343 | + obj = (Object3D)e.nextElement(); |
---|
| 3344 | + obj.KeepTextureMatrices(); |
---|
| 3345 | + obj.TransformChildren(); |
---|
| 3346 | + obj.RestoreTextureMatrices(); |
---|
| 3347 | + |
---|
| 3348 | +// if (obj.parent == null) |
---|
| 3349 | +// { |
---|
| 3350 | +// System.out.println("NULL PARENT!"); |
---|
| 3351 | +// new Exception().printStackTrace(); |
---|
| 3352 | +// } |
---|
| 3353 | +// else |
---|
| 3354 | +// TouchTransform(obj); |
---|
| 3355 | +// //obj.parent.Touch(); |
---|
| 3356 | + } |
---|
| 3357 | + |
---|
| 3358 | + refreshContents(); |
---|
| 3359 | + } |
---|
3053 | 3360 | |
---|
3054 | 3361 | void ResetTransform() |
---|
3055 | 3362 | { |
---|
.. | .. |
---|
3162 | 3469 | refreshContents(); |
---|
3163 | 3470 | } |
---|
3164 | 3471 | |
---|
3165 | | - void ResetCentroid() |
---|
| 3472 | + void ResetCentroid(boolean full) |
---|
3166 | 3473 | { |
---|
3167 | 3474 | Object3D obj; |
---|
3168 | 3475 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3177 | 3484 | LA.matIdentity(Object3D.mat); |
---|
3178 | 3485 | obj.getBounds(minima, maxima, false); |
---|
3179 | 3486 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3180 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3487 | + if (full) |
---|
| 3488 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3181 | 3489 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3182 | 3490 | obj.TransformMesh(Object3D.mat); |
---|
| 3491 | + |
---|
3183 | 3492 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3184 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3493 | + if (full) |
---|
| 3494 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3185 | 3495 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3496 | + |
---|
3186 | 3497 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3187 | 3498 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3188 | 3499 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3211 | 3522 | |
---|
3212 | 3523 | int size = obj.MemorySize(); |
---|
3213 | 3524 | |
---|
3214 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3525 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3526 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3215 | 3527 | } |
---|
3216 | 3528 | } |
---|
3217 | 3529 | catch (Exception e) |
---|
.. | .. |
---|
3248 | 3560 | obj = (Object3D)e.nextElement(); |
---|
3249 | 3561 | |
---|
3250 | 3562 | System.out.println("Object is: " + obj); |
---|
3251 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3563 | + Grafreed.AnalyzeObject(obj); |
---|
3252 | 3564 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3253 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3565 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3254 | 3566 | |
---|
3255 | 3567 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3256 | 3568 | } |
---|
.. | .. |
---|
3292 | 3604 | void GenNormals(boolean crease) |
---|
3293 | 3605 | { |
---|
3294 | 3606 | group.GenNormalsS(crease); |
---|
| 3607 | + |
---|
| 3608 | + refreshContents(); |
---|
| 3609 | + } |
---|
| 3610 | + |
---|
| 3611 | + void GenNormalsMESH() |
---|
| 3612 | + { |
---|
| 3613 | + group.GenNormalsMeshS(); |
---|
3295 | 3614 | |
---|
3296 | 3615 | refreshContents(); |
---|
3297 | 3616 | } |
---|
.. | .. |
---|
3464 | 3783 | |
---|
3465 | 3784 | void ParseVertices() |
---|
3466 | 3785 | { |
---|
3467 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3468 | | - GrafreeD.epsequal = true; |
---|
| 3786 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3787 | + Grafreed.epsequal = true; |
---|
3469 | 3788 | |
---|
3470 | 3789 | for (int i=0; i<group.selection.size(); i++) |
---|
3471 | 3790 | { |
---|
.. | .. |
---|
3490 | 3809 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3491 | 3810 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3492 | 3811 | |
---|
3493 | | - g.add(GrafreeD.clipboard); |
---|
| 3812 | + g.add(Grafreed.clipboard); |
---|
3494 | 3813 | |
---|
3495 | 3814 | buffer.add(g); |
---|
3496 | 3815 | } |
---|
.. | .. |
---|
3505 | 3824 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3506 | 3825 | } |
---|
3507 | 3826 | |
---|
3508 | | - GrafreeD.epsequal = epsequal; |
---|
| 3827 | + Grafreed.epsequal = epsequal; |
---|
3509 | 3828 | |
---|
3510 | 3829 | refreshContents(); |
---|
3511 | 3830 | } |
---|
.. | .. |
---|
3523 | 3842 | String pigment = Object3D.GetPigment(tex); |
---|
3524 | 3843 | //String bump = Object3D.GetBump(tex); |
---|
3525 | 3844 | |
---|
3526 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3845 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 3846 | + |
---|
| 3847 | + try |
---|
| 3848 | + { |
---|
| 3849 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3850 | + } |
---|
| 3851 | + catch (Exception e) |
---|
| 3852 | + { |
---|
| 3853 | + System.err.println("FAIL: " + node); |
---|
| 3854 | + } |
---|
3527 | 3855 | |
---|
3528 | 3856 | double s = v.s; |
---|
3529 | 3857 | |
---|
.. | .. |
---|
3611 | 3939 | |
---|
3612 | 3940 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3613 | 3941 | |
---|
3614 | | - boolean random = CameraPane.RANDOM; |
---|
3615 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 3942 | + boolean random = CameraPane.SWITCH; |
---|
| 3943 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3616 | 3944 | lowres.linkVerticesThis(null); |
---|
3617 | 3945 | lowres.linkVerticesThis(sn); |
---|
3618 | | - CameraPane.RANDOM = random; |
---|
| 3946 | + CameraPane.SWITCH = random; |
---|
3619 | 3947 | |
---|
3620 | 3948 | System.err.flush(); |
---|
3621 | 3949 | |
---|
.. | .. |
---|
3655 | 3983 | return; |
---|
3656 | 3984 | |
---|
3657 | 3985 | Object3D poses = group.selection.get(0); |
---|
3658 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 3986 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3659 | 3987 | |
---|
3660 | 3988 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3661 | 3989 | |
---|
.. | .. |
---|
3849 | 4177 | |
---|
3850 | 4178 | void ClipMesh() |
---|
3851 | 4179 | { |
---|
3852 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4180 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3853 | 4181 | { |
---|
3854 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4182 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3855 | 4183 | |
---|
3856 | 4184 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3857 | 4185 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3860 | 4188 | // { |
---|
3861 | 4189 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3862 | 4190 | // } |
---|
3863 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4191 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3864 | 4192 | } |
---|
3865 | 4193 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3866 | 4194 | System.out.println("DONE."); |
---|
.. | .. |
---|
3907 | 4235 | void MarkLeaves(boolean hide) |
---|
3908 | 4236 | { |
---|
3909 | 4237 | group.selection.MarkLeaves(hide); |
---|
| 4238 | + refreshContents(); |
---|
| 4239 | + } |
---|
| 4240 | + |
---|
| 4241 | + void RewindLeaves(boolean hide) |
---|
| 4242 | + { |
---|
| 4243 | + group.selection.RewindLeaves(hide); |
---|
| 4244 | + refreshContents(); |
---|
| 4245 | + } |
---|
| 4246 | + |
---|
| 4247 | + void RandomLeaves(boolean hide) |
---|
| 4248 | + { |
---|
| 4249 | + group.selection.RandomLeaves(hide); |
---|
3910 | 4250 | refreshContents(); |
---|
3911 | 4251 | } |
---|
3912 | 4252 | |
---|
.. | .. |
---|
3995 | 4335 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3996 | 4336 | |
---|
3997 | 4337 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
3998 | | - if(elem != group) |
---|
| 4338 | + if(elem != group || !newWindow) |
---|
3999 | 4339 | { |
---|
4000 | 4340 | // if (!(elem instanceof Composite)) |
---|
4001 | 4341 | // newWindow = false; |
---|
.. | .. |
---|
4085 | 4425 | //case 702: // Event.LIST_DESELECT |
---|
4086 | 4426 | group.deselectAll(); |
---|
4087 | 4427 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4088 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4089 | 4428 | if (tps != null) |
---|
4090 | 4429 | { |
---|
4091 | 4430 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4094 | 4433 | |
---|
4095 | 4434 | //if (child.parent != null) |
---|
4096 | 4435 | //child.parent.addSelectee(child); |
---|
| 4436 | + objEditor.SetMaterial(child); |
---|
4097 | 4437 | group.addSelectee(child); |
---|
4098 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4099 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4100 | | - System.err.println("info : " + child.GetPath()); |
---|
4101 | 4438 | } |
---|
4102 | 4439 | } |
---|
4103 | 4440 | // else |
---|
.. | .. |
---|
4107 | 4444 | // System.err.println("info : " + group.GetPath()); |
---|
4108 | 4445 | // } |
---|
4109 | 4446 | |
---|
4110 | | - objEditor.SetText(); // jan 2014 |
---|
4111 | | - |
---|
4112 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4447 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4113 | 4448 | CameraPane.flash = true; |
---|
4114 | 4449 | |
---|
4115 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4450 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4116 | 4451 | // a camera |
---|
4117 | 4452 | { |
---|
4118 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4119 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4453 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 4454 | + { |
---|
| 4455 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4456 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4457 | + } |
---|
4120 | 4458 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4121 | 4459 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4122 | 4460 | } |
---|
.. | .. |
---|
4129 | 4467 | |
---|
4130 | 4468 | freezemodel = false; |
---|
4131 | 4469 | } |
---|
| 4470 | + |
---|
| 4471 | + void refreshContents(boolean cp) |
---|
| 4472 | + { |
---|
| 4473 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4474 | + { |
---|
| 4475 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4476 | + |
---|
| 4477 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4478 | + { |
---|
| 4479 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4480 | + |
---|
| 4481 | + objEditor.AddInfo(child, this, true); |
---|
| 4482 | + System.err.println("info : " + child.GetPath()); |
---|
| 4483 | + } |
---|
| 4484 | + |
---|
| 4485 | + objEditor.SetText(); // jan 2014 |
---|
| 4486 | + } |
---|
| 4487 | + |
---|
| 4488 | + super.refreshContents(cp); |
---|
| 4489 | + } |
---|
4132 | 4490 | |
---|
4133 | 4491 | void linkSomething(Object3D thing) |
---|
4134 | 4492 | { |
---|
.. | .. |
---|
4200 | 4558 | { |
---|
4201 | 4559 | if (group.selection.isEmpty()) |
---|
4202 | 4560 | return; |
---|
4203 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4561 | + |
---|
| 4562 | + Grafreed.clipboardIsTempGroup = false; |
---|
4204 | 4563 | Composite tGroup = null; |
---|
4205 | 4564 | if (group.selection.size() > 0) // 1) |
---|
4206 | 4565 | { |
---|
4207 | 4566 | tGroup = new cGroup(); |
---|
4208 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4567 | + Grafreed.clipboardIsTempGroup = true; |
---|
4209 | 4568 | } |
---|
4210 | 4569 | |
---|
4211 | 4570 | if (cut) |
---|
4212 | 4571 | { |
---|
| 4572 | + Save(); |
---|
4213 | 4573 | //int indices[] = jList.getSelectedIndices(); |
---|
4214 | 4574 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4215 | 4575 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4245 | 4605 | //System.out.println("cut " + child); |
---|
4246 | 4606 | //System.out.println("parent = " + child.parent); |
---|
4247 | 4607 | // tmp.addChild(child); |
---|
4248 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4608 | + if (Grafreed.clipboardIsTempGroup) |
---|
4249 | 4609 | tGroup.add/*Child*/(tmp); |
---|
4250 | 4610 | else |
---|
4251 | | - GrafreeD.clipboard = tmp; |
---|
| 4611 | + Grafreed.clipboard = tmp; |
---|
4252 | 4612 | } |
---|
4253 | 4613 | else |
---|
4254 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4614 | + if (Grafreed.clipboardIsTempGroup) |
---|
4255 | 4615 | tGroup.add/*Child*/(child); |
---|
4256 | 4616 | else |
---|
4257 | | - GrafreeD.clipboard = child; |
---|
| 4617 | + Grafreed.clipboard = child; |
---|
4258 | 4618 | } |
---|
4259 | 4619 | |
---|
4260 | 4620 | //ResetModel(); |
---|
.. | .. |
---|
4286 | 4646 | //System.out.println("cut " + elem); |
---|
4287 | 4647 | //System.out.println("parent = " + elem.parent); |
---|
4288 | 4648 | // tmp.addChild(elem); |
---|
4289 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4649 | + if (Grafreed.clipboardIsTempGroup) |
---|
4290 | 4650 | tGroup.add/*Child*/(tmp); |
---|
4291 | 4651 | else |
---|
4292 | | - GrafreeD.clipboard = tmp; |
---|
| 4652 | + Grafreed.clipboard = tmp; |
---|
4293 | 4653 | } |
---|
4294 | 4654 | else |
---|
4295 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4655 | + if (Grafreed.clipboardIsTempGroup) |
---|
4296 | 4656 | tGroup.add/*Child*/(child); |
---|
4297 | 4657 | else |
---|
4298 | | - GrafreeD.clipboard = child; |
---|
| 4658 | + Grafreed.clipboard = child; |
---|
4299 | 4659 | } |
---|
4300 | 4660 | |
---|
4301 | 4661 | } |
---|
4302 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4303 | | - GrafreeD.clipboard = tGroup; |
---|
| 4662 | + |
---|
| 4663 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4664 | + Grafreed.clipboard = tGroup; |
---|
| 4665 | + |
---|
4304 | 4666 | if (cut) |
---|
4305 | 4667 | { |
---|
4306 | 4668 | ResetModel(); |
---|
.. | .. |
---|
4314 | 4676 | // return; |
---|
4315 | 4677 | boolean first = true; |
---|
4316 | 4678 | |
---|
4317 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4679 | + if (Grafreed.clipboardIsTempGroup) |
---|
4318 | 4680 | { |
---|
4319 | 4681 | Composite temp; |
---|
4320 | 4682 | |
---|
.. | .. |
---|
4325 | 4687 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4326 | 4688 | */ |
---|
4327 | 4689 | Object3D elem; |
---|
4328 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4690 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4329 | 4691 | { |
---|
4330 | 4692 | Object3D child = (Object3D)e.nextElement(); |
---|
4331 | 4693 | |
---|
.. | .. |
---|
4359 | 4721 | //Object3D cb = Applet3D.clipboard; |
---|
4360 | 4722 | //temp.addChild(cb); |
---|
4361 | 4723 | //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()); |
---|
| 4724 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4725 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4726 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4727 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4728 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4367 | 4729 | else |
---|
4368 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4369 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4730 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4731 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4370 | 4732 | } |
---|
4371 | 4733 | |
---|
4372 | 4734 | ResetModel(); |
---|
4373 | 4735 | refreshContents(); |
---|
4374 | 4736 | } |
---|
4375 | 4737 | |
---|
4376 | | - void pasteInto(boolean copyit) |
---|
| 4738 | + void pasteInto(boolean copyit, boolean clone) |
---|
4377 | 4739 | { |
---|
4378 | 4740 | // if (GrafreeD.clipboard == null) |
---|
4379 | 4741 | // return; |
---|
.. | .. |
---|
4402 | 4764 | if (copyit) |
---|
4403 | 4765 | { |
---|
4404 | 4766 | // paste(false); |
---|
4405 | | - CloneClipboard(false); // sept 2014 |
---|
| 4767 | + if (clone) |
---|
| 4768 | + { |
---|
| 4769 | + CloneClipboard(false); // sept 2014 |
---|
| 4770 | + } |
---|
| 4771 | + else |
---|
| 4772 | + { |
---|
| 4773 | + paste(false); |
---|
| 4774 | + } |
---|
4406 | 4775 | } |
---|
4407 | 4776 | else |
---|
4408 | 4777 | { |
---|
4409 | 4778 | boolean first = true; |
---|
4410 | 4779 | |
---|
4411 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4780 | + if (Grafreed.clipboardIsTempGroup) |
---|
4412 | 4781 | { |
---|
4413 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4782 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4414 | 4783 | Object3D copy; |
---|
4415 | 4784 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4416 | 4785 | { |
---|
.. | .. |
---|
4420 | 4789 | } |
---|
4421 | 4790 | } else |
---|
4422 | 4791 | { |
---|
4423 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4792 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4424 | 4793 | } |
---|
4425 | 4794 | } |
---|
4426 | 4795 | } |
---|
.. | .. |
---|
4825 | 5194 | } |
---|
4826 | 5195 | */ |
---|
4827 | 5196 | |
---|
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 | 5197 | /* |
---|
4844 | 5198 | public void Callback(Object obj) |
---|
4845 | 5199 | { |
---|
.. | .. |
---|
4863 | 5217 | } |
---|
4864 | 5218 | */ |
---|
4865 | 5219 | |
---|
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 | 5220 | String GetFile(String dialogName) |
---|
4884 | 5221 | { |
---|
4885 | | - if (GrafreeD.standAlone) |
---|
| 5222 | + if (Grafreed.standAlone) |
---|
4886 | 5223 | { |
---|
4887 | 5224 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4888 | 5225 | browser.show(); |
---|
.. | .. |
---|
4946 | 5283 | cButton flashSelectionButton; |
---|
4947 | 5284 | cButton editButton; |
---|
4948 | 5285 | cButton uneditButton; |
---|
| 5286 | + JCheckBox allParamsButton; |
---|
4949 | 5287 | cButton clearpanelButton; |
---|
4950 | | - cButton allParamsButton; |
---|
4951 | 5288 | cButton unselectButton; |
---|
4952 | 5289 | |
---|
| 5290 | + cButton minButton; |
---|
| 5291 | + cButton maxButton; |
---|
| 5292 | + cButton fullButton; |
---|
| 5293 | + cButton undoButton; |
---|
| 5294 | + cButton redoButton; |
---|
| 5295 | + cButton saveButton; |
---|
| 5296 | + cButton oneStepButton; |
---|
| 5297 | + |
---|
4953 | 5298 | cButton screenfitButton; |
---|
4954 | 5299 | cButton screenfitpointButton; |
---|
4955 | 5300 | cButton snapobjectButton; |
---|
.. | .. |
---|
4960 | 5305 | cButton closeButton; |
---|
4961 | 5306 | |
---|
4962 | 5307 | 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 | 5308 | |
---|
4972 | 5309 | // |
---|
4973 | 5310 | //Composite |
---|
.. | .. |
---|
4980 | 5317 | private MenuItem lookFromItem; |
---|
4981 | 5318 | private MenuItem switchItem; |
---|
4982 | 5319 | private MenuItem cutItem; |
---|
| 5320 | + private MenuItem undoItem; |
---|
| 5321 | + private MenuItem redoItem; |
---|
4983 | 5322 | private MenuItem duplicateItem; |
---|
4984 | 5323 | private MenuItem cloneItem; |
---|
4985 | 5324 | private MenuItem cloneSupportItem; |
---|
.. | .. |
---|
4993 | 5332 | private MenuItem linkverticesItem; |
---|
4994 | 5333 | private MenuItem relinkverticesItem; |
---|
4995 | 5334 | private MenuItem setMasterItem; |
---|
4996 | | - private MenuItem resetMeshItem; |
---|
| 5335 | + private MenuItem resetAllItem; |
---|
4997 | 5336 | private MenuItem stepAllItem; |
---|
4998 | 5337 | private MenuItem revertMeshItem; |
---|
4999 | 5338 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5004 | 5343 | private MenuItem mergeGeometriesItem; |
---|
5005 | 5344 | private MenuItem copyItem; |
---|
5006 | 5345 | private MenuItem pasteItem; |
---|
| 5346 | + private MenuItem pasteIntoItem; |
---|
5007 | 5347 | private MenuItem pasteLinkItem; |
---|
5008 | 5348 | private MenuItem pasteCloneItem; |
---|
5009 | 5349 | private MenuItem pasteExpandItem; |
---|
.. | .. |
---|
5042 | 5382 | private MenuItem showleavesItem; |
---|
5043 | 5383 | private MenuItem markleavesItem; |
---|
5044 | 5384 | private MenuItem unmarkleavesItem; |
---|
| 5385 | + private MenuItem rewindleavesItem; |
---|
| 5386 | + private MenuItem unrewindleavesItem; |
---|
| 5387 | + private MenuItem randomleavesItem; |
---|
| 5388 | + private MenuItem unrandomleavesItem; |
---|
5045 | 5389 | |
---|
5046 | 5390 | private MenuItem flipVItem; |
---|
5047 | 5391 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5053 | 5397 | private MenuItem panoTexturesItem; |
---|
5054 | 5398 | |
---|
5055 | 5399 | private MenuItem resetCentroidItem; |
---|
5056 | | - private MenuItem transformgeometryItem; |
---|
| 5400 | + private MenuItem resetCentroidXZItem; |
---|
5057 | 5401 | private MenuItem resetTransformItem; |
---|
| 5402 | + private MenuItem transformGeometryItem; |
---|
| 5403 | + private MenuItem transformChildrenItem; |
---|
5058 | 5404 | private MenuItem hideItem; |
---|
5059 | 5405 | private MenuItem grabItem; |
---|
5060 | 5406 | private MenuItem backItem; |
---|
.. | .. |
---|
5101 | 5447 | private MenuItem blobItem; |
---|
5102 | 5448 | private MenuItem latheItem; |
---|
5103 | 5449 | private MenuItem bezierItem; |
---|
5104 | | - private MenuItem checkerItem; |
---|
| 5450 | + private MenuItem overlayItem; |
---|
5105 | 5451 | private MenuItem meshItem; |
---|
5106 | 5452 | // private MenuItem meshGroupItem; |
---|
5107 | 5453 | private MenuItem springItem; |
---|
.. | .. |
---|
5123 | 5469 | private MenuItem doubleItem; |
---|
5124 | 5470 | private MenuItem tripleItem; |
---|
5125 | 5471 | |
---|
5126 | | - private MenuItem importGFDItem; |
---|
5127 | | - private MenuItem importVRMLX3DItem; |
---|
5128 | | - private MenuItem import3DSItem; |
---|
5129 | | - private MenuItem importOBJItem; |
---|
5130 | | - |
---|
5131 | 5472 | private MenuItem computeAOItem; |
---|
5132 | 5473 | private MenuItem recompileItem; |
---|
5133 | 5474 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5137 | 5478 | private MenuItem analyzeItem; |
---|
5138 | 5479 | private MenuItem dumpItem; |
---|
5139 | 5480 | //boolean freezemodel = false; |
---|
| 5481 | + |
---|
| 5482 | + Menu cameraMenu; |
---|
| 5483 | + MenuItem editCameraItem; |
---|
| 5484 | + MenuItem revertCameraItem; |
---|
5140 | 5485 | } |
---|