Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-12-05 18:59:13 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-12-07 14:11:53 +0300
commitc93dc355888ec2f9a4376ad6cf0422277c69d565 (patch)
treecb30669758c2c036c3819b9fecca0a8ef4c5219d /rigify/ui.py
parent53bfa6c93a17b6fa6bcc19f86c3c8df17cb57c5c (diff)
Rigify: keep custom widgets already assigned in metarig.
Also make error handling more robust and extend constraint relink mixin.
Diffstat (limited to 'rigify/ui.py')
-rw-r--r--rigify/ui.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rigify/ui.py b/rigify/ui.py
index 0ed1f1a2..49c11aaf 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -608,10 +608,10 @@ class BONE_PT_rigify_buttons(bpy.types.Panel):
if rig_name != "":
try:
rig = rig_lists.rigs[rig_name]['module']
- except (ImportError, AttributeError):
+ except (ImportError, AttributeError, KeyError):
row = layout.row()
box = row.box()
- box.label(text="ALERT: type \"%s\" does not exist!" % rig_name)
+ box.label(text="ERROR: type \"%s\" does not exist!" % rig_name, icon='ERROR')
else:
if hasattr(rig.Rig, 'parameters_ui'):
rig = rig.Rig
@@ -828,7 +828,7 @@ class Sample(bpy.types.Operator):
try:
rig = rig_lists.rigs[self.metarig_type]["module"]
create_sample = rig.create_sample
- except (ImportError, AttributeError):
+ except (ImportError, AttributeError, KeyError):
raise Exception("rig type '" + self.metarig_type + "' has no sample.")
else:
create_sample(context.active_object)