diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/rst/info_tips_and_tricks.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst index 0b9404906e2..521031f5e61 100644 --- a/doc/python_api/rst/info_tips_and_tricks.rst +++ b/doc/python_api/rst/info_tips_and_tricks.rst @@ -82,7 +82,7 @@ You might want to reference a script relative to the blend file. import bpy import os - filename = os.path.join(os.path.basename(bpy.data.filepath), "myscript.py") + filename = os.path.join(os.path.dirname(bpy.data.filepath), "myscript.py") exec(compile(open(filename).read(), filename, 'exec')) |