Python package to automatically format maya command flags

When you’re working in a team it’s likely that some of your colleagues are not as familiar with the maya API as others. Using long flag names can help unfamiliar developers with code review and debugging. The mayaff project was implemented to ease development with Maya commands.

Input

from maya import cmds as abc
source = "..."
abc.textureWindow(source, ra=(
    abc.about(ppc=True),
    abc.about(li=True),
))

Output

from maya import cmds as abc
source = "..."
abc.textureWindow(source, removeAllImages=(
    abc.about(macOSppc=True),
    abc.about(linux=True),
))

mayaFlagFormatter

I know that this post is shameless self promotion but I really think my package provides value to pipeline developers.

6 Likes

Nice, I always hated seeing short named flags in code. So many abbreviations that I consistently have to look up, some are just ridiculous.

This is great! Definitely helps make PR reviews easier!

I know, it is why I wrote it.