FBTake Class Reference


Detailed Description

A take is a container for animation in a scene.

A take stores data about animation for objects. The transport controls (FBPlayerControl) act on the current take.

In the UI transport controls, a take's start and end determine when the Timeline indicator starts and stops.

You get the current take with FBSystem.CurrentTake, as in the following Python sample:

    for myTake in FBSystem().Scene.Takes:
        print myTake.Name

To create a take and have it accessible in the Transport control you could use CopyTake (called Duplicate in the UI):

Python sample code:

    from pyfbsdk import *    
    newTake = FBSystem().CurrentTake.CopyTake("my new take name")

C++ sample code:

    FBTake* lTake = FBSystem::ThenOne().CurrentTake->CopyTake( "my new take" );    

Or simply create a new empty take like the following:

Python sample code:

    from pyfbsdk import *    
    newTake = FBTake("my new take name")
    FBSystem().Scene.Takes.append(newTake)

C++ sample code:

    FBSystem::TheOne()::Scene.Takes.Add( new FBTake( "my new take" ));
Examples
Tasks/ExportAnimationLibrary.py, Tasks/GoToNextTake.py, Tasks/GoToPreviousTake.py, Tasks/MirrorPoseOverTime.py, Tasks/MultiLayerKeying.py, Tasks/RenameFirstTakeOnMultipleFiles.py, Tasks/SaveOneTakePerFile.py, Tasks/TimeCodeKeying.py
Inheritance diagram for FBTake:

List of all members.

Public Member Functions

 __init__ (str pName, object pObject=None)
 Constructor.
 FBDelete ()
 Deletion method.
FBTake CopyTake (str pNewTakeName)
 Copy the take.
 CreateNewLayer ()
 Create a new layer.
 RemoveLayer (int pLayerIndex)
 Remove a layer.
FBAnimationLayer GetLayer (int pLayerIndex)
 Get the layer object that have the specified ID.
FBAnimationLayer GetLayerByName (str pName)
 Get the layer object that have the specified name.
 SetCurrentLayer (int pLayerIndex)
 Set the current layer for the take.
int GetCurrentLayer ()
 Get the current layer for the take.
int GetLayerCount ()
 Get the layer count.
bool MoveCurrentLayerUp ()
 Move the current layer up, similar to using the button to move the layer in the Animation Layer tool.
bool MoveCurrentLayerDown ()
 Move the current layer down, similar to using the button to move the layer in the Animation Layer tool.
 DuplicateSelectedLayers ()
 Duplicate the selected layers.
 MergeLayers (FBAnimationLayerMergeOptions pMergeOptions, bool pDeleteMergedLayers, FBMergeLayerMode pMergeMode, bool pMergeLockedProperties=False)
 Merge the selected layers.
 PlotTakeOnSelected (FBPlotOptions pPlotOptions)
 Plot the animation on selected models.
 PlotTakeOnSelectedProperties (FBPlotOptions pPlotOptions)
 Plot the animation on selected properties.
 PlotTakeOnSelected (FBTime pPlotPeriod)
 Plot the animation on selected models.
 PlotAllTakesOnSelected (FBTime pPlotPeriod)
 Plot the animation on selected models for all takes.
 PlotTakeOnSelectedProperties (FBTime pPlotPeriod)
 Plot the animation on selected properties.
 PlotAllTakesOnSelectedProperties (FBTime pPlotPeriod)
 Plot the animation on selected properties for all takes.
 ClearAllProperties (bool pOnSelectedObjectsOnly, bool pOnLockedProperties=False)
 Clear the animation on all the properties.
 ClearAllPropertiesOnCurrentLayer ()
 Clear all the animation on the current layer.

Public Attributes

FBPropertyBase ReferenceTimeSpan
 Read Write Property: Reference time span.
FBPropertyBase LocalTimeSpan
 Read Write Property: Local time span.
FBPropertyString Comments
 Read Write Property: Take comments.

Member Function Documentation

FBDelete ( )

Deletion method.

Using this method to delete the take insure that the destruction process follows the same path as if the GUI had been used.

Examples
Tasks/DeleteHierarchy.py

Reimplemented from FBComponent.

FBTake CopyTake ( str  pNewTakeName)

Copy the take.

Will create a copy of the current take, with the current take data. This is analogous to creating a new take, and copying the current take data into it. The Layers data and the TimeWarp date will be copied. The newly created take will be set as the current take. The newly created take is automatically added to the scene and available in the Transport control.

Parameters:
pNewTakeNameThe name for the new take.
Returns:
Handle to the newly created take.
CreateNewLayer ( )

Create a new layer.

RemoveLayer ( int  pLayerIndex)

Remove a layer.

Parameters:
pLayerIndexLayer with at the specified index will be removed.
FBAnimationLayer GetLayer ( int  pLayerIndex)

Get the layer object that have the specified ID.

Parameters:
pLayerIndexThe index of the layer that will be returned.
Returns:
Layer with the specified ID.
FBAnimationLayer GetLayerByName ( str  pName)

Get the layer object that have the specified name.

Parameters:
pNameThe name of the animation layer to get.
Returns:
Layer with the specified name or NULL if no layer has been found.
SetCurrentLayer ( int  pLayerIndex)

Set the current layer for the take.

Parameters:
pLayerIndexThe layer index to be set as the current one.
int GetCurrentLayer ( )

Get the current layer for the take.

Returns:
The current layer index.
int GetLayerCount ( )

Get the layer count.

Returns:
The layer count.
bool MoveCurrentLayerUp ( )

Move the current layer up, similar to using the button to move the layer in the Animation Layer tool.

Use the SetCurrentLayer to specify the current layer.

Returns:
True if successful.
bool MoveCurrentLayerDown ( )

Move the current layer down, similar to using the button to move the layer in the Animation Layer tool.

Use the SetCurrentLayer to specify the current layer.

Returns:
True if successful.
DuplicateSelectedLayers ( )

Duplicate the selected layers.

This is equivalent of doing a copy-paste.

MergeLayers ( FBAnimationLayerMergeOptions  pMergeOptions,
bool  pDeleteMergedLayers,
FBMergeLayerMode  pMergeMode,
bool  pMergeLockedProperties = False 
)

Merge the selected layers.

This is equivalent of pressing the merge button in the Animation Layer editor.

Parameters:
pMergeOptionsIndicate which objects, layers and properties (selected or all) should be merged.
pDeleteMergedLayersThe source layer will be deleted after the merge if no animation is left on those layers, or if those layers are not parent of another layer.
pMergeModeSet the layer mode of the resulting layer, if possible (the BaseAnimation layer cannot be modified).
pMergeLockedPropertiesThe properties will be merged even if they are locked.
PlotTakeOnSelected ( FBPlotOptions  pPlotOptions)

Plot the animation on selected models.

Will plot the animation of the take in question on the selected models in the scene.

Parameters:
pPlotOptionsOption parameters for plotting
PlotTakeOnSelectedProperties ( FBPlotOptions  pPlotOptions)

Plot the animation on selected properties.

Will plot the animation of the take in question on the selected properties in the scene.

Parameters:
pPlotOptionsOption parameters for plotting
PlotTakeOnSelected ( FBTime  pPlotPeriod)

Plot the animation on selected models.

Will plot the animation of the take in question on the selected models in the scene.

Parameters:
pPlotPeriodPeriod for the plot.
PlotAllTakesOnSelected ( FBTime  pPlotPeriod)

Plot the animation on selected models for all takes.

Will plot the animation for all takes on the selected models in the scene.

Parameters:
pPlotPeriodPeriod for the plot.
PlotTakeOnSelectedProperties ( FBTime  pPlotPeriod)

Plot the animation on selected properties.

Will plot the animation of the take in question on the selected properties in the scene.

Parameters:
pPlotPeriodPeriod for the plot.
PlotAllTakesOnSelectedProperties ( FBTime  pPlotPeriod)

Plot the animation on selected properties for all takes.

Will plot the animation for all takes on the selected properties in the scene.

Parameters:
pPlotPeriodPeriod for the plot.
ClearAllProperties ( bool  pOnSelectedObjectsOnly,
bool  pOnLockedProperties = False 
)

Clear the animation on all the properties.

Parameters:
pOnSelectedObjectsOnlySpecify if clear will be performed on all objects or only on the one that are currently selected.
pOnLockedPropertiesSpecify if clear will be performed on locked properties as well.
ClearAllPropertiesOnCurrentLayer ( )

Clear all the animation on the current layer.


Member Data Documentation

FBPropertyBase ReferenceTimeSpan

Read Write Property: Reference time span.

FBPropertyBase LocalTimeSpan

Read Write Property: Local time span.

Read Write Property: Take comments.


FBTake FBTake FBTake FBTake FBTake FBTake FBTake FBTake FBTake FBTake
FBTake FBTake FBTake FBTake FBTake FBTake FBTake FBTake FBTake FBTake