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:
authorNathan Vegdahl <cessen@cessen.com>2011-11-19 03:07:50 +0400
committerNathan Vegdahl <cessen@cessen.com>2011-11-19 03:07:50 +0400
commit5e44117da5a35882e7f3919f4c48c234acebe045 (patch)
tree488cee79390e8a769db68f654ba0141c6485768b /rigify
parent1bdfc7b8f1a8e749e442a2b9211f40bd8329402b (diff)
Rigify: fix for bug report #29298, basically just an update for API changes.
Diffstat (limited to 'rigify')
-rw-r--r--rigify/generate.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/rigify/generate.py b/rigify/generate.py
index 9cb022f0..8f5e012a 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -153,9 +153,26 @@ def generate_rig(context, metarig):
bone_gen.lock_location = tuple(bone.lock_location)
bone_gen.lock_scale = tuple(bone.lock_scale)
+ # rigify_type and rigify_parameters
+ bone_gen.rigify_type = bone.rigify_type
+ if len(bone.rigify_parameters) > 0:
+ bone_gen.rigify_parameters.add()
+ for prop in dir(bone_gen.rigify_parameters[0]):
+ if (not prop.startswith("_")) \
+ and (not prop.startswith("bl_")) \
+ and (prop != "rna_type"):
+ try:
+ setattr(bone_gen.rigify_parameters[0], prop, \
+ getattr(bone.rigify_parameters[0], prop))
+ except AttributeError:
+ print("FAILED TO COPY PARAMETER: " + str(prop))
+
# Custom properties
for prop in bone.keys():
- bone_gen[prop] = bone[prop]
+ try:
+ bone_gen[prop] = bone[prop]
+ except KeyError:
+ pass
# Constraints
for con1 in bone.constraints: