From 8e44af803be6e159c3311ce755005352f5f3d1fd Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 4 May 2017 09:34:10 +0200 Subject: [PATCH] Fix #74 --- capture.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/capture.py b/capture.py index 9b5f843..384fecb 100644 --- a/capture.py +++ b/capture.py @@ -126,6 +126,13 @@ def capture(camera=None, if end_frame is None: end_frame = cmds.playbackOptions(maxTime=True, query=True) + # (#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 + # explicitly + if raw_frame_numbers and frame is None: + frame = range(int(start_frame), int(end_frame) + 1) + # We need to wrap `completeFilename`, otherwise even when None is provided # it will use filename as the exact name. Only when lacking as argument # does it function correctly.