python IPointsSchema missing getArbGeomParams()

188 views
Skip to first unread message

Bob Mercier

unread,
Oct 17, 2014, 9:13:15 PM10/17/14
to alembic-d...@googlegroups.com

I'm saving a point cloud from Houdini and it includes some arbitrary geometry parameters.  I'm able to read the extra
parameters from C++ using Schema::getArbGeomParams() but that api seems to be missing from the Python
interface.  Is there another way to get at the extra parameters?

thanks!
bob

read.py

Bob Mercier

unread,
Oct 20, 2014, 3:04:19 AM10/20/14
to alembic-d...@googlegroups.com

Hmm...  Nobody likes python?  Attached is a simple C++ example that shows IPointsSchema does contain getArbGeomParams().

I'm happy to believe it's a build problem, but I'd love for someone to tell me that CAN call getArbGeomParams() from an IPointsSchema object,
or suggest another way.

A related question, I've tried building alembic on a new-ish Linux using the latest python and openexr (imath), as well as the "recommended", i.e.
openexr-1.7.1, python 2.6, and have had about the same results.  Also, I had to fiddle with the link order on one of the CMake scripts to get PyAlembic
to work at all.  Has anyone else had satisfactory results?  Care to share you build recipe?

thanks!
bob
reader.c

Bob Mercier

unread,
Oct 20, 2014, 4:24:15 AM10/20/14
to alembic-d...@googlegroups.com

Ok, here's the "other way":  

 
    if alembic.AbcGeom.IPoints.matches(md):
        pnts
= alembic.AbcGeom.IPoints(obj, alembic.Abc.WrapExistingFlag.kWrapExisting)
        schema
= pnts.getSchema()
        c_prop
= alembic.Abc.ICompoundProperty(pnts.getProperties(), ".geom")
       
if c_prop:
            arb
= c_prop.getProperty(".arbGeomParams")
           
if arb:
               
print "HAS ARB"
                m_prop
= arb.getProperty("mtx")
               
if m_prop:
                    matrices
= m_prop.getValue()
                   
for mtx in matrices:
                       
print mtx


Moving on...



On Saturday, October 18, 2014 9:13:15 AM UTC+8, Bob Mercier wrote:

Ryan Galloway

unread,
Oct 20, 2014, 10:36:08 AM10/20/14
to alembic-d...@googlegroups.com

Hey Bob,

Thanks for the report, and apologies for the radio silence. Looks like this might have been an oversight in the Python bindings. I've submitted a fix and a pull request here:


We may wait a few more days for additional reports from 1.5.6, and then cut a 1.5.7 version. If you need the fix now, you can clone my cask-dev branch and build that.

Alternatively,  you can definitely access properties directly like that as a workaround. For Python tasks, I also encourage you to check out "cask", which makes inspecting caches a lot easier, and also updating and merging archives possible:


Regards,

Ryan

 

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Campbell

unread,
Feb 4, 2015, 12:48:09 AM2/4/15
to alembic-d...@googlegroups.com
Hi All,

i'm currently working with alembic data which is exported from katana and imported into houdini.
For various reasons i don't actually have access to katana itself, but need to manipulate the alembic files.

Using the (otherwise splendid) cask.py from alembic/1.5.5 i have found that reading
the alembic file and then writing it out doesn't perfectly preserve the data.
There are 'visible' properties of type int8 and '.ops' properties
that are not preserved.

The original katana alembic will load into houdini,
the new alembics coming out of cask caused houdini to crash.

In order to get things to work, i needed to change the OPROPERTIES
dictionary in cask, adding in 'visible', imath.Color4c, and changing '.ops'.
A patch is attached.

Unfortunately i cannot supply alembic files that demonstrate the issue,
and i suspect that the change in '.ops' may cause issues for other applications
but the patch may be useful to others.

kevin

--
kevin campbell
director of production technology | kevin.c...@rsp.com.au
rising sun pictures | www.rsp.com.au
phone +61 8 8400 6456 | mobile +61 432 483 166

cask_katana.patch

Ryan Galloway

unread,
Feb 4, 2015, 12:14:25 PM2/4/15
to alembic-d...@googlegroups.com

Hi Kevin,

Thanks much for the report and the patch. I'm glad to hear you're getting some use out of cask.

There have been a few important updates since Alembic 1.5.5. The current released version of cask is 0.9.3, but I have an even newer 0.9.4 available in my cask-dev branch here (which, FWIW, is the version we're using at ILM):

https://github.com/rsgalloway/alembic/blob/cask-dev/python/examples/cask/cask.py

This may get released with the next update to Alembic, but in the meantime, please check it out. I think it might solve these issues for you and maybe one or two others you might not have encountered yet:

If it doesn't, or any other issues come up, please let us know.

Ryan



Kevin Campbell

unread,
Feb 5, 2015, 12:28:43 AM2/5/15
to alembic-d...@googlegroups.com


----- Original Message -----
>
>
>
>
> Hi Kevin,
>
> Thanks much for the report and the patch. I'm glad to hear you're
> getting some use out of cask.
>
> There have been a few important updates since Alembic 1.5.5. The
> current released version of cask is 0.9.3, but I have an even newer
> 0.9.4 available in my cask-dev branch here (which, FWIW, is the
> version we're using at ILM):
>
> https://github.com/rsgalloway/alembic/blob/cask-dev/python/examples/cask/cask.py
>
> This may get released with the next update to Alembic, but in the
> meantime, please check it out. I think it might solve these issues
> for you and maybe one or two others you might not have encountered
> yet:
>

Hi Ryan,

Yes, this version does deal with our katana/houdini compatibility issue
(somewhat more elegantly than i did, as well).

Thanks,

Ryan Galloway

unread,
Feb 5, 2015, 12:38:50 AM2/5/15
to alembic-d...@googlegroups.com

Excellent! Glad to hear it. Please do continue to send us reports, or any feedback you might have.

Thanks,

Ryan


Reply all
Reply to author
Forward
0 new messages