diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2022-07-11 20:32:12 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2022-07-11 20:32:12 +0300 |
commit | d2325587d73bc825986af3a1baba51cb4a9ce355 (patch) | |
tree | e6fbdffa8e24c17648ab19e84a736b6428db78e4 /rigify/utils/widgets.py | |
parent | 6af061bc26e95caf534ee60d6848967d14b97d7b (diff) |
Rigify: fix T99352 - generation issues when same named rig is linked.
Only consider local datablocks when searching for the rig object,
widget collection and widget objects themselves during generation.
Diffstat (limited to 'rigify/utils/widgets.py')
-rw-r--r-- | rigify/utils/widgets.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rigify/utils/widgets.py b/rigify/utils/widgets.py index e02f3387..ca207ddc 100644 --- a/rigify/utils/widgets.py +++ b/rigify/utils/widgets.py @@ -86,6 +86,9 @@ def create_widget(rig, bone_name, bone_transform_name=None, *, widget_name=None, if not obj: # Search the scene by name obj = scene.objects.get(obj_name) + if obj.library: + local_objs = [obj for obj in scene.objects if obj.name == obj_name and not obj.library] + obj = local_objs[0] if local_objs else None if obj: # Record the generated widget |