Currently, I have to run my script manually every time I open a Blender file. I'm looking for a way to have the script execute automatically whenever the file is opened, so I don't have to trigger it each time.
1 Answer
$\begingroup$
$\endgroup$
0
There are two things you need to do -
- Set up the script in Blender's Text Editor. Make sure the name of the text block ends with
.pyand that the Register checkbox is enabled in the Text menu. Don't forget to save the file after enabling Register, otherwise the script won't run automatically the next time you open the file.
- Ensure that Auto-Run Python Scripts is enabled in your preferences under Save & Load tab:
Important: Registering the script only applies to the specific saved Blender file. If you create a new file or open a different file, the script will not run automatically there. You will need to register it again for each separate file. If you want the script to run automatically for any Blender file, consider turning it into an Addon, which can be enabled globally across all files.

