.. | .. |
---|
279 | 279 | |
---|
280 | 280 | Composite compo = new Composite(); |
---|
281 | 281 | |
---|
282 | | - super.deepCopySelf(compo); |
---|
| 282 | + super.deepCopyNode(compo); |
---|
| 283 | + |
---|
| 284 | + compo.count = 2; |
---|
283 | 285 | |
---|
284 | 286 | for (int i = 0; i < Children().size(); i++) |
---|
285 | 287 | { |
---|
286 | 288 | Object3D obj = (Object3D) Children().reserve(i); |
---|
| 289 | + if (obj == null) |
---|
| 290 | + continue; |
---|
287 | 291 | compo.addChild(obj.copyExpand()); |
---|
288 | 292 | Children().release(i); |
---|
289 | 293 | } |
---|
.. | .. |
---|
293 | 297 | return compo; |
---|
294 | 298 | } |
---|
295 | 299 | |
---|
296 | | - protected void deepCopySelf(Object3D other) |
---|
| 300 | + protected void deepCopyNode(Object3D other) |
---|
297 | 301 | { |
---|
298 | | - super.deepCopySelf(other); |
---|
| 302 | + super.deepCopyNode(other); |
---|
299 | 303 | |
---|
300 | 304 | if (false) |
---|
301 | 305 | { |
---|
.. | .. |
---|
401 | 405 | { |
---|
402 | 406 | child = (Object3D) e.nextElement(); |
---|
403 | 407 | } |
---|
404 | | - |
---|
405 | 408 | } |
---|
406 | 409 | |
---|
407 | 410 | void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) |
---|
.. | .. |
---|
790 | 793 | |
---|
791 | 794 | void draw(ClickInfo info, int level, boolean select) |
---|
792 | 795 | { |
---|
| 796 | + new Exception().printStackTrace(); |
---|
| 797 | + |
---|
793 | 798 | ClickInfo newInfo = new ClickInfo(); |
---|
794 | 799 | newInfo.flags = info.flags; |
---|
795 | 800 | newInfo.bounds = info.bounds; |
---|
.. | .. |
---|
867 | 872 | tex = GetTextures(); |
---|
868 | 873 | } |
---|
869 | 874 | |
---|
| 875 | + boolean failedPigment = false; |
---|
| 876 | + boolean failedBump = false; |
---|
| 877 | + |
---|
870 | 878 | try |
---|
871 | 879 | { |
---|
872 | | - display.BindTextures(tex, texres); |
---|
| 880 | + display.BindPigmentTexture(tex, texres); |
---|
873 | 881 | } |
---|
874 | 882 | catch (Exception e) |
---|
875 | 883 | { |
---|
876 | | - System.err.println("FAILED: " + this); |
---|
| 884 | + // System.err.println("FAILED: " + this); |
---|
| 885 | + failedPigment = true; |
---|
877 | 886 | } |
---|
878 | | - |
---|
| 887 | + |
---|
| 888 | + try |
---|
| 889 | + { |
---|
| 890 | + display.BindBumpTexture(tex, texres); |
---|
| 891 | + } |
---|
| 892 | + catch (Exception e) |
---|
| 893 | + { |
---|
| 894 | + //System.err.println("FAILED: " + this); |
---|
| 895 | + failedBump = true; |
---|
| 896 | + } |
---|
| 897 | + |
---|
879 | 898 | if (//true) // new NORMAND |
---|
880 | 899 | touched || softtouched) |
---|
881 | 900 | { |
---|
.. | .. |
---|
937 | 956 | } |
---|
938 | 957 | } |
---|
939 | 958 | |
---|
940 | | - display.ReleaseTextures(tex); |
---|
| 959 | + if (!failedBump) |
---|
| 960 | + display.ReleaseBumpTexture(tex); |
---|
| 961 | + |
---|
| 962 | + if (!failedPigment) |
---|
| 963 | + display.ReleasePigmentTexture(tex); |
---|
941 | 964 | } |
---|
942 | 965 | |
---|
943 | 966 | void Reset0() |
---|