13 #ifndef _FBXSDK_CORE_PROPERTY_H_
14 #define _FBXSDK_CORE_PROPERTY_H_
54 static FbxProperty Create(
const FbxProperty& pCompoundProperty,
const FbxDataType& pDataType,
const char* pName,
const char* pLabel=
"",
bool pCheckForDup=
true,
bool* pWasFound=
NULL);
89 void DestroyRecursively();
94 void DestroyChildren();
132 const char* GetNameAsCStr()
const;
148 FbxString GetLabel(
bool pReturnNameIfEmpty=
true)
const;
169 void SetUserTag(
int pTag);
177 void SetUserDataPtr(
void* pUserData);
182 void* GetUserDataPtr();
240 bool operator== (
const FbxProperty& pProperty)
const;
246 bool operator!= (
const FbxProperty& pProperty)
const;
251 bool operator< (
const FbxProperty& pProperty)
const;
256 bool operator> (
const FbxProperty& pProperty)
const;
262 inline bool operator== (
int pValue)
const {
return (pValue == 0) ? !IsValid() : IsValid(); }
268 inline bool operator!= (
int pValue)
const {
return (pValue != 0) ? !IsValid() : IsValid(); }
274 bool CompareValue(
const FbxProperty& pProperty)
const;
291 template <
class T>
inline T
Get()
const { T lValue;
Get(&lValue,
FbxTypeOf(lValue));
return lValue; }
297 template <
class T>
inline bool Set(
const T& pValue){
return Set(&pValue,
FbxTypeOf(pValue)); }
302 bool IsValid()
const;
312 static bool HasDefaultValue(
FbxProperty& pProperty);
340 bool Modified()
const;
363 bool SupportSetLimitAsDouble()
const;
369 bool SetMinLimit(
double pMin);
375 bool HasMinLimit()
const;
380 double GetMinLimit()
const;
386 bool HasMaxLimit()
const;
392 bool SetMaxLimit(
double pMax);
397 double GetMaxLimit()
const;
404 bool SetLimits(
double pMin,
double pMax);
419 int AddEnumValue(
const char* pStringValue);
430 void InsertEnumValue(
int pIndex,
const char* pStringValue);
436 int GetEnumCount()
const;
448 void SetEnumValue(
int pIndex,
const char* pStringValue);
454 void RemoveEnumValue(
int pIndex);
460 const char* GetEnumValue(
int pIndex)
const;
470 inline bool IsRoot()
const {
return mPropertyHandle.IsRoot(); }
476 inline bool IsChildOf(
const FbxProperty& pParent)
const {
return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
516 inline FbxProperty Find (
const char* pName,
bool pCaseSensitive =
true)
const {
return FbxProperty(mPropertyHandle.Find(pName,pCaseSensitive)); }
549 inline void BeginCreateOrFindProperty(){ mPropertyHandle.BeginCreateOrFindProperty(); }
640 return GetCurve(pAnimLayer, GetName(),
NULL, pCreate);
655 return GetCurve(pAnimLayer, GetName(), pChannel, pCreate);
689 bool IsConnectedSrcObject(
const FbxObject* pObject)
const;
695 bool DisconnectSrcObject(
FbxObject* pObject);
700 bool DisconnectAllSrcObject();
706 bool DisconnectAllSrcObject(
const FbxCriteria& pCriteria);
711 int GetSrcObjectCount()
const;
717 int GetSrcObjectCount(
const FbxCriteria& pCriteria)
const;
723 FbxObject* GetSrcObject(
const int pIndex=0)
const;
737 FbxObject* FindSrcObject(
const char* pName,
const int pStartIndex=0)
const;
745 FbxObject* FindSrcObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
816 bool IsConnectedDstObject(
const FbxObject* pObject)
const;
822 bool DisconnectDstObject(
FbxObject* pObject);
827 bool DisconnectAllDstObject();
833 bool DisconnectAllDstObject(
const FbxCriteria& pCriteria);
838 int GetDstObjectCount()
const;
844 int GetDstObjectCount(
const FbxCriteria& pCriteria)
const;
850 FbxObject* GetDstObject(
const int pIndex=0)
const;
864 FbxObject* FindDstObject(
const char* pName,
const int pStartIndex=0)
const;
872 FbxObject* FindDstObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
942 bool ConnectSrcProperty(
const FbxProperty& pProperty);
948 bool IsConnectedSrcProperty(
const FbxProperty& pProperty);
954 bool DisconnectSrcProperty(
const FbxProperty& pProperty);
959 int GetSrcPropertyCount()
const;
965 bool ConnectDstProperty(
const FbxProperty& pProperty);
971 bool IsConnectedDstProperty(
const FbxProperty& pProperty);
977 bool DisconnectDstProperty(
const FbxProperty& pProperty);
982 int GetDstPropertyCount()
const;
985 void ClearConnectCache();
991 FbxProperty GetSrcProperty(
const int pIndex=0)
const;
998 FbxProperty FindSrcProperty(
const char* pName,
const int pStartIndex=0)
const;
1004 FbxProperty GetDstProperty(
const int pIndex=0)
const;
1011 FbxProperty FindDstProperty(
const char* pName,
const int pStartIndex=0)
const;
1020 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1025 bool Set(
const void* pValue,
const EFbxType& pValueType,
bool pCheckForValueEquality=
true);
1026 bool Get(
void* pValue,
const EFbxType& pValueType)
const;
1028 bool NotifySetRequest();
1030 bool NotifyGet()
const;
1033 inline void* Get()
const { FBX_ASSERT_NOW(
"Cannot get property value as void!");
return NULL; }
1034 inline bool Set(
const void* &){ FBX_ASSERT_NOW(
"Cannot set property value as void!");
return false; }
1038 bool DisconnectAllSrc();
1039 bool DisconnectAllSrc(
const FbxCriteria& pCriteria);
1040 bool IsConnectedSrc(
const FbxProperty& pProperty)
const;
1041 int GetSrcCount()
const;
1042 int GetSrcCount(
const FbxCriteria& pCriteria)
const;
1049 bool DisconnectAllDst();
1050 bool DisconnectAllDst(
const FbxCriteria& pCriteria);
1051 bool IsConnectedDst(
const FbxProperty& pProperty)
const;
1052 int GetDstCount()
const;
1053 int GetDstCount(
const FbxCriteria& pCriteria)
const;
1104 bool lWasFound =
false;
1105 *
this =
Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1106 if( pForceSet || !lWasFound )
1125 bool lWasFound =
false;
1126 *
this =
Create(pCompound, pDataType, pName,
"",
true, &lWasFound);
1127 if( pForceSet || !lWasFound )
1155 operator T()
const {
return Get(); }
1166 return EvaluatePropertyValue<T>(*
this, pTime, pForceEval);
1173 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1183 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1198 bool lWasFound =
false;
1199 *
this =
Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1200 if( pForceSet || !lWasFound )
1211 FbxProperty::NotifyGet();
1217 if( FbxProperty::NotifySetRequest() )
1223 FbxProperty::NotifySet();
T * GetDstObject(const int pIndex=0) const
Returns the destination object of the specified class type at the specified index with which this pro...
The animation layer is a collection of animation curve nodes.
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
An evaluator implementation that behaves like the original FBX SDK (2010 and previous) evaluation sys...
Class to manage property handle.
T Get() const
Gets the value of the property.
int GetSrcObjectCount(const FbxCriteria &pCriteria) const
Returns the number of source objects which are of the specified class type and satisfy the given crit...
FBX SDK environment definition.
FbxProperty GetNextDescendent(const FbxProperty &pProperty) const
Returns the property that follows pProperty that is a descendant of this property.
bool DisconnectAllDstObject(const FbxCriteria &pCriteria)
Disconnects this property from all the destination objects which are of the specified class type and ...
FbxPropertyT & Set(const T &pValue)
Assignment function.
FbxPropertyT & operator=(const T &pValue)
Assignment operator.
The Animation stack is a collection of animation layers.
This class is an composite of animation curves and is called as animation curve node.
T Get() const
Retrieve function.
EFlags
Property flags that affect their behaviors.
T * GetSrcObject(const int pIndex=0) const
Returns the source object of the specified class type at the specified index.
T EvaluateValue(const FbxTime &pTime=FbxTime((0x7fffffffffffffffLL)), bool pForceEval=false)
Evaluate the value of a property if it has animation and return the result.
int GetSrcObjectCount() const
Returns the number of source objects of a specific class type with which this property connects...
void ModifyFlag(FbxPropertyFlags::EFlags pFlag, bool pValue)
Changes the property attribute.
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, const char *pChannel, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
bool DisconnectAllSrcObject()
Disconnects this property from all the source objects.
Utility class to manipulate strings.
FbxObject * GetSrcObject(const int pIndex=0) const
Returns the source object at the specified index with which this property connects.
FbxProperty & StaticInit(FbxObject *pObject, const char *pName, const FbxDataType &pDataType, const T &pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
Creates a property and initializes it using a specific value and flag.
bool IsChildOf(const FbxProperty &pParent) const
Judges whether this property is a child of the specified property.
static const char * sHierarchicalSeparator
Hierarchical separator of properties.
int GetDstObjectCount(const FbxCriteria &pCriteria) const
Returns the number of destination objects which are of the specified class type and satisfy the given...
FbxProperty GetChild() const
Returns the first child of this property.
T * GetDstObject(const FbxCriteria &pCriteria, const int pIndex=0) const
Returns the destination object which is of the specified class type and satisfies the given criteria ...
const FbxDataType & FbxGetDataTypeFromEnum(const EFbxType pType)
Retrieve data type from type enumeration index.
FbxIOSettings is a collection of properties, arranged as a tree, that can be used by FBX file readers...
void BeginCreateOrFindProperty()
Internal function for building a property name map.
static FbxProperty Create(const FbxProperty &pCompoundProperty, const FbxDataType &pDataType, const char *pName, const char *pLabel="", bool pCheckForDup=true, bool *pWasFound=((void *) 0))
Creates a runtime property on the specified property.
T * GetSrcObject(const FbxCriteria &pCriteria, const int pIndex=0) const
Returns the source object which is of the specified class type and satisfies the given criteria at th...
FbxProperty FindHierarchical(const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
Searches a property using its full name and data type.
Property override this flag from its reference property.
This is an internal class that you can use to build and clear the name map of properties. You can use the name map to speed up searching for property names.
bool DisconnectAllSrcObject()
Disconnects this property from all source objects of the specified class type.
#define FBXSDK_TIME_INFINITE
FbxProperty GetFirstDescendent() const
Returns the first property that is a descendant of this property.
T * FindDstObject(const FbxCriteria &pCriteria, const char *pName, const int pStartIndex=0) const
Searches the destination object with the specified name which is of the specified class type and sati...
This class implements an efficient map based on key comparison, which stores key-value pairs...
T * FindSrcObject(const char *pName, const int pStartIndex=0) const
Searches the source object with the specified name which is of the specified class type...
const FbxPropertyHandle & GetTypeInfoHandle() const
Retrieve the information handle of this data type.
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
bool ConnectSrcObject(FbxObject *pObject, FbxConnection::EType pType=FbxConnection::eNone)
Connects this property to one source object.
bool SetValueInheritType(FbxPropertyFlags::EInheritType pType)
Sets the inheritance type of the property.
EFbxType
Type identifier constants.
Class to encapsulate time units.
T * FindDstObject(const char *pName, const int pStartIndex=0) const
Searches the destination object with the specified name which is of the specified class type...
The base class of most FBX objects.
FbxProperty & StaticInit(FbxObject *pObject, const char *pName, const T &pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
Creates a property and initializes it using a specific value and flag.
bool DisconnectAllSrcObject(const FbxCriteria &pCriteria)
Disconnects this property from all source objects which are of the specified class type and satisfy t...
This class contains the description of a 3D scene.
EFbxType FbxTypeOf(const FbxChar &)
FbxPropertyNameCache(const FbxProperty &prop)
Constructor, the name map is created in the constructor.
This class implements an efficient set based on value comparison, which stores values.
bool IsDescendentOf(const FbxProperty &pAncestor) const
Judges whether this property is a descendant of the specified property.
bool IsRoot() const
Judges if this property is the root property.
FbxProperty GetSibling() const
Returns the sibling of this property.
FbxProperty & StaticInit(FbxProperty pCompound, const char *pName, const FbxDataType &pDataType, const T &pValue, bool pForceSet=true, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
Creates a property and initializes it using a specific value and flag.
Defines a filtering criteria for a query of objects, connections and properties, so that only those s...
The principal interface for animation evaluators.
FbxProperty Find(const char *pName, bool pCaseSensitive=true) const
Searches a property using its name.
FbxProperty Find(const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
Searches a property using its name and data type.
Class to hold user properties.
bool Set(const T &pValue)
Sets the value of the property.
An animation curve, defined by a collection of keys (FbxAnimCurveKey), and indicating how a value cha...
T * FindSrcObject(const FbxCriteria &pCriteria, const char *pName, const int pStartIndex=0) const
Searches the source object with the specified name which is of the specified class type and satisfies...
Reference to object or property.
This object represents a binding operation on a FbxObject or FbxProperty.
bool DisconnectAllDstObject()
Disconnects this property from all the destination objects of the specified class type...
T ValueType
Provides access to the property's underlying type.
void EndCreateOrFindProperty()
Internal function for clearing the property name map.
FbxProperty GetParent() const
Returns the parent property of this property.
int GetDstObjectCount() const
Returns the number of destination objects of the specified class type with which this property connec...
~FbxPropertyNameCache()
Destructor, the name map is destroyed in destructor.
EInheritType
Property inherit types.
This template class is used to contain user properties of specific data types.
Property is defined in the class declaration, so it wasn't created dynamically.
FbxProperty FindHierarchical(const char *pName, bool pCaseSensitive=true) const
Searches a property using its full name.
T EvaluatePropertyValue(FbxProperty &pProperty, const FbxTime &pTime, bool pForceEval=false)
Evaluate the property at the specified time using the template type provided.