c4d.modules.mograph.FieldInfo

class c4d.modules.mograph.FieldInfo

New in version R20.

Attributes

FieldInfo._flags

The channels that should be sampled.

Type: int

FieldInfo._threadIndex

The current thread index.

Type: int

FieldInfo._totalThreadCount

The number of threads active for the current execution.

Type: int

FieldInfo._callerThread

The calling thread. Required.

Type: c4d.threading.BaseThread

FieldInfo._doc

The calling document. Required.

Type: c4d.documents.BaseDocument

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

FieldInfo._inputData

The input data to be sampled.

Type: c4d.modules.mograph.FieldInput

Methods Signatures

FieldInfo.__init__(self)

Creates a FieldInfo instance.

FieldInfo.IsValid(self)

Checks if the FieldInfo data is valid.

FieldInfo.IsPopulated(self)

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

Static Methods Signatures

c4d.modules.mograph.FieldInfo.Create(flags, thread, doc, ...)

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

Methods Documentation

FieldInfo.__init__(self)

Creates a FieldInfo instance.

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.

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.

Static Methods Documentation

static c4d.modules.mograph.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