Python Reference Guide
 
Loading...
Searching...
No Matches
FBFilter Class Reference

Filters are used to modify motion capture data. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBFilter:

Public Member Functions

 FBFilter ()
 Constructor.
 
bool Apply (FBFCurve pCurve)
 Apply the filter to an FCurve.
 
bool Apply (FBAnimationNode pNode, bool pRecursive)
 Apply the filter to an animation node.
 
 Reset ()
 Reset properties.
 
- Public Member Functions inherited from FBComponent
 FBComponent ()
 Constructor.
 
str ClassName ()
 Get the class name.
 
 DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags.
 
 EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags.
 
bool FBCreate ()
 Open Reality Creation function.
 
 FBDelete ()
 Open Reality deletion function.
 
 FBDestroy ()
 Open Reality destruction function.
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated).
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled.
 
FBFileReference GetOwnerFileReference (p0)
 Get the owner FileReference object.
 
 HardSelect ()
 HardSelect.
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled.
 
bool Is (int pTypeId)
 Returns true if object is of type TypeId.
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessNamespaceHierarchy.
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessObjectNamespace.
 
int PropertyAdd (FBProperty pProperty)
 Add a property to the component's property manager.
 
bool PropertyAddReferenceProperty (FBProperty pReferenceProperty)
 Add a reference property to the component's property manager.
 
FBProperty PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None)
 Create user or dynamic property.
 
 PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading.
 
 PropertyRemove (FBProperty pProperty)
 Remove a Property from the component's Property manager.
 
 SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags.
 
 SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status.
 

Public Attributes

FBTime Start
 Read Write Property: Start time of the filtering region

 
FBTime Stop
 Read Write Property: Stop time of the filtering region

 
- Public Attributes inherited from FBComponent
FBListComponent Components
 List: List of components.

 
str LongName
 Read Write Property: Name and namespace for object.

 
str Name
 Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py.
 
FBListComponent Parents
 List: Parents.

 
FBManager PropertyList
 Read Only Property: Manages all of the properties for the component.

 
bool Selected
 Read Write Property: Selected property.

 
int TypeInfo
 Contains the Type information of the object.

 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.

 
int TypeInfo
 TypeInfo.

 

Detailed Description

Filters are used to modify motion capture data.


Filters are objects which can be applied on a FCurve, or the animation node associated with an animated object property, to modify shape and number of keys. Filters can be created from the GUI, using the Filters tool, or programmatically with an instance of a FBFilterManager.The filter properties can be found in the object's PropertyList data member. They will use the same name, and be of the same type, as what can be seen in the GUI.Instances of FBFilter should be created with the help of the class FBFilterManager. Only internal application code should call the FBFilter's class constructor.Sample C++ code:

FBFilterManager lFilterManager;
// Create a filter instace.
FBFilter* lFilter = lFilterManager.CreateFilter( "Key Reducing" );
if( lFilter )
{
// Create a FCurve and populate it with keys.
FBFCurve lCurve( "Temp Curve" );
for( int lIdx = 1; lIdx < 10; ++lIdx )
{
FBTime lTime( 0, 0, 0, lIdx * 5 );
lCurve.KeyAdd( lTime, lIdx * 5 );
}
FBTrace( "Keys before: %d\n", lCurve.Keys.GetCount() ); // Should be 9.
// Apply the key reducing filter.
lFilter->Apply( &lCurve );
FBTrace( "Keys after: %d\n", lCurve.Keys.GetCount() ); // Should be 2.
}
FCurve class.
Definition: pyfbsdk_generated.h:6787
Filters are used to modify motion capture data.
Definition: pyfbsdk_generated.h:7929
bool Apply(FBFCurve pCurve)
Apply the filter to an FCurve.
Filter manager.
Definition: pyfbsdk_generated.h:8010
FBFilter CreateFilter(str pFilterTypeName)
Create a filter instance according to the filter type requested.
Time data structure.
Definition: pyfbsdk_generated.h:19596
FBTrace(str pFormatString,... p1)
This function prints useful debugging strings in the console with kFBNORMAL_TRACE output detailed lev...

Sample Python code:

from pyfbsdk import *
# Find a given model in the scene.
lModel = FBFindModelByLabelName( 'Cube' )
if lModel:
# Create a Key Reducing filter.
lFilter = FBFilterManager().CreateFilter( 'Key Reducing' )
if lFilter:
# Set the filter's precision to 2.0, and apply it to
# the object's translation animation.
lFilter.PropertyList.Find( 'Precision' ).Data = 2.0
lFilter.Apply( lModel.Translation.GetAnimationNode(), True )
FBManager PropertyList
Read Only Property: Manages all of the properties for the component.
Definition: pyfbsdk_generated.h:4716
Python module pyfbsk.
Definition: pyfbsdk.h:90
FBModel FBFindModelByLabelName(str pModelLabelName)
Find a model in the scene by its label name.

Constructor & Destructor Documentation

◆ FBFilter()

FBFilter ( )

Constructor.

Member Function Documentation

◆ Apply() [1/2]

bool Apply ( FBAnimationNode  pNode,
bool  pRecursive 
)

Apply the filter to an animation node.

This is the other apply method and it can be used on an object's animation node.

Parameters
pNodeNode to apply filter to.
pRecursiveRecursively apply filter on child nodes?
Returns
true if successful.

◆ Apply() [2/2]

bool Apply ( FBFCurve  pCurve)

Apply the filter to an FCurve.

This is one of the two apply method that is meant to be called by client code. The FCurve can be a standalone independant FCurve, or can be associated to an object's animated property.

Parameters
pCurveFCurve to apply filter to.
Returns
true if successful.

◆ Reset()

Reset ( )

Reset properties.

Warning
This method will only work on plug-in filters, not built-in types.

Member Data Documentation

◆ Start

FBTime Start

Read Write Property: Start time of the filtering region

◆ Stop

FBTime Stop

Read Write Property: Stop time of the filtering region