nightstyles / alembic

Automatically exported from code.google.com/p/alembic
Other
1 stars 0 forks source link

ILightSchema.getCameraSchema() segfaults when no cameras are available #308

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a default light, like 'emptyLight' in testLight.py
    archive = alembic.Abc.OArchive("light1.abc")
    emptyLightObj = alembic.AbcGeom.OLight(archive.getTop(), "emptyLight")

2. in python, read the .abc file and get the ILightSchema, e.g.,
    iLightObj = alembic.AbcGeom.ILight(iObj, alembic.Abc.WrapExistingFlag.kWrapExisting)
    iLight = iLightObj.getSchema()

3. call getCameraSchema()
    iCam = iLight.getCameraSchema()

What is the expected output? What do you see instead?

either throw an exception or return an empty, invalid ICameraSchema

What version of the product are you using? On what operating system?

Alembic 1.1.3 on Linux.

Please provide any additional information below.

Original issue reported on code.google.com by call...@gmail.com on 5 Jun 2013 at 8:07

GoogleCodeExporter commented 9 years ago
Punting over to Barnaby.

Original comment by miller.lucas on 5 Jun 2013 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 28 Aug 2013 at 9:27

GoogleCodeExporter commented 9 years ago
Have you tried this in Alembic 1.5.0?
I just tried this and got the schema correctly, but, iCam.valid() throws an odd 
exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
    ICameraSchema.valid(ICameraSchema)
did not match C++ signature:
    valid(Alembic::AbcGeom::v6::IPointsSchema {lvalue})

Original comment by miller.lucas on 17 Sep 2013 at 9:08

GoogleCodeExporter commented 9 years ago
Found the issue and the function now works like it is supposed to:

http://code.google.com/r/millerlucas-dev/source/detail?r=465ed5b3e089046440437f4
6a62f9b3b8e667d4c

This will go into Alembic 1.5.1

Original comment by miller.lucas on 17 Sep 2013 at 9:38

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 19 Sep 2013 at 8:12