Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#FRAME_END# token wrong behaviour #1129

Closed
TanJeremy opened this issue Apr 19, 2022 · 7 comments · Fixed by #1320
Closed

#FRAME_END# token wrong behaviour #1129

TanJeremy opened this issue Apr 19, 2022 · 7 comments · Fixed by #1320
Labels
bug Something isn't working

Comments

@TanJeremy
Copy link

Hello all.
We have an issue with the #FRAME_END# token when the frame range is not divisible by the chunk size.

For exemple, if we have 72 frames with a chunk size of 10,
the last job will have the correct #FRAMESPEC# "71,72", but the #FRAME_END# will be 80,
rendering 8 more frame than necessary.

unfortunatly, i don't have knowledge in java to offer you a ready to use "pull request", and only suggest you some idea like
.replaceAll("#END_FRAME#", String.valueOf(Math.min(frameNumber+frame.chunkSize-1), fs.getAll()[ fs.size() - 1]))
i'm not sure the syntax is correct but the idea is there.

Many thanks

Opencue Version Number
0.14.5

@TanJeremy TanJeremy added the bug Something isn't working label Apr 19, 2022
@carlosfelgarcia
Copy link
Contributor

Does anyone know if this issue has been addressed? I did have the same issue and I already resolved, it's been under production for a month and not issues. Please let me know, so I can implement a PR for it.

Thanks,

@TanJeremy TanJeremy reopened this Sep 21, 2022
@TanJeremy
Copy link
Author

TanJeremy commented Sep 21, 2022

Does anyone know if this issue has been addressed? I did have the same issue and I already resolved, it's been under production for a month and not issues. Please let me know, so I can implement a PR for it.

Thanks,

it doesn't seem to be the case

@KernZag
Copy link

KernZag commented Mar 1, 2023

Would you mind sending a PR with your fix ?

@carlosfelgarcia
Copy link
Contributor

Would you mind sending a PR with your fix ?

Definitely I can, probably next week as I'm a busy at work.

@antonshack
Copy link

antonshack commented Oct 3, 2023

Hi there.

Any news regarding that issue ?

I came up with that workaround in the meantime, when providing the command to the layer:

For Windows/CMD:

command = [
        f"for /f %i in ('powershell -command \"[math]::min(#FRAME_END#,{frame_range.end})\"')",
        "do",
    ] + py_cmd

Cheers.

@carlosfelgarcia
Copy link
Contributor

Thanks for reminding me about this one, I just created a draft PR (#1320) as it might need some tests to be created before I put it in review.

@anton-ubi
Copy link
Contributor

It seems that the behavior is still not the one expected. #FRAME_END# is now filled with the index of the last frame as it appears in the frame list where it should be its value.

Here's a proposition to address the issue: #1467

DiegoTavares pushed a commit that referenced this issue Aug 29, 2024
**Link the Issue(s) this Pull Request is related to.**
#1129 

**Summarize your change.**
Fix the frame end resolution of a frame chunk used to fill the place
holder `#FRAME_END#`.
The current behavior incorrectly returns the index of the last frame in
the frame list instead of its value.

Leverage `FrameSet.get_chunk` method that is already doing all the
legwork to get the last frame.


**Related topics**
- #1320
- #367

---------

Signed-off-by: Anton Brand <anton.brand@ubisoft.com>
Co-authored-by: Kern Attila GERMAIN <5556461+KernAttila@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants