Fix cyclic dependencies on Infantry rig, animation export does destructive bake, disable animation optimization
This commit is contained in:
parent
1a0fa59eb6
commit
5be2218a72
BIN
characters/infantry/p10-rigging.blend
(Stored with Git LFS)
BIN
characters/infantry/p10-rigging.blend
(Stored with Git LFS)
Binary file not shown.
@ -22,13 +22,23 @@ filePath = path[:pathPrefix] + 'export\\' + dirName + '\\anims_' + dirName + '_'
|
|||||||
|
|
||||||
# RIG MUST BE ACTIVE
|
# RIG MUST BE ACTIVE
|
||||||
armature = bpy.context.active_object.data
|
armature = bpy.context.active_object.data
|
||||||
# Set all bone layers, but not mechanical bones, to be visible
|
# Set all bone layers, INCLUDING mechanical bones, to be visible
|
||||||
for i in range(0, 29):
|
for i in range(0, 29):
|
||||||
armature.layers[i] = True
|
armature.layers[i] = True
|
||||||
for i in range(29,32):
|
for i in range(29,32):
|
||||||
armature.layers[i] = False
|
armature.layers[i] = True
|
||||||
|
|
||||||
|
# Use BoneJuice to bake down all actions
|
||||||
|
bpy.ops.bj.anim_bakeall()
|
||||||
|
|
||||||
|
# Make armature local so we can clear all constraints
|
||||||
|
bpy.ops.object.mode_set(mode='OBJECT')
|
||||||
|
bpy.ops.object.make_local(type='SELECT_OBDATA')
|
||||||
|
|
||||||
|
# Clear all posing and pose constraints
|
||||||
bpy.ops.object.mode_set(mode='POSE') # Enter pose mode
|
bpy.ops.object.mode_set(mode='POSE') # Enter pose mode
|
||||||
|
bpy.ops.pose.select_all(action='SELECT')
|
||||||
|
bpy.ops.pose.constraints_clear() # Clear all constraints
|
||||||
bpy.ops.pose.transforms_clear() # Clear all transforms
|
bpy.ops.pose.transforms_clear() # Clear all transforms
|
||||||
|
|
||||||
# Export animations
|
# Export animations
|
||||||
@ -57,6 +67,7 @@ bpy.ops.export_scene.fbx(
|
|||||||
bake_anim_use_nla_strips = False,
|
bake_anim_use_nla_strips = False,
|
||||||
bake_anim_use_all_actions = True,
|
bake_anim_use_all_actions = True,
|
||||||
bake_anim_force_startend_keying = True,
|
bake_anim_force_startend_keying = True,
|
||||||
|
bake_anim_simplify_factor = 0.0,
|
||||||
)
|
)
|
||||||
|
|
||||||
bpy.ops.pose.transforms_clear() # Clear all transforms
|
bpy.ops.pose.transforms_clear() # Clear all transforms
|
||||||
|
Loading…
Reference in New Issue
Block a user