.. | .. |
---|
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 | } |
---|
.. | .. |
---|
7102 | 7167 | spot.translate(32, 32); |
---|
7103 | 7168 | spotw = spot.x + spot.width; |
---|
7104 | 7169 | spoth = spot.y + spot.height; |
---|
7105 | | - info.g.setColor(Color.blue); |
---|
| 7170 | + info.g.setColor(Color.cyan); |
---|
7106 | 7171 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7107 | 7172 | // if (CameraPane.Xmin > spot.x) |
---|
7108 | 7173 | // { |
---|
.. | .. |
---|
7120 | 7185 | // { |
---|
7121 | 7186 | // CameraPane.Ymax = spoth; |
---|
7122 | 7187 | // } |
---|
7123 | | - // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
7124 | | - //info.g.drawLine(spotw, spoth, spotw - 15, spoth); |
---|
| 7188 | + // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15 |
---|
| 7189 | + //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15 |
---|
7125 | 7190 | spot.translate(0, -32); |
---|
7126 | | - info.g.setColor(Color.green); |
---|
| 7191 | + info.g.setColor(Color.yellow); |
---|
7127 | 7192 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7193 | + info.g.setColor(Color.green); |
---|
7128 | 7194 | // if (CameraPane.Xmin > spot.x) |
---|
7129 | 7195 | // { |
---|
7130 | 7196 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7442 | 7508 | switch (info.pane.RenderCamera().viewCode) |
---|
7443 | 7509 | { |
---|
7444 | 7510 | case 3: // '\001' |
---|
7445 | | - if (modified) |
---|
| 7511 | + if (modified || opposite) |
---|
7446 | 7512 | { |
---|
7447 | 7513 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7448 | 7514 | LA.matScale(toParent, totalScale, 1, 1); |
---|
7449 | 7515 | } // vScale, 1); |
---|
7450 | 7516 | else |
---|
7451 | 7517 | { |
---|
| 7518 | + // EXCEPTION! |
---|
7452 | 7519 | LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7453 | 7520 | } // vScale, 1); |
---|
7454 | 7521 | break; |
---|
7455 | 7522 | |
---|
7456 | 7523 | case 2: // '\002' |
---|
7457 | | - if (modified) |
---|
| 7524 | + if (modified || opposite) |
---|
7458 | 7525 | { |
---|
7459 | 7526 | //LA.matScale(toParent, hScale, 1, vScale); |
---|
7460 | 7527 | LA.matScale(toParent, 1, totalScale, 1); |
---|
.. | .. |
---|
7465 | 7532 | break; |
---|
7466 | 7533 | |
---|
7467 | 7534 | case 1: // '\003' |
---|
7468 | | - if (modified) |
---|
| 7535 | + if (modified || opposite) |
---|
7469 | 7536 | { |
---|
7470 | 7537 | //LA.matScale(toParent, hScale, vScale, 1); |
---|
7471 | 7538 | LA.matScale(toParent, 1, 1, totalScale); |
---|