.. | .. |
---|
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); |
---|
.. | .. |
---|
500 | 501 | //SendInfo("Name:", "bold"); |
---|
501 | 502 | if (sel.GetTextures() != null || debug) |
---|
502 | 503 | { |
---|
503 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 504 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
504 | 505 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
505 | 506 | if (sel.Size() > 0) |
---|
506 | 507 | { |
---|
507 | 508 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
508 | 509 | } |
---|
509 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 510 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
510 | 511 | if (debug) |
---|
511 | 512 | { |
---|
512 | 513 | try |
---|
.. | .. |
---|
548 | 549 | } |
---|
549 | 550 | if (sel.support != null) |
---|
550 | 551 | { |
---|
551 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 552 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
552 | 553 | } |
---|
553 | 554 | if (sel.scriptnode != null) |
---|
554 | 555 | { |
---|
.. | .. |
---|
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); |
---|
.. | .. |
---|
783 | 784 | // NumberSlider vDivsField; |
---|
784 | 785 | // JCheckBox endcaps; |
---|
785 | 786 | JCheckBox liveCB; |
---|
| 787 | + JCheckBox selectCB; |
---|
786 | 788 | JCheckBox hideCB; |
---|
787 | 789 | JCheckBox link2masterCB; |
---|
788 | 790 | JCheckBox markCB; |
---|
.. | .. |
---|
985 | 987 | |
---|
986 | 988 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
987 | 989 | liveCB.setToolTipText("Animate object"); |
---|
| 990 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 991 | + selectCB.setToolTipText("Make object selectable"); |
---|
| 992 | +// Return(); |
---|
988 | 993 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
989 | 994 | hideCB.setToolTipText("Hide object"); |
---|
990 | | -// Return(); |
---|
991 | 995 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
992 | 996 | markCB.setToolTipText("Set the animation target transform"); |
---|
993 | 997 | |
---|
.. | .. |
---|
1027 | 1031 | oe.ctrlPanel.add(commandsPanel); |
---|
1028 | 1032 | oe.ctrlPanel.Return(); |
---|
1029 | 1033 | |
---|
1030 | | - pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1034 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
1031 | 1035 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1032 | 1036 | //Return(); |
---|
1033 | 1037 | |
---|
.. | .. |
---|
1329 | 1333 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1330 | 1334 | |
---|
1331 | 1335 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1332 | | - scenePanel.preferredWidth = 7; |
---|
| 1336 | + scenePanel.preferredWidth = 6; |
---|
1333 | 1337 | |
---|
1334 | 1338 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1335 | 1339 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1435 | 1439 | |
---|
1436 | 1440 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1437 | 1441 | |
---|
1438 | | - frame.setSize(1024, 768); |
---|
1439 | | - frame.show(); |
---|
| 1442 | + frame.setSize(1280, 860); |
---|
| 1443 | + frame.setVisible(true); |
---|
1440 | 1444 | |
---|
1441 | 1445 | gridPanel.setDividerLocation(1.0); |
---|
1442 | 1446 | |
---|
.. | .. |
---|
1475 | 1479 | |
---|
1476 | 1480 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1477 | 1481 | |
---|
1478 | | - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1482 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1479 | 1483 | createMaterialButton.setToolTipText("Create material"); |
---|
1480 | 1484 | |
---|
1481 | 1485 | /* |
---|
1482 | 1486 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1483 | 1487 | */ |
---|
1484 | 1488 | |
---|
1485 | | - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1489 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1486 | 1490 | clearMaterialButton.setToolTipText("Clear material"); |
---|
1487 | 1491 | |
---|
1488 | 1492 | if (Globals.ADVANCED) |
---|
1489 | 1493 | { |
---|
1490 | | - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1494 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1491 | 1495 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1492 | 1496 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1493 | 1497 | } |
---|
.. | .. |
---|
1938 | 1942 | |
---|
1939 | 1943 | //? flashIt = false; |
---|
1940 | 1944 | CameraPane pane = (CameraPane) cameraView; |
---|
1941 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1945 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1942 | 1946 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1943 | 1947 | |
---|
1944 | 1948 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2395 | 2399 | |
---|
2396 | 2400 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2397 | 2401 | { |
---|
2398 | | - if (GrafreeD.standAlone) |
---|
| 2402 | + if (Grafreed.standAlone) |
---|
2399 | 2403 | { |
---|
2400 | 2404 | /**/ |
---|
2401 | 2405 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2402 | | - browser.show(); |
---|
| 2406 | + browser.setVisible(true); |
---|
2403 | 2407 | String filename = browser.getFile(); |
---|
2404 | 2408 | if (filename != null && filename.length() > 0) |
---|
2405 | 2409 | { |
---|
.. | .. |
---|
3006 | 3010 | { |
---|
3007 | 3011 | copy.live ^= true; |
---|
3008 | 3012 | return; |
---|
| 3013 | + } else if (event.getSource() == selectCB) |
---|
| 3014 | + { |
---|
| 3015 | + copy.dontselect ^= true; |
---|
| 3016 | + return; |
---|
3009 | 3017 | } else if (event.getSource() == hideCB) |
---|
3010 | 3018 | { |
---|
3011 | 3019 | copy.hide ^= true; |
---|
.. | .. |
---|
3254 | 3262 | |
---|
3255 | 3263 | Globals.ANIMATION ^= true; |
---|
3256 | 3264 | |
---|
3257 | | - GrafreeD.wav.cursor = 0; |
---|
3258 | | - GrafreeD.wav.loop = 0; |
---|
| 3265 | + Grafreed.wav.cursor = 0; |
---|
| 3266 | + Grafreed.wav.loop = 0; |
---|
3259 | 3267 | } |
---|
3260 | 3268 | } else |
---|
3261 | 3269 | { |
---|
.. | .. |
---|
3276 | 3284 | callee.refreshContents(); |
---|
3277 | 3285 | } else |
---|
3278 | 3286 | { |
---|
3279 | | - new Exception().printStackTrace(); |
---|
3280 | 3287 | System.exit(0); |
---|
3281 | 3288 | } |
---|
3282 | 3289 | } |
---|
.. | .. |
---|
3443 | 3450 | { |
---|
3444 | 3451 | //System.out.println("Propagate = " + propagate); |
---|
3445 | 3452 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3453 | + |
---|
| 3454 | + if (copy.material != null) |
---|
| 3455 | + { |
---|
| 3456 | + cMaterial mat = copy.material; |
---|
| 3457 | + |
---|
| 3458 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3459 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3460 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3461 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3462 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3463 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3464 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3465 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3466 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3467 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3468 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3469 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3470 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3471 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3472 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3473 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3474 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3475 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3476 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3477 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3478 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3479 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3480 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3481 | + } |
---|
| 3482 | + |
---|
3446 | 3483 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3447 | 3484 | { |
---|
3448 | 3485 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3558 | 3595 | } |
---|
3559 | 3596 | |
---|
3560 | 3597 | if (normalpushField != null) |
---|
3561 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3598 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3562 | 3599 | } |
---|
3563 | 3600 | |
---|
3564 | 3601 | void SnapObject() |
---|
.. | .. |
---|
4170 | 4207 | |
---|
4171 | 4208 | void load() // throws ClassNotFoundException |
---|
4172 | 4209 | { |
---|
4173 | | - if (GrafreeD.standAlone) |
---|
| 4210 | + if (Grafreed.standAlone) |
---|
4174 | 4211 | { |
---|
4175 | 4212 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4176 | 4213 | browser.show(); |
---|
.. | .. |
---|
4275 | 4312 | |
---|
4276 | 4313 | void saveAs() |
---|
4277 | 4314 | { |
---|
4278 | | - if (GrafreeD.standAlone) |
---|
| 4315 | + if (Grafreed.standAlone) |
---|
4279 | 4316 | { |
---|
4280 | 4317 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4281 | 4318 | browser.setVisible(true); |
---|
.. | .. |
---|
4386 | 4423 | Object3D objectparent = obj.parent; |
---|
4387 | 4424 | obj.parent = null; |
---|
4388 | 4425 | |
---|
4389 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4426 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4390 | 4427 | |
---|
4391 | 4428 | obj.parent = objectparent; |
---|
4392 | 4429 | |
---|
.. | .. |
---|
4420 | 4457 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4421 | 4458 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4422 | 4459 | copy.generatePOV(buffer); |
---|
4423 | | - if (GrafreeD.standAlone) |
---|
| 4460 | + if (Grafreed.standAlone) |
---|
4424 | 4461 | { |
---|
4425 | 4462 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4426 | 4463 | browser.show(); |
---|