Finding Where a Texture is Used
By Geep, 2020
Occasionally, you'd like to locate and take a look at every object in your map that has a given texture. This might be because:
- you are thinking of replacing it with another texture, but want to inspect cases individually;
- you are starting to work with someone's map (say, an abandoned or partial project), and when you dmap it, the console reports missing textures.
To find all instances of a texture of interest, here are two methods.
- Begin with nothing in the map selected.
- In DR's Texture Browser/Texture, find the texture name of interest.
- Right-click on it and choose "Seek in Media Browser"
- In the main pane of Media window, the texture name should be highlighted in gray. (If not, use Method 2.)
- Right-click on the highlighted name (not anything in the lower pane) and choose "Select elements with this texture".
- How you proceed after that is up to you, and depends on whether there's just one, just a few, or lots of selected objects.
In that last case, you'll probably need to organize your review of them. For instance:
- If map context is not important, just hide everything not selected, and as you visit each instance, hide it too.
- If map context is important, add all the selected times to a new temporary DR Layer, and, as you visit each instance, delete it from that layer.
Open the <fm>.map file with a text editor, and search (repeatedly) for the texture name of interest. For every hit, note the comment at the beginning of the block in which it appears, which gives either its "primitive" number or "entity" number. Record those separately.
Then, in DR, for each object of interest:
- Clear any previous selection.
- Use Map/Find Brush. Enter either the Brush number (e.g., primitive number) or Entity number, to select the item.
- Then the END key (shortcut for View/Camera/Center) will show it to you.
Keep in mind that different faces of a brush or entity may have different textures.