mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
Made background 3D preview independant
This commit is contained in:
parent
7ec31234db
commit
52e2af231d
@ -11,14 +11,21 @@
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="64"
|
||||
viewBox="0 0 128 64"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="icons.svg">
|
||||
<defs
|
||||
id="defs2">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="-18.04226 : 31.214068 : 1"
|
||||
inkscape:vp_y="0 : 1122.4747 : 0"
|
||||
inkscape:vp_z="139.87989 : 43.976074 : 1"
|
||||
inkscape:persp3d-origin="55.733336 : 19.241004 : 1"
|
||||
id="perspective4586" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient836">
|
||||
@ -49,8 +56,8 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="28.608854"
|
||||
inkscape:cx="86.841515"
|
||||
inkscape:cy="21.061007"
|
||||
inkscape:cx="54.703743"
|
||||
inkscape:cy="64.734209"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
@ -79,7 +86,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@ -87,10 +94,10 @@
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-280.06665)">
|
||||
transform="translate(0,-216.06665)">
|
||||
<g
|
||||
id="g4582"
|
||||
transform="matrix(0.61648821,0.13623838,-0.13553815,0.6196732,31.995696,300.23749)"
|
||||
transform="matrix(0.61648821,0.13623838,-0.13553815,0.6196732,31.995696,236.23749)"
|
||||
inkscape:export-filename="link.png"
|
||||
inkscape:export-xdpi="15.926786"
|
||||
inkscape:export-ydpi="15.926786">
|
||||
@ -110,7 +117,7 @@
|
||||
inkscape:export-xdpi="16.531826"
|
||||
inkscape:export-filename="remove.png"
|
||||
id="g4564"
|
||||
transform="matrix(0.43370177,0.42718925,-0.43370177,0.42718925,43.791013,273.09803)"
|
||||
transform="matrix(0.43370177,0.42718925,-0.43370177,0.42718925,43.791013,209.09803)"
|
||||
style="fill:#ff0909;fill-opacity:1">
|
||||
<rect
|
||||
style="opacity:1;fill:#ff0909;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
@ -134,7 +141,7 @@
|
||||
inkscape:export-filename="config.png"
|
||||
inkscape:export-xdpi="16.559999"
|
||||
inkscape:export-ydpi="16.559999"
|
||||
transform="matrix(0.52573689,0,0,0.513409,30.847756,292.09585)">
|
||||
transform="matrix(0.52573689,0,0,0.513409,30.847756,228.09585)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4598"
|
||||
@ -143,7 +150,7 @@
|
||||
</g>
|
||||
<g
|
||||
id="g855"
|
||||
transform="matrix(0.25769655,-0.25630492,0.25630492,0.25769655,4.0104312,296.39647)"
|
||||
transform="matrix(0.25769655,-0.25630492,0.25630492,0.25769655,4.0104312,232.39647)"
|
||||
inkscape:export-filename="edit.png"
|
||||
inkscape:export-xdpi="14.942099"
|
||||
inkscape:export-ydpi="14.942099">
|
||||
@ -187,7 +194,7 @@
|
||||
inkscape:export-filename="save.png"
|
||||
inkscape:export-xdpi="14"
|
||||
inkscape:export-ydpi="14"
|
||||
transform="matrix(0.52616852,0,0,0.52616852,14.395212,275.18126)">
|
||||
transform="matrix(0.52616852,0,0,0.52616852,14.395212,211.18126)">
|
||||
<path
|
||||
id="rect859"
|
||||
transform="scale(0.26458333)"
|
||||
@ -211,7 +218,7 @@
|
||||
</g>
|
||||
<g
|
||||
style="fill:#18ff09;fill-opacity:1"
|
||||
transform="matrix(0.00372977,0.49303806,-0.49303806,-0.00372977,83.199877,280.80247)"
|
||||
transform="matrix(0.00372977,0.49303806,-0.49303806,-0.00372977,83.199877,216.80247)"
|
||||
id="g849"
|
||||
inkscape:export-filename="plus.png"
|
||||
inkscape:export-xdpi="16.531826"
|
||||
@ -227,7 +234,7 @@
|
||||
inkscape:export-xdpi="16.531826"
|
||||
inkscape:export-filename="minus.png"
|
||||
id="g856"
|
||||
transform="matrix(0.00372977,0.49303806,-0.49303806,-0.00372977,18.535206,297.77843)"
|
||||
transform="matrix(0.00372977,0.49303806,-0.49303806,-0.00372977,18.535206,233.77843)"
|
||||
style="fill:#ff0909;fill-opacity:1">
|
||||
<rect
|
||||
style="opacity:1;fill:#ff0909;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
@ -243,7 +250,7 @@
|
||||
inkscape:export-filename="load.png"
|
||||
inkscape:export-xdpi="13.499794"
|
||||
inkscape:export-ydpi="13.499794"
|
||||
transform="matrix(0.51223521,0,0,0.51223521,5.2214853,275.80647)">
|
||||
transform="matrix(0.51223521,0,0,0.51223521,5.2214853,211.80647)">
|
||||
<path
|
||||
id="rect849"
|
||||
transform="scale(0.26458333)"
|
||||
@ -268,7 +275,7 @@
|
||||
</g>
|
||||
<path
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.96038949;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 14.281124,319.9133 c -3.380125,5.56722 -9.3711249,5.74887 -12.9027613,0 2.6589695,-5.76337 10.0526323,-5.46131 12.9027613,0 z"
|
||||
d="m 14.281124,255.9133 c -3.380125,5.56722 -9.3711249,5.74887 -12.9027613,0 2.6589695,-5.76337 10.0526323,-5.46131 12.9027613,0 z"
|
||||
id="path5159"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
@ -276,28 +283,28 @@
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
id="path5162"
|
||||
cx="7.8297439"
|
||||
cy="319.77344"
|
||||
cy="255.77344"
|
||||
rx="1.0486264"
|
||||
ry="0.87385535" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5166"
|
||||
d="m 30.429971,319.84339 c -3.380125,5.56722 -9.371125,5.74887 -12.902762,0"
|
||||
d="m 30.429971,255.84339 c -3.380125,5.56722 -9.371125,5.74887 -12.902762,0"
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.96038949;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 33.869141,312.36502 v 1.50195 h -1.501953 v 1.5957 h 1.501953 v 1.50196 h 1.595703 v -1.50196 h 1.501953 v -1.5957 h -1.501953 v -1.50195 z"
|
||||
d="m 33.869141,248.36502 v 1.50195 h -1.501953 v 1.5957 h 1.501953 v 1.50196 h 1.595703 v -1.50196 h 1.501953 v -1.5957 h -1.501953 v -1.50195 z"
|
||||
id="rect860"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path865"
|
||||
d="m 49.948079,312.36502 v 1.50195 h -1.501953 v 1.5957 h 1.501953 v 1.50196 h 1.595703 v -1.50196 h 1.501953 v -1.5957 h -1.501953 v -1.50195 z"
|
||||
d="m 49.948079,248.36502 v 1.50195 h -1.501953 v 1.5957 h 1.501953 v 1.50196 h 1.595703 v -1.50196 h 1.501953 v -1.5957 h -1.501953 v -1.50195 z"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<g
|
||||
id="g4582-9"
|
||||
transform="matrix(0.61648821,0.13623838,-0.13553815,0.6196732,0.09092866,268.4386)"
|
||||
transform="matrix(0.61648821,0.13623838,-0.13553815,0.6196732,0.09092866,204.4386)"
|
||||
inkscape:export-filename="link.png"
|
||||
inkscape:export-xdpi="15.926786"
|
||||
inkscape:export-ydpi="15.926786">
|
||||
@ -317,7 +324,7 @@
|
||||
inkscape:export-filename="config.png"
|
||||
inkscape:export-xdpi="16.559999"
|
||||
inkscape:export-ydpi="16.559999"
|
||||
transform="matrix(0.52573689,0,0,0.513409,-1.7560956,259.17843)">
|
||||
transform="matrix(0.52573689,0,0,0.513409,-1.7560956,195.17843)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4598-6"
|
||||
@ -326,29 +333,28 @@
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 2.9383367,329.45579 0.1398168,13.14278"
|
||||
d="m 2.9383367,265.45579 0.1398168,13.14278"
|
||||
id="path1469"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 3.5097233,333.01844 4.9679886,-0.0742"
|
||||
d="m 3.5097233,269.01844 4.9679886,-0.0742"
|
||||
id="path1471"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.4643412,333.1173 0.024716,3.95462 7.1924608,-0.0247 v 0"
|
||||
d="m 7.4643412,269.1173 0.024716,3.95462 7.1924608,-0.0247 v 0"
|
||||
id="path1473"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.4890575,337.83813 -0.024716,3.68273 h 5.8083445"
|
||||
d="m 7.4890575,273.83813 -0.024716,3.68273 h 5.8083445"
|
||||
id="path1475"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:0.84322037;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 17.351562,55.695312 4.34961,0.04883 0.123047,6.822265 h 4.27539 l 0.125,-6.822265 4.34961,-0.04883 -6.611328,-6.845703 z"
|
||||
transform="translate(0,280.06665)"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 17.351562,271.76196 4.34961,0.0488 0.123047,6.82227 h 4.27539 l 0.125,-6.82227 4.34961,-0.0488 -6.611328,-6.8457 z"
|
||||
id="path1477"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
@ -356,45 +362,46 @@
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4561"
|
||||
d="m 33.500409,335.78733 4.34961,-0.0488 0.123047,-6.82227 h 4.27539 l 0.125,6.82227 4.34961,0.0488 -6.611328,6.8457 z"
|
||||
style="fill:#ffffff;fill-opacity:0.84322037;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
d="m 33.500409,271.78733 4.34961,-0.0488 0.123047,-6.82227 h 4.27539 l 0.125,6.82227 4.34961,0.0488 -6.611328,6.8457 z"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 67.601449,292.54414 5.38295,-1e-5"
|
||||
d="m 67.601449,228.54414 5.38295,-1e-5"
|
||||
id="path4570"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 73.823299,283.52594 9.857089,-0.0699"
|
||||
d="m 73.823299,219.52594 9.857089,-0.0699"
|
||||
id="path4572"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 85.288282,289.32835 7.55011,-0.0699"
|
||||
d="m 85.288282,225.32835 7.55011,-0.0699"
|
||||
id="path4574"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f6f6f6;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 98.850517,292.96359 8.668643,-9.57745 9.36773,9.92699 8.24919,-6.78111"
|
||||
d="m 98.850517,228.96359 8.668643,-9.57745 9.36773,9.92699 8.24919,-6.78111"
|
||||
id="path4576"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f6f6f6;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 67.110738,309.04251 c 3.472118,0.55927 4.555698,-9.96194 8.319101,-9.85708 3.763403,0.10486 4.678964,9.98562 9.36773,9.92699 4.552323,-0.0569 5.040651,-6.78111 8.24919,-6.78111"
|
||||
d="m 67.110738,245.04251 c 3.472118,0.55927 4.555698,-9.96194 8.319101,-9.85708 3.763403,0.10486 4.678964,9.98562 9.36773,9.92699 4.552323,-0.0569 5.040651,-6.78111 8.24919,-6.78111"
|
||||
id="path4576-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="czsc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f6f6f6;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 99.268615,309.04251 c 0,0 4.241035,-9.53142 8.668645,-9.57745 4.42761,-0.046 4.9669,9.84949 9.36773,9.92699 3.55898,0.0627 8.24919,-6.78111 8.24919,-6.78111"
|
||||
d="m 99.268615,245.04251 c 0,0 4.241035,-9.53142 8.668645,-9.57745 4.42761,-0.046 4.9669,9.84949 9.36773,9.92699 3.55898,0.0627 8.24919,-6.78111 8.24919,-6.78111"
|
||||
id="path4576-0"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="czsc" />
|
||||
<g
|
||||
id="g892">
|
||||
id="g892"
|
||||
transform="translate(0,-64)">
|
||||
<rect
|
||||
y="313.76132"
|
||||
x="65.504196"
|
||||
@ -416,7 +423,7 @@
|
||||
</g>
|
||||
<g
|
||||
id="g900"
|
||||
transform="translate(16.00903,-0.03495421)">
|
||||
transform="translate(16.00903,-64.034954)">
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:18.89763832;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect894"
|
||||
@ -440,15 +447,83 @@
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ff0606;stroke-width:2.00201297;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path902"
|
||||
cx="88.014717"
|
||||
cy="320.29779"
|
||||
cy="256.29779"
|
||||
r="6.1100225" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ff0606;stroke-width:2.26771665;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect904"
|
||||
width="10.905715"
|
||||
height="0.2446795"
|
||||
x="-73.237968"
|
||||
y="324.99719"
|
||||
x="-44.044609"
|
||||
y="268.04309"
|
||||
transform="rotate(-27.138711)" />
|
||||
<g
|
||||
sodipodi:type="inkscape:box3d"
|
||||
id="g4588"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:perspectiveID="#perspective4586"
|
||||
inkscape:corner0="-0.3641017 : 0.0069993558 : 0 : 1"
|
||||
inkscape:corner7="-0.46453547 : -0.0037016866 : 0.25 : 1">
|
||||
<path
|
||||
sodipodi:type="inkscape:box3dside"
|
||||
id="path4590"
|
||||
style="fill:#353564;fill-rule:evenodd;stroke:none;stroke-width:1.13750851px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
inkscape:box3dsidetype="6"
|
||||
d="m 97.975657,255.32605 v 18.88926 l 11.825353,-10.75878 v -13.55872 z"
|
||||
points="97.975657,274.21531 109.80101,263.45653 109.80101,249.89781 97.975657,255.32605 " />
|
||||
<path
|
||||
sodipodi:type="inkscape:box3dside"
|
||||
id="path4599"
|
||||
style="fill:#afafde;fill-rule:evenodd;stroke:none;stroke-width:1.13750851px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
inkscape:box3dsidetype="13"
|
||||
d="m 97.975657,274.21531 21.760763,4.75713 6.41132,-13.64857 -16.34673,-1.86734 z"
|
||||
points="119.73642,278.97244 126.14774,265.32387 109.80101,263.45653 97.975657,274.21531 " />
|
||||
<path
|
||||
sodipodi:type="inkscape:box3dside"
|
||||
id="path4601"
|
||||
style="fill:#e9e9ff;fill-rule:evenodd;stroke:none;stroke-width:1.13750851px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
inkscape:box3dsidetype="11"
|
||||
d="m 109.80101,249.89781 16.34673,0.13364 v 15.29242 l -16.34673,-1.86734 z"
|
||||
points="126.14774,250.03145 126.14774,265.32387 109.80101,263.45653 109.80101,249.89781 " />
|
||||
<path
|
||||
sodipodi:type="inkscape:box3dside"
|
||||
id="path4592"
|
||||
style="fill:#4d4d9f;fill-rule:evenodd;stroke:none;stroke-width:1.13750851px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
inkscape:box3dsidetype="5"
|
||||
d="m 97.975657,255.32605 21.760763,1.21418 6.41132,-6.50878 -16.34673,-0.13364 z"
|
||||
points="119.73642,256.54023 126.14774,250.03145 109.80101,249.89781 97.975657,255.32605 " />
|
||||
<path
|
||||
sodipodi:type="inkscape:box3dside"
|
||||
id="path4596"
|
||||
style="fill:#d7d7ff;fill-rule:evenodd;stroke:none;stroke-width:1.13750851px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
inkscape:box3dsidetype="14"
|
||||
d="m 119.73642,256.54023 v 22.43221 l 6.41132,-13.64857 v -15.29242 z"
|
||||
points="119.73642,278.97244 126.14774,265.32387 126.14774,250.03145 119.73642,256.54023 " />
|
||||
<path
|
||||
sodipodi:type="inkscape:box3dside"
|
||||
id="path4594"
|
||||
style="fill:#8686bf;fill-rule:evenodd;stroke:none;stroke-width:1.13750851px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
inkscape:box3dsidetype="3"
|
||||
d="m 97.975657,255.32605 21.760763,1.21418 v 22.43221 l -21.760763,-4.75713 z"
|
||||
points="119.73642,256.54023 119.73642,278.97244 97.975657,274.21531 97.975657,255.32605 " />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.34946194px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 49.776199,270.54617 c -1.580776,6.41312 2.996943,7.37745 6.473631,7.43221 3.476688,0.0548 5.434538,-1.49738 6.066576,-4.21642 l 1.324219,0.42188 -1.042969,-4.5293 -3.396484,3.26953 1.492187,0.37891 c -0.223999,2.03551 -1.852974,3.08872 -4.455415,3.12251 -2.602441,0.0338 -6.433022,-0.77881 -4.803745,-5.21976 z"
|
||||
id="path4603"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="czccccczcc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccczccccczccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4608"
|
||||
d="m 99.260188,289.64829 -2.078332,5.56675 1.847291,-0.42019 c 1.235833,3.28529 6.174393,5.754 13.089483,5.82132 6.91507,0.0674 11.74325,-2.38113 13.00037,-5.72299 l 1.99478,0.32186 -2.07446,-5.56675 -5.57366,4.22699 1.98123,0.41653 c -0.44553,2.50175 -3.88073,3.63683 -9.05695,3.67834 -5.17621,0.0416 -9.80918,-1.20479 -10.25332,-3.69868 l 2.27622,-0.53524 z"
|
||||
style="fill:#ff1616;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.54638809px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:#2804ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.6067068px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 105.85575,308.26514 6.68987,2.89435 -0.45291,-2.69961 c 4.11987,-0.74392 7.02059,-4.85195 7.58556,-11.72804 0.56503,-6.87606 -1.84976,-11.08563 -5.8652,-12.83258 l 0.82033,-2.54598 -6.97955,1.241 4.41346,6.88009 0.82796,-2.44403 c 3.04058,0.81429 3.91231,4.28165 3.60225,9.44228 -0.31004,5.16064 -1.77929,8.61625 -4.87226,8.68902 l -0.41393,-2.77867 z"
|
||||
id="path4610"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccczccccczccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 32 KiB |
@ -1,4 +1,3 @@
|
||||
tool
|
||||
extends VBoxContainer
|
||||
|
||||
var libraries = []
|
||||
|
@ -1,4 +1,3 @@
|
||||
tool
|
||||
extends Panel
|
||||
|
||||
var recent_files = []
|
||||
@ -468,7 +467,7 @@ func update_preview() -> void:
|
||||
status = update_preview_2d()
|
||||
while status is GDScriptFunctionState:
|
||||
status = yield(status, "completed")
|
||||
status = update_preview_3d()
|
||||
status = update_preview_3d([ $VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D, $VBoxContainer/HBoxContainer/ProjectsPane/Preview3D])
|
||||
while status is GDScriptFunctionState:
|
||||
status = yield(status, "completed")
|
||||
updating = false
|
||||
@ -490,14 +489,15 @@ func update_preview_2d(node = null) -> void:
|
||||
result.release()
|
||||
preview_2d.set_preview_texture(tex)
|
||||
|
||||
func update_preview_3d() -> void:
|
||||
func update_preview_3d(previews : Array) -> void:
|
||||
var graph_edit : MMGraphEdit = get_current_graph_edit()
|
||||
if graph_edit != null and graph_edit.top_generator != null and graph_edit.top_generator.has_node("Material"):
|
||||
var gen_material = graph_edit.top_generator.get_node("Material")
|
||||
var status = gen_material.render_textures()
|
||||
while status is GDScriptFunctionState:
|
||||
status = yield(status, "completed")
|
||||
gen_material.update_materials(preview_3d.get_materials())
|
||||
for p in previews:
|
||||
gen_material.update_materials(p.get_materials())
|
||||
|
||||
func _on_Projects_tab_changed(tab) -> void:
|
||||
var new_tab = projects.get_current_tab_control()
|
||||
@ -511,12 +511,6 @@ func _on_Projects_tab_changed(tab) -> void:
|
||||
current_tab = new_tab
|
||||
update_preview()
|
||||
|
||||
func _on_Preview_show_background_preview(v) -> void:
|
||||
var pv = preview_3d.get_node("MaterialPreview")
|
||||
var bgpv = $VBoxContainer/HBoxContainer/ProjectsPane/BackgroundPreview/Viewport
|
||||
bgpv.world = pv.find_world()
|
||||
$VBoxContainer/HBoxContainer/ProjectsPane/BackgroundPreview.visible = v
|
||||
|
||||
func _exit_tree() -> void:
|
||||
# Save the window position and size to remember it when restarting the application
|
||||
if !Engine.editor_hint:
|
||||
@ -525,3 +519,7 @@ func _exit_tree() -> void:
|
||||
config_cache.set_value("window", "position", OS.window_position)
|
||||
config_cache.set_value("window", "size", OS.window_size)
|
||||
config_cache.save("user://cache.ini")
|
||||
|
||||
func show_background_preview(button_pressed):
|
||||
$VBoxContainer/HBoxContainer/ProjectsPane/Preview3D.visible = button_pressed
|
||||
$VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer.visible = button_pressed
|
||||
|
@ -1,12 +1,13 @@
|
||||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://addons/material_maker/main_window.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/material_maker/library.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_2d.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_3d.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/material_maker/preview/panoramas/epping_forest_01.hdr" type="Texture" id=5]
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_3d_ui.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://addons/material_maker/widgets/tabs.gd" type="Script" id=6]
|
||||
[ext_resource path="res://addons/material_maker/node_factory.gd" type="Script" id=7]
|
||||
[ext_resource path="res://addons/material_maker/icons/icons.svg" type="Texture" id=7]
|
||||
[ext_resource path="res://addons/material_maker/node_factory.gd" type="Script" id=8]
|
||||
|
||||
[sub_resource type="Shader" id=1]
|
||||
code = "shader_type canvas_item;
|
||||
@ -20,18 +21,15 @@ void fragment() {
|
||||
[sub_resource type="ShaderMaterial" id=2]
|
||||
shader = SubResource( 1 )
|
||||
|
||||
[sub_resource type="PanoramaSky" id=3]
|
||||
resource_local_to_scene = true
|
||||
panorama = ExtResource( 5 )
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 7 )
|
||||
region = Rect2( 96, 32, 32, 32 )
|
||||
|
||||
[sub_resource type="Environment" id=4]
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 3 )
|
||||
background_energy = 1.5
|
||||
ambient_light_color = Color( 1, 1, 1, 1 )
|
||||
ambient_light_energy = 0.32
|
||||
tonemap_mode = 2
|
||||
tonemap_white = 16.0
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 7 )
|
||||
region = Rect2( 96, 64, 32, 32 )
|
||||
|
||||
[node name="MainWindow" type="Panel"]
|
||||
anchor_right = 1.0
|
||||
@ -119,6 +117,8 @@ rect_min_size = Vector2( 250, 250 )
|
||||
[node name="Preview3D" parent="VBoxContainer/HBoxContainer/VBoxContainer/Preview" instance=ExtResource( 4 )]
|
||||
rect_min_size = Vector2( 250, 250 )
|
||||
|
||||
[node name="Preview3DUI" parent="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D" instance=ExtResource( 5 )]
|
||||
|
||||
[node name="ProjectsPane" type="Control" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 323.0
|
||||
margin_right = 1268.0
|
||||
@ -127,22 +127,12 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 3.0
|
||||
|
||||
[node name="BackgroundPreview" type="ViewportContainer" parent="VBoxContainer/HBoxContainer/ProjectsPane"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
stretch = true
|
||||
|
||||
[node name="Viewport" type="Viewport" parent="VBoxContainer/HBoxContainer/ProjectsPane/BackgroundPreview"]
|
||||
size = Vector2( 945, 684 )
|
||||
handle_input_locally = false
|
||||
msaa = 2
|
||||
render_target_update_mode = 0
|
||||
|
||||
[node name="Camera" type="Camera" parent="VBoxContainer/HBoxContainer/ProjectsPane/BackgroundPreview/Viewport"]
|
||||
transform = Transform( 1, 0, 0, 0, 0.766044, 0.642788, 0, -0.642788, 0.766044, 0, 2.24976, 2.68115 )
|
||||
environment = SubResource( 4 )
|
||||
current = true
|
||||
[node name="Preview3D" parent="VBoxContainer/HBoxContainer/ProjectsPane" instance=ExtResource( 4 )]
|
||||
margin_left = 0.0
|
||||
margin_top = 0.0
|
||||
margin_right = 0.0
|
||||
margin_bottom = 0.0
|
||||
ui_path = "../HBoxContainer/HBoxContainer/Preview3DUI"
|
||||
|
||||
[node name="Projects" type="Panel" parent="VBoxContainer/HBoxContainer/ProjectsPane"]
|
||||
self_modulate = Color( 1, 1, 1, 0 )
|
||||
@ -160,51 +150,59 @@ margin_bottom = 24.0
|
||||
tab_align = 0
|
||||
tab_close_display_policy = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/ProjectsPane"]
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 1.0
|
||||
margin_top = -45.0
|
||||
margin_right = 331.0
|
||||
margin_bottom = -13.0
|
||||
custom_constants/separation = 7
|
||||
|
||||
[node name="Button" type="Button" parent="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer"]
|
||||
margin_right = 44.0
|
||||
margin_bottom = 38.0
|
||||
hint_tooltip = "Show 3D preview"
|
||||
toggle_mode = true
|
||||
icon = SubResource( 3 )
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer"]
|
||||
visible = false
|
||||
margin_left = 51.0
|
||||
margin_right = 354.0
|
||||
margin_bottom = 38.0
|
||||
custom_constants/separation = 8
|
||||
|
||||
[node name="ControlView" type="TextureRect" parent="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer"]
|
||||
margin_top = 3.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 35.0
|
||||
size_flags_vertical = 4
|
||||
texture = SubResource( 4 )
|
||||
|
||||
[node name="Preview3DUI" parent="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer" instance=ExtResource( 5 )]
|
||||
anchor_right = 0.0
|
||||
margin_left = 40.0
|
||||
margin_top = 8.0
|
||||
margin_right = 303.0
|
||||
margin_bottom = 30.0
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="NodeFactory" type="Node" parent="."]
|
||||
script = ExtResource( 7 )
|
||||
script = ExtResource( 8 )
|
||||
[connection signal="need_update" from="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D" to="." method="update_preview_3d"]
|
||||
[connection signal="show_background_preview" from="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D" to="." method="_on_Preview_show_background_preview"]
|
||||
[connection signal="environment_selected" from="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D/Preview3DUI" to="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D" method="_on_Environment_item_selected"]
|
||||
[connection signal="model_selected" from="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D/Preview3DUI" to="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D" method="_on_Model_item_selected"]
|
||||
[connection signal="rotate_toggled" from="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D/Preview3DUI" to="VBoxContainer/HBoxContainer/VBoxContainer/Preview/Preview3D" method="_on_Rotate_toggled"]
|
||||
[connection signal="need_update" from="VBoxContainer/HBoxContainer/ProjectsPane/Preview3D" to="." method="update_preview_3d"]
|
||||
[connection signal="no_more_tabs" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects" to="." method="new_material"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects" method="_on_Projects_resized"]
|
||||
[connection signal="tab_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects" to="." method="_on_Projects_tab_changed"]
|
||||
[connection signal="connection_request" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit" method="connect_node"]
|
||||
[connection signal="disconnection_request" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit" method="disconnect_node"]
|
||||
[connection signal="duplicate_nodes_request" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit" method="duplicate_selected"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer2/metallic" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer3/roughness" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer4/emission_energy" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer5/normal_scale" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer6/ao_light_affect" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer7/depth_scale" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" method="_on_LineEdit_focus_exited"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" method="_on_LineEdit_gui_input"]
|
||||
[connection signal="resized" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" method="do_update"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" method="_on_LineEdit_text_changed"]
|
||||
[connection signal="text_entered" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects/GraphEdit/node_Material/HBoxContainer8/subsurf_scatter_strength" method="_on_LineEdit_text_entered"]
|
||||
[connection signal="reposition_active_tab_request" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/Tabs" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects" method="move_active_tab_to"]
|
||||
[connection signal="tab_changed" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/Tabs" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects" method="set_current_tab"]
|
||||
[connection signal="tab_close" from="VBoxContainer/HBoxContainer/ProjectsPane/Projects/Tabs" to="VBoxContainer/HBoxContainer/ProjectsPane/Projects" method="close_tab"]
|
||||
[connection signal="toggled" from="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/Button" to="." method="show_background_preview"]
|
||||
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer/ControlView" to="VBoxContainer/HBoxContainer/ProjectsPane/Preview3D" method="on_gui_input"]
|
||||
[connection signal="environment_selected" from="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer/Preview3DUI" to="VBoxContainer/HBoxContainer/ProjectsPane/Preview3D" method="_on_Environment_item_selected"]
|
||||
[connection signal="model_selected" from="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer/Preview3DUI" to="VBoxContainer/HBoxContainer/ProjectsPane/Preview3D" method="_on_Model_item_selected"]
|
||||
[connection signal="rotate_toggled" from="VBoxContainer/HBoxContainer/ProjectsPane/HBoxContainer/HBoxContainer/Preview3DUI" to="VBoxContainer/HBoxContainer/ProjectsPane/Preview3D" method="_on_Rotate_toggled"]
|
||||
|
@ -1,4 +1,3 @@
|
||||
tool
|
||||
extends ViewportContainer
|
||||
|
||||
const ENVIRONMENTS = [
|
||||
@ -8,6 +7,8 @@ const ENVIRONMENTS = [
|
||||
const CAMERA_DISTANCE_MIN = 1.0
|
||||
const CAMERA_DISTANCE_MAX = 10.0
|
||||
|
||||
export var ui_path : String = "Preview3DUI"
|
||||
|
||||
onready var objects = $MaterialPreview/Preview3d/Objects
|
||||
onready var current_object = objects.get_child(0)
|
||||
|
||||
@ -17,8 +18,9 @@ onready var current_environment = environments.get_child(0)
|
||||
onready var camera_stand = $MaterialPreview/Preview3d/CameraPivot
|
||||
onready var camera = $MaterialPreview/Preview3d/CameraPivot/Camera
|
||||
|
||||
signal need_update
|
||||
signal show_background_preview
|
||||
onready var ui = get_node(ui_path)
|
||||
|
||||
signal need_update(me)
|
||||
|
||||
func _ready() -> void:
|
||||
var model_list : Array = []
|
||||
@ -26,25 +28,23 @@ func _ready() -> void:
|
||||
var m = o.get_surface_material(0)
|
||||
o.set_surface_material(0, m.duplicate())
|
||||
model_list.push_back(o.name)
|
||||
$Preview3DUI.set_models(model_list)
|
||||
ui.set_models(model_list)
|
||||
var environment_list : Array = []
|
||||
for e in environments.get_children():
|
||||
environment_list.push_back(e.name)
|
||||
$Preview3DUI.set_environments(environment_list)
|
||||
ui.set_environments(environment_list)
|
||||
$MaterialPreview/Preview3d/ObjectRotate.play("rotate")
|
||||
$MaterialPreview/Preview3d/CameraPivot/Camera/RemoteTransform.set_remote_node("../../../../../../../../ProjectsPane/BackgroundPreview/Viewport/Camera")
|
||||
|
||||
func _on_Model_item_selected(id) -> void:
|
||||
current_object.visible = false
|
||||
current_object = objects.get_child(id)
|
||||
current_object.visible = true
|
||||
emit_signal("need_update")
|
||||
emit_signal("need_update", [ self ])
|
||||
|
||||
func _on_Environment_item_selected(id) -> void:
|
||||
current_environment.visible = false
|
||||
current_environment = environments.get_child(id)
|
||||
$MaterialPreview/Preview3d/CameraPivot/Camera.set_environment(current_environment.environment)
|
||||
get_node("../../../ProjectsPane/BackgroundPreview/Viewport/Camera").set_environment(current_environment.environment)
|
||||
current_environment.visible = true
|
||||
|
||||
func _on_Rotate_toggled(button_pressed) -> void:
|
||||
@ -53,16 +53,13 @@ func _on_Rotate_toggled(button_pressed) -> void:
|
||||
else:
|
||||
$MaterialPreview/Preview3d/ObjectRotate.stop(false)
|
||||
|
||||
func _on_Background_toggled(button_pressed) -> void:
|
||||
emit_signal("show_background_preview", button_pressed)
|
||||
|
||||
func get_materials() -> Array:
|
||||
return [ current_object.get_surface_material(0) ]
|
||||
|
||||
func on_gui_input(event) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
$MaterialPreview/Preview3d/ObjectRotate.stop(false)
|
||||
$Preview3DUI.rotation_cancelled()
|
||||
ui.rotation_cancelled()
|
||||
match event.button_index:
|
||||
BUTTON_WHEEL_UP:
|
||||
camera.translation.z = clamp(
|
||||
|
@ -1,8 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_3d.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_3d_scene.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_3d_ui.tscn" type="PackedScene" id=3]
|
||||
|
||||
[sub_resource type="World" id=1]
|
||||
|
||||
@ -32,11 +31,5 @@ render_target_update_mode = 0
|
||||
physics_object_picking = true
|
||||
|
||||
[node name="Preview3d" parent="MaterialPreview" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Preview3DUI" parent="." instance=ExtResource( 3 )]
|
||||
[connection signal="gui_input" from="." to="." method="on_gui_input"]
|
||||
[connection signal="resized" from="." to="." method="_on_Preview_resized"]
|
||||
[connection signal="background_toggled" from="Preview3DUI" to="." method="_on_Background_toggled"]
|
||||
[connection signal="environment_selected" from="Preview3DUI" to="." method="_on_Environment_item_selected"]
|
||||
[connection signal="model_selected" from="Preview3DUI" to="." method="_on_Model_item_selected"]
|
||||
[connection signal="rotate_toggled" from="Preview3DUI" to="." method="_on_Rotate_toggled"]
|
||||
|
@ -68,9 +68,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3.5 )
|
||||
environment = SubResource( 2 )
|
||||
current = true
|
||||
|
||||
[node name="RemoteTransform" type="RemoteTransform" parent="CameraPivot/Camera"]
|
||||
remote_path = NodePath("../../../../../../ProjectsPane/BackgroundPreview/Viewport/Camera")
|
||||
|
||||
[node name="ObjectRotate" type="AnimationPlayer" parent="."]
|
||||
autoplay = "rotate"
|
||||
playback_speed = 0.1
|
||||
|
@ -1,10 +1,8 @@
|
||||
tool
|
||||
extends HBoxContainer
|
||||
|
||||
signal model_selected(id)
|
||||
signal environment_selected(id)
|
||||
signal rotate_toggled(b)
|
||||
signal background_toggled(b)
|
||||
|
||||
func set_models(model_list : Array) -> void:
|
||||
$Model.clear()
|
||||
@ -29,6 +27,3 @@ func _on_Environment_item_selected(ID) -> void:
|
||||
|
||||
func _on_Rotate_toggled(button_pressed) -> void:
|
||||
emit_signal("rotate_toggled", button_pressed)
|
||||
|
||||
func _on_Background_toggled(button_pressed) -> void:
|
||||
emit_signal("background_toggled", button_pressed)
|
||||
|
@ -1,6 +1,12 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/material_maker/preview/preview_3d_ui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/material_maker/icons/icons.svg" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 48, 48, 16, 16 )
|
||||
|
||||
[node name="Preview3DUI" type="HBoxContainer"]
|
||||
anchor_right = 1.0
|
||||
@ -10,7 +16,7 @@ script = ExtResource( 1 )
|
||||
|
||||
[node name="Model" type="OptionButton" parent="."]
|
||||
margin_right = 100.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 22.0
|
||||
rect_min_size = Vector2( 100, 0 )
|
||||
text = "Cube"
|
||||
items = [ "Cube", null, false, 0, null, "Cylinder", null, false, 1, null, "Sphere", null, false, 2, null, "Sphere2", null, false, 3, null, "Prism", null, false, 4, null, "Quad", null, false, 5, null, "Plane", null, false, 6, null, "SphereTess", null, false, 7, null ]
|
||||
@ -19,7 +25,7 @@ selected = 0
|
||||
[node name="Environment" type="OptionButton" parent="."]
|
||||
margin_left = 104.0
|
||||
margin_right = 231.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 22.0
|
||||
rect_min_size = Vector2( 100, 0 )
|
||||
text = "Epping Forest"
|
||||
items = [ "Epping Forest", null, false, 0, null, "Moonless Golf", null, false, 1, null, "Studio", null, false, 2, null ]
|
||||
@ -27,27 +33,14 @@ selected = 0
|
||||
|
||||
[node name="Rotate" type="Button" parent="."]
|
||||
margin_left = 235.0
|
||||
margin_right = 255.0
|
||||
margin_bottom = 20.0
|
||||
margin_right = 263.0
|
||||
margin_bottom = 22.0
|
||||
rect_pivot_offset = Vector2( -4, 7 )
|
||||
hint_tooltip = "Rotate object"
|
||||
size_flags_horizontal = 2
|
||||
toggle_mode = true
|
||||
pressed = true
|
||||
text = "R"
|
||||
|
||||
[node name="Background" type="Button" parent="."]
|
||||
margin_left = 1257.0
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
rect_pivot_offset = Vector2( -4, 7 )
|
||||
hint_tooltip = "Show in main view"
|
||||
size_flags_horizontal = 8
|
||||
toggle_mode = true
|
||||
text = "O"
|
||||
icon = SubResource( 1 )
|
||||
[connection signal="item_selected" from="Model" to="." method="_on_Model_item_selected"]
|
||||
[connection signal="item_selected" from="Environment" to="." method="_on_Environment_item_selected"]
|
||||
[connection signal="toggled" from="Rotate" to="." method="_on_Rotate_toggled"]
|
||||
[connection signal="toggled" from="Background" to="." method="_on_Background_toggled"]
|
||||
|
@ -1,4 +1,3 @@
|
||||
tool
|
||||
extends Panel
|
||||
|
||||
var current_tab = -1 setget set_current_tab
|
||||
|
Loading…
Reference in New Issue
Block a user