As you might have seen on previous forums posts in past versions of MotionBuilder before 2014:
http://forums.autodesk.com/t5/Python/Plot-selected-properties/td-p/4029665
There was, for quite awhile, no way to pass PlotOptions into a function call to:
PlotTakeOnSelected()
- The only allowed arg was an FBTime
- The work around was to spawn a dummy character and "PlotAnimation" to pass in PlotOptions on
the plotting, and then delete it. I tried this and it didn't work 😞
--------------
Well huzzah! MB2014 now does allow you to pass in the options....except it doesn't do anything.
Unless I'm taking crazy pills here, I've clearly passed in my PlotOptions and yet they aren't applied when the animation plots. (Specifically UseConstantKeyReducer = False)
Here's a snippet of the code in a more generic form:
lOptions = FBPlotOptions () lOptions.ConstantKeyReducerKeepOneKey = False lOptions.PlotAllTakes = False lOptions.PlotOnFrame = False lOptions.PlotPeriod = FBTime ( 0, 0, 0, 1 ) lOptions.PlotTranslationOnRootOnly = False lOptions.PreciseTimeDiscontinuities = False #lOptions.RotationFilterToApply = FBRotationFilter.kFBRotationFilterGimbleKiller lOptions.UseConstantKeyReducer = False FBSystem().CurrentTake.PlotTakeOnSelected(lOptions )
After running, the Animation is plotted like normal default plotting with none of the options applied. Anyone know what's going on? Is this a MotionBuilder Bug?
This "should" work;)
what version of MotionBuilder are you using?
This code works almost daily for me in MoBu 2018:
# Set Plot Options
plotOptions = FBPlotOptions()
plotOptions.ConstantKeyReducerKeepOneKey = True
plotOptions.PlotAllTakes = False
plotOptions.PlotOnFrame = True
plotOptions.PlotPeriod = FBTime( 0, 0, 0, 1 )
plotOptions.PlotTranslationOnRootOnly = True
plotOptions.PreciseTimeDiscontinuities = True
plotOptions.RotationFilterToApply = FBRotationFilter.kFBRotationFilterUnroll
plotOptions.UseConstantKeyReducer = False
# Get Current Take
currentTake = FBSystem().CurrentTake
# Plot Current Take
currentTake.PlotTakeOnSelected( plotOptions )
let me know if you have better luck with this,
Can't find what you're looking for? Ask the community or share your knowledge.