Normand Briere
2018-07-08 f4160780a4d8278920b99ada1050f320d6e30a73
Object3D.java
....@@ -285,6 +285,7 @@
285285 return parent.GetName() + "#";
286286 }
287287
288
+ boolean timeline = false;
288289 boolean live = false;
289290 boolean hide = false;
290291 boolean link2master = false; // performs reset support/master at each frame
....@@ -355,7 +356,7 @@
355356
356357 int MemorySize()
357358 {
358
- if (memorysize == 0)
359
+ if (true) // memorysize == 0)
359360 {
360361 try
361362 {
....@@ -935,7 +936,7 @@
935936
936937 public Object clone()
937938 {
938
- return GraphreeD.clone(this);
939
+ return GrafreeD.clone(this);
939940 }
940941
941942 Object3D copyExpand()
....@@ -1446,7 +1447,16 @@
14461447 // if (other == null)
14471448 // return;
14481449
1449
- System.out.println("Link support this = " + this + "; other = " + other);
1450
+ if (other != null)
1451
+ {
1452
+ BoundaryRep.SEUIL = other.material.cameralight;
1453
+
1454
+ // Set default to 0.1
1455
+ BoundaryRep.SEUIL /= 2;
1456
+ System.out.println("SEUIL = " + BoundaryRep.SEUIL);
1457
+ }
1458
+
1459
+ System.out.println("Link this = " + this + "; support = " + other);
14501460
14511461 //if (bRep != null)
14521462 // bRep.linkVerticesThis(other.bRep);
....@@ -1701,7 +1711,7 @@
17011711 Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
17021712 o.bRep = transientrep;
17031713 if (clone)
1704
- o.bRep = (BoundaryRep) GraphreeD.clone(transientrep);
1714
+ o.bRep = (BoundaryRep) GrafreeD.clone(transientrep);
17051715 o.CreateMaterial();
17061716 o.SetAttributes(this, -1);
17071717 //parent
....@@ -1714,7 +1724,7 @@
17141724 Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
17151725 o.bRep = bRep;
17161726 if (clone)
1717
- o.bRep = (BoundaryRep) GraphreeD.clone(bRep);
1727
+ o.bRep = (BoundaryRep) GrafreeD.clone(bRep);
17181728 o.CreateMaterial();
17191729 //o.overwriteThis(this, -1);
17201730 o.SetAttributes(this, -1);
....@@ -1756,7 +1766,7 @@
17561766 // {
17571767 // assert(bRep == null);
17581768 // Object3D o = new Object3D("Geometry:" + this.name);
1759
-// o.bRep = (BoundaryRep) GraphreeD.clone(transientrep);
1769
+// o.bRep = (BoundaryRep) GrafreeD.clone(transientrep);
17601770 // o.CreateMaterial();
17611771 // parent.addChild(o);
17621772 // }
....@@ -1765,7 +1775,7 @@
17651775 // {
17661776 // assert(transientrep == null);
17671777 // Object3D o = new Object3D("Geometry:" + this.name);
1768
-// o.bRep = (BoundaryRep) GraphreeD.clone(bRep);
1778
+// o.bRep = (BoundaryRep) GrafreeD.clone(bRep);
17691779 // o.CreateMaterial();
17701780 // parent.addChild(o);
17711781 // }
....@@ -1816,8 +1826,9 @@
18161826 if (obj.name == null)
18171827 continue; // can't be a null one
18181828
1819
- //if (n.contains(obj.name)) // dec 2013 name.split(":")[0])) // Poser generates a count
1820
- if (n.startsWith(obj.name))
1829
+ String name = obj.name.split(":")[0]; // Poser generates a count
1830
+ //if (n.startsWith(obj.name))
1831
+ if (n.contains(name))
18211832 {
18221833 theobj = obj;
18231834 count++;
....@@ -2732,6 +2743,24 @@
27322743 blockloop = false;
27332744 }
27342745
2746
+ void GenNormalsMINE()
2747
+ {
2748
+ if (blockloop)
2749
+ return;
2750
+
2751
+ blockloop = true;
2752
+ GenNormalsMINE0();
2753
+ for (int i = 0; i < Children().Size(); i++)
2754
+ {
2755
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2756
+ if (child == null)
2757
+ continue;
2758
+ child.GenNormalsMINE();
2759
+// Children().release(i);
2760
+ }
2761
+ blockloop = false;
2762
+ }
2763
+
27352764 void ClearColors()
27362765 {
27372766 if (blockloop)
....@@ -2876,6 +2905,15 @@
28762905 if (bRep != null)
28772906 {
28782907 bRep.GenerateNormals(crease);
2908
+ Touch();
2909
+ }
2910
+ }
2911
+
2912
+ void GenNormalsMINE0()
2913
+ {
2914
+ if (bRep != null)
2915
+ {
2916
+ bRep.GenerateNormalsMINE();
28792917 Touch();
28802918 }
28812919 }
....@@ -3153,7 +3191,7 @@
31533191
31543192 BoundaryRep sup = bRep.support;
31553193 bRep.support = null;
3156
- BoundaryRep temprep = (BoundaryRep) GraphreeD.clone(bRep);
3194
+ BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep);
31573195 // bRep.SplitInTwo(onlyone); // thread...
31583196 temprep.SplitInTwo(reduction34, onlyone);
31593197 bRep = temprep;
....@@ -3677,7 +3715,7 @@
36773715 if (child == null)
36783716 continue;
36793717
3680
- if (GraphreeD.RENDERME > 0)
3718
+ if (GrafreeD.RENDERME > 0)
36813719 {
36823720 if (child instanceof Merge)
36833721 ((Merge)child).renderme();
....@@ -3828,7 +3866,7 @@
38283866 if (child == null)
38293867 continue;
38303868
3831
- if (GraphreeD.RENDERME > 0)
3869
+ if (GrafreeD.RENDERME > 0)
38323870 {
38333871 if (child instanceof Merge)
38343872 ((Merge)child).renderme();
....@@ -4023,7 +4061,7 @@
40234061 if (child == null)
40244062 continue;
40254063
4026
- if (GraphreeD.RENDERME > 0)
4064
+ if (GrafreeD.RENDERME > 0)
40274065 {
40284066 if (child instanceof Merge)
40294067 ((Merge)child).renderme();
....@@ -4111,7 +4149,7 @@
41114149 if (blockloop)
41124150 return;
41134151
4114
- for (int i=0; i<size(); i++)
4152
+ for (int i=0; i<Size(); i++)
41154153 {
41164154 if (get(i).parent != this)
41174155 {
....@@ -5519,7 +5557,9 @@
55195557 display.options2[2] = material.factor;
55205558
55215559 cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3);
5522
- display.options3[3] = material.cameralight/0.2f;
5560
+ display.options4[0] = material.cameralight/0.2f;
5561
+ display.options4[1] = material.subsurface;
5562
+ display.options4[2] = material.sheen;
55235563
55245564 // if (display.CURRENTANTIALIAS > 0)
55255565 // display.options3[3] /= 4;
....@@ -5819,12 +5859,12 @@
58195859 if (!child.HasTransparency())
58205860 {
58215861 sel = root != null && root.selection != null && root.selection.indexOf(child) != -1;
5822
- // GraphreeD.tracein("draw ", child);
5862
+ // GrafreeD.tracein("draw ", child);
58235863 boolean wasblocked = blockdraw;
58245864 blockdraw = true;
58255865 child.draw(display, root, selected || sel, wasblocked || blocked); // || child.IsSelected());
58265866 blockdraw = false;
5827
- // GraphreeD.traceout("draw ", child);
5867
+ // GrafreeD.traceout("draw ", child);
58285868 }
58295869
58305870 release(i);
....@@ -7731,7 +7771,7 @@
77317771 if (parent == null)
77327772 {
77337773 System.out.println("NULL PARENT");
7734
- new Exception().printStackTrace();
7774
+ //new Exception().printStackTrace();
77357775 } else
77367776 {
77377777 if (parent instanceof BezierPatch)
....@@ -8041,7 +8081,7 @@
80418081 {
80428082 assert(bRep != null);
80438083 if (!(support instanceof GenericJoint)) // support.bRep != null)
8044
- GraphreeD.Assert(support.bRep == bRep.support);
8084
+ GrafreeD.Assert(support.bRep == bRep.support);
80458085 }
80468086 else
80478087 {