Force a format in Sdf.Layer.FindOrOpen

Hello all,

Is there a way to force a file format independent of the file extension?

I tried layer = Sdf.Layer.FindOrOpen(“my_usd_file.blah”, {“format” : “usd”}) but that still gives a Cannot determine file format error.

Thanks,
Koen

No, there would still need to be some sort of declaration of .blah as a file format plugin, and that plugin would need to be able to understand how to interpret file format arguments to dispatch to the .usd file format plugin, I think?

Ok, that makes sense, I added my custom extension to the pluginfo json’s of all the usd installs, but I cant add this to the maya pluginfo, as the whole idea of a custom extension is to allow maya to use a different code path for some of our usd files ( we have some models that need a custom import path but we dont want to disable the default maya usd plugin as we use that in other scenario’s ).

Thanks,
Koen