c4d.modules.mograph.FieldInfo

class c4d.modules.mograph.FieldInfo

New in version R20.

Attributes

c4d.modules.mograph.FieldInfo._flags

The channels that should be sampled.

Type: int

c4d.modules.mograph.FieldInfo._threadIndex

The current thread index.

Type: int

c4d.modules.mograph.FieldInfo._totalThreadCount

The number of threads active for the current execution.

Type: int

c4d.modules.mograph.FieldInfo._callerThread

The calling thread. Required.

Type: c4d.threading.BaseThread

c4d.modules.mograph.FieldInfo._doc

The calling document. Required.

Type: c4d.documents.BaseDocument

c4d.modules.mograph.FieldInfo._callerStack

A list of objects for the calculation as well as an ID for the invocation chain. Required.

Note

The caller stack ID is especially useful to hash data to a specific caller.

Warning

The ID uses the memory addresses of the callers so the value can change on undo/redo and on document load.

Type: c4d.modules.mograph.FieldCallerStack

c4d.modules.mograph.FieldInfo._inputData

The input data to be sampled.

Type: c4d.modules.mograph.FieldInput

Overview

FieldInfo.Create()

Creates a c4d.modules.mograph.FieldInfo while relaying potential allocation errors.

Creation And Validation

FieldInfo.IsPopulated()

Checks if the FieldInfo data is valid and non-empty.

FieldInfo.IsValid()

Checks if the FieldInfo data is valid.

Magic Methods

FieldInfo.__init__()

Creates a FieldInfo instance.

Members

Creation And Validation

static FieldInfo.Create(flags, thread, doc, currentThreadIndex, threadCount, inputs, callers)

Creates a c4d.modules.mograph.FieldInfo while relaying potential allocation errors.

Parameters
  • 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.

  • thread (c4d.threading.BaseThread) – The caller thread.

  • doc (c4d.documents.BaseDocument) – The document to sample.

  • currentThreadIndex (int) – The thread index that will sample those points.

  • threadCount (int) – The total thread count.

  • inputs (Optional[c4d.modules.mograph.FieldInput]) – The full point list.

  • callers (Optional[List[c4d.BaseList2D]]) – An initializer list to build the stack, first item is base of stack.

Return type

c4d.modules.mograph.FieldInfo

Returns

The created FieldInfo

Creation And Validation

FieldInfo.IsPopulated(self)

Checks if the FieldInfo data is valid and non-empty.

Note

Required FieldInfo content should be set and ready for sampling.

Return type

bool

Returns

True if the FieldInfo is populated, otherwise False.

FieldInfo.IsValid(self)

Checks if the FieldInfo data is valid.

Note

Default empty FieldInfo is considered valid.

Return type

bool

Returns

True if the FieldInfo is valid, otherwise False.

Magic Methods

FieldInfo.__init__(self)

Creates a FieldInfo instance.