I really like working in sublime but there’s no link right now so i elaborated an universal “Script Live-Link”
it can work with any note editor what so ever, the goal is to facilitate development of scripts and addon within blender for peoples who use different text editors.
here is the project:
- You can choose up to 3 scripts paths at the time in the text editor T panel.
- Once the python script path is choosed, an execute script operator will be at your disposal. (click on the operator for an direct manual execution).
- You can create a livelink:
EXECUTE” is in the first line of your script, every time you save the script, it will automatically run inside of blender. it can also work with
if __name__ == "__main__": register()which is nice for working on addons.
#EXECUTE_CUSTOM” is in the first line of your script, every time you save the script, it will automatically create(/overwrite) a new file with the line between
#EXECUTE_STOPthen run it in blender. see examples here
if you choose the
#EXECUTE_CUSTOMmethod, don’t forget your boundaries. as the script will be empty otherwise.
#STOPis in the first line of your script, the live-link will stop.
Always keep an text editor open in the blender main layout otherwise the link will not work. i suggest you tu use a set up like this below
- There’s also an addon reloader operator, handy to update the code of your addon directly into blender if
if __name__ == "__main__": register()method won’t work for you. You just need to set the path of the addon you are working on. i only support “one
.pyfile” addon type. let me know if you’d like a full folder to zip & install automation
Script-LiveLink_V21.py (23.3 KB)
Quick start guide
- install the Script-LiveLink.py
- Set up a text editor in your main layout (Keep it always open when using the addon)
- use CTRL+T to open the T panel, and go in my addon tab
- choose your script path in one of your 3 path slots, then click on "Start LiveLink.
- if #EXECUTE or #EXECUTE_CUSTOM is in the first line of the script, everytime you save the him it will automatically it will be automatically executed within blender.
Help! my live-link doesnt work!
if the script link is not working for you. please read above. but here a quick check-up:
- at the first place, is your script working witouth the addon ? try it out in a text editor.
- is the link on ? if it’s a brand new blender session and you forgot to close it last time, you will need to stop and re-start the link. is #EXECUTE in your first line ?
- Did you use #EXECUTE_CUSTOM witouth any boundaries ?
- did you leave an text editor always open as i suggested above ?
- do you [Ctrl+S] shortcut from your text editor actually save ondisk ?
- you can try to check if the live-link is properly working with the debug mode (checkbox below) it will print all important event, timers and handlers activities.