Created
June 13, 2015 06:48
-
-
Save leestuartx/1c2e42d163970be8200d to your computer and use it in GitHub Desktop.
Auto Plot all takes in MotionBuilder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyfbsdk import * | |
lSystem = FBSystem() | |
lTakeIdx = 1 | |
''' | |
Actual loop to move through takes | |
''' | |
for newTake in lSystem.Scene.Takes: | |
#Display next take | |
#print "current take is ", newTake.Name | |
#Open next take | |
lSystem.CurrentTake = newTake | |
#process next take | |
## Plot the character animation to skeleton | |
lcharactersList = FBSystem().Scene.Characters | |
lchar = lcharactersList[0] | |
print lchar.Name | |
lOptions = FBPlotOptions() | |
lOptions.ConstantKeyReducerKeepOneKey = True | |
lOptions.PlotAllTakes = False | |
lOptions.PlotOnFrame = True | |
lOptions.PlotPeriod = FBTime( 0, 0, 0, 1 ) | |
lOptions.PlotTranslationOnRootOnly = True | |
lOptions.PreciseTimeDiscontinuities = True | |
lOptions.RotationFilterToApply = FBRotationFilter.kFBRotationFilterGimbleKiller | |
lOptions.UseConstantKeyReducer = False | |
lchar.PlotAnimation (FBCharacterPlotWhere.kFBCharacterPlotOnSkeleton,lOptions ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment