About
FieldData is the base class for custom field objects (see FieldObject Manual).
A new FieldData based class is registered with RegisterFieldPlugin().
FieldData
In a FieldData based class the following functions can be implemented:
- FieldData::GetFieldFlags(): Returns the flags defining the behaviour of the field object (::FIELDOBJECT_FLAG).
- FieldData::InitSampling(): Initializes the sampling process.
- FieldData::Sample(): Samples the object.
- FieldData::FreeSampling(): Clears internal data.
For related data types see FieldObject Manual.
Example
class ExampleField : public FieldData
{
public:
static NodeData* Alloc()
{
{
return nullptr;
}
}
{
return {};
}
{
}
{
for (
Int i = inputs._blockCount - 1;
i >= 0; --
i)
{
}
}
{
}
};
Py_ssize_t i
Definition: abstract.h:645
PyObject * value
Definition: abstract.h:715
NONE
Definition: asset_browser.h:1
#define INSTANCEOF(X, Y)
Definition: c4d_baselist.h:49
Definition: resultbase.h:766
PyObject PyObject * result
Definition: abstract.h:43
void Py_ssize_t * pos
Definition: dictobject.h:50
return OK
Definition: apibase.h:2740
FIELDOBJECT_FLAG
Definition: ge_prepass.h:5819
#define iferr(...)
Definition: errorbase.h:388
#define DebugStop(...)
Definition: debugdiagnostics.h:225
maxon::Float Float
Definition: ge_sys_math.h:57
maxon::Int Int
Definition: ge_sys_math.h:55
FieldOutputBlockTemplate< false > FieldOutputBlock
Definition: operatingsystem.h:300
maxon::Vec3< maxon::Float64, 1 > Vector
Definition: ge_math.h:140
#define NewObj(T,...)
Definition: newobj.h:108
const char * doc
Definition: pyerrors.h:226
_Py_clock_info_t * info
Definition: pytime.h:197
PyObject * op
Definition: object.h:520
const Bool registerFieldSuccess =
RegisterFieldPlugin(fieldPluginID,
"Example Field"_s,
"Global Falloff"_s, 0, ExampleField::Alloc,
"fexample"_s,
nullptr, 0);
if (registerFieldSuccess == false)
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:69
Bool RegisterFieldPlugin(Int32 id, const maxon::String &name, const maxon::String &help, Int32 info, DataAllocator *g, const maxon::String &description, BaseBitmap *icon, Int32 disklevel)
maxon::Bool Bool
Definition: ge_sys_math.h:46
Further Reading