From 58f28b3feb8543dc8515e41eba968e14f989ee80 Mon Sep 17 00:00:00 2001 From: Carlos garcia Date: Tue, 3 Oct 2023 15:49:32 -0700 Subject: [PATCH 1/3] Fix end frame replacement to acknowledge the chunk size. --- .../imageworks/spcue/dispatcher/DispatchSupportService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java b/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java index 713f6c86c..42cc3380c 100644 --- a/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java +++ b/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java @@ -367,6 +367,7 @@ public RunFrame prepareRqdRunFrame(VirtualProc proc, DispatchFrame frame) { FrameSet fs = new FrameSet(frame.range); int startFrameIndex = fs.index(frameNumber); String frameSpec = fs.getChunk(startFrameIndex, frame.chunkSize); + int lastIndex = fs.size() - 1; RunFrame.Builder builder = RunFrame.newBuilder() .setShot(frame.shot) @@ -409,7 +410,7 @@ public RunFrame prepareRqdRunFrame(VirtualProc proc, DispatchFrame frame) { .replaceAll("#ZFRAME#", zFrameNumber) .replaceAll("#IFRAME#", String.valueOf(frameNumber)) .replaceAll("#FRAME_START#", String.valueOf(frameNumber)) - .replaceAll("#FRAME_END#", String.valueOf(frameNumber+frame.chunkSize-1)) + .replaceAll("#FRAME_END#", String.valueOf(Math.min((frameNumber+frame.chunkSize-1), fs.get(lastIndex)))) .replaceAll("#FRAME_CHUNK#", String.valueOf(frame.chunkSize)) .replaceAll("#LAYER#", frame.layerName) .replaceAll("#JOB#", frame.jobName) From 9bbd63242ce817d484dad72b128687e3b49f7410 Mon Sep 17 00:00:00 2001 From: Carlos garcia Date: Tue, 21 May 2024 15:59:10 -0700 Subject: [PATCH 2/3] Addressed comments to use indexes rather than frame values. --- .../spcue/dispatcher/DispatchSupportService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java b/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java index 42cc3380c..9bcfc85ef 100644 --- a/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java +++ b/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java @@ -367,7 +367,12 @@ public RunFrame prepareRqdRunFrame(VirtualProc proc, DispatchFrame frame) { FrameSet fs = new FrameSet(frame.range); int startFrameIndex = fs.index(frameNumber); String frameSpec = fs.getChunk(startFrameIndex, frame.chunkSize); - int lastIndex = fs.size() - 1; + int lastFrameIndex = fs.size() - 1; + int endChunkIndex = startFrameIndex + frame.chunkSize - 1; + if (endChunkIndex > lastFrameIndex) { + endChunkIndex = lastFrameIndex; + } + RunFrame.Builder builder = RunFrame.newBuilder() .setShot(frame.shot) @@ -410,7 +415,7 @@ public RunFrame prepareRqdRunFrame(VirtualProc proc, DispatchFrame frame) { .replaceAll("#ZFRAME#", zFrameNumber) .replaceAll("#IFRAME#", String.valueOf(frameNumber)) .replaceAll("#FRAME_START#", String.valueOf(frameNumber)) - .replaceAll("#FRAME_END#", String.valueOf(Math.min((frameNumber+frame.chunkSize-1), fs.get(lastIndex)))) + .replaceAll("#FRAME_END#", String.valueOf(endChunkIndex) .replaceAll("#FRAME_CHUNK#", String.valueOf(frame.chunkSize)) .replaceAll("#LAYER#", frame.layerName) .replaceAll("#JOB#", frame.jobName) From 88fa02cb93d354a75e6c2c11e3fddba2ab9e3ab5 Mon Sep 17 00:00:00 2001 From: Carlos garcia Date: Wed, 22 May 2024 15:09:34 -0700 Subject: [PATCH 3/3] Fix missing closing parenthesis in DispatchSupportService --- .../com/imageworks/spcue/dispatcher/DispatchSupportService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java b/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java index 9bcfc85ef..bde4732b9 100644 --- a/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java +++ b/cuebot/src/main/java/com/imageworks/spcue/dispatcher/DispatchSupportService.java @@ -415,7 +415,7 @@ public RunFrame prepareRqdRunFrame(VirtualProc proc, DispatchFrame frame) { .replaceAll("#ZFRAME#", zFrameNumber) .replaceAll("#IFRAME#", String.valueOf(frameNumber)) .replaceAll("#FRAME_START#", String.valueOf(frameNumber)) - .replaceAll("#FRAME_END#", String.valueOf(endChunkIndex) + .replaceAll("#FRAME_END#", String.valueOf(endChunkIndex)) .replaceAll("#FRAME_CHUNK#", String.valueOf(frame.chunkSize)) .replaceAll("#LAYER#", frame.layerName) .replaceAll("#JOB#", frame.jobName)