Normand Briere
2019-08-26 6266c8a4b2485b29a7d5bcb217460d7aad3e1c4a
ObjEditor.java
....@@ -72,6 +72,21 @@
7272 }
7373 }
7474
75
+ public Composite CreateCameras()
76
+ {
77
+ Composite cams = new cTemplate();
78
+ cams.name = "Cameras";
79
+ copy.insertElementAt(cams, 0);
80
+
81
+ cams.addChild(new Camera());
82
+ cams.addChild(new Camera(1));
83
+ cams.addChild(new Camera(2));
84
+ cams.addChild(new Camera(3));
85
+ cams.addChild(new Camera(4));
86
+
87
+ return cams;
88
+ }
89
+
7590 public cGridBag GetSeparator()
7691 {
7792 cGridBag separator = new cGridBag();
....@@ -119,8 +134,14 @@
119134
120135 try
121136 {
122
- BufferedImage image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name));
123
-
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
+
124145 // if (image.getWidth() > 48 && image.getHeight() > 48)
125146 // {
126147 // BufferedImage resized = new BufferedImage(48, 48, image.getType());
....@@ -295,6 +316,8 @@
295316 objEditor.ctrlPanel.remove(setupPanel2);
296317 objEditor.ctrlPanel.remove(objectCommandsPanel);
297318 objEditor.ctrlPanel.remove(pushPanel);
319
+ if (versionPanel != null)
320
+ objEditor.ctrlPanel.remove(versionPanel);
298321 //objEditor.ctrlPanel.remove(fillPanel);
299322
300323 //Remove(normalpushField);
....@@ -362,14 +385,6 @@
362385 client = inClient;
363386 copy = client;
364387
365
- if (copy.versionlist == null)
366
- {
367
- copy.versionlist = new Object3D[100];
368
- copy.versionindex = -1;
369
-
370
-// Save(true);
371
- }
372
-
373388 SetupUI2(callee.GetEditor());
374389 }
375390
....@@ -445,8 +460,11 @@
445460 importOBJItem.addActionListener(this);
446461 import3DSItem = menu.add(new MenuItem("3DS file..."));
447462 import3DSItem.addActionListener(this);
463
+ if (Globals.ADVANCED)
464
+ {
448465 importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
449466 importVRMLX3DItem.addActionListener(this);
467
+ }
450468 menu.add("-");
451469 importGFDItem = menu.add(new MenuItem("Grafreed file..."));
452470 importGFDItem.addActionListener(this);
....@@ -1147,6 +1165,7 @@
11471165 cGridBag setupPanel2;
11481166 cGridBag objectCommandsPanel;
11491167 cGridBag pushPanel;
1168
+ cGridBag versionPanel;
11501169 cGridBag fillPanel;
11511170
11521171 JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
....@@ -1393,9 +1412,14 @@
13931412 oe.ctrlPanel.add(objectCommandsPanel);
13941413 oe.ctrlPanel.Return();
13951414
1396
- 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
13971416 normalpushField = (cNumberSlider)pushPanel.getComponent(1);
1398
- //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
+ }
13991423
14001424 oe.ctrlPanel.Return();
14011425
....@@ -1550,23 +1574,9 @@
15501574
15511575 if (cam == null || !(copy.get(0) instanceof cGroup))
15521576 {
1553
- if (Globals.DEBUG)
1554
- System.out.println("CREATE CAMERAS");
1555
- cams = new cTemplate();
1556
- cams.name = "Cameras";
1557
- copy.insertElementAt(cams, 0);
1558
- //cams.parent = copy;
1559
-
1560
- cam = new Camera(); // LA.newVector(3, 2, 1));
1561
- cams.addChild(cam);
1562
- cam = new Camera(1);
1563
- cams.addChild(cam);
1564
- cam = new Camera(2);
1565
- cams.addChild(cam);
1566
- cam = new Camera(3);
1567
- cams.addChild(cam);
1568
- cam = new Camera(4); // Light
1569
- cams.addChild(cam);
1577
+ if (Globals.DEBUG)
1578
+ System.out.println("CREATE CAMERAS");
1579
+ cams = CreateCameras();
15701580 } else
15711581 {
15721582 cams = (cGroup) copy.get(0);
....@@ -1718,24 +1728,24 @@
17181728
17191729 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
17201730 //tmp.setName("Edit");
1731
+ objectPanel.add(skyboxPanel);
1732
+ objectPanel.setIconAt(0, GetIcon("icons/skybox.jpg"));
1733
+ objectPanel.setToolTipTextAt(0, "Backgrounds");
1734
+
17211735 objectPanel.add(toolboxPanel);
1722
- objectPanel.setIconAt(0, GetIcon("icons/primitives.png"));
1723
- objectPanel.setToolTipTextAt(0, "Objects & textures");
1736
+ objectPanel.setIconAt(1, GetIcon("icons/primitives.png"));
1737
+ objectPanel.setToolTipTextAt(1, "Objects & textures");
17241738
17251739 objectPanel.add(materialPanel);
1726
- objectPanel.setIconAt(1, GetIcon("icons/material.png"));
1727
- objectPanel.setToolTipTextAt(1, "Material");
1740
+ objectPanel.setIconAt(2, GetIcon("icons/material.png"));
1741
+ objectPanel.setToolTipTextAt(2, "Material");
17281742
1729
- objectPanel.add(skyboxPanel);
1730
- objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg"));
1731
- objectPanel.setToolTipTextAt(2, "Backgrounds");
1732
-
17331743 // JPanel north = new JPanel(new BorderLayout());
17341744 // north.setName("Edit");
17351745 // north.add(ctrlPanel, BorderLayout.NORTH);
17361746 // objectPanel.add(north);
17371747 objectPanel.add(editPanel);
1738
- objectPanel.setIconAt(3, GetIcon("icons/write.png"));
1748
+ objectPanel.setIconAt(3, GetIcon("icons/writewhite.png"));
17391749 objectPanel.setToolTipTextAt(3, "Edit controls");
17401750
17411751 objectPanel.add(transformPanel);
....@@ -1744,7 +1754,7 @@
17441754
17451755 patchMaterial = true;
17461756 cameraView.patchMaterial = this;
1747
- objectPanel.setSelectedIndex(1);
1757
+ objectPanel.setSelectedIndex(2);
17481758
17491759 /*
17501760 aConstraints.gridx = 0;
....@@ -1765,7 +1775,7 @@
17651775 scrollpane.addMouseWheelListener(this); // Default not fast enough
17661776
17671777 /*JTabbedPane*/ scenePanel = new cGridBag();
1768
- scenePanel.preferredWidth = 6;
1778
+ scenePanel.preferredWidth = 5;
17691779
17701780 JTabbedPane tabbedPane = new JTabbedPane();
17711781 tabbedPane.add(scrollpane);
....@@ -1785,14 +1795,14 @@
17851795 cGridBag creditsPanel = new cGridBag().setVertical(true);
17861796 creditsPanel.setName("Credits");
17871797
1788
- cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF);
1798
+ cLabel ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF);
17891799 creditsPanel.add(ogaLabel);
17901800
1791
- cButton opengameartButton;
1792
- creditsPanel.add(opengameartButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF));
1793
- opengameartButton.setToolTipText("https://opengameart.org");
1801
+ cButton creditButton;
1802
+ creditsPanel.add(creditButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF));
1803
+ creditButton.setToolTipText("https://opengameart.org");
17941804
1795
- opengameartButton.addMouseListener(new MouseAdapter()
1805
+ creditButton.addMouseListener(new MouseAdapter()
17961806 {
17971807 public void mouseClicked(MouseEvent e)
17981808 {
....@@ -1807,7 +1817,64 @@
18071817 }
18081818 });
18091819
1810
- for (int i=10; --i>=0;)
1820
+ ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF);
1821
+ creditsPanel.add(ogaLabel);
1822
+
1823
+ creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF));
1824
+ creditButton.setToolTipText("https://3delicious.net");
1825
+
1826
+ creditButton.addMouseListener(new MouseAdapter()
1827
+ {
1828
+ public void mouseClicked(MouseEvent e)
1829
+ {
1830
+ try
1831
+ {
1832
+ Desktop.getDesktop().browse(new java.net.URI("https://3delicious.net"));
1833
+ } catch (Exception e1)
1834
+// } catch (java.io.IOException | java.net.URISyntaxException e1)
1835
+ {
1836
+ e1.printStackTrace();
1837
+ }
1838
+ }
1839
+ });
1840
+
1841
+ creditsPanel.add(creditButton = GetButton("icons/archive3d.png", !Globals.NIMBUSLAF));
1842
+ creditButton.setToolTipText("https://archive3d.net");
1843
+
1844
+ creditButton.addMouseListener(new MouseAdapter()
1845
+ {
1846
+ public void mouseClicked(MouseEvent e)
1847
+ {
1848
+ try
1849
+ {
1850
+ Desktop.getDesktop().browse(new java.net.URI("https://archive3d.net"));
1851
+ } catch (Exception e1)
1852
+// } catch (java.io.IOException | java.net.URISyntaxException e1)
1853
+ {
1854
+ e1.printStackTrace();
1855
+ }
1856
+ }
1857
+ });
1858
+
1859
+ creditsPanel.add(creditButton = GetButton("icons/turbosquid.png", !Globals.NIMBUSLAF));
1860
+ creditButton.setToolTipText("https://turbosquid.com");
1861
+
1862
+ creditButton.addMouseListener(new MouseAdapter()
1863
+ {
1864
+ public void mouseClicked(MouseEvent e)
1865
+ {
1866
+ try
1867
+ {
1868
+ Desktop.getDesktop().browse(new java.net.URI("https://www.turbosquid.com/Search/3D-Models/free"));
1869
+ } catch (Exception e1)
1870
+// } catch (java.io.IOException | java.net.URISyntaxException e1)
1871
+ {
1872
+ e1.printStackTrace();
1873
+ }
1874
+ }
1875
+ });
1876
+
1877
+ for (int i=6; --i>=0;)
18111878 {
18121879 creditsPanel.add(new cGridBag());
18131880 }
....@@ -1817,9 +1884,9 @@
18171884
18181885 if (Globals.ADVANCED)
18191886 {
1820
- tabbedPane.add(infoPanel);
1821
- tabbedPane.setIconAt(4, GetIcon("icons/info.png"));
1822
- tabbedPane.setToolTipTextAt(4, "Information");
1887
+ objectPanel.add(infoPanel);
1888
+ objectPanel.setIconAt(5, GetIcon("icons/info.png"));
1889
+ objectPanel.setToolTipTextAt(4, "Information");
18231890 }
18241891
18251892 /*
....@@ -2303,7 +2370,7 @@
23032370 {
23042371 public void mouseClicked(MouseEvent e)
23052372 {
2306
- borderfadeField.setFloat(0.5);
2373
+ borderfadeField.setFloat(0.4);
23072374 opacityField.setFloat(0.75);
23082375
23092376 materialtouched = true;
....@@ -2362,13 +2429,55 @@
23622429 cameraField.setFloat(0.001);
23632430 specularField.setFloat(0.001);
23642431 fakedepthField.setFloat(0.001);
2365
- opacityField.setFloat(0.6);
2432
+ opacityField.setFloat(0.4);
23662433
23672434 materialtouched = true;
23682435 applySelf();
23692436 }
23702437 });
23712438 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);
23722481
23732482 cGridBag panel = new cGridBag().setVertical(true);
23742483
....@@ -2615,6 +2724,12 @@
26152724 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
26162725 colorSection.add(backlit);
26172726
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
+
26182733 //panel.add(new JSeparator());
26192734
26202735 //panel.add(globalSection);
....@@ -3666,6 +3781,7 @@
36663781 shadowField.setFloat(mat.shadow);
36673782 textureField.setFloat(mat.texture);
36683783 opacityField.setFloat(mat.opacity);
3784
+ parallaxField.setFloat(mat.parallax + 0.125f);
36693785 fakedepthField.setFloat(mat.fakedepth);
36703786 shadowbiasField.setFloat(mat.shadowbias);
36713787 bumpField.setInteger(1); // dec 2013
....@@ -3959,6 +4075,7 @@
39594075 } else if (event.getSource() == link2masterCB)
39604076 {
39614077 copy.link2master ^= true;
4078
+ objEditor.refreshContents();
39624079 return;
39634080 }
39644081 if (event.getSource() == randomCB)
....@@ -4206,8 +4323,12 @@
42064323
42074324 copy.selection.clear();
42084325
4326
+ if (copy == Grafreed.grafreed.universe)
4327
+ {
4328
+ CreateCameras();
4329
+ cameraView.SetCamera(GetCamera(copy, 0));
4330
+ }
42094331 ResetModel();
4210
- SetupViews();
42114332 objEditor.refreshContents();
42124333 }
42134334
....@@ -4345,7 +4466,7 @@
43454466 copy.versionindex -= 1;
43464467
43474468 if (copy.versionindex != -1)
4348
- CopyChanged();
4469
+ CopyChanged(copy);
43494470
43504471 SetVersionStates();
43514472 }
....@@ -4355,7 +4476,11 @@
43554476 System.err.println("Save");
43564477 Replace();
43574478
4358
- //cRadio tab = GetCurrentTab();
4479
+ if (copy.versionlist == null)
4480
+ {
4481
+ copy.versionlist = new Object3D[100];
4482
+ copy.versionindex = -1;
4483
+ }
43594484
43604485 Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"?
43614486
....@@ -4423,20 +4548,20 @@
44234548 {
44244549 Object3D selection = new Object3D();
44254550
4426
- for (int i = 0; i < copy.selection.size(); i++)
4551
+ for (int i = 0; i < objEditor.copy.selection.size(); i++)
44274552 {
4428
- Object3D elem = copy.selection.elementAt(i);
4553
+ Object3D elem = objEditor.copy.selection.elementAt(i);
44294554
4430
- Object3D obj = copy.GetObject(elem.GetUUID());
4555
+ Object3D obj = objEditor.copy.GetObject(elem.GetUUID());
44314556
44324557 if (obj == null)
44334558 {
4434
- copy.selection.remove(i--);
4559
+ objEditor.copy.selection.remove(i--);
44354560 }
44364561 else
44374562 {
44384563 selection.add(obj);
4439
- copy.selection.setElementAt(obj, i);
4564
+ objEditor.copy.selection.setElementAt(obj, i);
44404565 }
44414566 }
44424567
....@@ -4449,44 +4574,43 @@
44494574 //refreshContents(false);
44504575 }
44514576
4452
- void CopyChanged()
4577
+ void CopyChanged(Object3D changed)
44534578 {
4454
- Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]);
4455
-
4456
- SetVersionStates();
4579
+ Object3D obj = (Object3D)Grafreed.clone(changed.versionlist[copy.versionindex]);
44574580
44584581 boolean temp = CameraPane.SWITCH;
44594582 CameraPane.SWITCH = false;
44604583
4461
- copy.ExtractBigData(Grafreed.grafreed.universe.versiontable);
4584
+ changed.ExtractBigData(Grafreed.grafreed.universe.versiontable);
44624585
4463
- copy.clear();
4586
+ changed.clear();
44644587
4465
- copy.skyboxname = obj.skyboxname;
4466
- copy.skyboxext = obj.skyboxext;
4588
+ changed.skyboxname = obj.skyboxname;
4589
+ changed.skyboxext = obj.skyboxext;
44674590
44684591 for (int i=0; i<obj.Size(); i++)
44694592 {
4470
- copy.add(obj.get(i));
4593
+ changed.add(obj.get(i));
44714594 }
44724595
4473
- copy.RestoreBigData(Grafreed.grafreed.universe.versiontable);
4596
+ changed.RestoreBigData(Grafreed.grafreed.universe.versiontable);
44744597
44754598 CameraPane.SWITCH = temp;
44764599
4477
- RefreshSelection();
4600
+ if (objEditor == this)
4601
+ RefreshSelection();
44784602 //assert(hashtable.isEmpty());
44794603
4480
- copy.Touch();
4604
+ objEditor.copy.Touch();
44814605
44824606 ResetModel();
4483
- copy.HardTouch(); // recompile?
4607
+ objEditor.copy.HardTouch(); // recompile?
44844608
44854609 cRadio ab;
4486
- for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
4610
+ for (java.util.Enumeration e = objEditor.buttonGroup.getElements(); e.hasMoreElements();)
44874611 {
44884612 ab = (cRadio)e.nextElement();
4489
- Object3D test = copy.GetObject(ab.object.GetUUID());
4613
+ Object3D test = objEditor.copy.GetObject(ab.object.GetUUID());
44904614 //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());
44914615 if (test != null)
44924616 {
....@@ -4495,7 +4619,7 @@
44954619 }
44964620 }
44974621
4498
- refreshContents(true);
4622
+ objEditor.refreshContents(true);
44994623 }
45004624
45014625 cButton previousVersionButton;
....@@ -4509,15 +4633,7 @@
45094633
45104634 int VersionCount()
45114635 {
4512
- int count = 0;
4513
-
4514
- for (int i = copy.versionlist.length; --i >= 0;)
4515
- {
4516
- if (copy.versionlist[i] != null)
4517
- count++;
4518
- }
4519
-
4520
- return count;
4636
+ return copy.VersionCount();
45214637 }
45224638
45234639 public cGridBag versionSliderPane;
....@@ -4529,7 +4645,7 @@
45294645
45304646 //cRadio tab = GetCurrentTab();
45314647
4532
- if (copy.versionlist == null)
4648
+ if (copy.versionindex == -2)
45334649 {
45344650 saveVersionButton.setEnabled(false);
45354651 restoreButton.setEnabled(false);
....@@ -4591,7 +4707,9 @@
45914707
45924708 copy.versionindex -= 1;
45934709
4594
- CopyChanged();
4710
+ CopyChanged(copy);
4711
+
4712
+ SetVersionStates();
45954713
45964714 return true;
45974715 }
....@@ -4609,7 +4727,9 @@
46094727 }
46104728
46114729 //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));
4612
- CopyChanged();
4730
+ CopyChanged(copy);
4731
+
4732
+ SetVersionStates();
46134733
46144734 return true;
46154735 }
....@@ -4646,10 +4766,12 @@
46464766
46474767 copy.versionindex += 1;
46484768
4649
- CopyChanged();
4769
+ CopyChanged(copy);
46504770
46514771 //if (!tab.user[tab.versionindex])
46524772 // tab.graphs[tab.versionindex] = null;
4773
+
4774
+ SetVersionStates();
46534775 }
46544776
46554777 void ImportGFD()
....@@ -4886,6 +5008,7 @@
48865008 current.shadow = (float) shadowField.getFloat();
48875009 current.texture = (float) textureField.getFloat();
48885010 current.opacity = (float) opacityField.getFloat();
5011
+ current.parallax = (float) parallaxField.getFloat() - 0.125f;
48895012 current.fakedepth = (float) fakedepthField.getFloat();
48905013 current.shadowbias = (float) shadowbiasField.getFloat();
48915014
....@@ -4940,6 +5063,8 @@
49405063 textureField.SetToolTipValue((mat.texture));
49415064 if (!Equal(opacityField.getFloat(), mat.opacity))
49425065 opacityField.SetToolTipValue((mat.opacity));
5066
+ //if (!Equal(parallaxField.getFloat(), mat.parallax))
5067
+ parallaxField.SetToolTipValue((mat.parallax));
49435068 if (!Equal(fakedepthField.getFloat(), mat.fakedepth))
49445069 fakedepthField.SetToolTipValue((mat.fakedepth));
49455070 if (!Equal(shadowbiasField.getFloat(), mat.shadowbias))
....@@ -4975,6 +5100,7 @@
49755100 }
49765101
49775102 cNumberSlider versionSlider;
5103
+ cNumberSlider versionField;
49785104
49795105 public void stateChanged(ChangeEvent e)
49805106 {
....@@ -4991,12 +5117,26 @@
49915117 if (version != -1 && copy.versionlist[version] != null)
49925118 {
49935119 copy.versionindex = version;
4994
- CopyChanged();
5120
+ CopyChanged(copy);
5121
+ SetVersionStates();
49955122 }
49965123
49975124 return;
49985125 }
49995126
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
+
50005140 if (freezematerial)
50015141 {
50025142 return;
....@@ -5086,7 +5226,7 @@
50865226 }
50875227
50885228 if (normalpushField != null)
5089
- copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
5229
+ copy.NORMALPUSH = (float)normalpushField.getFloat() / 100;
50905230 }
50915231
50925232 void SnapObject()
....@@ -5460,7 +5600,7 @@
54605600 void ResetModel()
54615601 {
54625602 //assert(copy instanceof Composite);
5463
- Object3D /*Composite*/ group = (Object3D /*Composite*/) copy;
5603
+ Object3D /*Composite*/ group = (Object3D /*Composite*/) objEditor.copy;
54645604
54655605 // necessary? group.selection = new Object3D(); // java.util.Vector();
54665606
....@@ -5471,14 +5611,14 @@
54715611 //group.refreshEditWindow();
54725612 //refreshContents();
54735613
5474
- if (copy.selection == null)
5614
+ if (objEditor.copy.selection == null)
54755615 {
5476
- copy.selection = new Object3D();
5616
+ objEditor.copy.selection = new Object3D();
54775617 }
54785618
5479
- for (int j = 0; j < copy.selection.size(); j++)
5619
+ for (int j = 0; j < objEditor.copy.selection.size(); j++)
54805620 {
5481
- Object3D item = copy.selection.get(j);
5621
+ Object3D item = objEditor.copy.selection.get(j);
54825622
54835623 if (item instanceof cGroup && ((cGroup) item).transientlink)
54845624 {
....@@ -5487,15 +5627,15 @@
54875627
54885628 if (item.count <= 1) // ??? == 0)
54895629 {
5490
- copy.selection.remove(item);
5630
+ objEditor.copy.selection.remove(item);
54915631 }
54925632 }
54935633
54945634 boolean first = true;
54955635
5496
- for (int i = copy.selection.size(); --i >= 0;)
5636
+ for (int i = objEditor.copy.selection.size(); --i >= 0;)
54975637 {
5498
- Object3D item = copy.selection.get(i);
5638
+ Object3D item = objEditor.copy.selection.get(i);
54995639
55005640 if (item instanceof cGroup && ((cGroup) item).transientlink)
55015641 {
....@@ -6196,6 +6336,8 @@
61966336 cNumberSlider textureField;
61976337 JLabel opacityLabel;
61986338 cNumberSlider opacityField;
6339
+ JLabel parallaxLabel;
6340
+ cNumberSlider parallaxField;
61996341 JLabel fakedepthLabel;
62006342 cNumberSlider fakedepthField;
62016343 JLabel shadowbiasLabel;