.. | .. |
---|
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 | |
---|
.. | .. |
---|
2432 | 2440 | { |
---|
2433 | 2441 | editWindow.refreshContents(); |
---|
2434 | 2442 | } |
---|
| 2443 | + else |
---|
| 2444 | + { |
---|
| 2445 | + if (manipWindow != null) |
---|
| 2446 | + { |
---|
| 2447 | + manipWindow.refreshContents(); |
---|
| 2448 | + } |
---|
| 2449 | + } |
---|
| 2450 | + |
---|
2435 | 2451 | //if (parent != null) |
---|
2436 | 2452 | //parent.refreshEditWindow(); |
---|
2437 | 2453 | } |
---|
.. | .. |
---|
4962 | 4978 | } |
---|
4963 | 4979 | } |
---|
4964 | 4980 | |
---|
| 4981 | + ObjEditor GetWindow() |
---|
| 4982 | + { |
---|
| 4983 | + if (editWindow != null) |
---|
| 4984 | + return editWindow; |
---|
| 4985 | + |
---|
| 4986 | + return manipWindow; |
---|
| 4987 | + } |
---|
| 4988 | + |
---|
4965 | 4989 | cTreePath Select(int indexcount, boolean deselect) |
---|
4966 | 4990 | { |
---|
4967 | 4991 | if (hide || dontselect) |
---|
.. | .. |
---|
4998 | 5022 | if (leaf != null) |
---|
4999 | 5023 | { |
---|
5000 | 5024 | cTreePath tp = new cTreePath(this, leaf); |
---|
5001 | | - if (editWindow != null) |
---|
| 5025 | + ObjEditor window = GetWindow(); |
---|
| 5026 | + if (window != null) |
---|
5002 | 5027 | { |
---|
5003 | 5028 | //System.out.println("editWindow = " + editWindow + " vs " + this); |
---|
5004 | | - editWindow.Select(tp, deselect, true); |
---|
| 5029 | + window.Select(tp, deselect, true); |
---|
5005 | 5030 | } |
---|
5006 | 5031 | |
---|
5007 | 5032 | return tp; |
---|
.. | .. |
---|
5027 | 5052 | if (leaf != null) |
---|
5028 | 5053 | { |
---|
5029 | 5054 | cTreePath tp = new cTreePath(this, leaf); |
---|
5030 | | - if (editWindow != null) |
---|
| 5055 | + ObjEditor window = GetWindow(); |
---|
| 5056 | + if (window != null) |
---|
5031 | 5057 | { |
---|
5032 | | - editWindow.Select(tp, deselect, true); |
---|
| 5058 | + window.Select(tp, deselect, true); |
---|
5033 | 5059 | } |
---|
5034 | 5060 | |
---|
5035 | 5061 | return tp; |
---|
.. | .. |
---|
5750 | 5776 | support = support; |
---|
5751 | 5777 | |
---|
5752 | 5778 | //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); |
---|
5754 | 5780 | |
---|
5755 | 5781 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5756 | 5782 | { |
---|
.. | .. |
---|
5771 | 5797 | |
---|
5772 | 5798 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5773 | 5799 | //(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))) |
---|
5775 | 5801 | { |
---|
5776 | 5802 | Globals.lighttouched = true; |
---|
5777 | 5803 | } // all panes... |
---|
.. | .. |
---|
7966 | 7992 | } |
---|
7967 | 7993 | |
---|
7968 | 7994 | transient ObjEditor editWindow; |
---|
| 7995 | + transient ObjEditor manipWindow; |
---|
| 7996 | + |
---|
| 7997 | + transient boolean pinned; |
---|
| 7998 | + |
---|
7969 | 7999 | transient ObjectUI objectUI; |
---|
7970 | 8000 | public static int povDepth = 0; |
---|
7971 | 8001 | private static cVector tbMin = new cVector(); |
---|