diff --git a/characters/infantry/p10-rigging.blend b/characters/infantry/p10-rigging.blend index ac6c6b8..7dd9d68 100644 --- a/characters/infantry/p10-rigging.blend +++ b/characters/infantry/p10-rigging.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ccb051bb019ac4d3f0e3ddffedeeb5901585b147ca34b2914446b2a3721e60e -size 5679794 +oid sha256:2fe44e0dbab970f007aaeb9fb15904b7b1254821840138c49978b83f7e614c99 +size 5683322 diff --git a/pipeline/export_anims.py b/pipeline/export_anims.py index 8b5fd84..98f2eba 100644 --- a/pipeline/export_anims.py +++ b/pipeline/export_anims.py @@ -22,13 +22,23 @@ filePath = path[:pathPrefix] + 'export\\' + dirName + '\\anims_' + dirName + '_' # RIG MUST BE ACTIVE 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): armature.layers[i] = True 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.pose.select_all(action='SELECT') +bpy.ops.pose.constraints_clear() # Clear all constraints bpy.ops.pose.transforms_clear() # Clear all transforms # Export animations @@ -57,6 +67,7 @@ bpy.ops.export_scene.fbx( bake_anim_use_nla_strips = False, bake_anim_use_all_actions = True, bake_anim_force_startend_keying = True, + bake_anim_simplify_factor = 0.0, ) bpy.ops.pose.transforms_clear() # Clear all transforms