Revision: 18538
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18538
Author:   campbellbarton
Date:     2009-01-16 11:51:30 +0100 (Fri, 16 Jan 2009)

Log Message:
-----------
minor corrections

Modified Paths:
--------------
    trunk/blender/release/scripts/scripttemplate_background_job.py

Modified: trunk/blender/release/scripts/scripttemplate_background_job.py
===================================================================
--- trunk/blender/release/scripts/scripttemplate_background_job.py      
2009-01-16 04:48:33 UTC (rev 18537)
+++ trunk/blender/release/scripts/scripttemplate_background_job.py      
2009-01-16 10:51:30 UTC (rev 18538)
@@ -15,7 +15,7 @@
 # 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 @@
        
 
        # 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 @@
                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


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to