Normand Briere
2019-06-30 cfd7a643cb5a445016ddb15595158ecc59b184fd
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
....@@ -2387,6 +2395,10 @@
23872395 }
23882396 */
23892397 }
2398
+ else
2399
+ {
2400
+ //((ObjEditor)editWindow).SetupUI2(null);
2401
+ }
23902402 }
23912403
23922404 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2428,6 +2440,14 @@
24282440 {
24292441 editWindow.refreshContents();
24302442 }
2443
+ else
2444
+ {
2445
+ if (manipWindow != null)
2446
+ {
2447
+ manipWindow.refreshContents();
2448
+ }
2449
+ }
2450
+
24312451 //if (parent != null)
24322452 //parent.refreshEditWindow();
24332453 }
....@@ -4958,6 +4978,14 @@
49584978 }
49594979 }
49604980
4981
+ ObjEditor GetWindow()
4982
+ {
4983
+ if (editWindow != null)
4984
+ return editWindow;
4985
+
4986
+ return manipWindow;
4987
+ }
4988
+
49614989 cTreePath Select(int indexcount, boolean deselect)
49624990 {
49634991 if (hide || dontselect)
....@@ -4994,10 +5022,11 @@
49945022 if (leaf != null)
49955023 {
49965024 cTreePath tp = new cTreePath(this, leaf);
4997
- if (editWindow != null)
5025
+ ObjEditor window = GetWindow();
5026
+ if (window != null)
49985027 {
49995028 //System.out.println("editWindow = " + editWindow + " vs " + this);
5000
- editWindow.Select(tp, deselect, true);
5029
+ window.Select(tp, deselect, true);
50015030 }
50025031
50035032 return tp;
....@@ -5014,6 +5043,7 @@
50145043
50155044 if (child == null)
50165045 continue;
5046
+
50175047 if (child.HasTransparency() && child.size() != 0)
50185048 {
50195049 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -5023,9 +5053,10 @@
50235053 if (leaf != null)
50245054 {
50255055 cTreePath tp = new cTreePath(this, leaf);
5026
- if (editWindow != null)
5056
+ ObjEditor window = GetWindow();
5057
+ if (window != null)
50275058 {
5028
- editWindow.Select(tp, deselect, true);
5059
+ window.Select(tp, deselect, true);
50295060 }
50305061
50315062 return tp;
....@@ -5746,7 +5777,7 @@
57465777 support = support;
57475778
57485779 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5749
- boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5780
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
57505781
57515782 if (!usecalllists && bRep != null && bRep.displaylist > 0)
57525783 {
....@@ -5767,7 +5798,7 @@
57675798
57685799 if (!selectmode && //display.DrawMode() != display.SELECTION &&
57695800 //(touched || (bRep != null && bRep.displaylist <= 0)))
5770
- (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
5801
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
57715802 {
57725803 Globals.lighttouched = true;
57735804 } // all panes...
....@@ -5899,6 +5930,7 @@
58995930 if (GetBRep() != null)
59005931 {
59015932 display.NextIndex();
5933
+
59025934 // vertex color conflict : gl.glCallList(list);
59035935 DrawNode(display, root, selected);
59045936 if (this instanceof BezierPatch)
....@@ -6359,6 +6391,11 @@
63596391 // dec 2012
63606392 new Exception().printStackTrace();
63616393 return;
6394
+ }
6395
+
6396
+ if (dontselect)
6397
+ {
6398
+ //bRep.GenerateNormalsMINE();
63626399 }
63636400
63646401 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -7796,6 +7833,10 @@
77967833 editWindow = null;
77977834 } // ?
77987835 }
7836
+ else
7837
+ {
7838
+ //editWindow.closeUI();
7839
+ }
77997840 }
78007841
78017842 boolean root; // patch for edit windows
....@@ -7953,6 +7994,10 @@
79537994 }
79547995
79557996 transient ObjEditor editWindow;
7997
+ transient ObjEditor manipWindow;
7998
+
7999
+ transient boolean pinned;
8000
+
79568001 transient ObjectUI objectUI;
79578002 public static int povDepth = 0;
79588003 private static cVector tbMin = new cVector();