AlembicCameraWriter.kl¶
Types¶
AlembicCameraWriter (object)¶
The AlembicCameraWriter specializes the AlembicObjectWriter interface for writing AlembicOCamera data. It can be created using the AlembicArchiveWriter.addCamera methods.
/*
** Example: AlembicCameraWriter
*/
require AlembicWrapper;
require FileIO;
operator entry() {
FilePath path = FilePath('${TEMP}/camera.abc').expandEnvVars();
AlembicArchiveWriter archive(path.string());
AlembicXformWriter xfo = archive.addXform('/xfo', Alembic_kConstantTimeSampling);
AlembicCameraWriter cam = archive.addCamera('/xfo/cam', Alembic_kConstantTimeSampling);
xfo.writeSample(Mat44());
cam.setFocalLength(5.4);
cam.setNearClippingPlane(0.1);
cam.setFarClippingPlane(10.0);
cam.writeSample();
archive.reset();
report(path.exists());
report('Alembic file created: '+path.string());
}
/*
** Output:
true
Alembic file created: R:\Temp/camera.abc
*/