Run the plot_clear_properties.py script as explained in the following section to understand how to plot animation with different options such as, selected and unselected object, locked and unlocked channel, and others. It is important to understand the usage of locks that do not allow to plot on some channels. Running the script block by block makes it easier to understand what is plotted for the different lock status. You can download the plot_clear_properties.py script from http://area.autodesk.com/downloads/scripts/motionbuilder-animation-scripts.
Run Step#1 in the script to create a scene with a cube animation and a locked channel as shown in the following figure. The locked channel y is highlighted in red color in the left panel. It appears in gray color in the FCurve view (right panel).
Run Step#2 in the script to plot everything except the locked channel as shown in the following figure.
Run Step#3 in the script to plot everything as shown in the following figure.
Run Step#4 in the script to clear all animation except the locked channel as shown in the following figure.
Run Step#5 in the script to clear all animation including the locked channel as shown in the following figure.
Following are the points to keep in mind:
lSystem.CurrentTake.PlotTakeOnSelected(lOptions)
– Plots the selected objects with options like plot locked properties by setting lOptions.PlotLockedProperties
to True or False.lSystem.CurrentTake.ClearAllProperties(False)
– Clears animation for all properties in the current take except the locked ones. You can use lSystem.CurrentTake.ClearAllProperties(False, True)
to clear all animation including the locked ones.