c4d.modules.mograph.FieldLayer

New in version R20.

Inheritance

Members

FieldLayer.__init__(type)

Creates a FieldLayer instance.

Parameters:type (int) – The layer type.
Return type:c4d.modules.mograph.FieldLayer
Returns:The created FieldLayer instance.
FieldLayer.GetStrength()

Gets the field layer’s strength in percent.

Return type:float
Returns:The strength.
FieldLayer.SetStrength(strength)

Sets the field layer’s strength in percent.

Parameters:strength (float) – The strength to set.
FieldLayer.GetBlendingMode()

Gets the field layer’s blending mode.

Return type:int
Returns:The blending mode. See flbase.h/res for values.
FieldLayer.SetBlendingMode(blendingMode)

Sets field layer’s blending mode.

Parameters:blendingMode (int) – The blending mode to set. See flbase.h/res for values.
FieldLayer.GetUniqueID()

Private.

FieldLayer.SetUniqueID(id)

Private.

FieldLayer.GetChannelFlags()

Gets the enabled flags for the layer.

Return type:int
Returns:The channel flags:
FIELDLAYER_CHANNELFLAG_NONE None.
FIELDLAYER_CHANNELFLAG_ENABLE Layer is enabled and sampled.
FIELDLAYER_CHANNELFLAG_VALUE Value sampling is enabled.
FIELDLAYER_CHANNELFLAG_COLOR Color sampling is enabled.
FIELDLAYER_CHANNELFLAG_DIRECTION Direction sampling is enabled.
FIELDLAYER_CHANNELFLAG_ROTATION Rotation sampling is enabled.
FieldLayer.SetChannelFlags(flags)

Sets the enabled flags for the layer.

Parameters:flags (int) –

The channel flags to set:

FIELDLAYER_CHANNELFLAG_NONE None.
FIELDLAYER_CHANNELFLAG_ENABLE Layer is enabled and sampled.
FIELDLAYER_CHANNELFLAG_VALUE Value sampling is enabled.
FIELDLAYER_CHANNELFLAG_COLOR Color sampling is enabled.
FIELDLAYER_CHANNELFLAG_DIRECTION Direction sampling is enabled.
FIELDLAYER_CHANNELFLAG_ROTATION Rotation sampling is enabled.
FieldLayer.GetChannelFlag(flag)

Checks a specific channel flag enabled state.

Parameters:flag (int) –

The flag to check:

FIELDLAYER_CHANNELFLAG_NONE None.
FIELDLAYER_CHANNELFLAG_ENABLE Layer is enabled and sampled.
FIELDLAYER_CHANNELFLAG_VALUE Value sampling is enabled.
FIELDLAYER_CHANNELFLAG_COLOR Color sampling is enabled.
FIELDLAYER_CHANNELFLAG_DIRECTION Direction sampling is enabled.
FIELDLAYER_CHANNELFLAG_ROTATION Rotation sampling is enabled.
Return type:bool
Returns:True if channel flag is set, otherwise False.
FieldLayer.SetChannelFlag(flag, state=True)

Sets a specific channel flag enabled state.

Parameters:
  • flags (int) –

    The flag to set:

    FIELDLAYER_CHANNELFLAG_NONE None.
    FIELDLAYER_CHANNELFLAG_ENABLE Layer is enabled and sampled.
    FIELDLAYER_CHANNELFLAG_VALUE Value sampling is enabled.
    FIELDLAYER_CHANNELFLAG_COLOR Color sampling is enabled.
    FIELDLAYER_CHANNELFLAG_DIRECTION Direction sampling is enabled.
    FIELDLAYER_CHANNELFLAG_ROTATION Rotation sampling is enabled.
  • state (bool) – True to enable the flag, False to disable.
FieldLayer.InitSampling(info)

Initializes field sampling.

Warning

Must be called before Sample() is invoked.

Parameters:info (c4d.modules.mograph.FieldInfo) – The FieldInfo to initialize sampling with.
FieldLayer.FreeSampling(info)

Frees any data allocated in InitSampling().

Warning

Must be called after sampling is finished.

Parameters:info (c4d.modules.mograph.FieldInfo) – The FieldInfo instance used for sampling.
FieldLayer.Sample(input, output, info)

Samples the field layer.

Warning

InitSampling() must be called before. FreeSampling() must be called once sampling is complete.

Parameters:
FieldLayer.Aggregate(input, output, info)

Private

FieldLayer.GetLayerFlags()

Gets the layer’s execution and display flags.

Return type:int
Returns:The layer flags:
FIELDLAYER_FLAG_NONE None.
FIELDLAYER_FLAG_SKIP Layer calculation is disabled, e.g. the linked object on a standard layer’s deform mode is false.
FIELDLAYER_FLAG_ERRORSKIP Layer calculation is disabled due to a non critical error in InitSampling() or as user specified.
FIELDLAYER_FLAG_HIDE Layer should be completely ignored from both calculation and GUI display, e.g. the linked object has been deleted.
FIELDLAYER_FLAG_MODIFYDATA The layer modifies existing data and needs the values from layers beneath it in the layer list.
FIELDLAYER_FLAG_PRESERVEALPHA The layer does not adjust the existing alpha and its color changes should be applied ignoring any alpha values.
FIELDLAYER_FLAG_NOCHILDVALUE Children of the layer do not output their value.
FIELDLAYER_FLAG_NOCHILDCOLOR Children of the layer do not output their color.
FIELDLAYER_FLAG_NOCHILDDIRECTION Children of the layer do not output their direction.
FIELDLAYER_FLAG_NOCHILDROTATION Children of the layer do not output their rotation.
FIELDLAYER_FLAG_TEMPORARY Do not save the layer with the list or duplicate it (outside of undo).
FIELDLAYER_FLAG_SKIPWITHDEFAULTOUTPUTS Field sampling is skipped with no error, untouched field output will be blended with the previous layer.
FieldLayer.SetLayerFlags(flags, state=True)

Sets the layer’s execution and display flags.

Parameters:
  • flags (int) –

    The layer flag to set:

    FIELDLAYER_FLAG_NONE None.
    FIELDLAYER_FLAG_SKIP Layer calculation is disabled, e.g. the linked object on a standard layer’s deform mode is false.
    FIELDLAYER_FLAG_ERRORSKIP Layer calculation is disabled due to a non critical error in InitSampling() or as user specified.
    FIELDLAYER_FLAG_HIDE Layer should be completely ignored from both calculation and GUI display, e.g. the linked object has been deleted.
    FIELDLAYER_FLAG_MODIFYDATA The layer modifies existing data and needs the values from layers beneath it in the layer list.
    FIELDLAYER_FLAG_PRESERVEALPHA The layer does not adjust the existing alpha and its color changes should be applied ignoring any alpha values.
    FIELDLAYER_FLAG_NOCHILDVALUE Children of the layer do not output their value.
    FIELDLAYER_FLAG_NOCHILDCOLOR Children of the layer do not output their color.
    FIELDLAYER_FLAG_NOCHILDDIRECTION Children of the layer do not output their direction.
    FIELDLAYER_FLAG_NOCHILDROTATION Children of the layer do not output their rotation.
    FIELDLAYER_FLAG_TEMPORARY Do not save the layer with the list or duplicate it (outside of undo).
    FIELDLAYER_FLAG_SKIPWITHDEFAULTOUTPUTS Field sampling is skipped with no error, untouched field output will be blended with the previous layer.
  • state (bool) – True to set, False to clear.
FieldLayer.GetLinkedObject(doc)

Gets the linked object.

Parameters:doc (c4d.documents.BaseDocument) – The document the FieldLayer belongs to.
Return type:c4d.BaseList2D
Returns:The linked object.
FieldLayer.SetLinkedObject(link)

Sets the linked object.

Parameters:link (c4d.BaseList2D) – The object to link.