Skip to content

Commit

Permalink
Merge pull request #28 from DotBow/master
Browse files Browse the repository at this point in the history
Blender addon_enable API changes.
  • Loading branch information
JacquesLucke committed Mar 6, 2019
2 parents 8f14685 + 49f1e4c commit 6c18257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pythonFiles/include/blender_vscode/load_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setup_addon_links(addon_paths):
def load(addon_paths):
for addon_path in addon_paths:
try:
bpy.ops.wm.addon_enable(module=addon_path.name)
bpy.ops.preferences.addon_enable(module=addon_path.name)
except:
traceback.print_exc()
send_dict_as_json({"type" : "enableFailure", "addonPath" : str(addon_path)})
Expand Down
4 changes: 2 additions & 2 deletions pythonFiles/include/blender_vscode/operators/addon_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UpdateAddonOperator(bpy.types.Operator):

def execute(self, context):
try:
bpy.ops.wm.addon_disable(module=self.module_name)
bpy.ops.preferences.addon_disable(module=self.module_name)
except:
traceback.print_exc()
send_dict_as_json({"type" : "disableFailure"})
Expand All @@ -24,7 +24,7 @@ def execute(self, context):
del sys.modules[name]

try:
bpy.ops.wm.addon_enable(module=self.module_name)
bpy.ops.preferences.addon_enable(module=self.module_name)
except:
traceback.print_exc()
send_dict_as_json({"type" : "enableFailure"})
Expand Down

0 comments on commit 6c18257

Please sign in to comment.