.. | .. |
---|
319 | 319 | toggleTextureItem.addItemListener(this); |
---|
320 | 320 | toggleTextureItem.setState(CameraPane.textureon); |
---|
321 | 321 | |
---|
| 322 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 323 | + toggleSwitchItem.addItemListener(this); |
---|
| 324 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 325 | + |
---|
| 326 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 327 | + toggleHandleItem.addItemListener(this); |
---|
| 328 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 329 | + |
---|
| 330 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 331 | + togglePaintItem.addItemListener(this); |
---|
| 332 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 333 | + |
---|
322 | 334 | if (Globals.ADVANCED) |
---|
323 | 335 | { |
---|
| 336 | + cameraMenu.add("-"); |
---|
324 | 337 | cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
325 | 338 | toggleLiveItem.addItemListener(this); |
---|
326 | 339 | toggleLiveItem.setState(Globals.isLIVE()); |
---|
.. | .. |
---|
350 | 363 | cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
351 | 364 | toggleTimelineItem.addItemListener(this); |
---|
352 | 365 | } |
---|
353 | | - |
---|
354 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
355 | | - toggleSwitchItem.addItemListener(this); |
---|
356 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
357 | | - |
---|
358 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
359 | | - toggleHandleItem.addItemListener(this); |
---|
360 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
361 | | - |
---|
362 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
363 | | - togglePaintItem.addItemListener(this); |
---|
364 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
365 | 366 | |
---|
366 | 367 | // cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
367 | 368 | // toggleRootItem.addItemListener(this); |
---|
.. | .. |
---|
751 | 752 | protected static ImageIcon createImageIcon(String path, |
---|
752 | 753 | String description) |
---|
753 | 754 | { |
---|
754 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 755 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
755 | 756 | if (imgURL != null) |
---|
756 | 757 | { |
---|
757 | 758 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
1329 | 1330 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1330 | 1331 | |
---|
1331 | 1332 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1332 | | - scenePanel.preferredWidth = 7; |
---|
| 1333 | + scenePanel.preferredWidth = 6; |
---|
1333 | 1334 | |
---|
1334 | 1335 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1335 | 1336 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1435 | 1436 | |
---|
1436 | 1437 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1437 | 1438 | |
---|
1438 | | - frame.setSize(1024, 768); |
---|
1439 | | - frame.show(); |
---|
| 1439 | + frame.setSize(1280, 860); |
---|
| 1440 | + frame.setVisible(true); |
---|
1440 | 1441 | |
---|
1441 | 1442 | gridPanel.setDividerLocation(1.0); |
---|
1442 | 1443 | |
---|
.. | .. |
---|
1475 | 1476 | |
---|
1476 | 1477 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1477 | 1478 | |
---|
1478 | | - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1479 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1479 | 1480 | createMaterialButton.setToolTipText("Create material"); |
---|
1480 | 1481 | |
---|
1481 | 1482 | /* |
---|
1482 | 1483 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1483 | 1484 | */ |
---|
1484 | 1485 | |
---|
1485 | | - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1486 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1486 | 1487 | clearMaterialButton.setToolTipText("Clear material"); |
---|
1487 | 1488 | |
---|
1488 | 1489 | if (Globals.ADVANCED) |
---|
1489 | 1490 | { |
---|
1490 | | - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1491 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1491 | 1492 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1492 | 1493 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1493 | 1494 | } |
---|
.. | .. |
---|
1938 | 1939 | |
---|
1939 | 1940 | //? flashIt = false; |
---|
1940 | 1941 | CameraPane pane = (CameraPane) cameraView; |
---|
1941 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1942 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1942 | 1943 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1943 | 1944 | |
---|
1944 | 1945 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2395 | 2396 | |
---|
2396 | 2397 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2397 | 2398 | { |
---|
2398 | | - if (GrafreeD.standAlone) |
---|
| 2399 | + if (Grafreed.standAlone) |
---|
2399 | 2400 | { |
---|
2400 | 2401 | /**/ |
---|
2401 | 2402 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2402 | | - browser.show(); |
---|
| 2403 | + browser.setVisible(true); |
---|
2403 | 2404 | String filename = browser.getFile(); |
---|
2404 | 2405 | if (filename != null && filename.length() > 0) |
---|
2405 | 2406 | { |
---|
.. | .. |
---|
3254 | 3255 | |
---|
3255 | 3256 | Globals.ANIMATION ^= true; |
---|
3256 | 3257 | |
---|
3257 | | - GrafreeD.wav.cursor = 0; |
---|
3258 | | - GrafreeD.wav.loop = 0; |
---|
| 3258 | + Grafreed.wav.cursor = 0; |
---|
| 3259 | + Grafreed.wav.loop = 0; |
---|
3259 | 3260 | } |
---|
3260 | 3261 | } else |
---|
3261 | 3262 | { |
---|
.. | .. |
---|
3276 | 3277 | callee.refreshContents(); |
---|
3277 | 3278 | } else |
---|
3278 | 3279 | { |
---|
3279 | | - new Exception().printStackTrace(); |
---|
3280 | 3280 | System.exit(0); |
---|
3281 | 3281 | } |
---|
3282 | 3282 | } |
---|
.. | .. |
---|
3443 | 3443 | { |
---|
3444 | 3444 | //System.out.println("Propagate = " + propagate); |
---|
3445 | 3445 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3446 | + |
---|
| 3447 | + if (copy.material != null) |
---|
| 3448 | + { |
---|
| 3449 | + cMaterial mat = copy.material; |
---|
| 3450 | + |
---|
| 3451 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3452 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3453 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3454 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3455 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3456 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3457 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3458 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3459 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3460 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3461 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3462 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3463 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3464 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3465 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3466 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3467 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3468 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3469 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3470 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3471 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3472 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3473 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3474 | + } |
---|
| 3475 | + |
---|
3446 | 3476 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3447 | 3477 | { |
---|
3448 | 3478 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
4170 | 4200 | |
---|
4171 | 4201 | void load() // throws ClassNotFoundException |
---|
4172 | 4202 | { |
---|
4173 | | - if (GrafreeD.standAlone) |
---|
| 4203 | + if (Grafreed.standAlone) |
---|
4174 | 4204 | { |
---|
4175 | 4205 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4176 | 4206 | browser.show(); |
---|
.. | .. |
---|
4275 | 4305 | |
---|
4276 | 4306 | void saveAs() |
---|
4277 | 4307 | { |
---|
4278 | | - if (GrafreeD.standAlone) |
---|
| 4308 | + if (Grafreed.standAlone) |
---|
4279 | 4309 | { |
---|
4280 | 4310 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4281 | 4311 | browser.setVisible(true); |
---|
.. | .. |
---|
4386 | 4416 | Object3D objectparent = obj.parent; |
---|
4387 | 4417 | obj.parent = null; |
---|
4388 | 4418 | |
---|
4389 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4419 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4390 | 4420 | |
---|
4391 | 4421 | obj.parent = objectparent; |
---|
4392 | 4422 | |
---|
.. | .. |
---|
4420 | 4450 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4421 | 4451 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4422 | 4452 | copy.generatePOV(buffer); |
---|
4423 | | - if (GrafreeD.standAlone) |
---|
| 4453 | + if (Grafreed.standAlone) |
---|
4424 | 4454 | { |
---|
4425 | 4455 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4426 | 4456 | browser.show(); |
---|