Exporting alembics with custom attributes inside a hierarchy

36 views
Skip to first unread message

Shobhit Khinvasara

unread,
Nov 6, 2019, 7:43:31 PM11/6/19
to Python Programming for Autodesk Maya
I have a controlled hierarchy in Maya with custom attributes on both the top node and a node inside the hierarchy. While I can specify custom attributes which are on the top node to be exported. I haven't figured out a way to do it with the node inside the hierarchy.Any suggestions on this would be greatly appreciated!

Thanks

catalina zuloaga

unread,
Nov 7, 2019, 3:10:25 AM11/7/19
to python_in...@googlegroups.com
hi, how can I parent multi stuff with a script?
I have these joints and follicle and i want to parent ich one with his according number
image.png

El mié., 6 nov. 2019 a las 21:43, Shobhit Khinvasara (<shobh...@gmail.com>) escribió:
I have a controlled hierarchy in Maya with custom attributes on both the top node and a node inside the hierarchy. While I can specify custom attributes which are on the top node to be exported. I haven't figured out a way to do it with the node inside the hierarchy.Any suggestions on this would be greatly appreciated!

Thanks

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1a7a8042-e913-4b0d-a844-6395e05d8acb%40googlegroups.com.

r...@colorbleed.nl

unread,
Nov 7, 2019, 3:20:51 PM11/7/19
to Python Programming for Autodesk Maya
Hi Shobhit,

Exporting attributes along with Alembic from Maya should automatically export along any attribute name that matches. This can be done both through the Alembic Export Options through "attribute" or "attribute prefixes" (make sure to add them in that interface, they should end up in the list). The same can be done in the command using scripting using the flags
-attr yourAttribute
Or
-attrPrefix yourPrefix

These should be passed along to the AbcExport's -job string. Note that these support multiple values, and can be added to the job string like so in Python:
maya.cmds.AbcExport(j="-attrPrefix firstPrefix -attrPrefix secondPrefix -file /path/to/output.abc")

I haven't run this example snippet, but it should be more or less along these lines. Nevertheless consider it pseudocode. :) The concept is the same in MEL, pass them along with the job argument.

The exporter should automatically include the attributes, even if it's on any of the children nodes if I'm not mistaken.

Shobhit Khinvasara

unread,
Nov 26, 2019, 2:55:10 PM11/26/19
to Python Programming for Autodesk Maya
Thanks Roy, I figured it out.

I didn't need to specify the attribute prefix, I could simply specify the custom attributes in -attr flag and if they exist anywhere in the heirarchy, they also get exported.
Reply all
Reply to author
Forward
0 new messages