Skip to content

Commit

Permalink
Fix end frame replacement to acknowledge the chunk size. (AcademySoft…
Browse files Browse the repository at this point in the history
…wareFoundation#1320)

* Fix end frame replacement to acknowledge the chunk size.

* Addressed comments to use indexes rather than frame values.

* Fix missing closing parenthesis in DispatchSupportService
  • Loading branch information
carlosfelgarcia authored Jun 5, 2024
1 parent d6e859e commit 6c0991e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +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 lastFrameIndex = fs.size() - 1;
int endChunkIndex = startFrameIndex + frame.chunkSize - 1;
if (endChunkIndex > lastFrameIndex) {
endChunkIndex = lastFrameIndex;
}


RunFrame.Builder builder = RunFrame.newBuilder()
.setShot(frame.shot)
Expand Down Expand Up @@ -409,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(frameNumber+frame.chunkSize-1))
.replaceAll("#FRAME_END#", String.valueOf(endChunkIndex))
.replaceAll("#FRAME_CHUNK#", String.valueOf(frame.chunkSize))
.replaceAll("#LAYER#", frame.layerName)
.replaceAll("#JOB#", frame.jobName)
Expand Down

0 comments on commit 6c0991e

Please sign in to comment.