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:
authorNathan Vegdahl <cessen@cessen.com>2013-02-15 19:14:24 +0400
committerNathan Vegdahl <cessen@cessen.com>2013-02-15 19:14:24 +0400
commita2b35fb7cca524a9027db863f00fe90d7c15c04f (patch)
treefb73e9a3bc80d87dda7e95cafb593da3fa3c20a2 /rigify/rigs/basic
parent3b3ee36a1d0bce6529b19af4510757b43ee0c846 (diff)
Bunch of bug fixes.
The biggest fixes relate to keeping ID data modification out of draw methods. This was breaking Rigify with the current API. Secondary fix was to move widget meshes to match the bones, even if the widget meshes already exist. It's nice for when the user is progressively tweaking the metarig.
Diffstat (limited to 'rigify/rigs/basic')
-rw-r--r--rigify/rigs/basic/copy.py9
-rw-r--r--rigify/rigs/basic/copy_chain.py9
2 files changed, 8 insertions, 10 deletions
diff --git a/rigify/rigs/basic/copy.py b/rigify/rigs/basic/copy.py
index a961a71a..be04830b 100644
--- a/rigify/rigs/basic/copy.py
+++ b/rigify/rigs/basic/copy.py
@@ -83,18 +83,18 @@ class Rig:
create_bone_widget(self.obj, bone)
@classmethod
- def add_parameters(self, group):
+ def add_parameters(self, params):
""" Add the parameters of this rig type to the
RigifyParameters PropertyGroup
"""
- group.make_control = bpy.props.BoolProperty(name="Control", default=True, description="Create a control bone for the copy")
- group.make_deform = bpy.props.BoolProperty(name="Deform", default=True, description="Create a deform bone for the copy")
+ params.make_control = bpy.props.BoolProperty(name="Control", default=True, description="Create a control bone for the copy")
+ params.make_deform = bpy.props.BoolProperty(name="Deform", default=True, description="Create a deform bone for the copy")
@classmethod
def parameters_ui(self, layout, obj, bone):
""" Create the ui for the rig parameters.
"""
- params = obj.pose.bones[bone].rigify_parameters[0]
+ params = obj.pose.bones[bone].rigify_parameters
r = layout.row()
r.prop(params, "make_control")
@@ -127,7 +127,6 @@ class Rig:
pbone.lock_rotation_w = False
pbone.lock_scale = (False, False, False)
pbone.rotation_mode = 'QUATERNION'
- pbone.rigify_parameters.add()
bpy.ops.object.mode_set(mode='EDIT')
for bone in arm.edit_bones:
diff --git a/rigify/rigs/basic/copy_chain.py b/rigify/rigs/basic/copy_chain.py
index eaff060f..4b4f0c85 100644
--- a/rigify/rigs/basic/copy_chain.py
+++ b/rigify/rigs/basic/copy_chain.py
@@ -122,18 +122,18 @@ class Rig:
create_bone_widget(self.obj, bone)
@classmethod
- def add_parameters(self, group):
+ def add_parameters(self, params):
""" Add the parameters of this rig type to the
RigifyParameters PropertyGroup
"""
- group.make_controls = bpy.props.BoolProperty(name="Controls", default=True, description="Create control bones for the copy")
- group.make_deforms = bpy.props.BoolProperty(name="Deform", default=True, description="Create deform bones for the copy")
+ params.make_controls = bpy.props.BoolProperty(name="Controls", default=True, description="Create control bones for the copy")
+ params.make_deforms = bpy.props.BoolProperty(name="Deform", default=True, description="Create deform bones for the copy")
@classmethod
def parameters_ui(self, layout, obj, bone):
""" Create the ui for the rig parameters.
"""
- params = obj.pose.bones[bone].rigify_parameters[0]
+ params = obj.pose.bones[bone].rigify_parameters
r = layout.row()
r.prop(params, "make_controls")
@@ -180,7 +180,6 @@ class Rig:
pbone.lock_rotation_w = False
pbone.lock_scale = (False, False, False)
pbone.rotation_mode = 'QUATERNION'
- pbone.rigify_parameters.add()
pbone = obj.pose.bones[bones['bone.02']]
pbone.rigify_type = ''
pbone.lock_location = (False, False, False)