The MTLWriter was using a BLI_assert to check user-provided data, which is incorrect and would only work in Debug builds. Release builds would end up using too small of a buffer and would needlessly fail to append the `.mtl` extension in some cases. Instead, we now allow the path manipulation code to just use the full max size available to it. Pull Request: https://projects.blender.org/blender/blender/pulls/120275