c4d.FieldList

New in version R20.

Field list data type (CUSTOMDATATYPE_FIELDLIST).

Inheritance

Parent Class:

Members

FieldList.__init__()

Creates a FieldList instance.

Return type:c4d.FieldList
Returns:The created FieldList instance.
FieldList.SampleList(info, inputs, outputs)

Samples the list with full parameter control.

Parameters:
FieldList.SampleListSimple(caller, inputs, flags)

Samples the list.

Note

Use SampleListSimple() to avoid pre-creating FieldInfo and FieldOutput.

Parameters:
  • caller (c4d.BaseList2D) – The caller object. Pass the BaseList2D to invoke the sampling from.
  • inputs (c4d.modules.mograph.FieldInput) – The inputs to sample from.
  • flags (int) –

    The channels to sample:

    FIELDSAMPLE_FLAG_VALUE Sample only the value.
    FIELDSAMPLE_FLAG_DIRECTION Sample the velocity.
    FIELDSAMPLE_FLAG_COLOR Sample the color.
    FIELDSAMPLE_FLAG_ROTATION Sample the rotational velocity.
Return type:

c4d.modules.mograph.FieldOutput

Returns:

The sampling result.

FieldList.DirectInitSampling(info)

Initializes sampling in direct mode.

Warning

Must be called before DirectSample() is invoked.

Parameters:info (c4d.modules.mograph.FieldInfo) – The FieldInfo to initialize sampling with.
Return type:bool
Returns:True if successful otherwise False.
FieldList.DirectSample(inputs, outputs, info)

Samples in direct mode.

Parameters:
Return type:

bool

Returns:

True if successful, otherwise False.

FieldList.DirectFreeSampling(info)

Frees any data allocated in DirectInitSampling().

Warning

Must be called after direct sampling is finished.

Parameters:info (c4d.modules.mograph.FieldInfo) – The FieldInfo used for sampling.
FieldList.GetDirty(doc)

Checks the dirtiness of the field list and its objects.

Parameters:doc (c4d.documents.BaseDocument) – The document. Can be None.
Return type:int
Returns:The dirty count.
FieldList.GetCount()

Retrieves the total number of fields and groups in the list.

Return type:int
Returns:The number of elements in the list.
FieldList.Flush()

Empties the list of all entries, frees any used memory and resets the FieldList instance back to its default state.

FieldList.InsertLayer(layer, parent=None, prev=None)

Inserts a pre-existing layer into the list.

Parameters:
Return type:

bool

Returns:

True if successful, otherwise False.

FieldList.GetLayersRoot()

Retrieves the root GeListHead that owns the layers.

Return type:c4d.GeListHead
Returns:The layers root, or None if the function failed.
FieldList.GetSelected(selected, includeChildren=True)

Retrieves a list of all the selected layers in the list.

Note

This may include the background layer.

Parameters:
  • selected (List[c4d.modules.mograph.FieldLayer]) – The selected layers in the list.
  • includeChildren (Optional[bool]) – True to include children layers, False to exclude.
FieldList.SetFlags(flag, state)

Sets the flags for the list.

Parameters:
  • flag (int) –

    The flags to set:

    FIELDLIST_FLAGS_NONE None.
    FIELDLIST_FLAGS_CLAMPOUTPUT Clamp the output values from the field list.
    FIELDLIST_FLAGS_ENABLEDIRECTIONBYDEFAULT Direction enabled by default on new layers.
    FIELDLIST_FLAGS_ENABLECOLORBYDEFAULT Color enabled by default on new layers.
    FIELDLIST_FLAGS_ENABLEROTATIONBYDEFAULT Direction enabled by default on new layers
    FIELDLIST_FLAGS_DISABLEVALUEBYDEFAULT Disable the value channel by default on new layers
    FIELDLIST_FLAGS_SIMPLEGUI Use simple GUI. Only possible if there is only a single standard field layer in the list.
  • state (bool) – True to set the flag, False to clear it.
FieldList.GetFlags()

Gets the flags for the list.

Return type:int
Returns:The flags:
FIELDLIST_FLAGS_NONE None.
FIELDLIST_FLAGS_CLAMPOUTPUT Clamp the output values from the field list.
FIELDLIST_FLAGS_ENABLEDIRECTIONBYDEFAULT Direction enabled by default on new layers.
FIELDLIST_FLAGS_ENABLECOLORBYDEFAULT Color enabled by default on new layers.
FIELDLIST_FLAGS_ENABLEROTATIONBYDEFAULT Direction enabled by default on new layers
FIELDLIST_FLAGS_DISABLEVALUEBYDEFAULT Disable the value channel by default on new layers
FIELDLIST_FLAGS_SIMPLEGUI Use simple GUI. Only possible if there is only a single standard field layer in the list.
FieldList.CheckFlag(flag)

Checks a specific flag or combination to see if set.

Parameters:flag (int) –

The flag to check:

FIELDLIST_FLAGS_NONE None.
FIELDLIST_FLAGS_CLAMPOUTPUT Clamp the output values from the field list.
FIELDLIST_FLAGS_ENABLEDIRECTIONBYDEFAULT Direction enabled by default on new layers.
FIELDLIST_FLAGS_ENABLECOLORBYDEFAULT Color enabled by default on new layers.
FIELDLIST_FLAGS_ENABLEROTATIONBYDEFAULT Direction enabled by default on new layers
FIELDLIST_FLAGS_DISABLEVALUEBYDEFAULT Disable the value channel by default on new layers
FIELDLIST_FLAGS_SIMPLEGUI Use simple GUI. Only possible if there is only a single standard field layer in the list.
rtype:bool
Returns:True if flag is set, otherwise False.
FieldList.HasContent()

Checks if the list has content.

Return type:bool
Returns:True if there is any field layer in the list, otherwise False.