|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| quick script for plot to skeleton, plot to control rig
|
|
|
Hi guys, okay, does anyone know of a script whereby you can plot to control rig and back to skeleton in like a hotkey? I have to work with a lot of files, and find plotting laborious, unless you want to plot to all takes but thats overkill, and i have to use constraints in some takes and not in others so thats not an option.
Cheers.
|
|
|
|
It should be something like that (you need to select character in scene):
from pyfbsdk import *
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 = True
for lCharacter in FBSystem().Scene.Characters:
if lCharacter.Selected == True:
lCharacter.PlotAnimation (FBCharacterPlotWhere.kFBCharacterPlotOnSkeleton,lOptions )
lCharacter.PlotAnimation (FBCharacterPlotWhere.kFBCharacterPlotOnControlRig,lOptions )
PS. IMHO you should post this in Python section :)
|
|
|
|
ha, this is the first script I wrote, just found this post. I have quite similar way but without have to select the character. I haven’t put this script into production yet, if you found any mistake please let me know.
from pyfbsdk import *
myPlotOptions = FBPlotOptions () myPlotOptions.ConstantKeyReducerKeepOneKey = False
myPlotOptions.PlotAllTakes = False
myPlotOptions.PlotOnFrame = True
myPlotOptions.PlotPeriod = FBTime ( 0, 0, 0, 1 ) myPlotOptions.PlotTranslationOnRootOnly = False
myPlotOptions.PreciseTimeDiscontinuities = False
myPlotOptions.RotationFilterToApply = FBRotationFilter.kFBRotationFilterNone
myPlotOptions.UseConstantKeyReducer = False
TheChar = FBApplication().CurrentCharacter if TheChar.ActiveInput == True:
TheChar.PlotAnimation(FBCharacterPlotWhere.kFBCharacterPlotOnSkeleton, myPlotOptions)
else:
TheChar.PlotAnimation(FBCharacterPlotWhere.kFBCharacterPlotOnControlRig, myPlotOptions)
Then raise to my question I posted in the Python forum, how to assign a hotkey to this script?
|
|
|
|
cheers guys, yeah ive got that working now, awesome. Yeah having this in some hotkey would be awesome, but its still a lot better than my current workflow.
To plot onto skel and then back i just copied the script and re-pasted it into the same script and seems to work fine.
yeah, so… hot key anyone :)
|
|
|
|
I posted the answer in Python forum....remember you need to edit the scripts Plotting options above to your needs.
http://area.autodesk.com/for...t-to-python-script/#95952
|
|
|
|
|
|