summaryrefslogtreecommitdiffstats
path: root/dimension/dimension.in
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-08-18 21:58:28 -0600
committerTavian Barnes <tavianator@gmail.com>2011-08-18 21:58:28 -0600
commit8ba39e9ea0ccfb08edaa9179e4893acb6c478aad (patch)
tree37c5799e87848dbf6f19f58c948059a9cac25860 /dimension/dimension.in
parente1a7c44bf102b5871a74fba8f168427f5fc118b5 (diff)
downloaddimension-8ba39e9ea0ccfb08edaa9179e4893acb6c478aad.tar.xz
Add --adc-bailout option.
Diffstat (limited to 'dimension/dimension.in')
-rw-r--r--dimension/dimension.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/dimension/dimension.in b/dimension/dimension.in
index 708d454..01dc2f3 100644
--- a/dimension/dimension.in
+++ b/dimension/dimension.in
@@ -64,6 +64,8 @@ _parser.add_argument("--threads", action = "store", type = int,
help = "the number of threads to render with")
_parser.add_argument("--quality", action = "store", type = str,
help = "the scene quality")
+_parser.add_argument("--adc-bailout", action = "store", type = str,
+ help = "the ADC bailout (default: 1/255)")
_parser.add_argument("-o", "--output", action = "store", type = str,
help = "the output image file")
@@ -172,6 +174,12 @@ if _args.threads is not None:
scene.nthreads = _args.threads
if _args.quality is not None:
scene.quality = _args.quality
+if _args.adc_bailout is not None:
+ _pattern = r"^(.*)/(.*)"
+ _match = _re.match(_pattern, _args.adc_bailout)
+ if _match is not None:
+ _args.adc_bailout = float(_match.group(1))/float(_match.group(2))
+ scene.adc_bailout = float(_args.adc_bailout)
# Raytrace the scene
if scene.nthreads == 1: