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

Ignore raw_frame_numbers when not playblasting to image format #78

Open
BigRoy opened this issue May 12, 2017 · 1 comment
Open

Ignore raw_frame_numbers when not playblasting to image format #78

BigRoy opened this issue May 12, 2017 · 1 comment
Labels

Comments

@BigRoy
Copy link
Collaborator

BigRoy commented May 12, 2017

Issue

When playblasting to a format that is not an image format with raw_frame_numbers = True Maya will give this warning:

# Warning: -movie flag cannot used with -rawFrameNumber option, using -image instead. # 

It will try to solve it and push on the "compression" settings to the image format, which in the majority of cases just fails to produce any valid output. From black frames or to the encoder not working and the playblast erroring out.

For example:

import maya.cmds as cmds
cmds.playblast(filename="C:/avi_format", rawFrameNumbers=True, frame=(1, 2, 3, 5, 9), viewer=False, format="avi", compression="MS-RLE")
# results in video with black frames

cmds.playblast(filename="C:/qt_format", rawFrameNumbers=True, frame=(1, 2, 3, 5, 9), viewer=False, format="qt", compression="Photo - JPEG")
# Error: Unable to initialize codec.
# Traceback (most recent call last):
#   File "<maya console>", line 3, in <module>
# RuntimeError: Unable to initialize codec. # 

Proposal

Instead of letting Maya fix it the wrong way I'd expect to have it just ignore raw frame numbers since it does not make sense out of the context of a sequence. So I'd opt for something like:

# Only image format supports raw frame numbers 
# so we ignore the state when calling it with a movie 
# format 
if format != "image" and raw_frame_numbers:
    log.warning("Capturing to image format with raw frame numbers is not supported. Ignoring raw frame numbers...")
    raw_frame_numbers = False
@mottosso
Copy link
Member

Sounds good to me.

@mottosso mottosso added the bug label May 12, 2017
BigRoy added a commit to BigRoy/maya-capture that referenced this issue May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants