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.
On Thursday, November 7, 2019 at 12:20:51 PM UTC-8, r...@colorbleed.nl wrote: > > 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. > > On Thursday, November 7, 2019 at 1:43:31 AM UTC+1, Shobhit Khinvasara > wrote: >> >> 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d13bcce9-c151-488d-915c-5f1b504f6330%40googlegroups.com.