Created
January 4, 2023 11:48
-
-
Save BigRoy/01fee5b2c99a5b1dd6f35f4c88b70df2 to your computer and use it in GitHub Desktop.
Maya print all option vars in sorted manner (just because I'm lazy)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from maya import cmds | |
STR_VALUE_SINGLE_LINE = True | |
for var in sorted(cmds.optionVar(list=True)): | |
value = cmds.optionVar(query=var) | |
if isinstance(value, str) and STR_VALUE_SINGLE_LINE: | |
value = value.replace("\n", " ") | |
print(var.ljust(50) + " " + str(value)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment