WHICH_SHADER(nged)

list all combinations using a given shader

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… WHICH_SHADER πŸ’… (nged)

okay bestie, so you know how your database has a million combinations and you're sitting there like "which ones are using that one shader??" 😭 yeah. this is the manual page for which_shader, a BRL-CAD User Command, and it exists to save you from that exact spiral 🫢


✨ NAME ✨

which_shader β€” literally lists, for you, every single combination that's using a given shader πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

which_shader [-s] shader_name(s)

🌸 DESCRIPTION 🌸

so here's the vibe: which_shader goes digging through every combination in the database and reports back the ones whose shader string contains one or more of the shader_name values you gave it. it's a substring match, no cap β€” a combination gets included as long as its shader field has the given name anywhere inside it. slay. πŸ”₯

heads up though: only combinations get scanned. primitive shapes don't have shaders, so they're not even checked. sorry not sorry to the primitives πŸ’€

and yes, you can hand it multiple shader names at once β€” it just scans the database once for each one. efficient queen behavior πŸ‘‘

⭐ Options ⭐

  • -s β€” script mode! it spits out the matching combination names separated by spaces, all on a single line, no headers, ngl super clean for automation. without this flag, the output gets grouped under a heading for each shader name, with each matching combination chillin' on its own indented line πŸ¦‹

🌈 EXAMPLES 🌈

Example 1. list all combinations using the plastic shader

mged> which_shader plastic

this reports all combinations whose shader string contains plastic, with a heading line and one name per line ✨

example output, iconically:

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, no 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, then separately for ones using glass, and reports the results under their own separate headings. multitasking main character energy fr fr πŸ’…

πŸ’œ SEE ALSO πŸ’œ

wmater(nged), rmater(nged)

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” absolute legends 🫢

πŸ“ BUG REPORTS πŸ“

if you find a bug or a problem (rude of it), reports should be submitted via electronic mail to devs@brlcad.org πŸ“§ don't be shy, they wanna know


and that's the whole page, bestie!! πŸ’– this was BRL-CAD's WHICH_SHADER(nged), brought to you by the BRL-CAD Team, and if you're ever like "wait what version/date was this from"β€” that's the footer energy right there, so go check the source. mwah 🧚✨

πŸ“¦ where this page comes from