Normand Briere
2019-06-26 89b25e7cc97f6fe221dfd41c4d463500f8a31bc1
Object3D.java
....@@ -181,7 +181,7 @@
181181 return;
182182 }
183183
184
- Object3D o = new Object3D();
184
+ Object3D o = new Object3D("copy of " + this.name);
185185
186186 hashtable.put(GetUUID(), o);
187187
....@@ -219,16 +219,23 @@
219219 if (!hashtable.containsKey(GetUUID()))
220220 return;
221221
222
+ if (blockloop)
223
+ return;
224
+
225
+ blockloop = true;
226
+
222227 Object3D o = hashtable.get(GetUUID());
223228
224229 RestoreBigData(o);
225230
226
- hashtable.remove(GetUUID());
231
+ //hashtable.remove(GetUUID());
227232
228233 for (int i=0; i<Size(); i++)
229234 {
230235 get(i).RestoreBigData(hashtable);
231236 }
237
+
238
+ blockloop = false;
232239 }
233240
234241 void RestoreBigData(Object3D o)
....@@ -881,7 +888,7 @@
881888
882889 if (marked && Globals.isLIVE() && live &&
883890 //TEMP21aug2018
884
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
891
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
885892 currentframe != Globals.framecount)
886893 {
887894 currentframe = Globals.framecount;
....@@ -966,6 +973,7 @@
966973 if (material == null || material.multiply)
967974 return true;
968975
976
+ // Transparent objects are dynamic because we have to sort the triangles.
969977 return material.opacity > 0.99;
970978 }
971979
....@@ -2432,6 +2440,14 @@
24322440 {
24332441 editWindow.refreshContents();
24342442 }
2443
+ else
2444
+ {
2445
+ if (manipWindow != null)
2446
+ {
2447
+ manipWindow.refreshContents();
2448
+ }
2449
+ }
2450
+
24352451 //if (parent != null)
24362452 //parent.refreshEditWindow();
24372453 }
....@@ -4962,6 +4978,14 @@
49624978 }
49634979 }
49644980
4981
+ ObjEditor GetWindow()
4982
+ {
4983
+ if (editWindow != null)
4984
+ return editWindow;
4985
+
4986
+ return manipWindow;
4987
+ }
4988
+
49654989 cTreePath Select(int indexcount, boolean deselect)
49664990 {
49674991 if (hide || dontselect)
....@@ -4998,10 +5022,11 @@
49985022 if (leaf != null)
49995023 {
50005024 cTreePath tp = new cTreePath(this, leaf);
5001
- if (editWindow != null)
5025
+ ObjEditor window = GetWindow();
5026
+ if (window != null)
50025027 {
50035028 //System.out.println("editWindow = " + editWindow + " vs " + this);
5004
- editWindow.Select(tp, deselect, true);
5029
+ window.Select(tp, deselect, true);
50055030 }
50065031
50075032 return tp;
....@@ -5027,9 +5052,10 @@
50275052 if (leaf != null)
50285053 {
50295054 cTreePath tp = new cTreePath(this, leaf);
5030
- if (editWindow != null)
5055
+ ObjEditor window = GetWindow();
5056
+ if (window != null)
50315057 {
5032
- editWindow.Select(tp, deselect, true);
5058
+ window.Select(tp, deselect, true);
50335059 }
50345060
50355061 return tp;
....@@ -5750,7 +5776,7 @@
57505776 support = support;
57515777
57525778 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5753
- boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5779
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
57545780
57555781 if (!usecalllists && bRep != null && bRep.displaylist > 0)
57565782 {
....@@ -5771,7 +5797,7 @@
57715797
57725798 if (!selectmode && //display.DrawMode() != display.SELECTION &&
57735799 //(touched || (bRep != null && bRep.displaylist <= 0)))
5774
- (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
5800
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched || (bRep != null && bRep.displaylist <= 0)))
57755801 {
57765802 Globals.lighttouched = true;
57775803 } // all panes...
....@@ -7966,6 +7992,10 @@
79667992 }
79677993
79687994 transient ObjEditor editWindow;
7995
+ transient ObjEditor manipWindow;
7996
+
7997
+ transient boolean pinned;
7998
+
79697999 transient ObjectUI objectUI;
79708000 public static int povDepth = 0;
79718001 private static cVector tbMin = new cVector();