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-08 13:31:07 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-12-08 13:31:07 +0300
commitb0361dcaac3034cde90a5c146e3ef3f07d226da9 (patch)
tree9dff4b37f71374882a2c8dbc1347018ce293e7d1 /rigify/generate.py
parent9bc98387d9edf988695e294bedaa152043a35de7 (diff)
Rigify: support choosing widgets out of a list in super_copy and pivot.
Register the most generic widgets in the list and add a few more. Use it to assign a nicer looking shoulder widget in human metarigs.
Diffstat (limited to 'rigify/generate.py')
-rw-r--r--rigify/generate.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/rigify/generate.py b/rigify/generate.py
index f1586873..613ef59f 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -262,13 +262,14 @@ class Generator(base_generate.BaseGenerator):
def __assign_layers(self):
- bones = self.obj.data.bones
+ pbones = self.obj.pose.bones
- bones[self.root_bone].layers = ROOT_LAYER
+ pbones[self.root_bone].bone.layers = ROOT_LAYER
# Every bone that has a name starting with "DEF-" make deforming. All the
# others make non-deforming.
- for bone in bones:
+ for pbone in pbones:
+ bone = pbone.bone
name = bone.name
layers = None
@@ -288,7 +289,7 @@ class Generator(base_generate.BaseGenerator):
bone.layers = layers
# Remove custom shapes from non-control bones
- bone.custom_shape = None
+ pbone.custom_shape = None
bone.bbone_x = bone.bbone_z = bone.length * 0.05