translator -q -extension "mayaAscii";
// ,Result:, ma //
translator -q -extension "mayaBinary";
// ,Result:, mb //
translator -q -extension "OBJ";
// ,Result:, obj //
I think for the list of "file types" you just do:
translator -q -list
Anything that is returned in that array can be used in the -extension query.
eg:
string $typeList[] = `translator -q -list`;
for ($type in $typeList)
{
string $ext = `translator -q -extension $type`;
print ($ext + "\n");
}
Some translators return an empty string for their extension though...
On Wed, Feb 18, 2009 at 2:57 PM, Chadrik <[email protected]> wrote:
>
> is there a way to get a mapping of registered files types to their
> extensions or vice versa? for example:
>
>
> 'mayaAscii' ---> 'ma',
> 'mayaBinary' ---> 'mb'
>
>
> i'm looking particularly for the list of valid types which can be
> passed to `file -type` flag, which i believe can vary depending on
> what file translators are registered.
>
> -chad
> >
>
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---