[Bf-extensions-cvs] [3c160c6c] master: Rigify: force reloading rigs to prune the last deleted feature set.
Alexander Gavrilov
noreply at git.blender.org
Wed May 29 14:34:25 CEST 2019
Commit: 3c160c6cb3f14d3c2803317bf97d41159949da25
Author: Alexander Gavrilov
Date: Wed May 29 15:33:23 2019 +0300
Branches: master
https://developer.blender.org/rBA3c160c6cb3f14d3c2803317bf97d41159949da25
Rigify: force reloading rigs to prune the last deleted feature set.
===================================================================
M rigify/__init__.py
M rigify/feature_set_list.py
===================================================================
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 8bb09357..4374116f 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -127,14 +127,14 @@ class RigifyPreferences(AddonPreferences):
register()
- def update_external_rigs(self):
+ def update_external_rigs(self, force=False):
"""Get external feature sets"""
if self.legacy_mode:
return
set_list = feature_set_list.get_installed_list()
- if len(set_list) > 0:
+ if force or len(set_list) > 0:
# Reload rigs
print('Reloading external rigs...')
rig_lists.get_external_rigs(set_list)
diff --git a/rigify/feature_set_list.py b/rigify/feature_set_list.py
index fb7075eb..524363ad 100644
--- a/rigify/feature_set_list.py
+++ b/rigify/feature_set_list.py
@@ -221,7 +221,7 @@ class DATA_OT_rigify_remove_feature_set(bpy.types.Operator):
if os.path.exists(set_path):
rmtree(set_path)
- addon_prefs.update_external_rigs()
+ addon_prefs.update_external_rigs(force=True)
return {'FINISHED'}
def register():
More information about the Bf-extensions-cvs
mailing list