Revision: 19594
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19594
Author:   campbellbarton
Date:     2009-04-08 01:22:20 +0200 (Wed, 08 Apr 2009)

Log Message:
-----------
Added a message when people try build docs outside of blender

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/python/epy_doc_gen.py

Modified: branches/blender2.5/blender/source/blender/python/epy_doc_gen.py
===================================================================
--- branches/blender2.5/blender/source/blender/python/epy_doc_gen.py    
2009-04-07 23:21:30 UTC (rev 19593)
+++ branches/blender2.5/blender/source/blender/python/epy_doc_gen.py    
2009-04-07 23:22:20 UTC (rev 19594)
@@ -18,13 +18,16 @@
  #
  # #**** END GPL LICENSE BLOCK #****
 
-# Usage,
-# run this script from blenders root path once you have compiled blender
-# ./blender.bin -b -P source/blender/python/epy_doc_gen.py
-# 
-# This will generate rna.py, generate html docs  by running...
-# epydoc source/blender/python/doc/rna.py -o source/blender/python/doc/html -v 
--no-sourcecode --name="RNA API" --url="http://brechtvanlommelfanclub.com"; 
--graph=classtree
-# 
+script_help_msg = '''
+Usage,
+run this script from blenders root path once you have compiled blender
+       ./blender.bin -P source/blender/python/epy_doc_gen.py
+
+This will generate rna.py, generate html docs  by running...
+       epydoc source/blender/python/doc/rna.py -o 
source/blender/python/doc/html -v --no-sourcecode  --no-sourcecode  
--graph=classtree
+       epydoc source/blender/python/doc/bpyoperator.py -o 
source/blender/python/doc/html -v --no-sourcecode  --no-sourcecode  
--graph=classtree
+'''
+
 # if you dont have graphvis installed ommit the --graph arg.
 
 def range_str(val):
@@ -451,6 +454,14 @@
        out.close()
 
 if __name__ == '__main__':
-       rna2epy('source/blender/python/doc/rna.py')
-       op2epy('source/blender/python/doc/bpyoperator.py')
+       if 'bpy' not in dir():
+               print "\nError, this script must run from inside blender."
+               print script_help_msg
+               
+       else:
+               rna2epy('source/blender/python/doc/rna.py')
+               op2epy('source/blender/python/doc/bpyoperator.py')
 
+
+       import sys
+       sys.exit()


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

Reply via email to