shortName the string representing the short (< 4 character) version of the flag
longName the string representing the int (> 3 character) version of the flag
longName the string representing the int (> 3 character) version of the flag
=> I defined one flag name like this: syntax.addFlag("-it", "-infType", MSyntax::kDouble);
and used it with my command like this: myCmd -infType 2 Maya gave me an error, "invalid flag -infType"!
Then I changed the flag long name from -infType to -influenceType it all worked fine. So I wonder there is a problem with defining a long flag name beginning with three lower case characters, followed by an upper case character.
Hey, I think you simply forgot the minus character in your flag definition, try this: syntax.addFlag("-it", "-infType", "Syntax::kDouble);
ReplyDeleteCheers,
Christopher.
Hi,
ReplyDeleteOh I missed it in the posted code, but I did make sure that '-' was there in the code when I had trouble with it.
-Maulik