print the help message if running from python directly.
This commit is contained in:
parent
e1ba5c8167
commit
69ff819a2e
@ -29,15 +29,15 @@ For HTML generation
|
||||
|
||||
./blender.bin --background --python doc/python_api/sphinx_doc_gen.py
|
||||
|
||||
This will generate python files in doc/python_api/sphinx-in/,
|
||||
assuming that ./blender.bin is or links to the blender executable
|
||||
This will generate python files in doc/python_api/sphinx-in/
|
||||
providing ./blender.bin is or links to the blender executable
|
||||
|
||||
- Generate html docs by running...
|
||||
|
||||
cd doc/python_api
|
||||
sphinx-build sphinx-in sphinx-out
|
||||
|
||||
assuming that you have sphinx 1.0.7 installed
|
||||
This requires sphinx 1.0.7 to be installed.
|
||||
|
||||
For PDF generation
|
||||
------------------
|
||||
@ -48,6 +48,15 @@ For PDF generation
|
||||
make
|
||||
'''
|
||||
|
||||
# Check we're running in blender
|
||||
if __import__("sys").modules.get("bpy") is None:
|
||||
print("\nError, this script must run from inside blender2.5")
|
||||
print(script_help_msg)
|
||||
|
||||
import sys
|
||||
sys.exit()
|
||||
|
||||
|
||||
# Switch for quick testing
|
||||
if 1:
|
||||
# full build
|
||||
@ -1196,11 +1205,6 @@ def rna2sphinx(BASEPATH):
|
||||
|
||||
|
||||
def main():
|
||||
import bpy
|
||||
if 'bpy' not in dir():
|
||||
print("\nError, this script must run from inside blender2.5")
|
||||
print(script_help_msg)
|
||||
else:
|
||||
import shutil
|
||||
|
||||
script_dir = os.path.dirname(__file__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user