Skip to content

Commit

Permalink
v3.12.0
Browse files Browse the repository at this point in the history
- (Add) Allow to pause and resume operations (#654)
- (Add) `Layer.FirstTransitionLayer`
- (Add) `Layer.LastTransitionLayer`
- (Add) File format: Elegoo GOO
- (Add) PrusaSlicer Printer: Elegoo Mars 4
- (Improvement) Allocate maximum GPU memory for Skia up to 256 MB
- (Improvement) Set and sanitize transition layers exposure time from last bottom layer and first normal layer instead of global times (#659)
- (Change) CXDLP: Default version from 2 to 3
- (Fix) UI was not rendering with GPU (ANGLE)
- (Fix) `Layer.IsTransitionLayer` was returning the wrong value
- (Upgrade) .NET from 6.0.13 to 6.0.14
  • Loading branch information
sn4k3 committed Feb 27, 2023
1 parent 31416b6 commit a626cfd
Show file tree
Hide file tree
Showing 85 changed files with 1,730 additions and 182 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 27/02/2023 - v3.12.0

- (Add) Allow to pause and resume operations (#654)
- (Add) `Layer.FirstTransitionLayer`
- (Add) `Layer.LastTransitionLayer`
- (Add) File format: Elegoo GOO
- (Add) PrusaSlicer Printer: Elegoo Mars 4
- (Improvement) Allocate maximum GPU memory for Skia up to 256 MB
- (Improvement) Set and sanitize transition layers exposure time from last bottom layer and first normal layer instead of global times (#659)
- (Change) CXDLP: Default version from 2 to 3
- (Fix) UI was not rendering with GPU (ANGLE)
- (Fix) `Layer.IsTransitionLayer` was returning the wrong value
- (Upgrade) .NET from 6.0.13 to 6.0.14

## 01/01/2023 - v3.11.2

- (Fix) Converting to lgs sets Bottom Layer Count to 0 (#655)
Expand Down
42 changes: 42 additions & 0 deletions PrusaSlicer/printer/Elegoo Mars 4.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# generated by PrusaSlicer 2.5.0+win64 on 2023-02-27 at 01:25:19 UTC
absolute_correction = 0
area_fill = 50
bed_custom_model =
bed_custom_texture =
bed_shape = 0x0,132.8x0,132.8x74.7,0x74.7
default_sla_material_profile = Prusa Orange Tough 0.05
default_sla_print_profile = 0.05 Normal
display_height = 74.7
display_mirror_x = 0
display_mirror_y = 1
display_orientation = landscape
display_pixels_x = 2560
display_pixels_y = 1440
display_width = 132.8
elefant_foot_compensation = 0.2
elefant_foot_min_width = 0.2
fast_tilt_time = 5
gamma_correction = 1
high_viscosity_tilt_time = 10
host_type = octoprint
inherits = Original Prusa SL1
max_exposure_time = 120
max_initial_exposure_time = 300
max_print_height = 150
min_exposure_time = 1
min_initial_exposure_time = 1
print_host =
printer_model = SL1
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_MARS4\nFILEFORMAT_GOO\n\nSTART_CUSTOM_VALUES\nBottomWaitTimeBeforeCure_3\nWaitTimeBeforeCure_2.5\nBottomWaitTimeAfterCure_3\nWaitTimeAfterCure_1\nBottomLiftHeight_7\nLiftHeight_5\nBottomLiftSpeed_80\nLiftSpeed_100\nBottomWaitTimeAfterLift_0\nWaitTimeAfterLift_0\nRetractSpeed_150\nBottomLightPWM_255\nLightPWM_255\nEND_CUSTOM_VALUES
printer_settings_id =
printer_technology = SLA
printer_variant = default
printer_vendor =
printhost_apikey =
printhost_cafile =
relative_correction = 1,1
relative_correction_x = 1
relative_correction_y = 1
relative_correction_z = 1
slow_tilt_time = 8
thumbnails = 290x290,116x116
12 changes: 11 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
- (Fix) Converting to lgs sets Bottom Layer Count to 0 (#655)
- (Add) Allow to pause and resume operations (#654)
- (Add) `Layer.FirstTransitionLayer`
- (Add) `Layer.LastTransitionLayer`
- (Add) File format: Elegoo GOO
- (Add) PrusaSlicer Printer: Elegoo Mars 4
- (Improvement) Allocate maximum GPU memory for Skia up to 256 MB
- (Improvement) Set and sanitize transition layers exposure time from last bottom layer and first normal layer instead of global times (#659)
- (Change) CXDLP: Default version from 2 to 3
- (Fix) UI was not rendering with GPU (ANGLE)
- (Fix) `Layer.IsTransitionLayer` was returning the wrong value
- (Upgrade) .NET from 6.0.13 to 6.0.14

1 change: 1 addition & 0 deletions Scripts/010 Editor/FileFormats.1pj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<file>mdlp.bt</file>
<file>osf.bt</file>
<file>osla.bt</file>
<file>goo.bt</file>
<file>photons.bt</file>
<file>PhotonWorkshop.bt</file>
<file>phz.bt</file>
Expand Down
2 changes: 1 addition & 1 deletion Scripts/010 Editor/PhotonWorkshop.bt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct HEADER {
uint ResolutionY <fgcolor=cBlack, bgcolor=cRed>;
float WeightG <fgcolor=cBlack, bgcolor=cRed>;
float Price <fgcolor=cBlack, bgcolor=cRed>;
wstring PriceCurrencyDec <fgcolor=cBlack, bgcolor=cRed>;
wstring PriceCurrency <fgcolor=cBlack, bgcolor=cRed>;
uint PerLayerOverride <fgcolor=cBlack, bgcolor=cRed>;
uint PrintTime <fgcolor=cBlack, bgcolor=cRed>;
uint TransitionLayerCount <fgcolor=cBlack, bgcolor=cRed>;
Expand Down
123 changes: 123 additions & 0 deletions Scripts/010 Editor/goo.bt
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: goo
// Authors: Tiago Conceição
//------------------------------------------------

BigEndian();

enum <ubyte> BOOL { False, True };

struct HEADER {
char Version[4] <fgcolor=cBlack, bgcolor=cRed>; // format version: V3.0
char Magic[8] <fgcolor=cBlack, bgcolor=cRed>; // Fix contant:0x07 0x00 0x00 0x00 0x44 0x4C 0x50 0x00
char SoftwareName[32] <fgcolor=cBlack, bgcolor=cRed>;
char SoftwareVersion[24] <fgcolor=cBlack, bgcolor=cRed>;
char FileCreateTime[24] <fgcolor=cBlack, bgcolor=cRed>; // yyyy-mm-dd hh:mm:ss
char MachineName[32] <fgcolor=cBlack, bgcolor=cRed>;
char MachineType[32] <fgcolor=cBlack, bgcolor=cRed>;
char ProfileName[32] <fgcolor=cBlack, bgcolor=cRed>;
ushort AntiAliasingLevel <fgcolor=cBlack, bgcolor=cRed>;
ushort GreyLevel <fgcolor=cBlack, bgcolor=cRed>;
ushort BlurLevel <fgcolor=cBlack, bgcolor=cRed>;
ubyte SmallPreview[116*116*2] <fgcolor=cBlack, bgcolor=cYellow>; // RGB_565 16Bit
ubyte SmallPreviewDelimiter[2] <fgcolor=cBlack, bgcolor=cPurple>; // \n 0x0D 0x0A
ubyte BigPreview[290*290*2] <fgcolor=cBlack, bgcolor=cYellow>; // RGB_565 16Bit
ubyte BigPreviewDelimiter[2] <fgcolor=cBlack, bgcolor=cPurple>; // \n 0x0D 0x0A

uint LayerCount <fgcolor=cBlack, bgcolor=cRed>;
ushort ResolutionX <fgcolor=cBlack, bgcolor=cRed>;
ushort ResolutionY <fgcolor=cBlack, bgcolor=cRed>;
BOOL MirrorX <fgcolor=cBlack, bgcolor=cRed>;
BOOL MirrorY <fgcolor=cBlack, bgcolor=cRed>;
float DisplayWidth <fgcolor=cBlack, bgcolor=cRed>;
float DisplayHeight <fgcolor=cBlack, bgcolor=cRed>;
float MachineZ <fgcolor=cBlack, bgcolor=cRed>;
float LayerHeight <fgcolor=cBlack, bgcolor=cRed>;
float ExposureTime <fgcolor=cBlack, bgcolor=cRed>;
enum <ubyte> { WaitTime, LightOffDelay } DelayMode <fgcolor=cBlack, bgcolor=cRed>; // 1: wait time mode , 0: light off delay mode
float LightOffDelay <fgcolor=cBlack, bgcolor=cRed>;
float BottomWaitTimeAfterCure <fgcolor=cBlack, bgcolor=cRed>;
float BottomWaitTimeAfterLift <fgcolor=cBlack, bgcolor=cRed>;
float BottomWaitTimeBeforeCure <fgcolor=cBlack, bgcolor=cRed>;
float WaitTimeAfterCure <fgcolor=cBlack, bgcolor=cRed>;
float WaitTimeAfterLift <fgcolor=cBlack, bgcolor=cRed>;
float WaitTimeBeforeCure <fgcolor=cBlack, bgcolor=cRed>;
float BottomExposureTime <fgcolor=cBlack, bgcolor=cRed>;
uint BottomLayerCount <fgcolor=cBlack, bgcolor=cRed>;
float BottomLiftHeight <fgcolor=cBlack, bgcolor=cRed>;
float BottomLiftSpeed <fgcolor=cBlack, bgcolor=cRed>; // mm/min
float LiftHeight <fgcolor=cBlack, bgcolor=cRed>;
float LiftSpeed <fgcolor=cBlack, bgcolor=cRed>; // mm/min
float BottomRetractHeight <fgcolor=cBlack, bgcolor=cRed>;
float BottomRetractSpeed <fgcolor=cBlack, bgcolor=cRed>; // mm/min
float RetractHeight <fgcolor=cBlack, bgcolor=cRed>;
float RetractSpeed <fgcolor=cBlack, bgcolor=cRed>; // mm/min

float BottomLiftHeight2 <fgcolor=cBlack, bgcolor=cRed>;
float BottomLiftSpeed2 <fgcolor=cBlack, bgcolor=cRed>; // mm/min
float LiftHeight2 <fgcolor=cBlack, bgcolor=cRed>;
float LiftSpeed2 <fgcolor=cBlack, bgcolor=cRed>; // mm/min
float BottomRetractHeight2 <fgcolor=cBlack, bgcolor=cRed>;
float BottomRetractSpeed2 <fgcolor=cBlack, bgcolor=cRed>; // mm/min
float RetractHeight2 <fgcolor=cBlack, bgcolor=cRed>;
float RetractSpeed2 <fgcolor=cBlack, bgcolor=cRed>; // mm/min

ushort BottomLightPWM <fgcolor=cBlack, bgcolor=cRed>;
ushort LightPWM <fgcolor=cBlack, bgcolor=cRed>;

BOOL PerLayerSettings <fgcolor=cBlack, bgcolor=cRed>; // 0: normal mode; 1:advance mode, printing use the value of "Layer Definition Content"

uint PrintTime <fgcolor=cBlack, bgcolor=cRed>; // seconds
float Volume <fgcolor=cBlack, bgcolor=cRed>; // The volume of all parts. unit:mm3
float MaterialGrams <fgcolor=cBlack, bgcolor=cRed>; // The weight of all parts. unit:g
float MaterialCost <fgcolor=cBlack, bgcolor=cRed>;
char PriceCurrency[8] <fgcolor=cBlack, bgcolor=cRed>; // $, €

uint LayerDefAddress <fgcolor=cBlack, bgcolor=cRed>;
ubyte GrayScaleLevel <fgcolor=cBlack, bgcolor=cRed>; // 0: The range of pixel's gray value is from 0x0 ~ 0xf; 1:The range of pixel's gray value is from 0x0 ~ 0xff;
ushort TransitionLayerCount <fgcolor=cBlack, bgcolor=cRed>;
} header;

struct LAYER_DEF {
// 0: reserve; 1: current layer pause printing
ushort Pause <fgcolor=cWhite, bgcolor=cBlue>;
// The lift distance of Z axis when "Pause flag" equal 1. unit:mm
float PausePositionZ <fgcolor=cWhite, bgcolor=cBlue>;
float PositionZ <fgcolor=cWhite, bgcolor=cBlue>;
float ExposureTime <fgcolor=cWhite, bgcolor=cBlue>;
float LightOffDelay <fgcolor=cWhite, bgcolor=cBlue>;
float WaitTimeAfterCure <fgcolor=cWhite, bgcolor=cBlue>;
float WaitTimeAfterLift <fgcolor=cWhite, bgcolor=cBlue>;
float WaitTimeBeforeCure <fgcolor=cWhite, bgcolor=cBlue>;
float LiftHeight <fgcolor=cWhite, bgcolor=cBlue>;
float LiftSpeed <fgcolor=cWhite, bgcolor=cBlue>; // mm/min
float LiftHeight2 <fgcolor=cWhite, bgcolor=cBlue>;
float LiftSpeed2 <fgcolor=cWhite, bgcolor=cBlue>; // mm/min
float RetractHeight <fgcolor=cWhite, bgcolor=cBlue>;
float RetractSpeed <fgcolor=cWhite, bgcolor=cBlue>; // mm/min
float RetractHeight2 <fgcolor=cWhite, bgcolor=cBlue>;
float RetractSpeed2 <fgcolor=cWhite, bgcolor=cBlue>; // mm/min
ushort LightPWM <fgcolor=cWhite, bgcolor=cBlue>;
ubyte DelimiterData[2] <fgcolor=cWhite, bgcolor=cBlue>; // \n 0x0D 0x0A
uint DataSize <fgcolor=cWhite, bgcolor=cBlue>;
// First RLE byte is Magic (0x55)
ubyte RLE[DataSize] <fgcolor=cWhite, bgcolor=cBlack>;
// Last RLE byte is Checksum XOR
ubyte DelimiterRLE[2] <fgcolor=cWhite, bgcolor=cBlack>; // \n 0x0D 0x0A
};

struct LAYERS{
local uint i;
for(i = 0; i < header.LayerCount; i++){
LAYER_DEF layerDef;
}
} layers;


struct FOOTER {
ubyte Padding[3] <fgcolor=cBlack, bgcolor=cRed>; // format version
char Magic[8] <fgcolor=cBlack, bgcolor=cRed>; // Fix contant:0x07 0x00 0x00 0x00 0x44 0x4C 0x50 0x00

} footer;
4 changes: 2 additions & 2 deletions Scripts/010 Editor/osf.bt
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ struct HEADER {
ubyte ProtocolType <fgcolor=cBlack, bgcolor=cRed>; // 0

local int leftover = HeaderLength - 350001;
if(HeaderLength == 350013) // VLR
/*if(HeaderLength == 350013) // VLR
{
uint Unknown <fgcolor=cBlack, bgcolor=cRed>; // 350054
ubyte Unknown1[8] <fgcolor=cBlack, bgcolor=cRed>;
leftover -= 12;
}
}*/


if(leftover > 0)
Expand Down
2 changes: 1 addition & 1 deletion Scripts/UVtools.ScriptSample/ScriptAdvancedDialogSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public bool ScriptExecute()

for (int i = 0; i < Iterations.Value; i++)
{
Progress.ThrowIfCancellationRequested();
Progress.PauseOrCancelIfRequested();

Thread.Sleep(1000);
Progress.Log = $"Task {i}: Completed!\n{Progress.Log}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public bool ScriptExecute()

foreach (var operation in operations) // Loop all my created operations to execute them
{
Progress.ThrowIfCancellationRequested(); // Abort operation, user requested cancellation
Progress.PauseOrCancelIfRequested(); // Abort operation, user requested cancellation
operation.ROI = Operation.ROI; // Copy user selected ROI to my operation
operation.MaskPoints = Operation.MaskPoints; // Copy user selected Masks to my operation
if (!operation.CanValidate()) continue; // If cant validate don't execute the operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public bool ScriptExecute()

for (uint layerIndex = Operation.LayerIndexStart; layerIndex <= Operation.LayerIndexEnd; layerIndex++)
{
Progress.ThrowIfCancellationRequested(); // Abort operation, user requested cancellation
Progress.PauseOrCancelIfRequested(); // Abort operation, user requested cancellation
var layer = SlicerFile[layerIndex]; // Unpack and expose layer variable for easier use

layer.LiftHeight = random.Next(3, 10); // Random value from 3 to 10
Expand Down
2 changes: 1 addition & 1 deletion Scripts/UVtools.ScriptSample/ScriptCloneSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public bool ScriptExecute()
var results = new List<Tuple<ResultStatus, string, List<string>?>>();
foreach (var filePath in filePaths)
{
Progress.ThrowIfCancellationRequested();
Progress.PauseOrCancelIfRequested();

Tuple<ResultStatus, string, List<string>?> result;
try
Expand Down
2 changes: 2 additions & 0 deletions Scripts/UVtools.ScriptSample/ScriptCompensateCrossBleeding.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Emgu.CV;
using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading.Tasks;
using UVtools.Core;
Expand Down Expand Up @@ -45,6 +46,7 @@ public bool ScriptExecute()
CoreSettings.GetParallelOptions(Progress),
layerIndex =>
{
Progress.PauseIfRequested();
var layersBelowCount = layerIndex > LayerBleed.Value ? LayerBleed.Value : layerIndex;

using var sourceMat = originalLayers[layerIndex].LayerMat;
Expand Down
1 change: 1 addition & 0 deletions Scripts/UVtools.ScriptSample/ScriptInsetSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public bool ScriptExecute()
// Loop user selected layers in parallel, this will put each core of CPU working here on parallel
Parallel.For(Operation.LayerIndexStart, Operation.LayerIndexEnd+1, CoreSettings.GetParallelOptions(Progress), layerIndex =>
{
Progress.PauseIfRequested();
var layer = SlicerFile[layerIndex]; // Unpack and expose layer variable for easier use
using var mat = layer.LayerMat; // Gets this layer mat/image
var original = mat.Clone(); // Keep a original mat copy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public bool ScriptExecute()
// Loop user selected layers in parallel, this will put each core of CPU working here on parallel
Parallel.For(Operation.LayerIndexStart, Operation.LayerIndexEnd+1, CoreSettings.GetParallelOptions(Progress), layerIndex =>
{
Progress.PauseIfRequested();
var layer = SlicerFile[layerIndex]; // Unpack and expose layer variable for easier use
using var mat = layer.LayerMat; // Gets this layer mat/image
var original = mat.Clone(); // Keep a original mat copy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public bool ScriptExecute()
CoreSettings.GetParallelOptions(Progress),
layerIndex =>
{
Progress.PauseIfRequested();
var fullLayer = SlicerFile[layerIndex];
if (fullLayer.IsEmpty)
{
Expand Down
1 change: 1 addition & 0 deletions Scripts/UVtools.ScriptSample/ScriptTester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public bool ScriptExecute()
var dict = new Dictionary<uint, List<(Point[] points, Rectangle rect)>>();
Parallel.For(Operation.LayerIndexStart, Operation.LayerIndexEnd + 1, CoreSettings.GetParallelOptions(Progress), layerIndex =>
{
Progress.PauseIfRequested();
using var mat = SlicerFile[layerIndex].LayerMat;
using var contours = mat.FindContours(out var hierarchy, RetrType.Tree);

Expand Down
6 changes: 4 additions & 2 deletions UVtools.Core/FileFormats/AnetFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ protected override void EncodeInternally(OperationProgress progress)
{
Parallel.ForEach(batch, CoreSettings.GetParallelOptions(progress), layerIndex =>
{
progress.PauseIfRequested();
var layer = this[layerIndex];
using var mat = layer.LayerMat;
layerData[layerIndex] = new LayerDef();
Expand All @@ -479,7 +480,7 @@ protected override void EncodeInternally(OperationProgress progress)

foreach (var layerIndex in batch)
{
progress.ThrowIfCancellationRequested();
progress.PauseOrCancelIfRequested();

outputFile.WriteSerialize(layerData[layerIndex]);
outputFile.WriteBytes(layerData[layerIndex].EncodedRle);
Expand Down Expand Up @@ -521,7 +522,7 @@ protected override void DecodeInternally(OperationProgress progress)
{
foreach (var layerIndex in batch)
{
progress.ThrowIfCancellationRequested();
progress.PauseOrCancelIfRequested();

var layerDef = Helpers.Deserialize<LayerDef>(inputFile);
layersDefinitions[layerIndex] = layerDef;
Expand All @@ -543,6 +544,7 @@ protected override void DecodeInternally(OperationProgress progress)
{
Parallel.ForEach(batch, CoreSettings.GetParallelOptions(progress), layerIndex =>
{
progress.PauseIfRequested();
using var mat = layersDefinitions[layerIndex].Decode(out var resolutionX, out var resolutionY);
if (layerIndex == 0) // Set file resolution from first layer RLE. Figure out other properties after that
{
Expand Down
8 changes: 5 additions & 3 deletions UVtools.Core/FileFormats/CTBEncryptedFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ protected override void DecodeInternally(OperationProgress progress)
LayersPointer = new LayerPointer[Settings.LayerCount];
for (uint layerIndex = 0; layerIndex < Settings.LayerCount; layerIndex++)
{
progress.ThrowIfCancellationRequested();
progress.PauseOrCancelIfRequested();
LayersPointer[layerIndex] = Helpers.Deserialize<LayerPointer>(inputFile);
Debug.WriteLine($"pointer[{layerIndex}]: {LayersPointer[layerIndex]}");
progress++;
Expand All @@ -1172,7 +1172,7 @@ protected override void DecodeInternally(OperationProgress progress)
{
foreach (var layerIndex in batch)
{
progress.ThrowIfCancellationRequested();
progress.PauseOrCancelIfRequested();

inputFile.Seek(LayersPointer[layerIndex].PageNumber * ChituboxFile.PageSize + LayersPointer[layerIndex].LayerOffset, SeekOrigin.Begin);
LayersDefinition[layerIndex] = Helpers.Deserialize<LayerDef>(inputFile);
Expand All @@ -1185,6 +1185,7 @@ protected override void DecodeInternally(OperationProgress progress)
{
Parallel.ForEach(batch, CoreSettings.GetParallelOptions(progress), layerIndex =>
{
progress.PauseIfRequested();
var layerDef = LayersDefinition[layerIndex];


Expand Down Expand Up @@ -1349,6 +1350,7 @@ protected override void EncodeInternally(OperationProgress progress)
progress.Reset(OperationProgress.StatusEncodeLayers, LayerCount);
Parallel.For(0, LayerCount, CoreSettings.GetParallelOptions(progress), layerIndex =>
{
progress.PauseIfRequested();
var layerDef = new LayerDef(this, this[layerIndex]);
using (var mat = this[layerIndex].LayerMat)
{
Expand All @@ -1362,7 +1364,7 @@ protected override void EncodeInternally(OperationProgress progress)
progress.Reset(OperationProgress.StatusWritingFile, LayerCount);
for (uint layerIndex = 0; layerIndex < LayerCount; layerIndex++)
{
progress.ThrowIfCancellationRequested();
progress.PauseOrCancelIfRequested();
var layerDef = LayersDefinition[layerIndex];
LayersPointer[layerIndex] = new LayerPointer(outputFile.Position);

Expand Down
Loading

0 comments on commit a626cfd

Please sign in to comment.