Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-12-09 15:36:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-09 15:36:13 +0300
commitd6c583cc540257aeb516471fd724d79efc63ad11 (patch)
treee3dd80867b99dfc325c0f00d7e724582e73164cc /release
parent0e713ba1d01c6bca4052b19f72045415cd6fea70 (diff)
- use the bone that the type was set for automatic assigned blending property (when blending 2 chains)
- delete the type property from the generated rig so running again wont confuse things
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/rigify/__init__.py13
-rw-r--r--release/scripts/modules/rigify/arm.py2
-rw-r--r--release/scripts/modules/rigify/leg.py2
3 files changed, 12 insertions, 5 deletions
diff --git a/release/scripts/modules/rigify/__init__.py b/release/scripts/modules/rigify/__init__.py
index 09a17dffdd4..d4c0169bfbd 100644
--- a/release/scripts/modules/rigify/__init__.py
+++ b/release/scripts/modules/rigify/__init__.py
@@ -429,10 +429,17 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
# inspect all bones and assign their definitions before modifying
for pbone in obj.pose.bones:
bone_name = pbone.name
- bone_type = obj.pose.bones[bone_name].get("type", "")
- bone_type_list = [bt for bt in bone_type.replace(",", " ").split()]
+ bone_type = pbone.get("type", "")
+ if bone_type:
+ bone_type_list = [bt for bt in bone_type.replace(",", " ").split()]
+
+ # not essential but means running autorig again wont do anything
+ del pbone["type"]
+ else:
+ bone_type_list = []
for bone_type in bone_type_list:
+
type_pair = bone_type.split(".")
# 'leg.ik' will look for an ik function in the leg module
@@ -500,7 +507,7 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
definition = bone_def_dict[submod_name]
if len(result_submod) == 2:
- blend_bone_list(obj, definition, result_submod[0], result_submod[1])
+ blend_bone_list(obj, definition, result_submod[0], result_submod[1], target_bone=bone_name)
if META_DEF:
diff --git a/release/scripts/modules/rigify/arm.py b/release/scripts/modules/rigify/arm.py
index 0823f8ad331..d3cdd22dc4a 100644
--- a/release/scripts/modules/rigify/arm.py
+++ b/release/scripts/modules/rigify/arm.py
@@ -245,4 +245,4 @@ def main(obj, bone_definition, base_names):
bones_fk = fk(obj, bone_definition, base_names)
bpy.ops.object.mode_set(mode='OBJECT')
- blend_bone_list(obj, bone_definition, bones_ik, bones_fk)
+ blend_bone_list(obj, bone_definition, bones_ik, bones_fk, target_bone=bone_definition[1])
diff --git a/release/scripts/modules/rigify/leg.py b/release/scripts/modules/rigify/leg.py
index f38b27c63de..55f8fb9cf74 100644
--- a/release/scripts/modules/rigify/leg.py
+++ b/release/scripts/modules/rigify/leg.py
@@ -338,4 +338,4 @@ def main(obj, bone_definition, base_names):
bones_fk = fk(obj, bone_definition, base_names)
bpy.ops.object.mode_set(mode='OBJECT')
- blend_bone_list(obj, bone_definition, bones_ik, bones_fk)
+ blend_bone_list(obj, bone_definition, bones_ik, bones_fk, target_bone=bone_definition[1])