Go to: Synopsis. Return value. Keywords. MEL examples.

Synopsis

string fromNativePath( string )

Convert from '/' to '\' path formats on Windows, otherwise does nothing. This proceedure can be used to try to unify path data to use the forward slash character (a safer and more cross-platform way of handling paths, since the forward slash is what Maya uses internally to separate path names).

Return value

None

Keywords

MEL Windows path file , , ,

Arguments

Variable Name Variable Type Description
$pathstring The path to be converted.

MEL examples

		string $native = "c:\\examples\\scripts\\second\\city";

		// Note the double backslashes used in input - in MEL, backslash is


		// a special escape character and for it to be understood as the 


		// backslash character, two backslashes must be used


      string $path = fromNativePath( $native );

		// Result: c:/examples/scripts/second/city // On Windows