diff options
author | Benjy Cook <benjycook@hotmail.com> | 2011-07-05 14:57:29 +0400 |
---|---|---|
committer | Benjy Cook <benjycook@hotmail.com> | 2011-07-05 14:57:29 +0400 |
commit | 887fd19894047832fbb7a7300e5fc11438b1f3b2 (patch) | |
tree | 5a61a0a71183adcf85d8ce1aa637c4cf5f5ecb5f | |
parent | 04c03db6af7fbcd3a574021d759917778deb7dc9 (diff) |
Added access to denoising and new constraints functionality to UI script
-rw-r--r-- | release/scripts/startup/ui_mocap.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/release/scripts/startup/ui_mocap.py b/release/scripts/startup/ui_mocap.py index 71d291fd014..e6c7529be99 100644 --- a/release/scripts/startup/ui_mocap.py +++ b/release/scripts/startup/ui_mocap.py @@ -85,6 +85,10 @@ class MocapConstraint(bpy.types.PropertyGroup): subtype="XYZ", default=(0.0, 0.0, 0.0), description="Target of Constraint - Point", update=updateConstraint) + targetDist = bpy.props.FloatProperty(name="Dist", + default=1, + description="Distance Constraint - Desired distance", + update=updateConstraint) targetSpace = bpy.props.EnumProperty( items=[("WORLD", "World Space", "Evaluate target in global space"), ("LOCAL", "Object space", "Evaluate target in object space"), @@ -118,9 +122,12 @@ def toggleIKBone(self, context): #ik the whole chain up to the root, excluding chainLen = 0 for parent_bone in self.parent_recursive: - chainLen+=1 + chainLen += 1 if hasIKConstraint(parent_bone): break + deformer_children = [child for child in parent_bone.children if child.bone.use_deform] + if len(deformer_children) > 1: + break ik.chain_count = chainLen for bone in self.parent_recursive: if bone.is_in_ik_chain: @@ -168,6 +175,7 @@ def updateIKRetarget(): updateIKRetarget() + class MocapPanel(bpy.types.Panel): # Motion capture retargeting panel bl_label = "Mocap tools" @@ -260,6 +268,8 @@ class MocapConstraintsPanel(bpy.types.Panel): box.prop(m_constraint, 'targetSpace') if m_constraint.type == "point": targetPropCol.prop(m_constraint, 'targetPoint') + if m_constraint.type == "distance": + targetPropCol.prop(m_constraint, 'targetDist') checkRow = box.row() checkRow.prop(m_constraint, 'active') checkRow.prop(m_constraint, 'baked') @@ -299,6 +309,7 @@ class OBJECT_OT_DenoiseButton(bpy.types.Operator): bl_label = "Denoises sampled mocap data " def execute(self, context): + mocap_tools.denoise_median() return {"FINISHED"} @@ -347,4 +358,4 @@ def unregister(): bpy.utils.unregister_module(__name__) if __name__ == "__main__": - register()
\ No newline at end of file + register() |