[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39273] branches/soc-2011-pepper/release/ scripts/modules/retarget.py: Fix for previous commit, now a fake user flag is added when switching between retargeted animations , so they don't get lost on save
Benjy Cook
benjycook at hotmail.com
Wed Aug 10 22:36:54 CEST 2011
Revision: 39273
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39273
Author: benjycook
Date: 2011-08-10 20:36:52 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
Fix for previous commit, now a fake user flag is added when switching between retargeted animations, so they don't get lost on save
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-08-10 20:12:27 UTC (rev 39272)
+++ branches/soc-2011-pepper/release/scripts/modules/retarget.py 2011-08-10 20:36:52 UTC (rev 39273)
@@ -275,6 +275,7 @@
#is there a stride_bone?
if "stride_bone" in bpy.data.objects:
stride_action = bpy.data.actions.new("Stride Bone " + action_name)
+ stride_action.use_fake_user = True
stride_bone = enduser_obj.parent
stride_bone.animation_data.action = stride_action
else:
@@ -410,6 +411,7 @@
constraintAction = bpy.data.actions[("Auto fixes " + name)]
else:
constraintAction = bpy.data.actions.new("Auto fixes " + name)
+ constraintAction.use_fake_user = True
constraintStrip = constraintTrack.strips.new("Auto fixes " + name, s_frame, constraintAction)
constraintStrip.extrapolation = "NOTHING"
userTrack = anim_data.nla_tracks.new()
@@ -419,6 +421,7 @@
userAction = bpy.data.actions[("Manual fixes " + name)]
else:
userAction = bpy.data.actions.new("Manual fixes " + name)
+ userAction.use_fake_user = True
userStrip = userTrack.strips.new("Manual fixes " + name, s_frame, userAction)
userStrip.extrapolation = "HOLD"
#userStrip.blend_type = "MULITPLY" - doesn't work due to work, will be activated soon
@@ -432,6 +435,7 @@
stride_bone.animation_data.action = bpy.data.actions[NLATracks.stride_action]
else:
NLATracks.stride_action = stride_bone.animation_data.action.name
+ stride_bone.animation_data.action.use_fake_user = True
anim_data.action = None
@@ -442,6 +446,7 @@
try:
enduser_obj.animation_data.action = bpy.data.actions.new("temp")
+ enduser_obj.animation_data.action.use_fake_user = True
except:
print("no need to create new action")
More information about the Bf-blender-cvs
mailing list