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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-04-08 03:22:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-08 03:22:20 +0400
commitc80133e1bc1afdb8f582fa6b2db3d0a3090841b2 (patch)
tree6c75801393ccd4efded1a6e312a1c7df07fc06f8 /source
parent654a30aa2d9feb455e5fa6a856bee8ab6a0eca85 (diff)
Added a message when people try build docs outside of blender
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/epy_doc_gen.py29
1 files changed, 20 insertions, 9 deletions
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()