[Bf-extensions-cvs] [b9a821bf] master: Rigify: switch the human metarig from simple_tentacle to super_finger.
Alexander Gavrilov
noreply at git.blender.org
Sat Nov 2 10:00:30 CET 2019
Commit: b9a821bf6045f36c20c6a52f87a2f79e4bfde257
Author: Alexander Gavrilov
Date: Tue Oct 22 17:24:04 2019 +0300
Branches: master
https://developer.blender.org/rBAb9a821bf6045f36c20c6a52f87a2f79e4bfde257
Rigify: switch the human metarig from simple_tentacle to super_finger.
For better compatibility, support the Tweak layer assignment
in super_finger for the detail controls, and allow changing
the B-Bone resolution.
===================================================================
M rigify/metarigs/human.py
M rigify/rigs/basic/pivot.py
M rigify/rigs/chain_rigs.py
M rigify/rigs/experimental/super_chain.py
M rigify/rigs/limbs/limb_rigs.py
M rigify/rigs/limbs/simple_tentacle.py
M rigify/rigs/limbs/super_finger.py
M rigify/rigs/spines/basic_tail.py
===================================================================
diff --git a/rigify/metarigs/human.py b/rigify/metarigs/human.py
index c849303f..e4279982 100644
--- a/rigify/metarigs/human.py
+++ b/rigify/metarigs/human.py
@@ -70,10 +70,10 @@ def create(obj):
arm.rigify_layers[5].row = 5
arm.rigify_layers[5].selset = False
arm.rigify_layers[5].group = 6
- arm.rigify_layers[6].name = "Fingers (Tweak)"
+ arm.rigify_layers[6].name = "Fingers (Detail)"
arm.rigify_layers[6].row = 6
arm.rigify_layers[6].selset = False
- arm.rigify_layers[6].group = 4
+ arm.rigify_layers[6].group = 5
arm.rigify_layers[7].name = "Arm.L (IK)"
arm.rigify_layers[7].row = 7
arm.rigify_layers[7].selset = False
@@ -1964,7 +1964,7 @@ def create(obj):
pbone.rotation_mode = 'QUATERNION'
pbone.bone.layers = [True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
pbone = obj.pose.bones[bones['f_index.01.L']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -1980,7 +1980,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['thumb.01.L']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -1996,7 +1996,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_middle.01.L']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2012,7 +2012,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_ring.01.L']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2028,7 +2028,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_pinky.01.L']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2044,7 +2044,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_index.01.R']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2060,7 +2060,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['thumb.01.R']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2076,7 +2076,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_middle.01.R']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2092,7 +2092,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_ring.01.R']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
@@ -2108,7 +2108,7 @@ def create(obj):
except AttributeError:
pass
pbone = obj.pose.bones[bones['f_pinky.01.R']]
- pbone.rigify_type = 'limbs.simple_tentacle'
+ pbone.rigify_type = 'limbs.super_finger'
pbone.lock_location = (False, False, False)
pbone.lock_rotation = (False, False, False)
pbone.lock_rotation_w = False
diff --git a/rigify/rigs/basic/pivot.py b/rigify/rigs/basic/pivot.py
index d4c5898d..c0625c1a 100644
--- a/rigify/rigs/basic/pivot.py
+++ b/rigify/rigs/basic/pivot.py
@@ -85,13 +85,13 @@ class Rig(BaseRig):
params.make_extra_control = bpy.props.BoolProperty(
name = "Extra Control",
default = False,
- description = "Create an extended control"
+ description = "Create an optional control"
)
params.make_extra_deform = bpy.props.BoolProperty(
name = "Extra Deform",
default = False,
- description = "Create an extra deform bone"
+ description = "Create an optional deform bone"
)
diff --git a/rigify/rigs/chain_rigs.py b/rigify/rigs/chain_rigs.py
index 3f53cd69..fc070eb1 100644
--- a/rigify/rigs/chain_rigs.py
+++ b/rigify/rigs/chain_rigs.py
@@ -82,10 +82,10 @@ class SimpleChainRig(BaseRig):
@stage.generate_widgets
def make_control_widgets(self):
- for ctrl in self.bones.ctrl.fk:
- self.make_control_widget(ctrl)
+ for args in zip(count(0), self.bones.ctrl.fk):
+ self.make_control_widget(*args)
- def make_control_widget(self, ctrl):
+ def make_control_widget(self, i, ctrl):
create_bone_widget(self.obj, ctrl)
##############################
diff --git a/rigify/rigs/experimental/super_chain.py b/rigify/rigs/experimental/super_chain.py
index 9c34478d..c1e1f631 100644
--- a/rigify/rigs/experimental/super_chain.py
+++ b/rigify/rigs/experimental/super_chain.py
@@ -713,10 +713,10 @@ def add_parameters(params):
)
params.bbones = bpy.props.IntProperty(
- name='bbone segments',
- default=10,
- min=1,
- description='Number of segments'
+ name = 'B-Bone Segments',
+ default = 10,
+ min = 1,
+ description = 'Number of B-Bone segments'
)
params.wgt_offset = bpy.props.FloatProperty(
diff --git a/rigify/rigs/limbs/limb_rigs.py b/rigify/rigs/limbs/limb_rigs.py
index dee9a6f4..e09dfb7b 100644
--- a/rigify/rigs/limbs/limb_rigs.py
+++ b/rigify/rigs/limbs/limb_rigs.py
@@ -809,17 +809,17 @@ class BaseLimbRig(BaseRig):
)
params.segments = bpy.props.IntProperty(
- name = 'limb segments',
+ name = 'Limb Segments',
default = 2,
min = 1,
- description = 'Number of segments'
+ description = 'Number of limb segments'
)
params.bbones = bpy.props.IntProperty(
- name = 'bbone segments',
+ name = 'B-Bone Segments',
default = 10,
min = 1,
- description = 'Number of segments'
+ description = 'Number of B-Bone segments'
)
params.make_custom_pivot = bpy.props.BoolProperty(
diff --git a/rigify/rigs/limbs/simple_tentacle.py b/rigify/rigs/limbs/simple_tentacle.py
index 10bdd2b5..25d26e86 100644
--- a/rigify/rigs/limbs/simple_tentacle.py
+++ b/rigify/rigs/limbs/simple_tentacle.py
@@ -78,7 +78,7 @@ class Rig(TweakChainRig):
)
# Widgets
- def make_control_widget(self, ctrl):
+ def make_control_widget(self, i, ctrl):
create_circle_widget(self.obj, ctrl, radius=0.3, head_tail=0.5)
diff --git a/rigify/rigs/limbs/super_finger.py b/rigify/rigs/limbs/super_finger.py
index 1a9171a7..0b3fcd8a 100644
--- a/rigify/rigs/limbs/super_finger.py
+++ b/rigify/rigs/limbs/super_finger.py
@@ -24,11 +24,12 @@ import re
from itertools import count
from ...utils.errors import MetarigError
-from ...utils.bones import flip_bone, align_chain_x_axis
+from ...utils.bones import put_bone, flip_bone, align_chain_x_axis, set_bone_widget_transform
from ...utils.naming import make_derived_name
from ...utils.widgets import create_widget
from ...utils.widgets_basic import create_circle_widget
from ...utils.misc import map_list
+from ...utils.layers import ControlLayersOption
from ...base_rig import stage
@@ -40,7 +41,7 @@ class Rig(SimpleChainRig):
def initialize(self):
super().initialize()
- self.bbone_segments = 8
+ self.bbone_segments = self.params.bbones
self.first_parent = self.get_bone_parent(self.bones.org[0])
def prepare_bones(self):
@@ -116,6 +117,8 @@ class Rig(SimpleChainRig):
for args in zip(count(0), self.bones.ctrl.fk, self.bones.org + [None]):
self.configure_control_bone(*args)
+ ControlLayersOption.TWEAK.assign(self.params, self.obj, self.bones.ctrl.fk)
+
def configure_control_bone(self, i, ctrl, org):
if org:
self.copy_bone_properties(org, ctrl)
@@ -125,11 +128,13 @@ class Rig(SimpleChainRig):
bone.lock_rotation = (True, True, True)
bone.lock_scale = (True, True, True)
- def make_control_widget(self, ctrl):
+ def make_control_widget(self, i, ctrl):
if ctrl == self.bones.ctrl.fk[-1]:
# Tip control
create_circle_widget(self.obj, ctrl, radius=0.3, head_tail=0.0)
else:
+ set_bone_widget_transform(self.obj, ctrl, self.bones.org[i])
+
create_circle_widget(self.obj, ctrl, radius=0.3, head_tail=0.5)
##############################
@@ -234,11 +239,12 @@ class Rig(SimpleChainRig):
def configure_master_properties(self):
master = self.bones.ctrl.master
- self.make_property(master, 'finger_curve', 0.0, description="Rubber hose finger cartoon effect")
+ if self.bbone_segments > 1:
+ self.make_property(master, 'finger_cur
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list