really filter notex
Currently in NetRadiant there is a toggle-able option named “Hide Image Missing” (named internally filterNotex
) that is expected to hide missing shaders and not the notex
and shadernotex
shaders in texture browser. Having an option to also (really) filter these notex
and shadernotex
fallback makes high sense (and higher sense) because there is no one use case to apply the “missing texture” editor's fallback neither the “editor image not found” fallback.
The historic “Hide Image Missing” option is working weirdly, checking names against built-in notex
shader from NetRadiant's bitmap/
directory (after shader parsing), but it works.
So we needed a “Hide Fallback” option to filter the useless notex
textures to show up on texture browser.
On another side, there is some very aged radiant living out there, and they have some strong requirements. For example GtkRadiant is still hardcoding the texture/radiant/notex
path (same for the shadernotex
counterpart), does not provide a fallback unlike NetRadiant, and abort if missing, offering to user nothing else than a fatal error.
So, Because of that, every game on earth that would not close the door to be one day likely supported by GtkRadiant has to provide the notex
shader within it's own file distribution system, and the shader must fit the name GtkRadiant expects. Because GtkRadiant does not ship the required files it needs to run, every game has to. That's why, for example, we provide those fallbacks for Unvanquished. And we have to live with it.
Every game on earth that would be likely supported one day by GtkRadiant has to provide the notex
shader as expected by GtkRadiant, and every map editor that would be likely to support those games that would be likely supported by GtkRadiant has to workaround the GtkRadiant workarounds they ships. So, NetRadiant has to workaround GtkRadiant even when the user don't want to put his hands on it and his computer never seen it. True Story.
This leads to having multiple paths for the same useless shaders in texture browser, also adding useless shader groups (kind of folders) messing with the treeview. For example, in our case, there is not only four different paths in texture browser for these useless shaders, but there is also one useless group, the “radiant” one, which is empty once you hide these useless shaders.
So, this MR:
- filters out any shader ending with
/notex
and/shadernotex
. If someone makes a real shader with that name, we'll all agree he is doing a mistake. - filters both shadername and texture name.
- only add group if shader isn't
notex
(to not add an empty uselessradiant
group in texture browser if there is onlynotex
andshadernotex
within, for example) - refresh the tree on toggling, to not only hide
notex
shaders but also hide empty groups only containingnotex
shaders. - rename
filterNotex
tofilterMissing
internally to not confuse people. The notex filter is namedfilterFallback
internally to not mess with history.
So, there is now a “Hide Fallback” option right under the “Hide Image Missing” option in Texture browser menu.
Note: that option is opt-in, that's probably a good idea (it makes no sense to apply a notex
texture on a surface).