I'm no OSL expoert, but it appears as though the found geomprop is only assigned when it is not found, i.e. it's never assigned:
void mx_geompropvalue_filename(string geomprop, textureresource defaultVal, output textureresource out)
{
// Initialize to the default
out = defaultVal;
// Replace the filename component from the geomprop
string defaultFilename = defaultVal.filename;
if (getattribute(geomprop, defaultFilename) == 0) // <--- this should be == 1 I think?
out.filename = defaultFilename;
}
https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/stdlib/genosl/mx_geompropvalue_filename.osl
I'm no OSL expoert, but it appears as though the found geomprop is only assigned when it is not found, i.e. it's never assigned: