I am a pipeline engineer at Tippett Studios. I'm trying out Exocortex Crate with Python... thanks for your contribution to the Alembic community!
The sample script OBJ2ABC.py doesn't work (I think it may have been written for an earlier version of the module.)
So far I have fixed a few small things; I made the OBJ parser skip blank lines, and now it reads in the OBJ files and prints a correct summary. As distributed, it was croaking on the "if sp" line.
# loading the structure of the OBJ file
def read(self, in_file):
for line in in_file:
line = line.strip()
if not line:
sp = line.split()
if sp == "#":
The problem I can't get past is in the Alembic portion of your sample code.
I fixed the time sampling (it was missing the type)...
But the next line I can't create an object.
mesh = archive.createObject("AbcGeom_PolyMesh_v1", "/pFromObj")
I get this error...
ExocortexAlembicPython.error: timeSamplingIndex is out of range!
I'd really appreciate it you could update the OBJ2ABC sample tool, as it's the only one that shows how to create new ABC files from scratch (all the others filter or read an ABC.)
Perhaps we need a new forums category for Crate?