- A command:
- is like a magic word for Maya to do your bidding.
- says to Maya, "textCurves!!!" Then Maya makes one for you.
- A command argument
- says to Maya, "Hey, I'm letting you know that I want to add a detail to this textCurves command called -t"
- A parameter
- is the specific detail of a command argument.
- In our case, "Hello World" was the detail we used but it could be anything, depending on what you want.
textCurves -t "Hello World!" ;
To be thorough, let me briefly address a big question: What exactly does the cryptic text in our command statement mean?
To be thorough, let me briefly address a big question: What exactly does the cryptic text in our command statement mean?
textCurves
This is a command.
Specifically, textCurves performs the particular task of creating "NURBS curves from a text string" (Cite source: maya help) into the scene .
There are thousands (millions?) of specific commands that are already built into Maya
that are ready to use. You can also create commands from scratch, in case there's something Maya doesn't already do, but should!
In an earlier post, Command Errors, I introduced what commands and command errors are and defined them in greater detail. I used the command, sphere, as the example.
-t
In general terms, this is a command argument.
There are thousands (millions?) of specific commands that are already built into Maya
that are ready to use. You can also create commands from scratch, in case there's something Maya doesn't already do, but should!
In an earlier post, Command Errors, I introduced what commands and command errors are and defined them in greater detail. I used the command, sphere, as the example.
-t
In general terms, this is a command argument.
Specifically, -t is a command argument for the textCurves command.
More often than not, its not enough to simply type in a command without telling Maya
the details. Using command argument fleshes out such details.
The -t argument for the textCurves command allows you to enter the specific phrase you want displayed. the -t argument isn't universal, though - you can't use it for just any command (you can't use it for the sphere command)
In our case, we wanted to display the text, Hello World!
There are many other command arguments associated with the textCurves command, such as:
- -f : allows you to determine the font
- -n : allows you to give a specific name to the object
For instance, execute the following code, to see what adding extra arguments does:
textCurves -f "Arial" -n "helloWorld" -t "Hello World!"
There will be another post about how you can find what other command arguments are associated with a specific command, to give
"Hello World!"
This is a parameter.
Specifically, the phrase, "Hello World!", really means nothing to Maya and isn't important to the command, itself.
What's important is "Hello World!" represents a specific detailed parameter you want Maya to act on.
For instance, Instead of "Hello World!", test the following:
- your name
- the name of a friend
- a city
- a state
- your favorite restaurant
- Anything!
You're probably thinking, "Data types? A 'String'?" We'll get to that easy stuff in another post. For now, just know that:
- the -t argument's parameters need to be enclosed in quotes
- not all argument parameters need to be enclosed in quotes. It just depends the type of argument.
No comments:
Post a Comment