Hello,
I am trying to write my effector plugin with a custom fieldlist input. I follow the docs on how to sample this list:
GeData ge;
if (bc->GetParameter(GUI_ID_FIELDLIST, ge) == false)
return ;
CustomDataType* const customData = ge.GetCustomDataType(CUSTOMDATATYPE_FIELDLIST);
FieldList* const p = static_cast<FieldList*>(customData);
if (p)
{
p->SetFlags(FIELDLIST_FLAGS::DISABLEVALUEBYDEFAULT, true);
Int sampleCnt = md->GetCount();
maxon::BaseArray<maxon::Vector> positions;
auto _n = positions.Resize(sampleCnt);
maxon::BaseArray<maxon::Vector> uvws;
_n = uvws.Resize(sampleCnt);
maxon::BaseArray<maxon::Vector> directions;
_n = directions.Resize(sampleCnt);
// set positions
Float64 xOffset = 0.0;
for (maxon::Vector& pos : positions)
{
pos.x = xOffset;
xOffset += 1.f;
}
// define points to sample
FieldInput points(positions.GetFirst(),
directions.GetFirst(),
uvws.GetFirst(),
sampleCnt,
Matrix());
FieldOutput out = p->SampleListSimple(*op, points).GetValue();
if (out.IsValid())
{
for (Int it = 0; it < sampleCnt; ++it)
print() << out._value[it];
}
}
The problem is that effector is not reevaluated if i change any of the field parameters (like seed etc), the rest of params (on the effector) works just as expected.
Is there anything more need to be done to get it working say linking or a dependency generation?
Thanks in advance,
Andrew