Closed MediaMoots closed 2 years ago
Made a script to retarget all Armatures in the Source
collection to the Armature in the Target
collection.
Make sure to first set the bone name retargets on a sample animation, then save that list.
import bpy
targetCollection = bpy.data.collections['Target']
targetArmature = targetCollection.objects['Armature']
sourceCollection = bpy.data.collections['Source']
sourceArmatures = sourceCollection.objects
for src in sourceArmatures:
try:
if src.type == 'ARMATURE':
bpy.data.scenes["Scene"].rsl_retargeting_armature_target = targetArmature
bpy.data.scenes["Scene"].rsl_retargeting_armature_source = src
bpy.ops.rsl.build_bone_list()
bpy.ops.rsl.retarget_animation()
except:
print('Error')
pass
I have a bunch of FBX animations (100~) that I would like to retarget, would it be possible to make a batch retarget feature?
Thanks.