| CameraPane.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 | |
| cRadio.java | ●●●●● patch | view | raw | blame | history | 
CameraPane.java
.. .. @@ -11552,7 +11552,7 @@ 11552 11552 return; 11553 11553 } 11554 11554 11555  - String string = obj.GetToolTip();11555  + String string = obj.toString(); //.GetToolTip();11556 11556 11557 11557 GL gl = GetGL(); 11558 11558  GroupEditor.java
.. .. @@ -3041,7 +3041,7 @@ 3041 3041 child.CloseUI(); 3042 3042 listUI.remove(child); 3043 3043 3044  - child.editWindow = null; // ???????????3044  + //child.editWindow = null; // ???????????3045 3045 } 3046 3046 objEditor.ctrlPanel.FlushUI(); 3047 3047 //objEditor.jTree.clearSelection(); .. .. @@ -4310,15 +4310,13 @@ 4310 4310 4311 4311 objEditor.SetText(); // jan 2014 4312 4312 4313  - Object3D object = (Object3D) tps[0].getLastPathComponent();4314  -4315  - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(object instanceof Camera))4313  + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))4316 4314 CameraPane.flash = true; 4317 4315 4318  - if (tps != null && tps.length > 0 && object instanceof Camera)4316  + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)4319 4317 // a camera 4320 4318 { 4321  - if (object != Globals.theRenderer.LightCamera())4319  + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())4322 4320 { 4323 4321 CameraPane.camerachangeframe = 0; // don't refuse it 4324 4322 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); ObjEditor.java
.. .. @@ -1935,6 +1935,7 @@ 1935 1935 e2.printStackTrace(); 1936 1936 } 1937 1937 } 1938  +1938 1939 LoadJMEThread loadThread; 1939 1940 1940 1941 class LoadJMEThread extends Thread .. .. @@ -1992,6 +1993,7 @@ 1992 1993 //LoadFile0(filename, converter); 1993 1994 } 1994 1995 } 1996  +1995 1997 LoadOBJThread loadObjThread; 1996 1998 1997 1999 class LoadOBJThread extends Thread .. .. @@ -3212,9 +3214,6 @@ 3212 3214 objEditor.refreshContents(); 3213 3215 } 3214 3216 3215  - Object3D graphs[] = new Object3D[10000];3216  - int undoindex = 0;3217  -3218 3217 static public Object clone(Object o) 3219 3218 { 3220 3219 try .. .. @@ -3237,16 +3236,31 @@ 3237 3236 } 3238 3237 } 3239 3238 3239  + cRadio GetCurrentTab()3240  + {3241  + cRadio ab;3242  + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)3243  + {3244  + ab = (cRadio)e.nextElement();3245  + if(ab.GetObject() == client)3246  + {3247  + return ab;3248  + }3249  + }3250  +3251  + return null;3252  + }3253  +3240 3254 public void Save() 3241 3255 { 3242  - if (true) return;3256  + cRadio tab = GetCurrentTab();3243 3257 3244 3258 //EditorFrame.m_MainFrame.requestFocusInWindow(); 3245  - graphs[undoindex++] = (Object3D)clone(copy);3259  + tab.graphs[tab.undoindex++] = (Object3D)clone(copy);3246 3260 3247  - for (int i = undoindex; i < graphs.length; i++)3261  + for (int i = tab.undoindex; i < tab.graphs.length; i++)3248 3262 { 3249  - graphs[i] = null;3263  + tab.graphs[i] = null;3250 3264 } 3251 3265 3252 3266 // test save .. .. @@ -3254,7 +3268,7 @@ 3254 3268 { 3255 3269 try 3256 3270 { 3257  - FileOutputStream ostream = new FileOutputStream("save" + undoindex);3271  + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);3258 3272 ObjectOutputStream p = new ObjectOutputStream(ostream); 3259 3273 3260 3274 p.writeObject(copy); .. .. @@ -3269,48 +3283,70 @@ 3269 3283 } 3270 3284 } 3271 3285 3286  + void CopyChanged(Object3D obj)3287  + {3288  + copy.clear();3289  +3290  + for (int i=0; i<obj.Size(); i++)3291  + {3292  + copy.add(obj.get(i));3293  + }3294  +3295  + copy.Touch();3296  +3297  + ResetModel();3298  + copy.HardTouch(); // recompile?3299  +3300  + cRadio ab;3301  + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)3302  + {3303  + ab = (cRadio)e.nextElement();3304  + Object3D test = copy.GetObject(ab.object.GetUUID());3305  + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());3306  + if (test != null)3307  + {3308  + test.editWindow = ab.object.editWindow;3309  + ab.object = test;3310  + }3311  + }3312  +3313  + refreshContents();3314  + }3315  +3272 3316 public void Undo() 3273 3317 { 3274  - if (undoindex == 0)3318  + cRadio tab = GetCurrentTab();3319  +3320  + if (tab.undoindex == 0)3275 3321 { 3276 3322 java.awt.Toolkit.getDefaultToolkit().beep(); 3277 3323 return; 3278 3324 } 3279 3325 3280  - if (graphs[undoindex] == null)3326  + if (tab.graphs[tab.undoindex] == null)3281 3327 { 3282 3328 Save(); 3283  - undoindex -= 1;3329  + tab.undoindex -= 1;3284 3330 } 3285 3331 3286  - undoindex -= 1;3332  + tab.undoindex -= 1;3287 3333 3288  - copy = graphs[undoindex];3289  -3290  - cameraView.object = copy;3291  - copy.Touch();3292  -3293  - ResetModel();3294  - refreshContents();3334  + CopyChanged(tab.graphs[tab.undoindex]);3295 3335 } 3296 3336 3297 3337 public void Redo() 3298 3338 { 3299  - if (graphs[undoindex + 1] == null)3339  + cRadio tab = GetCurrentTab();3340  +3341  + if (tab.graphs[tab.undoindex + 1] == null)3300 3342 { 3301 3343 java.awt.Toolkit.getDefaultToolkit().beep(); 3302 3344 return; 3303 3345 } 3304 3346 3305  - undoindex += 1;3347  + tab.undoindex += 1;3306 3348 3307  - copy = graphs[undoindex];3308  -3309  - cameraView.object = copy;3310  - copy.Touch();3311  -3312  - ResetModel();3313  - refreshContents();3349  + CopyChanged(tab.graphs[tab.undoindex]);3314 3350 } 3315 3351 3316 3352 void ImportGFD() Object3D.java
.. .. @@ -14,11 +14,15 @@ 14 14 import //weka.core. 15 15 matrix.Matrix; 16 16 17  +import java.util.UUID;18  +17 19 //import net.sourceforge.sizeof.SizeOf; 18 20 public class Object3D extends Vector<Object3D> implements java.io.Serializable, iSendInfo //, aurelienribon.tweenengine.TweenAccessor<Object3D> 19 21 { 20 22 //static final long serialVersionUID = -607422624994562685L; 21 23 static final long serialVersionUID = 5022536242724664900L; 24  +25  + private UUID uuid = UUID.randomUUID();22 26 23 27 ScriptNode scriptnode; 24 28 .. .. @@ -5371,6 +5375,43 @@ 5371 5375 } 5372 5376 } 5373 5377 5378  + UUID GetUUID()5379  + {5380  + if (uuid == null)5381  + {5382  + // Serial5383  + uuid = UUID.randomUUID();5384  + }5385  +5386  + return uuid;5387  + }5388  +5389  + Object3D GetObject(UUID uid)5390  + {5391  + if (blockloop)5392  + return null;5393  +5394  + if (GetUUID().equals(uid))5395  + return this;5396  +5397  + int nb = Size();5398  + for (int i = 0; i < nb; i++)5399  + {5400  + Object3D child = (Object3D) get(i);5401  +5402  + if (child == null)5403  + continue;5404  +5405  + blockloop = true;5406  + Object3D obj = child.GetObject(uid);5407  + blockloop = false;5408  + if (obj != null)5409  + return obj;5410  + }5411  +5412  + return null;5413  + }5414  +5374 5415 void SetBumpTexture(String tex) 5375 5416 { 5376 5417 if (GetTextures() == null) cRadio.java
.. .. @@ -35,6 +35,9 @@ 35 35 camera = (Camera)Grafreed.clone(c); 36 36 } 37 37 38  + Object3D graphs[] = new Object3D[10000];39  + int undoindex = 0;40  +38 41 Object3D object; 39 42 Camera camera; 40 43 cButton layout;