.. | .. |
---|
300 | 300 | } |
---|
301 | 301 | |
---|
302 | 302 | boolean live = false; |
---|
| 303 | + boolean dontselect = false; |
---|
303 | 304 | boolean hide = false; |
---|
304 | 305 | boolean link2master = false; // performs reset support/master at each frame |
---|
305 | 306 | boolean marked = false; // animation node |
---|
.. | .. |
---|
1834 | 1835 | if (obj.name == null) |
---|
1835 | 1836 | continue; // can't be a null one |
---|
1836 | 1837 | |
---|
| 1838 | + // Try perfect match first. |
---|
1837 | 1839 | if (n.equals(obj.name)) |
---|
1838 | 1840 | { |
---|
1839 | 1841 | theobj = obj; |
---|
1840 | 1842 | count++; |
---|
1841 | 1843 | } |
---|
1842 | 1844 | } |
---|
| 1845 | + |
---|
| 1846 | + // not needed: n = n.split(":")[0]; // Poser generates a count |
---|
1843 | 1847 | |
---|
1844 | 1848 | if (count != 1) |
---|
1845 | 1849 | for (int i=Size(); --i>=0;) |
---|
.. | .. |
---|
3002 | 3006 | v.fromParent = LA.newMatrix(); |
---|
3003 | 3007 | } |
---|
3004 | 3008 | |
---|
3005 | | - LA.matConcat(v.toParent, toParent, v.toParent); |
---|
3006 | | - LA.matConcat(fromParent, v.fromParent, v.fromParent); |
---|
| 3009 | +// LA.matConcat(v.toParent, toParent, v.toParent); |
---|
| 3010 | +// LA.matConcat(fromParent, v.fromParent, v.fromParent); |
---|
| 3011 | + LA.matConcat(toParent, v.toParent, v.toParent); |
---|
| 3012 | + LA.matConcat(v.fromParent, fromParent, v.fromParent); |
---|
3007 | 3013 | } |
---|
3008 | 3014 | |
---|
3009 | 3015 | toParent = null; // LA.matIdentity(toParent); |
---|
.. | .. |
---|
3236 | 3242 | bRep.support = null; |
---|
3237 | 3243 | BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep); |
---|
3238 | 3244 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3239 | | - temprep.SplitInTwo(reduction34, onlyone); |
---|
| 3245 | + |
---|
| 3246 | + while(temprep.SplitInTwo(reduction34, onlyone)); |
---|
| 3247 | + |
---|
3240 | 3248 | bRep = temprep; |
---|
3241 | 3249 | bRep.support = sup; |
---|
3242 | 3250 | Touch(); |
---|
.. | .. |
---|
4711 | 4719 | |
---|
4712 | 4720 | cTreePath SelectLeaf(int indexcount, boolean deselect) |
---|
4713 | 4721 | { |
---|
4714 | | - if (hide) |
---|
| 4722 | + if (hide || dontselect) |
---|
4715 | 4723 | return null; |
---|
4716 | 4724 | |
---|
4717 | 4725 | if (count <= 0) |
---|
.. | .. |
---|
4737 | 4745 | |
---|
4738 | 4746 | cTreePath Select(int indexcount, boolean deselect) |
---|
4739 | 4747 | { |
---|
4740 | | - if (hide) |
---|
| 4748 | + if (hide || dontselect) |
---|
4741 | 4749 | return null; |
---|
4742 | 4750 | |
---|
4743 | 4751 | if (count <= 0) |
---|
.. | .. |
---|
5407 | 5415 | boolean NeedSupport() |
---|
5408 | 5416 | { |
---|
5409 | 5417 | return |
---|
5410 | | - CameraPane.SUPPORT && !CameraPane.movingcamera && link2master && /*live &&*/ support != null |
---|
| 5418 | + CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null |
---|
5411 | 5419 | // PROBLEM with CROWD!! |
---|
5412 | 5420 | && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
5413 | 5421 | } |
---|
.. | .. |
---|
5424 | 5432 | } |
---|
5425 | 5433 | |
---|
5426 | 5434 | if (display.DrawMode() == iCameraPane.SELECTION && |
---|
5427 | | - hide) |
---|
| 5435 | + (hide || dontselect)) |
---|
5428 | 5436 | return; |
---|
5429 | 5437 | |
---|
5430 | 5438 | if (name != null && name.contains("sclera")) |
---|
.. | .. |
---|
5666 | 5674 | tex = GetTextures(); |
---|
5667 | 5675 | } |
---|
5668 | 5676 | |
---|
5669 | | - display.BindTextures(tex, texres); |
---|
| 5677 | + boolean failed = false; |
---|
| 5678 | + |
---|
| 5679 | + try |
---|
| 5680 | + { |
---|
| 5681 | + display.BindTextures(tex, texres); |
---|
| 5682 | + } |
---|
| 5683 | + catch (Exception e) |
---|
| 5684 | + { |
---|
| 5685 | + System.err.println("FAILED: " + this); |
---|
| 5686 | + failed = true; |
---|
| 5687 | + } |
---|
5670 | 5688 | |
---|
5671 | 5689 | if (!compiled) |
---|
5672 | 5690 | { |
---|
.. | .. |
---|
5688 | 5706 | } |
---|
5689 | 5707 | } |
---|
5690 | 5708 | |
---|
5691 | | - display.ReleaseTextures(tex); |
---|
| 5709 | + if (!failed) |
---|
| 5710 | + display.ReleaseTextures(tex); |
---|
5692 | 5711 | |
---|
5693 | 5712 | display.PopMaterial(this, selected); |
---|
5694 | 5713 | } |
---|
.. | .. |
---|
5817 | 5836 | |
---|
5818 | 5837 | void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
5819 | 5838 | { |
---|
| 5839 | + if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
| 5840 | + return; |
---|
| 5841 | + |
---|
5820 | 5842 | if (hide) |
---|
5821 | 5843 | return; |
---|
5822 | 5844 | // shadow optimisation |
---|
.. | .. |
---|
5942 | 5964 | if (display.DrawMode() == display.SHADOW && projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
5943 | 5965 | return; // no shadow for transparent objects |
---|
5944 | 5966 | |
---|
| 5967 | + if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
| 5968 | + return; |
---|
| 5969 | + |
---|
5945 | 5970 | if (hide) |
---|
5946 | 5971 | return; |
---|
5947 | 5972 | |
---|