Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-01-16 13:51:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-01-16 13:51:30 +0300
commitbae2de3f1a23205bc2a11a7065fee450c4a591a9 (patch)
treeb5f7e193ecfadb47fda47120a6ab842f0964c727 /release
parentce3dca24d1948874e9c2aab69ecc37009582e602 (diff)
minor corrections
Diffstat (limited to 'release')
-rw-r--r--release/scripts/scripttemplate_background_job.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/release/scripts/scripttemplate_background_job.py b/release/scripts/scripttemplate_background_job.py
index 713acbb56a8..86b58991849 100644
--- a/release/scripts/scripttemplate_background_job.py
+++ b/release/scripts/scripttemplate_background_job.py
@@ -15,7 +15,7 @@ script_data = \
# This example also shows how you can parse command line options to python scripts.
#
# Example usage for this test.
-# blender -b -P $HOME/.blender/scripts/scripttemplate_background_job.py -- --text="Hello World" --render="/tmp/hello" --save="/tmp/hello.blend"
+# blender -b -P $HOME/background_job.py -- --text="Hello World" --render="/tmp/hello" --save="/tmp/hello.blend"
#
# Notice all python args are after the '--' argument.
@@ -90,7 +90,8 @@ def main():
# Example background utility, add some text and renders or saves it (with options)
- parser.add_option('-t', '--text', dest='body_text', help='This text will be used to render an image')
+ # Possible types are: string, int, long, choice, float and complex.
+ parser.add_option('-t', '--text', dest='body_text', help='This text will be used to render an image', type='string')
parser.add_option('-s', '--save', dest='save_path', help='Save the generated file to the specified path', metavar='FILE')
parser.add_option('-r', '--render', dest='render_path', help='Render an image to the specified path', metavar='FILE')
@@ -101,7 +102,7 @@ def main():
parser.print_help()
return
- if not hasattr(options, 'body_text'):
+ if not options.body_text:
print 'Error: --text="some string" argument not given, aborting.\n'
parser.print_help()
return