OpenMaya.MArgParser Class Reference
Command argument list parser.
Constructors
| Signature | Parameters | Description
|
| MArgParser(syntax, args) | syntax - MSyntax
args - MArgList | Creates a new MArgParser object which will parse args using the provided syntax.
|
str() Support
Default.
repr() Support
Default.
| OpenMaya.MArgParser.__init__ |
( |
| ) |
|
x.__init__(...) initializes x; see help(type(x)) for signature
| OpenMaya.MArgParser.commandArgumentBool |
( |
| ) |
|
commandArgumentBool(argIndex) -> bool
Returns the specified command argument as a bool.
| Signature: | commandArgumentBool(index) |
| Parameters: | index - int |
| Returns: | bool |
| Description: | Returns the specified command argument as a bool. |
| OpenMaya.MArgParser.commandArgumentDouble |
( |
| ) |
|
Alias for commandArgumentFloat().
| Signature: | commandArgumentDouble(index) |
| Parameters: | index - int |
| Returns: | float |
| Description: | This is an alternate name for commandArgumentFloat() |
| OpenMaya.MArgParser.commandArgumentFloat |
( |
| ) |
|
commandArgumentFloat(argIndex) -> float
Returns the specified command argument as a float.
| Signature: | commandArgumentFloat(index) |
| Parameters: | index - int |
| Returns: | float |
| Description: | Returns the specified command argument as a float. |
| OpenMaya.MArgParser.commandArgumentInt |
( |
| ) |
|
commandArgumentInt(argIndex) -> int
Returns the specified command argument as an int.
| Signature: | commandArgumentInt(index) |
| Parameters: | index - int |
| Returns: | int |
| Description: | Returns the specified command argument as an int. |
| OpenMaya.MArgParser.commandArgumentMAngle |
( |
| ) |
|
commandArgumentMAngle(argIndex) -> MAngle
Returns the specified command argument as an MAngle.
| Signature: | commandArgumentMAngle(index) |
| Parameters: | index - int |
| Returns: | MAngle |
| Description: | Returns the specified command argument as an MAngle. |
| OpenMaya.MArgParser.commandArgumentMDistance |
( |
| ) |
|
commandArgumentMDistance(argIndex) -> MDistance
Returns the specified command argument as an MDistance.
| Signature: | commandArgumentMDistance(index) |
| Parameters: | index - int |
| Returns: | MDistance |
| Description: | Returns the specified command argument as an MDistance. |
| OpenMaya.MArgParser.commandArgumentMTime |
( |
| ) |
|
commandArgumentMTime(argIndex) -> MTime
Returns the specified command argument as an MTime.
| Signature: | commandArgumentMTime(index) |
| Parameters: | index - int |
| Returns: | MTime |
| Description: | Returns the specified command argument as an MTime. |
| OpenMaya.MArgParser.commandArgumentString |
( |
| ) |
|
commandArgumentString(argIndex) -> unicode string
Returns the specified command argument as a string.
| Signature: | commandArgumentString(index) |
| Parameters: | index - int |
| Returns: | string |
| Description: | Returns the specified command argument as a string. |
| OpenMaya.MArgParser.flagArgumentBool |
( |
| ) |
|
flagArgumentBool(flagName, argIndex) -> bool
Returns the specified argument of the specified single-use flag as
a bool.
| Signature: | flagArgumentBool(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | bool |
| Description: | Returns the index'th argument of the specified flag as a bool. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.flagArgumentDouble |
( |
| ) |
|
flagArgumentDouble(flagName, argIndex) -> float
Alias for flagArgumentFloat().
| Signature: | flagArgumentDouble(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | float |
| Description: | This is an alternate name for flagArgumentFloat(). |
| OpenMaya.MArgParser.flagArgumentFloat |
( |
| ) |
|
flagArgumentFloat(flagName, argIndex) -> float
Returns the specified argument of the specified single-use flag as
a float.
| Signature: | flagArgumentFloat(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | float |
| Description: | Returns the index'th argument of the specified flag as a float. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.flagArgumentInt |
( |
| ) |
|
flagArgumentInt(flagName, argIndex) -> int
Returns the specified argument of the specified single-use flag as
an int.
| Signature: | flagArgumentInt(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | int |
| Description: | Returns the index'th argument of the specified flag as a int. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.flagArgumentMAngle |
( |
| ) |
|
flagArgumentMAngle(flagName, argIndex) -> MAngle
Returns the specified argument of the specified single-use flag as
an MAngle.
| Signature: | flagArgumentMAngle(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | MAngle |
| Description: | Returns the index'th argument of the specified flag as an MAngle. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.flagArgumentMDistance |
( |
| ) |
|
flagArgumentMDistance(flagName, argIndex) -> MDistance
Returns the specified argument of the specified single-use flag as
an MDistance.
| Signature: | flagArgumentMDistance(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | MDistance |
| Description: | Returns the index'th argument of the specified flag as an MDistance. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.flagArgumentMTime |
( |
| ) |
|
flagArgumentMTime(flagName, argIndex) -> MTime
Returns the specified argument of the specified single-use flag as
an MTime.
| Signature: | flagArgumentMTime(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | MTime |
| Description: | Returns the index'th argument of the specified flag as an MTime. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.flagArgumentString |
( |
| ) |
|
flagArgumentString(flagName, argIndex) -> string
Returns the specified argument of the specified single-use flag as
a string.
| Signature: | flagArgumentString(flag, index) |
| Parameters: | flag - string
index - int |
| Returns: | string |
| Description: | Returns the index'th argument of the specified flag as a string. Raises RuntimeError if the flag has been enabled for multi-use. |
| OpenMaya.MArgParser.getFlagArgumentList |
( |
| ) |
|
getFlagArgumentList(flagName, occurrence) -> MArgList
Returns the arguments for the specified occurrence of the given
multi-use flag as an MArgList. Raises RuntimeError if the flag has
not been enabled for multi-use. Raises IndexError if occurrence is
out of range.
| Signature: | getFlagArgumentList(flag, occurrence) |
| Parameters: | flag - string
occurrence - int |
| Returns: | MArgList |
| Description: | Returns the arguments for the specified occurrence of the given multi-use flag as an MArgList. Raises RuntimeError if the flag has not been enabled for multi-use. Raises IndexError if occurrence is out of range. |
| OpenMaya.MArgParser.getFlagArgumentPosition |
( |
| ) |
|
getFlagArgumentPosition(flagName, occurrence) -> int
Returns the position in the argument list of the specified occurrence
of the given flag. Raises IndexError if occurrence is out of range.
| Signature: | getFlagArgumentPosition(flag, occurrence) |
| Parameters: | flag - string
index - int |
| Returns: | int |
| Description: | Returns the position in the argument list of the specified occurrence of the given flag. Raises IndexError if occurrence is out of range. |
| OpenMaya.MArgParser.getObjectStrings |
( |
| ) |
|
getObjectStrings() -> tuple of unicode strings
If the command's MSyntax has set the object format to kStringObjects
then this method will return the objects passed to the command as a
tuple of strings. If any other object format is set then an empty
tuple will be returned.
| Signature: | getObjectStrings() |
| Parameters: |
|
| Returns: | tuple of strings |
| Description: | If the command's MSyntax has set the object format to kStringObjects then this method will return the objects passed to the command as a tuple of strings. If any other object format is set then an empty tuple will be returned.
|
| OpenMaya.MArgParser.isFlagSet |
( |
| ) |
|
isFlagSet(flagName) -> bool
Returns True if the given flag appears on the command line.
| Signature: | isFlagSet(flag) |
| Parameters: | flag - string |
| Returns: | bool |
| Description: | Returns True if the given flag appears on the command line.
|
| OpenMaya.MArgParser.numberOfFlagUses |
( |
| ) |
|
numberOfFlagUses(flagName) -> int
Returns the number of times that the flag appears on the command
line.
| Signature: | numberOfFlagUses(flag) |
| Parameters: | flag - string |
| Returns: | int |
| Description: | Returns the number of times that the flag appears on the command line. |
| OpenMaya.MArgParser.isEdit |
|
static |
True if the edit flag is present.
| Name: | isEdit |
| Type: | bool |
| Access: | R |
| Description: | True if the -edit flag is present. |
| OpenMaya.MArgParser.isQuery |
|
static |
True if the query flag is present.
| Name: | isQuery |
| Type: | bool |
| Access: | R |
| Description: | True if the -query flag is present. |
| OpenMaya.MArgParser.numberOfFlagsUsed |
|
static |
Number of different flags used on the command line. If the same flag appears multiple times it is only counted once.
| Name: | numberOfFlagsUsed |
| Type: | int |
| Access: | R |
| Description: | Number of different flags used on the command line. If the same flag appears multiple times it is only counted once. |