Difference between revisions of "Command System: Querying"
(Created page with "Command arguments marked with a question mark can be '''queried'''. For example, the ''material.name'' commandâ€™s ...")
Revision as of 03:11, 16 February 2012
Command arguments marked with a question mark can be queried. For example, the material.name commandâ€™s name argument can be queried for its value, returning the name of the selected materials. If multiple items are selected, multiple names are returned. Although multiple values can be returned by a query, only a single value can be set for a given argument.
Using the Command Historyâ€™s Results Tab
The Results tab of the Command History shows the results of any command executed or queried from that viewport, including failures and any queried values. In the case of the material.name command, one name will show up under the command's row for each material that is selected. If no items were selected, the command is disabled and (none) is shown in the results list.
Performing a Query
To query a command, simply insert a ? in place of the value. Queries always return raw values without units, and any square brackets around the question mark are ignored. What kind of value is returned is determined by the argumentâ€™s datatype.
material.name ? material.name name:?