-
首页
-
C4D R23.110 C++ SDK
FieldList Class Reference
#include <customgui_field.h>
详细描述
Field custom GUI (
CUSTOMDATATYPE_FIELDLIST
) for the Field list data.
公共成员函数
|
maxon::Result
<
FieldOutput
>
|
SampleListSimple
(
BaseList2D
&caller, const
FieldInput
&inputs,
FIELDSAMPLE_FLAG
flags=
FIELDSAMPLE_FLAG::ALL
)
|
maxon::Result
< void >
|
SampleList
(const
FieldInfo
&info, const
FieldInput
&inputs,
FieldOutput
&outputs)
|
maxon::Result
< void >
|
SampleListWithLambda
(const
FieldInfo
&info, const
FieldLambdaInput
&&inputFunc, const
FieldLambdaOutput
&&outputFunc)
|
maxon::Result
< void >
|
DirectInitSampling
(const
FieldInfo
&info)
|
maxon::Result
< void >
|
DirectSample
(const
FieldInput
&inputs,
FieldOutputBlock
&outputs, const
FieldInfo
&info)
|
void
|
DirectFreeSampling
(const
FieldInfo
&info)
|
UInt32
|
GetDirty
(
BaseDocument
*doc) const
|
Int32
|
GetCount
() const
|
void
|
Flush
()
|
maxon::Result
< void >
|
InsertLayer
(
FieldLayer
*layer,
FieldLayer
*parent=nullptr,
FieldLayer
*prev=nullptr)
|
GeListHead
*
|
GetLayersRoot
() const
|
maxon::Result
< void >
|
GetSelected
(
maxon::BaseArray
<
FieldLayer
* > &selected,
Bool
includeChildren=true) const
|
maxon::Result
< void >
|
FindByReference
(
FieldLayerLink
link,
BaseDocument
*doc,
maxon::BaseArray
<
FieldLayer
* > &found) const
|
void
|
SetFlags
(
FIELDLIST_FLAGS
flags,
Bool
state)
|
FIELDLIST_FLAGS
|
GetFlags
() const
|
Bool
|
CheckFlag
(
FIELDLIST_FLAGS
flag) const
|
Bool
|
HasContent
(
FIELDLAYER_CHANNELFLAG
channel=
FIELDLAYER_CHANNELFLAG::COLOR
|
FIELDLAYER_CHANNELFLAG::DIRECTION
|
FIELDLAYER_CHANNELFLAG::VALUE
|
FIELDLAYER_CHANNELFLAG::ROTATION
) const
|
构造函数 & 析构函数文档编制
◆
FieldList()
Default constructor.
◆
~FieldList()
Destructor.
成员函数文档编制
◆
Alloc()
Allocates a field list data. Destroy the allocated field list data with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated field list data, or
nullptr
if the allocation failed.
◆
Free()
Destructs field list data allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
list
|
The field list data to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
SampleListSimple()
Sample a block of values. Use this method to avoid to avoid having to pre create
FieldInfo
and FieldOuput structures. Sampling will be performed in the caller's document with default
FieldInfo
参数。
-
参数
-
[in]
|
caller
|
The caller object, simply pass the
BaseList2D
you are invoking the sampling from.
|
[in]
|
inputs
|
The inputs to sample from.
|
[in]
|
flags
|
The channels to sample.
|
-
返回
-
The sampled
FieldOutput
.
◆
SampleList()
Sample a block of values. Allows full parameter control to the user. You can supply a simple Vector as inputs to sample just one position.
User
needs to supply a valid
FieldInfo
filled with all parameters.
-
参数
-
[in]
|
info
|
The sampling informations, document, threading, flags... Should succeed IsPopulated().
|
[in]
|
inputs
|
The inputs to sample from.
|
[out]
|
outputs
|
Arrays that hold the sampling results, based on sampling flags.
|
-
返回
-
OK on success.
◆
SampleListWithLambda()
Sample a block of specified length using the passed lambda's to initialize the
FieldInput
and apply the final
FieldOutputBlock
.
-
参数
-
[in]
|
info
|
The information required for execution. Should succeed IsPopulated().
|
[in]
|
inputFunc
|
The input function, fill the passed
FieldInput
arrays within this function.
|
[in]
|
outputFunc
|
The output function, make use of the calculated
FieldOutputBlock
within this function.
|
-
返回
-
OK on success.
◆
DirectInitSampling()
Direct initialize to be used only with DirectSample function, DirectFree must be called afterwards.
-
参数
-
[in]
|
info
|
The pre-filled
FieldInfo
, caller owns the object.
|
-
返回
-
OK on success.
◆
DirectSample()
Direct sample function, DirectInitSampling must be called before and DirectFree afterwards.
-
参数
-
[in]
|
inputs
|
The points to sample, caller owns the object.
|
[out]
|
outputs
|
The output, caller owns the object.
|
[in]
|
info
|
The pre-filled
FieldInfo
, caller owns the object.
|
-
返回
-
OK on success.
◆
DirectFreeSampling()
void DirectFreeSampling
|
(
|
const
FieldInfo
&
|
info
|
)
|
|
Direct free, must be called after DirectInitSampling
-
参数
-
[in]
|
info
|
The pre-filled
FieldInfo
, caller owns the object.
|
◆
GetDirty()
Gets the dirtiness of the field GUI and it's objects.
-
参数
-
-
返回
-
The dirty.
◆
GetCount()
Retrieves the total number of fields and groups in the list.
-
返回
-
The count.
◆
Flush()
Empties the list of all entries, frees any used memory and resets the
FieldList
back to it's default state.
◆
InsertLayer()
Inserts a pre-existing layer into the
FieldList
.
-
参数
-
[in]
|
layer
|
The layer to insert into the.
FieldList
. The caller must own this layer and it must not be already inserted in any other
FieldList
(or in the current fieldList in another location)
|
[in]
|
parent
|
The layer that will be the parent of the layer being inserted.
|
[in]
|
prev
|
The previous layer to the one being inserted.
|
-
返回
-
OK on success.
◆
GetLayersRoot()
Retrieves the root
GeListHead
that owns the layers in the
FieldList
.
-
返回
-
Null if it fails, else the root
GeListHead
为
FieldList
. THe
FieldList
owns the passed object.
◆
GetSelected()
Retrieves a list of all the selected layers in the
FieldList
, this may include the background layer.
-
参数
-
[out]
|
selected
|
[out] The selected FieldLayers in the
FieldList
.
|
[in]
|
includeChildren
|
(Optional) True to include, false to exclude the children.
|
-
返回
-
A
maxon::Result
<void>
◆
FindByReference()
Searches for the field Layers that match the passed Reference.
-
参数
-
[in]
|
link
|
The
FieldLayerLink
, this follows the same type of format as Drag & Drop data.
|
[in]
|
doc
|
The document.
|
[out]
|
found
|
[out] The list of FieldLayers found by the passed reference.
|
-
返回
-
A
maxon::Result
<void>
◆
SetFlags()
Sets the state of the FIELDLIST_FLAGS for this
FieldList
-
参数
-
[in]
|
flags
|
The flags to set or clear.
|
[in]
|
state
|
True to set the flag, false to clear it.
|
◆
GetFlags()
Gets the FIELDLIST_FLAGS for this
FieldList
-
返回
-
The complete set of flags.
◆
CheckFlag()
Checks a specific flag (or combination) to see if they are set, all flags must be set to return a true result i.e. this is functionally the equivalent of (
GetFlags()
&flag) == flag rather than just a check for any set flag within the passed flag value.
-
参数
-
[in]
|
flag
|
The flag(s) to check.
|
-
返回
-
True if the flag is set, false if it has not been set.
◆
HasContent()
Query if the
FieldList
has content i.e. any FieldLayers in it in order to determine if it's worth evaluation
-
参数
-
[in]
|
channel
|
(Optional) The channels to check that content exists for.
|
-
返回
-
True if there are FieldLayers in the
FieldList
, false if not.