.. | .. |
---|
134 | 134 | |
---|
135 | 135 | try |
---|
136 | 136 | { |
---|
137 | | - BufferedImage image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name)); |
---|
138 | | - |
---|
| 137 | + BufferedImage image; |
---|
| 138 | + |
---|
| 139 | + if (name.endsWith("jpg")) |
---|
| 140 | + // Much faster! |
---|
| 141 | + image = new sun.awt.image.codec.JPEGImageDecoderImpl(ObjEditor.class.getClassLoader().getResourceAsStream(name)).decodeAsBufferedImage(); |
---|
| 142 | + else |
---|
| 143 | + image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name)); |
---|
| 144 | + |
---|
139 | 145 | // if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
140 | 146 | // { |
---|
141 | 147 | // BufferedImage resized = new BufferedImage(48, 48, image.getType()); |
---|
.. | .. |
---|
310 | 316 | objEditor.ctrlPanel.remove(setupPanel2); |
---|
311 | 317 | objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
312 | 318 | objEditor.ctrlPanel.remove(pushPanel); |
---|
| 319 | + if (versionPanel != null) |
---|
| 320 | + objEditor.ctrlPanel.remove(versionPanel); |
---|
313 | 321 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
314 | 322 | |
---|
315 | 323 | //Remove(normalpushField); |
---|
.. | .. |
---|
377 | 385 | client = inClient; |
---|
378 | 386 | copy = client; |
---|
379 | 387 | |
---|
380 | | - if (copy.versionlist == null) |
---|
381 | | - { |
---|
382 | | - copy.versionlist = new Object3D[100]; |
---|
383 | | - copy.versionindex = -1; |
---|
384 | | - |
---|
385 | | -// Save(true); |
---|
386 | | - } |
---|
387 | | - |
---|
388 | 388 | SetupUI2(callee.GetEditor()); |
---|
389 | 389 | } |
---|
390 | 390 | |
---|
.. | .. |
---|
1165 | 1165 | cGridBag setupPanel2; |
---|
1166 | 1166 | cGridBag objectCommandsPanel; |
---|
1167 | 1167 | cGridBag pushPanel; |
---|
| 1168 | + cGridBag versionPanel; |
---|
1168 | 1169 | cGridBag fillPanel; |
---|
1169 | 1170 | |
---|
1170 | 1171 | JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
.. | .. |
---|
1411 | 1412 | oe.ctrlPanel.add(objectCommandsPanel); |
---|
1412 | 1413 | oe.ctrlPanel.Return(); |
---|
1413 | 1414 | |
---|
1414 | | - pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
| 1415 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH * 100, 1.1); // To have the buttons |
---|
1415 | 1416 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1416 | | - //Return(); |
---|
| 1417 | + if (false && copy.versionlist != null && copy.versionindex != -1) |
---|
| 1418 | + { |
---|
| 1419 | + oe.ctrlPanel.Return(); |
---|
| 1420 | + versionPanel = AddSlider(oe.ctrlPanel, "Version", 0, copy.VersionCount() - 1, copy.versionindex); |
---|
| 1421 | + versionField = (cNumberSlider)versionPanel.getComponent(1); |
---|
| 1422 | + } |
---|
1417 | 1423 | |
---|
1418 | 1424 | oe.ctrlPanel.Return(); |
---|
1419 | 1425 | |
---|
.. | .. |
---|
1769 | 1775 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1770 | 1776 | |
---|
1771 | 1777 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1772 | | - scenePanel.preferredWidth = 6; |
---|
| 1778 | + scenePanel.preferredWidth = 5; |
---|
1773 | 1779 | |
---|
1774 | 1780 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1775 | 1781 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1789 | 1795 | cGridBag creditsPanel = new cGridBag().setVertical(true); |
---|
1790 | 1796 | creditsPanel.setName("Credits"); |
---|
1791 | 1797 | |
---|
1792 | | - cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
| 1798 | + cLabel ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
1793 | 1799 | creditsPanel.add(ogaLabel); |
---|
1794 | 1800 | |
---|
1795 | 1801 | cButton creditButton; |
---|
.. | .. |
---|
1811 | 1817 | } |
---|
1812 | 1818 | }); |
---|
1813 | 1819 | |
---|
1814 | | - ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF); |
---|
| 1820 | + ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF); |
---|
1815 | 1821 | creditsPanel.add(ogaLabel); |
---|
1816 | 1822 | |
---|
1817 | 1823 | creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF)); |
---|
.. | .. |
---|
1878 | 1884 | |
---|
1879 | 1885 | if (Globals.ADVANCED) |
---|
1880 | 1886 | { |
---|
1881 | | - tabbedPane.add(infoPanel); |
---|
1882 | | - tabbedPane.setIconAt(4, GetIcon("icons/info.png")); |
---|
1883 | | - tabbedPane.setToolTipTextAt(4, "Information"); |
---|
| 1887 | + objectPanel.add(infoPanel); |
---|
| 1888 | + objectPanel.setIconAt(5, GetIcon("icons/info.png")); |
---|
| 1889 | + objectPanel.setToolTipTextAt(4, "Information"); |
---|
1884 | 1890 | } |
---|
1885 | 1891 | |
---|
1886 | 1892 | /* |
---|
.. | .. |
---|
2364 | 2370 | { |
---|
2365 | 2371 | public void mouseClicked(MouseEvent e) |
---|
2366 | 2372 | { |
---|
2367 | | - borderfadeField.setFloat(0.5); |
---|
| 2373 | + borderfadeField.setFloat(0.4); |
---|
2368 | 2374 | opacityField.setFloat(0.75); |
---|
2369 | 2375 | |
---|
2370 | 2376 | materialtouched = true; |
---|
.. | .. |
---|
2423 | 2429 | cameraField.setFloat(0.001); |
---|
2424 | 2430 | specularField.setFloat(0.001); |
---|
2425 | 2431 | fakedepthField.setFloat(0.001); |
---|
2426 | | - opacityField.setFloat(0.6); |
---|
| 2432 | + opacityField.setFloat(0.4); |
---|
2427 | 2433 | |
---|
2428 | 2434 | materialtouched = true; |
---|
2429 | 2435 | applySelf(); |
---|
2430 | 2436 | } |
---|
2431 | 2437 | }); |
---|
2432 | 2438 | presetpanel.add(shadowShader); |
---|
| 2439 | + |
---|
| 2440 | + cLabel para0 = GetLabel("icons/shadericons/parallax0.png", !Globals.NIMBUSLAF); |
---|
| 2441 | + para0.setToolTipText("No parallax"); |
---|
| 2442 | + para0.addMouseListener(new MouseAdapter() |
---|
| 2443 | + { |
---|
| 2444 | + public void mouseClicked(MouseEvent e) |
---|
| 2445 | + { |
---|
| 2446 | + parallaxField.setFloat(0.125); |
---|
| 2447 | + |
---|
| 2448 | + materialtouched = true; |
---|
| 2449 | + applySelf(); |
---|
| 2450 | + } |
---|
| 2451 | + }); |
---|
| 2452 | + presetpanel.add(para0); |
---|
| 2453 | + |
---|
| 2454 | + cLabel para1 = GetLabel("icons/shadericons/parallax1.png", !Globals.NIMBUSLAF); |
---|
| 2455 | + para1.setToolTipText("With parallax"); |
---|
| 2456 | + para1.addMouseListener(new MouseAdapter() |
---|
| 2457 | + { |
---|
| 2458 | + public void mouseClicked(MouseEvent e) |
---|
| 2459 | + { |
---|
| 2460 | + parallaxField.setFloat(0.13); |
---|
| 2461 | + |
---|
| 2462 | + materialtouched = true; |
---|
| 2463 | + applySelf(); |
---|
| 2464 | + } |
---|
| 2465 | + }); |
---|
| 2466 | + presetpanel.add(para1); |
---|
| 2467 | + |
---|
| 2468 | + cLabel para2 = GetLabel("icons/shadericons/parallax2.png", !Globals.NIMBUSLAF); |
---|
| 2469 | + para2.setToolTipText("Reset parallax"); |
---|
| 2470 | + para2.addMouseListener(new MouseAdapter() |
---|
| 2471 | + { |
---|
| 2472 | + public void mouseClicked(MouseEvent e) |
---|
| 2473 | + { |
---|
| 2474 | + parallaxField.setFloat(0.14); |
---|
| 2475 | + |
---|
| 2476 | + materialtouched = true; |
---|
| 2477 | + applySelf(); |
---|
| 2478 | + } |
---|
| 2479 | + }); |
---|
| 2480 | + presetpanel.add(para2); |
---|
2433 | 2481 | |
---|
2434 | 2482 | cGridBag panel = new cGridBag().setVertical(true); |
---|
2435 | 2483 | |
---|
.. | .. |
---|
2676 | 2724 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
2677 | 2725 | colorSection.add(backlit); |
---|
2678 | 2726 | |
---|
| 2727 | + cGridBag parallax = new cGridBag(); |
---|
| 2728 | + parallax.add(parallaxLabel = new JLabel("Parallax")); // , aConstraints); |
---|
| 2729 | + parallaxLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2730 | + parallax.add(parallaxField = new cNumberSlider(this, 0.001, 0.25, -0.125)); // , aConstraints); |
---|
| 2731 | + colorSection.add(parallax); |
---|
| 2732 | + |
---|
2679 | 2733 | //panel.add(new JSeparator()); |
---|
2680 | 2734 | |
---|
2681 | 2735 | //panel.add(globalSection); |
---|
.. | .. |
---|
3727 | 3781 | shadowField.setFloat(mat.shadow); |
---|
3728 | 3782 | textureField.setFloat(mat.texture); |
---|
3729 | 3783 | opacityField.setFloat(mat.opacity); |
---|
| 3784 | + parallaxField.setFloat(mat.parallax + 0.125f); |
---|
3730 | 3785 | fakedepthField.setFloat(mat.fakedepth); |
---|
3731 | 3786 | shadowbiasField.setFloat(mat.shadowbias); |
---|
3732 | 3787 | bumpField.setInteger(1); // dec 2013 |
---|
.. | .. |
---|
4020 | 4075 | } else if (event.getSource() == link2masterCB) |
---|
4021 | 4076 | { |
---|
4022 | 4077 | copy.link2master ^= true; |
---|
| 4078 | + objEditor.refreshContents(); |
---|
4023 | 4079 | return; |
---|
4024 | 4080 | } |
---|
4025 | 4081 | if (event.getSource() == randomCB) |
---|
.. | .. |
---|
4410 | 4466 | copy.versionindex -= 1; |
---|
4411 | 4467 | |
---|
4412 | 4468 | if (copy.versionindex != -1) |
---|
4413 | | - CopyChanged(); |
---|
| 4469 | + CopyChanged(copy); |
---|
4414 | 4470 | |
---|
4415 | 4471 | SetVersionStates(); |
---|
4416 | 4472 | } |
---|
.. | .. |
---|
4420 | 4476 | System.err.println("Save"); |
---|
4421 | 4477 | Replace(); |
---|
4422 | 4478 | |
---|
4423 | | - //cRadio tab = GetCurrentTab(); |
---|
| 4479 | + if (copy.versionlist == null) |
---|
| 4480 | + { |
---|
| 4481 | + copy.versionlist = new Object3D[100]; |
---|
| 4482 | + copy.versionindex = -1; |
---|
| 4483 | + } |
---|
4424 | 4484 | |
---|
4425 | 4485 | Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
4426 | 4486 | |
---|
.. | .. |
---|
4488 | 4548 | { |
---|
4489 | 4549 | Object3D selection = new Object3D(); |
---|
4490 | 4550 | |
---|
4491 | | - for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4551 | + for (int i = 0; i < objEditor.copy.selection.size(); i++) |
---|
4492 | 4552 | { |
---|
4493 | | - Object3D elem = copy.selection.elementAt(i); |
---|
| 4553 | + Object3D elem = objEditor.copy.selection.elementAt(i); |
---|
4494 | 4554 | |
---|
4495 | | - Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4555 | + Object3D obj = objEditor.copy.GetObject(elem.GetUUID()); |
---|
4496 | 4556 | |
---|
4497 | 4557 | if (obj == null) |
---|
4498 | 4558 | { |
---|
4499 | | - copy.selection.remove(i--); |
---|
| 4559 | + objEditor.copy.selection.remove(i--); |
---|
4500 | 4560 | } |
---|
4501 | 4561 | else |
---|
4502 | 4562 | { |
---|
4503 | 4563 | selection.add(obj); |
---|
4504 | | - copy.selection.setElementAt(obj, i); |
---|
| 4564 | + objEditor.copy.selection.setElementAt(obj, i); |
---|
4505 | 4565 | } |
---|
4506 | 4566 | } |
---|
4507 | 4567 | |
---|
.. | .. |
---|
4514 | 4574 | //refreshContents(false); |
---|
4515 | 4575 | } |
---|
4516 | 4576 | |
---|
4517 | | - void CopyChanged() |
---|
| 4577 | + void CopyChanged(Object3D changed) |
---|
4518 | 4578 | { |
---|
4519 | | - Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
4520 | | - |
---|
4521 | | - SetVersionStates(); |
---|
| 4579 | + Object3D obj = (Object3D)Grafreed.clone(changed.versionlist[copy.versionindex]); |
---|
4522 | 4580 | |
---|
4523 | 4581 | boolean temp = CameraPane.SWITCH; |
---|
4524 | 4582 | CameraPane.SWITCH = false; |
---|
4525 | 4583 | |
---|
4526 | | - copy.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
| 4584 | + changed.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
4527 | 4585 | |
---|
4528 | | - copy.clear(); |
---|
| 4586 | + changed.clear(); |
---|
4529 | 4587 | |
---|
4530 | | - copy.skyboxname = obj.skyboxname; |
---|
4531 | | - copy.skyboxext = obj.skyboxext; |
---|
| 4588 | + changed.skyboxname = obj.skyboxname; |
---|
| 4589 | + changed.skyboxext = obj.skyboxext; |
---|
4532 | 4590 | |
---|
4533 | 4591 | for (int i=0; i<obj.Size(); i++) |
---|
4534 | 4592 | { |
---|
4535 | | - copy.add(obj.get(i)); |
---|
| 4593 | + changed.add(obj.get(i)); |
---|
4536 | 4594 | } |
---|
4537 | 4595 | |
---|
4538 | | - copy.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
| 4596 | + changed.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
4539 | 4597 | |
---|
4540 | 4598 | CameraPane.SWITCH = temp; |
---|
4541 | 4599 | |
---|
4542 | | - RefreshSelection(); |
---|
| 4600 | + if (objEditor == this) |
---|
| 4601 | + RefreshSelection(); |
---|
4543 | 4602 | //assert(hashtable.isEmpty()); |
---|
4544 | 4603 | |
---|
4545 | | - copy.Touch(); |
---|
| 4604 | + objEditor.copy.Touch(); |
---|
4546 | 4605 | |
---|
4547 | 4606 | ResetModel(); |
---|
4548 | | - copy.HardTouch(); // recompile? |
---|
| 4607 | + objEditor.copy.HardTouch(); // recompile? |
---|
4549 | 4608 | |
---|
4550 | 4609 | cRadio ab; |
---|
4551 | | - for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 4610 | + for (java.util.Enumeration e = objEditor.buttonGroup.getElements(); e.hasMoreElements();) |
---|
4552 | 4611 | { |
---|
4553 | 4612 | ab = (cRadio)e.nextElement(); |
---|
4554 | | - Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 4613 | + Object3D test = objEditor.copy.GetObject(ab.object.GetUUID()); |
---|
4555 | 4614 | //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
4556 | 4615 | if (test != null) |
---|
4557 | 4616 | { |
---|
.. | .. |
---|
4560 | 4619 | } |
---|
4561 | 4620 | } |
---|
4562 | 4621 | |
---|
4563 | | - refreshContents(true); |
---|
| 4622 | + objEditor.refreshContents(true); |
---|
4564 | 4623 | } |
---|
4565 | 4624 | |
---|
4566 | 4625 | cButton previousVersionButton; |
---|
.. | .. |
---|
4574 | 4633 | |
---|
4575 | 4634 | int VersionCount() |
---|
4576 | 4635 | { |
---|
4577 | | - int count = 0; |
---|
4578 | | - |
---|
4579 | | - for (int i = copy.versionlist.length; --i >= 0;) |
---|
4580 | | - { |
---|
4581 | | - if (copy.versionlist[i] != null) |
---|
4582 | | - count++; |
---|
4583 | | - } |
---|
4584 | | - |
---|
4585 | | - return count; |
---|
| 4636 | + return copy.VersionCount(); |
---|
4586 | 4637 | } |
---|
4587 | 4638 | |
---|
4588 | 4639 | public cGridBag versionSliderPane; |
---|
.. | .. |
---|
4594 | 4645 | |
---|
4595 | 4646 | //cRadio tab = GetCurrentTab(); |
---|
4596 | 4647 | |
---|
4597 | | - if (copy.versionlist == null) |
---|
| 4648 | + if (copy.versionindex == -2) |
---|
4598 | 4649 | { |
---|
4599 | 4650 | saveVersionButton.setEnabled(false); |
---|
4600 | 4651 | restoreButton.setEnabled(false); |
---|
.. | .. |
---|
4656 | 4707 | |
---|
4657 | 4708 | copy.versionindex -= 1; |
---|
4658 | 4709 | |
---|
4659 | | - CopyChanged(); |
---|
| 4710 | + CopyChanged(copy); |
---|
| 4711 | + |
---|
| 4712 | + SetVersionStates(); |
---|
4660 | 4713 | |
---|
4661 | 4714 | return true; |
---|
4662 | 4715 | } |
---|
.. | .. |
---|
4674 | 4727 | } |
---|
4675 | 4728 | |
---|
4676 | 4729 | //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
4677 | | - CopyChanged(); |
---|
| 4730 | + CopyChanged(copy); |
---|
| 4731 | + |
---|
| 4732 | + SetVersionStates(); |
---|
4678 | 4733 | |
---|
4679 | 4734 | return true; |
---|
4680 | 4735 | } |
---|
.. | .. |
---|
4711 | 4766 | |
---|
4712 | 4767 | copy.versionindex += 1; |
---|
4713 | 4768 | |
---|
4714 | | - CopyChanged(); |
---|
| 4769 | + CopyChanged(copy); |
---|
4715 | 4770 | |
---|
4716 | 4771 | //if (!tab.user[tab.versionindex]) |
---|
4717 | 4772 | // tab.graphs[tab.versionindex] = null; |
---|
| 4773 | + |
---|
| 4774 | + SetVersionStates(); |
---|
4718 | 4775 | } |
---|
4719 | 4776 | |
---|
4720 | 4777 | void ImportGFD() |
---|
.. | .. |
---|
4951 | 5008 | current.shadow = (float) shadowField.getFloat(); |
---|
4952 | 5009 | current.texture = (float) textureField.getFloat(); |
---|
4953 | 5010 | current.opacity = (float) opacityField.getFloat(); |
---|
| 5011 | + current.parallax = (float) parallaxField.getFloat() - 0.125f; |
---|
4954 | 5012 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
4955 | 5013 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
4956 | 5014 | |
---|
.. | .. |
---|
5005 | 5063 | textureField.SetToolTipValue((mat.texture)); |
---|
5006 | 5064 | if (!Equal(opacityField.getFloat(), mat.opacity)) |
---|
5007 | 5065 | opacityField.SetToolTipValue((mat.opacity)); |
---|
| 5066 | + //if (!Equal(parallaxField.getFloat(), mat.parallax)) |
---|
| 5067 | + parallaxField.SetToolTipValue((mat.parallax)); |
---|
5008 | 5068 | if (!Equal(fakedepthField.getFloat(), mat.fakedepth)) |
---|
5009 | 5069 | fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
5010 | 5070 | if (!Equal(shadowbiasField.getFloat(), mat.shadowbias)) |
---|
.. | .. |
---|
5040 | 5100 | } |
---|
5041 | 5101 | |
---|
5042 | 5102 | cNumberSlider versionSlider; |
---|
| 5103 | + cNumberSlider versionField; |
---|
5043 | 5104 | |
---|
5044 | 5105 | public void stateChanged(ChangeEvent e) |
---|
5045 | 5106 | { |
---|
.. | .. |
---|
5056 | 5117 | if (version != -1 && copy.versionlist[version] != null) |
---|
5057 | 5118 | { |
---|
5058 | 5119 | copy.versionindex = version; |
---|
5059 | | - CopyChanged(); |
---|
| 5120 | + CopyChanged(copy); |
---|
| 5121 | + SetVersionStates(); |
---|
5060 | 5122 | } |
---|
5061 | 5123 | |
---|
5062 | 5124 | return; |
---|
5063 | 5125 | } |
---|
5064 | 5126 | |
---|
| 5127 | + if (e.getSource() == versionField) |
---|
| 5128 | + { |
---|
| 5129 | + int version = versionField.getInteger(); |
---|
| 5130 | + |
---|
| 5131 | + if (version != -1 && copy.versionindex != version && copy.versionlist[version] != null) |
---|
| 5132 | + { |
---|
| 5133 | + copy.versionindex = version; |
---|
| 5134 | + CopyChanged(copy); |
---|
| 5135 | + } |
---|
| 5136 | + |
---|
| 5137 | + return; |
---|
| 5138 | + } |
---|
| 5139 | + |
---|
5065 | 5140 | if (freezematerial) |
---|
5066 | 5141 | { |
---|
5067 | 5142 | return; |
---|
.. | .. |
---|
5151 | 5226 | } |
---|
5152 | 5227 | |
---|
5153 | 5228 | if (normalpushField != null) |
---|
5154 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
| 5229 | + copy.NORMALPUSH = (float)normalpushField.getFloat() / 100; |
---|
5155 | 5230 | } |
---|
5156 | 5231 | |
---|
5157 | 5232 | void SnapObject() |
---|
.. | .. |
---|
5525 | 5600 | void ResetModel() |
---|
5526 | 5601 | { |
---|
5527 | 5602 | //assert(copy instanceof Composite); |
---|
5528 | | - Object3D /*Composite*/ group = (Object3D /*Composite*/) copy; |
---|
| 5603 | + Object3D /*Composite*/ group = (Object3D /*Composite*/) objEditor.copy; |
---|
5529 | 5604 | |
---|
5530 | 5605 | // necessary? group.selection = new Object3D(); // java.util.Vector(); |
---|
5531 | 5606 | |
---|
.. | .. |
---|
5536 | 5611 | //group.refreshEditWindow(); |
---|
5537 | 5612 | //refreshContents(); |
---|
5538 | 5613 | |
---|
5539 | | - if (copy.selection == null) |
---|
| 5614 | + if (objEditor.copy.selection == null) |
---|
5540 | 5615 | { |
---|
5541 | | - copy.selection = new Object3D(); |
---|
| 5616 | + objEditor.copy.selection = new Object3D(); |
---|
5542 | 5617 | } |
---|
5543 | 5618 | |
---|
5544 | | - for (int j = 0; j < copy.selection.size(); j++) |
---|
| 5619 | + for (int j = 0; j < objEditor.copy.selection.size(); j++) |
---|
5545 | 5620 | { |
---|
5546 | | - Object3D item = copy.selection.get(j); |
---|
| 5621 | + Object3D item = objEditor.copy.selection.get(j); |
---|
5547 | 5622 | |
---|
5548 | 5623 | if (item instanceof cGroup && ((cGroup) item).transientlink) |
---|
5549 | 5624 | { |
---|
.. | .. |
---|
5552 | 5627 | |
---|
5553 | 5628 | if (item.count <= 1) // ??? == 0) |
---|
5554 | 5629 | { |
---|
5555 | | - copy.selection.remove(item); |
---|
| 5630 | + objEditor.copy.selection.remove(item); |
---|
5556 | 5631 | } |
---|
5557 | 5632 | } |
---|
5558 | 5633 | |
---|
5559 | 5634 | boolean first = true; |
---|
5560 | 5635 | |
---|
5561 | | - for (int i = copy.selection.size(); --i >= 0;) |
---|
| 5636 | + for (int i = objEditor.copy.selection.size(); --i >= 0;) |
---|
5562 | 5637 | { |
---|
5563 | | - Object3D item = copy.selection.get(i); |
---|
| 5638 | + Object3D item = objEditor.copy.selection.get(i); |
---|
5564 | 5639 | |
---|
5565 | 5640 | if (item instanceof cGroup && ((cGroup) item).transientlink) |
---|
5566 | 5641 | { |
---|
.. | .. |
---|
6261 | 6336 | cNumberSlider textureField; |
---|
6262 | 6337 | JLabel opacityLabel; |
---|
6263 | 6338 | cNumberSlider opacityField; |
---|
| 6339 | + JLabel parallaxLabel; |
---|
| 6340 | + cNumberSlider parallaxField; |
---|
6264 | 6341 | JLabel fakedepthLabel; |
---|
6265 | 6342 | cNumberSlider fakedepthField; |
---|
6266 | 6343 | JLabel shadowbiasLabel; |
---|