diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-17 20:01:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-17 20:01:57 +0400 |
commit | f83ae34e037aabef4508b517c49223963ab3c844 (patch) | |
tree | 29f49a332f053b078dd45419dabfcf41f90256cb /release | |
parent | 20585a8b8dc50bc1a090f2d44066540839ee7303 (diff) |
add a template for a stub script - runs the script relative to the currently open blend file.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/templates/script_stub.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/release/scripts/templates/script_stub.py b/release/scripts/templates/script_stub.py new file mode 100644 index 00000000000..69ecbf48d2c --- /dev/null +++ b/release/scripts/templates/script_stub.py @@ -0,0 +1,11 @@ +# This stub runs a python script relative to the currently open +# blend file, useful when editing scripts externally. + +import bpy +import os + +# Use your own script name here: +filename = "my_script.py" + +filepath = os.path.join(os.path.basename(bpy.data.filepath), filename) +exec(compile(open(filepath).read(), filepath, 'exec')) |