From fb23ec0c0bbfd5fcc208aa6729d42121adba9a49 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 8 Sep 2019 21:56:45 +0300 Subject: Fix T68856: rigify adds widgets to the wrong collection. Patch suggested by @pioverfour. --- rigify/utils/widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rigify/utils/widgets.py b/rigify/utils/widgets.py index 85b81cff..fad1065a 100644 --- a/rigify/utils/widgets.py +++ b/rigify/utils/widgets.py @@ -22,6 +22,7 @@ import bpy import math from .errors import MetarigError +from .collections import ensure_widget_collection WGT_PREFIX = "WGT-" # Prefix for widget objects @@ -65,7 +66,7 @@ def create_widget(rig, bone_name, bone_transform_name=None): obj_name = WGT_PREFIX + rig.name + '_' + bone_name scene = bpy.context.scene - collection = bpy.context.collection + collection = ensure_widget_collection(bpy.context) # Check if it already exists in the scene if obj_name in scene.objects: -- cgit v1.2.3