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: 3b3212892d5804d0b43f68314ba222d7509a8797 (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.dirname(bpy.data.filepath), filename)
exec(compile(open(filepath).read(), filepath, 'exec'))