-
首页
-
C4D R23.110 C++ SDK
#include <c4d_baseeffectordata.h>
详细描述
Class for handling MoGraph motion data.
Get Array By ID
|
void *
|
GetArray
(
Int32
id,
MD_TYPE
type=
MD_TYPE::MD_NONE
) const
|
MDArray
<
Char
>
|
GetCharArray
(
Int32
id,
Char
default_value=0) const
|
MDArray
<
UChar
>
|
GetUCharArray
(
Int32
id,
UChar
default_value=0) const
|
MDArray
<
Int32
>
|
GetLongArray
(
Int32
id,
Int32
default_value=0) const
|
MDArray
<
UInt32
>
|
GetULongArray
(
Int32
id,
UInt32
default_value=0) const
|
MDArray
<
Bool
>
|
GetBoolArray
(
Int32
id,
Bool
default_value=true) const
|
MDArray
<
Int64
>
|
GetLLongArray
(
Int32
id,
Int64
default_value=0) const
|
MDArray
<
Float
>
|
GetRealArray
(
Int32
id,
Float
default_value=1.0) const
|
MDArray
<
矩阵
>
|
GetMatrixArray
(
Int32
id,
矩阵
default_value=
矩阵
()) const
|
MDArray
<
向量
>
|
GetVectorArray
(
Int32
id,
向量
default_value=
向量
()) const
|
构造函数 & 析构函数文档编制
◆
MoData()
◆
~MoData()
成员函数文档编制
◆
operator=()
[1/2]
◆
operator=()
[2/2]
◆
Alloc()
static
MoData
* Alloc
|
(
|
void
|
|
)
|
|
|
static
|
Allocates a motion data. Destroy the allocated motion data with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated motion data, or
nullptr
if the allocation failed.
◆
Free()
static void Free
|
(
|
MoData
*&
|
d
|
)
|
|
|
static
|
Destructs motion data allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
d
|
The motion data to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
GetDirty()
Gets the dirty count. Can be used to check if something has changed.
-
参数
-
[in]
|
mask
|
The dirty flag mask. Can be a combination of:
DIRTYFLAGS
|
-
返回
-
The dirty count.
◆
SetDirty()
Marks the data as dirty.
-
参数
-
[in]
|
mask
|
The dirty flag mask. Can be a combination of:
DIRTYFLAGS
|
◆
SetWithEx()
Bool
SetWithEx
|
(
|
const MoDataEx &
|
md
|
)
|
|
Initializes the data with MoDataEx.
-
参数
-
[in]
|
md
|
The data to use for initializing.
|
-
返回
-
true
if motion data was successfully initialized, otherwise
false
.
◆
Clear()
void Clear
|
(
|
Bool
|
reset
|
)
|
|
Clears the data in the arrays.
-
参数
-
[in]
|
reset
|
若
true
, the arrays will be filled with their default values.
|
◆
Read()
Reads the data from a hyper file.
-
参数
-
[in]
|
hf
|
The hyper file to read from. The caller owns the pointed hyper file.
|
-
返回
-
true
if the data was read, otherwise
false
.
◆
Write()
Writes the data to a hyper file.
-
参数
-
[in]
|
hf
|
The hyper file to write to. The caller owns the pointed hyper file.
|
-
返回
-
true
if the data was written, otherwise
false
.
◆
GetMemorySize()
Int
GetMemorySize
|
(
|
void
|
|
)
|
|
Gets the size of the data in bytes.
-
返回
-
The size of the data.
◆
SetCount()
Sets the length of the arrays.
-
参数
-
[in]
|
cnt
|
The new length of the arrays.
|
-
返回
-
true
if the length was set, otherwise
false
.
◆
GetCount()
Gets the length of the arrays.
-
返回
-
The length of the arrays.
◆
GetArrayCount()
Int32
GetArrayCount
|
(
|
void
|
|
)
|
|
Gets the number of arrays.
-
返回
-
The number of arrays.
◆
GetArrayDescID()
Gets the description ID for the specified array
index
.
-
参数
-
-
返回
-
The description ID.
◆
GetArrayID()
Gets the ID for the specified array
index
.
-
参数
-
-
返回
-
The array ID:
MODATA_IDS
◆
GetArrayIndexType()
Gets the data type of the specified array
index
.
-
参数
-
-
返回
-
The data type:
DTYPE
◆
GetArrayType()
Gets the data type of the specified array
id
.
-
参数
-
-
返回
-
The type:
DTYPE
◆
GetArrayIndex()
[1/2]
Gets the array index for the specified description
id
.
-
参数
-
[in]
|
id
|
The description ID.
|
-
返回
-
The array index.
◆
GetArrayIndex()
[2/2]
Gets the array index for the specified array
id
.
-
参数
-
-
返回
-
The array index.
◆
GetDataInstance()
[1/2]
Gets a pointer to the container for the specified array description
id
.
-
参数
-
[in]
|
id
|
The description ID.
|
-
返回
-
A pointer to the internal container. The motion data object owns the pointed container.
◆
GetDataInstance()
[2/2]
Gets a pointer to the container for the specified array
id
.
-
参数
-
-
返回
-
A pointer to the internal container. The motion data object owns the pointed container.
◆
GetDataIndexInstance()
Gets a pointer to the container for the specified array
index
.
-
参数
-
-
返回
-
A pointer to the internal container. The motion data object owns the pointed container.
◆
GetData()
Gets a copy of the container for the specified array
id
.
-
参数
-
-
返回
-
A copy of the array's container.
◆
SetData()
Sets the the container for the specified array
id
.
-
参数
-
[in]
|
bc
|
The container to set.
|
[in]
|
id
|
The array ID:
MODATA_IDS
|
◆
GetAutoLock()
Must be used to lock the class with
AutoLocker
prior to accessing the
MoData
values directly to prevent threading issues and therefore crashes.
AutoLocker
al(modata.GetAutoLock());
-
返回
-
The
AutoLock
used for locking the class.
◆
AddArray()
[1/2]
Adds the specified array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
name
|
The name of the array.
|
[in]
|
default_flags
|
The default flags:
MOGENFLAG
|
-
返回
-
The index of the added array or
NOTOK
if the method failed.
◆
AddArray()
[2/2]
Adds the specified array.
-
参数
-
[in]
|
id
|
The array ID:
MODATA_IDS
|
[in]
|
type
|
The type:
DTYPE
|
[in]
|
name
|
The name of the array.
|
[in]
|
default_flags
|
The default flags:
MOGENFLAG
|
-
返回
-
The index of the added array or
NOTOK
if the method failed.
◆
RemoveArray()
[1/2]
Removes the specified array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
-
返回
-
true
if the array was removed, otherwise
false
.
◆
RemoveArray()
[2/2]
Removes the specified array.
-
参数
-
-
返回
-
true
if the array was removed, otherwise
false
.
◆
GetFlags()
[1/2]
Unused
.
◆
GetFlags()
[2/2]
Unused
.
◆
GetIndexFlags()
Unused
.
◆
SetFlags()
[1/2]
Unused
.
◆
SetFlags()
[2/2]
Unused
.
◆
SetIndexFlags()
Unused
.
◆
SetFlag()
[1/2]
Unused
.
◆
SetFlag()
[2/2]
Unused
.
◆
SetIndexFlag()
Unused
.
◆
DelFlag()
[1/2]
Unused
.
◆
DelFlag()
[2/2]
Unused
.
◆
DelIndexFlag()
Unused
.
◆
SetName()
[1/2]
Sets the name for the specified array description
id
.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
name
|
The name of the array to set.
|
◆
SetName()
[2/2]
Sets the name for the specified array
id
.
-
参数
-
[in]
|
id
|
The array ID:
MODATA_IDS
|
[in]
|
name
|
The name of the array to set.
|
◆
SetIndexName()
Sets the name for the specified array
index
.
-
参数
-
[in]
|
index
|
The array index.
0
<=
index
<
GetArrayCount()
|
[in]
|
name
|
The name of the array to set.
|
◆
GetName()
[1/2]
Gets the name of the specified array description
id
.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
-
返回
-
The name of the array.
◆
GetName()
[2/2]
Gets the name of the specified array
id
.
-
参数
-
-
返回
-
The name of the array.
◆
GetIndexName()
Gets the name of the specified array
index
.
-
参数
-
-
返回
-
The name of the array.
◆
GetArray()
[1/2]
void* GetArray
|
(
|
const
DescID
&
|
id
|
)
|
const
|
Gets a void pointer to an array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
-
返回
-
The pointer to the array.
◆
GetCharArray()
[1/2]
Gets a
Char
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetUCharArray()
[1/2]
Gets a
UChar
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetLongArray()
[1/2]
Gets an
Int32
/
Long
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetULongArray()
[1/2]
Gets a
UInt32
/
ULong
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetBoolArray()
[1/2]
Gets a
Bool
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetLLongArray()
[1/2]
Gets an
Int64
/
LLong
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetRealArray()
[1/2]
Gets a
Float
/Real array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetMatrixArray()
[1/2]
Gets a
矩阵
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetVectorArray()
[1/2]
Gets a
向量
array.
-
参数
-
[in]
|
id
|
The description ID of the array.
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetArray()
[2/2]
Gets a void pointer to an array.
-
参数
-
-
返回
-
The pointer to the array.
◆
GetCharArray()
[2/2]
Gets a
Char
array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetUCharArray()
[2/2]
Gets a
UChar
array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetLongArray()
[2/2]
Gets an
Int32
/Long array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetULongArray()
[2/2]
Gets a
UInt32
/ULong array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetBoolArray()
[2/2]
Gets a
Bool
array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetLLongArray()
[2/2]
Gets a
Int64
/LLong array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetRealArray()
[2/2]
Gets a
Float
/Real array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetMatrixArray()
[2/2]
Gets a
矩阵
array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetVectorArray()
[2/2]
Gets a
向量
array.
-
参数
-
[in]
|
id
|
The ID of the array:
MODATA_IDS
|
[in]
|
default_value
|
The default value of the array.
|
-
返回
-
The retrieved array.
◆
GetIndexArray()
void* GetIndexArray
|
(
|
Int32
|
index
|
)
|
const
|
Gets a void pointer to an array.
-
参数
-
-
返回
-
The pointer to the array.
◆
GetCharIndexArray()
Gets a
Char
array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetUCharIndexArray()
Gets a
UChar
array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetLongIndexArray()
Gets an
Int32
/Long array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetULongIndexArray()
Gets a
UInt32
/ULong array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetBoolIndexArray()
Gets a
Bool
array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetLLongIndexArray()
Gets a
Int64
/LLong array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetRealIndexArray()
Gets a
Float
/Real array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetMatrixIndexArray()
Gets a
矩阵
array.
-
参数
-
-
返回
-
The retrieved array.
◆
GetVectorIndexArray()
Gets a
向量
array.
-
参数
-
-
返回
-
The retrieved array.
◆
CopyTo()
Copies the MoGraph data to
dest
.
-
参数
-
[in]
|
dest
|
The destination MoGraph data. The caller owns the pointed data.
|
[in]
|
merge_data
|
若
true
the source and destination data are merged. If
false
a straight one-to-one copy is made.
For instance if the source contains a matrix array and the destination a matrix and a real array the real array will still exist after the merge action.
|
[in]
|
max_count
|
The maximum number of array elements to copy. This limits the array size of the copy.
|
-
返回
-
true
if the MoGraph data was copied, otherwise
false
.
◆
MergeData()
Merges the MoGraph data with another.
-
参数
-
[in]
|
source
|
The source MoGraph data. The caller owns the pointed data.
|
[in]
|
percent
|
The blend factor for the merge of the data, going from
0.0
to
1.0
(
0
to
100%
).
|
-
返回
-
true
if the MoGraph data was merged, otherwise
false
.
◆
Flush()
Flushes the MoGraph data.
All data is cleared and the arrays are freed.
◆
SetOffset()
void SetOffset
|
(
|
Int
|
offset
=
0
|
)
|
|
Sets an offset from the beginning of the arrays, for example array[0] becomes array[offset].
-
参数
-
[in]
|
offset
|
The array offset:
0
<=
offset
<
GetCount()
|
◆
SetLimit()
void SetLimit
|
(
|
Int
|
limit
=
-1
|
)
|
|
Sets a limit for the array. All data is kept internally. Can be useful for certain cases for instance merging.
-
参数
-
[in]
|
limit
|
The array limit:
0
<=
limit
<
GetCount()
|