#include <fbxsdk/fbxsdk_def.h>#include <fbxsdk/scene/shading/fbximplementation.h>#include <fbxsdk/scene/shading/fbxbindingoperator.h>#include <fbxsdk/scene/shading/fbxoperatorentryview.h>#include <fbxsdk/scene/shading/fbxpropertyentryview.h>#include <fbxsdk/fbxsdk_nsbegin.h>#include <fbxsdk/fbxsdk_nsend.h>Definition in file fbximplementationutils.h.
Functions |
|
| FBXSDK_DLL
const FbxImplementation * |
GetImplementation (const FbxObject *pObject, const char *pImplementationTarget) |
| Get FbxImplementation
from FbxObject. |
|
| template<typename T > | |
| bool | GetBoundPropertyValue (const FbxBindingTable *pBindingTable, const char *pEntryName, const FbxImplementation *pImplementation, const FbxObject *pBoundObject, T &pValue) |
| Get bound property value from
FbxBindingTable. |
|
| FBXSDK_DLL const FbxImplementation* GetImplementation | ( | const FbxObject * | pObject, |
| const char * | pImplementationTarget | ||
| ) |
Get FbxImplementation from FbxObject.
| pObject | FbxObject to get FbxImplementation. |
| pImplementationTarget | Name of the implementation property to get. |
| bool GetBoundPropertyValue | ( | const FbxBindingTable * | pBindingTable, |
| const char * | pEntryName, | ||
| const FbxImplementation * | pImplementation, | ||
| const FbxObject * | pBoundObject, | ||
| T & | pValue | ||
| ) |
Get bound property value from FbxBindingTable.
| pBindingTable | FbxBindingTable to get bound property value. |
| pEntryName | Name of the Entry type to get. |
| pImplementation | FbxImplementation of the bound property value to get if the Entry type is FbxOperatorEntryView::sEntryType. |
| pBoundObject | FbxObject of the bound property value to get if the Entry type is FbxPropertyEntryView::sEntryType. |
| pValue | Pointer to bound property value from FbxBindingTable. |
Definition at line 40 of file fbximplementationutils.h.
{
if ((NULL != pImplementation) && (NULL != pBindingTable) && (NULL != pBoundObject) && (NULL != pEntryName))
{
const FbxBindingTableEntry* lEntry = pBindingTable->GetEntryForDestination(pEntryName);
if (NULL != lEntry)
{
if (strcmp(lEntry->GetEntryType(true), FbxPropertyEntryView::sEntryType) == 0)
{
const char* lPropName = lEntry->GetSource();
FbxProperty lProp = pBoundObject->FindPropertyHierarchical(lPropName);
if (lProp.IsValid())
{
pValue = lProp.Get<T>();
return true;
}
}
else if (strcmp(lEntry->GetEntryType(true), FbxOperatorEntryView::sEntryType) == 0)
{
const char* lOperatorName = lEntry->GetSource();
const FbxBindingOperator* lOp = pImplementation->GetOperatorByTargetName(lOperatorName);
if (lOp)
{
return lOp->Evaluate(pBoundObject, &pValue);
}
}
}
}
return false;
}