Bug: Hammer Material Browser crashes instantly when encountering VMT files with unquoted paths
Describe the bug
If you have a VMT file where texture paths do not have quotation marks around them, hammer will instantly crash when it loads the material via its material browser.
Paths should always be in quotation marks and not having them is a mistake, but it would be nice to have hammer handle it more gracefully. It could be an engine-wide thing, I have not tested it outside of hammer.
To Reproduce
- Remove the quotation marks from any texture path inside any vmt, like so:
$basetexture testing/test
- Open hammer, create a new empty map and search the material name inside the material browser
Issue Map
Map agnostic.
Expected Behavior
Handle such cases more gracefully, avoiding crashes and outputting an error in the log window and or a pop-up message when encountering such materials.
Operating System
Windows
Or even better... auto fix such cases when encountering them...
You want hammer to potentially modify your vmt files?
Not crashing is the baseline. Auto fixing is just a suggestion. no idea how much Hammer can be trusted with this.
It'd probably be better to have it as some type of external tool. This would introduce additional complexity to Hammer and I feel that it could have unintended side effects.