Welcome to mirror list, hosted at ThFree Co, Russian Federation.

script_stub.py « templates « scripts « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 69ecbf48d2c2eac87a488c869d51be6c2b77d295 (plain)
1
2
3
4
5
6
7
8
9
10
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'))