c4d.modules.mograph.FieldObject¶
-
class
c4d.modules.mograph.FieldObject¶ New in version R20.
Parent Class:
Overview¶
Field Sampling |
|
Frees any data allocated in |
|
Returns the field flags. |
|
Initializes field sampling. |
|
Samples points within the field. |
|
Magic Methods |
|
Creates a |
|
Members¶
Field Sampling¶
-
FieldObject.FreeSampling(self, info)¶ Frees any data allocated in
InitSampling().Warning
Must be called after sampling is finished.
Warning
Due to core changes in 2024.0.0, this function is not working in Python 2024.0.0.This is going to be fixed in an upcoming version.- Parameters
info (c4d.modules.mograph.FieldInfo) – The
FieldInfoused for sampling.
-
FieldObject.GetFieldFlags(self, doc)¶ Returns the field flags.
- Parameters
doc (c4d.documents.BaseDocument) – The document.
- Return type
int
- Returns
The field flags:
FIELDOBJECT_FLAG_NONE
None.
FIELDOBJECT_FLAG_INLINE
The field calculates with the current values of the field stack.
FIELDOBJECT_FLAG_GENERATINGCOLOR
The field is currently outputting color.
FIELDOBJECT_FLAG_PRESERVEALPHA
The field does not modify alpha, any color it produces is directly applied to the existing color ignoring the alpha blending.
FIELDOBJECT_FLAG_SKIP
The field should be skipped.
FIELDOBJECT_FLAG_ERRORSKIP
The field is currently experiencing an error.
-
FieldObject.InitSampling(self, info)¶ Initializes field sampling.
Warning
Must be called before
Sample()is invoked.- Parameters
info (c4d.modules.mograph.FieldInfo) – The
FieldInfoto initialize sampling with.
-
FieldObject.Sample(self, input, output, info, flags)¶ Samples points within the field.
Warning
InitSampling()must be called before.FreeSampling()must be called once sampling is complete.Warning
Due to core changes in 2024.0.0, this function is not working in Python 2024.0.0.This is going to be fixed in an upcoming version.- Parameters
input (c4d.modules.mograph.FieldInput) – The points to sample in global space.
output (c4d.modules.mograph.FieldOutputBlock) – The output result values, should be allocated prior to usage.
info (c4d.modules.mograph.FieldInfo) – The
FieldInfoto sample with. It should match the info used withInitSampling().flags (int) –
The field object sample flags:
FIELDOBJECTSAMPLE_FLAG_NONE
None.
FIELDOBJECTSAMPLE_FLAG_DISABLEDIRECTIONFALLOFF
Private.
Magic Methods¶
-
FieldObject.__init__(self, type)¶ Creates a
FieldObjectinstance.- Parameters
type (int) – The field type.