That works! Thank you so much.
I'm trying to load a new scene and import a Character Rig and then have my animations load on to it, the problem now is the script is asking me to load the animations before the scene gets merged and i get a "no character in scene error".
The script is wrote as:
#Clear Scene and Merge in new Ctrl Rig
# New Scene
lfbApp.FileNew()
# Import our target Control rig
lfbMergeFilePath = r'the path to my CharacterRig.fbx'
#The name of the take used as source
lfbTakeSource = 'Take Source'
#The name of the take where the data must be imported
lfbTakeDest = 'Take 001'
#Init the FbxOptions
lfbMergeOptions = FBFbxOptions(True, lfbMergeFilePath)
#Disable base camera, camera switcher ...
lfbMergeOptions.BaseCameras = False
lfbMergeOptions.CameraSwitcherSettings = False
lfbMergeOptions.GlobalLightingSettings = False
lfbMergeOptions.CurrentCameraSettings = False
#Ensure that transport setting is enable. This elements contain the timeline parameters.
lfbMergeOptions.TransportSettings = False
#Pass thru all the takes to find the source take and change the destination and
#disable all the rest
lfbMergeTakeCount = lfbMergeOptions.GetTakeCount()
for i in range(lfbMergeTakeCount):
lfbMergeTakeName = lfbMergeOptions.GetTakeName(i)
if lfbMergeTakeName == lfbTakeSource:
lfbMergeOptions.SetTakeDestinationName(i, lfbTakeDest)
else:
lfbMergeOptions.SetTakeSelect(i, False)
#Set Name Space
lfbMergeOptions.NamespaceList = "the name space i want"
# Dissable merge popup window
lfbMergeOptions.ShowOptionsDialog = False
# Add to current scene
FBApplication().FileAppend(lfbMergeFilePath, True, lfbMergeOptions)
del (lfbMergeFilePath, lfbTakeSource, lfbTakeDest, lfbMergeOptions, lfbMergeTakeCount)
# Load Animation
lfbFbxOptions = FBFbxOptions( True )
lfbFbxOptions.TransferMethod = FBCharacterLoadAnimationMethod.kFBCharacterLoadCopy
lfbFbxOptions.ProcessAnimationOnExtension = False
lfbFbxOptions.ShowOptionsDialog = False
lfbPlotOptions = FBPlotOptions()
FBApplication().LoadAnimationOnCharacter( lfbSaveChrAnim, lfbApp.CurrentCharacter, lfbFbxOptions, lfbPlotOptions )
Any help would be greatly appreciated, thank you.