[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38622] branches/soc-2011-pepper/release/ scripts/modules/retarget.py: NLA Track for custom user tweaks is now added after retargeting
Benjy Cook
benjycook at hotmail.com
Fri Jul 22 20:46:59 CEST 2011
Revision: 38622
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38622
Author: benjycook
Date: 2011-07-22 18:46:59 +0000 (Fri, 22 Jul 2011)
Log Message:
-----------
NLA Track for custom user tweaks is now added after retargeting
Modified Paths:
--------------
branches/soc-2011-pepper/release/scripts/modules/retarget.py
Modified: branches/soc-2011-pepper/release/scripts/modules/retarget.py
===================================================================
--- branches/soc-2011-pepper/release/scripts/modules/retarget.py 2011-07-22 18:46:13 UTC (rev 38621)
+++ branches/soc-2011-pepper/release/scripts/modules/retarget.py 2011-07-22 18:46:59 UTC (rev 38622)
@@ -21,6 +21,7 @@
import bpy
from mathutils import *
from math import radians, acos
+import cProfile
def hasIKConstraint(pose_bone):
@@ -44,6 +45,7 @@
end_bone = end_arm.bones[perf_bone.map]
newMap = end_bone.reverseMap.add()
newMap.name = perf_bone.name
+ end_bone.foot = perf_bone.foot
#root is the root of the enduser
root = end_arm.bones[0].name
@@ -386,6 +388,12 @@
constraintAction = bpy.data.actions.new("Mocap constraints")
constraintStrip = constraintTrack.strips.new("Mocap constraints", s_frame, constraintAction)
constraintStrip.extrapolation = "NOTHING"
+ userTrack = anim_data.nla_tracks.new()
+ userTrack.name = "Mocap manual fix"
+ userAction = bpy.data.actions.new("Mocap manual fix")
+ userStrip = userTrack.strips.new("Mocap manual fix", s_frame, userAction)
+ userStrip.extrapolation = "HOLD"
+ #userStrip.blend_type = "MULITPLY" - doesn't work due to work, will be activated soon
anim_data.nla_tracks.active = constraintTrack
anim_data.action = constraintAction
anim_data.action_extrapolation = "NOTHING"
@@ -414,6 +422,5 @@
NLASystemInitialize(enduser_obj, s_frame)
print("retargeting done!")
-
if __name__ == "__main__":
totalRetarget()
More information about the Bf-blender-cvs
mailing list