Normand Briere
2019-06-17 e36047725ce3217618d4e5807ac7c8769b9e3598
Object3D.java
....@@ -4351,6 +4351,55 @@
43514351 }
43524352 }
43534353
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
+
43544403 void RepairTexture()
43554404 {
43564405 if (this instanceof FileObject || blockloop)
....@@ -5673,10 +5722,12 @@
56735722 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
56745723
56755724 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)))
56775727 {
56785728 Globals.lighttouched = true;
56795729 } // all panes...
5730
+
56805731 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56815732 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56825733 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5844,16 +5895,27 @@
58445895 tex = GetTextures();
58455896 }
58465897
5847
- boolean failed = false;
5898
+ boolean failedPigment = false;
5899
+ boolean failedBump = false;
58485900
58495901 try
58505902 {
5851
- display.BindTextures(tex, texres);
5903
+ display.BindPigmentTexture(tex, texres);
58525904 }
58535905 catch (Exception e)
58545906 {
58555907 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;
58575919 }
58585920
58595921 if (!compiled)
....@@ -5876,8 +5938,11 @@
58765938 }
58775939 }
58785940
5879
- if (!failed)
5880
- display.ReleaseTextures(tex);
5941
+ if (!failedBump)
5942
+ display.ReleaseBumpTexture(tex);
5943
+
5944
+ if (!failedPigment)
5945
+ display.ReleasePigmentTexture(tex);
58815946
58825947 display.PopMaterial(this, selected);
58835948 }
....@@ -7450,7 +7515,8 @@
74507515 } // vScale, 1);
74517516 else
74527517 {
7453
- LA.matScale(toParent, 1, totalScale, totalScale);
7518
+ // EXCEPTION!
7519
+ LA.matScale(toParent, totalScale, totalScale, totalScale);
74547520 } // vScale, 1);
74557521 break;
74567522