Skip to content

Commit 102c47e

Browse files
authored
Merge pull request abstractfactory#65 from BigRoy/master
Fix abstractfactory#64
2 parents a016609 + 2c7e55a commit 102c47e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

capture.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,18 @@ def capture(camera=None,
112112
ratio = cmds.getAttr("defaultResolution.deviceAspectRatio")
113113
height = round(width / ratio)
114114

115-
start_frame = start_frame or cmds.playbackOptions(minTime=True, query=True)
116-
end_frame = end_frame or cmds.playbackOptions(maxTime=True, query=True)
115+
if start_frame is None:
116+
start_frame = cmds.playbackOptions(minTime=True, query=True)
117+
if end_frame is None:
118+
end_frame = cmds.playbackOptions(maxTime=True, query=True)
117119

118120
# We need to wrap `completeFilename`, otherwise even when None is provided
119121
# it will use filename as the exact name. Only when lacking as argument
120122
# does it function correctly.
121123
playblast_kwargs = dict()
122124
if complete_filename:
123125
playblast_kwargs['completeFilename'] = complete_filename
124-
if frame:
126+
if frame is not None:
125127
playblast_kwargs['frame'] = frame
126128
if sound is not None:
127129
playblast_kwargs['sound'] = sound

0 commit comments

Comments
 (0)