CameraPane.java | ●●●●● patch | view | raw | blame | history | |
FileObject.java | ●●●●● patch | view | raw | blame | history | |
Grafreed.java | ●●●●● patch | view | raw | blame | history | |
GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
Object3D.java | ●●●●● patch | view | raw | blame | history |
CameraPane.java
.. .. @@ -8461,7 +8461,7 @@ 8461 8461 new Exception().printStackTrace(); 8462 8462 } else 8463 8463 { 8464 - if (texname.startsWith("@"))8464 + if (texname.startsWith("@") && textureon)8465 8465 { 8466 8466 // texturecache = textures.get(texname); // suspicious 8467 8467 if (texturecache == null) FileObject.java
.. .. @@ -19,15 +19,37 @@ 19 19 20 20 boolean HasBigData() 21 21 { 22 - return false;22 + return filecontent != null;23 23 } 24 24 25 25 void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) 26 26 { 27 + Object3D o;28 +29 + if (hashtable.containsKey(GetUUID()))30 + {31 + o = hashtable.get(GetUUID());32 +33 + //Grafreed.Assert(this.filecontent == ((FileObject)o).filecontent);34 + }35 + else36 + {37 + o = new Object3D("copy of " + this.name);38 +39 + hashtable.put(GetUUID(), o);40 + }41 +42 + ExtractBigData(o);27 43 } 28 44 29 45 void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) 30 46 { 47 + if (!hashtable.containsKey(GetUUID()))48 + return;49 +50 + Object3D o = hashtable.get(GetUUID());51 +52 + RestoreBigData(o);31 53 } 32 54 33 55 boolean IsStatic() .. .. @@ -100,7 +122,8 @@ 100 122 101 123 o.savefilecontent = this.filecontent; 102 124 103 - // filecontent transient125 + // filecontent is transient126 + this.filecontent = null;104 127 } 105 128 106 129 void RestoreBigData(Object3D o) Grafreed.java
.. .. @@ -1033,6 +1033,7 @@ 1033 1033 grafreed.universe.root = true; 1034 1034 grafreed.universe.openEditWindow(null, true); //, true); 1035 1035 grafreed.universe.editWindow.New(); 1036 + grafreed.universe.editWindow.DuplicateVersion();1036 1037 1037 1038 //mon.stop(); 1038 1039 //System.out.println(mon); GroupEditor.java
.. .. @@ -483,11 +483,16 @@ 483 483 484 484 Object3D parent = obj.parent; 485 485 obj.parent = null; 486 +486 487 // Object3D support = obj.support; 487 488 // obj.support = null; 488 489 if (!supports) 489 490 obj.SaveSupports(); 491 +490 492 Object3D clone = (Object3D)Grafreed.clone(obj); 493 +494 + clone.ResetUUIDs();495 +491 496 obj.parent = parent; 492 497 // obj.support = support; 493 498 // clone.support = support; // aout 2013 .. .. @@ -2843,7 +2848,7 @@ 2843 2848 if (source == saveVersionButton) 2844 2849 { 2845 2850 // Save a new version 2846 - if (!Save(true))2851 + if (!DuplicateVersion()) //true))2847 2852 java.awt.Toolkit.getDefaultToolkit().beep(); 2848 2853 } else 2849 2854 if (source == deleteVersionButton) ObjEditor.java
.. .. @@ -4552,7 +4552,7 @@ 4552 4552 SetCameras(); 4553 4553 } 4554 4554 4555 - public boolean Save(boolean user)4555 + public boolean DuplicateVersion() // boolean user)4556 4556 { 4557 4557 System.err.println("Save"); 4558 4558 //Replace(); Object3D.java
.. .. @@ -1318,6 +1318,30 @@ 1318 1318 return false; 1319 1319 } 1320 1320 1321 + void ResetUUIDs()1322 + {1323 + if (blockloop)1324 + {1325 + return;1326 + }1327 +1328 + this.uuid = null;1329 +1330 + blockloop = true;1331 +1332 + for (int i = 0; i < Size(); i++)1333 + {1334 + Object3D obj = (Object3D) Children().get(i);1335 +1336 + if (obj != null)1337 + {1338 + obj.ResetUUIDs();1339 + }1340 + }1341 +1342 + blockloop = false;1343 + }1344 +1321 1345 boolean IsInfinite() 1322 1346 { 1323 1347 if (blockloop) .. .. @@ -8290,10 +8314,10 @@ 8290 8314 } // + super.toString(); 8291 8315 //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName(); 8292 8316 8293 -// if (!Globals.ADVANCED)8294 -// return objname;8317 + if (!Globals.ADVANCED)8318 + return objname;8295 8319 8296 - return objname; // + " " + System.identityHashCode(this) + " " + GetUUID();8320 + return objname + " " + System.identityHashCode(this) + " " + GetUUID();8297 8321 } 8298 8322 8299 8323 public int hashCode()