.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
.. | .. |
---|
59 | 60 | this.copy = this.group = group; |
---|
60 | 61 | //selectees = this.group.selectees; |
---|
61 | 62 | |
---|
| 63 | + if (copy.versions == null) |
---|
| 64 | + { |
---|
| 65 | + copy.versions = new byte[100][]; |
---|
| 66 | + copy.versionindex = -1; |
---|
| 67 | + } |
---|
| 68 | + |
---|
62 | 69 | if(ui) |
---|
63 | 70 | SetupUI(objEditor); |
---|
64 | 71 | } |
---|
.. | .. |
---|
73 | 80 | this.copy = this.group = copy; |
---|
74 | 81 | //selectees = this.group.selectees; |
---|
75 | 82 | |
---|
76 | | - SetupMenu2(objEditor); |
---|
| 83 | + SetupMenu2(this); //objEditor); |
---|
77 | 84 | SetupUI2(objEditor); |
---|
78 | 85 | objEditor.SetupUI(true); |
---|
79 | 86 | SetupViews(objEditor); |
---|
80 | 87 | |
---|
81 | 88 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 89 | + |
---|
| 90 | + if (copy.versions == null) |
---|
| 91 | + { |
---|
| 92 | + copy.versions = new byte[100][]; |
---|
| 93 | + copy.versionindex = -1; |
---|
| 94 | + |
---|
| 95 | + Save(true); |
---|
| 96 | + } |
---|
82 | 97 | } |
---|
83 | 98 | |
---|
84 | 99 | void CloneSelection(boolean supports) |
---|
85 | 100 | { |
---|
| 101 | + if (Globals.REPLACEONMAKE) |
---|
| 102 | + Save(); |
---|
| 103 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 104 | + Globals.REPLACEONMAKE = false; |
---|
86 | 105 | // Object3D keep = GrafreeD.clipboard; |
---|
87 | 106 | //Object3D obj; |
---|
88 | 107 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
93 | 112 | |
---|
94 | 113 | makeSomething(clone, i==group.selection.size()-1); |
---|
95 | 114 | } |
---|
| 115 | + Globals.REPLACEONMAKE = keep; |
---|
96 | 116 | } |
---|
97 | 117 | |
---|
98 | 118 | void CloneClipboard(boolean supports) |
---|
99 | 119 | { |
---|
100 | | - assert(GrafreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
102 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
| 120 | + assert(Grafreed.clipboard.parent == null); |
---|
| 121 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 122 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 123 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 124 | + makeSomething(CloneObject(Grafreed.clipboard.get(0), false)); |
---|
105 | 125 | else |
---|
106 | | - makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
107 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 126 | + makeSomething(CloneObject(Grafreed.clipboard, false)); |
---|
| 127 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
108 | 128 | } |
---|
109 | 129 | |
---|
110 | 130 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 138 | // obj.support = null; |
---|
119 | 139 | if (!supports) |
---|
120 | 140 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
| 141 | + Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
122 | 142 | obj.parent = parent; |
---|
123 | 143 | // obj.support = support; |
---|
124 | 144 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
147 | 167 | |
---|
148 | 168 | //JTextField nameField; |
---|
149 | 169 | |
---|
150 | | - void SetupMenu2(ObjEditor oe) |
---|
| 170 | + void SetupMenu2(GroupEditor oe) |
---|
151 | 171 | { |
---|
152 | | - oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
153 | | - //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
154 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
155 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
156 | | - oe.cameraMenu.add("-"); |
---|
157 | | - openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
158 | | - openWindowItem.addActionListener(this); |
---|
159 | | - editLeafItem.addActionListener(this); |
---|
160 | | - lookAtItem.addActionListener(this); |
---|
161 | | - //lookFromItem.addActinoListener(this); |
---|
162 | | - //switchItem.addActionListener(this); |
---|
| 172 | + oe.jTree = new cTree(); |
---|
| 173 | + |
---|
163 | 174 | Menu menu; |
---|
164 | 175 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
165 | 176 | //editItem = menu.add(new MenuItem("Edit")); |
---|
166 | 177 | //editItem.addActionListener(this); |
---|
167 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 178 | + |
---|
| 179 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 180 | +// undoItem.addActionListener(this); |
---|
| 181 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 182 | +// redoItem.addActionListener(this); |
---|
| 183 | +// menu.add("-"); |
---|
| 184 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
168 | 185 | duplicateItem.addActionListener(this); |
---|
169 | | - menu.add("-"); |
---|
170 | 186 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
171 | 187 | cloneItem.addActionListener(this); |
---|
| 188 | + if (Globals.ADVANCED) |
---|
| 189 | + { |
---|
172 | 190 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
173 | 191 | cloneSupportItem.addActionListener(this); |
---|
| 192 | + } |
---|
174 | 193 | menu.add("-"); |
---|
175 | 194 | cutItem = menu.add(new MenuItem("Cut")); |
---|
176 | 195 | cutItem.addActionListener(this); |
---|
.. | .. |
---|
178 | 197 | copyItem.addActionListener(this); |
---|
179 | 198 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
180 | 199 | pasteItem.addActionListener(this); |
---|
| 200 | + |
---|
| 201 | + menu.add("-"); |
---|
| 202 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 203 | + pasteIntoItem.addActionListener(this); |
---|
181 | 204 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
182 | 205 | pasteLinkItem.addActionListener(this); |
---|
183 | 206 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
184 | 207 | pasteCloneItem.addActionListener(this); |
---|
185 | 208 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
186 | 209 | // pasteExpandItem.addActionListener(this); |
---|
187 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
188 | | - clearItem.addActionListener(this); |
---|
| 210 | + menu.add("-"); |
---|
| 211 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 212 | + deleteItem.addActionListener(this); |
---|
| 213 | + |
---|
| 214 | + if (Globals.ADVANCED) |
---|
| 215 | + { |
---|
| 216 | + // Deletes the cameras... |
---|
189 | 217 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 218 | clearAllItem.addActionListener(this); |
---|
| 219 | + } |
---|
| 220 | + |
---|
| 221 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 222 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 223 | + //zBufferItem.addActionListener(this); |
---|
| 224 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 225 | + //normalLensItem.addActionListener(this); |
---|
| 226 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 227 | + restoreCameraItem.addActionListener(this); |
---|
| 228 | + |
---|
| 229 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 230 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 231 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 232 | +// cameraMenu.add("-"); |
---|
| 233 | +// |
---|
| 234 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 235 | +// toggleTextureItem.addItemListener(this); |
---|
| 236 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 237 | +// |
---|
| 238 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 239 | +// toggleSwitchItem.addItemListener(this); |
---|
| 240 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 241 | + |
---|
| 242 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
| 243 | + toggleHandleItem.addItemListener(this); |
---|
| 244 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 245 | + |
---|
| 246 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 247 | + togglePaintItem.addItemListener(this); |
---|
| 248 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 249 | + |
---|
| 250 | + if (Globals.ADVANCED) |
---|
| 251 | + { |
---|
| 252 | + cameraMenu.add("-"); |
---|
| 253 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 254 | + toggleLiveItem.addItemListener(this); |
---|
| 255 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
191 | 256 | |
---|
| 257 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 258 | + stepItem.addActionListener(this); |
---|
| 259 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 260 | + // toggleDLItem.addItemListener(this); |
---|
| 261 | + // toggleDLItem.setState(false); |
---|
| 262 | + |
---|
| 263 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 264 | + toggleRenderItem.addItemListener(this); |
---|
| 265 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 266 | + |
---|
| 267 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 268 | + toggleDebugItem.addItemListener(this); |
---|
| 269 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
| 270 | + |
---|
| 271 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 272 | + toggleFrustumItem.addItemListener(this); |
---|
| 273 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 274 | + |
---|
| 275 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 276 | + toggleFootContactItem.addItemListener(this); |
---|
| 277 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 278 | + |
---|
| 279 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 280 | + toggleTimelineItem.addItemListener(this); |
---|
| 281 | + } |
---|
| 282 | + |
---|
| 283 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 284 | +// toggleRootItem.addItemListener(this); |
---|
| 285 | +// toggleRootItem.setState(false); |
---|
| 286 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 287 | +// animationItem.addItemListener(this); |
---|
| 288 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 289 | + cameraMenu.add("-"); |
---|
| 290 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 291 | + editCameraItem.addActionListener(this); |
---|
| 292 | + |
---|
| 293 | + if (Globals.ADVANCED) |
---|
| 294 | + { |
---|
| 295 | + oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
| 296 | + //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
| 297 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
| 298 | + editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
| 299 | + oe.cameraMenu.add("-"); |
---|
| 300 | + openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
| 301 | + openWindowItem.addActionListener(this); |
---|
| 302 | + editLeafItem.addActionListener(this); |
---|
| 303 | + lookAtItem.addActionListener(this); |
---|
| 304 | + //lookFromItem.addActinoListener(this); |
---|
| 305 | + //switchViewItem.addActionListener(this); |
---|
| 306 | + } |
---|
| 307 | + |
---|
192 | 308 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
193 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
194 | | - resetMeshItem.addActionListener(this); |
---|
195 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
196 | | - stepAllItem.addActionListener(this); |
---|
| 309 | + if (Globals.ADVANCED) |
---|
| 310 | + { |
---|
197 | 311 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
198 | 312 | revertMeshItem.addActionListener(this); |
---|
199 | 313 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
200 | 314 | resetreferencesItem.addActionListener(this); |
---|
201 | 315 | menu.add("-"); |
---|
| 316 | + } |
---|
202 | 317 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
203 | 318 | overwriteGeoItem.addActionListener(this); |
---|
204 | 319 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
210 | 325 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
211 | 326 | overwriteUVItem.addActionListener(this); |
---|
212 | 327 | menu.add("-"); |
---|
| 328 | + if (Globals.ADVANCED) |
---|
| 329 | + { |
---|
213 | 330 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
214 | 331 | generateMeshItem.addActionListener(this); |
---|
215 | 332 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
216 | 333 | poseMeshItem.addActionListener(this); |
---|
217 | 334 | menu.add("-"); |
---|
| 335 | + } |
---|
218 | 336 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
219 | 337 | resetsupportItem.addActionListener(this); |
---|
220 | 338 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 339 | linkverticesItem.addActionListener(this); |
---|
222 | 340 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
223 | 341 | relinkverticesItem.addActionListener(this); |
---|
| 342 | + |
---|
| 343 | + if (Globals.ADVANCED) |
---|
| 344 | + { |
---|
224 | 345 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
225 | 346 | setMasterItem.addActionListener(this); |
---|
| 347 | + } |
---|
226 | 348 | |
---|
227 | 349 | oe.menuBar.add(menu = new Menu("Group")); |
---|
228 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
229 | | - grabItem.addActionListener(this); |
---|
| 350 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 351 | +// grabItem.addActionListener(this); |
---|
230 | 352 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 353 | backItem.addActionListener(this); |
---|
232 | 354 | frontItem = menu.add(new MenuItem("Front")); |
---|
233 | 355 | frontItem.addActionListener(this); |
---|
234 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
235 | | - compositeItem.addActionListener(this); |
---|
236 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 356 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 357 | +// compositeItem.addActionListener(this); |
---|
| 358 | + |
---|
| 359 | + if (Globals.ADVANCED) |
---|
| 360 | + { |
---|
| 361 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
237 | 362 | hideItem.addActionListener(this); |
---|
| 363 | + } |
---|
238 | 364 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
239 | 365 | ungroupItem.addActionListener(this); |
---|
240 | | - menu.add("-"); |
---|
241 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
242 | | - randomItem.addActionListener(this); |
---|
243 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
244 | | - physicsItem.addActionListener(this); |
---|
245 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
246 | | - frameselectorItem.addActionListener(this); |
---|
| 366 | + |
---|
| 367 | +// menu.add("-"); |
---|
| 368 | +// |
---|
| 369 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 370 | +// switchItem.addActionListener(this); |
---|
| 371 | + if (Globals.ADVANCED) |
---|
| 372 | + { |
---|
247 | 373 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
248 | 374 | switchGeoItem.addActionListener(this); |
---|
249 | 375 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
250 | 376 | switchTransfoItem.addActionListener(this); |
---|
251 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 377 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
252 | 378 | morphItem.addActionListener(this); |
---|
| 379 | + |
---|
| 380 | + menu.add("-"); |
---|
| 381 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 382 | + physicsItem.addActionListener(this); |
---|
| 383 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 384 | + frameselectorItem.addActionListener(this); |
---|
253 | 385 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
254 | 386 | scriptNodeItem.addActionListener(this); |
---|
255 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
256 | | - cameraItem.addActionListener(this); |
---|
| 387 | + } |
---|
257 | 388 | |
---|
258 | 389 | oe.menuBar.add(menu = new Menu("Object")); |
---|
259 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
260 | | - textureItem.addActionListener(this); |
---|
| 390 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 391 | +// textureItem.addActionListener(this); |
---|
261 | 392 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
262 | 393 | billboardItem.addActionListener(this); |
---|
263 | 394 | csgItem = menu.add(new MenuItem("CSG")); |
---|
264 | 395 | csgItem.addActionListener(this); |
---|
265 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 396 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
266 | 397 | shadowXItem.addActionListener(this); |
---|
267 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 398 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
268 | 399 | shadowYItem.addActionListener(this); |
---|
269 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 400 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
270 | 401 | shadowZItem.addActionListener(this); |
---|
| 402 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 403 | + attributeItem.addActionListener(this); |
---|
| 404 | + |
---|
| 405 | + if (Globals.ADVANCED) |
---|
| 406 | + { |
---|
| 407 | + menu.add("-"); |
---|
271 | 408 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
272 | 409 | linkerItem.addActionListener(this); |
---|
273 | 410 | templateItem = menu.add(new MenuItem("Template")); |
---|
274 | 411 | templateItem.addActionListener(this); |
---|
275 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
276 | | - attributeItem.addActionListener(this); |
---|
277 | 412 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
278 | 413 | pointflowItem.addActionListener(this); |
---|
| 414 | + } |
---|
279 | 415 | menu.add("-"); |
---|
280 | 416 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
281 | 417 | resetTransformItem.addActionListener(this); |
---|
282 | 418 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
283 | 419 | resetCentroidItem.addActionListener(this); |
---|
284 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
285 | | - transformgeometryItem.addActionListener(this); |
---|
| 420 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 421 | + resetCentroidXZItem.addActionListener(this); |
---|
| 422 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 423 | + transformGeometryItem.addActionListener(this); |
---|
| 424 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 425 | + transformChildrenItem.addActionListener(this); |
---|
286 | 426 | |
---|
287 | 427 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
288 | 428 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
293 | 433 | genNormalsCADItem.addActionListener(this); |
---|
294 | 434 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
295 | 435 | genNormalsMESHItem.addActionListener(this); |
---|
296 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 436 | + if (Globals.ADVANCED) |
---|
| 437 | + { |
---|
| 438 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
297 | 439 | genNormalsMINEItem.addActionListener(this); |
---|
| 440 | + } |
---|
298 | 441 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
299 | 442 | stripifyItem.addActionListener(this); |
---|
300 | 443 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
316 | 459 | reduce34MeshItem.addActionListener(this); |
---|
317 | 460 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
318 | 461 | increaseMeshItem.addActionListener(this); |
---|
319 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
320 | | - smoothMeshItem.addActionListener(this); |
---|
321 | 462 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
322 | 463 | clipMeshItem.addActionListener(this); |
---|
| 464 | + |
---|
| 465 | + if (Globals.ADVANCED) |
---|
| 466 | + { |
---|
| 467 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 468 | + smoothMeshItem.addActionListener(this); |
---|
| 469 | + } |
---|
323 | 470 | |
---|
324 | 471 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
325 | 472 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
326 | 473 | clearMaterialsItem.addActionListener(this); |
---|
| 474 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 475 | + resetAllItem.addActionListener(this); |
---|
| 476 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 477 | + stepAllItem.addActionListener(this); |
---|
327 | 478 | menu.add("-"); |
---|
328 | 479 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
329 | 480 | liveleavesItem.addActionListener(this); |
---|
330 | 481 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
331 | 482 | unliveleavesItem.addActionListener(this); |
---|
| 483 | + if (Globals.ADVANCED) |
---|
| 484 | + { |
---|
332 | 485 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
333 | 486 | supportleavesItem.addActionListener(this); |
---|
334 | 487 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
335 | 488 | unsupportleavesItem.addActionListener(this); |
---|
| 489 | + } |
---|
336 | 490 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
337 | 491 | hideleavesItem.addActionListener(this); |
---|
338 | 492 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
341 | 495 | markleavesItem.addActionListener(this); |
---|
342 | 496 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
343 | 497 | unmarkleavesItem.addActionListener(this); |
---|
| 498 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 499 | + rewindleavesItem.addActionListener(this); |
---|
| 500 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 501 | + unrewindleavesItem.addActionListener(this); |
---|
| 502 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 503 | + randomleavesItem.addActionListener(this); |
---|
| 504 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 505 | + unrandomleavesItem.addActionListener(this); |
---|
344 | 506 | menu.add("-"); |
---|
345 | 507 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
346 | 508 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
376 | 538 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
377 | 539 | sortbynameItem.addActionListener(this); |
---|
378 | 540 | menu.add("-"); |
---|
| 541 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 542 | + shareGeometriesItem.addActionListener(this); |
---|
| 543 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 544 | + mergeGeometriesItem.addActionListener(this); |
---|
| 545 | + if (Globals.ADVANCED) |
---|
| 546 | + { |
---|
| 547 | + // Pretty much the same as duplicate and clone. |
---|
379 | 548 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
380 | 549 | extractGeometriesItem.addActionListener(this); |
---|
381 | 550 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
382 | 551 | cloneGeometriesItem.addActionListener(this); |
---|
383 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
384 | | - shareGeometriesItem.addActionListener(this); |
---|
385 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
386 | | - mergeGeometriesItem.addActionListener(this); |
---|
| 552 | + } |
---|
387 | 553 | |
---|
388 | 554 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
389 | 555 | buildCreateMenu(menu); |
---|
390 | 556 | |
---|
391 | | - |
---|
392 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
393 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
394 | | - importGFDItem.addActionListener(this); |
---|
395 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
396 | | - importVRMLX3DItem.addActionListener(this); |
---|
397 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
398 | | - importOBJItem.addActionListener(this); |
---|
399 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
400 | | - import3DSItem.addActionListener(this); |
---|
401 | | - |
---|
402 | 557 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
403 | 558 | buildToolsMenu(menu); |
---|
404 | 559 | } |
---|
405 | 560 | |
---|
| 561 | + |
---|
406 | 562 | void SetupUI2(ObjEditor oe) |
---|
407 | 563 | { |
---|
| 564 | + // June 2019 |
---|
| 565 | + if (oe == null) |
---|
| 566 | + { |
---|
| 567 | + //super.SetupUI2(this); |
---|
| 568 | + //return; |
---|
| 569 | + } |
---|
| 570 | + |
---|
| 571 | + if (copy != group) |
---|
| 572 | + { |
---|
| 573 | + //super.SetupUI2(this); |
---|
| 574 | + } |
---|
| 575 | + |
---|
408 | 576 | //new Exception().printStackTrace(); |
---|
409 | 577 | |
---|
410 | 578 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
433 | 601 | oe.radioPanel.add(dummyButton); |
---|
434 | 602 | oe.buttonGroup.add(dummyButton); |
---|
435 | 603 | */ |
---|
436 | | - aConstraints.gridy += 1; |
---|
| 604 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 605 | + |
---|
| 606 | + copyOptionsPanel.preferredHeight = 1; |
---|
437 | 607 | |
---|
438 | 608 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
439 | 609 | |
---|
440 | | - oe.aConstraints.gridwidth = 1; |
---|
441 | | - oe.aConstraints.gridx = 0; |
---|
| 610 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 611 | + //minButton.setToolTipText("Minimize window"); |
---|
| 612 | + //minButton.addActionListener(this); |
---|
442 | 613 | |
---|
443 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
444 | | - liveCB.setToolTipText("Enabled animation"); |
---|
445 | | - liveCB.addItemListener(this); |
---|
446 | | - |
---|
447 | | - oe.aConstraints.gridx += 1; |
---|
448 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints); |
---|
449 | | - trackCB.setToolTipText("Enable tracking"); |
---|
450 | | - trackCB.addItemListener(this); |
---|
451 | | - |
---|
452 | | - oe.aConstraints.gridx += 1; |
---|
453 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 614 | + if (Globals.ADVANCED) |
---|
| 615 | + { |
---|
| 616 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 617 | + maxButton.setToolTipText("Maximize window"); |
---|
| 618 | + maxButton.addActionListener(this); |
---|
| 619 | + } |
---|
| 620 | + |
---|
| 621 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 622 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 623 | + fullButton.addActionListener(this); |
---|
| 624 | + |
---|
| 625 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
454 | 626 | screenfitButton.setToolTipText("Screen fit"); |
---|
455 | 627 | screenfitButton.addActionListener(this); |
---|
456 | | - oe.aConstraints.gridx += 1; |
---|
| 628 | + |
---|
| 629 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 630 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 631 | + restoreCameraButton.addActionListener(this); |
---|
| 632 | + |
---|
| 633 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 634 | + saveButton.setToolTipText("New version"); |
---|
| 635 | + saveButton.addActionListener(this); |
---|
| 636 | + |
---|
| 637 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 638 | + undoButton.setToolTipText("Previous version"); |
---|
| 639 | + undoButton.addActionListener(this); |
---|
| 640 | + undoButton.setEnabled(false); |
---|
| 641 | + |
---|
| 642 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 643 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 644 | + restoreButton.setToolTipText("Restore current"); |
---|
| 645 | + restoreButton.addActionListener(this); |
---|
| 646 | + restoreButton.setEnabled(false); |
---|
| 647 | + |
---|
| 648 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 649 | + replaceButton.setToolTipText("Replace current"); |
---|
| 650 | + replaceButton.addActionListener(this); |
---|
| 651 | + replaceButton.setEnabled(false); |
---|
| 652 | + |
---|
| 653 | + copyOptionsPanel.add(updown); |
---|
| 654 | + |
---|
| 655 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 656 | + redoButton.setToolTipText("Next version"); |
---|
| 657 | + redoButton.addActionListener(this); |
---|
| 658 | + redoButton.setEnabled(false); |
---|
| 659 | + |
---|
| 660 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 661 | + liveCB.setToolTipText("Enable animation"); |
---|
| 662 | + liveCB.addItemListener(this); |
---|
| 663 | + |
---|
| 664 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 665 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 666 | + oneStepButton.addActionListener(this); |
---|
| 667 | + |
---|
| 668 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 669 | + fastCB.setToolTipText("Fast mode"); |
---|
| 670 | + fastCB.addItemListener(this); |
---|
| 671 | + |
---|
| 672 | + //oe.toolboxPanel.Return(); |
---|
| 673 | + |
---|
| 674 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 675 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 676 | +// trackCB.addItemListener(this); |
---|
| 677 | + |
---|
457 | 678 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
458 | 679 | // screenfitpointButton.addActionListener(this); |
---|
459 | | -// oe.aConstraints.gridx += 1; |
---|
460 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
461 | | - snapobjectButton.addActionListener(this); |
---|
462 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
463 | | - oe.aConstraints.gridx += 1; |
---|
464 | 680 | |
---|
465 | | - //aConstraints.gridx = 0; |
---|
466 | | - //aConstraints.gridy += 1; |
---|
467 | | - oe.aConstraints.weighty = 0; |
---|
468 | | - oe.aConstraints.gridwidth = 1; |
---|
469 | | - |
---|
470 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
471 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
472 | | - flashSelectionButton.addActionListener(this); |
---|
| 681 | + if (Globals.ADVANCED) |
---|
| 682 | + { |
---|
| 683 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 684 | + snapobjectButton.addActionListener(this); |
---|
| 685 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 686 | + } |
---|
| 687 | + |
---|
| 688 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
473 | 689 | |
---|
474 | | - oe.toolbarPanel.add(new cButton(" ", false)); |
---|
475 | | - |
---|
476 | | - oe.aConstraints.gridx += 1; |
---|
477 | | - oe.aConstraints.weighty = 0; |
---|
478 | | - oe.aConstraints.gridwidth = 1; |
---|
479 | | - |
---|
480 | | - // |
---|
481 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
482 | | - twoButton.setToolTipText("Show center view only"); |
---|
483 | | - twoButton.addActionListener(this); |
---|
484 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 690 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
485 | 691 | fourButton.addActionListener(this); |
---|
486 | 692 | fourButton.setToolTipText("Show left panel only"); |
---|
487 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
488 | | - sixButton.setToolTipText("2-column layout left"); |
---|
| 693 | + |
---|
| 694 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 695 | + twoButton.setToolTipText("Show right view only"); |
---|
| 696 | + twoButton.addActionListener(this); |
---|
| 697 | + this.fullscreenLayout = twoButton; |
---|
| 698 | + |
---|
| 699 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 700 | + sixButton.setToolTipText("Show left and right"); |
---|
489 | 701 | sixButton.addActionListener(this); |
---|
490 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
491 | | - threeButton.setToolTipText("2-column layout right"); |
---|
492 | | - threeButton.addActionListener(this); |
---|
493 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
494 | | - sevenButton.setToolTipText("3-column layout"); |
---|
495 | | - sevenButton.addActionListener(this); |
---|
| 702 | +// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 703 | +// threeButton.setToolTipText("2-column layout right"); |
---|
| 704 | +// threeButton.addActionListener(this); |
---|
| 705 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 706 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 707 | +// sevenButton.addActionListener(this); |
---|
496 | 708 | // |
---|
497 | 709 | |
---|
498 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints); |
---|
499 | | - rootButton.setToolTipText("Edit object in new tab"); |
---|
| 710 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 711 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
500 | 712 | rootButton.addActionListener(this); |
---|
501 | | - oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 713 | + |
---|
| 714 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
503 | 715 | closeButton.setToolTipText("Close tab"); |
---|
504 | 716 | closeButton.addActionListener(this); |
---|
505 | 717 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
506 | 718 | //clearButton.addActionListener(this); |
---|
507 | | - oe.aConstraints.gridx += 1; |
---|
508 | | - |
---|
509 | | - oe.aConstraints.gridx = 1; // |
---|
510 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
511 | | - editButton.addActionListener(this); |
---|
512 | | - oe.aConstraints.gridx += 1; |
---|
513 | | - oe.aConstraints.weighty = 0; |
---|
514 | | - oe.aConstraints.gridwidth = 1; |
---|
515 | 719 | |
---|
516 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 720 | + // INSERT |
---|
| 721 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 722 | + gridButton.setToolTipText("Create grid"); |
---|
| 723 | + gridButton.addActionListener(this); |
---|
| 724 | + |
---|
| 725 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 726 | + boxButton.setToolTipText("Create box"); |
---|
| 727 | + boxButton.addActionListener(this); |
---|
| 728 | + |
---|
| 729 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 730 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 731 | + sphereButton.addActionListener(this); |
---|
| 732 | + |
---|
| 733 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 734 | + coneButton.setToolTipText("Create cone"); |
---|
| 735 | + coneButton.addActionListener(this); |
---|
| 736 | + |
---|
| 737 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 738 | + torusButton.setToolTipText("Create torus"); |
---|
| 739 | + torusButton.addActionListener(this); |
---|
| 740 | + |
---|
| 741 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 742 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 743 | + superButton.addActionListener(this); |
---|
| 744 | + |
---|
| 745 | + if (Globals.ADVANCED) |
---|
| 746 | + { |
---|
| 747 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 748 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 749 | + kleinButton.addActionListener(this); |
---|
| 750 | + } |
---|
| 751 | + |
---|
| 752 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 753 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 754 | + particlesButton.addActionListener(this); |
---|
| 755 | + |
---|
| 756 | + oe.toolboxPanel.Return(); |
---|
| 757 | + |
---|
| 758 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 759 | + groupButton.setToolTipText("Create group"); |
---|
| 760 | + groupButton.addActionListener(this); |
---|
| 761 | + |
---|
| 762 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 763 | + compositeButton.setToolTipText("Create composite"); |
---|
| 764 | + compositeButton.addActionListener(this); |
---|
| 765 | + |
---|
| 766 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 767 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 768 | + switchButton.addActionListener(this); |
---|
| 769 | + |
---|
| 770 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 771 | + loopButton.setToolTipText("Create loop"); |
---|
| 772 | + loopButton.addActionListener(this); |
---|
| 773 | + |
---|
| 774 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 775 | + textureButton.setToolTipText("Create texture"); |
---|
| 776 | + textureButton.addActionListener(this); |
---|
| 777 | + |
---|
| 778 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 779 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 780 | + overlayButton.addActionListener(this); |
---|
| 781 | + |
---|
| 782 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 783 | + lightButton.setToolTipText("Create light"); |
---|
| 784 | + lightButton.addActionListener(this); |
---|
| 785 | + |
---|
| 786 | + for (int i=6; --i>=0;) |
---|
| 787 | + { |
---|
| 788 | + oe.toolboxPanel.Return(); |
---|
| 789 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 790 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 791 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 792 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 793 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 794 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 795 | + oe.toolboxPanel.add(new cGridBag()); |
---|
| 796 | + } |
---|
| 797 | + |
---|
| 798 | + // EDIT panel |
---|
| 799 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 800 | + editButton.setToolTipText("Pin selection controls"); |
---|
| 801 | + editButton.addActionListener(this); |
---|
| 802 | + |
---|
| 803 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 804 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
517 | 805 | uneditButton.addActionListener(this); |
---|
518 | 806 | |
---|
519 | | - oe.aConstraints.gridx += 1; |
---|
520 | | - oe.aConstraints.weighty = 0; |
---|
521 | | - oe.aConstraints.gridwidth = 1; |
---|
522 | | - |
---|
523 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
524 | | - clearPanelButton.addActionListener(this); |
---|
525 | | - |
---|
526 | | - oe.aConstraints.gridx += 1; |
---|
527 | | - oe.aConstraints.weighty = 0; |
---|
528 | | - oe.aConstraints.gridwidth = 1; |
---|
529 | | - |
---|
530 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 807 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 808 | + allParamsButton.setToolTipText("Show all controle"); |
---|
531 | 809 | allParamsButton.addActionListener(this); |
---|
532 | 810 | |
---|
533 | | - oe.aConstraints.gridx += 1; |
---|
534 | | - oe.aConstraints.weighty = 0; |
---|
535 | | - oe.aConstraints.gridwidth = 1; |
---|
536 | | - |
---|
537 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 811 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 812 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 813 | + clearPanelButton.addActionListener(this); |
---|
| 814 | + |
---|
| 815 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 816 | + unselectButton.setToolTipText("Unselect"); |
---|
538 | 817 | unselectButton.addActionListener(this); |
---|
539 | 818 | |
---|
| 819 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 820 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 821 | + flashSelectionButton.addActionListener(this); |
---|
| 822 | + |
---|
| 823 | + editCommandsPanel.preferredHeight = 1; |
---|
| 824 | + |
---|
| 825 | + SetPinStates(false); |
---|
| 826 | +// oe.treePanel.add(commandsPanel); |
---|
| 827 | +// oe.treePanel.Return(); |
---|
| 828 | + |
---|
540 | 829 | // oe.aConstraints.gridx += 1; |
---|
541 | 830 | // oe.aConstraints.weighty = 0; |
---|
542 | 831 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
548 | 837 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
549 | 838 | // gcButton.addActionListener(this); |
---|
550 | 839 | |
---|
551 | | - oe.aConstraints.gridx = 0; |
---|
552 | | - oe.aConstraints.gridy += 1; |
---|
553 | | - |
---|
554 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
555 | | - oe.aConstraints.gridwidth = 100; |
---|
556 | | - // oe.aConstraints.gridheight = 100; |
---|
557 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
558 | | - oe.aConstraints.gridheight = 1; |
---|
559 | | - oe.aConstraints.weighty = 0.5; |
---|
560 | | - oe.aConstraints.gridx = 0; |
---|
561 | | - JScrollPane jSP; |
---|
| 840 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 841 | + |
---|
| 842 | + JScrollPane jSP; |
---|
562 | 843 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
563 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 844 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
564 | 845 | ResetModel(); |
---|
565 | | - oe.aConstraints.weighty = 0.5; |
---|
566 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
567 | | - oe.aConstraints.gridy += 1; |
---|
568 | | - oe.aConstraints.gridwidth = 1; |
---|
569 | | - |
---|
570 | | - oe.aConstraints.weighty = 0; |
---|
571 | | - oe.aConstraints.gridwidth = 2; |
---|
572 | | - |
---|
573 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
574 | | - colorCB.addItemListener(this); |
---|
575 | | - oe.aConstraints.gridx += 2; |
---|
576 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
577 | | - materialCB.addItemListener(this); |
---|
578 | | - oe.aConstraints.gridx += 2; |
---|
579 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
580 | | - textureCB.addItemListener(this); |
---|
581 | | - |
---|
582 | | - oe.aConstraints.gridx = 0; |
---|
583 | | - oe.aConstraints.gridy += 1; |
---|
584 | 846 | |
---|
| 847 | + oe.treePanel.add(jSPPanel); |
---|
| 848 | + oe.treePanel.Return(); |
---|
| 849 | + |
---|
| 850 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 851 | + oe.treePanel.Return(); |
---|
| 852 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 853 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 854 | + sliderPane.preferredHeight = 1; |
---|
| 855 | + |
---|
| 856 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 857 | +// mainPanel.setResizeWeight(0.5); |
---|
| 858 | + |
---|
585 | 859 | //jList.addListSelectionListener(this); |
---|
586 | 860 | oe.jTree.addTreeSelectionListener(this); |
---|
587 | 861 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
600 | 874 | dgr.addDragGestureListener(this); |
---|
601 | 875 | }catch(Exception e) {} |
---|
602 | 876 | */ |
---|
603 | | - radio.layout = sevenButton; |
---|
| 877 | + radio.layout = sixButton; // sevenButton; |
---|
604 | 878 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
605 | 879 | } |
---|
606 | 880 | |
---|
607 | | - void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 881 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
608 | 882 | { |
---|
609 | | - constraints.gridx = 0; |
---|
610 | | - constraints.gridy = 0; |
---|
611 | | - panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints); |
---|
612 | | - fastCB.setToolTipText("Fast mode"); |
---|
613 | | - fastCB.addItemListener(this); |
---|
614 | | - constraints.gridy += 1; |
---|
615 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints); |
---|
616 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
617 | | - supportCB.addItemListener(this); |
---|
| 883 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 884 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 885 | + colorCB.addItemListener(this); |
---|
618 | 886 | |
---|
619 | | - // constraints.gridy += 1; |
---|
| 887 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 888 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 889 | + materialCB.addItemListener(this); |
---|
| 890 | + |
---|
| 891 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 892 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 893 | + textureCB.addItemListener(this); |
---|
| 894 | + |
---|
| 895 | + panel.Return(); |
---|
| 896 | + |
---|
| 897 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 898 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 899 | + boxCB.addItemListener(this); |
---|
| 900 | + |
---|
| 901 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 902 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
| 903 | + zoomBoxCB.addItemListener(this); |
---|
| 904 | + |
---|
| 905 | + if (true) // Globals.ADVANCED) |
---|
| 906 | + { |
---|
| 907 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 908 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 909 | +// supportCB.addItemListener(this); |
---|
| 910 | + |
---|
| 911 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 912 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 913 | + freezeCB.addItemListener(this); |
---|
| 914 | + |
---|
620 | 915 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
621 | 916 | // localCB.addItemListener(this); |
---|
622 | 917 | |
---|
623 | | - constraints.gridy += 1; |
---|
624 | | - panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints); |
---|
| 918 | + panel.Return(); |
---|
| 919 | + |
---|
| 920 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
625 | 921 | crowdCB.setToolTipText("Used for crowds"); |
---|
626 | 922 | crowdCB.addItemListener(this); |
---|
627 | 923 | |
---|
628 | | - constraints.gridy += 1; |
---|
629 | | - panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints); |
---|
| 924 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
630 | 925 | smoothCB.setToolTipText("Snapping delay"); |
---|
631 | 926 | smoothCB.addItemListener(this); |
---|
632 | 927 | |
---|
633 | | - constraints.gridy += 1; |
---|
634 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints); |
---|
| 928 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
635 | 929 | slowCB.setToolTipText("Smooth interpolation"); |
---|
636 | 930 | slowCB.addItemListener(this); |
---|
637 | | - constraints.gridy += 1; |
---|
638 | | - panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints); |
---|
639 | | - boxCB.setToolTipText("Display bounding boxes"); |
---|
640 | | - boxCB.addItemListener(this); |
---|
641 | | - constraints.gridy += 1; |
---|
642 | | - panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints); |
---|
643 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
644 | | - zoomBoxCB.addItemListener(this); |
---|
645 | | - |
---|
| 931 | + |
---|
646 | 932 | // constraints.gridy += 1; |
---|
647 | 933 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
648 | 934 | // speakerMocapCB.addItemListener(this); |
---|
649 | 935 | |
---|
| 936 | + panel.Return(); |
---|
| 937 | + |
---|
650 | 938 | if (false) |
---|
651 | 939 | { |
---|
652 | 940 | // handled in scripts |
---|
653 | | - constraints.gridy += 1; |
---|
654 | | - panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints); |
---|
| 941 | + //constraints.gridy += 1; |
---|
| 942 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
655 | 943 | speakerCameraCB.addItemListener(this); |
---|
656 | 944 | |
---|
657 | | - constraints.gridy += 1; |
---|
658 | | - panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints); |
---|
| 945 | + //constraints.gridy += 1; |
---|
| 946 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
659 | 947 | speakerFocusCB.addItemListener(this); |
---|
660 | 948 | |
---|
661 | | - constraints.gridy += 1; |
---|
662 | | - panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints); |
---|
| 949 | + //constraints.gridy += 1; |
---|
| 950 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
663 | 951 | smoothfocusCB.addItemListener(this); |
---|
| 952 | + panel.Return(); |
---|
664 | 953 | } |
---|
665 | 954 | |
---|
666 | 955 | //constraints.gridx += 1; |
---|
667 | 956 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
668 | 957 | // debugCB.addItemListener(this); |
---|
669 | 958 | |
---|
670 | | - constraints.gridy += 1; |
---|
671 | | - panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints); |
---|
| 959 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 960 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 961 | + trackCB.addItemListener(this); |
---|
| 962 | + |
---|
| 963 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 964 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
672 | 965 | oeilCB.addItemListener(this); |
---|
673 | 966 | |
---|
674 | | - constraints.gridy += 1; |
---|
675 | | - panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints); |
---|
| 967 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 968 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 969 | + shadowCB.addItemListener(this); |
---|
| 970 | + |
---|
| 971 | + panel.Return(); |
---|
| 972 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 973 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 974 | + toggleTextureCB.addItemListener(this); |
---|
| 975 | + |
---|
| 976 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 977 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 978 | + toggleSwitchCB.addItemListener(this); |
---|
| 979 | + |
---|
| 980 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 981 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 982 | + autokeepCB.addItemListener(this); |
---|
| 983 | + |
---|
| 984 | + panel.Return(); |
---|
| 985 | + if (Globals.ADVANCED) |
---|
| 986 | + { |
---|
| 987 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
676 | 988 | lookAtCB.setToolTipText("Look-at target"); |
---|
677 | 989 | lookAtCB.addItemListener(this); |
---|
| 990 | + } |
---|
| 991 | + |
---|
| 992 | + } |
---|
| 993 | + |
---|
| 994 | + cGridBag fill = new cGridBag(); |
---|
| 995 | + fill.preferredHeight = 200; |
---|
| 996 | + cGridBag fill2 = new cGridBag(); |
---|
| 997 | + fill2.preferredHeight = 200; |
---|
| 998 | + cGridBag fill3 = new cGridBag(); |
---|
| 999 | + fill3.preferredHeight = 200; |
---|
| 1000 | + |
---|
| 1001 | + panel.add(fill); |
---|
| 1002 | + panel.add(fill2); |
---|
| 1003 | + panel.add(fill3); |
---|
678 | 1004 | |
---|
679 | 1005 | } |
---|
680 | 1006 | |
---|
681 | 1007 | void EditObject(Object3D obj) |
---|
682 | 1008 | { |
---|
683 | 1009 | cRadio radioButton = new cRadio(obj.name); |
---|
| 1010 | + |
---|
| 1011 | + // June 2019. Patch to avoid bug with transparency. |
---|
| 1012 | + radioButton.hadMaterial = obj.material != null; |
---|
| 1013 | + if (!radioButton.hadMaterial) |
---|
| 1014 | + { |
---|
| 1015 | + obj.material = new cMaterial(); |
---|
| 1016 | + } |
---|
| 1017 | + |
---|
684 | 1018 | radioButton.SetObject(obj); |
---|
685 | | - radioButton.layout = sevenButton; |
---|
| 1019 | + radioButton.layout = sixButton; // sevenButton; |
---|
686 | 1020 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
687 | 1021 | radioButton.addActionListener(this); |
---|
688 | 1022 | radioPanel.add(radioButton); |
---|
689 | 1023 | buttonGroup.add(radioButton); |
---|
690 | 1024 | radioButton.doClick(); |
---|
691 | 1025 | } |
---|
| 1026 | + |
---|
692 | 1027 | void SetupViews(ObjEditor oe) |
---|
693 | 1028 | { |
---|
| 1029 | + theFrame = this; |
---|
| 1030 | + |
---|
694 | 1031 | oe.SetupViews(); |
---|
695 | 1032 | |
---|
696 | 1033 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
699 | 1036 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
700 | 1037 | } |
---|
701 | 1038 | |
---|
702 | | - JCheckBox liveCB; |
---|
703 | | - JCheckBox supportCB; |
---|
704 | | - JCheckBox localCB; |
---|
705 | | - JCheckBox crowdCB; |
---|
706 | | - JCheckBox smoothCB; |
---|
707 | | - JCheckBox fastCB; |
---|
708 | | - JCheckBox slowCB; |
---|
709 | | - JCheckBox boxCB; |
---|
710 | | - JCheckBox zoomBoxCB; |
---|
711 | | - JCheckBox trackCB; |
---|
712 | | - JCheckBox smoothfocusCB; |
---|
| 1039 | + cToggleButton liveCB; |
---|
| 1040 | + cCheckBox supportCB; |
---|
| 1041 | + cCheckBox localCB; |
---|
| 1042 | + cCheckBox crowdCB; |
---|
| 1043 | + cCheckBox smoothCB; |
---|
| 1044 | + cToggleButton fastCB; |
---|
| 1045 | + cCheckBox slowCB; |
---|
| 1046 | + cCheckBox boxCB; |
---|
| 1047 | + cCheckBox zoomBoxCB; |
---|
| 1048 | + cCheckBox freezeCB; |
---|
| 1049 | + //cToggleButton trackCB; |
---|
| 1050 | + cCheckBox trackCB; |
---|
| 1051 | + cCheckBox smoothfocusCB; |
---|
713 | 1052 | // JCheckBox speakerMocapCB; |
---|
714 | | - JCheckBox speakerCameraCB; |
---|
715 | | - JCheckBox speakerFocusCB; |
---|
716 | | - JCheckBox debugCB; |
---|
717 | | - JCheckBox oeilCB; |
---|
718 | | - JCheckBox lookAtCB; |
---|
| 1053 | + cCheckBox speakerCameraCB; |
---|
| 1054 | + cCheckBox speakerFocusCB; |
---|
| 1055 | + cCheckBox debugCB; |
---|
| 1056 | + |
---|
| 1057 | + cCheckBox oeilCB; |
---|
| 1058 | + cCheckBox shadowCB; |
---|
| 1059 | + cCheckBox autokeepCB; |
---|
| 1060 | + cCheckBox lookAtCB; |
---|
719 | 1061 | |
---|
720 | 1062 | // static int COLOR = 1; |
---|
721 | 1063 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
723 | 1065 | |
---|
724 | 1066 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
725 | 1067 | |
---|
726 | | - JCheckBox colorCB; |
---|
727 | | - JCheckBox materialCB; |
---|
728 | | - JCheckBox textureCB; |
---|
| 1068 | + cCheckBox colorCB; |
---|
| 1069 | + cCheckBox materialCB; |
---|
| 1070 | + cCheckBox textureCB; |
---|
729 | 1071 | |
---|
730 | 1072 | public void itemStateChanged(ItemEvent e) |
---|
731 | 1073 | { |
---|
.. | .. |
---|
753 | 1095 | } else if(e.getSource() == liveCB) |
---|
754 | 1096 | { |
---|
755 | 1097 | cameraView.ToggleLive(); |
---|
| 1098 | + refreshContents(false); |
---|
756 | 1099 | } |
---|
757 | 1100 | else if(e.getSource() == supportCB) |
---|
758 | 1101 | { |
---|
.. | .. |
---|
817 | 1160 | { |
---|
818 | 1161 | cameraView.ToggleOeil(); |
---|
819 | 1162 | } |
---|
| 1163 | + else if(e.getSource() == shadowCB) |
---|
| 1164 | + { |
---|
| 1165 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1166 | + } |
---|
| 1167 | + else if(e.getSource() == freezeCB) |
---|
| 1168 | + { |
---|
| 1169 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1170 | + } |
---|
| 1171 | + else if(e.getSource() == autokeepCB) |
---|
| 1172 | + { |
---|
| 1173 | + Globals.REPLACEONMAKE ^= true; |
---|
| 1174 | + } |
---|
820 | 1175 | else if(e.getSource() == lookAtCB) |
---|
821 | 1176 | { |
---|
822 | 1177 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
833 | 1188 | |
---|
834 | 1189 | /**/ |
---|
835 | 1190 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
836 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1191 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1192 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
837 | 1193 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
838 | 1194 | // We can't move the root node or an empty selection |
---|
839 | 1195 | return; |
---|
.. | .. |
---|
896 | 1252 | } |
---|
897 | 1253 | } |
---|
898 | 1254 | |
---|
899 | | - String string = (String) object; |
---|
900 | | - |
---|
901 | 1255 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
902 | 1256 | // if( object instanceof java.io.File[]) |
---|
903 | 1257 | // { |
---|
.. | .. |
---|
905 | 1259 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
906 | 1260 | // return; |
---|
907 | 1261 | // } |
---|
908 | | - if (string.charAt(0) == '/') |
---|
| 1262 | + |
---|
| 1263 | + String string = object.toString(); |
---|
| 1264 | + |
---|
| 1265 | + // File path for Mac and Windows |
---|
| 1266 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
909 | 1267 | { |
---|
910 | 1268 | // file(s) |
---|
911 | 1269 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
932 | 1290 | |
---|
933 | 1291 | flashIt = false; |
---|
934 | 1292 | CameraPane pane = (CameraPane) target; |
---|
935 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1293 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
936 | 1294 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
937 | 1295 | |
---|
938 | 1296 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
948 | 1306 | |
---|
949 | 1307 | assert target == objEditor.jTree; |
---|
950 | 1308 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1309 | + Object3D destinationLeaf; |
---|
951 | 1310 | try { |
---|
952 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1311 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
953 | 1312 | } catch (Exception e) { |
---|
954 | 1313 | System.out.println("destinationPath : " + destinationPath); |
---|
955 | 1314 | return; |
---|
956 | 1315 | } |
---|
957 | 1316 | |
---|
958 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1317 | + for (int i=group.selection.size(); --i>=0;) |
---|
959 | 1318 | { |
---|
| 1319 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1320 | + |
---|
| 1321 | + // Cannot move into itself |
---|
| 1322 | + if (child == destinationLeaf) |
---|
| 1323 | + return; |
---|
| 1324 | + } |
---|
| 1325 | + |
---|
| 1326 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1327 | +// { |
---|
960 | 1328 | loadClipboard(true); |
---|
961 | 1329 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
962 | | - pasteInto(false); |
---|
963 | | - } else { |
---|
964 | | - loadClipboard(false); |
---|
965 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
966 | | - pasteInto(false); // true); // ??? |
---|
967 | | - } |
---|
| 1330 | + pasteInto(false, false); |
---|
| 1331 | +// } else { |
---|
| 1332 | +// loadClipboard(false); |
---|
| 1333 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1334 | +// pasteInto(false, false); // true); // ??? |
---|
| 1335 | +// } |
---|
968 | 1336 | } |
---|
969 | 1337 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
970 | 1338 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1069 | 1437 | { |
---|
1070 | 1438 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1071 | 1439 | //heightFieldItem.addActionListener(this); |
---|
1072 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1073 | | - gridItem.addActionListener(this); |
---|
1074 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1075 | | - rectoidItem.addActionListener(this); |
---|
1076 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1077 | | - ellipsoidItem.addActionListener(this); |
---|
1078 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1079 | | - coneItem.addActionListener(this); |
---|
1080 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1081 | | - torusItem.addActionListener(this); |
---|
1082 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1083 | | - superItem.addActionListener(this); |
---|
| 1440 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1441 | +// gridItem.addActionListener(this); |
---|
| 1442 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1443 | +// rectoidItem.addActionListener(this); |
---|
| 1444 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1445 | +// ellipsoidItem.addActionListener(this); |
---|
| 1446 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1447 | +// coneItem.addActionListener(this); |
---|
| 1448 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1449 | +// torusItem.addActionListener(this); |
---|
| 1450 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1451 | +// superItem.addActionListener(this); |
---|
| 1452 | + |
---|
| 1453 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1454 | + cameraItem.addActionListener(this); |
---|
| 1455 | + |
---|
| 1456 | + if (!Globals.ADVANCED) |
---|
| 1457 | + { |
---|
1084 | 1458 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1085 | 1459 | kleinItem.addActionListener(this); |
---|
1086 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1087 | | - particleItem.addActionListener(this); |
---|
| 1460 | + } |
---|
| 1461 | + |
---|
| 1462 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1463 | +// particleItem.addActionListener(this); |
---|
| 1464 | + if (Globals.ADVANCED) |
---|
| 1465 | + { |
---|
1088 | 1466 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1089 | 1467 | ragdollItem.addActionListener(this); |
---|
1090 | 1468 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1091 | 1469 | ragdoll2Item.addActionListener(this); |
---|
| 1470 | + } |
---|
1092 | 1471 | menu.add("-"); |
---|
1093 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1472 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1094 | 1473 | meshItem.addActionListener(this); |
---|
1095 | 1474 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1096 | 1475 | // meshGroupItem.addActionListener(this); |
---|
| 1476 | + if (Globals.ADVANCED) |
---|
| 1477 | + { |
---|
1097 | 1478 | springItem = menu.add(new MenuItem("Spring")); |
---|
1098 | 1479 | springItem.addActionListener(this); |
---|
1099 | 1480 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1100 | 1481 | flagItem.addActionListener(this); |
---|
1101 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1102 | | - bezierItem.addActionListener(this); |
---|
1103 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1104 | | - checkerItem.addActionListener(this); |
---|
1105 | 1482 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1106 | 1483 | blobItem.addActionListener(this); |
---|
1107 | 1484 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1108 | 1485 | latheItem.addActionListener(this); |
---|
1109 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1110 | | - lightItem.addActionListener(this); |
---|
| 1486 | + } |
---|
| 1487 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1488 | + bezierItem.addActionListener(this); |
---|
| 1489 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1490 | +// overlayItem.addActionListener(this); |
---|
| 1491 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1492 | +// lightItem.addActionListener(this); |
---|
1111 | 1493 | menu.add("-"); |
---|
1112 | 1494 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1113 | 1495 | //superLoopItem.addActionListener(this); |
---|
1114 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1115 | | - loopItem.addActionListener(this); |
---|
| 1496 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1497 | +// loopItem.addActionListener(this); |
---|
1116 | 1498 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1117 | 1499 | doubleItem.addActionListener(this); |
---|
| 1500 | + if (Globals.ADVANCED) |
---|
| 1501 | + { |
---|
1118 | 1502 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1119 | 1503 | tripleItem.addActionListener(this); |
---|
| 1504 | + } |
---|
1120 | 1505 | } |
---|
1121 | 1506 | |
---|
1122 | 1507 | void buildToolsMenu(Menu menu) |
---|
1123 | 1508 | { |
---|
1124 | 1509 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1125 | 1510 | animationItem.addItemListener(this); |
---|
1126 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1511 | + animationItem.setState(Globals.ANIMATION); |
---|
| 1512 | + |
---|
| 1513 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1514 | + archiveItem.addActionListener(this); |
---|
1127 | 1515 | |
---|
1128 | 1516 | menu.add("-"); |
---|
1129 | 1517 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1130 | 1518 | parseverticesItem.addActionListener(this); |
---|
1131 | 1519 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1132 | 1520 | textureFieldItem.addActionListener(this); |
---|
1133 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1521 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1134 | 1522 | alignItem.addActionListener(this); |
---|
1135 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1136 | | - mirrorItem.addActionListener(this); |
---|
1137 | 1523 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1138 | 1524 | reduceMorphItem.addActionListener(this); |
---|
1139 | 1525 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1140 | 1526 | reduce34MorphItem.addActionListener(this); |
---|
1141 | | - |
---|
1142 | | - menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1143 | | - computeAOItem.addActionListener(this); |
---|
1144 | 1527 | menu.add("-"); |
---|
1145 | | - |
---|
1146 | 1528 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1147 | 1529 | memoryItem.addActionListener(this); |
---|
| 1530 | + menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
| 1531 | + computeAOItem.addActionListener(this); |
---|
| 1532 | + |
---|
| 1533 | + if (Globals.ADVANCED) |
---|
| 1534 | + { |
---|
| 1535 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1536 | + mirrorItem.addActionListener(this); |
---|
| 1537 | + menu.add("-"); |
---|
1148 | 1538 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1149 | 1539 | analyzeItem.addActionListener(this); |
---|
1150 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1540 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1151 | 1541 | dumpItem.addActionListener(this); |
---|
1152 | 1542 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1153 | 1543 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1165 | 1555 | menu.add("-"); |
---|
1166 | 1556 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1167 | 1557 | editScriptItem.addActionListener(this); |
---|
| 1558 | + } |
---|
1168 | 1559 | } |
---|
1169 | 1560 | |
---|
1170 | 1561 | void ScreenFit() |
---|
.. | .. |
---|
1287 | 1678 | shadow.material = new cMaterial(obj.material); |
---|
1288 | 1679 | shadow.material.diffuse = 0.0001f; |
---|
1289 | 1680 | shadow.material.specular = 0.0001f; |
---|
| 1681 | + //shadow.projectedVertices[1].x = 300; |
---|
1290 | 1682 | |
---|
1291 | 1683 | makeSomething(shadow); |
---|
1292 | 1684 | } |
---|
| 1685 | + |
---|
| 1686 | + private void ClearUnpinned() |
---|
| 1687 | + { |
---|
| 1688 | + //for (Object3D obj : listUI) |
---|
| 1689 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1690 | + { |
---|
| 1691 | + Object3D obj = listUI.elementAt(i); |
---|
| 1692 | + if (!obj.pinned) |
---|
| 1693 | + { |
---|
| 1694 | + obj.CloseUI(); |
---|
| 1695 | + listUI.remove(i); |
---|
| 1696 | + } |
---|
| 1697 | + } |
---|
| 1698 | + } |
---|
| 1699 | + |
---|
| 1700 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1701 | + { |
---|
| 1702 | + // if (!(elem instanceof Composite)) |
---|
| 1703 | + // newWindow = false; |
---|
| 1704 | + listUI.add(elem); |
---|
| 1705 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1706 | + System.out.println("edit : " + elem); |
---|
| 1707 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 1708 | + } |
---|
1293 | 1709 | |
---|
1294 | 1710 | /** |
---|
1295 | 1711 | * applyExample |
---|
.. | .. |
---|
1493 | 1909 | |
---|
1494 | 1910 | void Overwrite(int mask) |
---|
1495 | 1911 | { |
---|
1496 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1912 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1497 | 1913 | { |
---|
1498 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1914 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1499 | 1915 | |
---|
1500 | 1916 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1501 | 1917 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1534 | 1950 | { |
---|
1535 | 1951 | ScreenFit(); |
---|
1536 | 1952 | } else |
---|
1537 | | - if (source == switchItem) |
---|
| 1953 | + if (source == switchViewItem) |
---|
1538 | 1954 | { |
---|
1539 | 1955 | cVector v1 = new cVector(); |
---|
1540 | 1956 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1543 | 1959 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1544 | 1960 | objEditor.cameraView.repaint(); |
---|
1545 | 1961 | } else |
---|
1546 | | - if (source == rectoidItem) |
---|
| 1962 | + if (source == rectoidItem || source == boxButton) |
---|
1547 | 1963 | { |
---|
1548 | 1964 | makeSomething(new Box()); |
---|
1549 | 1965 | } else |
---|
1550 | | - if (source == particleItem) |
---|
| 1966 | + if (source == particleItem || source == particlesButton) |
---|
1551 | 1967 | { |
---|
1552 | 1968 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1553 | 1969 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1626 | 2042 | |
---|
1627 | 2043 | makeSomething(obj); |
---|
1628 | 2044 | } else |
---|
1629 | | - if (source == gridItem) |
---|
| 2045 | + if (source == gridItem || source == gridButton) |
---|
1630 | 2046 | { |
---|
1631 | 2047 | makeSomething(new Grid()); |
---|
1632 | 2048 | } else |
---|
1633 | | - if (source == ellipsoidItem) |
---|
| 2049 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1634 | 2050 | { |
---|
1635 | 2051 | makeSomething(new Sphere()); |
---|
1636 | 2052 | } else |
---|
1637 | | - if (source == coneItem) |
---|
| 2053 | + if (source == coneItem || source == coneButton) |
---|
1638 | 2054 | { |
---|
1639 | 2055 | makeSomething(new Cone()); |
---|
1640 | 2056 | } else |
---|
1641 | | - if (source == torusItem) |
---|
| 2057 | + if (source == torusItem || source == torusButton) |
---|
1642 | 2058 | { |
---|
1643 | 2059 | makeSomething(new Torus()); |
---|
1644 | 2060 | } else |
---|
1645 | | - if (source == superItem) |
---|
| 2061 | + if (source == superItem || source == superButton) |
---|
1646 | 2062 | { |
---|
1647 | 2063 | makeSomething(new Superellipsoid()); |
---|
1648 | 2064 | } else |
---|
1649 | | - if (source == kleinItem) |
---|
| 2065 | + if (source == kleinItem || source == kleinButton) |
---|
1650 | 2066 | { |
---|
1651 | 2067 | makeSomething(new Klein()); |
---|
1652 | 2068 | } else |
---|
.. | .. |
---|
1666 | 2082 | { |
---|
1667 | 2083 | makeSomething(new BezierSurface()); |
---|
1668 | 2084 | } else |
---|
1669 | | - if (source == checkerItem) |
---|
| 2085 | + if (source == overlayItem || source == overlayButton) |
---|
1670 | 2086 | { |
---|
1671 | 2087 | /* |
---|
1672 | 2088 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1714 | 2130 | s.setup(); |
---|
1715 | 2131 | makeSomething(s); |
---|
1716 | 2132 | } else |
---|
1717 | | - if (source == lightItem) |
---|
| 2133 | + if (source == lightItem || source == lightButton) |
---|
1718 | 2134 | { |
---|
1719 | 2135 | makeSomething(new Light()); |
---|
1720 | 2136 | } else |
---|
.. | .. |
---|
1764 | 2180 | |
---|
1765 | 2181 | group(g); |
---|
1766 | 2182 | } else |
---|
1767 | | - if (source == loopItem) |
---|
| 2183 | + if (source == loopItem || source == loopButton) |
---|
1768 | 2184 | { |
---|
1769 | 2185 | Composite csg = new GroupLeaf(); |
---|
1770 | 2186 | csg.count = 5; |
---|
1771 | 2187 | group(csg); |
---|
1772 | | - Composite child = new cGroup(); |
---|
| 2188 | + Composite child = new cGroup("Branch"); |
---|
1773 | 2189 | csg.addChild(child); |
---|
1774 | 2190 | child.addChild(csg); |
---|
1775 | 2191 | } else |
---|
1776 | 2192 | if (source == doubleItem) |
---|
1777 | 2193 | { |
---|
1778 | | - Composite csg = new GroupLeaf(); |
---|
| 2194 | + Composite csg = new GroupLeaf("Fork"); |
---|
1779 | 2195 | csg.count = 5; |
---|
1780 | 2196 | group(csg); |
---|
1781 | | - Composite child = new cGroup(); |
---|
| 2197 | + Composite child = new cGroup("Branch A"); |
---|
1782 | 2198 | csg.addChild(child); |
---|
1783 | 2199 | child.addChild(csg); |
---|
1784 | | - child = new cGroup(); |
---|
| 2200 | + child = new cGroup("Branch B"); |
---|
1785 | 2201 | csg.addChild(child); |
---|
1786 | 2202 | child.addChild(csg); |
---|
1787 | 2203 | } else |
---|
1788 | 2204 | if (source == tripleItem) |
---|
1789 | 2205 | { |
---|
1790 | | - Composite csg = new GroupLeaf(); |
---|
| 2206 | + Composite csg = new GroupLeaf("Trident"); |
---|
1791 | 2207 | csg.count = 4; |
---|
1792 | 2208 | group(csg); |
---|
1793 | 2209 | Composite child = new cGroup(); |
---|
.. | .. |
---|
1799 | 2215 | child = new cGroup(); |
---|
1800 | 2216 | csg.addChild(child); |
---|
1801 | 2217 | child.addChild(csg); |
---|
1802 | | - } else |
---|
1803 | | - |
---|
1804 | | - if (source == importGFDItem) |
---|
1805 | | - { |
---|
1806 | | - ImportGFD(); |
---|
1807 | | - } else |
---|
1808 | | - if (source == importVRMLX3DItem) |
---|
1809 | | - { |
---|
1810 | | - ImportVRMLX3D(); |
---|
1811 | | - } else |
---|
1812 | | - if (source == import3DSItem) |
---|
1813 | | - { |
---|
1814 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1815 | | - } else |
---|
1816 | | - if (source == importOBJItem) |
---|
1817 | | - { |
---|
1818 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1819 | 2218 | } else |
---|
1820 | 2219 | if (source == computeAOItem) |
---|
1821 | 2220 | { |
---|
.. | .. |
---|
1835 | 2234 | if (source == invariantsItem) |
---|
1836 | 2235 | { |
---|
1837 | 2236 | System.out.println("Invariants:"); |
---|
1838 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 2237 | + Grafreed.grafreeD.universe.invariants(); |
---|
1839 | 2238 | } else |
---|
1840 | 2239 | if (source == memoryItem) |
---|
1841 | 2240 | { |
---|
.. | .. |
---|
1854 | 2253 | { |
---|
1855 | 2254 | DumpObject(); |
---|
1856 | 2255 | } else |
---|
| 2256 | + if (source == minButton) |
---|
| 2257 | + { |
---|
| 2258 | + Minimize(); |
---|
| 2259 | + } else |
---|
| 2260 | + if (source == maxButton) |
---|
| 2261 | + { |
---|
| 2262 | + Maximize(); |
---|
| 2263 | + } else |
---|
| 2264 | + if (source == fullButton) |
---|
| 2265 | + { |
---|
| 2266 | + ToggleFullScreen(); |
---|
| 2267 | + } else |
---|
| 2268 | + if (source == undoButton) |
---|
| 2269 | + { |
---|
| 2270 | + // Go to previous version |
---|
| 2271 | + //if (!Undo()) |
---|
| 2272 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2273 | + Undo(); |
---|
| 2274 | + } else |
---|
| 2275 | + if (source == restoreButton) |
---|
| 2276 | + { |
---|
| 2277 | + // Restore current version |
---|
| 2278 | + Restore(); |
---|
| 2279 | + } else |
---|
| 2280 | + if (source == replaceButton) |
---|
| 2281 | + { |
---|
| 2282 | + // Overwrite current version |
---|
| 2283 | + Replace(); |
---|
| 2284 | + } else |
---|
| 2285 | + if (source == redoButton) |
---|
| 2286 | + { |
---|
| 2287 | + // Go to next version |
---|
| 2288 | + Redo(); |
---|
| 2289 | + } else |
---|
| 2290 | + if (source == saveButton) |
---|
| 2291 | + { |
---|
| 2292 | + // Save a new version |
---|
| 2293 | + if (!Save(true)) |
---|
| 2294 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2295 | + } else |
---|
| 2296 | + if (source == oneStepButton) |
---|
| 2297 | + { |
---|
| 2298 | + Globals.ONESTEP = true; |
---|
| 2299 | + cameraView.repaint(); |
---|
| 2300 | + } else |
---|
1857 | 2301 | if (source == screenfitButton) |
---|
1858 | 2302 | { |
---|
1859 | | - //Reload(lastConverter, lastFilename, true); |
---|
1860 | 2303 | ScreenFit(); |
---|
1861 | 2304 | } else |
---|
1862 | 2305 | if (source == screenfitpointButton) |
---|
1863 | 2306 | { |
---|
1864 | | - //Reload(lastConverter, lastFilename, true); |
---|
1865 | 2307 | ScreenFitPoint(); |
---|
1866 | 2308 | } else |
---|
1867 | 2309 | if (source == snapobjectButton) |
---|
1868 | 2310 | { |
---|
1869 | | - //Reload(lastConverter, lastFilename, true); |
---|
1870 | 2311 | SnapObject(); |
---|
1871 | 2312 | } else |
---|
1872 | 2313 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
1903 | 2344 | { |
---|
1904 | 2345 | loadClipboard(true); |
---|
1905 | 2346 | } else |
---|
| 2347 | + if (source == undoItem) |
---|
| 2348 | + { |
---|
| 2349 | + Undo(); |
---|
| 2350 | + } else |
---|
| 2351 | + if (source == redoItem) |
---|
| 2352 | + { |
---|
| 2353 | + Redo(); |
---|
| 2354 | + } else |
---|
1906 | 2355 | if (source == duplicateItem) |
---|
1907 | 2356 | { |
---|
1908 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2357 | + Object3D keep = Grafreed.clipboard; |
---|
1909 | 2358 | loadClipboard(false); |
---|
1910 | 2359 | paste(false); |
---|
1911 | | - GrafreeD.clipboard = keep; |
---|
| 2360 | + Grafreed.clipboard = keep; |
---|
1912 | 2361 | } else |
---|
1913 | 2362 | if (source == cloneItem) |
---|
1914 | 2363 | { |
---|
.. | .. |
---|
1926 | 2375 | { |
---|
1927 | 2376 | paste(false); |
---|
1928 | 2377 | } else |
---|
| 2378 | + if (source == pasteIntoItem) |
---|
| 2379 | + { |
---|
| 2380 | + pasteInto(true, false); |
---|
| 2381 | + } else |
---|
1929 | 2382 | if (source == pasteLinkItem) |
---|
1930 | 2383 | { |
---|
1931 | | - pasteInto(false); |
---|
| 2384 | + pasteInto(false, false); |
---|
1932 | 2385 | } else |
---|
1933 | 2386 | if (source == pasteCloneItem) |
---|
1934 | 2387 | { |
---|
1935 | | - pasteInto(true); |
---|
| 2388 | + pasteInto(true, true); |
---|
1936 | 2389 | } else |
---|
1937 | 2390 | if (source == pasteExpandItem) |
---|
1938 | 2391 | { |
---|
.. | .. |
---|
2124 | 2577 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2125 | 2578 | // refreshContents(); |
---|
2126 | 2579 | // } |
---|
2127 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2580 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2128 | 2581 | { |
---|
2129 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2582 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2130 | 2583 | |
---|
2131 | 2584 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2132 | 2585 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2134 | 2587 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2135 | 2588 | for (int i=0; i<group.selection.size(); i++) |
---|
2136 | 2589 | { |
---|
2137 | | - boolean random = CameraPane.RANDOM; |
---|
2138 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2590 | + boolean random = CameraPane.SWITCH; |
---|
| 2591 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2139 | 2592 | group.selection.get(i).linkVerticesThis(content); |
---|
2140 | 2593 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2594 | + CameraPane.SWITCH = random; |
---|
2142 | 2595 | } |
---|
2143 | 2596 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2144 | 2597 | refreshContents(); |
---|
.. | .. |
---|
2148 | 2601 | { |
---|
2149 | 2602 | for (int i=0; i<group.selection.size(); i++) |
---|
2150 | 2603 | { |
---|
2151 | | - boolean random = CameraPane.RANDOM; |
---|
2152 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2604 | + boolean random = CameraPane.SWITCH; |
---|
| 2605 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2153 | 2606 | group.selection.get(i).linkVerticesThis(null); |
---|
2154 | | - CameraPane.RANDOM = random; |
---|
| 2607 | + CameraPane.SWITCH = random; |
---|
2155 | 2608 | } |
---|
2156 | 2609 | |
---|
2157 | 2610 | refreshContents(); |
---|
2158 | 2611 | } else |
---|
2159 | 2612 | if (source == relinkverticesItem) |
---|
2160 | 2613 | { |
---|
2161 | | - boolean random = CameraPane.RANDOM; |
---|
2162 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2614 | + boolean random = CameraPane.SWITCH; |
---|
| 2615 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2163 | 2616 | group.selection.RelinkToSupport(); |
---|
2164 | | - CameraPane.RANDOM = random; |
---|
| 2617 | + CameraPane.SWITCH = random; |
---|
2165 | 2618 | |
---|
2166 | 2619 | refreshContents(); |
---|
2167 | 2620 | } else |
---|
.. | .. |
---|
2176 | 2629 | } else |
---|
2177 | 2630 | if (source == setMasterItem) |
---|
2178 | 2631 | { |
---|
2179 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2632 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2180 | 2633 | { |
---|
2181 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2634 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2182 | 2635 | |
---|
2183 | 2636 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2184 | 2637 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2191 | 2644 | { |
---|
2192 | 2645 | if (group.selection.size() == 1) |
---|
2193 | 2646 | { |
---|
2194 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2647 | + if (Grafreed.clipboard.size() == 1) |
---|
2195 | 2648 | { |
---|
2196 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2649 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2197 | 2650 | |
---|
2198 | 2651 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2199 | 2652 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2210 | 2663 | { |
---|
2211 | 2664 | RevertMeshes(); |
---|
2212 | 2665 | } else |
---|
2213 | | - if (source == resetMeshItem) |
---|
| 2666 | + if (source == resetAllItem) |
---|
2214 | 2667 | { |
---|
2215 | 2668 | ResetAll(); |
---|
2216 | 2669 | } else |
---|
.. | .. |
---|
2218 | 2671 | { |
---|
2219 | 2672 | StepAll(); |
---|
2220 | 2673 | } else |
---|
2221 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2674 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2222 | 2675 | { |
---|
2223 | 2676 | //int indices[] = jList.getSelectedIndices(); |
---|
2224 | 2677 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2230 | 2683 | { |
---|
2231 | 2684 | ClearSelection(true); |
---|
2232 | 2685 | } else |
---|
2233 | | - if (source == grabItem) |
---|
| 2686 | + if (source == grabItem || source == groupButton) |
---|
2234 | 2687 | { |
---|
2235 | | - group(new cGroup(), true); |
---|
| 2688 | + group(new cGroup(), false); // true); |
---|
2236 | 2689 | } else |
---|
2237 | 2690 | if (source == hideItem) |
---|
2238 | 2691 | { |
---|
.. | .. |
---|
2250 | 2703 | { |
---|
2251 | 2704 | makeSomething(new Camera()); |
---|
2252 | 2705 | } else |
---|
2253 | | - if (source == compositeItem) |
---|
| 2706 | + if (source == compositeItem || source == compositeButton) |
---|
2254 | 2707 | { |
---|
2255 | 2708 | group(new Composite()); |
---|
2256 | 2709 | } else |
---|
2257 | | - if (source == randomItem) |
---|
| 2710 | + if (source == switchItem || source == switchButton) |
---|
2258 | 2711 | { |
---|
2259 | 2712 | RandomNode random = new RandomNode(); |
---|
2260 | 2713 | group(random); |
---|
2261 | 2714 | if (random.size() > 0) |
---|
2262 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2715 | + random.name = random.get(0).name + "Switch"; |
---|
2263 | 2716 | } else |
---|
2264 | 2717 | if (source == physicsItem) |
---|
2265 | 2718 | { |
---|
.. | .. |
---|
2356 | 2809 | { |
---|
2357 | 2810 | group(new cLinker()); |
---|
2358 | 2811 | } else |
---|
2359 | | - if (source == textureItem) |
---|
| 2812 | + if (source == textureItem || source == textureButton) |
---|
2360 | 2813 | { |
---|
2361 | 2814 | group(new TextureNode()); |
---|
2362 | 2815 | } else |
---|
.. | .. |
---|
2376 | 2829 | { |
---|
2377 | 2830 | CastShadow(2); |
---|
2378 | 2831 | } else |
---|
2379 | | - if (source == ungroupItem) |
---|
| 2832 | + if (source == ungroupItem || source == ungroupButton) |
---|
2380 | 2833 | { |
---|
2381 | | - //ungroup(); |
---|
| 2834 | + boolean hasRoot = false; |
---|
| 2835 | + |
---|
2382 | 2836 | for (int i=0; i<group.selection.size(); i++) |
---|
2383 | 2837 | { |
---|
2384 | | - Ungroup(group.selection.get(i)); |
---|
| 2838 | + if (group.selection.get(i) == group) |
---|
| 2839 | + { |
---|
| 2840 | + hasRoot = true; |
---|
| 2841 | + break; |
---|
| 2842 | + } |
---|
2385 | 2843 | } |
---|
2386 | 2844 | |
---|
2387 | | - ClearSelection(false); |
---|
2388 | | - |
---|
2389 | | - refreshContents(); |
---|
| 2845 | + if (!hasRoot) |
---|
| 2846 | + { |
---|
| 2847 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2848 | + { |
---|
| 2849 | + Ungroup(group.selection.get(i)); |
---|
| 2850 | + } |
---|
| 2851 | + |
---|
| 2852 | + ClearSelection(false); |
---|
| 2853 | + |
---|
| 2854 | + refreshContents(); |
---|
| 2855 | + } |
---|
2390 | 2856 | } else |
---|
2391 | 2857 | if (source == genUVItem) |
---|
2392 | 2858 | { |
---|
.. | .. |
---|
2398 | 2864 | } else |
---|
2399 | 2865 | if (source == genNormalsMESHItem) |
---|
2400 | 2866 | { |
---|
2401 | | - GenNormals(true); // TODO |
---|
| 2867 | + GenNormalsMESH(); |
---|
2402 | 2868 | } else |
---|
2403 | 2869 | if (source == genNormalsORGANItem) |
---|
2404 | 2870 | { |
---|
.. | .. |
---|
2463 | 2929 | if (source == unmarkleavesItem) |
---|
2464 | 2930 | { |
---|
2465 | 2931 | MarkLeaves(false); |
---|
| 2932 | + } else |
---|
| 2933 | + if (source == rewindleavesItem) |
---|
| 2934 | + { |
---|
| 2935 | + RewindLeaves(true); |
---|
| 2936 | + } else |
---|
| 2937 | + if (source == unrewindleavesItem) |
---|
| 2938 | + { |
---|
| 2939 | + RewindLeaves(false); |
---|
| 2940 | + } else |
---|
| 2941 | + if (source == randomleavesItem) |
---|
| 2942 | + { |
---|
| 2943 | + RandomLeaves(true); |
---|
| 2944 | + } else |
---|
| 2945 | + if (source == unrandomleavesItem) |
---|
| 2946 | + { |
---|
| 2947 | + RandomLeaves(false); |
---|
2466 | 2948 | } else |
---|
2467 | 2949 | if (source == flipVItem) |
---|
2468 | 2950 | { |
---|
.. | .. |
---|
2548 | 3030 | { |
---|
2549 | 3031 | SmoothMesh(); |
---|
2550 | 3032 | } else |
---|
2551 | | - if (source == transformgeometryItem) |
---|
| 3033 | + if (source == transformGeometryItem) |
---|
2552 | 3034 | { |
---|
2553 | 3035 | TransformGeometry(); |
---|
| 3036 | + } else |
---|
| 3037 | + if (source == transformChildrenItem) |
---|
| 3038 | + { |
---|
| 3039 | + TransformChildren(); |
---|
2554 | 3040 | } else |
---|
2555 | 3041 | if (source == resetTransformItem) |
---|
2556 | 3042 | { |
---|
.. | .. |
---|
2558 | 3044 | } else |
---|
2559 | 3045 | if (source == resetCentroidItem) |
---|
2560 | 3046 | { |
---|
2561 | | - ResetCentroid(); |
---|
| 3047 | + ResetCentroid(true); |
---|
| 3048 | + } else |
---|
| 3049 | + if (source == resetCentroidXZItem) |
---|
| 3050 | + { |
---|
| 3051 | + ResetCentroid(false); |
---|
2562 | 3052 | } else |
---|
2563 | 3053 | if (source == resetParentItem) |
---|
2564 | 3054 | { |
---|
.. | .. |
---|
2690 | 3180 | if (source == twoButton) |
---|
2691 | 3181 | { |
---|
2692 | 3182 | radio.layout = twoButton; |
---|
| 3183 | + |
---|
| 3184 | + if (CameraPane.FULLSCREEN) |
---|
| 3185 | + fullscreenLayout = radio.layout; |
---|
| 3186 | + |
---|
2693 | 3187 | // bug |
---|
2694 | 3188 | //gridPanel.setDividerLocation(1.0); |
---|
2695 | 3189 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2722 | 3216 | bigThree.ClearUI(); |
---|
2723 | 3217 | bigThree.add(centralPanel); |
---|
2724 | 3218 | bigThree.FlushUI(); |
---|
| 3219 | + |
---|
| 3220 | + cameraView.requestFocusInWindow(); |
---|
| 3221 | + |
---|
| 3222 | +// refreshContents(true); |
---|
| 3223 | +// |
---|
| 3224 | +// try |
---|
| 3225 | +// { |
---|
| 3226 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3227 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3228 | +// bot.mouseMove(100, 100); |
---|
| 3229 | +// bot.mousePress(mask); |
---|
| 3230 | +// bot.mouseRelease(mask); |
---|
| 3231 | +// } |
---|
| 3232 | +// catch (Exception e) |
---|
| 3233 | +// { |
---|
| 3234 | +// |
---|
| 3235 | +// } |
---|
| 3236 | + |
---|
2725 | 3237 | } else |
---|
2726 | 3238 | if (source == threeButton) |
---|
2727 | 3239 | { |
---|
2728 | 3240 | radio.layout = threeButton; |
---|
| 3241 | + |
---|
| 3242 | + if (CameraPane.FULLSCREEN) |
---|
| 3243 | + fullscreenLayout = radio.layout; |
---|
2729 | 3244 | |
---|
2730 | 3245 | // bigThree.remove(scenePanel); |
---|
2731 | 3246 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2758 | 3273 | bigThree.add(centralPanel); |
---|
2759 | 3274 | bigThree.add(XYZPanel); |
---|
2760 | 3275 | bigThree.FlushUI(); |
---|
| 3276 | + |
---|
| 3277 | + cameraView.requestFocusInWindow(); |
---|
2761 | 3278 | } else |
---|
2762 | 3279 | if (source == fourButton) |
---|
2763 | 3280 | { |
---|
2764 | 3281 | radio.layout = fourButton; |
---|
| 3282 | + |
---|
| 3283 | + if (CameraPane.FULLSCREEN) |
---|
| 3284 | + fullscreenLayout = radio.layout; |
---|
2765 | 3285 | |
---|
2766 | 3286 | // bigThree.remove(scenePanel); |
---|
2767 | 3287 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2793 | 3313 | bigThree.ClearUI(); |
---|
2794 | 3314 | bigThree.add(scenePanel); |
---|
2795 | 3315 | bigThree.FlushUI(); |
---|
| 3316 | + |
---|
| 3317 | + cameraView.requestFocusInWindow(); |
---|
2796 | 3318 | } else |
---|
2797 | 3319 | if (source == sixButton) |
---|
2798 | 3320 | { |
---|
2799 | 3321 | radio.layout = sixButton; |
---|
| 3322 | + |
---|
| 3323 | + if (CameraPane.FULLSCREEN) |
---|
| 3324 | + fullscreenLayout = radio.layout; |
---|
2800 | 3325 | |
---|
2801 | 3326 | // bigThree.remove(scenePanel); |
---|
2802 | 3327 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2829 | 3354 | bigThree.add(scenePanel); |
---|
2830 | 3355 | bigThree.add(centralPanel); |
---|
2831 | 3356 | bigThree.FlushUI(); |
---|
| 3357 | + |
---|
| 3358 | + cameraView.requestFocusInWindow(); |
---|
2832 | 3359 | } else |
---|
2833 | 3360 | if (source == sevenButton) |
---|
2834 | 3361 | { |
---|
2835 | 3362 | radio.layout = sevenButton; |
---|
| 3363 | + |
---|
| 3364 | + if (CameraPane.FULLSCREEN) |
---|
| 3365 | + fullscreenLayout = radio.layout; |
---|
2836 | 3366 | |
---|
2837 | 3367 | // bigThree.remove(scenePanel); |
---|
2838 | 3368 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2866 | 3396 | bigThree.add(centralPanel); |
---|
2867 | 3397 | bigThree.add(XYZPanel); |
---|
2868 | 3398 | bigThree.FlushUI(); |
---|
| 3399 | + |
---|
| 3400 | + cameraView.requestFocusInWindow(); |
---|
2869 | 3401 | } else |
---|
2870 | 3402 | if (source == rootButton) |
---|
2871 | 3403 | { |
---|
.. | .. |
---|
2877 | 3409 | EditObject(obj); |
---|
2878 | 3410 | } |
---|
2879 | 3411 | |
---|
| 3412 | + cameraView.requestFocusInWindow(); |
---|
2880 | 3413 | refreshContents(true); |
---|
2881 | 3414 | } else |
---|
2882 | 3415 | if (source == closeButton) |
---|
.. | .. |
---|
2886 | 3419 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
2887 | 3420 | { |
---|
2888 | 3421 | ab = (cRadio)e.nextElement(); |
---|
2889 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3422 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
2890 | 3423 | { |
---|
| 3424 | + // Patch to avoid bug with transparency. |
---|
| 3425 | + if (!ab.hadMaterial) |
---|
| 3426 | + { |
---|
| 3427 | + ab.object.material = null; |
---|
| 3428 | + } |
---|
| 3429 | + |
---|
2891 | 3430 | buttonGroup.remove(ab); |
---|
2892 | 3431 | radioPanel.remove(ab); |
---|
2893 | 3432 | |
---|
2894 | | - ab.GetObject().editWindow = null; |
---|
| 3433 | + //ab.GetObject().editWindow = null; |
---|
| 3434 | + ab.GetObject().manipWindow = null; |
---|
2895 | 3435 | // ab.GetObject().objectUI = null; // ????????? |
---|
2896 | 3436 | |
---|
2897 | 3437 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
2898 | 3438 | break; |
---|
2899 | 3439 | } |
---|
2900 | 3440 | } |
---|
| 3441 | + |
---|
| 3442 | + cameraView.requestFocusInWindow(); |
---|
2901 | 3443 | refreshContents(true); |
---|
2902 | 3444 | } else |
---|
2903 | 3445 | if (source == editItem || source == editButton) |
---|
2904 | 3446 | { |
---|
| 3447 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3448 | + { |
---|
| 3449 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3450 | + child.pinned = true; |
---|
| 3451 | + } |
---|
| 3452 | + |
---|
2905 | 3453 | EditSelection(false); |
---|
2906 | 3454 | } else |
---|
2907 | 3455 | if (source == uneditButton) |
---|
.. | .. |
---|
2911 | 3459 | Object3D child = (Object3D)e.nextElement(); |
---|
2912 | 3460 | if(child.editWindow != null) |
---|
2913 | 3461 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3462 | + child.pinned = false; |
---|
2914 | 3463 | child.CloseUI(); |
---|
2915 | 3464 | listUI.remove(child); |
---|
2916 | 3465 | |
---|
2917 | | - child.editWindow = null; // ??????????? |
---|
| 3466 | + //child.editWindow = null; // ??????????? |
---|
2918 | 3467 | } |
---|
2919 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 3468 | + objEditor.ctrlPanel.FlushUI(); |
---|
2920 | 3469 | //objEditor.jTree.clearSelection(); |
---|
2921 | 3470 | //objEditor.ResetSliders(); |
---|
2922 | 3471 | refreshContents(true); |
---|
.. | .. |
---|
2927 | 3476 | //copy.ClearUI(); |
---|
2928 | 3477 | for (Object3D obj : listUI) |
---|
2929 | 3478 | { |
---|
| 3479 | + obj.pinned = false; |
---|
2930 | 3480 | obj.CloseUI(); |
---|
2931 | 3481 | } |
---|
2932 | 3482 | listUI.clear(); |
---|
.. | .. |
---|
2936 | 3486 | { |
---|
2937 | 3487 | assert(copy == group); |
---|
2938 | 3488 | |
---|
2939 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3489 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
2940 | 3490 | |
---|
2941 | 3491 | for (Object3D obj : listUI) |
---|
2942 | 3492 | { |
---|
.. | .. |
---|
2985 | 3535 | } |
---|
2986 | 3536 | |
---|
2987 | 3537 | copy = group; |
---|
| 3538 | + |
---|
| 3539 | + SetUndoStates(); |
---|
| 3540 | + |
---|
2988 | 3541 | //Globals.theRenderer.object = group; |
---|
2989 | 3542 | if(!useclient) |
---|
2990 | 3543 | { |
---|
.. | .. |
---|
3000 | 3553 | frontView.object = group; |
---|
3001 | 3554 | sideView.object = group; |
---|
3002 | 3555 | } |
---|
3003 | | - group.editWindow = this; |
---|
| 3556 | + |
---|
| 3557 | +// fix "+" issue |
---|
| 3558 | + //group.editWindow = this; |
---|
| 3559 | + group.manipWindow = this; |
---|
| 3560 | + |
---|
3004 | 3561 | /* |
---|
3005 | 3562 | currentLayout = radio.layout; |
---|
3006 | 3563 | if (currentLayout == null) |
---|
3007 | 3564 | currentLayout = sevenButton; |
---|
3008 | 3565 | */ |
---|
3009 | 3566 | radio.layout.doClick(); |
---|
| 3567 | + |
---|
| 3568 | + ClearUnpinned(); |
---|
| 3569 | + //Grafreed.Assert(group != null); |
---|
| 3570 | + //Grafreed.Assert(group.selection != null); |
---|
| 3571 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3572 | + if (group.selection == null || group.selection.size() == 1) |
---|
| 3573 | + EditSelection(false); |
---|
3010 | 3574 | keepparent = group.parent; |
---|
3011 | 3575 | // PARENT = NULL or not??? |
---|
3012 | 3576 | //group.parent = null; // ROOT |
---|
3013 | 3577 | //group.attributes = -1; |
---|
3014 | 3578 | ResetModel(); |
---|
| 3579 | + |
---|
| 3580 | + cameraView.requestFocusInWindow(); |
---|
3015 | 3581 | refreshContents(true); |
---|
3016 | | - } |
---|
| 3582 | + } else if (event.getSource() == editCameraItem) |
---|
| 3583 | + { |
---|
| 3584 | + cameraView.ProtectCamera(); |
---|
| 3585 | + cameraView.repaint(); |
---|
| 3586 | + return; |
---|
| 3587 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
| 3588 | + { |
---|
| 3589 | + cameraView.RevertCamera(); |
---|
| 3590 | + cameraView.repaint(); |
---|
| 3591 | + return; |
---|
| 3592 | + // } else if (event.getSource() == textureButton) |
---|
| 3593 | + // { |
---|
| 3594 | + // return; // true; |
---|
| 3595 | + } |
---|
3017 | 3596 | else |
---|
3018 | 3597 | { |
---|
3019 | 3598 | //return super.action(event, arg); |
---|
.. | .. |
---|
3022 | 3601 | } |
---|
3023 | 3602 | |
---|
3024 | 3603 | boolean useclient = false; |
---|
3025 | | - cRadio radio; |
---|
3026 | 3604 | |
---|
3027 | 3605 | void ToggleRoot() |
---|
3028 | 3606 | { |
---|
.. | .. |
---|
3074 | 3652 | refreshContents(); |
---|
3075 | 3653 | } |
---|
3076 | 3654 | |
---|
| 3655 | + void TransformChildren() |
---|
| 3656 | + { |
---|
| 3657 | + Object3D obj; |
---|
| 3658 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3659 | + { |
---|
| 3660 | + obj = (Object3D)e.nextElement(); |
---|
| 3661 | + obj.KeepTextureMatrices(); |
---|
| 3662 | + obj.TransformChildren(); |
---|
| 3663 | + obj.RestoreTextureMatrices(); |
---|
| 3664 | + |
---|
| 3665 | +// if (obj.parent == null) |
---|
| 3666 | +// { |
---|
| 3667 | +// System.out.println("NULL PARENT!"); |
---|
| 3668 | +// new Exception().printStackTrace(); |
---|
| 3669 | +// } |
---|
| 3670 | +// else |
---|
| 3671 | +// TouchTransform(obj); |
---|
| 3672 | +// //obj.parent.Touch(); |
---|
| 3673 | + } |
---|
| 3674 | + |
---|
| 3675 | + refreshContents(); |
---|
| 3676 | + } |
---|
3077 | 3677 | |
---|
3078 | 3678 | void ResetTransform() |
---|
3079 | 3679 | { |
---|
.. | .. |
---|
3186 | 3786 | refreshContents(); |
---|
3187 | 3787 | } |
---|
3188 | 3788 | |
---|
3189 | | - void ResetCentroid() |
---|
| 3789 | + void ResetCentroid(boolean full) |
---|
3190 | 3790 | { |
---|
3191 | 3791 | Object3D obj; |
---|
3192 | 3792 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3201 | 3801 | LA.matIdentity(Object3D.mat); |
---|
3202 | 3802 | obj.getBounds(minima, maxima, false); |
---|
3203 | 3803 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3204 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 3804 | + if (full) |
---|
| 3805 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3205 | 3806 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3206 | 3807 | obj.TransformMesh(Object3D.mat); |
---|
| 3808 | + |
---|
3207 | 3809 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3208 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 3810 | + if (full) |
---|
| 3811 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3209 | 3812 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 3813 | + |
---|
3210 | 3814 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3211 | 3815 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3212 | 3816 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3235 | 3839 | |
---|
3236 | 3840 | int size = obj.MemorySize(); |
---|
3237 | 3841 | |
---|
3238 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3842 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3843 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3239 | 3844 | } |
---|
3240 | 3845 | } |
---|
3241 | 3846 | catch (Exception e) |
---|
.. | .. |
---|
3272 | 3877 | obj = (Object3D)e.nextElement(); |
---|
3273 | 3878 | |
---|
3274 | 3879 | System.out.println("Object is: " + obj); |
---|
3275 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3880 | + Grafreed.AnalyzeObject(obj); |
---|
3276 | 3881 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3277 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3882 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3278 | 3883 | |
---|
3279 | 3884 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3280 | 3885 | } |
---|
.. | .. |
---|
3316 | 3921 | void GenNormals(boolean crease) |
---|
3317 | 3922 | { |
---|
3318 | 3923 | group.GenNormalsS(crease); |
---|
| 3924 | + |
---|
| 3925 | + refreshContents(); |
---|
| 3926 | + } |
---|
| 3927 | + |
---|
| 3928 | + void GenNormalsMESH() |
---|
| 3929 | + { |
---|
| 3930 | + group.GenNormalsMeshS(); |
---|
3319 | 3931 | |
---|
3320 | 3932 | refreshContents(); |
---|
3321 | 3933 | } |
---|
.. | .. |
---|
3488 | 4100 | |
---|
3489 | 4101 | void ParseVertices() |
---|
3490 | 4102 | { |
---|
3491 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3492 | | - GrafreeD.epsequal = true; |
---|
| 4103 | + boolean epsequal = Grafreed.epsequal; |
---|
| 4104 | + Grafreed.epsequal = true; |
---|
3493 | 4105 | |
---|
3494 | 4106 | for (int i=0; i<group.selection.size(); i++) |
---|
3495 | 4107 | { |
---|
.. | .. |
---|
3514 | 4126 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3515 | 4127 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3516 | 4128 | |
---|
3517 | | - g.add(GrafreeD.clipboard); |
---|
| 4129 | + g.add(Grafreed.clipboard); |
---|
3518 | 4130 | |
---|
3519 | 4131 | buffer.add(g); |
---|
3520 | 4132 | } |
---|
.. | .. |
---|
3529 | 4141 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3530 | 4142 | } |
---|
3531 | 4143 | |
---|
3532 | | - GrafreeD.epsequal = epsequal; |
---|
| 4144 | + Grafreed.epsequal = epsequal; |
---|
3533 | 4145 | |
---|
3534 | 4146 | refreshContents(); |
---|
3535 | 4147 | } |
---|
.. | .. |
---|
3547 | 4159 | String pigment = Object3D.GetPigment(tex); |
---|
3548 | 4160 | //String bump = Object3D.GetBump(tex); |
---|
3549 | 4161 | |
---|
3550 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4162 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 4163 | + |
---|
| 4164 | + try |
---|
| 4165 | + { |
---|
| 4166 | + texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4167 | + } |
---|
| 4168 | + catch (Exception e) |
---|
| 4169 | + { |
---|
| 4170 | + System.err.println("FAIL: " + node); |
---|
| 4171 | + } |
---|
3551 | 4172 | |
---|
3552 | 4173 | double s = v.s; |
---|
3553 | 4174 | |
---|
.. | .. |
---|
3635 | 4256 | |
---|
3636 | 4257 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3637 | 4258 | |
---|
3638 | | - boolean random = CameraPane.RANDOM; |
---|
3639 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 4259 | + boolean random = CameraPane.SWITCH; |
---|
| 4260 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3640 | 4261 | lowres.linkVerticesThis(null); |
---|
3641 | 4262 | lowres.linkVerticesThis(sn); |
---|
3642 | | - CameraPane.RANDOM = random; |
---|
| 4263 | + CameraPane.SWITCH = random; |
---|
3643 | 4264 | |
---|
3644 | 4265 | System.err.flush(); |
---|
3645 | 4266 | |
---|
.. | .. |
---|
3679 | 4300 | return; |
---|
3680 | 4301 | |
---|
3681 | 4302 | Object3D poses = group.selection.get(0); |
---|
3682 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 4303 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3683 | 4304 | |
---|
3684 | 4305 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3685 | 4306 | |
---|
.. | .. |
---|
3873 | 4494 | |
---|
3874 | 4495 | void ClipMesh() |
---|
3875 | 4496 | { |
---|
3876 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4497 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3877 | 4498 | { |
---|
3878 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4499 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3879 | 4500 | |
---|
3880 | 4501 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3881 | 4502 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3884 | 4505 | // { |
---|
3885 | 4506 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3886 | 4507 | // } |
---|
3887 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4508 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3888 | 4509 | } |
---|
3889 | 4510 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3890 | 4511 | System.out.println("DONE."); |
---|
.. | .. |
---|
3931 | 4552 | void MarkLeaves(boolean hide) |
---|
3932 | 4553 | { |
---|
3933 | 4554 | group.selection.MarkLeaves(hide); |
---|
| 4555 | + refreshContents(); |
---|
| 4556 | + } |
---|
| 4557 | + |
---|
| 4558 | + void RewindLeaves(boolean hide) |
---|
| 4559 | + { |
---|
| 4560 | + group.selection.RewindLeaves(hide); |
---|
| 4561 | + refreshContents(); |
---|
| 4562 | + } |
---|
| 4563 | + |
---|
| 4564 | + void RandomLeaves(boolean hide) |
---|
| 4565 | + { |
---|
| 4566 | + group.selection.RandomLeaves(hide); |
---|
3934 | 4567 | refreshContents(); |
---|
3935 | 4568 | } |
---|
3936 | 4569 | |
---|
.. | .. |
---|
4005 | 4638 | // } |
---|
4006 | 4639 | // } |
---|
4007 | 4640 | |
---|
4008 | | - static boolean allparams = true; |
---|
4009 | | - |
---|
4010 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4011 | | - |
---|
4012 | 4641 | void EditSelection(boolean newWindow) |
---|
4013 | 4642 | { |
---|
| 4643 | + if (group.selection == null) |
---|
| 4644 | + { |
---|
| 4645 | + EditElement(group, newWindow); // ? new |
---|
| 4646 | + return; |
---|
| 4647 | + } |
---|
| 4648 | + |
---|
4014 | 4649 | // aConstraints.gridy = 0; |
---|
4015 | 4650 | for (int i=0; i<group.selection.size(); i++) |
---|
4016 | 4651 | { |
---|
4017 | 4652 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4018 | 4653 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4019 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4654 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4020 | 4655 | |
---|
4021 | 4656 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4022 | | - if(elem != group) |
---|
| 4657 | + if(elem != group || !newWindow) |
---|
4023 | 4658 | { |
---|
4024 | | - // if (!(elem instanceof Composite)) |
---|
4025 | | - // newWindow = false; |
---|
4026 | | - listUI.add(elem); |
---|
4027 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4028 | | - System.out.println("edit : " + elem); |
---|
4029 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4659 | + EditElement(elem, newWindow); // ? new |
---|
4030 | 4660 | } |
---|
4031 | 4661 | } |
---|
4032 | 4662 | } |
---|
.. | .. |
---|
4101 | 4731 | //new Exception().printStackTrace(); |
---|
4102 | 4732 | |
---|
4103 | 4733 | freezemodel = true; |
---|
4104 | | - |
---|
| 4734 | + ClearUnpinned(); |
---|
| 4735 | + |
---|
4105 | 4736 | /**/ |
---|
4106 | 4737 | //switch (event.id) |
---|
4107 | 4738 | { |
---|
.. | .. |
---|
4109 | 4740 | //case 702: // Event.LIST_DESELECT |
---|
4110 | 4741 | group.deselectAll(); |
---|
4111 | 4742 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4112 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4113 | 4743 | if (tps != null) |
---|
4114 | 4744 | { |
---|
4115 | 4745 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4118 | 4748 | |
---|
4119 | 4749 | //if (child.parent != null) |
---|
4120 | 4750 | //child.parent.addSelectee(child); |
---|
| 4751 | + objEditor.SetMaterial(child); |
---|
4121 | 4752 | group.addSelectee(child); |
---|
4122 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4123 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4124 | | - System.err.println("info : " + child.GetPath()); |
---|
4125 | 4753 | } |
---|
4126 | 4754 | } |
---|
4127 | | - else |
---|
4128 | | - { |
---|
4129 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
4130 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
4131 | | - System.err.println("info : " + group.GetPath()); |
---|
4132 | | - } |
---|
| 4755 | +// else |
---|
| 4756 | +// { |
---|
| 4757 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4758 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4759 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4760 | +// } |
---|
4133 | 4761 | |
---|
4134 | | - objEditor.SetText(); // jan 2014 |
---|
4135 | | - |
---|
4136 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4762 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4137 | 4763 | CameraPane.flash = true; |
---|
4138 | 4764 | |
---|
4139 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 4765 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4140 | 4766 | // a camera |
---|
4141 | 4767 | { |
---|
4142 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4143 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4768 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
| 4769 | + { |
---|
| 4770 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 4771 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4772 | + } |
---|
4144 | 4773 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4145 | 4774 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4146 | 4775 | } |
---|
4147 | 4776 | |
---|
| 4777 | + if (tps != null && tps.length == 1) |
---|
| 4778 | + { |
---|
| 4779 | + EditSelection(false); |
---|
| 4780 | + } |
---|
| 4781 | + |
---|
| 4782 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 4783 | + |
---|
4148 | 4784 | refreshContents(); |
---|
4149 | 4785 | //return true; |
---|
4150 | 4786 | } |
---|
.. | .. |
---|
4153 | 4789 | |
---|
4154 | 4790 | freezemodel = false; |
---|
4155 | 4791 | } |
---|
| 4792 | + |
---|
| 4793 | + void SetPinStates(boolean enabled) |
---|
| 4794 | + { |
---|
| 4795 | + editButton.setEnabled(enabled); |
---|
| 4796 | + uneditButton.setEnabled(enabled); |
---|
| 4797 | + unselectButton.setEnabled(enabled); |
---|
| 4798 | + flashSelectionButton.setEnabled(enabled); |
---|
| 4799 | + } |
---|
| 4800 | + |
---|
| 4801 | + void refreshContents(boolean cp) |
---|
| 4802 | + { |
---|
| 4803 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 4804 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
| 4805 | + { |
---|
| 4806 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4807 | + |
---|
| 4808 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4809 | + { |
---|
| 4810 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4811 | + |
---|
| 4812 | + objEditor.AddInfo(child, this, true); |
---|
| 4813 | + System.err.println("info : " + child.GetPath()); |
---|
| 4814 | + } |
---|
| 4815 | + |
---|
| 4816 | + objEditor.SetText(); // jan 2014 |
---|
| 4817 | + } |
---|
| 4818 | + |
---|
| 4819 | + super.refreshContents(cp); |
---|
| 4820 | + } |
---|
4156 | 4821 | |
---|
4157 | 4822 | void linkSomething(Object3D thing) |
---|
4158 | 4823 | { |
---|
.. | .. |
---|
4224 | 4889 | { |
---|
4225 | 4890 | if (group.selection.isEmpty()) |
---|
4226 | 4891 | return; |
---|
4227 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4892 | + |
---|
| 4893 | + Grafreed.clipboardIsTempGroup = false; |
---|
4228 | 4894 | Composite tGroup = null; |
---|
4229 | 4895 | if (group.selection.size() > 0) // 1) |
---|
4230 | 4896 | { |
---|
4231 | 4897 | tGroup = new cGroup(); |
---|
4232 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4898 | + Grafreed.clipboardIsTempGroup = true; |
---|
4233 | 4899 | } |
---|
4234 | 4900 | |
---|
4235 | 4901 | if (cut) |
---|
4236 | 4902 | { |
---|
| 4903 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4904 | +// Save(); |
---|
4237 | 4905 | //int indices[] = jList.getSelectedIndices(); |
---|
4238 | 4906 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4239 | 4907 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4269 | 4937 | //System.out.println("cut " + child); |
---|
4270 | 4938 | //System.out.println("parent = " + child.parent); |
---|
4271 | 4939 | // tmp.addChild(child); |
---|
4272 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4940 | + if (Grafreed.clipboardIsTempGroup) |
---|
4273 | 4941 | tGroup.add/*Child*/(tmp); |
---|
4274 | 4942 | else |
---|
4275 | | - GrafreeD.clipboard = tmp; |
---|
| 4943 | + Grafreed.clipboard = tmp; |
---|
4276 | 4944 | } |
---|
4277 | 4945 | else |
---|
4278 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4946 | + if (Grafreed.clipboardIsTempGroup) |
---|
4279 | 4947 | tGroup.add/*Child*/(child); |
---|
4280 | 4948 | else |
---|
4281 | | - GrafreeD.clipboard = child; |
---|
| 4949 | + Grafreed.clipboard = child; |
---|
4282 | 4950 | } |
---|
4283 | 4951 | |
---|
4284 | 4952 | //ResetModel(); |
---|
.. | .. |
---|
4310 | 4978 | //System.out.println("cut " + elem); |
---|
4311 | 4979 | //System.out.println("parent = " + elem.parent); |
---|
4312 | 4980 | // tmp.addChild(elem); |
---|
4313 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4981 | + if (Grafreed.clipboardIsTempGroup) |
---|
4314 | 4982 | tGroup.add/*Child*/(tmp); |
---|
4315 | 4983 | else |
---|
4316 | | - GrafreeD.clipboard = tmp; |
---|
| 4984 | + Grafreed.clipboard = tmp; |
---|
4317 | 4985 | } |
---|
4318 | 4986 | else |
---|
4319 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4987 | + if (Grafreed.clipboardIsTempGroup) |
---|
4320 | 4988 | tGroup.add/*Child*/(child); |
---|
4321 | 4989 | else |
---|
4322 | | - GrafreeD.clipboard = child; |
---|
| 4990 | + Grafreed.clipboard = child; |
---|
4323 | 4991 | } |
---|
4324 | 4992 | |
---|
4325 | 4993 | } |
---|
4326 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4327 | | - GrafreeD.clipboard = tGroup; |
---|
| 4994 | + |
---|
| 4995 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4996 | + Grafreed.clipboard = tGroup; |
---|
| 4997 | + |
---|
4328 | 4998 | if (cut) |
---|
4329 | 4999 | { |
---|
4330 | 5000 | ResetModel(); |
---|
.. | .. |
---|
4334 | 5004 | |
---|
4335 | 5005 | void paste(boolean expand) |
---|
4336 | 5006 | { |
---|
| 5007 | + if (Globals.REPLACEONMAKE) |
---|
| 5008 | + Save(); |
---|
| 5009 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5010 | + Globals.REPLACEONMAKE = false; |
---|
4337 | 5011 | // if (GrafreeD.clipboard == null) |
---|
4338 | 5012 | // return; |
---|
4339 | 5013 | boolean first = true; |
---|
4340 | 5014 | |
---|
4341 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5015 | + if (Grafreed.clipboardIsTempGroup) |
---|
4342 | 5016 | { |
---|
4343 | 5017 | Composite temp; |
---|
4344 | 5018 | |
---|
.. | .. |
---|
4349 | 5023 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4350 | 5024 | */ |
---|
4351 | 5025 | Object3D elem; |
---|
4352 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 5026 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4353 | 5027 | { |
---|
4354 | 5028 | Object3D child = (Object3D)e.nextElement(); |
---|
4355 | 5029 | |
---|
.. | .. |
---|
4383 | 5057 | //Object3D cb = Applet3D.clipboard; |
---|
4384 | 5058 | //temp.addChild(cb); |
---|
4385 | 5059 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4386 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4387 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4388 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4389 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4390 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 5060 | + assert(Grafreed.clipboard.parent == null); |
---|
| 5061 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 5062 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 5063 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 5064 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4391 | 5065 | else |
---|
4392 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4393 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 5066 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 5067 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4394 | 5068 | } |
---|
4395 | 5069 | |
---|
| 5070 | + Globals.REPLACEONMAKE = keep; |
---|
4396 | 5071 | ResetModel(); |
---|
4397 | 5072 | refreshContents(); |
---|
4398 | 5073 | } |
---|
4399 | 5074 | |
---|
4400 | | - void pasteInto(boolean copyit) |
---|
| 5075 | + void pasteInto(boolean copyit, boolean clone) |
---|
4401 | 5076 | { |
---|
4402 | 5077 | // if (GrafreeD.clipboard == null) |
---|
4403 | 5078 | // return; |
---|
.. | .. |
---|
4426 | 5101 | if (copyit) |
---|
4427 | 5102 | { |
---|
4428 | 5103 | // paste(false); |
---|
4429 | | - CloneClipboard(false); // sept 2014 |
---|
| 5104 | + if (clone) |
---|
| 5105 | + { |
---|
| 5106 | + CloneClipboard(false); // sept 2014 |
---|
| 5107 | + } |
---|
| 5108 | + else |
---|
| 5109 | + { |
---|
| 5110 | + paste(false); |
---|
| 5111 | + } |
---|
4430 | 5112 | } |
---|
4431 | 5113 | else |
---|
4432 | 5114 | { |
---|
4433 | 5115 | boolean first = true; |
---|
4434 | 5116 | |
---|
4435 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5117 | + if (Grafreed.clipboardIsTempGroup) |
---|
4436 | 5118 | { |
---|
4437 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 5119 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4438 | 5120 | Object3D copy; |
---|
4439 | 5121 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4440 | 5122 | { |
---|
.. | .. |
---|
4444 | 5126 | } |
---|
4445 | 5127 | } else |
---|
4446 | 5128 | { |
---|
4447 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 5129 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4448 | 5130 | } |
---|
4449 | 5131 | } |
---|
4450 | 5132 | } |
---|
.. | .. |
---|
4521 | 5203 | |
---|
4522 | 5204 | void group(Object3D csg, boolean grab) |
---|
4523 | 5205 | { |
---|
| 5206 | + if (Globals.REPLACEONMAKE) |
---|
| 5207 | + Save(); |
---|
| 5208 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5209 | + Globals.REPLACEONMAKE = false; |
---|
4524 | 5210 | if (//false) // why?? |
---|
4525 | 5211 | !group.selection.isEmpty()) |
---|
4526 | 5212 | { |
---|
.. | .. |
---|
4634 | 5320 | //node.add(csg); |
---|
4635 | 5321 | //makeSomething(node); |
---|
4636 | 5322 | makeSomething(csg); |
---|
| 5323 | + Globals.REPLACEONMAKE = keep; |
---|
4637 | 5324 | } |
---|
4638 | 5325 | |
---|
4639 | 5326 | void Ungroup(Object3D g) |
---|
4640 | 5327 | { |
---|
| 5328 | + if (Globals.REPLACEONMAKE) |
---|
| 5329 | + Save(); |
---|
| 5330 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5331 | + Globals.REPLACEONMAKE = false; |
---|
4641 | 5332 | if (g instanceof HiddenObject) |
---|
4642 | 5333 | { |
---|
4643 | 5334 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
4654 | 5345 | objEditor.makeSomething(g.get(i), false); |
---|
4655 | 5346 | } |
---|
4656 | 5347 | } |
---|
| 5348 | + Globals.REPLACEONMAKE = keep; |
---|
4657 | 5349 | } |
---|
4658 | 5350 | |
---|
4659 | 5351 | void ungroup() |
---|
.. | .. |
---|
4849 | 5541 | } |
---|
4850 | 5542 | */ |
---|
4851 | 5543 | |
---|
4852 | | - void ImportGFD() |
---|
4853 | | - { |
---|
4854 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4855 | | - browser.show(); |
---|
4856 | | - String filename = browser.getFile(); |
---|
4857 | | - if (filename != null && filename.length() > 0) |
---|
4858 | | - { |
---|
4859 | | - String fullname = browser.getDirectory() + filename; |
---|
4860 | | - |
---|
4861 | | - //Object3D readobj = |
---|
4862 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4863 | | - //makeSomething(readobj); |
---|
4864 | | - } |
---|
4865 | | - } |
---|
4866 | | - |
---|
4867 | 5544 | /* |
---|
4868 | 5545 | public void Callback(Object obj) |
---|
4869 | 5546 | { |
---|
.. | .. |
---|
4887 | 5564 | } |
---|
4888 | 5565 | */ |
---|
4889 | 5566 | |
---|
4890 | | - void ImportVRMLX3D() |
---|
4891 | | - { |
---|
4892 | | - if (GrafreeD.standAlone) |
---|
4893 | | - { |
---|
4894 | | - /**/ |
---|
4895 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4896 | | - browser.show(); |
---|
4897 | | - String filename = browser.getFile(); |
---|
4898 | | - if (filename != null && filename.length() > 0) |
---|
4899 | | - { |
---|
4900 | | - String fullname = browser.getDirectory() + filename; |
---|
4901 | | - LoadVRMLX3D(fullname); |
---|
4902 | | - } |
---|
4903 | | - /**/ |
---|
4904 | | - } |
---|
4905 | | - } |
---|
4906 | | - |
---|
4907 | 5567 | String GetFile(String dialogName) |
---|
4908 | 5568 | { |
---|
4909 | | - if (GrafreeD.standAlone) |
---|
| 5569 | + if (Grafreed.standAlone) |
---|
4910 | 5570 | { |
---|
4911 | 5571 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4912 | 5572 | browser.show(); |
---|
.. | .. |
---|
4970 | 5630 | cButton flashSelectionButton; |
---|
4971 | 5631 | cButton editButton; |
---|
4972 | 5632 | cButton uneditButton; |
---|
| 5633 | + JCheckBox allParamsButton; |
---|
4973 | 5634 | cButton clearpanelButton; |
---|
4974 | | - cButton allParamsButton; |
---|
4975 | 5635 | cButton unselectButton; |
---|
4976 | 5636 | |
---|
| 5637 | + cButton restoreCameraButton; |
---|
| 5638 | + |
---|
| 5639 | + cButton saveButton; |
---|
| 5640 | + cButton oneStepButton; |
---|
| 5641 | + |
---|
| 5642 | + cButton groupButton; |
---|
| 5643 | + cButton ungroupButton; |
---|
| 5644 | + cButton compositeButton; |
---|
| 5645 | + cButton switchButton; |
---|
| 5646 | + cButton loopButton; |
---|
| 5647 | + cButton textureButton; |
---|
| 5648 | + |
---|
| 5649 | + cButton gridButton; |
---|
| 5650 | + cButton boxButton; |
---|
| 5651 | + cButton sphereButton; |
---|
| 5652 | + cButton coneButton; |
---|
| 5653 | + cButton torusButton; |
---|
| 5654 | + cButton superButton; |
---|
| 5655 | + cButton kleinButton; |
---|
| 5656 | + cButton particlesButton; |
---|
| 5657 | + cButton overlayButton; |
---|
| 5658 | + cButton lightButton; |
---|
| 5659 | + |
---|
4977 | 5660 | cButton screenfitButton; |
---|
4978 | 5661 | cButton screenfitpointButton; |
---|
4979 | 5662 | cButton snapobjectButton; |
---|
.. | .. |
---|
4985 | 5668 | |
---|
4986 | 5669 | cButton setsupportButton; |
---|
4987 | 5670 | |
---|
4988 | | - cButton twoButton; |
---|
4989 | | - cButton sixButton; |
---|
4990 | | - cButton threeButton; |
---|
4991 | | - cButton sevenButton; |
---|
4992 | | - cButton fourButton; // full panel |
---|
4993 | | - cButton oneButton; // full XYZ |
---|
4994 | | - //cButton currentLayout; |
---|
4995 | | - |
---|
4996 | 5671 | // |
---|
4997 | 5672 | //Composite |
---|
4998 | 5673 | Object3D // to do !! |
---|
.. | .. |
---|
5002 | 5677 | //JTree jTree; |
---|
5003 | 5678 | private MenuItem lookAtItem; |
---|
5004 | 5679 | private MenuItem lookFromItem; |
---|
5005 | | - private MenuItem switchItem; |
---|
| 5680 | + private MenuItem switchViewItem; |
---|
5006 | 5681 | private MenuItem cutItem; |
---|
5007 | | - private MenuItem duplicateItem; |
---|
| 5682 | + private MenuItem undoItem; |
---|
| 5683 | + private MenuItem redoItem; |
---|
| 5684 | + private JMenuItem duplicateItem; |
---|
5008 | 5685 | private MenuItem cloneItem; |
---|
5009 | 5686 | private MenuItem cloneSupportItem; |
---|
5010 | 5687 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5017 | 5694 | private MenuItem linkverticesItem; |
---|
5018 | 5695 | private MenuItem relinkverticesItem; |
---|
5019 | 5696 | private MenuItem setMasterItem; |
---|
5020 | | - private MenuItem resetMeshItem; |
---|
| 5697 | + private MenuItem resetAllItem; |
---|
5021 | 5698 | private MenuItem stepAllItem; |
---|
5022 | 5699 | private MenuItem revertMeshItem; |
---|
5023 | 5700 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5028 | 5705 | private MenuItem mergeGeometriesItem; |
---|
5029 | 5706 | private MenuItem copyItem; |
---|
5030 | 5707 | private MenuItem pasteItem; |
---|
| 5708 | + private MenuItem pasteIntoItem; |
---|
5031 | 5709 | private MenuItem pasteLinkItem; |
---|
5032 | 5710 | private MenuItem pasteCloneItem; |
---|
5033 | 5711 | private MenuItem pasteExpandItem; |
---|
5034 | | - private MenuItem clearItem; |
---|
| 5712 | + private MenuItem deleteItem; |
---|
5035 | 5713 | private MenuItem clearAllItem; |
---|
5036 | 5714 | private MenuItem genUVItem; |
---|
5037 | 5715 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5066 | 5744 | private MenuItem showleavesItem; |
---|
5067 | 5745 | private MenuItem markleavesItem; |
---|
5068 | 5746 | private MenuItem unmarkleavesItem; |
---|
| 5747 | + private MenuItem rewindleavesItem; |
---|
| 5748 | + private MenuItem unrewindleavesItem; |
---|
| 5749 | + private MenuItem randomleavesItem; |
---|
| 5750 | + private MenuItem unrandomleavesItem; |
---|
5069 | 5751 | |
---|
5070 | 5752 | private MenuItem flipVItem; |
---|
5071 | 5753 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5077 | 5759 | private MenuItem panoTexturesItem; |
---|
5078 | 5760 | |
---|
5079 | 5761 | private MenuItem resetCentroidItem; |
---|
5080 | | - private MenuItem transformgeometryItem; |
---|
| 5762 | + private MenuItem resetCentroidXZItem; |
---|
5081 | 5763 | private MenuItem resetTransformItem; |
---|
| 5764 | + private MenuItem transformGeometryItem; |
---|
| 5765 | + private MenuItem transformChildrenItem; |
---|
5082 | 5766 | private MenuItem hideItem; |
---|
5083 | 5767 | private MenuItem grabItem; |
---|
5084 | 5768 | private MenuItem backItem; |
---|
5085 | 5769 | private MenuItem frontItem; |
---|
5086 | 5770 | private MenuItem cameraItem; |
---|
5087 | 5771 | private MenuItem compositeItem; |
---|
5088 | | - private MenuItem randomItem; |
---|
| 5772 | + private MenuItem switchItem; |
---|
5089 | 5773 | private MenuItem physicsItem; |
---|
5090 | 5774 | private MenuItem frameselectorItem; |
---|
5091 | 5775 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5125 | 5809 | private MenuItem blobItem; |
---|
5126 | 5810 | private MenuItem latheItem; |
---|
5127 | 5811 | private MenuItem bezierItem; |
---|
5128 | | - private MenuItem checkerItem; |
---|
| 5812 | + private MenuItem overlayItem; |
---|
5129 | 5813 | private MenuItem meshItem; |
---|
5130 | 5814 | // private MenuItem meshGroupItem; |
---|
5131 | 5815 | private MenuItem springItem; |
---|
.. | .. |
---|
5147 | 5831 | private MenuItem doubleItem; |
---|
5148 | 5832 | private MenuItem tripleItem; |
---|
5149 | 5833 | |
---|
5150 | | - private MenuItem importGFDItem; |
---|
5151 | | - private MenuItem importVRMLX3DItem; |
---|
5152 | | - private MenuItem import3DSItem; |
---|
5153 | | - private MenuItem importOBJItem; |
---|
5154 | | - |
---|
5155 | 5834 | private MenuItem computeAOItem; |
---|
5156 | 5835 | private MenuItem recompileItem; |
---|
5157 | 5836 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5161 | 5840 | private MenuItem analyzeItem; |
---|
5162 | 5841 | private MenuItem dumpItem; |
---|
5163 | 5842 | //boolean freezemodel = false; |
---|
| 5843 | + |
---|
| 5844 | + Menu cameraMenu; |
---|
| 5845 | + MenuItem editCameraItem; |
---|
| 5846 | + MenuItem restoreCameraItem; |
---|
5164 | 5847 | } |
---|