FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fbxpropertydef.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_PROPERTY_DEFINITION_H_
14 #define _FBXSDK_CORE_PROPERTY_DEFINITION_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 #define FBXSDK_PROPERTY_ID_NULL -1
23 #define FBXSDK_PROPERTY_ID_ROOT 0
24 
25 class FbxPropertyPage;
26 
28 {
29 public:
32  {
35  eDeleted
36  };
37 
39  enum EFlags
40  {
41  eNone = 0,
42  eStatic = 1 << 0,
43  eAnimatable = 1 << 1,
44  eAnimated = 1 << 2,
45  eImported = 1 << 3,
46  eUserDefined = 1 << 4,
47  eHidden = 1 << 5,
48  eNotSavable = 1 << 6,
49 
50  eLockedMember0 = 1 << 7,
51  eLockedMember1 = 1 << 8,
52  eLockedMember2 = 1 << 9,
53  eLockedMember3 = 1 << 10,
54  eLockedAll = eLockedMember0 | eLockedMember1 | eLockedMember2 | eLockedMember3,
55  eMutedMember0 = 1 << 11,
56  eMutedMember1 = 1 << 12,
57  eMutedMember2 = 1 << 13,
58  eMutedMember3 = 1 << 14,
59  eMutedAll = eMutedMember0 | eMutedMember1 | eMutedMember2 | eMutedMember3,
60 
61  //Private flags
62  eUIDisabled = 1 << 15,
63  eUIGroup = 1 << 16,
64  eUIBoolGroup = 1 << 17,
65  eUIExpanded = 1 << 18,
66  eUINoCaption = 1 << 19,
67  eUIPanel = 1 << 20,
68  eUILeftLabel = 1 << 21,
69  eUIHidden = 1 << 22,
70 
71  eCtrlFlags = eStatic | eAnimatable | eAnimated | eImported | eUserDefined | eHidden | eNotSavable | eLockedAll | eMutedAll,
72  eUIFlags = eUIDisabled | eUIGroup | eUIBoolGroup | eUIExpanded | eUINoCaption | eUIPanel | eUILeftLabel | eUIHidden,
73  eAllFlags = eCtrlFlags | eUIFlags,
74 
75  eFlagCount = 23,
76  };
77 
78  bool SetFlags(FbxPropertyFlags::EFlags pMask, FbxPropertyFlags::EFlags pFlags);
79  FbxPropertyFlags::EFlags GetFlags() const;
80  FbxPropertyFlags::EFlags GetMergedFlags(FbxPropertyFlags::EFlags pFlags) const;
81  bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue);
82  FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags) const;
83 
84  bool SetMask(FbxPropertyFlags::EFlags pFlags);
85  bool UnsetMask(FbxPropertyFlags::EFlags pFlags);
86  FbxPropertyFlags::EFlags GetMask() const;
87 
88  bool Equal(const FbxPropertyFlags& pOther, FbxPropertyFlags::EFlags pFlags) const;
89 
90 /*****************************************************************************************************************************
91 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
92 *****************************************************************************************************************************/
93 #ifndef DOXYGEN_SHOULD_SKIP_THIS
96  FbxPropertyFlags Clone(FbxPropertyPage* pPage);
97 
98  static const int sLockedMembersMax = 4; //Maximum number of property sub-member that can be locked.
99  static const int sLockedMembersBitOffset = 7; //Number of bits to shift to get to the first locked member flag.
100  static const int sMutedMembersMax = 4; //Maximum number of property sub-member that can be muted.
101  static const int sMutedMembersBitOffset = 11; //Number of bits to shift to get to the first muted member flag.
102 
103 private:
104  FbxUInt32 mFlagData, mMaskData;
105 
106  FBX_ASSERT_STATIC(sizeof(FbxUInt32) * 8 >= FbxPropertyFlags::eFlagCount);
107 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
108 };
109 
111 {
112 public:
113  static FbxPropertyValue* Create(void* pData, EFbxType pType);
114  void Destroy();
116 
117  bool Get(void* pValue, EFbxType pValueType);
118  bool Set(const void* pValue, EFbxType pValueType);
119  size_t GetSizeOf() const;
120  size_t GetComponentCount() const;
121 
122  void IncRef();
123  void DecRef();
124  int GetRef();
125 
126 /*****************************************************************************************************************************
127 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
128 *****************************************************************************************************************************/
129 #ifndef DOXYGEN_SHOULD_SKIP_THIS
131 
132 private:
133  FbxPropertyValue(void* pValue, EFbxType pType);
134  ~FbxPropertyValue();
135 
136  int mRef;
137  EFbxType mType;
138  void* mValue;
139 
141 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
142 };
143 
144 #include <fbxsdk/fbxsdk_nsend.h>
145 
146 #endif /* _FBXSDK_CORE_PROPERTY_DEFINITION_H_ */
FBX SDK environment definition.
#define FBXSDK_FRIEND_NEW()
Definition: fbxnew.h:397
EFlags
Property flags that affect their behaviors.
Property override this flag from its reference property.
Property inherit this flag from its reference property.
EFbxType
Type identifier constants.
#define FBXSDK_DLL
Definition: fbxarch.h:173
unsigned int FbxUInt32
Definition: fbxtypes.h:80
EInheritType
Property inherit types.