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:
Diffstat (limited to 'rigify/utils/naming.py')
-rw-r--r--rigify/utils/naming.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rigify/utils/naming.py b/rigify/utils/naming.py
index 0339e523..415dddaf 100644
--- a/rigify/utils/naming.py
+++ b/rigify/utils/naming.py
@@ -314,4 +314,12 @@ def choose_derived_bone(generator, original, subtype, *, by_owner=True, recursiv
if len(matching) > 0:
return matching[0]
+ # Try matching bones created by legacy rigs just by name - there is no origin data
+ from ..base_generate import LegacyRig
+
+ if isinstance(generator.bone_owners.get(direct), LegacyRig):
+ if not by_owner or generator.bone_owners.get(original) is generator.bone_owners[direct]:
+ assert direct in bones
+ return direct
+
return None