Resolved : [Alembic] How to know if an alembic was created with Maya or Houdini (in Python in Houdini)

   1542   4   2
User Avatar
Member
44 posts
Joined: July 2017
Offline
Hello!

I am trying to find a way to do such a code in Houdini:

import alembic.Abc as abc
test = abc.IArchive("test.abc")
archive_infos = abc.GetArchiveInfo(test)
if "appName" in archive_infos:
    app_name = archive_infos["appName"]
    print("\"{0}\" was created by \"{1}\"".format(filename, app_name))

And then, depending if the alembic file came from Houdini or Maya, I will do some treatment or some other.

I tried with :
alembicGetSceneHierarchy but I haven't found a good way!

Thanks
Edited by Francois Devic - Oct. 15, 2018 12:19:52
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
might find something here:
http://www.sidefx.com/docs/houdini/hom/abc_extensions.html [www.sidefx.com]
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
44 posts
Joined: July 2017
Offline
goldfarb
might find something here:
http://www.sidefx.com/docs/houdini/hom/abc_extensions.html [www.sidefx.com]

Unfortunatelly, I haven't found what I am looking for…
User Avatar
Staff
329 posts
Joined: July 2005
Offline
The “abcecho” command line tool will report this information. There is currently no convenient way to access the information through the Alembic HOM extensions.
User Avatar
Member
44 posts
Joined: July 2017
Offline
derrick
The “abcecho” command line tool will report this information. There is currently no convenient way to access the information through the Alembic HOM extensions.

Thanks a lot!
It makes the trick
using a subprocess.Popen, I can read anything inside the file so it works for me!
  • Quick Links