- Main Page
- Classes
- Files
- Directories

- File List
- File Members

Functions

# fbximplementationutils.h File Reference

`#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>`

Go to the source code of this file.

## Functions
FBXSDK_DLL FbxImplementation const * | GetImplementation (FbxObject const *pObject, char const *pImplementationTarget)
| Get FbxImplementation from FbxObject.
template<typename T >
bool | GetBoundPropertyValue (FbxBindingTable const *pBindingTable, char const *pEntryName, FbxImplementation const *pImplementation, FbxObject const *pBoundObject, T &pValue)
| Get bound property value from FbxBindingTable.

## Detailed Description

Definition in file fbximplementationutils.h.

## Function Documentation

FBXSDK_DLL FbxImplementation const* GetImplementation | ( | FbxObject const * | pObject,
|  | char const * | pImplementationTarget
| ) |  |

Search for all occurrences

Get FbxImplementation from FbxObject.

Parameters:

  pObject | FbxObject to get FbxImplementation.
  pImplementationTarget | Name of the implementation property to get.

Returns:
  FbxImplementation Pointer to FbxImplementation.

bool GetBoundPropertyValue | ( | FbxBindingTable const * | pBindingTable,
|  | char const * | pEntryName,
|  | FbxImplementation const * | pImplementation,
|  | FbxObject const * | pBoundObject,
|  | T & | pValue
| ) |  |

Search for all occurrences

Get bound property value from FbxBindingTable.

Parameters:

  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.

Returns:
  Whether get bound property value success or not.

Definition at line 40 of file fbximplementationutils.h.

    {
        if ((NULL != pImplementation) && (NULL != pBindingTable) && (NULL != pBoundObject) && (NULL != pEntryName))
        {
            FbxBindingTableEntry const* lEntry = pBindingTable->GetEntryForDestination(pEntryName);

            if (NULL != lEntry)
            {
                if (strcmp(lEntry->GetEntryType(true), FbxPropertyEntryView::sEntryType) == 0)
                {
                    char const* 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)
                {
                    char const* lOperatorName = lEntry->GetSource();
                    FbxBindingOperator const* lOp = pImplementation->GetOperatorByTargetName(lOperatorName);
                    if (lOp)
                    {
                        return lOp->Evaluate(pBoundObject, &pValue);
                    }
                }
            }
        }

        return false;
    }