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:
authorBenjy Cook <benjycook@hotmail.com>2011-07-05 14:57:29 +0400
committerBenjy Cook <benjycook@hotmail.com>2011-07-05 14:57:29 +0400
commit887fd19894047832fbb7a7300e5fc11438b1f3b2 (patch)
tree5a61a0a71183adcf85d8ce1aa637c4cf5f5ecb5f /release/scripts
parent04c03db6af7fbcd3a574021d759917778deb7dc9 (diff)
Added access to denoising and new constraints functionality to UI script
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/ui_mocap.py15
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()