mirror of
https://github.com/blender/blender-addons-contrib.git
synced 2025-08-20 14:13:00 +00:00
Extensions: support removing extensions installed from disk
This was possible to do with add-ons so support it for extensions too. Otherwise users are forced to navigate to the extension directory with a file manager and manually remove which is inconvenient.
This commit is contained in:
@ -1410,6 +1410,19 @@ class BlPkgPkgUninstall(Operator, _BlPkgCmdMixIn):
|
||||
|
||||
# Refresh installed packages for repositories that were operated on.
|
||||
from . import repo_cache_store
|
||||
|
||||
repo_item = _extensions_repo_from_directory(self.repo_directory)
|
||||
if repo_item.repo_url == "":
|
||||
# Re-generate JSON meta-data from TOML files (needed for offline repository).
|
||||
# NOTE: This could be slow with many local extensions,
|
||||
# we could simply remove the package that was uninstalled.
|
||||
repo_cache_store.refresh_remote_from_directory(
|
||||
directory=self.repo_directory,
|
||||
error_fn=self.error_fn_from_exception,
|
||||
force=True,
|
||||
)
|
||||
del repo_item
|
||||
|
||||
repo_cache_store.refresh_local_from_directory(
|
||||
directory=self.repo_directory,
|
||||
error_fn=self.error_fn_from_exception,
|
||||
|
Reference in New Issue
Block a user