From b15b850949077355fec75cd4d95630ee7071f6ff Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 12 May 2017 15:35:53 +0200 Subject: [PATCH] Fix #78 --- capture.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/capture.py b/capture.py index c37b7a1..801bca5 100644 --- a/capture.py +++ b/capture.py @@ -7,6 +7,7 @@ import re import sys import contextlib +import logging from maya import cmds from maya import mel @@ -22,6 +23,8 @@ __version__ = "%s.%s.%s" % version_info __license__ = "MIT" +log = logging.getLogger(__name__) + def capture(camera=None, width=None, @@ -130,6 +133,13 @@ def capture(camera=None, if complete_filename is not None: filename = None + # (#78) Only image format supports raw frame numbers so we ignore it + # when calling it with a different format + if format != "image" and raw_frame_numbers: + log.warning("Capturing to non-image format with raw frame numbers is " + "not supported: %s. Ignoring raw frame numbers.", format) + raw_frame_numbers = False + # (#74) Bugfix: `maya.cmds.playblast` will raise an error when playblasting # with `rawFrameNumbers` set to True but no explicit `frames` provided. # Since we always know what frames will be included we can provide it