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

thumbnails generated for other files #94

Open
johrstrom opened this issue Sep 9, 2021 · 1 comment
Open

thumbnails generated for other files #94

johrstrom opened this issue Sep 9, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@johrstrom
Copy link
Contributor

thumbnails are being generated for files that were not just rendered.

  • I have images for 2 scene files (A and B) in the images directory
  • I've just rendered 1-10 of B
  • I've rendered 1-10 images for A sometime in the past
  • The rendering job for B will generate thumbails for both A and B frames 1-10.

In this case I should only generate thumbnails for B, not A (as they presumably already exist). It looks like this loop should also check for the against the basename of the file.

images = Dir.glob("#{img_dir}/*").keep_if do |img|
file_num = /\d+/.match(File.basename(img))
if !file_num.nil?
num = file_num.to_s.to_i
num >= task_start_frame && num <= task_end_frame
else
false
end
end

@johrstrom johrstrom added the bug Something isn't working label Sep 9, 2021
@johrstrom
Copy link
Contributor Author

There's another bug here where if you have a filename like images/run3.exr you'll get images/run3.0001.exr. The regex here will extract 3, not 0001. And if you render frames 1-1 then it won't generate any thumbnails because 3 is not >= 1 && <= 1.

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

No branches or pull requests

1 participant