.. | .. |
---|
181 | 181 | return; |
---|
182 | 182 | } |
---|
183 | 183 | |
---|
184 | | - Object3D o = new Object3D(); |
---|
| 184 | + Object3D o = new Object3D("copy of " + this.name); |
---|
185 | 185 | |
---|
186 | 186 | hashtable.put(GetUUID(), o); |
---|
187 | 187 | |
---|
.. | .. |
---|
219 | 219 | if (!hashtable.containsKey(GetUUID())) |
---|
220 | 220 | return; |
---|
221 | 221 | |
---|
| 222 | + if (blockloop) |
---|
| 223 | + return; |
---|
| 224 | + |
---|
| 225 | + blockloop = true; |
---|
| 226 | + |
---|
222 | 227 | Object3D o = hashtable.get(GetUUID()); |
---|
223 | 228 | |
---|
224 | 229 | RestoreBigData(o); |
---|
225 | 230 | |
---|
226 | | - hashtable.remove(GetUUID()); |
---|
| 231 | + //hashtable.remove(GetUUID()); |
---|
227 | 232 | |
---|
228 | 233 | for (int i=0; i<Size(); i++) |
---|
229 | 234 | { |
---|
230 | 235 | get(i).RestoreBigData(hashtable); |
---|
231 | 236 | } |
---|
| 237 | + |
---|
| 238 | + blockloop = false; |
---|
232 | 239 | } |
---|
233 | 240 | |
---|
234 | 241 | void RestoreBigData(Object3D o) |
---|
.. | .. |
---|
881 | 888 | |
---|
882 | 889 | if (marked && Globals.isLIVE() && live && |
---|
883 | 890 | //TEMP21aug2018 |
---|
884 | | - (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
| 891 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) && |
---|
885 | 892 | currentframe != Globals.framecount) |
---|
886 | 893 | { |
---|
887 | 894 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
966 | 973 | if (material == null || material.multiply) |
---|
967 | 974 | return true; |
---|
968 | 975 | |
---|
| 976 | + // Transparent objects are dynamic because we have to sort the triangles. |
---|
969 | 977 | return material.opacity > 0.99; |
---|
970 | 978 | } |
---|
971 | 979 | |
---|
.. | .. |
---|
2387 | 2395 | } |
---|
2388 | 2396 | */ |
---|
2389 | 2397 | } |
---|
| 2398 | + else |
---|
| 2399 | + { |
---|
| 2400 | + //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2401 | + } |
---|
2390 | 2402 | } |
---|
2391 | 2403 | |
---|
2392 | 2404 | void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) |
---|
.. | .. |
---|
2428 | 2440 | { |
---|
2429 | 2441 | editWindow.refreshContents(); |
---|
2430 | 2442 | } |
---|
| 2443 | + else |
---|
| 2444 | + { |
---|
| 2445 | + if (manipWindow != null) |
---|
| 2446 | + { |
---|
| 2447 | + manipWindow.refreshContents(); |
---|
| 2448 | + } |
---|
| 2449 | + } |
---|
| 2450 | + |
---|
2431 | 2451 | //if (parent != null) |
---|
2432 | 2452 | //parent.refreshEditWindow(); |
---|
2433 | 2453 | } |
---|
.. | .. |
---|
4958 | 4978 | } |
---|
4959 | 4979 | } |
---|
4960 | 4980 | |
---|
| 4981 | + ObjEditor GetWindow() |
---|
| 4982 | + { |
---|
| 4983 | + if (editWindow != null) |
---|
| 4984 | + return editWindow; |
---|
| 4985 | + |
---|
| 4986 | + return manipWindow; |
---|
| 4987 | + } |
---|
| 4988 | + |
---|
4961 | 4989 | cTreePath Select(int indexcount, boolean deselect) |
---|
4962 | 4990 | { |
---|
4963 | 4991 | if (hide || dontselect) |
---|
.. | .. |
---|
4994 | 5022 | if (leaf != null) |
---|
4995 | 5023 | { |
---|
4996 | 5024 | cTreePath tp = new cTreePath(this, leaf); |
---|
4997 | | - if (editWindow != null) |
---|
| 5025 | + ObjEditor window = GetWindow(); |
---|
| 5026 | + if (window != null) |
---|
4998 | 5027 | { |
---|
4999 | 5028 | //System.out.println("editWindow = " + editWindow + " vs " + this); |
---|
5000 | | - editWindow.Select(tp, deselect, true); |
---|
| 5029 | + window.Select(tp, deselect, true); |
---|
5001 | 5030 | } |
---|
5002 | 5031 | |
---|
5003 | 5032 | return tp; |
---|
.. | .. |
---|
5023 | 5052 | if (leaf != null) |
---|
5024 | 5053 | { |
---|
5025 | 5054 | cTreePath tp = new cTreePath(this, leaf); |
---|
5026 | | - if (editWindow != null) |
---|
| 5055 | + ObjEditor window = GetWindow(); |
---|
| 5056 | + if (window != null) |
---|
5027 | 5057 | { |
---|
5028 | | - editWindow.Select(tp, deselect, true); |
---|
| 5058 | + window.Select(tp, deselect, true); |
---|
5029 | 5059 | } |
---|
5030 | 5060 | |
---|
5031 | 5061 | return tp; |
---|
.. | .. |
---|
5746 | 5776 | support = support; |
---|
5747 | 5777 | |
---|
5748 | 5778 | //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); |
---|
| 5779 | + boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5750 | 5780 | |
---|
5751 | 5781 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5752 | 5782 | { |
---|
.. | .. |
---|
5767 | 5797 | |
---|
5768 | 5798 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5769 | 5799 | //(touched || (bRep != null && bRep.displaylist <= 0))) |
---|
5770 | | - (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0))) |
---|
| 5800 | + (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched || (bRep != null && bRep.displaylist <= 0))) |
---|
5771 | 5801 | { |
---|
5772 | 5802 | Globals.lighttouched = true; |
---|
5773 | 5803 | } // all panes... |
---|
.. | .. |
---|
6359 | 6389 | // dec 2012 |
---|
6360 | 6390 | new Exception().printStackTrace(); |
---|
6361 | 6391 | return; |
---|
| 6392 | + } |
---|
| 6393 | + |
---|
| 6394 | + if (dontselect) |
---|
| 6395 | + { |
---|
| 6396 | + //bRep.GenerateNormalsMINE(); |
---|
6362 | 6397 | } |
---|
6363 | 6398 | |
---|
6364 | 6399 | display.DrawGeometry(bRep, flipV, selectmode); |
---|
.. | .. |
---|
7796 | 7831 | editWindow = null; |
---|
7797 | 7832 | } // ? |
---|
7798 | 7833 | } |
---|
| 7834 | + else |
---|
| 7835 | + { |
---|
| 7836 | + //editWindow.closeUI(); |
---|
| 7837 | + } |
---|
7799 | 7838 | } |
---|
7800 | 7839 | |
---|
7801 | 7840 | boolean root; // patch for edit windows |
---|
.. | .. |
---|
7953 | 7992 | } |
---|
7954 | 7993 | |
---|
7955 | 7994 | transient ObjEditor editWindow; |
---|
| 7995 | + transient ObjEditor manipWindow; |
---|
| 7996 | + |
---|
| 7997 | + transient boolean pinned; |
---|
| 7998 | + |
---|
7956 | 7999 | transient ObjectUI objectUI; |
---|
7957 | 8000 | public static int povDepth = 0; |
---|
7958 | 8001 | private static cVector tbMin = new cVector(); |
---|