[Addon] Script Watcher

While developing a script in an external editor I was very frustrated by how difficult it was to manually re-load the script and run it every time I made a change.

To make the process easier I created this addon. It watches the script you’re developing and reloads it whenever any changes occur. This is especially useful for UI development because you can save your .py file and see blender automatically update with the new changes! This script also works for multi-file projects, just give it your main (top-level) init.py file and it’ll figure out the rest.

Note that it is still considered to be beta.

Documentation can be found here (it’s pretty rough)
The script can be download from here
You can fill out bug reports here, or on this thread.

Please don’t hesitate to tell me about bugs you find or features you’d like to see.

1 Like

VERY clever, thank you. I’ll check it out.

or just check “Live Edit” in text editor toolbar.

Thanks you a lot, @wisaac407
Good Luck!

While developing a script in an external editor

He’s referring to developing externally to Blender.

Thanks guys, let me know how it works out for you.

That is stupidly simple - why nobody thought about that before ? ^^

Thanks a lot man, it works perfectly :slight_smile:

The better ideas are never the ones we think in first ^^

Well done :wink:

I’m thinking about adding the option to print program output to blenders python console instead of (or in addition to) the system console. Thoughts?

More en more better! A very good idea @wisaac407! :yes: +10!

Good idea indeed. Thanks :slight_smile:
In addition it is better :wink:

I just released beta version 0.4 which includes the ability to print program output to blenders python console (as well a few bug fixes, but those are kinda boring ;)).

Go check it out!

Actually, v0.4 has some bugs, use v0.4.1 instead :slight_smile:

Version 0.5 is out now, I feel like a stable release is just around the corner. But I really need people to test it and report bugs so that I can make the addon even better :slight_smile:

Thanks a ton everybody!

I do it just as easy:
I load a script into a text-window load a file, wichi is too open in external editor.
If I change the file externally and save it … the text windows shows a red icon, clicking and use reload --> OK thats it

By the way cant find the icon for your script , there are so many Properties … which one where?

You certainly could do that, but Script Watcher makes things happen a lot more seamless. Plus Script Watcher will handle multi-file projects, something that you’re method would have trouble with.

In the properties panel, under the scene properties you should be able to find the Script Watcher panel.

I just released version 0.6 I think it will be the last beta version before a stable release. It has some really cool new features that I think a lot of you are going to find useful!
And as always, please report any bugs you find or any feature suggestions you have.

Thanks guys, go check it out!

Ok, finally found and mini first example run perfectly … will test more later (version 0.5, upgrade, I will do a bit later)

Nice one,

have you thought about putting it in a panel in the text editor?

class ScriptWatcherPanel(bpy.types.Panel):
    """UI for the script watcher."""
    bl_label = "Script Watcher"
    bl_idname = "SCENE_PT_script_watcher"
    bl_space_type = 'TEXT_EDITOR'
    bl_region_type = 'UI'

I can see how that could be convenient. Not really sure if it would make sense though :confused:. I’d like to hear some other opinions on this.