Any examples to adding custom user properties to MetaData with python.

973 views
Skip to first unread message

Paul Winex

unread,
Mar 2, 2016, 1:26:55 PM3/2/16
to alembic-discussion
Hi. I Ask help to search any examples with adding custom meta data (http://docs.alembic.io/python/alembic/abca.html?highlight=abccoreabstract#alembic.AbcCoreAbstract.MetaData) to archive.
I have some examples for maya https://gist.github.com/paulwinex/6814446f292d7eab822a and now i need to write custom user data to file to use it without unpack archive in houdini. Maybe anyone can share part of code?
thanks.

Lucas Miller

unread,
Mar 2, 2016, 8:48:04 PM3/2/16
to alembic-d...@googlegroups.com
What will you be storing in this custom user data?
Using AbcCoreAbstract::MetaData may not be appropriate.

Lucas
> --
> 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.

Paul Winex

unread,
Mar 2, 2016, 11:33:23 PM3/2/16
to alembic-discussion

Actially a need write some perprimirive data that I can use without unpack alembic in houdini. When i load user properies as "Values Only" or "Values and Metadata" houdini create new per prim attribute without unpack archive. How i can write my data to this values for each alembic primitive (object)?




Paul Winex

unread,
Mar 3, 2016, 1:02:31 AM3/3/16
to alembic-discussion
I found this way:

f = alembic.Abc.OArchive(filename)
top
= f.getTop()
...
meshObj
= OPolyMesh(xform, 'cube1Shape')
...
u
= meshObj.getSchema().getUserProperties()
prop
= alembic.Abc.OStringProperty(u, "somename")
prop.setValue('somevalue')



But all data store in abc_userProperties attribute as json string.
Can i create different attribute in houdini and use it without unpack?
Reply all
Reply to author
Forward
0 new messages