Skip to documentation
DocumentationAll documentsEnglish

WHICH_SHADER(nged)

NAME

which_shader - list all combinations using a given shader

On this page

SYNOPSIS

which_shader [-s] shader_name(s)

DESCRIPTION

The which_shader command searches every combination in the database and reports those whose shader string contains one or more of the specified shader_name values. The search is a substring match — a combination is included if its shader field contains the given name anywhere within it.

Only combinations are scanned. Primitive shapes do not have shaders and are not checked.

Multiple shader names may be given; the database is scanned once for each.

Options

-s

Script mode. Outputs matching combination names separated by spaces on a single line, without headers. Without this flag, output is grouped under a heading for each shader name, with each matching combination on its own indented line.

EXAMPLES

Example 1. List all combinations using the plastic shader

mged> which_shader plastic

Reports all combinations whose shader string contains plastic, with a heading line and one name per line.

Example output:

Combination[s] with shader plastic:
   hull.c
   turret.c
Example 2. Script-mode output for use in automation

mged> which_shader -s plastic

Returns the matching names space-separated without a header, for use in scripts:

 hull.c turret.c
Example 3. Search for multiple shaders at once

mged> which_shader plastic glass

Scans for combinations using plastic and then separately for those using glass, reporting results under separate headings.

SEE ALSO

search(nged), wmater(nged), rmater(nged)

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org