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);
417 int AddEnumValue(
const char* pStringValue);
428 void InsertEnumValue(
int pIndex,
const char* pStringValue);
434 int GetEnumCount()
const;
446 void SetEnumValue(
int pIndex,
const char* pStringValue);
452 void RemoveEnumValue(
int pIndex);
458 const char* GetEnumValue(
int pIndex)
const;
468 inline bool IsRoot()
const {
return mPropertyHandle.IsRoot(); }
474 inline bool IsChildOf(
const FbxProperty& pParent)
const {
return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
514 inline FbxProperty Find (
const char* pName,
bool pCaseSensitive =
true)
const {
return FbxProperty(mPropertyHandle.Find(pName,pCaseSensitive)); }
547 inline void BeginCreateOrFindProperty(){ mPropertyHandle.BeginCreateOrFindProperty(); }
638 return GetCurve(pAnimLayer, GetName(),
NULL, pCreate);
653 return GetCurve(pAnimLayer, GetName(), pChannel, pCreate);
687 bool IsConnectedSrcObject(
const FbxObject* pObject)
const;
693 bool DisconnectSrcObject(
FbxObject* pObject);
698 bool DisconnectAllSrcObject();
704 bool DisconnectAllSrcObject(
const FbxCriteria& pCriteria);
710 FBX_DEPRECATED
bool DisconnectAllSrcObject(
const FbxClassId& pClassId);
715 int GetSrcObjectCount()
const;
721 int GetSrcObjectCount(
const FbxCriteria& pCriteria)
const;
727 FBX_DEPRECATED
int GetSrcObjectCount(
const FbxClassId& pClassId)
const;
733 FbxObject* GetSrcObject(
const int pIndex=0)
const;
747 FBX_DEPRECATED
FbxObject* GetSrcObject(
const FbxClassId& pClassId,
const int pIndex=0)
const;
754 FbxObject* FindSrcObject(
const char* pName,
const int pStartIndex=0)
const;
762 FbxObject* FindSrcObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
770 FBX_DEPRECATED
FbxObject* FindSrcObject(
const FbxClassId& pClassId,
const char* pName,
const int pStartIndex=0)
const;
841 bool IsConnectedDstObject(
const FbxObject* pObject)
const;
847 bool DisconnectDstObject(
FbxObject* pObject);
852 bool DisconnectAllDstObject();
858 bool DisconnectAllDstObject(
const FbxCriteria& pCriteria);
864 FBX_DEPRECATED
bool DisconnectAllDstObject(
const FbxClassId& pClassId);
869 int GetDstObjectCount()
const;
875 int GetDstObjectCount(
const FbxCriteria& pCriteria)
const;
881 FBX_DEPRECATED
int GetDstObjectCount(
const FbxClassId& pClassId)
const;
887 FbxObject* GetDstObject(
const int pIndex=0)
const;
901 FBX_DEPRECATED
FbxObject* GetDstObject(
const FbxClassId& pClassId,
const int pIndex=0)
const;
908 FbxObject* FindDstObject(
const char* pName,
const int pStartIndex=0)
const;
916 FbxObject* FindDstObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
924 FBX_DEPRECATED
FbxObject* FindDstObject(
const FbxClassId& pClassId,
const char* pName,
const int pStartIndex=0)
const;
994 bool ConnectSrcProperty(
const FbxProperty& pProperty);
1000 bool IsConnectedSrcProperty(
const FbxProperty& pProperty);
1006 bool DisconnectSrcProperty(
const FbxProperty& pProperty);
1011 int GetSrcPropertyCount()
const;
1017 bool ConnectDstProperty(
const FbxProperty& pProperty);
1023 bool IsConnectedDstProperty(
const FbxProperty& pProperty);
1029 bool DisconnectDstProperty(
const FbxProperty& pProperty);
1034 int GetDstPropertyCount()
const;
1037 void ClearConnectCache();
1043 FbxProperty GetSrcProperty(
const int pIndex=0)
const;
1050 FbxProperty FindSrcProperty(
const char* pName,
const int pStartIndex=0)
const;
1056 FbxProperty GetDstProperty(
const int pIndex=0)
const;
1063 FbxProperty FindDstProperty(
const char* pName,
const int pStartIndex=0)
const;
1072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1077 bool Set(
const void* pValue,
const EFbxType& pValueType,
bool pCheckForValueEquality=
true);
1078 bool Get(
void* pValue,
const EFbxType& pValueType)
const;
1080 bool NotifySetRequest();
1082 bool NotifyGet()
const;
1085 inline void* Get()
const { FBX_ASSERT_NOW(
"Cannot get property value as void!");
return NULL; }
1086 inline bool Set(
const void* &){ FBX_ASSERT_NOW(
"Cannot set property value as void!");
return false; }
1090 bool DisconnectAllSrc();
1091 bool DisconnectAllSrc(
const FbxCriteria& pCriteria);
1092 bool IsConnectedSrc(
const FbxProperty& pProperty)
const;
1093 int GetSrcCount()
const;
1094 int GetSrcCount(
const FbxCriteria& pCriteria)
const;
1101 bool DisconnectAllDst();
1102 bool DisconnectAllDst(
const FbxCriteria& pCriteria);
1103 bool IsConnectedDst(
const FbxProperty& pProperty)
const;
1104 int GetDstCount()
const;
1105 int GetDstCount(
const FbxCriteria& pCriteria)
const;
1153 bool lWasFound =
false;
1154 *
this =
Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1155 if( pForceSet || !lWasFound )
1174 bool lWasFound =
false;
1175 *
this =
Create(pCompound, pDataType, pName,
"",
true, &lWasFound);
1176 if( pForceSet || !lWasFound )
1204 operator T()
const {
return Get(); }
1222 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1232 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1247 bool lWasFound =
false;
1248 *
this = Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1249 if( pForceSet || !lWasFound )
1251 ModifyFlag(pFlags,
true);
1260 FbxProperty::NotifyGet();
1261 return GetSrcObject();
1266 if( FbxProperty::NotifySetRequest() )
1268 DisconnectAllSrcObject();
1269 if( ConnectSrcObject(pValue) )
1272 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.
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...
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 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.
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.