output_file = 'C:/Users/J/Desktop/Works/cube_2.abc'
a = cask.Archive(input_file)
meshObj = cask.find(a.top, "pCubeShape1")[0]
uvsamp = OV2fGeomParamSample(uvs, kFacevaryingScope)
nsamp = ON3fGeomParamSample(normals, kFacevaryingScope)
sample = OPolyMeshSchemaSample(verts, indices, counts, uvsamp, nsamp)
meshObj.set_sample(sample)
# write new archive to disk
a.write_to_file(output_file)
Used cask.py and imitated testCask.py and meshData.py modules got from here:
https://github.com/alembic/caskBut getting this error on the last line, i.e. when saving the file:
Error setting sample on pCubeShape1: <alembic.AbcGeom.OPolyMeshSchemaSample object at 0x000000001C367F48>
'OObject' object has no attribute 'getSchema'
Any help?
Also need to know how to read the existing values for verts, indices, counts and nsamp from meshObj and then assign it to the same mesh, since I have to edit only uv here :-) Or else any way to modify only the uv specifically?