Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Auto Reload #12

Open
Dene33 opened this issue Dec 10, 2018 · 3 comments
Open

Feature Request: Auto Reload #12

Dene33 opened this issue Dec 10, 2018 · 3 comments
Labels
enhancement New feature or request ideas wanted

Comments

@Dene33
Copy link

Dene33 commented Dec 10, 2018

Is there a live update functionality for this add-on? So after changing something in VSCode, changes also appear in Blender?

As I can see, there is no such a functionality. But reloading add-ons by hand are kinda awkward. Could you please add something like that?

As stated on github page of add-on for 2.8:

Execute the Blender: Reload Addons command. For that to work, Blender has to be started using the extension. Your addon does not need to support reloading itself. It only has to have correct register and unregister methods.

To reload the addon every time a file is saved, active the blender.addon.reloadOnSave setting in VS Code.

Something similar to reloadOnSave in VS would be really nice feature for this add-on. Hope to see that implemented, because this add-on is a must for developing in 2.79. Thank you!

@AlansCodeLog
Copy link
Owner

No, I will add it to the list of features to try and add when I have time (~ january), see #11. The thing is, if done from the Blender's side (aka my addon), you would have to tell it which addon to reload. With the blender_vscode extension, since it does it from VS Code's side, it knows what addon is open.

I will at the very least be adding an operator (which you can set to a shortcut) to easily reload an addon, but you would have to specify the name in the shortcut editor.

Another option might be to have it open a dropdown list of addons, then have a different hotkey for reloading the last selected from that dropdown.

I'm open to suggestions.

Note though that the extension is not really doing a live update, or at least, live update conveys to me "hot reload", and it's not doing that even though it might seem like it in the video because he's using a panel. It's doing a regular reload. Just want to clarify that. Don't want anyone getting confused.

@AlansCodeLog AlansCodeLog changed the title Live Update Feature Request: Auto Reload Dec 11, 2018
@AlansCodeLog AlansCodeLog added enhancement New feature or request ideas wanted labels Dec 11, 2018
@Dene33
Copy link
Author

Dene33 commented Dec 11, 2018

Thanks for clarifying all the stuff. Reload add-on with shortcut is kinda alright, but not the best way, because one needs to push button every time add-on is changed. So there is no way of automate it at the end? Any workarounds maybe? Anyway, thank you for this extension, I'll check it back in January.

@AlansCodeLog
Copy link
Owner

Sorry I wasn't clear. I meant at the very least I would add that. It should be possible to monitor a folder for file changes. The thing is you would still have to specify manually which addon to monitor.

Say you're developing two addons, A and B. You go to develop A, you specify to watch for changes for A (just by name, since it should be possible to get it's location from blender), but if you then switch to developing B, you would have to change it. Does that make sense?

The way the VS Code extension seems to work is it queries VS Code for open folders, then sends a message to blender to reload the corresponding extension/s. From blender, I would have no way of knowing which extension/s you're working on.

Another idea might be to provide a checklist of extensions, then you check which you want to watch and reload on changes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ideas wanted
Projects
None yet
Development

No branches or pull requests

2 participants