.. | .. |
---|
4351 | 4351 | } |
---|
4352 | 4352 | } |
---|
4353 | 4353 | |
---|
| 4354 | + void RepairSOV() |
---|
| 4355 | + { |
---|
| 4356 | + if (blockloop) |
---|
| 4357 | + return; |
---|
| 4358 | + |
---|
| 4359 | + String texname = this.GetPigmentTexture(); |
---|
| 4360 | + |
---|
| 4361 | + if (texname.startsWith("sov")) |
---|
| 4362 | + { |
---|
| 4363 | + String[] s = texname.split("/"); |
---|
| 4364 | + |
---|
| 4365 | + String[] sname = s[1].split("Color.pn"); |
---|
| 4366 | + |
---|
| 4367 | + texname = sname[0]; |
---|
| 4368 | + |
---|
| 4369 | + if (sname.length > 1) |
---|
| 4370 | + { |
---|
| 4371 | + texname += "Color.jpg"; |
---|
| 4372 | + } |
---|
| 4373 | + |
---|
| 4374 | + this.SetPigmentTexture("sov/" + texname); |
---|
| 4375 | + } |
---|
| 4376 | + |
---|
| 4377 | + texname = this.GetBumpTexture(); |
---|
| 4378 | + |
---|
| 4379 | + if (texname.startsWith("sov")) |
---|
| 4380 | + { |
---|
| 4381 | + String[] s = texname.split("/"); |
---|
| 4382 | + |
---|
| 4383 | + String[] sname = s[1].split("Bump.pn"); |
---|
| 4384 | + |
---|
| 4385 | + texname = sname[0]; |
---|
| 4386 | + |
---|
| 4387 | + if (sname.length > 1) |
---|
| 4388 | + { |
---|
| 4389 | + texname += "Bump.jpg"; |
---|
| 4390 | + } |
---|
| 4391 | + |
---|
| 4392 | + this.SetBumpTexture("sov/" + texname); |
---|
| 4393 | + } |
---|
| 4394 | + |
---|
| 4395 | + for (int i=0; i<Size(); i++) |
---|
| 4396 | + { |
---|
| 4397 | + blockloop = true; |
---|
| 4398 | + get(i).RepairSOV(); |
---|
| 4399 | + blockloop = false; |
---|
| 4400 | + } |
---|
| 4401 | + } |
---|
| 4402 | + |
---|
4354 | 4403 | void RepairTexture() |
---|
4355 | 4404 | { |
---|
4356 | 4405 | if (this instanceof FileObject || blockloop) |
---|
.. | .. |
---|
5673 | 5722 | boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection(); |
---|
5674 | 5723 | |
---|
5675 | 5724 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5676 | | - (touched || (bRep != null && bRep.displaylist <= 0))) |
---|
| 5725 | + //(touched || (bRep != null && bRep.displaylist <= 0))) |
---|
| 5726 | + (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0))) |
---|
5677 | 5727 | { |
---|
5678 | 5728 | Globals.lighttouched = true; |
---|
5679 | 5729 | } // all panes... |
---|
| 5730 | + |
---|
5680 | 5731 | //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW && |
---|
5681 | 5732 | if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW && |
---|
5682 | 5733 | (touched || (bRep != null && bRep.displaylist <= 0))) |
---|
.. | .. |
---|
5844 | 5895 | tex = GetTextures(); |
---|
5845 | 5896 | } |
---|
5846 | 5897 | |
---|
5847 | | - boolean failed = false; |
---|
| 5898 | + boolean failedPigment = false; |
---|
| 5899 | + boolean failedBump = false; |
---|
5848 | 5900 | |
---|
5849 | 5901 | try |
---|
5850 | 5902 | { |
---|
5851 | | - display.BindTextures(tex, texres); |
---|
| 5903 | + display.BindPigmentTexture(tex, texres); |
---|
5852 | 5904 | } |
---|
5853 | 5905 | catch (Exception e) |
---|
5854 | 5906 | { |
---|
5855 | 5907 | System.err.println("FAILED: " + this); |
---|
5856 | | - failed = true; |
---|
| 5908 | + failedPigment = true; |
---|
| 5909 | + } |
---|
| 5910 | + |
---|
| 5911 | + try |
---|
| 5912 | + { |
---|
| 5913 | + display.BindBumpTexture(tex, texres); |
---|
| 5914 | + } |
---|
| 5915 | + catch (Exception e) |
---|
| 5916 | + { |
---|
| 5917 | + //System.err.println("FAILED: " + this); |
---|
| 5918 | + failedBump = true; |
---|
5857 | 5919 | } |
---|
5858 | 5920 | |
---|
5859 | 5921 | if (!compiled) |
---|
.. | .. |
---|
5876 | 5938 | } |
---|
5877 | 5939 | } |
---|
5878 | 5940 | |
---|
5879 | | - if (!failed) |
---|
5880 | | - display.ReleaseTextures(tex); |
---|
| 5941 | + if (!failedBump) |
---|
| 5942 | + display.ReleaseBumpTexture(tex); |
---|
| 5943 | + |
---|
| 5944 | + if (!failedPigment) |
---|
| 5945 | + display.ReleasePigmentTexture(tex); |
---|
5881 | 5946 | |
---|
5882 | 5947 | display.PopMaterial(this, selected); |
---|
5883 | 5948 | } |
---|
.. | .. |
---|
7450 | 7515 | } // vScale, 1); |
---|
7451 | 7516 | else |
---|
7452 | 7517 | { |
---|
7453 | | - LA.matScale(toParent, 1, totalScale, totalScale); |
---|
| 7518 | + // EXCEPTION! |
---|
| 7519 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7454 | 7520 | } // vScale, 1); |
---|
7455 | 7521 | break; |
---|
7456 | 7522 | |
---|