Hi all,
I want to make a "PlotAll" on file loaded with the script and it doesn't work.
When I launch the script on a already loaded file it works but when i load the file with the script it doesn't work.
This code doesn't works :
lApp.FileOpen(lApp.FBXFileName, False, loadOptions)
character = FBApplication().CurrentCharacter
lStory = FBStory()
for comp in lSystem.Scene.Components:
if comp.ClassName() in ["FBModelSkeleton","FBConstraint", "FBCharacter","FBCharacterExtension","FBModel"] :
#print comp.ClassName()
comp.Selected = True
currentTake = lSystem.CurrentTake
currentTake.PlotAllTakesOnSelected(FBTime(0,0,0,1))
If I delete the OpenFile Line and plot the current OpenFile it works.
Do you have some clues?
Thanks
Hello,
The line of code - lApp.FBXFileName - re-opens the current file. It also relies on the current file having been saved. Which is why it only works on an already loaded file.
If your file isn't saved, or you don't have a saved file open, it'll crash.
To work around this you'll have to either specify a file to open before plotting or iterate though a file/folder/list of files.
The Anti-Fish
Can't find what you're looking for? Ask the community or share your knowledge.