From c80133e1bc1afdb8f582fa6b2db3d0a3090841b2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Apr 2009 23:22:20 +0000 Subject: Added a message when people try build docs outside of blender --- source/blender/python/epy_doc_gen.py | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'source') diff --git a/source/blender/python/epy_doc_gen.py b/source/blender/python/epy_doc_gen.py index a108929febc..03eb5664497 100644 --- a/source/blender/python/epy_doc_gen.py +++ b/source/blender/python/epy_doc_gen.py @@ -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 @@ def op2epy(target_path): 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() -- cgit v1.2.3