read static method
ActorIKConstraint
read(
- ActorArtboard artboard,
- StreamReader reader,
- ActorIKConstraint? component
override
Implementation
static ActorIKConstraint read(ActorArtboard artboard, StreamReader reader,
ActorIKConstraint? component) {
// ignore: parameter_assignments
component ??= ActorIKConstraint();
ActorTargetedConstraint.read(artboard, reader, component);
component._invertDirection = reader.readBool('isInverted');
reader.openArray('bones');
int numInfluencedBones = reader.readUint8Length();
if (numInfluencedBones > 0) {
component._influencedBones = <InfluencedBone>[];
for (int i = 0; i < numInfluencedBones; i++) {
// No label here, we're just clearing the elements from the array.
component._influencedBones!.add(InfluencedBone(reader.readId('')));
}
}
reader.closeArray();
return component;
}