check if template file exists

main
alex 2023-10-07 23:45:58 +02:00
parent cdf8fa93ad
commit 4ef913098d
2 changed files with 50 additions and 15 deletions

View File

@ -8,6 +8,12 @@ base_path = os.path.dirname(os.path.abspath(__file__))
input_path = base_path + '/inputs/'
output_path = base_path + '/outputs/'
# check if template file exists
if not os.path.exists('./template.lbrn'):
print("Template file not found! Please create a template.lbrn file")
exit()
# read template file
with open('./template.lbrn', 'r') as file:

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightBurnProject AppVersion="1.4.00" FormatVersion="1" MaterialHeight="0" MirrorX="True" MirrorY="True">
<LightBurnProject AppVersion="1.4.00" FormatVersion="0" MaterialHeight="0" MirrorX="True" MirrorY="True">
<Thumbnail Source="%image%"/>
<VariableText>
<Start Value="0"/>
@ -32,7 +32,7 @@
<maxPower2 Value="20"/>
<speed Value="10"/>
<runBlower Value="0"/>
<priority Value="0"/>
<priority Value="1"/>
<tabCount Value="1"/>
<tabCountMax Value="1"/>
</CutSetting>
@ -48,7 +48,7 @@
<dotWidth Value="0"/>
<useDotCorrection Value="1"/>
<interval Value="0.084"/>
<priority Value="1"/>
<priority Value="0"/>
<tabCount Value="1"/>
<tabCountMax Value="1"/>
<negative Value="1"/>
@ -61,26 +61,55 @@
<Shape Type="Ellipse" CutIndex="18" Rx="1.7" Ry="1.7">
<XForm>1 3.25841e-07 -3.25841e-07 1 289.157 257.016</XForm>
</Shape>
<Shape Type="Path" CutIndex="18" VertID="1" PrimID="0">
<Shape Type="Path" CutIndex="18">
<XForm>1 3.25841e-07 -3.25841e-07 1 344.555 154.108</XForm>
<VertList>V-85 -103.09998c0x-85c0y-105.30911c1x1V-81 -107.09998c0x1c1x-83.209137c1y-107.09998V81 -107.09998c0x83.209137c0y-107.09998c1x1V85 -103.09998c0x1c1x85c1y-105.30911V85 89.31266c0x1c1x1</VertList>
<PrimList>B0 1L1 2B2 3L3 4</PrimList>
<V vx="-85" vy="-103.09998" c0x="-85" c0y="-105.30911"/>
<V vx="-81" vy="-107.09998" c1x="-83.209137" c1y="-107.09998"/>
<V vx="81" vy="-107.09998" c0x="83.209137" c0y="-107.09998"/>
<V vx="85" vy="-103.09998" c1x="85" c1y="-105.30911"/>
<V vx="85" vy="89.31266"/>
<P T="B" p0="0" p1="1"/>
<P T="L" p0="1" p1="2"/>
<P T="B" p0="2" p1="3"/>
<P T="L" p0="3" p1="4"/>
</Shape>
<Shape Type="Path" CutIndex="18" VertID="0" PrimID="0">
<Shape Type="Path" CutIndex="18">
<XForm>1 3.25841e-07 -3.25841e-07 1 344.555 154.108</XForm>
<VertList>V85 89.31266c0x85c0y91.353905c1x1V81.433792 93.28907c0x1c1x83.462997c1y93.067703V60.866211 95.532799c0x58.837002c0y95.754166c1x1V57.299999 99.509209c0x1c1x57.299999c1y97.467964V57.299999 106.09998c0x1c1x1</VertList>
<V vx="85" vy="89.31266" c0x="85" c0y="91.353905"/>
<V vx="81.433792" vy="93.28907" c1x="83.462997" c1y="93.067703"/>
<V vx="60.866211" vy="95.532799" c0x="58.837002" c0y="95.754166"/>
<V vx="57.299999" vy="99.509209" c1x="57.299999" c1y="97.467964"/>
<V vx="57.299999" vy="106.09998"/>
<P T="B" p0="0" p1="1"/>
<P T="L" p0="1" p1="2"/>
<P T="B" p0="2" p1="3"/>
<P T="L" p0="3" p1="4"/>
</Shape>
<Shape Type="Path" CutIndex="18" VertID="2">
<Shape Type="Path" CutIndex="18">
<XForm>1 3.25841e-07 -3.25841e-07 1 344.555 154.108</XForm>
<VertList>V57.299999 106.09998c0x1c1x1V56.299999 107.09998c0x1c1x1V-56.299999 107.09998c0x1c1x1V-57.299999 106.09998c0x1c1x1V-57.299999 99.509209c0x-57.299999c0y97.467964c1x1V-60.866211 95.532799c0x1c1x-58.837002c1y95.754166V-81.433792 93.28907c0x-83.462997c0y93.067703c1x1V-85 89.31266c0x1c1x-85c1y91.353905</VertList>
<PrimList>L0 1L1 2L2 3L3 4B4 5L5 6B6 7</PrimList>
<V vx="57.299999" vy="106.09998"/>
<V vx="56.299999" vy="107.09998"/>
<V vx="-56.299999" vy="107.09998"/>
<V vx="-57.299999" vy="106.09998"/>
<V vx="-57.299999" vy="99.509209" c0x="-57.299999" c0y="97.467964"/>
<V vx="-60.866211" vy="95.532799" c1x="-58.837002" c1y="95.754166"/>
<V vx="-81.433792" vy="93.28907" c0x="-83.462997" c0y="93.067703"/>
<V vx="-85" vy="89.31266" c1x="-85" c1y="91.353905"/>
<P T="L" p0="0" p1="1"/>
<P T="L" p0="1" p1="2"/>
<P T="L" p0="2" p1="3"/>
<P T="L" p0="3" p1="4"/>
<P T="B" p0="4" p1="5"/>
<P T="L" p0="5" p1="6"/>
<P T="B" p0="6" p1="7"/>
</Shape>
<Shape Type="Path" CutIndex="18" VertID="3">
<Shape Type="Path" CutIndex="18">
<XForm>1 3.25841e-07 -3.25841e-07 1 344.555 154.108</XForm>
<VertList>V-85 89.31266c0x1c1x1V-85 -103.09998c0x1c1x1</VertList>
<PrimList>L0 1</PrimList>
<V vx="-85" vy="89.31266"/>
<V vx="-85" vy="-103.09998"/>
<P T="L" p0="0" p1="1"/>
</Shape>
<Shape Type="Bitmap" CutIndex="8" W="346.79535" H="346.79535" Gamma="0.1" Contrast="0.07" Brightness="0" EnhanceAmount="0.2" EnhanceRadius="7" EnhanceDenoise="0" File="%imagePath%" SourceHash="0" Data="%image%">
<Shape Type="Bitmap" CutIndex="8" W="346.79535" H="346.79535" Gamma="1.35" Contrast="0.07" Brightness="-0.050000001" EnhanceAmount="0.2" EnhanceRadius="7" EnhanceDenoise="0" File="%imagePath%" Data="%image%">
<XForm>0.476578 0 0 0.476578 344.555 154.115</XForm>
</Shape>
<Notes ShowOnLoad="0" Notes=""/>