[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3081] trunk/py/scripts/addons/mocap: Bugfixes after running regression tests (due to api changes)

Benjy Cook benjycook at hotmail.com
Sat Mar 10 19:07:19 CET 2012


Revision: 3081
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3081
Author:   benjycook
Date:     2012-03-10 18:07:13 +0000 (Sat, 10 Mar 2012)
Log Message:
-----------
Bugfixes after running regression tests (due to api changes)

Modified Paths:
--------------
    trunk/py/scripts/addons/mocap/__init__.py
    trunk/py/scripts/addons/mocap/retarget.py

Modified: trunk/py/scripts/addons/mocap/__init__.py
===================================================================
--- trunk/py/scripts/addons/mocap/__init__.py	2012-03-10 09:11:43 UTC (rev 3080)
+++ trunk/py/scripts/addons/mocap/__init__.py	2012-03-10 18:07:13 UTC (rev 3081)
@@ -21,11 +21,11 @@
 bl_info = {
     "name": "Motion Capture Tools",
     "author": "Benjy Cook",
-    "blender": (2, 5, 9),
+    "blender": (2, 6, 2),
     "location": "Object UI -> Mocap tools",
     "description": "Various tools for working with motion capture animation",
     "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Animation/Motion_Capture_Tools",
+    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Animation/Motion_Capture_Tools",
     "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=28321",
     "support": 'OFFICIAL',
     "category": "Animation"}
@@ -312,7 +312,7 @@
                     for bone in perf.bones:
                         footCol.prop(data=bone, property='foot', text='', icon='POSE_DATA')
                         nameCol.label(bone.name)
-                        mapCol.prop_search(bone, "map", enduser_arm, "bones")
+                        mapCol.prop_search(bone, "map", enduser_arm, "bones", text='')
                         selectCol.operator("mocap.selectmap", text='', icon='CURSOR').perf_bone = bone.name
                         label_mod = "FK"
                         if bone.map:
@@ -370,7 +370,7 @@
                         headerRow.operator("mocap.removeconstraint", text="", icon='X', emboss=False).constraint = i
                         if m_constraint.show_expanded:
                             box.separator()
-                            box.prop_search(m_constraint, 'constrained_bone', enduser_obj.pose, "bones", icon='BONE_DATA')
+                            box.prop_search(m_constraint, 'constrained_bone', enduser_obj.pose, "bones", icon='BONE_DATA',text='')
                             if m_constraint.type == "distance" or m_constraint.type == "point":
                                 box.prop_search(m_constraint, 'constrained_boneB', enduser_obj.pose, "bones", icon='CONSTRAINT_BONE')
                             frameRow = box.row()

Modified: trunk/py/scripts/addons/mocap/retarget.py
===================================================================
--- trunk/py/scripts/addons/mocap/retarget.py	2012-03-10 09:11:43 UTC (rev 3080)
+++ trunk/py/scripts/addons/mocap/retarget.py	2012-03-10 18:07:13 UTC (rev 3081)
@@ -307,7 +307,6 @@
 
 
 def IKRetarget(performer_obj, enduser_obj, s_frame, e_frame, scene, step):
-    bpy.ops.object.select_pattern(pattern=enduser_obj.name, extend=False)
     end_bones = enduser_obj.pose.bones
     for pose_bone in end_bones:
         ik_constraint = hasIKConstraint(pose_bone)
@@ -529,6 +528,10 @@
     print("Second pass: retargeting root translation and clean up")
     stride_bone = copyTranslation(performer_obj, enduser_obj, feetBones, root, s_frame, e_frame, scene, enduser_obj_mat)
     if not advanced:
+        print("hry")
+        bpy.ops.object.select_all(action='DESELECT')
+        bpy.context.scene.objects.active = enduser_obj
+        bpy.ops.object.select_pattern(pattern=enduser_obj.name, extend=False)
         IKRetarget(performer_obj, enduser_obj, s_frame, e_frame, scene, step)
         bpy.ops.object.select_pattern(pattern=stride_bone.name, extend=False)
     restoreObjMat(performer_obj, enduser_obj, perf_obj_mat, enduser_obj_mat, stride_bone, scene, s_frame)



More information about the Bf-extensions-cvs mailing list