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

Add option to install from local folder #29

Open
TheDuckCow opened this issue Jul 20, 2017 · 1 comment
Open

Add option to install from local folder #29

TheDuckCow opened this issue Jul 20, 2017 · 1 comment

Comments

@TheDuckCow
Copy link
Collaborator

Primarily useful for developers, create a configuration that allows reloading the addon from a local folder instead of from online. It may be useful to click inside the addon in blender directly to update code changes. This could be accomplished in a few ways, but an appropriate design may be:

  • If enabled, user pastes in a folderpath
    • This path is to the folder of the init file of where the code sits as it's being developed; need not be a git repo, but pretty much always would be I'd expect
  • Then from the install other/target option, you can select from the dropdown "Local" and press okay
    • Would be nice to even reduce those three clicks (button, dropdown, confirm) into just one without making to make weird UI choices
  • The addon then gets the list of python and resource files available in the blender addons folder, and does a comparison to the files in the target folder: if a file in /blender/addons/updater exists also in /devpath/updater/ then it will copy it over; this prevents the issue of copying .git folders or other files that perhaps you don't need in the target space
  • User would then still be advised to close/reopen blender, but they may also be able to get away with the "refresh" setting enabled.

Personally, I think this will be very useful! I hear there are some developers who already simply use the dev branch for reloading changes to test via committing to dev branch and reloading in blender, this would then be more direct meaning you don't have to push potentially broken code just to easily load into blender.

I'm sure there are also gists or snippets of python code out there for conveniently reloading addons, so perhaps something there could also be leveraged.

@ekaj2
Copy link
Contributor

ekaj2 commented Jun 23, 2018

My simple add-on: https://gitlab.com/integrity-sg/zip_addon_reloader may be of some use to you. It doesn't skip any files as you suggested, but once set up (which takes less than 5 minutes to download, install, and read the instructions from the wiki), you can update a zip add-on in 1 click.

Also, I recall that the "Code Autocomplete" add-on by Jacques Lucke had something similar built in, but I never bothered to look at that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants