13 #ifndef _FBXSDK_CORE_PROPERTY_H_
14 #define _FBXSDK_CORE_PROPERTY_H_
52 static FbxProperty Create(
const FbxProperty& pCompoundProperty,
const FbxDataType& pDataType,
const char* pName,
const char* pLabel=
"",
bool pCheckForDup=
true,
bool* pWasFound=
NULL);
87 void DestroyRecursively();
92 void DestroyChildren();
130 const char* GetNameAsCStr()
const;
146 FbxString GetLabel(
bool pReturnNameIfEmpty=
true)
const;
167 void SetUserTag(
int pTag);
175 void SetUserDataPtr(
void* pUserData);
180 void* GetUserDataPtr();
238 bool operator== (
const FbxProperty& pProperty)
const;
244 bool operator!= (
const FbxProperty& pProperty)
const;
249 bool operator< (
const FbxProperty& pProperty)
const;
254 bool operator> (
const FbxProperty& pProperty)
const;
260 inline bool operator== (
int pValue)
const {
return (pValue == 0) ? !IsValid() : IsValid(); }
266 inline bool operator!= (
int pValue)
const {
return (pValue != 0) ? !IsValid() : IsValid(); }
272 bool CompareValue(
const FbxProperty& pProperty)
const;
289 template <
class T>
inline T
Get()
const { T lValue;
Get(&lValue,
FbxTypeOf(lValue));
return lValue; }
295 template <
class T>
inline bool Set(
const T& pValue){
return Set(&pValue,
FbxTypeOf(pValue)); }
300 bool IsValid()
const;
310 static bool HasDefaultValue(
FbxProperty& pProperty);
338 bool Modified()
const;
361 bool SupportSetLimitAsDouble()
const;
367 bool SetMinLimit(
double pMin);
373 bool HasMinLimit()
const;
378 double GetMinLimit()
const;
384 bool HasMaxLimit()
const;
390 bool SetMaxLimit(
double pMax);
395 double GetMaxLimit()
const;
402 bool SetLimits(
double pMin,
double pMax);
415 int AddEnumValue(
const char* pStringValue);
424 void InsertEnumValue(
int pIndex,
const char* pStringValue);
430 int GetEnumCount()
const;
440 void SetEnumValue(
int pIndex,
const char* pStringValue);
446 void RemoveEnumValue(
int pIndex);
452 const char* GetEnumValue(
int pIndex)
const;
462 inline bool IsRoot()
const {
return mPropertyHandle.IsRoot(); }
468 inline bool IsChildOf(
const FbxProperty& pParent)
const {
return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
485 FBX_DEPRECATED
bool SetParent(
const FbxProperty& pOther);
514 inline FbxProperty Find (
const char* pName,
bool pCaseSensitive =
true)
const {
return FbxProperty(mPropertyHandle.Find(pName,pCaseSensitive)); }
547 inline void BeginCreateOrFindProperty(){ mPropertyHandle.BeginCreateOrFindProperty(); }
579 FBX_DEPRECATED
bool SetArraySize(
int pSize,
bool pVariableArray );
582 FBX_DEPRECATED
int GetArraySize()
const;
588 FBX_DEPRECATED
FbxProperty GetArrayItem(
int pIndex)
const;
664 return GetCurve(pAnimLayer, GetName(),
NULL, pCreate);
679 return GetCurve(pAnimLayer, GetName(), pChannel, pCreate);
713 bool IsConnectedSrcObject(
const FbxObject* pObject)
const;
719 bool DisconnectSrcObject(
FbxObject* pObject);
724 bool DisconnectAllSrcObject();
730 bool DisconnectAllSrcObject(
const FbxCriteria& pCriteria);
736 FBX_DEPRECATED
bool DisconnectAllSrcObject(
const FbxClassId& pClassId);
741 int GetSrcObjectCount()
const;
747 int GetSrcObjectCount(
const FbxCriteria& pCriteria)
const;
753 FBX_DEPRECATED
int GetSrcObjectCount(
const FbxClassId& pClassId)
const;
759 FbxObject* GetSrcObject(
const int pIndex=0)
const;
773 FBX_DEPRECATED
FbxObject* GetSrcObject(
const FbxClassId& pClassId,
const int pIndex=0)
const;
780 FbxObject* FindSrcObject(
const char* pName,
const int pStartIndex=0)
const;
788 FbxObject* FindSrcObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
796 FBX_DEPRECATED
FbxObject* FindSrcObject(
const FbxClassId& pClassId,
const char* pName,
const int pStartIndex=0)
const;
867 bool IsConnectedDstObject(
const FbxObject* pObject)
const;
873 bool DisconnectDstObject(
FbxObject* pObject);
878 bool DisconnectAllDstObject();
884 bool DisconnectAllDstObject(
const FbxCriteria& pCriteria);
890 FBX_DEPRECATED
bool DisconnectAllDstObject(
const FbxClassId& pClassId);
895 int GetDstObjectCount()
const;
901 int GetDstObjectCount(
const FbxCriteria& pCriteria)
const;
907 FBX_DEPRECATED
int GetDstObjectCount(
const FbxClassId& pClassId)
const;
913 FbxObject* GetDstObject(
const int pIndex=0)
const;
927 FBX_DEPRECATED
FbxObject* GetDstObject(
const FbxClassId& pClassId,
const int pIndex=0)
const;
934 FbxObject* FindDstObject(
const char* pName,
const int pStartIndex=0)
const;
942 FbxObject* FindDstObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
950 FBX_DEPRECATED
FbxObject* FindDstObject(
const FbxClassId& pClassId,
const char* pName,
const int pStartIndex=0)
const;
1020 bool ConnectSrcProperty(
const FbxProperty& pProperty);
1026 bool IsConnectedSrcProperty(
const FbxProperty& pProperty);
1032 bool DisconnectSrcProperty(
const FbxProperty& pProperty);
1037 int GetSrcPropertyCount()
const;
1043 bool ConnectDstProperty(
const FbxProperty& pProperty);
1049 bool IsConnectedDstProperty(
const FbxProperty& pProperty);
1055 bool DisconnectDstProperty(
const FbxProperty& pProperty);
1060 int GetDstPropertyCount()
const;
1063 void ClearConnectCache();
1069 FbxProperty GetSrcProperty(
const int pIndex=0)
const;
1076 FbxProperty FindSrcProperty(
const char* pName,
const int pStartIndex=0)
const;
1082 FbxProperty GetDstProperty(
const int pIndex=0)
const;
1089 FbxProperty FindDstProperty(
const char* pName,
const int pStartIndex=0)
const;
1098 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1103 bool Set(
const void* pValue,
const EFbxType& pValueType,
bool pCheckForValueEquality=
true);
1104 bool Get(
void* pValue,
const EFbxType& pValueType)
const;
1106 bool NotifySetRequest();
1108 bool NotifyGet()
const;
1111 inline void* Get()
const { FBX_ASSERT_NOW(
"Cannot get property value as void!");
return NULL; }
1112 inline bool Set(
const void* &){ FBX_ASSERT_NOW(
"Cannot set property value as void!");
return false; }
1116 bool DisconnectAllSrc();
1117 bool DisconnectAllSrc(
const FbxCriteria& pCriteria);
1118 bool IsConnectedSrc(
const FbxProperty& pProperty)
const;
1119 int GetSrcCount()
const;
1120 int GetSrcCount(
const FbxCriteria& pCriteria)
const;
1127 bool DisconnectAllDst();
1128 bool DisconnectAllDst(
const FbxCriteria& pCriteria);
1129 bool IsConnectedDst(
const FbxProperty& pProperty)
const;
1130 int GetDstCount()
const;
1131 int GetDstCount(
const FbxCriteria& pCriteria)
const;
1179 bool lWasFound =
false;
1180 *
this =
Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1181 if( pForceSet || !lWasFound )
1200 bool lWasFound =
false;
1201 *
this =
Create(pCompound, pDataType, pName,
"",
true, &lWasFound);
1202 if( pForceSet || !lWasFound )
1230 operator T()
const {
return Get(); }
1248 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1258 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1273 bool lWasFound =
false;
1274 *
this = Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1275 if( pForceSet || !lWasFound )
1277 ModifyFlag(pFlags,
true);
1286 FbxProperty::NotifyGet();
1287 return GetSrcObject();
1292 if( FbxProperty::NotifySetRequest() )
1294 DisconnectAllSrcObject();
1295 if( ConnectSrcObject(pValue) )
1298 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.
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.
static FbxProperty Create(const FbxProperty &pCompoundProperty, const FbxDataType &pDataType, const char *pName, const char *pLabel="", bool pCheckForDup=true, bool *pWasFound=NULL)
Creates a runtime property on the specified property.
Utility class to manipulate strings.
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...
FBXSDK_DLL const FbxDataType & FbxGetDataTypeFromEnum(const EFbxType pType)
Retrieve data type from type enumeration index.
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 ...
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.
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...
FBX_DEPRECATED FbxProperty operator[](int) const
Returns the (pIndex)th array item.
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 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...
T EvaluateValue(const FbxTime &pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false)
Evaluate the value of a property if it has animation and return the result.
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.
Internal class used to differentiate objects during run-time.
FbxAnimEvaluator * GetAnimationEvaluator() const
Retrieve the proper animation evaluator to use for this property.
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...
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...
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.
Class for array of basic elements such as pointers and basic types.