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
path: root/rigify
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2021-11-21 13:07:33 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-11-25 19:31:08 +0300
commit9030e2c6d1aca714c7122aa5b52bf2424ee4b880 (patch)
treea33438f85000e8d10aa366a97e50dff629d9e6e7 /rigify
parent67926641d14bba22db04e9e7f8c9e23fd58e4743 (diff)
Rigify: add options to change the layer for the finger IK control.
Diffstat (limited to 'rigify')
-rw-r--r--rigify/rigs/limbs/super_finger.py6
-rw-r--r--rigify/utils/layers.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/rigify/rigs/limbs/super_finger.py b/rigify/rigs/limbs/super_finger.py
index b50d54f9..a6e329bb 100644
--- a/rigify/rigs/limbs/super_finger.py
+++ b/rigify/rigs/limbs/super_finger.py
@@ -174,6 +174,8 @@ class Rig(SimpleChainRig):
bone.lock_rotation_w = True
bone.lock_scale = True, True, True
+ ControlLayersOption.EXTRA_IK.assign_rig(self, [self.bones.ctrl.ik])
+
@stage.configure_bones
def configure_ik_control_properties(self):
if self.make_ik:
@@ -379,6 +381,7 @@ class Rig(SimpleChainRig):
)
ControlLayersOption.TWEAK.add_parameters(params)
+ ControlLayersOption.EXTRA_IK.add_parameters(params)
@classmethod
def parameters_ui(self, layout, params):
@@ -393,6 +396,9 @@ class Rig(SimpleChainRig):
ControlLayersOption.TWEAK.parameters_ui(layout, params)
+ if params.make_extra_ik_control:
+ ControlLayersOption.EXTRA_IK.parameters_ui(layout, params)
+
#############################
# Finger FK to IK operator ##
#############################
diff --git a/rigify/utils/layers.py b/rigify/utils/layers.py
index bc5a8c56..27c67f0b 100644
--- a/rigify/utils/layers.py
+++ b/rigify/utils/layers.py
@@ -157,6 +157,12 @@ class ControlLayersOption:
ControlLayersOption.FK = ControlLayersOption('fk', description="Layers for the FK controls to be on")
ControlLayersOption.TWEAK = ControlLayersOption('tweak', description="Layers for the tweak controls to be on")
+ControlLayersOption.EXTRA_IK = ControlLayersOption(
+ 'extra_ik', toggle_default=False,
+ toggle_name="Extra IK Layers",
+ description="Layers for the optional IK controls to be on",
+)
+
# Layer parameters used by the super_face rig.
ControlLayersOption.FACE_PRIMARY = ControlLayersOption('primary', description="Layers for the primary controls to be on")
ControlLayersOption.FACE_SECONDARY = ControlLayersOption('secondary', description="Layers for the secondary controls to be on")